/* Shared UI tokens keep articles, forms, chat, menus and branding in one palette. */
:root,[data-theme="paper"] {
  color-scheme:light;
  --bg:#f5f1e9;--paper:#fffdf7;--ink:#293f33;--soft:#6a7063;
  --accent:#964d35;--line:#d9d6c8;--tint:#e9e8da;--danger:#a33131;
  --on-accent:#fffdf7;--on-ink:#fffdf7;--placeholder:#818475;
  --mine-bg:#eee2d4;--mine-line:#dbbdad;--hover:#e9e8da;
}
[data-theme="night"] {
  color-scheme:dark;
  --bg:#1b2923;--paper:#23342c;--ink:#f5f1e9;--soft:#b8c1b8;
  --accent:#f2bd9c;--line:#485a4d;--tint:#2d4135;--danger:#ffad9e;
  --on-accent:#30251f;--on-ink:#1b2923;--placeholder:#a6b4a9;
  --mine-bg:#3c4436;--mine-line:#68705d;--hover:#304438;
}
[data-theme="forest"] {
  color-scheme:dark;
  --bg:#203d33;--paper:#294b3f;--ink:#f5f1e9;--soft:#bed0c4;
  --accent:#b9d9bd;--line:#567666;--tint:#345a49;--danger:#ffb4a5;
  --on-accent:#203d33;--on-ink:#203d33;--placeholder:#b5c8ba;
  --mine-bg:#3b614d;--mine-line:#6e9478;--hover:#385e4d;
}
[data-theme="evening"] {
  color-scheme:dark;
  --bg:#23344b;--paper:#2c405b;--ink:#f5f1e9;--soft:#c0cbdc;
  --accent:#adc9f4;--line:#586e8b;--tint:#354d6b;--danger:#ffb2ab;
  --on-accent:#23344b;--on-ink:#23344b;--placeholder:#b1c0d5;
  --mine-bg:#3c5375;--mine-line:#728bad;--hover:#3b5371;
}
[data-theme="terminal"] {
  color-scheme:dark;
  --bg:#000080;--paper:#00006b;--ink:#fff;--soft:#d4ddff;
  --accent:#ffef8c;--line:#7586df;--tint:#142a9a;--danger:#ffb8b8;
  --on-accent:#00004c;--on-ink:#000080;--placeholder:#bccbf0;
  --mine-bg:#172b9c;--mine-line:#9caaff;--hover:#1d33a4;
  --font-body:'D2Coding','GulimChe','SFMono-Regular',Consolas,monospace;
  --font-display:var(--font-body);
  --radius:0px;--radius-lg:0px;--shadow:none;
  letter-spacing:0;
}
[data-theme="terminal"] .archive-photo {transform:none;box-shadow:3px 3px 0 var(--line)}
[data-theme="terminal"] .app-bar {border-bottom:3px double var(--line)}
[data-theme="terminal"] .theme-picker {border:3px double var(--line)}
/* Theme controls are confined to Me → Personal settings. */
.theme-picker {margin:0;padding:var(--space-4);border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--paper)}
.theme-picker-title {margin:0 0 var(--space-3);font-size:var(--text-base);font-weight:600;line-height:1.75}
.theme-options {display:grid;grid-template-columns:minmax(0,1fr);gap:var(--space-2)}
.theme-option {display:flex;align-items:center;gap:var(--space-3);min-height:64px;padding:var(--space-3);border:1px solid var(--line);border-radius:var(--radius);background:var(--paper);cursor:pointer;font-size:var(--text-sm)}
.theme-option:has(input:checked) {border-color:var(--accent);background:var(--tint);box-shadow:inset 0 0 0 1px var(--accent)}
.theme-option:has(input:focus-visible) {outline:3px solid var(--accent);outline-offset:3px}
.theme-option input[type="radio"] {display:block;flex:none;width:20px;min-width:20px;min-height:20px;height:20px;margin:0;padding:0;accent-color:var(--accent)}
.theme-swatch {display:grid;place-items:center;flex:none;width:36px;height:36px;border-radius:50%;background:var(--sample-bg);border:1px solid var(--sample-ink)}
.theme-swatch .brand-mark {width:24px;height:24px;color:var(--sample-ink)}
[data-theme-option="paper"] {--sample-bg:#fffdf7;--sample-ink:#964d35}
[data-theme-option="night"] {--sample-bg:#1b2923;--sample-ink:#f2bd9c}
[data-theme-option="forest"] {--sample-bg:#203d33;--sample-ink:#b9d9bd}
[data-theme-option="evening"] {--sample-bg:#23344b;--sample-ink:#adc9f4}
[data-theme-option="terminal"] {--sample-bg:#000080;--sample-ink:#ffef8c}
.theme-hint {margin:var(--space-3) 0 0;font-size:var(--text-xs);color:var(--soft);line-height:1.8}
@media(min-width:480px) {.theme-options {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(forced-colors:active) {.theme-option:has(input:checked) {border-color:Highlight}.theme-swatch {border-color:CanvasText}}
