/* Explicit theme selection applies to both the main page and dynamic dashboard. */
.theme-toggle{width:38px;height:38px;display:inline-grid;place-items:center;flex:none;border:1px solid #d9dbe7;border-radius:10px;background:#fff;color:#302a55;font:600 21px/1 sans-serif;cursor:pointer}
.theme-toggle:hover{background:#f2f0fa}.theme-toggle:focus-visible{outline:3px solid #8675ed;outline-offset:3px}
html[data-theme="dark"]{color-scheme:dark;--bg:#10111a;--ink:#f0eff7;--sub:#b8bbca;--line:#393b4d;--forest:#ddd8f3;--gold:#e4d5ff}
html[data-theme="dark"] body{background:#10111a;color:#f0eff7}
html[data-theme="dark"] .topbar,html[data-theme="dark"] .community-stats{background:#181925;color:#f1eff9;border-color:#38394a}
html[data-theme="dark"] .countdown-bar{background:#29233c;color:#ece8f7}
html[data-theme="dark"] .brand-name{color:#f2f0fb}
html[data-theme="dark"] .header-social-link:hover{background:#343149}
html[data-theme="dark"] .header-social-link img{filter:invert(1)}
html[data-theme="dark"] .theme-toggle{background:#252536;border-color:#4e4a62;color:#ffe6a2}
html[data-theme="dark"] .theme-toggle:hover{background:#343149}
html[data-theme="dark"] :is(.stream-section,.about-section,.daily-quote,.card,.social-panel,.dashboard-card,.dashboard-login,.sub-goals,.poll-panel,.clips-panel,.games-panel,.modal){background:#20212e;color:#f0eff7;border-color:#3b3c50;box-shadow:none}
html[data-theme="dark"] .stream-section{background:#252239;border-color:#48405d}
html[data-theme="dark"] .daily-quote{background:#28243a;border-color:#49405f}
html[data-theme="dark"] .tiktok-panel{background:#1b1c28;border-color:#3b3c50;color:#f0eff7}
html[data-theme="dark"] :is(.intro p,.section-title p,.stream-disclaimer,.about-section p,.daily-quote small,.dashboard-card p,.modal p,.staff-note,.staff-head p,.calendar-entry p,.calendar-entry small,.poll-panel p,.poll-admin p,.clips-panel p,.clips-review p,.games-panel p,.games-review p,.sub-goals p,.sub-goals-edit p,.sub-goal small,.timeline-caption,.timeline-reward,.timeline-progress-text,.poll-meta,.poll-msg,.staff-status){color:#c4c5d4}
html[data-theme="dark"] :is(.clips-result,.games-message){color:#c4c5d4!important}
html[data-theme="dark"] :is(.eyebrow,.calendar-back,.dashboard-back,.dashboard-calendar,.stream-heading-link,.stream-external,.poll-signin,.clips-signin,.games-signin,.clips-list a){color:#c6b6ff}
html[data-theme="dark"] :is(.community-stat-value,.community-stats-head h2){color:#fff}
html[data-theme="dark"] .community-stat-label{color:#d4d3dd}
html[data-theme="dark"] .section-rail{background:#252536;border-color:#4c495b}
html[data-theme="dark"] .rail-label{color:#fff}
html[data-theme="dark"] :is(.dashboard-nav a,.staff-stat,.sub-goal,.timeline-card,.poll-card,.games-list li,.clips-list li,.poll-admin-list li){background:#292a39;color:#f2f0f8;border-color:#4a4a5d}
html[data-theme="dark"] :is(.dashboard-nav a:hover,.staff-open){border-color:#a28bed;color:#eee8ff}
html[data-theme="dark"] :is(input:not([type="radio"]):not([type="checkbox"]),textarea,select){background:#171824;color:#f5f3fa;border-color:#57586c}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#a7a8ba}
html[data-theme="dark"] :is(.games-review-actions button,.clips-review-buttons button,.modal .close){background:#333344;color:#f4f0ff;border-color:#59596c}
html[data-theme="dark"] :is(.staff-table td,.staff-table th,.poll-admin,.clips-review,.games-review,.sub-goals-edit,.profile-form,.staff-entry-review){border-color:#484859}
html[data-theme="dark"] :is(.staff-table th,.timeline-count-label){color:#c5c4d1}
html[data-theme="dark"] :is(.timeline-total,.timeline-target){color:#f4f1fa}
html[data-theme="dark"] :is(.timeline-guide,.timeline-badge,.sub-goal .timeline-caption,.sub-goal p.timeline-progress-text){color:#c2becf}
html[data-theme="dark"] :is(.is-achieved .timeline-badge,.is-next .timeline-badge){color:#d1bfff}
html[data-theme="dark"] .timeline-marker,html[data-theme="dark"] .timeline-step.is-next .timeline-marker{background:#292a39;border-color:#ab9ad6;box-shadow:0 0 0 6px #39334d}
html[data-theme="dark"] .timeline-step.is-achieved .timeline-marker{background:#8065d0;border-color:#8065d0;box-shadow:0 0 0 6px #39334d}
html[data-theme="dark"] .timeline-nav button{background:#333344;border-color:#5b5870;color:#f1edff}
html[data-theme="dark"] .quote-spoiler summary{background:#6956c4;color:#fff}
html[data-theme="dark"] .profile-delete{color:#ffadac}
html[data-theme="dark"] .footer{color:#b9b9c9;border-color:#454353}
@media(max-width:600px){html[data-theme="dark"] .rail-label{color:#f0ebff}html[data-theme="dark"] .section-rail a[aria-current]{background:#514679}.theme-toggle{width:32px;height:34px;font-size:18px}}

.theme-toggle svg{display:block;width:19px;height:19px;transition:transform .2s ease}.theme-toggle:hover svg{transform:rotate(-12deg)}@media(prefers-reduced-motion:reduce){.theme-toggle svg{transition:none}.theme-toggle:hover svg{transform:none}}
