/* Shared appearance controls. Day mode keeps the existing white and green design. */
.appearance-toggle{display:grid;place-items:center;flex-shrink:0;width:36px;min-width:36px;height:40px;padding:7px;background:#f0f5e9;border:1px solid #dce6d4;border-radius:10px;color:#315437;cursor:pointer}
.appearance-toggle svg{width:20px;height:20px}
.appearance-settings{padding:15px 0 19px;border-bottom:1px solid #e1e9d8}
.appearance-settings h2{font-size:13px;font-weight:700;color:#315437;text-align:left;margin:0 0 11px}
.appearance-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.appearance-options button{min-width:0;min-height:72px;border:1px solid #dce6d4;border-radius:11px;background:#fff;color:#315437;padding:11px 10px;text-align:left;cursor:pointer}
.appearance-options strong,.appearance-options small{display:block}
.appearance-options strong{font-size:13px}.appearance-options small{font-size:10px;color:#53664a;margin-top:4px}
.appearance-note{font-size:10px;line-height:1.6;color:#53664a;margin:10px 0 0;text-align:left}
.appearance-options button[aria-pressed=true]{border-color:#76985e;background:#eef5e5;box-shadow:inset 0 0 0 1px #76985e}
body.games-arcade .arcade-root .appearance-toggle{display:grid;padding:7px;background:#f0f5e9;border:1px solid #dce6d4;color:#315437}
html[data-theme=night]{color-scheme:dark;--night-bg:#0a1425;--night-panel:#14243c;--night-soft:#1b2f4a;--night-text:#edf2fa;--night-muted:#b2bfd2;--night-line:#304764;--night-gold:#e7be63}
/* Override legacy fixed colors explicitly; never invert or filter page media. */
html[data-theme=night] body{--bg:var(--night-bg);--white:var(--night-panel);--ink:var(--night-text);--muted:var(--night-muted);--line:var(--night-line);--accent:var(--night-gold);--green:var(--night-soft);background:var(--night-bg)!important;color:var(--night-text)!important}
html[data-theme=night] body :is(.app-main,#view,.layout,.clean-explore,.clean-profile,.clean-talent,.account-settings,.feed-tools,.feed-community-rail,.feed-post,.post-copy,.watch-copy,.topbar,.sidebar,.bottom-nav,.footer,.settings-top,.clean-profile-top,.compact-page-top,.schedule-page-top){background-color:var(--night-bg)!important;border-color:var(--night-line)!important;color:var(--night-text)!important}
html[data-theme=night] body :is(section,article,header,nav,form,div,a,details,button){border-color:var(--night-line)!important}
html[data-theme=night] body :is(.notification-link,.account-link,.navlink,.profile-back-button,.profile-settings-button,.settings-top>a){color:var(--night-muted)!important}
html[data-theme=night] body :is(#app-environment,.settings-top>a,.clean-program-art,.clean-program-art>img){background:var(--night-soft)!important}
html[data-theme=night] body #app-environment :is(b,span){color:var(--night-muted)!important}
html[data-theme=night] body #app-environment b{background:var(--night-soft)!important}
html[data-theme=night] body :is(.community-ring>span,.post-logo,.training-coach-callout,.schedule-match>header>span,.profile-settings-button,.profile-auth .filters,.day-signedout-tools>div>span,.talent-calendar,.talent-card-eligibility>span){background:var(--night-soft)!important;color:var(--night-text)!important;border-color:var(--night-line)!important}
html[data-theme=night] body :is(.feed-create,.feed-browse>summary,.feed-refresh-control,.training-coach-callout,.profile-settings-button){color:var(--night-muted)!important}
html[data-theme=night] body :is(.interaction-bar,.archive-slider,.archive-frame,.feed-story-photo,.feed-editorial-photo,.instagram-frame,.quiz-card){background:var(--night-panel)!important;border-color:var(--night-line)!important}
html[data-theme=night] body :is(.feed-photo-credit,.editorial-logo){background:var(--night-soft)!important;color:var(--night-muted)!important}
html[data-theme=night] body #view :is(.post-text,.feed-caption,.feed-caption summary,.caption-preview,.caption-more,.caption-less,.feed-text-actions,.feed-text-actions a){color:var(--night-muted)!important}
html[data-theme=night] body :is(.app-section-header>a,.guide-category-cover,.reading-actions,.visual-guide-entry,.training-empty,.training-sources,.training-directory>a,.training-quick-links>a,.training-coach-row,.coaching-terms,.coaching-inbox>details,.coach-program-list>article,.coach-assignment-list>article,.assigned-program-list>a,.coach-builder-sessions>section,.coach-builder-step,.training-week,.training-log,.program-preparation,.training-session,.program-session,.program-next-session,.site-pro-photo,.shop-door,.shop-feature,.real-product,.retailer-section,.saved-collection,.collection-card,.onboarding-progress,.onboarding-roles label){background:var(--night-panel)!important;border-color:var(--night-line)!important;color:var(--night-text)!important}
html[data-theme=night] body .guide-result-visual.has-logo{background:#f0f3e9!important}
html[data-theme=night] body :is(.map-controls,.map-results,.map-type-legend,.map-help,.map-detail-card,.leaflet-popup-content-wrapper,.leaflet-popup-tip,.leaflet-control-layers,.leaflet-bar a,.city-map-mode-link,.map-saved-controls,.map-nearby-controls){background:var(--night-panel)!important;color:var(--night-text)!important;border-color:var(--night-line)!important}
html[data-theme=night] body :is(.text-link,.text-button,.v3-section-head button,.archive-controls button){background:transparent!important}
html[data-theme=night] body .quiz-option{background:var(--night-soft)!important;border-color:var(--night-line)!important;color:var(--night-text)!important}
html[data-theme=night] body .quiz-option.correct{background:#18362e!important;border-color:#467a5d!important}
html[data-theme=night] body .quiz-option.incorrect{background:#3c242b!important;border-color:#835561!important}
html[data-theme=night] body :is(h1,h2,h3,h4,strong,b,legend,label,dt,dd,a,p,small,span,summary,li,th,td){color:inherit}
html[data-theme=night] body :is(span,i){color:inherit!important}
html[data-theme=night] body :is(h1,h2,.clean-page-heading h1,.app-section-header h1,.schedule-heading h1,.settings-top h1,.compact-page-top h1){color:var(--night-gold)!important}
html[data-theme=night] body :is(h3,h4,strong,b,legend,label,dt,dd,.creator-name,.person-name,.clean-member-name){color:var(--night-text)!important}
html[data-theme=night] body :is(p,small,.small,.eyebrow,.tag,.compact-page-meta,.schedule-timezone,.private-profile-label,.daily-private-label,.coverage-footnote,.text-link,.text-button,.section-note,.training-meta,.training-note,.training-back,.city-back,.settings-group-label,.settings-privacy-note){color:var(--night-muted)!important}
html[data-theme=night] body :is(.panel,.account-box,.event-card,.guide-tile,.guide-entry,.guide-result,.place,.shop-card,.album,.empty,.notification,.notification-item,.community-row,.member-card,.post-menu-items,.feed-browse-panel,.collection-toolbar,.discovery-search,.discovery-action,.discovery-map-card,.discovery-stories>a,.discovery-story-caption,.visual-story-card,.visual-story-card>div,.visual-story-card>div>span,.clean-talent-card,.talent-clean-empty,.talent-add-player,.training-account-note,.program-card,.training-coach-card,.training-start-link,.training-log-card,.training-callout,.daily-panel,.day-overview,.day-checkin-disclosure,.day-signin-card,.daily-quiz-feed,.daily-history,.day-bio-empty,.day-bio-log-disclosure,.day-bio-readings,.wellness-history,.day-health-disclosure,.schedule-match,.schedule-empty,.schedule-search,.schedule-coverage,.appearance-settings,.settings-identity,.account-setting-row,.profile-media-empty,.clean-application-list>button){background:var(--night-panel)!important;border-color:var(--night-line)!important;color:var(--night-text)!important;box-shadow:none!important}
html[data-theme=night] body :is(.discovery-stories figure,.community-brand,.setting-avatar,.profile-empty-avatar,.account-setting-row .setting-icon,.guide-category-icon,.day-panel-icon,.schedule-source-icon,.day-signin-icon,.person-avatar,.app-account-avatar){background:var(--night-soft)!important;border-color:var(--night-line)!important;color:var(--night-gold)!important}
html[data-theme=night] body :is(.discovery-story-caption strong,.discovery-action strong,.discovery-map-card strong,.discovery-guide-list strong,.schedule-teams strong,.schedule-source-row strong,.schedule-match time,.day-panel-label strong,.training-section-heading h2,.clean-program-copy h3){color:var(--night-text)!important}
html[data-theme=night] body :is(.discovery-story-caption small,.discovery-action small,.discovery-guide-list small,.schedule-source-row small,.schedule-source-row>span>span,.schedule-teams p>span,.day-panel-label small,.day-week-strip small,.day-week-totals,.day-range button,.day-bio-units button,.day-metric-tabs button,.day-chart-note,.day-bio-chart-note,.training-chart-caption,.clean-program-copy>span){color:var(--night-muted)!important}
html[data-theme=night] body :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){background:var(--night-soft)!important;color:var(--night-text)!important;border-color:#49617f!important;caret-color:var(--night-gold)}
html[data-theme=night] body :is(input,textarea)::placeholder{color:#b2bfd2!important;opacity:1}
html[data-theme=night] body :is(input[type=checkbox],input[type=radio],progress){accent-color:var(--night-gold)}
html[data-theme=night] body :is(.wellness-choice,.choice,.wellness-choices label):has(input:checked){background:#3c3423!important;border-color:var(--night-gold)!important}
html[data-theme=night] body :is([role=alert],.account-form-error,.form-error){color:#f1b4a4!important}
html[data-theme=night] body [aria-invalid=true]{border-color:#d48d7d!important}
html[data-theme=night] body :is(button,.btn,.filter,.choice,.quiz-option,.wellness-choice,.appearance-toggle,.appearance-options button,.discovery-topic-chips a,.day-range,.day-bio-units,.schedule-level-chips button,.schedule-match-actions>button){background-color:var(--night-soft);border-color:var(--night-line);color:var(--night-text)}
html[data-theme=night] body :is(.btn:not(.light),.training-primary-action,.talent-card-primary,.daily-quiz-action,.day-signin-action,.schedule-match-primary,.schedule-empty button,#day-bio-quick-form button[type=submit]){background:var(--night-gold)!important;border-color:var(--night-gold)!important;color:#101d30!important}
html[data-theme=night] body :is(.btn.light,.filter,.appearance-toggle,.schedule-match-actions>button,.training-home-actions>a:not(.training-primary-action),.day-bio-cards>button,.wellness-sleep-presets button,.day-bio-log-disclosure>summary,.day-bio-readings>summary){background:var(--night-soft)!important;color:var(--night-text)!important;border-color:var(--night-line)!important}
html[data-theme=night] body :is(.btn,.daily-quiz-action,.talent-card-primary,.schedule-match-primary,.training-primary-action,.day-signin-action) :is(span,strong,small){color:inherit!important}
html[data-theme=night] body :is(a[aria-current=page],button[aria-pressed=true],.filter.active,.schedule-level-chips button[aria-pressed=true],.appearance-options button[aria-pressed=true]){color:var(--night-gold)!important;border-color:var(--night-gold)!important;background-color:var(--night-soft)!important}
html[data-theme=night] body .appearance-options button[aria-pressed=true]{box-shadow:inset 0 0 0 1px var(--night-gold)}
html[data-theme=night] body :is(.appearance-toggle,.appearance-options button){background:var(--night-soft)!important;color:var(--night-gold)!important;border-color:var(--night-line)!important}
html[data-theme=night] body :is(.training-tabs,.talent-clean-tabs,.schedule-date-tabs,.schedule-source-list,.schedule-source-row,.schedule-match-details,.day-week-totals,.clean-section-heading,.training-quick-links,.discovery-more-clean,.profile-community-tools,.clean-member-stats,.program-action-row,.settings-identity,.account-setting-row){border-color:var(--night-line)!important}
html[data-theme=night] body :is(.schedule-date-tabs button,.talent-clean-tabs button,.training-tabs a,.feed-switch a,.discovery-topic-chips a,.compact-page-back,.schedule-page-top a,.profile-back-button,.profile-settings-button){color:var(--night-muted)!important}
html[data-theme=night] body :is(.schedule-date-tabs button[aria-pressed=true],.talent-clean-tabs button[aria-pressed=true],.training-tabs a[aria-current=page],.feed-switch a[aria-current=page],.bottom-nav a[aria-current=page]){color:var(--night-gold)!important;border-color:var(--night-gold)!important}
html[data-theme=night] body :is(.day-week-strip i,.day-date-label,.daily-private-label,.day-range button[aria-pressed=true],.day-bio-units button[aria-pressed=true],.daily-history>summary,.active-training-plan,.training-start-link,.program-next-session){background:var(--night-soft)!important;border-color:var(--night-line)!important;color:var(--night-text)!important}
html[data-theme=night] body .day-week-ring{background:conic-gradient(var(--night-gold) var(--completion),#30445f 0)!important}
html[data-theme=night] body .day-week-ring>span{background:var(--night-panel)!important}
html[data-theme=night] body :is(.day-week-strip .today i,.day-week-strip .complete i){border-color:var(--night-gold)!important;box-shadow:0 0 0 2px #e7be6326!important}
html[data-theme=night] body .training-bars i{background:#506384!important}
html[data-theme=night] body .training-bars .has-session i{background:#b18e44!important}
html[data-theme=night] body .training-bars .is-today i{background:var(--night-gold)!important}
html[data-theme=night] body :is(.day-trend-chart,.day-bio-chart) text{fill:var(--night-muted)!important}
html[data-theme=night] body .chart-guide{stroke:#304764!important}
html[data-theme=night] body .chart-line{stroke:var(--night-gold)!important}
html[data-theme=night] body .chart-dot{fill:var(--night-gold)!important;stroke:var(--night-panel)!important}
html[data-theme=night] body .chart-area{fill:#e7be6326!important}
html[data-theme=night] body :is(.modal,.compact-sheet,.map-detail-popup .leaflet-popup-content-wrapper,.map-detail-popup .leaflet-popup-tip){background:var(--night-panel)!important;color:var(--night-text)!important;border-color:var(--night-line)!important}
html[data-theme=night] body dialog::backdrop{background:#020813b8}
html[data-theme=night] body :is(button,a,input,select,textarea,summary):focus-visible{outline-color:var(--night-gold)!important}
/* Game chrome, pickers, boards, feedback, and results use the same night palette. */
html[data-theme=night] body.games-arcade .arcade-root{--lime:#e7be63;--accent:#e7be63!important;--room-glow:#1a2c47!important;--card-color:#1b2f4a!important;color:var(--night-text)!important;background:var(--night-bg)!important}
html[data-theme=night] body.games-arcade .arcade-root:not(dialog){background:var(--night-bg)!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-game-top,.v3-header,.v3-room-bottom,.v3-game-row,.v3-quick,.dialog,.v3-answer,.v3-result-stats>div,.v3-review-row){background:var(--night-panel)!important;border-color:var(--night-line)!important;color:var(--night-text)!important;box-shadow:none!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-game-tabs,.v3-tabs button,.v3-round-button,.v3-setting-chip,.v3-eras,.v3-secondary,.v3-row-play,.v3-clue,.v3-clue.locked,.v3-career-node,.v3-memory-stats,.v3-memory-card,.v3-memory-preview>div,.search-box,.league-option,.v3-option-card,.v3-option-rank,.v3-rules li,.v3-flow-card,.v3-flow-links a,.v3-hint-button,.v3-hint-copy,.v3-resume-copy,.v3-enter-answer input,.v3-memory-actions button,.v3-move-tabs button,.v3-curve-tabs button,.dialog-head .icon-button){background:var(--night-soft)!important;border-color:#405979!important;color:var(--night-text)!important;box-shadow:none!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-feature,.v3-arena,.v3-victory){background:radial-gradient(ellipse at center,#1b2f4a,var(--night-bg) 85%)!important;border-color:#3b5170!important;color:var(--night-text)!important;box-shadow:none!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-answer-deck,.v3-room-poster){background:var(--night-bg)!important;color:var(--night-text)!important;border-color:var(--night-line)!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-overline,.v3-mode-count,.v3-room-label>p,.v3-game-top small,.v3-row-copy p,.v3-settings-head>span,.v3-round-settings,.v3-room-footnote,.v3-stage-meta,.v3-hud>span,.v3-hint-line,.v3-photo-credit,.v3-clue small,.v3-clue b,.v3-memory-stats small,.v3-memory-stats .timer,.v3-memory-actions,.v3-result-stats span,.v3-result-score small,.v3-victory>p:last-child,.v3-review-row>span,.v3-review-row small,.v3-saved-empty p,.league-option small,.v3-option-card small,.v3-dialog-copy,.v3-rules li,.v3-best-copy,.v3-new-round,.v3-date-copy,.v3-room-settings-more){color:var(--night-muted)!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-game-tabs a,.v3-section-head span,.v3-section-head button,.v3-feature>p,.v3-round-settings button,.v3-eras button,.v3-career-node strong,.v3-career-node small,.v3-reveal-button,.v3-answer-key,.v3-hint-button,.v3-hint-copy,.empty-state,.arcade-filter-label){color:var(--night-muted)!important}
html[data-theme=night] body.games-arcade .arcade-root .v3-mode-count{background:var(--night-soft)!important;border-color:var(--night-line)!important}
html[data-theme=night] body.games-arcade .arcade-root .v3-feature:before{border-color:#e7be6310!important}
html[data-theme=night] body.games-arcade .arcade-root .v3-memory-preview>div:not(.up){background:var(--night-soft)!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-memory-card:before,.v3-memory-preview>div:before){background:#e7be6308!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-primary,.v3-tabs button.active){background:var(--night-gold)!important;border-color:#b98e3d!important;color:#111e31!important;box-shadow:0 2px 0 #080e1a!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-game-tabs a.active,.v3-eras button.active,.league-option.selected,.v3-option-card.active,.v3-save.saved){background:#3c3423!important;border-color:var(--night-gold)!important;color:var(--night-gold)!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-primary,.v3-tabs button.active) :is(strong,span,small){color:inherit!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-score,.v3-result-score,.v3-question-type){color:var(--night-gold)!important;background-color:transparent!important;border-color:#77613b!important}
html[data-theme=night] body.games-arcade .arcade-root .v3-progress i{background:#304764!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-progress i.done,.v3-progress i.current){background:var(--night-gold)!important}
html[data-theme=night] body.games-arcade .arcade-root .v3-arena.badge-arena:before{border-color:#3c4d68!important;box-shadow:none!important}
html[data-theme=night] body.games-arcade .arcade-root .v3-arena .single-badge{background:#fff;border-radius:15px;padding:10px;filter:none}
html[data-theme=night] body.games-arcade .arcade-root .v3-field{background:linear-gradient(90deg,#213d45 50%,#29434a 50%)!important;border-color:#6c805d!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-field-footer,.v3-player-token small){color:#e4e8d5!important}
html[data-theme=night] body.games-arcade .arcade-root .v3-player-token>span{background:#fff!important}
html[data-theme=night] body.games-arcade .arcade-root .v3-player-token .text-token{color:#29452e!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-memory-card.is-face-up,.v3-memory-card.up,.v3-memory-preview .up){background:#fff!important;border-color:#d0d8ba!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-memory-card.is-matched,.v3-memory-card.matched){background:#ece5c6!important;border-color:var(--night-gold)!important}
html[data-theme=night] body.games-arcade .arcade-root .v3-answer-deck.correct{background:#18362e!important;border-color:#467a5d!important}
html[data-theme=night] body.games-arcade .arcade-root .v3-answer-deck.wrong{background:#3c242b!important;border-color:#835561!important}
html[data-theme=night] body.games-arcade .arcade-root :is(.v3-feedback-heading,.v3-feedback-copy,.v3-source-links a){color:#d5e9d8!important}
html[data-theme=night] body.games-arcade .arcade-root .wrong :is(.v3-feedback-heading,.v3-feedback-copy,.v3-source-links a){color:#f1c5bc!important}
/* Immersive video and original imagery keep their original pixels and colors. */
html[data-theme=night] body.watch-immersive .watch-stream-page{background:#050b15}
html[data-theme=night] body.watch-immersive .watch-stream-caption :is(h1,h2,h3,p,strong,small){color:#fff!important}
@media(max-width:640px){.topbar .appearance-toggle{width:32px;min-width:32px;height:36px;padding:6px}.appearance-options button{min-height:64px}html[data-theme=night] body>.bottom-nav{background:#0a1425f5!important}}
