:root {
    color-scheme: dark;
    --bg: #0e1522;
    --bg-panel: #192435;
    --bg-raise: #213047;
    --bg-input: #111c2c;
    --ink: #101b30;
    --line: #344459;
    --line-bright: #7588a2;
    --text: #edf3fc;
    --text-dim: #c5d2e4;
    --text-faint: #aabbd1;
    --accent: #9abbff;
    --accent-hover: #c2d6ff;
    --accent-soft: #263d60;
    --on-accent: #10203a;
    --focus: #b1c9ff;
    --amber: #ffd18a;
    --red: #ffabb0;
    --success: #94dfc9;
    --shadow-panel: 0 2px 5px rgb(3 9 18 / 17%);
    --shadow-pop: 0 18px 50px rgb(2 6 12 / 48%);
    background: var(--bg);
    color: var(--text);
}

:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f4f6f9;
    --bg-panel: #fff;
    --bg-raise: #f3f5f9;
    --bg-input: #fff;
    --ink: #13213a;
    --line: #d9dfe8;
    --line-bright: #8190a3;
    --text: #18263c;
    --text-dim: #43546b;
    --text-faint: #53647b;
    --accent: #204fc5;
    --accent-hover: #173da0;
    --accent-soft: #eaf0ff;
    --on-accent: #fff;
    --focus: #3866de;
    --amber: #805000;
    --red: #ad3036;
    --success: #185c50;
    --shadow-panel: 0 2px 4px rgb(21 37 63 / 4%);
    --shadow-pop: 0 18px 50px rgb(21 37 63 / 18%);
}

dw-theme-toggle { display: inline-flex; flex: none; vertical-align: middle; }
button.theme-toggle {
    padding: 6px 10px; min-height: 36px; border: 1px solid var(--line-bright);
    border-radius: 7px; background: var(--bg-panel); color: var(--text);
    font: 600 .82rem/1.4 var(--font-ui, "Segoe UI", sans-serif); white-space: nowrap; cursor: pointer;
}
button.theme-toggle:hover { background: var(--bg-raise); }
button.theme-toggle:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.theme-toggle [aria-hidden] { font-size: 1.05rem; vertical-align: -.04em; }
.theme-to-dark, :root[data-theme="light"] .theme-to-light { display: none; }
:root[data-theme="light"] .theme-to-dark { display: inline; }
