/* A high-contrast daytime alternative. The pitch stays deep green so kits and names remain legible. */
header .theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap;margin:0;padding:8px 11px;background:#232a33;border:1px solid #66717f;color:#fffdf7;font-size:13px;min-height:38px}
header .theme-toggle:hover{background:#35404d;border-color:#9ca9b8}
body[data-theme="light"]{color-scheme:light;--bg:#f2efe5;--panel:#fffdf7;--raised:#e8e3d6;--text:#102338;--muted:#56606a;--line:#cdc7b9;--red:#ba1938;background:var(--bg);color:var(--text)}
body[data-theme="light"] :is(button,input,select,textarea){color:var(--text)}
body[data-theme="light"] button{background:var(--raised);border-color:#bdb7a9}
body[data-theme="light"] button:hover{background:#e2dccd;border-color:#8298ac}
body[data-theme="light"] :is(input,select,textarea){background:#fffdf7;border-color:#ada99d;color:var(--text)}
body[data-theme="light"] input::placeholder{color:#697a8b}
body[data-theme="light"] :is(header,.fixture,.local-note,.list-head){background:#ece7da;border-color:var(--line)}
body[data-theme="light"] .brand{color:#102338}
body[data-theme="light"] :is(header #save,.positions button.active,.add.selected,.button-link){background:var(--red);border-color:var(--red);color:#fffdf7}
body[data-theme="light"] :is(header #save,.positions button.active,.add.selected,.button-link):hover{background:#8d1930;border-color:#8d1930;color:#fffdf7}
body[data-theme="light"] header .theme-toggle{background:#fffdf7;border-color:#8193a5;color:#102338}
body[data-theme="light"] header .theme-toggle:hover{background:#e3eaf1}
body[data-theme="light"] .account-button{background:#fffdf7!important;border-color:#8193a5!important;color:#102338!important}
body[data-theme="light"] .account-button:hover{background:#e2dccd!important}
body[data-theme="light"] .site-nav a[aria-current]{background:#d4e0ea;color:#142538}
body[data-theme="light"] .site-nav a:hover{background:#e2dccd;color:#142538}
body[data-theme="light"] :is(.panel,.section-title,.player,.squad-player,.depth-choice,.schedule-row){border-color:var(--line)}
body[data-theme="light"] .section-title{border-top-color:#8193a5}
body[data-theme="light"] .squad .section-title{border-top-color:var(--red)}
body[data-theme="light"] :is(.notice,.profile-planning,.empty,.squad-empty,.depth-card,.shared-depth,.community-card,.fixture,.schedule-section,.schedule-date,.schedule-opponent,.tournament-card,.selected-fixture){background:#f8f5ed;border-color:var(--line);color:var(--text)}
body[data-theme="light"] :is(.notice,.empty,.squad-empty){color:var(--muted)}
body[data-theme="light"] .positions button{background:#ece7da;border-color:#b7c5d3;color:#1d3348}
body[data-theme="light"] .positions button.active{background:var(--red);color:#fffdf7}
body[data-theme="light"] .player:hover{background:#f0ecdf}
body[data-theme="light"] .avatar{background:#e8e3d6;border-color:#aebbc9;color:#253a50}
body[data-theme="light"] .position-tag{color:#a42035}
body[data-theme="light"] :is(.counter,.first-choice .depth-rank,.schedule-summary){color:var(--red)}
body[data-theme="light"] .counter small{color:#5a697b}
body[data-theme="light"] .progress{background:#dae2eb}
body[data-theme="light"] .text-button:hover{background:#e2dccd;color:var(--text)}
body[data-theme="light"] .view-tabs{background:#e8e3d6}
body[data-theme="light"] .view-tabs button{background:transparent;color:#44586c}
body[data-theme="light"] .view-tabs button.active{background:#fffdf7;color:#102338;box-shadow:0 1px 4px #18324b20}
body[data-theme="light"] :is(.group-title,.fixture-label span,.schedule-date strong,.schedule-opponent h3,.schedule-opponent p,.community-card p,footer strong){color:var(--text)}
body[data-theme="light"] :is(.bench-chip,.depth-card h3,.shared-depth>summary,.community-card,.tournament-card){background:#fffdf7;border-color:var(--line)}
body[data-theme="light"] .depth-card{background:#fffdf7}
body[data-theme="light"] .depth-card h3{background:#f0ecdf}
body[data-theme="light"] .depth-add{background:#f8f5ed;border-color:#bf9ba5;color:#9c2033}
body[data-theme="light"] .depth-add:hover:not(:disabled){background:#f8ebee;border-color:var(--red)}
body[data-theme="light"] .depth-empty-icon{color:#526478;border-color:#94a7ba}
body[data-theme="light"] .depth-actions button:hover{background:#ece6d9;color:#102338}
body[data-theme="light"] .dual-badge{background:#fff4da;border-color:#b58830;color:#684b11}
body[data-theme="light"] .shortlist-filter.active{background:#fff4da;border-color:#a77b27;color:#644615}
body[data-theme="light"] .star-button{color:#536a80}
body[data-theme="light"] .star-button.starred{color:#9c6c12}
body[data-theme="light"] .profile-planning{background:#eeeade}
body[data-theme="light"] :is(.shared-roster h3,.shared-depth>div strong,.community-card-top,.schedule-team){color:#a42035}
body[data-theme="light"] :is(.shared-depth,.community-card,.export-options button){background:#fffdf7;border-color:var(--line)}
body[data-theme="light"] :is(.export-options span,#plannerDialog p,.community-card p){color:#465a6f}
body[data-theme="light"] .button-link.secondary{background:#ece7da;border-color:#aebdcc;color:#172a3e}
body[data-theme="light"] .schedule-row>a{color:#244c70}
body[data-theme="light"] :is(.schedule-date small,.schedule-opponent small,.schedule-empty,.schedule-footnote){color:var(--muted)}
body[data-theme="light"] dialog{background:#fffdf7;border-color:#9aaabd;color:var(--text);box-shadow:0 20px 80px #21344940}
body[data-theme="light"] dialog::backdrop{background:#182b4090}
body[data-theme="light"] :is(#intakeDialog input,#intakeDialog select,#intakeDialog textarea){background:#fffdf7;border-color:#ada99d;color:var(--text)}
body[data-theme="light"] #googleSignIn{background:#fffdf7;color:#202124;border-color:#ada99d}
body[data-theme="light"] #toast{background:#fffdf7;border-color:#ada99d;color:#102338}
body[data-theme="light"] #creditBody a{color:#9c2033}
body[data-theme="light"] .mobile-dock{background:#f6f3e9ee;border-color:#aebdcc;box-shadow:0 -5px 20px #243b5320}
body[data-theme="light"] .mobile-dock button{background:transparent;border-color:transparent;color:#405569}
body[data-theme="light"] .mobile-dock button.active{background:#f4e3dc;border-color:#bc8290;color:#802036}
body[data-theme="light"] .mobile-dock button.active .dock-step{color:#8b3144}
body[data-theme="light"] .pitch{box-shadow:0 2px 12px #1d3b3d23}
body[data-theme="light"] .slot,body[data-theme="light"] .slot:hover{background:transparent;color:#fffdf7}
body[data-theme="light"] .slot-name{background:transparent;color:#fffdf7;text-shadow:0 1px 4px #071a12,0 0 2px #071a12}

/* Finish the secondary panels and controls that carry dark-only colors in the base theme. */
body[data-theme="light"] :is(h2 span,.cohort-badges span,.cap-tied-badge,.position-balance>div,.profile-stats,.profile-quick,.compare-metrics>div,.compare-columns section,.builder-switch button,.builder-coach,.tournament-track,.tournament-card,.player.unavailable,.player.reserved,#advancedFilters,#reviewFromPool,.squad-management,.match-centre,.match-lineup-controls,.kit-options){background:#eeeade;border-color:#cbc5b7;color:#102338}
body[data-theme="light"] :is(.profile-stats,.profile-quick,.compare-metrics>div,.compare-columns section,.position-balance>div,.tournament-card){background:#fffdf7}
body[data-theme="light"] :is(.builder-coach,.tournament-track,.match-centre,.squad-management){background:#f8f5ed}
body[data-theme="light"] .builder-switch button:hover{background:#e9e3d5;border-color:#90a4b8}
body[data-theme="light"] .builder-switch button.active{background:#f4e3dc;border-color:#a52137;color:#76182b}
body[data-theme="light"] .builder-switch button span{color:#53677c}
body[data-theme="light"] .builder-switch button.active span{color:#a52137}
body[data-theme="light"] .builder-coach .coach-photo{background:#e6edf4;border-color:#aebccb;mix-blend-mode:normal}
body[data-theme="light"] :is(.builder-coach>span,.tournament-year,.position-balance strong,.profile-stats strong,.compare-metrics strong,#poolSelectedCount,.depth-summary){color:#9b1c31}
body[data-theme="light"] :is(.builder-coach>small,#olympicRules,.olympic-fixture .fixture-label span,.commitment){color:#665025}
body[data-theme="light"] :is(.cohort-badges span,.cap-tied-badge){background:#e9f1f8;border-color:#a7bfd4;color:#214d70}
body[data-theme="light"] .country-names{color:#5c4c2e}
body[data-theme="light"] .tournament-track{border:1px solid var(--line)}
body[data-theme="light"] .youth-results>h3{color:var(--text)}body[data-theme="light"] .youth-results>h3 span{background:#e3ebf2;color:#42566a}body[data-theme="light"] .youth-result{background:#fffdf7;border-color:#cbd6e0;border-left-color:#a92b40}body[data-theme="light"] .youth-result time,body[data-theme="light"] .youth-result small{color:#516579}body[data-theme="light"] .youth-result strong{color:#102338}body[data-theme="light"] .youth-result-team{color:#a52338}body[data-theme="light"] .youth-result a{color:#9d1d35}body[data-theme="light"] .tournament-age{border-color:#bbc7d4;color:#42566a}
body[data-theme="light"] .tournament-card{border-top-color:#8a9bad}
body[data-theme="light"] .tournament-card h3{color:#102338}
body[data-theme="light"] :is(.tournament-date,.tournament-card p){color:#465a6f}
body[data-theme="light"] .tournament-card a{color:#9b1c31}
body[data-theme="light"] .tournament-status{color:#52667b}
body[data-theme="light"] .tournament-status:is(.status-confirmed,.status-dates-set),body[data-theme="light"] .olympic-eligibility.eligible{color:#276440}
body[data-theme="light"] .tournament-status.status-rumored,body[data-theme="light"] .olympic-eligibility.overage{color:#795d1d}
body[data-theme="light"] :is(.source-details summary,.source-details a,.squad-management>summary,.pool-instruction strong,.profile-quick strong,.match-lineup-controls strong,.match-lineup-controls label,#emailAuthForm label,.filter-field){color:#24384d}
body[data-theme="light"] .shared-match-heading{color:#24384d}
body[data-theme="light"] :is(.detail-small,.profile-quick span,.name-button span,.tournament-age,.match-lineup-controls p,.builder-coach #teamDetails,.youth-selection,.schedule-heading p,.schedule-heading label){color:#4a5e73}
body[data-theme="light"] .inline-link,body[data-theme="light"] .name-button:hover,body[data-theme="light"] .creator-link,body[data-theme="light"] #teamDetailBody a{color:#9b1c31}
body[data-theme="light"] .stats{color:#24384d;background:transparent;border:0}
body[data-theme="light"] .stats span{color:#718296}
body[data-theme="light"] .stats:hover{background:#ece6d9;color:#152a3f}
body[data-theme="light"] :is(.text-button,.inline-link,.name-button,.star-button,.shortlist-filter,.depth-player,.depth-actions button,.kit-choice){background:transparent;border-color:transparent}
body[data-theme="light"] :is(.text-button,.inline-link,.name-button,.star-button,.shortlist-filter,.depth-player,.depth-actions button,.kit-choice):hover{background:#ece6d9}
body[data-theme="light"] .pool-search button[aria-expanded="true"],body[data-theme="light"] .community-toolbar button[aria-pressed="true"]{background:#f4e3dc;border-color:#ae6474;color:#782033}
body[data-theme="light"] :is(#reviewFromPool,.match-lineup-controls select){background:#fffdf7;border-color:#ada99d;color:#102338}
body[data-theme="light"] :is(.profile-action,.squad-actions #saveNamed,.squad-empty button){background:var(--red);border-color:var(--red);color:#fffdf7}
body[data-theme="light"] :is(.profile-action,.squad-actions #saveNamed,.squad-empty button):hover{background:#8d1930;border-color:#8d1930;color:#fffdf7}
body[data-theme="light"] .profile-action:disabled{background:#e8e3d6;border-color:var(--line);color:#526478}
body[data-theme="light"] #filterCount{color:#fffdf7}
body[data-theme="light"] .kit-options{background:#e8e3d6;border-color:#bdb7a9}
body[data-theme="light"] .kit-choice{color:#40566d}
body[data-theme="light"] .kit-choice:hover{background:#d7e2ec}
body[data-theme="light"] .kit-choice.active{background:#fffdf7;color:#102338;box-shadow:0 1px 4px #243b5326}
body[data-theme="light"] #players{scrollbar-color:#a8b8c8 #f2f6f9}
body[data-theme="light"] .beta-tag{border-color:#a94b5c;color:#952039}
body[data-theme="light"] #authStatus{color:#8d1d31}
body[data-theme="light"] .selected-fixture>span:first-child{color:#9b1c31}
body[data-theme="light"] .depth-actions button{color:#4e6073}
body[data-theme="light"] .depth-rank{color:#526478}
body[data-theme="light"] .expand-squad{color:#40576e}
body[data-theme="light"] .expand-squad:hover{color:#102338}

/* The full-pool XI picker works in either color scheme. */
#picker{width:min(650px,95vw);max-height:88dvh}
.picker-toolbar{position:sticky;top:-24px;z-index:2;background:var(--panel);padding:4px 0 12px;border-bottom:1px solid var(--line)}
.picker-views{display:flex;gap:7px;margin-bottom:12px}
.picker-views button{flex:1;min-height:42px;font-size:14px}
.picker-views button.active{background:#5c2730;border-color:#dc6976;color:#fffdf7}
.picker-toolbar label{display:grid;gap:5px;font-size:13px;font-weight:700;color:var(--muted)}
.picker-toolbar input{width:100%;min-height:46px;font-size:16px}
.picker-filters{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,.55fr);gap:9px 12px;align-items:end;margin:10px 0 2px}
.picker-filter-title{grid-column:1/-1;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.picker-levels{display:flex;gap:5px;flex-wrap:wrap}
.picker-levels button{min-height:36px;padding:6px 10px;font-size:12px}
.picker-levels button.active{background:#5c2730;border-color:#dc6976;color:#fffdf7}
.picker-toolbar .picker-league-label{font-size:12px}
.picker-league-label select{min-height:38px;width:100%}
#pickerResults{display:grid;gap:13px}
#pickerResults .picker-group-players button{display:flex;align-items:center;gap:11px;min-height:65px}
#pickerResults .picker-group-players button .avatar{width:37px;height:43px;flex:none}
.picker-player-info{flex:1;min-width:0}
.picker-player-info strong{display:block;font-size:15px}
.picker-player-info small{display:block;color:var(--muted);font-size:12px;font-weight:400;line-height:1.4;margin-top:3px}
.picker-player-status{color:#ffb0b7;font-size:12px;font-weight:700;text-align:right;white-space:nowrap}
.picker-empty{padding:12px 0}
body[data-theme="light"] .picker-toolbar{background:#fffdf7}
body[data-theme="light"] .picker-views button.active{background:var(--red);border-color:var(--red);color:#fffdf7}
body[data-theme="light"] .picker-levels button.active{background:var(--red);border-color:var(--red);color:#fffdf7}
body[data-theme="light"] #pickerPlayers .picker-group h3{color:#9d1f34;border-color:var(--line)}
body[data-theme="light"] .picker-player-status{color:#8d1b31}
body[data-theme="light"] .export-preferences fieldset{border-color:var(--line)}body[data-theme="light"] .export-preferences legend{color:var(--muted)}body[data-theme="light"] .export-preferences button{background:#fffdf7;border-color:#c8d2df;color:#24364b}body[data-theme="light"] .export-preferences button[aria-pressed="true"]{background:#a91d36;border-color:#a91d36;color:#fffdf7}

@media(max-width:760px){
.export-preferences fieldset{border-color:var(--line)}.export-preferences legend{color:var(--muted)}.export-preferences button{background:#fffdf7;border-color:#c8d2df;color:#24364b}.export-preferences button[aria-pressed="true"]{background:#a91d36;border-color:#a91d36;color:#fffdf7}
  #siteHeader{grid-template-columns:minmax(0,1fr) auto auto;grid-template-rows:42px 38px}
  #siteHeader>.site-nav{grid-column:1;grid-row:2;overflow-x:auto}
  #siteHeader>.theme-toggle{grid-column:2;grid-row:2;min-height:32px;padding:4px 7px;font-size:12px}
  #siteHeader>.account-button{grid-column:3;grid-row:2;margin:0!important;min-height:32px;padding:4px 7px!important}
  #siteHeader>#save{grid-column:2/4;grid-row:1}
  .theme-suffix{display:none}
  #picker{padding:18px}
  .picker-toolbar{top:-18px}
  .picker-filters{grid-template-columns:1fr}
  .picker-player-status{font-size:11px;white-space:normal;max-width:82px;line-height:1.25}
}

/* Checkbox-based league filters, shared by the pool and the lineup picker. */
.league-filter-field{align-self:start}
.league-filter-field>summary,.picker-league-filter>summary{display:flex;justify-content:space-between;gap:8px;align-items:center;cursor:pointer;min-height:42px;padding:8px 10px;border:1px solid var(--line);border-radius:4px;color:var(--text);font-weight:700}
.league-filter-field>summary span,.picker-league-filter>summary span{color:var(--muted);font-size:12px;font-weight:500}
.league-filter-content,.picker-league-filter{grid-column:1/-1;min-width:0}
.league-filter-content{padding:10px;border:1px solid var(--line);border-top:0;border-radius:0 0 4px 4px}
.league-filter-content>label,.picker-league-filter>label{display:grid;gap:5px;margin:4px 0 8px;font-size:12px;font-weight:700;color:var(--muted)}
.league-filter-content input[type=search],.picker-league-filter input[type=search]{width:100%;min-height:38px}
.league-filter-actions{display:flex;gap:7px;margin:8px 0}
.league-filter-actions button{min-height:32px;padding:5px 10px;font-size:12px}
.league-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 8px;max-height:240px;overflow:auto;padding:5px;border:1px solid var(--line);border-radius:4px;scrollbar-width:thin}
.league-options h4{grid-column:1/-1;margin:9px 0 2px;padding-bottom:4px;border-bottom:1px solid var(--line);font-size:11px;letter-spacing:.045em;text-transform:uppercase;color:var(--muted)}
.league-options h4:first-child{margin-top:2px}
.league-option{display:flex;align-items:center;gap:6px;min-width:0;padding:4px 2px;font-size:12px;line-height:1.3;cursor:pointer}
.league-option input{width:15px;height:15px;min-width:15px;margin:0;accent-color:#d64250}
.league-option span{min-width:0;overflow-wrap:anywhere}
.league-option small{margin-left:auto;color:var(--muted);font-size:10px}
.league-rank-note{margin:8px 0 0;font-size:10px;line-height:1.45;color:var(--muted)}
.league-rank-note a{color:inherit;text-underline-offset:2px}
.picker-league-filter{padding-top:8px;border-top:1px solid var(--line)}
.picker-league-filter .league-options{max-height:190px}
.picker-filters .picker-league-filter{grid-column:1/-1}
@media(max-width:500px){.league-options{grid-template-columns:1fr}.league-option{font-size:13px}.league-options h4{margin-top:12px}}

.league-option[hidden]{display:none}
.league-filter-field>summary span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;text-align:right}
#clubOptions,#cohortOptions,#statusOptions,#nationalityOptions{grid-template-columns:1fr}
#clubOptions{max-height:270px}

body[data-theme="light"] .bench-pick,body[data-theme="light"] .bench-feature{background:#fffdf7;border-color:var(--line);color:var(--text)}body[data-theme="light"] .bench-pick.selected{border-color:#008e5d}body[data-theme="light"] .bench-feature.selected{background:#a91d36;border-color:#a91d36;color:#fffdf7}
