/* Shared appearance tokens. UI only: artwork, photographs and exports retain their colors. */
:root{--ui-page:light-dark(#fafafa,#171b1e);--ui-surface:light-dark(#ffffff,#22282c);--ui-surface-raised:light-dark(#f1f4f2,#2b3337);--ui-text:light-dark(#24303d,#edf0f2);--ui-muted:light-dark(#5d6b73,#b5c0c6);--ui-border:light-dark(#d3dce1,#566168);--ui-link:light-dark(#24634f,#9cd8c3);--ui-focus:light-dark(#357965,#a7e3cc);--ui-action:#20251f;--ui-action-text:#fff;--ui-accent:#f2ab19;--ui-danger:light-dark(#a52a2a,#ffb1ab);--ui-success:light-dark(#216b48,#99dbb6);--ui-warning:light-dark(#805000,#f4d18b);--ui-selected:light-dark(#edf3ef,#293e36)}
html[data-theme=dark]{color-scheme:dark;--paper:var(--ui-page);--ink:var(--ui-text);--muted:var(--ui-muted);--line:var(--ui-border)}
html[data-theme=light]{color-scheme:light}
.appearance-choices{display:flex;gap:12px 24px;flex-wrap:wrap;border:0;padding:0;margin:0}.appearance-choices label{display:flex;gap:8px;align-items:center;cursor:pointer}.appearance-choices input{margin:0}
html[data-theme=dark] body,html[data-theme=dark] body:has(.station-sidebar){background:var(--ui-page);color:var(--ui-text);--paper:var(--ui-page);--ink:var(--ui-text);--muted:var(--ui-muted);--line:var(--ui-border)}
html[data-theme=dark] :is(.ui-panel,.panel,.ui-disclosure,.table-wrap,.station-select-options,dialog,.modal-content){background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}
html[data-theme=dark] :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]){background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}
html[data-theme=dark] :is(input,textarea)::placeholder{color:var(--ui-muted);opacity:1}
html[data-theme=dark] :is(.muted,.hint){color:var(--ui-muted)}
html[data-theme=dark] :is(button,.button,.btn).secondary{background:var(--ui-surface);color:var(--ui-text);border-color:var(--ui-border)}
html[data-theme=dark] .station-select-options :is(.is-highlighted,[role=option]:hover){background:var(--ui-selected)}
html[data-theme=dark] :is(.ui-surface,.main) :is(a:not(.button):not(.btn)){color:var(--ui-link)}
html[data-theme=dark] :is(th,td){border-color:var(--ui-border)}
html[data-theme=dark] th{background:var(--ui-surface-raised);color:var(--ui-muted)}
html[data-theme=dark] :focus-visible{outline-color:var(--ui-focus)}
/* Brand chrome deliberately keeps its established yellow and dark navigation. */
html[data-theme=dark] .station-app-header{color:#100f0d}
@media print{html[data-theme]{color-scheme:light}}
:root{--theme-page:#171b1e;--theme-surface:#22282c;--theme-surface-raised:#2b3337;--theme-text:#edf0f2;--theme-muted:#b5c0c6;--theme-border:#566168;--theme-success:#99dbb6;--theme-danger:#ffb1ab;--theme-warning:#f4d18b}
/* Dark primary actions stay distinct from their surrounding panel. */
html[data-theme=dark] :is(.button,button,.btn):not(.secondary):not(.text-button):focus-visible{outline:2px solid var(--ui-focus);outline-offset:3px}

/* Station chrome uses the same neutral surfaces as plugin UI in dark mode. */
html[data-theme=dark]{--ui-action:#38444b}
html[data-theme=dark] body.station-admin{--station-app-header-bg:#1c2226;--station-app-header-ink:#edf0f2}
html[data-theme=dark] .station-app-header{background:var(--station-app-header-bg);color:var(--station-app-header-ink)}

html[data-theme=dark] body:has(.station-sidebar) .station-sidebar{background:#1c2226;color:var(--ui-text);border-right-color:#39434a}
html[data-theme=dark] body.station-admin .station-sidebar .station-brand{background:#1c2226;color:var(--ui-text);border-bottom-color:#39434a}


html[data-theme=dark] body .station-page-chrome .station-app-nav{background:#1c2226;color:var(--ui-text)}
html[data-theme=dark] body .station-page-chrome .station-app-nav :is(a,button){color:var(--ui-muted)}
html[data-theme=dark] body .station-page-chrome .station-app-nav :is(a,button):hover,
html[data-theme=dark] body .station-page-chrome .station-app-nav :is(a,button)[aria-current]{background:#2b3337;color:var(--ui-text)}
html[data-theme=dark] body .station-page-chrome .station-app-nav :is(a,button)[aria-current]{box-shadow:inset 0 -2px var(--ui-accent)}
html[data-theme=dark] body:has(.station-sidebar) .station-sidebar a:not(.station-brand),
html[data-theme=dark] .station-sidebar :is(.station-admin-menu>summary,.all-features>summary){color:var(--ui-text)}
html[data-theme=dark] .station-sidebar :is(.station-sidebar-group-label,.station-sidebar-heading){color:var(--ui-muted)!important}
html[data-theme=dark] .station-sidebar .station-admin-menu[open]>nav{background:var(--ui-surface);border-color:#39434a}
html[data-theme=dark] .station-sidebar .account-actions .text-button{color:var(--ui-muted)}
@media(max-width:580px){html[data-theme=dark] body:has(.station-sidebar)::before,html[data-theme=dark] body:has(.station-sidebar)>.station-menu-toggle{background:#1c2226}}

/* Optional component appearance scope; inherits the same Station palette. */
[data-appearance-scope]{--ui-page:light-dark(#fafafa,#171b1e);--ui-surface:light-dark(#ffffff,#22282c);--ui-surface-raised:light-dark(#f1f4f2,#2b3337);--ui-text:light-dark(#24303d,#edf0f2);--ui-muted:light-dark(#5d6b73,#b5c0c6);--ui-border:light-dark(#d3dce1,#566168);--ui-link:light-dark(#24634f,#9cd8c3);--ui-focus:light-dark(#357965,#a7e3cc);--ui-action:#20251f;--ui-action-text:#fff;--ui-accent:#f2ab19;--ui-danger:light-dark(#a52a2a,#ffb1ab);--ui-success:light-dark(#216b48,#99dbb6);--ui-warning:light-dark(#805000,#f4d18b);--ui-selected:light-dark(#edf3ef,#293e36)}
[data-appearance-scope=light]{color-scheme:light}
[data-appearance-scope=dark]{color-scheme:dark}
