:root {
  --bg: #f5f6f8; --paper: #fff; --ink: #20252b; --muted: #606b77;
  --line: #e1e5e9; --accent: #2d5d4c; --accent-soft: #edf4ef;
  --shadow: 0 2px 5px #202c381f, 0 8px 26px #202c3804;
  --radius: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-synthesis: none; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.65; }
button, input, select, textarea { font: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #709b86; outline-offset: 3px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 650; }
small { font-size: 12px; }
.hidden { display: none !important; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; background: #edeff2; border-right: 1px solid #dde1e6; padding: 23px 16px 18px; display: flex; flex-direction: column; z-index: 5; overflow-y: auto; }
.mac-window-controls { display: flex; gap: 8px; padding: 0 8px; height: 38px; flex-shrink: 0; }
.mac-window-controls i { display: block; width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; border: 1px solid #e94b46; }
.mac-window-controls i:nth-child(2) { background: #ffbd2e; border-color: #e9a91a; }
.mac-window-controls i:nth-child(3) { background: #28c840; border-color: #18b430; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: var(--ink); margin: 0 13px 34px; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; width: 156px; max-width: 100%; height: auto; object-fit: contain; }
.brand small { color: #4d5865; font-size: 12px; letter-spacing: 1px; }
.nav-label { font-size: 11px; font-weight: 600; color: #65727d; padding: 0 12px; margin-bottom: 10px; }
.asset-nav-label { margin-top: 26px; }
.nav-item { display: flex; align-items: center; gap: 11px; text-align: left; border: 1px solid transparent; background: transparent; width: 100%; padding: 11px 12px; border-radius: 9px; margin-bottom: 6px; font-size: 14px; color: #4c5763; transition: background .16s, color .16s; }
.nav-item > .icon { width: 19px; height: 19px; color: #64707c; }
.nav-item:hover { background: #e3e6e9; }
.nav-item.active { color: #254f40; background: #dfe9e3; border-color: #d5e2d9; font-weight: 600; }
.nav-item.active > .icon { color: var(--accent); }
.sidebar-note { padding: 20px 11px 0; margin-top: auto; font-size: 12px; color: #5b6872; }
.sidebar-note p { font-size: 12px; line-height: 1.85; color: #68747f; margin: 7px 0 0; }
.small-dot { display: inline-block; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #638675; }
.sidebar-note > .small-dot { margin-right: 5px; }
.settings-nav { margin-top: 24px; border-top: 1px solid #dce1e6; padding-top: 14px; border-radius: 0 0 9px 9px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #8b959f; margin-left: auto; }
.status-dot.ready { background: #398365; }
.sidebar-footer { display: flex; align-items: center; gap: 11px; font-size: 12px; color: #73808b; padding: 10px 12px 0; }
.sidebar-footer .icon { width: 18px; height: 18px; }
main { margin-left: 224px; min-height: 100vh; padding: 0 32px; }
.topbar { height: 70px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 13px; }
.breadcrumb { color: #76818b; }
.slash { margin: 0 12px; color: #adb5bc; }
#page-label { color: #354f43; font-weight: 550; }
.model-pill { background: #fff; border: 1px solid #dce1e6; padding: 7px 11px; border-radius: 8px; font-size: 12px; display: flex; align-items: center; gap: 8px; color: #495660; box-shadow: 0 1px 2px #20252b05; }
.model-pill .icon { width: 14px; height: 14px; margin-left: 4px; }
.model-pill:hover { background: #f9fbfa; border-color: #b5c8bc; }
.page { display: none; }
.page.active { display: block; }
.hero { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; min-height: 158px; margin: 20px 0 23px; background: #fbfaf8; border: 1px solid #e4e6e8; border-radius: var(--radius); position: relative; overflow: hidden; }
.hero-copy { padding: 30px; position: relative; z-index: 1; margin-right: -70px; }
.hero h1, .page-heading h1 { font-size: clamp(25px, 2.1vw, 31px); letter-spacing: -.7px; line-height: 1.45; margin-bottom: 10px; font-weight: 650; text-wrap: balance; }
.hero p, .page-heading > p { font-size: 14px; color: #65707b; line-height: 1.9; margin-bottom: 0; }
.hero-media { align-self: stretch; position: relative; min-width: 0; }
.hero-media img { display: block; width: 100%; height: 100%; position: absolute; object-fit: cover; object-position: 81% 55%; }
.hero-media::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 26%; z-index: 1; background: linear-gradient(90deg, #fbfaf8, #fbfaf800); }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 0 18px; gap: 18px; }
.workspace-heading h2 { font-size: 18px; margin: 0 0 4px; letter-spacing: -.2px; }
.workspace-heading p { font-size: 12px; color: var(--muted); margin: 0; }
.subtle { color: #697580; font-size: 12px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 22px; align-items: start; }
.compose-panel, .context-panel, .settings-panel, .library-card, .draft-card { border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); box-shadow: 0 3px 12px #1f293307; }
.compose-panel { padding: 26px; min-width: 0; }
.step-label { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.step-label > span { display: grid; place-items: center; width: 27px; height: 25px; flex: 0 0 auto; border-radius: 8px; background: #e9f1ec; color: var(--accent); font-size: 11px; font-weight: 650; }
.step-label h3 { font-size: 15px; margin: 0; font-weight: 600; }
.step-label .text-button { margin-left: auto; font-size: 12px; }
.product-selector { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.product-option { --product-color: #557865; --product-light: #edf3ee; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 8px; align-content: center; min-height: 76px; border: 1px solid #e1e6e8; border-radius: 10px; background: #fff; padding: 13px 10px; position: relative; transition: border-color .15s, background .15s, box-shadow .15s; min-width: 0; }
.product-option[data-product=weichang] { --product-color: #af7c51; --product-light: #faf1e8; }
.product-option[data-product=probiotic] { --product-color: #6488ae; --product-light: #edf3fa; }
.product-option[data-product=mishu] { --product-color: #a36c8a; --product-light: #f9edf3; }
.product-option[data-product=ganshu] { --product-color: #a38a49; --product-light: #faf6e6; }
.product-option[data-product=funing] { --product-color: #5c8c84; --product-light: #edf6f2; }
.product-option[data-product=zhongjie] { --product-color: #8f7ba8; --product-light: #f3eff8; }
.product-option:hover { border-color: #9ab5a6; background: #fbfdfb; }
.product-option.selected { border-color: #618b77; background: #f0f6f1; box-shadow: inset 0 0 0 .5px #618b77; }
.product-option.selected::after { content: '✓'; position: absolute; right: 6px; top: 6px; display: grid; place-items: center; font-size: 9px; width: 15px; height: 15px; color: #fff; background: var(--accent); border-radius: 50%; }
.product-option strong { font-size: 13px; display: block; font-weight: 550; text-align: left; white-space: nowrap; }
.product-option small { font-size: 11px; color: #6c7780; display: block; text-align: left; margin-top: 2px; }
.product-mini { display: grid; grid-row: span 2; place-items: center; align-self: center; width: 30px; height: 32px; border-radius: 9px; background: var(--product-light); color: var(--product-color); }
.product-mini .icon { width: 20px; height: 20px; }
.product-note { display: flex; gap: 7px; align-items: baseline; font-size: 12px; line-height: 1.85; color: #697580; margin-top: 13px; }
.product-note::before { content: '✓'; color: #4f7c65; }
.section-divider { height: 1px; background: #edf0f2; margin: 20px 0; }
.platform-selector { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.platform-option { border: 1px solid #e0e5e9; background: #fff; border-radius: 9px; padding: 10px; text-align: left; display: flex; align-items: center; gap: 8px; font-size: 12px; min-width: 0; }
.platform-option:hover { border-color: #a3bcac; background: #fbfdfb; }
.platform-option.selected { border-color: #739680; background: #f0f6f1; }
.platform-icon { display: grid; place-items: center; flex-shrink: 0; width: 25px; height: 25px; color: #64747a; }
.platform-icon .icon { width: 19px; height: 19px; }
.platform-option.selected .platform-icon { color: var(--accent); }
.platform-option .check { margin-left: auto; flex-shrink: 0; width: 13px; height: 13px; border: 1px solid #c4cdd3; border-radius: 4px; font-size: 9px; line-height: 12px; text-align: center; }
.platform-option.selected .check { background: var(--accent); color: #fff; border-color: var(--accent); }
label { display: block; font-size: 13px; font-weight: 500; margin: 0 0 7px; color: #46525d; }
.required { color: #b34d53; }
.optional { font-size: 12px; color: #65727d; margin-left: 5px; font-weight: 400; }
textarea, input, select { border: 1px solid #d4dbe1; background: #fff; color: #2e3944; border-radius: 8px; width: 100%; padding: 9px 11px; font-size: 14px; line-height: 1.65; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; min-height: 76px; }
input::placeholder, textarea::placeholder { color: #65727d; opacity: 1; }
textarea:focus, input:focus, select:focus { border-color: #739d87; box-shadow: 0 0 0 3px #e8f0eb; }
select { cursor: pointer; min-height: 41px; }
.quick-topics { display: flex; gap: 7px; flex-wrap: wrap; margin: 10px 0 18px; }
.quick-topics button { border: 1px solid #e2e9e3; background: #f2f6f3; font-size: 11px; color: #577663; padding: 4px 9px; border-radius: 6px; }
.quick-topics button:hover { background: #e8f0e9; }
.form-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.form-row select { font-size: 13px; padding-left: 9px; padding-right: 3px; }
.optional-requirements { margin-top: 10px; color: #65727c; font-size: 13px; }
.optional-requirements summary { padding: 7px 0; }
.optional-requirements label { margin-top: 12px; }
.compose-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; gap: 16px; }
.compose-bottom > span { font-size: 12px; color: #697580; }
.button { border: 1px solid transparent; border-radius: 8px; padding: 10px 16px; font-size: 13px; font-weight: 550; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.5; white-space: nowrap; min-height: 40px; transition: background .16s, box-shadow .16s; }
.button .icon { width: 17px; height: 17px; }
.primary { background: var(--accent); border-color: #284f41; color: #fff; box-shadow: inset 0 1px #ffffff12, 0 2px 3px #1c433314; }
.primary:hover:not(:disabled) { background: #244e3e; box-shadow: 0 3px 7px #1c433321; }
.secondary { background: #fff; border-color: #d5dce1; color: #46535f; box-shadow: 0 1px 2px #202c3806; }
.secondary:hover:not(:disabled) { background: #f6f8f7; border-color: #bacabf; }
.text-button { border: 0; background: none; padding: 0; color: var(--accent); font-size: 13px; text-align: left; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.text-button .icon { width: 15px; height: 15px; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.form-footnote { font-size: 11px; color: #707c85; margin: 13px 0 0; line-height: 1.85; }
.workspace-aside { display: grid; gap: 18px; min-width: 0; }
.context-panel { padding: 25px 23px; }
.context-icon { width: 42px; height: 42px; display: grid; place-items: center; background: #edf4ef; border-radius: 12px; color: var(--accent); margin-bottom: 17px; }
.context-icon .icon { width: 23px; height: 23px; }
.context-panel h3 { font-size: 21px; line-height: 1.6; margin: 0 0 12px; letter-spacing: -.4px; }
.context-panel > p { font-size: 13px; color: #6b7680; line-height: 1.9; }
.context-panel ol { padding: 0; list-style: none; counter-reset: guide; margin: 24px 0 0; }
.context-panel li { position: relative; padding: 0 0 23px 31px; counter-increment: guide; }
.context-panel li::before { content: counter(guide); font-size: 11px; font-weight: 550; color: #49735b; background: #edf4ef; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; position: absolute; left: 0; top: 0; }
.context-panel li strong { display: block; font-size: 13px; font-weight: 550; color: #35463f; margin-bottom: 4px; }
.context-panel li span { font-size: 12px; color: #6b7780; line-height: 1.8; }
.context-rule { height: 1px; background: #e6ece7; margin: 0 0 17px; }
.context-panel .context-small { font-size: 12px; color: #69766d; }
.context-panel .text-button { font-size: 12px; }
.library-shortcut { border: 1px solid #dde9e0; border-radius: var(--radius); background: #ecf3ee; padding: 22px; }
.library-shortcut > .icon { color: #4a735d; margin-bottom: 12px; width: 24px; height: 24px; display: block; }
.library-shortcut strong { font-size: 15px; font-weight: 550; }
.library-shortcut p { font-size: 12px; line-height: 1.8; color: #6a7a70; margin: 6px 0 14px; }
.library-shortcut .text-button { font-size: 12px; }
.main-footer { display: flex; justify-content: space-between; font-size: 11px; color: #65727d; margin-top: 36px; padding: 20px 0 23px; border-top: 1px solid var(--line); gap: 15px; }
.page-heading { padding: 32px 0 26px; }
.filter-row { display: flex; gap: 14px; align-items: center; margin: 0 0 24px; }
.filter-row label { margin: 0; }
.filter-row select { max-width: 240px; background-color: #fff; }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.topic-card { background: #fff; border: 1px solid var(--line); padding: 24px; border-radius: 14px; min-height: 210px; display: flex; flex-direction: column; text-align: left; box-shadow: 0 2px 8px #202c3805; transition: border-color .16s, box-shadow .16s; }
.topic-card > .icon { color: #65816e; background: #f0f5f1; padding: 8px; width: 36px; height: 36px; border-radius: 10px; margin-bottom: 16px; }
.topic-card small { font-size: 11px; color: #7c7567; }
.topic-card h3 { font-size: 16px; font-weight: 550; line-height: 1.8; margin: 10px 0 20px; }
.topic-card span { font-size: 12px; margin-top: auto; color: var(--accent); display: flex; align-items: center; gap: 7px; }
.topic-card span .icon { width: 15px; height: 15px; }
.topic-card:hover { border-color: #9fb4a6; box-shadow: 0 5px 18px #273d3010; }
.footnote { margin-top: 20px; }
.notice { padding: 16px 19px; background: #fff9ed; border: 1px solid #efdfbb; border-radius: 10px; color: #836536; font-size: 13px; margin-bottom: 24px; line-height: 1.9; }
.notice strong { font-size: 13px; font-weight: 600; color: #7d5b2a; }
.notice p { margin: 5px 0 0; }
.notice.error { background: #fff3f1; border-color: #eccbc5; color: #a2443e; }
.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.library-card { padding: 25px; min-width: 0; }
.library-header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf0f2; padding-bottom: 18px; margin-bottom: 18px; gap: 10px; flex-wrap: wrap; }
.library-header h3 { font-size: 18px; margin: 0; font-weight: 600; }
.badge { font-size: 11px; background: #eff4f0; color: #577463; padding: 3px 8px; border: 1px solid #e2eae3; border-radius: 5px; white-space: nowrap; font-weight: 400; }
.library-card dl { margin: 0; }
.library-card dt { font-size: 12px; font-weight: 500; color: #74808a; margin-bottom: 5px; }
.library-card dd { font-size: 14px; line-height: 1.95; margin: 0 0 17px; color: #3b4752; overflow-wrap: anywhere; }
.library-card details { border-top: 1px solid #ecedef; padding-top: 14px; color: #96723c; font-size: 12px; }
.library-card details p { margin: 10px 0; }
.source-label { font-size: 11px; color: #65727d; overflow-wrap: anywhere; margin: 18px 0 14px; }
.reference-panel { margin: 0 0 20px; padding: 12px; border: 1px solid #e9eced; background: #f8f9fa; border-radius: 10px; }
.reference-panel img { display: block; width: 100%; height: 210px; object-fit: contain; background: #fff; border-radius: 6px; }
.reference-panel figcaption { font-size: 11px; color: #737f88; margin-top: 9px; }
.reference-warning { font-size: 12px; color: #956539; margin: 8px 0 0; }
.packaging-direction { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; align-items: center; padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 22px; }
.packaging-direction img { display: block; width: 165px; height: 150px; object-fit: contain; border-radius: 8px; }
.packaging-reference-images { display: grid; gap: 12px; }
.packaging-direction .sachet-reference { height: 48px; }
.packaging-direction h2 { font-size: 21px; margin: 12px 0 10px; font-weight: 600; }
.packaging-direction p { font-size: 13px; color: #6b7680; margin-bottom: 8px; line-height: 1.9; }
.prompt-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; background: #ecf3ee; border: 1px solid #dce8df; border-radius: 10px; padding: 14px 18px; margin-bottom: 22px; }
.prompt-facts strong { font-size: 13px; font-weight: 550; color: #456653; }
.prompt-facts > span:last-child { font-size: 12px; color: #6f7d72; }
.prompt-facts .badge { background: #fff; }
.prompt-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.prompt-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.prompt-guide-heading { margin-top: 34px; }
.prompt-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.prompt-guide { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 21px; min-width: 0; }
.prompt-guide summary { font-size: 14px; font-weight: 550; color: #3b4d42; }
.prompt-guide .text-button { margin-top: 16px; }
.prompt-guide pre { font: inherit; font-size: 14px; line-height: 1.95; color: #4b5862; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 600px; overflow: auto; padding-right: 8px; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-panel { padding: 30px; }
.provider-brand { display: flex; align-items: center; gap: 14px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.provider-icon { display: grid; place-items: center; font-size: 25px; font-weight: 650; width: 46px; height: 46px; color: #5375b7; background: #edf2fc; border: 1px solid #e0e7f2; border-radius: 12px; }
.provider-brand h2 { font-size: 20px; margin: 0; }
.provider-brand p { font-size: 12px; color: #65727d; margin: 0; }
.provider-brand .badge { margin-left: auto; }
.settings-panel label:not(.checkbox-label) { margin-top: 20px; }
.settings-panel input[readonly] { color: #6b7882; background: #f6f7f9; }
.field-hint { font-size: 12px; color: #65727d; margin: 8px 0 18px; line-height: 1.9; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 0; color: #52616b; }
.checkbox-label input { width: 15px; height: 15px; flex: 0 0 auto; accent-color: var(--accent); margin: 0; }
.persist { margin-top: 18px; }
.settings-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.settings-actions .text-button { margin-left: auto; font-size: 12px; }
.danger { color: #ac5053; }
.settings-panel .notice { margin-top: 20px; margin-bottom: 0; }
.settings-aside { padding: 28px; border: 1px solid #e0e8e2; border-radius: var(--radius); background: #edf3ef; }
.settings-aside h3 { font-size: 20px; font-weight: 600; margin-bottom: 22px; }
.settings-aside p { font-size: 14px; color: #63736a; line-height: 1.95; margin-bottom: 22px; }
.settings-aside a { font-size: 13px; }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; align-items: start; }
.draft-card { overflow: hidden; min-width: 0; }
.draft-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 17px 20px; border-bottom: 1px solid #e9edef; font-size: 12px; color: #65727d; background: #fafbfc; }
.draft-head > .icon { width: 17px; height: 17px; color: #64846f; }
.draft-head strong { font-weight: 550; color: #4c6555; }
.draft-head .badge { margin-left: auto; background: #fbf4e8; color: #9a7138; border-color: #f1e5d1; }
.draft-head .badge.reviewed { background: #edf5ef; color: #4c7a5a; border-color: #deeadf; }
.draft-main { padding: 23px; }
.draft-title { font-size: 19px; font-weight: 600; line-height: 1.65; margin-bottom: 16px; }
.draft-body { font-size: 15px; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 440px; overflow: auto; color: #3c4853; padding-right: 8px; scrollbar-width: thin; scrollbar-color: #c2cec5 #f6f8f6; }
.draft-meta { color: #65727d; font-size: 11px; margin-top: 17px; }
.draft-tools { display: flex; gap: 8px; flex-wrap: wrap; padding: 15px 20px; border-top: 1px solid #e9edef; background: #fafbfc; }
.draft-tools button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid #dce2e6; background: #fff; font-size: 12px; padding: 7px 9px; border-radius: 6px; color: #5a6873; }
.draft-tools .icon { width: 14px; height: 14px; }
.draft-tools button:hover { background: #f0f5f1; border-color: #b5c9bb; }
.draft-tools button.favorite { color: #9b7c43; border-color: #e4d6b6; background: #fffbf1; }
.draft-card details { margin: 16px 0 0; font-size: 12px; color: #627d6c; }
summary { cursor: pointer; }
.draft-card details ul { padding-left: 18px; line-height: 1.95; }
.risk-note { font-size: 12px; color: #8e703c; background: #fff9ef; border: 1px solid #f0e0bd; padding: 11px 13px; margin-top: 16px; border-radius: 8px; line-height: 1.9; white-space: pre-line; }
.draft-body-editor { width: 100%; min-height: 320px; resize: vertical; font-size: 15px; }
.draft-field-editor { display: block; min-height: 80px; margin: 8px 0 16px; }
.draft-edit-fields label { display: block; margin: 12px 0; }
.draft-summary { font-size: 14px; color: #6f7d86; padding: 0 0 15px; border-bottom: 1px solid #e9edef; line-height: 1.9; }
.empty-state { grid-column: 1 / -1; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 55px 24px; color: #718079; font-size: 14px; }
.empty-state > .icon { width: 34px; height: 34px; display: block; margin: 0 auto 16px; color: #85a18e; }
.content-library-note { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; border: 1px solid #e0e9e3; background: #edf4ef; padding: 13px 17px; border-radius: 10px; margin-bottom: 20px; font-size: 12px; color: #64766a; }
.content-library-note .badge { background: #fff; }
.history-toolbar { display: grid; gap: 19px; margin: 0 0 20px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 3px 12px #1f293305; }
.library-search-row { display: flex; gap: 12px; }
.history-toolbar input[type=search] { flex: 1; min-width: 0; background: #fafbfc; }
.library-filter-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.library-filter-row label { margin: 0; font-size: 12px; color: #6b7882; }
.library-filter-row select { margin-top: 7px; }
.library-filter-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; border-top: 1px solid #edf0f2; padding-top: 17px; }
.library-filter-actions .button { margin-left: auto; }
.history-toolbar .button { font-size: 13px; }
.library-pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 27px 0; }
.library-pagination span { color: #728078; font-size: 12px; }
#history-results[aria-busy=true] { pointer-events: none; opacity: .65; }
#history-results .draft-body { max-height: 260px; }
.job-progress { display: flex; align-items: center; gap: 16px; border: 1px solid #d9e6dd; background: #eef5ef; padding: 18px 22px; border-radius: 12px; margin: 25px 0; color: #426b51; }
.job-progress strong { font-size: 14px; font-weight: 550; }
.job-progress p { font-size: 12px; margin: 4px 0 0; color: #6a7e70; }
.job-progress .button { margin-left: auto; }
.spinner { width: 20px; height: 20px; flex-shrink: 0; border: 2px solid #c7dacb; border-top-color: #4e7d5d; border-radius: 50%; animation: spin 1s linear infinite; }
#toast { position: fixed; left: calc(50% + 112px); bottom: 26px; transform: translateX(-50%) translateY(14px); padding: 13px 22px; border-radius: 11px; background: #304338; box-shadow: 0 5px 22px #182e2926; color: #fff; font-size: 13px; z-index: 30; visibility: hidden; pointer-events: none; max-width: min(640px, 80vw); }
#toast.show { visibility: visible; transform: translateX(-50%); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (min-width: 1650px) { main { padding: 0 max(36px, calc((100vw - 1540px) / 2)); } .workspace-grid { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; } .compose-panel { padding: 30px; } .product-option strong { font-size: 13px; } .platform-option { font-size: 13px; } }
@media (max-width: 1200px) { .sidebar { width: 202px; padding-inline: 13px; } main { margin-left: 202px; padding-inline: 24px; } .workspace-grid { grid-template-columns: minmax(0, 1fr) 252px; gap: 18px; } .compose-panel { padding: 22px; } .product-selector { grid-template-columns: repeat(3, minmax(0, 1fr)); } .platform-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); } .context-panel { padding: 23px 20px; } .hero-copy { padding: 26px; } .hero h1 { font-size: 26px; } .hero p { max-width: 340px; } .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 980px) { .workspace-grid { grid-template-columns: minmax(0, 1fr); } .workspace-aside { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .context-panel h3 { font-size: 19px; } .context-panel ol { margin-top: 18px; } .context-panel li { padding-bottom: 15px; } .product-selector { grid-template-columns: repeat(3, minmax(0, 1fr)); } .platform-selector { grid-template-columns: repeat(3, minmax(0, 1fr)); } .settings-grid, .results-grid, .library-grid { grid-template-columns: minmax(0, 1fr); } .hero { grid-template-columns: minmax(0, 1fr); } .hero-copy { margin-right: 0; padding-right: 30%; } .hero-media { position: absolute; inset: 0 0 0 auto; width: 42%; opacity: .9; } .hero p { max-width: 290px; } .prompt-guide-grid { grid-template-columns: minmax(0, 1fr); } .library-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) {
  .sidebar { position: static; width: 100%; padding: 15px 18px 12px; border-right: 0; border-bottom: 1px solid #dde2e5; overflow: visible; }
  .mac-window-controls, .nav-label, .sidebar-note, .sidebar-footer { display: none; }
  .brand { margin: 0 0 13px; flex-direction: row; align-items: center; gap: 14px; }
  .brand-logo { width: 104px; }
  .brand small { font-size: 11px; }
  .sidebar nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .nav-item { font-size: 12px; gap: 6px; justify-content: center; padding: 10px 5px; margin: 0; border-radius: 8px; min-height: 42px; }
  .nav-item > .icon { width: 16px; height: 16px; }
  .settings-nav { margin-top: 6px; border-top: 0; background: #e5e9ec; padding: 9px; min-height: 40px; }
  .settings-nav .status-dot { margin-left: 0; }
  main { margin-left: 0; padding-inline: 18px; }
  .topbar { height: 60px; font-size: 12px; }
  .model-pill { font-size: 11px; padding: 7px 8px; gap: 5px; }
  .model-pill .icon { margin-left: 0; }
  .hero { min-height: 158px; margin: 19px 0 23px; }
  .hero-copy { padding: 23px; padding-right: 18%; }
  .hero h1 { font-size: 24px; max-width: 300px; }
  .hero p { font-size: 12px; max-width: 235px; }
  .hero-media { width: 36%; }
  .hero-media::before { width: 75%; }
  .workspace-heading .subtle { display: none; }
  .workspace-heading h2 { font-size: 17px; }
  .compose-panel { padding: 22px 17px; }
  .product-selector { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .product-option strong { font-size: 12px; text-align: center; }
  .product-option small { font-size: 11px; text-align: center; }
  .product-option { display: block; padding: 12px 4px 10px; }
  .product-mini { margin: 0 auto 8px; }
  .platform-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .platform-option { font-size: 12px; padding: 10px 7px; gap: 5px; }
  .platform-icon { width: 22px; }
  .step-label h3 { font-size: 14px; }
  .step-label .text-button { font-size: 11px; }
  .form-row { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  input, select, textarea, .form-row select { font-size: 16px; }
  .workspace-aside { grid-template-columns: minmax(0, 1fr); }
  .context-panel { padding: 23px; }
  .context-panel h3 br { display: none; }
  .context-panel ol { display: grid; grid-template-columns: minmax(0, 1fr); }
  .library-shortcut { padding: 21px; }
  .topic-grid { grid-template-columns: minmax(0, 1fr); }
  .topic-card { min-height: 190px; }
  .page-heading { padding: 27px 0 23px; }
  .page-heading h1 { font-size: 25px; }
  .page-heading > p { font-size: 13px; }
  .main-footer { font-size: 11px; }
  .main-footer span:last-child { display: none; }
  .settings-panel, .settings-aside { padding: 23px 19px; }
  .settings-actions .button { padding: 10px 13px; }
  .history-toolbar { padding: 18px; }
  .library-search-row { flex-wrap: wrap; }
  .library-search-row input { flex-basis: 100%; }
  .library-search-row .button { width: 100%; }
  .library-filter-row { gap: 13px 10px; }
  .library-filter-actions { gap: 13px; }
  .library-filter-actions .button { margin-left: 0; }
  .library-pagination { gap: 10px; flex-wrap: wrap; }
  .library-pagination .button { padding: 9px 12px; }
  .job-progress { flex-wrap: wrap; padding: 17px; }
  .job-progress .button { margin-left: 36px; }
  #toast { left: 50%; width: max-content; max-width: 90vw; }
  .library-card { padding: 22px 18px; }
  .library-header h3 { font-size: 17px; }
  .packaging-direction { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px; }
  .packaging-reference-images { display: flex; align-items: center; justify-content: center; gap: 15px; }
  .packaging-direction img { width: 115px; height: 140px; }
  .packaging-direction .sachet-reference { width: 130px; }
  .packaging-direction h2 { font-size: 20px; }
  .prompt-form-row { grid-template-columns: minmax(0, 1fr); }
  .prompt-actions .button { width: 100%; white-space: normal; }
  .draft-head { padding: 15px 18px; }
  .draft-main { padding: 20px 18px; }
  .draft-tools { padding: 15px 18px; }
}
@media (max-width: 380px) { .hero-copy { padding-right: 21px; } .hero-media { display: none; } .hero h1 { font-size: 22px; } .product-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); } .platform-option { font-size: 11px; } .brand small { letter-spacing: 0; } .topbar .slash { margin-inline: 7px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
