:root{--surface:#19191f;--surface-raised:#25252e;--text-main:#f4f4f7;--text-muted:#b8b8c4;--border:#494953;--input-bg:#101016;--surface-shadow:inset 0 1px 0 #ffffff12,0 4px 0 #08080d,0 12px 30px #0004;color-scheme:dark}
/* Native option popups cannot use the select's decorative gradient. Give both
   surfaces an opaque theme color, including Windows and Android menus. */
html select{color-scheme:dark;background-color:var(--input-bg);color:var(--text-main)}
html[data-theme=light] select{color-scheme:light}
html select option,html select optgroup{background-color:var(--input-bg);color:var(--text-main);-webkit-text-fill-color:var(--text-main)}
.topbar-tools{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.theme-picker{display:flex;gap:8px;align-items:center;color:var(--text-muted);font-size:.875rem}
.theme-picker select{min-height:44px;border:1px solid var(--border);border-radius:10px;color:var(--text-main);background:var(--surface);padding:8px 10px;font-size:.875rem!important}
html[data-theme=light]{--ink:#15151b;--paper:#f3f4f7;--panel:#fff;--muted:#5e5e6b;--line:#d5d6de;--red:#c92939;--blue:#2262c2;--surface:#fff;--surface-raised:#f4f4f8;--text-main:#17171f;--text-muted:#5b5b69;--border:#c8cad5;--input-bg:#fafbfc;--surface-shadow:inset 0 1px 0 #fff,0 3px 0 #cdd0da,0 12px 28px #34344512;background:#f3f4f7;color:#17171f;color-scheme:light}
html[data-theme=light] body{background:radial-gradient(ellipse at 12% 0,#fff,transparent 60%),#f3f4f7;color:#17171f}
html[data-theme=light] :is(.topbar,.account-strip,.net,.leader,.details-matchup){color:#17171f}
html[data-theme=light] :is(.eyebrow,.save-state,.offline-note,.small-label,.field label,.criteria-title,.criteria-group h3,.round-note label,.insight h3,.corner-label,.round-title small,.feed-credit,.feed-credit a,.match-meta,.match-detail,.match-date,.schedule-header p,.schedule-footer,.search-label,.strength-side p,.event-heading span,.details-grid dt,.progress-round small,.history th,.total span,.summary-head p){color:#5b5b69}
html[data-theme=light] :is(.help,.round-info){color:#5b5b69!important}
html[data-theme=light] :is(.schedule-header h1,.match-names strong,.total strong){text-shadow:none}
html[data-theme=light] :is(.toolbar,.card,.match-card,.continue-card,.fighter-score,.quick-corner,.fight-item){background:linear-gradient(145deg,#fff,#f1f2f7);border-color:#c9ccd8;border-top-color:#fff;box-shadow:var(--surface-shadow);color:#17171f}
html[data-theme=light] :is(.toolbar button,.text-button,.edit-round){color:#40404f}
html[data-theme=light] .toolbar button:last-child{border-color:#b9bdcc}
html[data-theme=light] :is(.toolbar button[aria-current=page],.schedule-tabs button[aria-pressed=true]){background:linear-gradient(#33333e,#15151e);color:#fff;box-shadow:inset 0 1px 0 #666,0 3px 0 #050509,0 6px 12px #0002}
html[data-theme=light] :is(.btn-primary,.mini.done,.even-row button[aria-pressed=true],.margin-control button[aria-pressed=true],.watch-button[aria-pressed=true],.chip.active){background:#20202b;color:#fff;border-color:#20202b;text-shadow:none}
html[data-theme=light] .btn-primary{background:linear-gradient(#373744,#16161e);box-shadow:inset 0 1px 0 #fff2,0 3px 0 #070709,0 8px 12px #0002}
html[data-theme=light] .btn-primary:hover{background:linear-gradient(#464653,#25252f)}
html[data-theme=light] :is(.btn-secondary,.action-stack button,.score-btn,.quick-corner button,.even-row button,.margin-control button,.watch-button,.observation,.progress-round,.dialog-head button,.mini){background:linear-gradient(#fff,#e9eaf0);color:#242432;border-color:#c2c5d1;box-shadow:inset 0 1px 0 #fff,0 2px 0 #c0c3ce,0 5px 9px #0001}
html[data-theme=light] :is(.btn-secondary,.action-stack button):hover{background:#e1e3eb}
html[data-theme=light] :is(.quick-corner button[aria-pressed=true],.fighter-score .score-btn.active){color:#fff;background:var(--corner);border-color:var(--corner);box-shadow:inset 0 1px 0 #ffffff55,0 2px 0 #0003,0 0 0 2px #555}
html[data-theme=light] .fighter-score:first-child .score-btn.active{background:var(--red);border-color:var(--red)}
html[data-theme=light] .fighter-score:last-child .score-btn.active{background:var(--blue);border-color:var(--blue)}
html[data-theme=light] :is(.btn-primary:disabled,.btn-secondary:disabled){background:#e1e2e9;color:#686877;border-color:#c7c9d3;box-shadow:none}
html[data-theme=light] :is(.search-label input,.field input,.field select,.number,.round-note textarea,.result-panel select,#analysisFighter){background:#fff;color:#20202b;border-color:#bcc0cf;box-shadow:inset 0 2px 5px #28283d0a}
html[data-theme=light] :is(.field input:disabled,.field select:disabled){color:#20202b;-webkit-text-fill-color:#20202b;background:transparent;border-color:transparent}
html[data-theme=light] :is(.chip,.strength-side p span){color:#30303d}
html[data-theme=light] .chip.active{background:#20202b;color:#fff}
html[data-theme=light] :is(.round-preview,.schedule-empty,.schedule-tabs,.status-box,.schedule-change){background:#ebeef4;border-color:#c6cad7;color:#343442;box-shadow:inset 0 2px 4px #27273b0a}
html[data-theme=light] :is(.schedule-empty p,.continue-card p,.schedule-tabs button){color:#555566}
html[data-theme=light] .schedule-tabs button[aria-pressed=true]{color:#fff}
html[data-theme=light] .round-actions{background:#f4f5f9f5;border-color:#babfcd;box-shadow:0 6px 18px #0002}
html[data-theme=light] .summary-head{background:linear-gradient(#fff,#e9ecf5);color:#262633;border-color:#c6cad6;box-shadow:inset 0 1px 0 #fff}
html[data-theme=light] .dash{color:#5b5b69}
html[data-theme=light] :is(.progress,.history-progress){background:#d5d8e2}
html[data-theme=light] .progress span{background:#22222d}
html[data-theme=light] .match-names>span{background:linear-gradient(#fff,#dde0e9);color:#52525e;border-color:#c8cbd6;box-shadow:inset 0 1px 0 #fff,0 3px 0 #babfcd,0 7px 12px #0001}
html[data-theme=light] .match-names strong:before{box-shadow:none}
html[data-theme=light] :is(dialog,#archiveDialog,#recoveryDialog){background:linear-gradient(145deg,#fff,#f3f4f8);color:#17171f;border-color:#c4c8d4;color-scheme:light;box-shadow:inset 0 1px 0 #fff,0 25px 80px #10102240}
html[data-theme=light] :is(.history-intro,.history-group>h3,.history-matchup strong,.recovery-version .recovery-names){color:#20202c}
html[data-theme=light] :is(.history-stats>div,.history-card,.recovery-version){background:linear-gradient(#fff,#e9ecf4);border-color:#c6cada;box-shadow:var(--surface-shadow)}
html[data-theme=light] .history-current{border-color:#75758a}
html[data-theme=light] #archiveDialog .fight-item{background:transparent;color:#20202a;box-shadow:none}
html[data-theme=light] #archiveDialog :is(.saved-state,.history-vs,.history-scoreline>span:last-child,.history-result,.card-save-badge){color:#5a5a6b}
html[data-theme=light] #archiveDialog :is(.saved-score,.history-cta){color:#20202d}
html[data-theme=light] #archiveDialog .history-progress>span{background:#414152}
html[data-theme=light] :is(.history-stats span,.history-group>h3>span,.card-save-badge,.recovery-version p,.recovery-version h3,.recovery-difference,.recovery-rounds summary>span,.recovery-columns h4,.recovery-columns p,.recovery-round-entry strong>span){color:#5b5b6c}
html[data-theme=light] :is(.recovered-action,.recovery-rounds details){background:#f0f2f7;border-color:#c7cbda;color:#5b5b6c}
html[data-theme=light] .recovered-action button{color:#242433;border-color:#8e94a7;background:#fff}
html[data-theme=light] :is(input,textarea,select,button):focus-visible{outline-color:#20202b!important}
html[data-theme=light] .check input{accent-color:#22222d}
html[data-theme=light] .mini.done{background:#22222d;color:white}
html[data-theme=light] .mini.swing{border-color:#515167}
@media(max-width:800px){.topbar-tools{width:100%;justify-content:space-between;gap:8px}.theme-picker{font-size:.8125rem}.toolbar{grid-template-columns:repeat(3,minmax(0,1fr))}.toolbar #accountBtn{margin:0}.theme-picker select{max-width:125px}}
