/* Appearance is shared by the team hub, sign-in and match pages. Media stays original. */
:root[data-theme=dark]{color-scheme:dark;--paper:#0c121b;--white:#16212f;--ink:#e7edf6;--muted:#a7b5c7;--line:#35455b;--navy:#c5ddff;--blue:#82b7ff;--home:#88d9ad;--away:#a9c2ff;--home-soft:#203d32;--away-soft:#26344f;background:#0c121b;color:#e7edf6;--dark-surface:#16212f;--dark-raised:#202f42;--dark-muted:#acb9cd;--dark-link:#9bc5ff}
html[data-theme=dark] body{background:#0c121b;color:#e7edf6}
html[data-theme=dark] :is(.topbar,.site-header,.panel,.announcement,.event,.file-row,.member-row,.team-mark,.gallery-card,.chat-compose,.picker-file,.picker-actions,.file-viewer-bar,.file-viewer-actions,.match-card,.timeline-card,.settings-card,.live-match,.live-panel,.live-card,dialog){background:var(--dark-surface);color:#e7edf6;border-color:var(--line)}
html[data-theme=dark] :is(input,textarea,select){background:#101923;color:#e7edf6;border-color:#465b76}
html[data-theme=dark] input::placeholder,html[data-theme=dark] textarea::placeholder{color:#9babc1;opacity:1}
html[data-theme=dark] :is(a,.brand,.file-name,.profile-name-link,.inline-file-link){color:var(--dark-link)}
html[data-theme=dark] :is(.hint){color:var(--dark-muted)!important}
html[data-theme=dark] :is(label,.eyebrow,.meta,.brand small,.welcome p:last-child,.section-heading p,.panel p,.announcement .body,.event p,.file-row p,.member-row p,.no-items,.empty p,.attendance summary,.attendance-list,.file-topic-heading,.file-topic-heading span,.file-viewer-bar p,#file-viewer-status,.file-attachment small,.picker-file small,.reaction-picker #reaction-message,.other-emoji,.join-intro,.join-footer,.phone-person p,.phone-claim strong,.gallery-description small,.gallery-album-name,.roster-role,.my-profile-summary p,.directory-person small,.profile-role,.parent-options small,.avatar-zoom-label output,.pdf-page-count,#invite-result p){color:var(--dark-muted)}
html[data-theme=dark] :is(.primary){background:#2867bb;color:#fff;border-color:#6198e3}
html[data-theme=dark] :is(.secondary,.chip,.reaction-pill,.react-button,.emoji-option,.icon-button){background:var(--dark-raised);color:#dbe8fa;border-color:#465b76}
html[data-theme=dark] :is(.subtle,.text-button){color:#b3c8e4}
html[data-theme=dark] :is(.message .bubble,.chat-media-preview){background:var(--dark-surface);color:#e7edf6;border-color:var(--line)}
html[data-theme=dark] .message.mine .bubble{background:#203c61;border-color:#42618a}
html[data-theme=dark] :is(.badge,.date-tile,.file-kind,.file-attachment,.attachment-chip,.reply-quote,.chat-reply-draft,.chat-video-preview,.roster-number,.profile-avatar,.avatar-upload-preview,.avatar-crop-stage,.alerts-prompt,#status:not(:empty)){background:#24364e;color:#d6e6ff;border-color:#465b76}
html[data-theme=dark] :is(.reaction-pill.reacted,.emoji-option[aria-pressed=true],.chip.selected){background:#274c79;color:#fff;border-color:#82b7ff}
html[data-theme=dark] .emoji-choice{color:#e7edf6}
html[data-theme=dark] .emoji-choice:hover{background:#2c4566}
html[data-theme=dark] .bottom-nav{background:#101923f5;border-color:var(--line)}
html[data-theme=dark] .bottom-nav button{color:#a7b5ca}
html[data-theme=dark] .bottom-nav button.active{color:#9bc5ff}
html[data-theme=dark] :is(.bottom-nav .nav-unread,#unread){border-color:#101923}
html[data-theme=dark] :is(.next-card,.clock-panel){background:#142d4f;color:#fff}
html[data-theme=dark] .next-card p{color:#cfdded}
html[data-theme=dark] .next-card .secondary{background:#274464;color:#fff;border-color:#547392}
html[data-theme=dark] :is(.gallery-preview,.file-image-preview,.file-viewer,.pdf-controls,.chat-media-preview img){background:#101923}
html[data-theme=dark] .avatar-plus{background:#2867bb;border-color:#16212f;color:#fff}
html[data-theme=dark] :is(.form-error,#editor-error,.event .cancel-tag){color:#ffb4af}
html[data-theme=dark] .badge.needs-review{background:#59421e;color:#ffe0a3}
html[data-theme=dark] dialog::backdrop{background:#000a}
/* Match screens retain their green/blue team cues and original scorecard artwork. */
html[data-theme=dark] :is(.intro-copy,.date-stamp,.match-state,.team-label,.score-tools,.match-finish>span,.nav-link,.timeline-empty,.timeline-event,.timeline-time,.footer-note,.settings-description){color:#acb9cd}
html[data-theme=dark] :is(.nav-count,.button-new,.home-goal){background:#203d32;color:#b5ebcd;border-color:#466556}
html[data-theme=dark] .away-goal{background:#26344f;color:#c1d3ff}
html[data-theme=dark] .button-start{background:#dbef98;color:#173b2d}
html[data-theme=dark] .nav-link.active{color:#e7edf6;border-color:#88d9ad}
html[data-theme=dark] :is(.score,.team h2){color:#e7edf6}
html[data-theme=dark] :is(.timeline-card,.goal-entry,.setting-row,.match-summary){border-color:var(--line)}
#appearance-panel{margin-top:24px}#appearance-panel h2{margin-bottom:14px}#appearance-panel label{display:block;margin-bottom:8px}#appearance-choice{width:100%;max-width:340px;min-height:44px}
html[data-theme=dark] :is(.watch-scoreboard,.watch-follow,.watch-empty,.notes-card,.history-card,.app-dialog){background:var(--dark-surface);color:#e7edf6;border-color:var(--line)}
html[data-theme=dark] :is(.live-sharing-bar,.watch-install,.coach-access,.coach-join-callout,.opponent-branding,.confirmation-score,.report-note,.history-more,.history-empty>span,.small-count,.count-pill,.empty-ball,.event-minute,.event-icon.milestone,.date-stamp,.button-secondary,.duration-presets button){background:var(--dark-raised);color:#dbe8fa;border-color:#465b76}
html[data-theme=dark] :is(.field input,.notes-card textarea,.logo-prompt-details textarea,.secondary-color-field input[type=color]){background:#101923;color:#e7edf6;border-color:#465b76}
html[data-theme=dark] :is(.watch-follow .button-secondary,.live-button-row .button-secondary,.coach-access .button-secondary){background:var(--dark-raised);color:#dbe8fa}
html[data-theme=dark] :is(.button-primary,.coach-join-callout .button){background:#2867bb;color:#fff}
html[data-theme=dark] :is(.button-primary:hover,.coach-join-callout .button:hover){background:#2867bb;color:#fff}
html[data-theme=dark] :is(.brand-logo-frame,.hero-logo-frame,.crest-logo-frame,.watch-teams img#watch-home-logo,.watch-away-crest,.away-crest.has-logo){background:transparent}
html[data-theme=dark] .duration-presets button.selected{background:#274c79;color:#fff;border-color:#82b7ff}
html[data-theme=dark] .history-row:hover{background:var(--dark-raised)}
