.theme-switch{display:flex;align-items:center;gap:3px;padding:3px;border:1px solid var(--line);border-radius:10px;background:#0a1424;flex-shrink:0}
.theme-switch button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:7px 10px;border:1px solid transparent;border-radius:7px;background:transparent;color:#9fb3cf;font-size:13px;line-height:1.2}
.theme-switch button svg{width:16px;height:16px;flex-shrink:0}
.theme-switch button[aria-pressed=true]{background:#213b5c;border-color:#365b86;color:#e4f1ff}
.theme-switch button:hover{color:#e4f1ff;background:#172b44}
.theme-switch button[aria-pressed=true]:hover{background:#284768}
:root[data-theme=light]{color-scheme:light;--ink:#16243b;--muted:#536781;--bg:#f4f7fc;--line:#d7e2f0;--accent:#245bb8;--mint:#167b69}
html[data-theme=light] body{background-image:radial-gradient(ellipse at 80% 0%,#e5efff,transparent 55%)}
html[data-theme=light] .portal-header{background:#ffffffed;border-color:var(--line)}
html[data-theme=light] .portal-header .spark{background:linear-gradient(135deg,#e2f0ff,#edf3ff);border-color:#b9cee9;color:#245bb8}
html[data-theme=light] .portal-header .nav button{color:var(--muted)}
html[data-theme=light] .portal-header .nav button.active{color:var(--accent);border-color:var(--accent)}
html[data-theme=light] .portal-header .nav button:hover{color:#174789}
html[data-theme=light] .header-actions>.badge::before{background:#167b69;box-shadow:none}
html[data-theme=light] .theme-switch{background:#eef3fa}
html[data-theme=light] .theme-switch button{color:var(--muted)}
html[data-theme=light] .theme-switch button[aria-pressed=true]{background:white;border-color:#b8cbe5;color:var(--accent);box-shadow:0 1px 4px #16243b0a}
html[data-theme=light] .theme-switch button:hover{background:#e0eafa;color:#174789}
html[data-theme=light] .theme-switch button[aria-pressed=true]:hover{background:white}
html[data-theme=light] .topline,html[data-theme=light] .dash-label,html[data-theme=light] .dash-source,html[data-theme=light] .dashboard-footer{color:var(--muted)}
html[data-theme=light] .dashboard-card,html[data-theme=light] .card,html[data-theme=light] .metric,html[data-theme=light] .world-summary{background:linear-gradient(145deg,#fff,#fbfdff);border-color:var(--line);box-shadow:0 5px 18px #16243b06}
html[data-theme=light] .dashboard-card:hover{border-color:#9bb8e2;box-shadow:0 7px 24px #16243b0c}
html[data-theme=light] .dashboard-card.people-summary{background:linear-gradient(145deg,#f0faf7,#f8fdfc);border-color:#c8e5dc}
html[data-theme=light] .dashboard-card.people-summary:hover{border-color:#7fbaaa}
html[data-theme=light] .dash-card-top h2,html[data-theme=light] .dash-focus{color:var(--ink)}
html[data-theme=light] .dash-icon{color:var(--accent);background:#eaf2ff;border-color:#c5d9f4}
html[data-theme=light] .people-summary .dash-icon{color:#167b69;background:#e4f4ee;border-color:#c4e3d7}
html[data-theme=light] .dash-detail{color:var(--muted)}
html[data-theme=light] .dash-foot{color:var(--accent)}
html[data-theme=light] .dash-progress{background:#e6edf7}
html[data-theme=light] .dash-progress span{background:linear-gradient(90deg,#3579e7,#22a0c9)}
html[data-theme=light] .dash-pills span{background:#edf2f9;color:var(--muted)}
html[data-theme=light] .badge{background:#eef3fb;border-color:#d4e1f3;color:#405b80}
html[data-theme=light] .sample{background:#fff5dc;border-color:#ead8aa;color:#795718}
html[data-theme=light] .secondary{background:#eaf2ff;color:#245bb8;border-color:#c5d8f1}
html[data-theme=light] .secondary:hover{background:#dfeaff}
html[data-theme=light] .textbtn{color:var(--accent)}
html[data-theme=light] input[type=text],html[data-theme=light] input[type=date],html[data-theme=light] input[type=url],html[data-theme=light] textarea,html[data-theme=light] select,html[data-theme=light] .life-form input:not([type=checkbox]){background:white;border-color:#bdcde2;color:var(--ink)}
html[data-theme=light] input::placeholder,html[data-theme=light] textarea::placeholder{color:#657993}
html[data-theme=light] input[type=checkbox]{accent-color:var(--accent)}
html[data-theme=light] .life-form label,html[data-theme=light] .nutrition-note label,html[data-theme=light] .rhythm-row select,html[data-theme=light] .rhythm-group legend{color:var(--muted)}
html[data-theme=light] .life-intro{background:#edf4ff;border-color:#cdddf3;color:#3f5c80}
html[data-theme=light] .memory-year{color:#3f68a0}
html[data-theme=light] .empty-life,html[data-theme=light] .remove-local,html[data-theme=light] .life-list .done strong,html[data-theme=light] .preference small{color:var(--muted)}
html[data-theme=light] .remove-local:hover{color:#a32b43}
html[data-theme=light] .preference{background:#f9fbfe;border-color:var(--line)}
html[data-theme=light] .morning-brief{background:linear-gradient(110deg,#fff,#f0f6ff)}
html[data-theme=light] .ringnote{background:#edf3fc;color:#405b80}
html[data-theme=light] .cardfooter,html[data-theme=light] .day small,html[data-theme=light] .taskcopy small,html[data-theme=light] .journalentries small,html[data-theme=light] .entry small,html[data-theme=light] .event small,html[data-theme=light] .event .time{color:var(--muted)}
html[data-theme=light] .day{background:#eef3fb}
html[data-theme=light] .day.today{background:#e7f0ff;outline-color:#9db9e5}
html[data-theme=light] .day strong{color:#167b69}
html[data-theme=light] .day.untracked strong,html[data-theme=light] .day.upcoming strong{color:#687b95}
html[data-theme=light] .chart polyline{stroke:var(--accent)}
html[data-theme=light] .tag{background:#eaf2ff;color:#245bb8}
html[data-theme=light] .tag.life{background:#e4f4ee;color:#167b69}
html[data-theme=light] dialog{background:#fff;color:var(--ink);border-color:#c5d5e9}
html[data-theme=light] dialog p{color:var(--muted)}
html[data-theme=light] dialog::backdrop{background:#16243b66}
html[data-theme=light] .toast{background:#163b61;border-color:#24527d;color:#fff}
html[data-theme=light] button:focus-visible,html[data-theme=light] select:focus-visible,html[data-theme=light] input:focus-visible,html[data-theme=light] textarea:focus-visible,html[data-theme=light] .dashboard-card:focus-visible{outline-color:#245bb8}
html[data-theme=light] .feed-status,html[data-theme=light] .team-card small,html[data-theme=light] .team-card p,html[data-theme=light] .game-row p,html[data-theme=light] .game-meta small,html[data-theme=light] .empty-world,html[data-theme=light] .sports-primer p,html[data-theme=light] .league-details>summary span,html[data-theme=light] .division li,html[data-theme=light] .school-grid span,html[data-theme=light] .metric-period,html[data-theme=light] .economy-metric details,html[data-theme=light] .rate-flow p,html[data-theme=light] .release-row p,html[data-theme=light] .news-search,html[data-theme=light] .story-meta time,html[data-theme=light] .story p,html[data-theme=light] .newsletter-edition small,html[data-theme=light] .newsletter-edition ul,html[data-theme=light] .trivia-feedback{color:var(--muted)}
html[data-theme=light] .world-tab{background:#f4f7fc;border-color:#c8d7eb;color:var(--muted)}
html[data-theme=light] .world-tab[aria-pressed=true]{background:#e6f0ff;border-color:#8badde;color:#174789}
html[data-theme=light] .world-tab:hover{border-color:#7199d2}
html[data-theme=light] .team-monogram{background:#e6f4fc;border-color:#b8d7e9;color:#246582}
html[data-theme=light] .team-monogram.huskies{background:#f1edfb;border-color:#d3c8ec;color:#63439a}
html[data-theme=light] .team-monogram.mariners{background:#e5f4ee;border-color:#badfd1;color:#176f59}
html[data-theme=light] .source-link,html[data-theme=light] .edition-entry>summary,html[data-theme=light] .economy-metric summary{color:var(--accent)}
html[data-theme=light] .source-link:hover{color:#174789}
html[data-theme=light] .game-meta strong,html[data-theme=light] .economy-value,html[data-theme=light] .division h3{color:#245b92}
html[data-theme=light] .snapshot-game{background:#eaf2ff;color:#3d5e85}
html[data-theme=light] .division,html[data-theme=light] .school-grid span{background:#f5f8fd;border-color:var(--line)}
html[data-theme=light] .home-division{background:#eef9f5;border-color:#a7d5c6}
html[data-theme=light] .our-team{color:#167b69!important}
html[data-theme=light] .rate-flow>div{background:#eff5ff;border-color:#c5d8f1}
html[data-theme=light] .rate-flow span,html[data-theme=light] .release-row time{color:#167b69}
html[data-theme=light] .story{background:#f9fbff;border-color:var(--line)}
html[data-theme=light] .story h3{color:var(--ink)}
html[data-theme=light] .save-story{background:#eaf2ff;border-color:#b8cdeb;color:var(--accent)}
html[data-theme=light] .save-story[aria-pressed=true]{background:#e4f4ee;border-color:#a8d2c3;color:#167b69}
html[data-theme=light] .event-past{color:#795718}
html[data-theme=light] .newsletter-edition{border-color:var(--line)}
html[data-theme=light] .trivia-choice{background:#eff5ff;border-color:#bfd2eb;color:#315680}
html[data-theme=light] .trivia-choice.correct{background:#e1f4e9;border-color:#78b69d;color:#17664b}
html[data-theme=light] .trivia-choice.incorrect{background:#fceaf0;border-color:#d19aa9;color:#97364f}
@media(max-width:1000px){.header-actions>.badge{display:none}}
@media(max-width:720px){.theme-switch button{width:40px;padding:7px}.theme-switch button span{display:none}}
@media(max-width:540px){.brand-row{flex-wrap:wrap;gap:12px}.header-actions{width:100%;justify-content:flex-end}.theme-switch{margin-right:auto}}
