:root{
  color-scheme:light;
  --surface:#ffffff;--surface-soft:#f0f5fa;--surface-active:#f1eadc;
  --ink-secondary:#5c7287;--ink-soft:#63798a;--ink-active:#735a2c;
  --button-bg:#22374d;--button-ink:#ffffff;--button-hover:#314e6b;
  --error-bg:#f8eae8;--error-ink:#a33c36;
  --chart-bg:#ffffff;--chart-text:#677b8b;--chart-grid:#d9e2ea;--chart-grid-faint:#e5ebf0;
  --chart-cursor:#536b82;--chart-label:#30475d;--chart-accent:#a58448;--chart-selected:#22374d;
  --orbit:#a5844840;--orbit-strong:#a5844880;
}
:root[data-theme=dark]{
  color-scheme:dark;
  --bg:#0d1728;--paper:#142239;--navy:#e3ebf5;--muted:#a3b2c3;--gold:#d0b47b;--border:#2c405a;--soft:#1b2d46;
  --surface:#102039;--surface-soft:#1b2d46;--surface-active:#302c28;
  --ink-secondary:#b6c6d7;--ink-soft:#a3b2c3;--ink-active:#dfc78f;
  --button-bg:#c3a46c;--button-ink:#102039;--button-hover:#d4b981;
  --error-bg:#3b232d;--error-ink:#ffb4af;
  --chart-bg:#102039;--chart-text:#a8bbcf;--chart-grid:#344861;--chart-grid-faint:#223951;
  --chart-cursor:#d1b77e;--chart-label:#dce7f2;--chart-accent:#d0b47b;--chart-selected:#e3ebf5;
  --orbit:#d0b47b40;--orbit-strong:#d0b47b80;
}
body{transition:background-color .18s,color .18s}.topbar{gap:20px}.theme-switch{display:flex;gap:3px;padding:3px;border:1px solid var(--border);border-radius:24px;background:var(--paper);flex-shrink:0}.theme-switch button{font-size:11px;border:0;border-radius:18px;padding:7px 11px;line-height:1.4;color:var(--ink-secondary);background:transparent;white-space:nowrap}.theme-switch button[aria-pressed=true]{background:var(--surface-active);color:var(--ink-active)}.theme-switch button:hover{color:var(--gold)}
h1 span,.hero-copy,.chips span,.input-panel summary,.verification summary{color:var(--ink-secondary)}.chips span,.step,.outline,.tag{border-color:var(--border)}
.orbit{border-color:var(--orbit)}.o3,.orb{border-color:var(--orbit-strong)}.celestial:before,.celestial:after{background:var(--orbit)}.celestial-star{color:var(--gold)}
input,select{background:var(--surface);color:var(--navy)}input::placeholder{color:var(--ink-soft)}.primary{background:var(--button-bg);color:var(--button-ink)}.calculate:hover{background:var(--button-hover)}.error{background:var(--error-bg);color:var(--error-ink)}
.outline{color:var(--ink-secondary)}.outline:hover,.stat{background:var(--surface-soft)}.reading-symbol{background:var(--surface-active)}.planet-buttons button.selected{background:var(--surface-active);color:var(--ink-active);border-color:var(--gold)}
.reading p,.period-box p,.method p{color:var(--ink-secondary)}.reading .practice,.period-box .action{background:var(--surface-soft);color:var(--ink-secondary)}.reading .role-title,.tag,.method .method-note,#life-dense-note{color:var(--gold)}.reading .watch{border-color:var(--gold)}
th,td{border-color:var(--border)}.timeline button.active{box-shadow:inset 0 -4px 0 var(--chart-label)}
.life-legend-button,.life-value{background:var(--surface);border-color:var(--border);color:var(--ink-secondary)}.life-value{border-left-color:var(--line-color)}.life-legend-button[aria-pressed=false]{background:var(--surface-soft)}.life-value>span,.life-value small{color:var(--ink-secondary)}.life-value strong{color:var(--navy)}.mountain-chart-scroll{background:var(--paper);border-color:var(--border)}
.card{box-shadow:0 6px 30px #00000006}.life-value.muted-line{opacity:.7}
@media(max-width:780px){.topbar{flex-wrap:wrap;gap:12px}.topbar .brand{order:1}.theme-switch{order:2;margin-left:auto}.topbar nav{order:3;flex-basis:100%;justify-content:flex-start;gap:22px}.theme-switch button{padding:7px 10px;font-size:10px}}
@media(prefers-reduced-motion:reduce){body{transition:none}}
@media print{
  :root,:root[data-theme=dark]{color-scheme:light;--bg:#ffffff;--paper:#ffffff;--navy:#22374d;--muted:#63798a;--gold:#8b6c37;--border:#d6e0e8;--soft:#e1e9f1;--surface:#ffffff;--surface-soft:#f0f5fa;--surface-active:#f1eadc;--ink-secondary:#5c7287;--ink-soft:#63798a;--ink-active:#735a2c;--chart-bg:#ffffff;--chart-text:#677b8b;--chart-grid:#d9e2ea;--chart-grid-faint:#e5ebf0;--chart-cursor:#536b82;--chart-label:#30475d;--chart-accent:#a58448;--chart-selected:#22374d}
  body{background:white;color:#22374d}.theme-switch{display:none!important}
}
