/* Semantic dark palette. Light mode retains each component's original fallback. */
:root[data-theme="dark"] {
 --theme-icon-filter:invert(1);
 --theme-canvas:#17191d;
 --theme-surface:#22252b;
 --theme-raised:#2c3038;
 --theme-control:#363c47;
 --theme-ink:#f0f2f6;
 --theme-muted:#b8c0cd;
 --theme-on-dark:#f7f9fc;
 --theme-line:#505966;
 --theme-accent:#94b8ff;
 --theme-accent-solid:#315ec0;
 --theme-accent-surface:#273c61;
 --theme-danger:#ffb0ac;
 --theme-success:#a0dbb4;
 --theme-shine:#ffffff12;
 --theme-shadow:#00000038;
}
.brand-appearance{display:flex;align-items:center;gap:18px}
:root[data-theme="dark"] img[src*="icons/"]{filter:invert(1)}
:root[data-theme="dark"] #grid-dot{fill:#a1aabb;fill-opacity:.35}
:root[data-theme="dark"] #selection-highlight{mix-blend-mode:screen!important;opacity:.3!important}
:root[data-theme="dark"] dialog{background:var(--theme-surface);color:var(--theme-ink)}
:root[data-theme="dark"] dialog::backdrop{background:#07090db3}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:var(--theme-muted);opacity:1}
:root[data-theme="dark"] .inspector-excluded{opacity:1}
/* Actual media and PDF pages keep their original colors. */
:root[data-theme="dark"] .pdf-page{background:white}
@media(max-width:600px){.brand-appearance{gap:9px}.top-meta{gap:5px}}
@media(prefers-contrast:more){:root[data-theme="dark"]{--theme-muted:#e0e5ed;--theme-line:#99a6ba}}

@media(max-width:600px){.a-workspace-identity{min-width:0;flex:1}.a-workspace-picker{flex:1}.a-workspace-trigger{max-width:100%}.a-workspace-trigger>span:nth-child(2){min-width:0}.a-workspace-header{gap:12px}}
@media(max-width:540px){.nav{gap:10px}.nav .brand{font-size:21px;gap:5px}.nav .brand img{width:23px;height:23px}.nav-actions{gap:9px;font-size:11px;white-space:nowrap}.nav-actions .button.small{padding:10px}}
