/* Themes affect UI surfaces only. Painting colors, references and export styles are independent. */
:root{
 --accent-rgb:191 213 162;--gold-rgb:213 184 135;
 --primary-ink:#18231a;--sidebar-surface:#141d19;--field-surface:#1e2a24;--field-deep:#1c2620;
 --upload-surface:#1a281e;--active-surface:#2a382e;--board-surface:#202622;--board-grid:#374038;
 --canvas-surface:#131615;--selected-row:#2b392e;--stats-surface:#283329;--catalog-surface:#1e2923;
 --edit-surface:#1b2820;--settings-surface:#18221b;--settings-hover:#26352b;--live-surface:#17251b;
 --live-mat:#17231e;--help-surface:#142019;--help-mat:#0f1813;--terrain-surface:#131e18;
 --terrain-mat:#101b15;--queue-surface:#142119;--table-head:#1b2920;--inventory-metric:#1e2c23;
 --caption-ink:#bbc5b9;--dim-ink:#bec8b5;--terrain-caption:#cad7bf;--terrain-weight:#c4d9a8;
 --terrain-label:#c7d6bc;--terrain-note:#afc1ac;--selection-ink:#e1cd9e;--hero-ink:#edca88;
 --active-edit:#30513a;--active-edit-ink:#e4f0dc;--active-edit-border:#bdd5a4;--primary-hover:#cee2b6;
 --toast-surface:#f1e6d2;--toast-ink:#201e17;--warning-ink:#f2b196;--shortage-ink:#f1b89b;--warning-line:#eab089;
 --border-strong:#5a6e5b;--border-print:#536150;--border-advice:#536448;--border-guide:#40523f;--border-copy:#647454;--border-terrain:#34493b;
 --scroll-thumb:#687d61;--scroll-track:#17201b;--topography-canvas:#101b15;
}
html[data-theme="day"]{
 color-scheme:light;--bg:#d9d9cb;--panel:#e1e3d6;--line:#8e9b88;--ink:#26372d;--muted:#415744;--accent:#315c3f;--gold:#6f5128;
 --accent-rgb:49 92 63;--gold-rgb:111 81 40;
 --primary-ink:#eff0df;--sidebar-surface:#d0d3c6;--field-surface:#cbd3c3;--field-deep:#c6cebf;
 --upload-surface:#c8d2c0;--active-surface:#b8c6ae;--board-surface:#c5ccbf;--board-grid:#a2ae9e;
 --canvas-surface:#c2c8bc;--selected-row:#bccbb2;--stats-surface:#d1d8c6;--catalog-surface:#cbd3c5;
 --edit-surface:#d4dccb;--settings-surface:#d9dfd0;--settings-hover:#c2ceba;--live-surface:#cbd5c3;
 --live-mat:#bbc6b5;--help-surface:#dce0d1;--help-mat:#bcc5b5;--terrain-surface:#dce0d1;
 --terrain-mat:#bac5b5;--queue-surface:#d2dac8;--table-head:#c3ceba;--inventory-metric:#ced8c6;
 --caption-ink:#4c5f4c;--dim-ink:#50634c;--terrain-caption:#3f5543;--terrain-weight:#355840;
 --terrain-label:#485d46;--terrain-note:#4d604f;--selection-ink:#705123;--hero-ink:#77521e;
 --active-edit:#345b3e;--active-edit-ink:#eff0df;--active-edit-border:#315c3f;--primary-hover:#416d4b;
 --toast-surface:#c9d1bc;--toast-ink:#26372d;--warning-ink:#883d25;--shortage-ink:#883d2a;--warning-line:#8e522c;
 --border-strong:#6d8165;--border-print:#6d8165;--border-advice:#6d8165;--border-guide:#6d8165;--border-copy:#6d8165;--border-terrain:#6d8165;
 --scroll-thumb:#7f9176;--scroll-track:#c7cfbe;--topography-canvas:#c5ccbf;
}
.sidebar>header{gap:10px}
.sidebar>header .brand{min-width:0;flex:1;gap:8px}
.sidebar>header .brand-logo{width:70px;height:70px;flex:none}
.sidebar>header .brand-subtitle{font-size:8px;letter-spacing:.15em}
.theme-toggle{width:72px;min-height:50px;flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:0;border:0;background:transparent;color:var(--muted)}
.theme-track{position:relative;display:flex;align-items:center;justify-content:space-around;width:72px;height:36px;background:var(--field-surface);border:1px solid var(--border-strong);border-radius:20px}
.theme-thumb{position:absolute;left:3px;top:3px;width:28px;height:28px;border-radius:50%;background:var(--accent);box-shadow:0 1px 4px #0003;transition:transform .2s cubic-bezier(.2,.8,.2,1),background-color .2s}
.theme-icon{position:relative;z-index:1;display:flex;align-items:center;justify-content:center;width:28px;height:28px;color:var(--muted);transition:color .2s}
.theme-icon svg{width:18px;height:18px}
html[data-theme="day"] .theme-sun,html[data-theme="night"] .theme-moon{color:var(--primary-ink)}
html[data-theme="night"] .theme-thumb{transform:translateX(36px)}
.theme-label{font-size:9px;line-height:11px;letter-spacing:.08em}
.theme-toggle:hover .theme-track{border-color:var(--accent)}
.theme-toggle:focus-visible{outline:2px solid var(--gold);outline-offset:4px;border-radius:7px}
html[data-theme="day"] .brand-logo{filter:drop-shadow(0 1px 1px #2f3e2cc9)}
html[data-theme="day"] .brand-intro-art{background:#101715;border-radius:8px}
html[data-theme="day"] .compare-label,html[data-theme="day"] .guide-image-tag{background:#d1d9cbea;color:var(--ink)}
html[data-theme="day"] .compare-handle{background:#cbd4c5;border-color:#72866b}
html[data-theme="day"] .visual-help,html[data-theme="day"] .brand-intro{border-color:var(--border-strong)}
html[data-theme="day"] .visual-help::backdrop,html[data-theme="day"] .brand-intro::backdrop,html[data-theme="day"] .topography-dialog::backdrop{background:#26352b88}
html[data-theme="day"] dialog::backdrop{background:#26352b77}
html[data-theme="day"] .brand-intro{background:radial-gradient(ellipse at 50% 32%,#dbe1cf,#cbd2c2 70%)}
html[data-theme="day"] .brand-intro-loading,html[data-theme="day"] .topography-message,html[data-theme="day"] .busy{background:#d3dccbf2;color:var(--ink)}
html[data-theme="day"] .swatch{border-color:#64745466}
html[data-theme="day"] .blueprint-board{color:var(--ink)}
html[data-theme="day"] .blueprint-message h3{color:var(--ink)}
html[data-theme="day"] .guide-frame,html[data-theme="day"] .guide-frame .guide-after{background:var(--help-mat)}
html[data-theme="day"] .topography-pdf-card>img{background:#ececdf}
@media(min-width:781px) and (max-width:1150px){.sidebar>header .brand-logo{width:64px;height:64px}.sidebar>header .brand-subtitle{font-size:7.5px;letter-spacing:.1em}}
@media(max-width:780px){.sidebar>header .brand-logo{width:64px;height:64px}.theme-toggle{margin-left:auto}.sidebar>header .brand-subtitle{display:block;font-size:8px}.sidebar>header{flex-wrap:nowrap}}
@media(prefers-reduced-motion:reduce){.theme-thumb,.theme-icon{transition:none}}


html[data-theme="day"] .blueprint-frame{background:radial-gradient(ellipse at center,#c7d1c0f0 0%,#c7d1c066 64%,transparent 100%)}
html[data-theme="day"] .blueprint-caption{color:var(--muted)}
html[data-theme="day"] .color-advice{background:#ccd6bf}
html[data-theme="day"] .shadow-region-overlay::after{background:#d0dacaed}


.toolbar-right .theme-toggle{padding:0;min-height:36px}
.theme-compact .theme-label{display:none}

/* Keep the intrinsic preview backing neutral and identical for translucent photos. */
html[data-theme="day"]{--canvas-surface:#131615}
html[data-theme="day"] .live-preview-label{background:#d0dacaed;color:var(--accent)}

html[data-theme="day"] .settings-rack>.control-group[open]{background:var(--settings-surface);border-color:var(--border-strong)}
html[data-theme="day"] .topography-scale>div>i{background:var(--accent)}
html[data-theme="day"] .inventory-swatch,html[data-theme="day"] .catalog-color>button{border-color:var(--border-strong)}
html[data-theme="day"] .brand-button:hover .brand-logo{filter:drop-shadow(0 1px 1px #2f3e2cc9) drop-shadow(0 0 6px #315c3f40)}

