/* Reading surfaces are semantic pairs; artwork keeps its own dark scrims. */
:root{--surface-hover:#252931;--control-line:#777b85}
.appearance-select{max-width:150px;min-width:0;min-height:44px;border:1px solid var(--control-line);border-radius:9px;background:var(--panel);color:var(--text);padding:8px;font:inherit;font-size:13px;cursor:pointer}
.appearance-setting{display:grid;gap:8px;margin:20px 0;color:var(--text);font-size:14px}
.appearance-setting .appearance-select{width:100%;max-width:none;font-size:16px;padding:10px 12px}
.profile-appearance{margin-top:20px;padding-top:4px;border-top:1px solid var(--line)}
.sidebar-account-row{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:6px;margin-top:16px}
.sidebar-account-row .account-button{padding:0;min-width:0;min-height:44px}
.sidebar-account-row .account-button>span:nth-child(2){min-width:0}
.sidebar-account-row .account-button strong{max-width:88px;white-space:nowrap}
.sidebar-account-row .account-button small{display:block;max-width:88px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;line-height:1.4}
.sidebar-account-row .account-button>.icon{display:none}
.appearance-open{display:grid;place-items:center;width:44px;min-height:44px;padding:10px;border:0;border-radius:9px;background:transparent;color:var(--muted);cursor:pointer}
.appearance-open:hover{background:var(--surface-hover);color:var(--text)}
.account-label-mobile{display:none}
.message-tools{opacity:1}
:root[data-theme=light]{color-scheme:light;--bg:#f7f6f2;--panel:#ffffff;--raised:#eeece7;--line:#d8d5cf;--muted:#625f69;--text:#25232b;--accent:#805038;--accent-hover:#683d28;--accent-ink:#ffffff;--green:#2c6545;--surface-hover:#e9e5de;--control-line:#8b8580}
html[data-theme=light] .sidebar,html[data-theme=light] .topbar,html[data-theme=light] .chat-header,html[data-theme=light] .memory-panel,html[data-theme=light] .mobile-nav{background:var(--panel);border-color:var(--line)}
html[data-theme=light] .brand-tagline,html[data-theme=light] .recent-title,html[data-theme=light] .recent-empty,html[data-theme=light] .account-button small,html[data-theme=light] .account-button>.icon,html[data-theme=light] .age-badge,html[data-theme=light] .search-wrap>.icon,html[data-theme=light] .search-hint,html[data-theme=light] .intro-bit,html[data-theme=light] .section-heading p,html[data-theme=light] .catalog-tools,html[data-theme=light] .story-card p,html[data-theme=light] .story-card-footer,html[data-theme=light] .site-footer,html[data-theme=light] .session-card p,html[data-theme=light] .session-meta,html[data-theme=light] .field-note,html[data-theme=light] .mode-option span,html[data-theme=light] .guidance,html[data-theme=light] .checkbox-field,html[data-theme=light] .preview-description,html[data-theme=light] .preview-info,html[data-theme=light] .preview-info p,html[data-theme=light] .preview-kicker,html[data-theme=light] .auth-small,html[data-theme=light] .plan-price span,html[data-theme=light] .plan-benefits,html[data-theme=light] .payment-status,html[data-theme=light] .account-details span,html[data-theme=light] .chat-title p,html[data-theme=light] .chat-story-intro p,html[data-theme=light] .composer-hints,html[data-theme=light] .memory-panel>p,html[data-theme=light] .memory-small,html[data-theme=light] .resume-button small,html[data-theme=light] .catalog-source-tabs button,html[data-theme=light] .collection-entry-copy small,html[data-theme=light] .collection-heading>p:not(.eyebrow),html[data-theme=light] .scene-explanation,html[data-theme=light] .hawkins-cost,html[data-theme=light] .hawkins-choice-hint,html[data-theme=light] .hawkins-help,html[data-theme=light] .hawkins-details{color:var(--muted)}
html[data-theme=light] .nav-button,html[data-theme=light] .recent-story,html[data-theme=light] .button.quiet,html[data-theme=light] .icon-button,html[data-theme=light] .filter-pill,html[data-theme=light] .segmented button,html[data-theme=light] .field-label,html[data-theme=light] .guidance h3,html[data-theme=light] .preview-info strong,html[data-theme=light] .preview-role,html[data-theme=light] .message-speaker,html[data-theme=light] .message-text,html[data-theme=light] .message-text strong,html[data-theme=light] .composer textarea,html[data-theme=light] .pin-item{color:var(--text)}
html[data-theme=light] .nav-button:hover,html[data-theme=light] .button:hover,html[data-theme=light] .filter-pill:hover,html[data-theme=light] .icon-button:hover{background:var(--surface-hover);color:var(--text)}
html[data-theme=light] .nav-button.active{background:#eee1d6;color:var(--accent)}
html[data-theme=light] .nav-button .nav-count{color:var(--muted)}
html[data-theme=light] .plus-card,html[data-theme=light] .editor-banner,html[data-theme=light] .resume-button,html[data-theme=light] .collection-entry{background:linear-gradient(115deg,#f3e7dc,#f4f0e9);border-color:var(--line);box-shadow:none}
html[data-theme=light] .plus-card strong,html[data-theme=light] .editor-banner>.icon,html[data-theme=light] .resume-continue,html[data-theme=light] .hero-other-catalog,html[data-theme=light] .catalog-type-label,html[data-theme=light] .collection-availability,html[data-theme=light] .collection-entry-count,html[data-theme=light] .story-card-footer>span:last-child{color:var(--accent)}
html[data-theme=light] .plus-card p,html[data-theme=light] .editor-banner p{color:var(--muted)}
html[data-theme=light] .collection-entry:hover{background:#eee1d6;border-color:var(--accent)}
html[data-theme=light] .site-footer a:hover{color:var(--accent)}
html[data-theme=light] .account-avatar,html[data-theme=light] .message-avatar.user-avatar{background:#eee1d6;color:var(--accent)}
html[data-theme=light] .age-badge,html[data-theme=light] .search-hint{border-color:var(--control-line)}
html[data-theme=light] .search-input,html[data-theme=light] .input,html[data-theme=light] .composer{background:var(--panel);border-color:var(--control-line);color:var(--text);box-shadow:none}
html[data-theme=light] .search-input::placeholder,html[data-theme=light] .input::placeholder,html[data-theme=light] .composer textarea::placeholder{color:var(--muted);opacity:1}
html[data-theme=light] .input:focus,html[data-theme=light] .search-input:focus,html[data-theme=light] .composer:focus-within{border-color:var(--accent);outline:2px solid var(--accent);outline-offset:2px;box-shadow:none}
html[data-theme=light] .button{background:var(--panel);border-color:var(--control-line)}
html[data-theme=light] .button.primary,html[data-theme=light] .filter-pill.active{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
html[data-theme=light] .button.primary:hover{background:var(--accent-hover);border-color:var(--accent-hover);color:var(--accent-ink)}
html[data-theme=light] .button.quiet{border-color:var(--control-line);background:transparent}
html[data-theme=light] .button.ghost{background:transparent;border-color:transparent}
html[data-theme=light] .button.danger,html[data-theme=light] .error-notice,html[data-theme=light] .status-rejected{background:#fbeae7;color:#8d302c;border-color:#b66b64}
html[data-theme=light] .hero{background:radial-gradient(ellipse at 85% 10%,#eadbd2,transparent 70%),linear-gradient(115deg,#f2e9df,#eeece7);border-color:var(--line)}
html[data-theme=light] .hero-description,html[data-theme=light] .hero-caption{color:var(--muted)}
html[data-theme=light] .hero-portrait .portrait-media{filter:saturate(.95)}
html[data-theme=light] .intro-bit .icon{color:var(--accent)}
html[data-theme=light] .filter-pill,html[data-theme=light] .segmented{background:var(--panel);border-color:var(--control-line)}
html[data-theme=light] .filter-pill:hover{border-color:var(--accent)}
html[data-theme=light] .segmented button.active{background:var(--raised);color:var(--text)}
html[data-theme=light] .story-card,html[data-theme=light] .session-card,html[data-theme=light] .form-card,html[data-theme=light] .modal,html[data-theme=light] .report-card,html[data-theme=light] .scene-summary,html[data-theme=light] .scene-controls{background:var(--panel);border-color:var(--line)}
html[data-theme=light] .story-card:hover{border-color:var(--accent);box-shadow:0 8px 24px #30241c14}
html[data-theme=light] .story-card-media::after{background:linear-gradient(180deg,transparent 55%,#ffffff55 76%,#ffffff 100%)}
html[data-theme=light] .card-genre{color:#452b20;background:#fffffff2;border-radius:4px;padding:2px 5px}
html[data-theme=light] .empty-state{border-color:var(--control-line)}
html[data-theme=light] .status-label,html[data-theme=light] .message-speaker span{background:var(--raised);color:var(--muted)}
html[data-theme=light] .status-published,html[data-theme=light] .status-approved{background:#e3efe6;color:#285b3b}
html[data-theme=light] .status-pending{background:#f6ead2;color:#715013}
html[data-theme=light] .status-label.status-rejected{background:#fbeae7;color:#8d302c}
html[data-theme=light] .mode-option{border-color:var(--control-line)}
html[data-theme=light] .mode-option:has(input:checked){background:#f3e7dc;border-color:var(--accent)}
html[data-theme=light] .guidance .tip,html[data-theme=light] .inline-notice,html[data-theme=light] .preview-role,html[data-theme=light] .chat-suggestions button{background:#f1ece5;border-color:var(--line);color:var(--text)}
html[data-theme=light] .form-message,html[data-theme=light] .composer-error,html[data-theme=light] .chat-blocked-note,html[data-theme=light] .scene-low-power strong{color:#923c2e}
html[data-theme=light] .modal{box-shadow:0 30px 100px #25232b33}
html[data-theme=light] .modal::backdrop{background:#25232b66;backdrop-filter:blur(5px)}
html[data-theme=light] .modal-close{background:var(--panel);border-color:var(--control-line);color:var(--text)}
html[data-theme=light] .preview-image-caption .eyebrow{color:#f4d4bf}
html[data-theme=light] .preview-greeting,html[data-theme=light] .pin-item,html[data-theme=light] .message-action-dialog .branch-excerpt{background:var(--bg);color:var(--text);border-color:var(--line)}
html[data-theme=light] .tag-list span,html[data-theme=light] .plan-badge{color:var(--accent);background:#f3e7dc;border-color:var(--line)}
html[data-theme=light] .preview-start,html[data-theme=light] .preview-role,html[data-theme=light] .chat-story-intro,html[data-theme=light] .chat-header,html[data-theme=light] .branch-origin{border-color:var(--line)}
html[data-theme=light] .plan-benefits .icon{color:var(--accent)}
html[data-theme=light] .usage-bar,html[data-theme=light] .memory-preparing progress,html[data-theme=light] .memory-preparing progress::-webkit-progress-bar{background:var(--line)}
html[data-theme=light] .usage-bar span{background:var(--accent)}
html[data-theme=light] .toast{background:var(--text);color:var(--panel);border-color:var(--text);box-shadow:0 7px 30px #25232b22}
html[data-theme=light] .chat-layout{background:var(--bg)}
html[data-theme=light] .message-text em{color:#59525f}
html[data-theme=light] .message.user .message-text{background:#eee8e0;border-color:#d8cfc4;color:var(--text)}
html[data-theme=light] .message-tools small{color:var(--muted)}
html[data-theme=light] .icon-button.is-pinned,html[data-theme=light] .icon-button.accent{color:var(--accent)}
html[data-theme=light] .typing-dots span{background:var(--accent)}
html[data-theme=light] .composer-wrap{background:var(--bg);border-color:var(--line)}
html[data-theme=light] .composer-send{color:var(--accent-ink)}
html[data-theme=light] .chat-scroll,html[data-theme=light] .sidebar{scrollbar-color:var(--control-line) transparent}
html[data-theme=light] .mobile-nav button{color:var(--muted)}
html[data-theme=light] .mobile-nav button.active{color:var(--accent)}
html[data-theme=light] .mobile-nav button[data-view=create]>.icon{color:var(--accent-ink)}
html[data-theme=light] .scene-duration button,html[data-theme=light] .scene-actions button,html[data-theme=light] .hawkins-choices .hawkins-choice{background:var(--bg);border-color:var(--control-line);color:var(--text)}
html[data-theme=light] .scene-duration button[aria-pressed=true]{background:#eee1d6;border-color:var(--accent);color:var(--accent)}
html[data-theme=light] .scene-actions button:hover:not(:disabled),html[data-theme=light] .hawkins-choices .hawkins-choice:hover:not(:disabled){background:var(--raised);border-color:var(--accent)}
html[data-theme=light] .branch-origin{background:#f1ece5}
html[data-theme=light] .branch-origin>span,html[data-theme=light] .message-action-dialog .branch-quota-note{color:var(--muted)}
html[data-theme=light] .skip-link{color:var(--accent-ink)}
@media(max-width:760px){.topbar-right{gap:10px}.account-label-full{display:none}.account-label-mobile{display:inline}}
@media(prefers-contrast:more){:root{--muted:#c9c7cf;--line:#777b85}:root[data-theme=light]{--muted:#45414c;--line:#8b8580}}
@media(forced-colors:active){.appearance-select{border:1px solid ButtonText}}
html[data-theme=light] .preview-role summary,html[data-theme=light] .preview-footnote,html[data-theme=light] .preview-report,html[data-theme=light] .preview-report button{color:var(--muted)}
