:root{--green:#e64259;--green-d:#c73048;--bg:#f7f7f9;--text:#262631;--sub:#797b89;--line:#e9e9ef;--accent-soft:#fff1f3}
body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;line-height:1.5}
header{background:#fff;color:var(--text);box-shadow:none;border-bottom:1px solid var(--line);padding:14px max(20px,calc((100vw - 1220px)/2));padding-top:calc(14px + var(--sat))}
header h1{letter-spacing:-.4px;font-size:21px}header h1:before{content:'ST';display:inline-grid;place-items:center;width:34px;height:34px;background:var(--green);color:white;border-radius:10px;font-size:14px;margin-right:10px;vertical-align:middle}
header .slogan{margin-left:44px;color:var(--sub);font-size:11px}header .user{color:#646574}header .iconbtn{background:#f2f2f6;color:#505260;border-radius:10px}
main{max-width:1260px;padding:24px 20px calc(96px + var(--sab))}.card{padding:22px;border:1px solid var(--line);box-shadow:none;border-radius:16px;margin-bottom:18px}.card h3{font-size:17px;font-weight:650}.card h3:before{display:none}.card .note{padding-left:0;line-height:1.7;font-size:13px;margin:0 0 16px}
.btn{font-weight:600;padding:10px 17px;font-size:13px;min-height:40px;transition:background .15s}.btn.sec:hover{background:#f7f7fa}.btn.small{min-height:32px;padding:5px 11px;font-size:12px}.btn:focus-visible,.chip:focus-visible{outline:3px solid #f0adb8;outline-offset:2px}
input[type=text],input[type=password],input[type=number],select,textarea,input[type=url]{font:inherit;font-size:14px;width:100%;border:1px solid #dddfe7;border-radius:10px;padding:11px 12px;background:white;outline:none;color:var(--text)}
textarea{resize:vertical;min-height:100px;line-height:1.8}input:focus,select:focus,textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px #e6425912}input:disabled,select:disabled{background:#f4f4f7}.field{display:grid;gap:7px;margin-bottom:16px}.field>label{font-size:13px;font-weight:600;color:#505160}.field small,.muted{font-size:12px;color:var(--sub);line-height:1.7}.field-row{display:flex;gap:8px;align-items:center}.field-row select{flex:1;min-width:0}.field-row .btn{white-space:nowrap}
.chip{border:1px solid transparent;font-size:12px;background:#f3f3f7}.chip.on{background:var(--accent-soft);color:var(--green-d);border-color:#f1a4b0}.chip input{accent-color:var(--green);margin-right:5px}.chip.disabled{pointer-events:none;opacity:.4}.chips.locked{opacity:.4;pointer-events:none}.chip label{cursor:pointer}
.page-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:22px}.page-heading h2{font-size:26px;letter-spacing:-.6px;margin-bottom:6px}.page-heading p{color:var(--sub);font-size:13px}.count-pill{padding:4px 9px;font-size:11px;background:#f4f4f8;border-radius:6px;color:#737582}
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:16px}.product-card{margin:0;display:flex;flex-direction:column;gap:12px}.product-card h3{margin:0;font-size:18px}.product-card p{white-space:pre-line;font-size:13px;color:#6e7080;line-height:1.8;overflow-wrap:anywhere}.product-card .selling{background:#fff6f7;border-radius:10px;padding:12px;color:#8f4d57}.product-card .row{margin-top:auto}
.empty-state{text-align:center;background:#fff;border:1px dashed #dadbe4;border-radius:16px;padding:42px 20px;color:var(--sub);grid-column:1/-1}.empty-state b{display:block;font-size:17px;color:#4b4d59;margin-bottom:7px}.empty-state p{font-size:13px;line-height:1.8}.empty-state .btn{margin-top:16px}.status-line{font-size:13px;color:#777b89;line-height:1.8;white-space:pre-line;overflow-wrap:anywhere}.status-line.error{color:#b24935}.status-line.ok{color:#25836a}
.workspace{display:grid;grid-template-columns:320px minmax(0,1fr);gap:24px;align-items:start}.workspace>.controls{min-width:0}.controls .card{padding:20px}.controls h3{font-size:15px}.controls .btn.wide{width:100%}.subhead{font-size:12px;color:#898b96;margin:20px 0 10px}.brief{padding:12px;background:#f7f7fa;border-radius:10px;font-size:12px;color:#6c6e7b;line-height:1.9}.brief strong{color:#414453}.generation-state{margin-top:12px}.history-list{display:grid;gap:6px;max-height:280px;overflow:auto}.history-item{font:inherit;border:1px solid var(--line);background:#fff;text-align:left;padding:12px;border-radius:9px;cursor:pointer;width:100%;font-size:12px}.history-item:hover,.history-item.on{border-color:#eba1ad;background:#fff8f9}.history-item small{display:block;color:var(--sub);font-size:10px;margin-top:4px}
.preview-shell{max-width:620px;width:100%;margin:0 auto}.preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;flex-wrap:wrap;font-size:12px;color:var(--sub)}.note-paper{background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:0 8px 30px #25233506}.note-images{position:relative;background:#f0eff0}.note-images img{display:block;width:100%;height:420px;object-fit:contain}.image-count{position:absolute;right:16px;top:16px;background:#25222a99;color:white;border-radius:20px;padding:4px 10px;font-size:11px}.image-nav{position:absolute;top:47%;border:0;border-radius:50%;width:34px;height:34px;background:#ffffffdb;color:#333;font-size:24px;cursor:pointer}.image-nav.prev{left:12px}.image-nav.next{right:12px}.image-actions{padding:12px 18px;display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid #f2f2f5;flex-wrap:wrap}.dots{display:flex;justify-content:center;gap:6px;align-items:center;min-height:12px;flex-wrap:wrap;max-width:100%}.dots button{width:6px;height:6px;border:0;padding:0;background:#d9d9df;border-radius:50%;cursor:pointer}.dots button.on{background:var(--green)}
.note-block{padding:20px 26px 0}.note-block:last-child{padding-bottom:26px}.block-label{display:flex;justify-content:space-between;align-items:center;font-size:10px;letter-spacing:1px;color:#a0a1ab;margin-bottom:8px}.copy-btn{border:0;background:#f5f5f8;border-radius:6px;font-size:11px;color:#70717d;padding:5px 10px;cursor:pointer;letter-spacing:0}.copy-btn:hover{color:var(--green);background:var(--accent-soft)}.note-title,.note-body,.note-topics{border:1px solid transparent;padding:3px 0;border-radius:3px;width:100%;box-shadow:none;resize:vertical;background:white;min-height:0}.note-title{font-size:21px;font-weight:700;line-height:1.5;min-height:65px}.note-body{font-size:16px;line-height:1.9;min-height:270px}.note-topics{font-size:14px;line-height:1.8;color:#496f97;min-height:64px}.note-body:focus,.note-title:focus,.note-topics:focus{box-shadow:none;border-color:#eee;padding:3px 6px}.note-hint{font-size:11px;color:#93949f;line-height:1.8;margin:12px 4px}.note-empty{min-height:640px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:linear-gradient(165deg,#fff,#fff9fa);border:1px solid var(--line);border-radius:18px;padding:35px;color:#858594}.note-empty .empty-visual{width:100px;height:124px;background:#ffe9ed;border:5px solid #fff;border-radius:10px;transform:rotate(-8deg);box-shadow:8px 10px 0 #f3eff5,0 5px 25px #d482911a;margin-bottom:35px;display:grid;place-items:center;font-size:34px;color:#df7286}.note-empty h3{color:#4d4d5c;margin-bottom:12px;font-size:20px}.note-empty p{font-size:13px;line-height:1.9;max-width:300px}
.ref-layout{display:grid;grid-template-columns:330px 1fr;gap:22px}.reference-card{padding:20px;background:white;border:1px solid var(--line);border-radius:14px;margin-bottom:14px}.reference-card h3{font-size:16px;margin:12px 0 8px;overflow-wrap:anywhere}.reference-card p{font-size:13px;line-height:1.8;white-space:pre-line;color:#6d7080;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.reference-card .row{margin-top:12px}.badge{display:inline-block;font-size:10px;padding:3px 8px;border-radius:5px;background:#f1f1f6;color:#787989}.badge.ready{background:#eaf6f1;color:#278269}.badge.pending,.badge.review{background:#fff2df;color:#ab772c}.reference-card a{font-size:12px;color:#6e80a0;text-decoration:none}.topic-text{font-size:12px;color:#4f7d9f;margin-top:10px;overflow-wrap:anywhere}.dialog-backdrop{position:fixed;inset:0;background:#1c202777;z-index:70;padding:24px;display:grid;place-items:center;backdrop-filter:blur(3px)}.dialog-panel{background:#fff;width:min(580px,100%);max-height:88vh;overflow:auto;border-radius:18px;padding:28px;box-shadow:0 20px 70px #0002}.dialog-title{font-size:21px;margin-bottom:6px}.dialog-panel .muted{margin-bottom:22px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.dialog-panel textarea{min-height:120px}.item .tags{color:#8e5560}.item .product-label{font-size:10px;color:#878693;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:4px}.grid{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:14px}.item img,.item video{height:160px}.item{border-radius:12px;background:white}.up{background:#fcfcfe;border:1px dashed #d9d9e1;padding:28px}.up.hot{background:#fff4f6;border-color:var(--green)}
@media(min-width:900px){#tab-lib{display:grid;grid-template-columns:310px 1fr;column-gap:20px;align-items:start}#tab-lib>.card:first-child{grid-column:1;grid-row:1/3}#tab-lib>.card:nth-child(2){grid-column:2}#tab-lib>.card:nth-child(3){grid-column:2}.controls{position:sticky;top:20px}}
@media(max-width:760px){header{padding-left:16px;padding-right:16px}header .slogan{font-size:10px}header h1{font-size:18px}main{padding:20px 12px calc(90px + var(--sab))}.workspace,.ref-layout{grid-template-columns:1fr;gap:10px}.controls .card{padding:18px}.page-heading h2{font-size:23px}.page-heading{margin-bottom:18px}.card{padding:18px}.note-images img{height:auto;aspect-ratio:1;max-height:550px}.note-block{padding:18px 20px 0}.note-title{font-size:20px}.note-body{font-size:15px}.note-empty{min-height:390px}.history-list{max-height:140px}.dialog-backdrop{padding:12px}.dialog-panel{padding:22px}.product-grid{grid-template-columns:1fr}.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.item img,.item video{height:155px}.image-actions{padding:10px 14px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
/* 侧边导航：桌面常驻，手机抽屉。 */
:root{--sidebar-width:208px}
.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar-width);background:white;border-right:1px solid var(--line);z-index:50;display:flex;flex-direction:column;padding:28px 14px 20px;overflow-y:auto}
.sidebar-brand{display:flex;align-items:center;gap:10px;padding:0 12px 30px;font-size:18px;font-weight:700;white-space:nowrap}.brand-mark{display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;border-radius:10px;background:var(--green);color:white;font-size:13px;letter-spacing:-.5px}
.sidebar .tabs{display:flex;flex-direction:column;gap:6px;flex:1;position:static;overflow:visible;background:transparent;border:0;padding:0;white-space:normal}
.sidebar .tabs button{display:flex;align-items:center;gap:12px;width:100%;background:transparent;border:0;border-radius:10px;min-height:46px;padding:12px 16px;color:#777985;font:inherit;font-size:14px;text-align:left;cursor:pointer;transition:background .15s,color .15s;flex-shrink:0}
.sidebar .tabs button:hover{background:#f7f7fa;color:#3f414e}.sidebar .tabs button.on{background:#fff0f3;color:#d8344f;font-weight:650}.sidebar .tabs button:focus-visible{outline:2px solid #e6425980;outline-offset:2px}.sidebar .tabs button.settings-link{margin-top:auto}
.sidebar svg,.menu-toggle svg{display:block;width:19px;height:19px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.sidebar .tabs .settings-link svg circle{fill:white}.sidebar .tabs .settings-link.on svg circle{fill:#fff0f3}
.app-header{height:72px;margin-left:var(--sidebar-width);padding:0 28px;background:#fff;border-bottom:1px solid var(--line);box-shadow:none;gap:12px;color:var(--text);position:sticky;top:0;z-index:20}.app-header h1{font-size:16px;font-weight:600;letter-spacing:0;line-height:1.4}.app-header h1::before{content:none}.app-header .user{font-size:13px;color:#777985;max-width:180px}.app-header .user::before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:#e64259;margin-right:9px}
#app>main{max-width:none;width:calc(100% - var(--sidebar-width));margin:0 0 0 var(--sidebar-width);padding:28px 28px calc(96px + var(--sab))}.controls{top:92px}
.menu-toggle,.sidebar-close{display:none}.menu-backdrop{position:fixed;inset:0;background:#15192366;border:0;z-index:49}.menu-backdrop[hidden]{display:none}body.sidebar-open{overflow:hidden}
@media(min-width:901px) and (max-width:1200px){.workspace,.ref-layout{grid-template-columns:280px minmax(0,1fr);gap:20px}#tab-lib{grid-template-columns:260px minmax(0,1fr)}.grid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}.card{padding:18px}.page-heading h2{font-size:24px}}
@media(max-width:640px){.sidebar{width:min(280px,84vw);transform:translateX(-100%);transition:transform .2s ease;padding-top:calc(22px + var(--sat));padding-bottom:calc(20px + var(--sab));box-shadow:none}.sidebar.open{transform:translateX(0);box-shadow:12px 0 40px #1e1e3315}.sidebar-brand{padding:0 10px 24px;font-size:18px}.sidebar-close{display:grid;place-items:center;margin-left:auto;width:30px;height:30px;border:0;background:#f6f6f9;border-radius:8px;color:#737581;font-size:23px;cursor:pointer}.app-header{margin:0;padding:var(--sat) 16px 0;height:calc(64px + var(--sat))}.app-header h1{font-size:16px}.app-header .menu-toggle{display:grid;place-items:center;background:#f5f5f8;color:#666979;border:0;width:34px;height:34px;border-radius:9px;cursor:pointer}.app-header .user{max-width:105px;font-size:12px}#app>main{width:100%;margin:0;padding:20px 14px calc(90px + var(--sab))}.controls{position:static}#selBar{bottom:calc(14px + var(--sab))}}

@media(min-width:641px) and (max-width:900px){:root{--sidebar-width:176px}.sidebar{padding:24px 10px 18px}.sidebar-brand{padding:0 7px 26px;font-size:16px;gap:8px}.brand-mark{width:30px;height:30px}.sidebar .tabs button{padding:11px 12px;gap:10px;font-size:13px}.app-header{padding:0 20px}#app>main{padding:22px 16px calc(90px + var(--sab))}.workspace,.ref-layout{grid-template-columns:1fr}.controls{position:static}.product-grid{grid-template-columns:1fr}}
