/* v1.1.2: the pitch-green palette returns; match rendering stays untouched. */
:root,:root[data-theme="dark"]{--bg:#06151f;--panel:#0c2430;--edge:#31545b;--text:#f5fbf6;--muted:#b3cbd0;--pink:#65f7a0;--purple:#79c9ff;--green:#ffe174;--light:#e5f9f3;--control:#173b40;--input:#09232b;--input-edge:#648c8d;--orbit:#103c3c;--facts:#123139;--field-label:#c5e6db;--accent:#86efac;--active:#185344;color-scheme:dark}
:root[data-theme="light"]{--bg:#eef6f1;--panel:#fff;--edge:#a8c8b8;--text:#153c32;--muted:#425f55;--pink:#17663e;--purple:#25607a;--green:#735500;--light:#fff;--control:#e2eee7;--input:#fff;--input-edge:#6f9985;--orbit:#d5e9de;--facts:#e9f3ed;--field-label:#254f40;--accent:#17663e;--active:#185344;color-scheme:light}
body{background:var(--bg);background-image:radial-gradient(ellipse at 0 0,#12644725,transparent 55%);color:var(--text)}
:is(.primary,.hero-actions .primary),:root[data-theme="dark"] :is(.primary,.hero-actions .primary){background:#a4efad;color:#103829;border-color:#a4efad;box-shadow:none}
:root[data-theme="light"] :is(.primary,.hero-actions .primary){background:#185b3b;color:#fff;border-color:#185b3b}
:is(.panel,.competition,.saved-card,.club-picker,.arena-options,.career-hero,.match-splash){background:var(--panel);color:var(--text);border-color:var(--edge)}
.nm-menu .nav{width:242px;gap:2px;padding:8px!important;max-height:min(75dvh,620px);overflow:auto;box-shadow:0 14px 34px #0004}
.nm-menu .nav button{background:transparent;border:0;border-radius:8px;padding:10px 14px!important;font-size:.88rem!important;min-height:40px;text-align:left}
.nm-menu .nav button[data-page="tutorial"]{border-top:1px solid var(--edge);border-radius:0;margin-top:6px!important;padding-top:16px!important}
.nm-menu .nav button:is(:hover,.active){background:var(--active);color:white}
.nm-mode-sections{display:grid;gap:16px;margin:24px 0 40px;counter-reset:mode}
.nm-mode-sections .nm-mode{display:flex;flex-direction:column;align-items:flex-start;gap:20px;padding:28px 32px;border-inline-start:4px solid var(--accent);counter-increment:mode}
.nm-mode-copy h3:before{content:counter(mode,decimal-leading-zero) ' / ';font-size:.8rem;color:var(--muted);vertical-align:middle;margin-inline-end:12px}
.nm-mode-copy p{margin:12px 0 0;max-width:85ch}.nm-mode-sections button{width:auto;min-width:220px}.nm-mode:hover{transform:none}
.career-intro{min-height:0;padding:32px 36px;margin-bottom:30px;border-radius:22px;position:relative;overflow:hidden;background:linear-gradient(115deg,var(--panel),var(--facts))}
.career-intro h1{font-size:clamp(2rem,4vw,3.4rem);line-height:1.12;margin:18px 0;max-width:760px;letter-spacing:-1px}.career-intro p{color:var(--muted);max-width:65ch;line-height:1.7}.career-intro .row{margin-top:22px;gap:12px;flex-wrap:wrap}
.career-save{gap:24px;padding:24px}.career-save-identity{display:flex;align-items:center;gap:20px;min-width:0}.career-save-identity>.team-crest{flex:none;width:64px;height:70px}.career-save-identity .crest-image{width:56px;height:56px;object-fit:contain}.career-save-identity>div:last-child{min-width:0}.career-save .fine{display:block;margin-top:6px}.career-save .row{flex-wrap:wrap;justify-content:flex-end}
/* Preserve the centering transform: general button hover rules caused the jump. */
.app .club-orbit .wheel-slot,.app .club-orbit .wheel-slot:hover,.app .club-orbit .wheel-slot:active{transform:translate(-50%,-50%)!important;box-shadow:none;background:transparent;border:0;animation:none;transition:opacity .25s ease,filter .25s ease}
.club-orbit .orbit-crest{animation:none!important}.app .club-orbit .wheel-arrow,.app .club-orbit .wheel-arrow:hover,.app .club-orbit .wheel-arrow:active{transform:translateY(-50%)!important}
.club-wheel.move-right{animation:nmSlideNext .32s cubic-bezier(.2,.7,.3,1)}.club-wheel.move-left{animation:nmSlidePrevious .32s cubic-bezier(.2,.7,.3,1)}
@keyframes nmSlideNext{from{opacity:.2;translate:26px 0}to{opacity:1;translate:0 0}}@keyframes nmSlidePrevious{from{opacity:.2;translate:-26px 0}to{opacity:1;translate:0 0}}
.match-splash{gap:clamp(14px,2vh,30px);padding:clamp(20px,4vw,48px);background:radial-gradient(ellipse at center,var(--facts),var(--panel) 75%)}
.match-splash .splash-lights{background:linear-gradient(115deg,transparent 45%,#8cf5aa09 45% 46%,transparent 46% 65%,#8cf5aa07 65% 66%,transparent 66%);animation:none}
.match-splash .splash-edition{color:var(--accent);letter-spacing:.2em;font-size:11px}.match-splash .splash-fixture{max-width:740px;width:100%;gap:24px}.match-splash .splash-fixture>div{padding:20px 10px;border:1px solid var(--edge);border-radius:20px;background:var(--panel)}.match-splash .splash-fixture b{font-size:clamp(17px,2.5vw,28px)}.match-splash .splash-vs{font-size:22px;color:var(--muted)}.match-splash .splash-fixture small{color:var(--muted)}.match-splash .splash-warmup{opacity:.8;max-height:64px}.match-splash>small{font-size:10px;color:var(--muted)}
#game{position:relative}#fullscreenPlayerName{position:absolute;left:50%;bottom:3.7%;transform:translateX(-50%);z-index:15;max-width:70%;padding:7px 12px;border-radius:8px;background:#092b25ed;border:1px solid #9bddbd;color:#fff;font-size:clamp(11px,1.3vw,17px);font-weight:700;text-align:center;pointer-events:none;box-shadow:0 3px 10px #0004}#fullscreenPlayerName:empty{display:none}
@media(max-width:650px){.nm-mode-sections .nm-mode{grid-template-columns:1fr;padding:22px;gap:18px}.nm-mode-sections button{width:100%;min-width:0}.career-intro{padding:24px}.career-save{align-items:stretch;flex-direction:column}.career-save .row{justify-content:flex-start}.match-splash .splash-fixture{gap:10px;grid-template-columns:minmax(0,1fr) 26px minmax(0,1fr)}.match-splash .splash-fixture>div{padding:14px 4px}.match-splash .splash-fixture .crest-image{width:65px;height:65px}}
.reduce-motion .club-wheel{animation:none!important}@media(prefers-reduced-motion:reduce){.club-wheel{animation:none!important}}
.nm-online-lobby{max-width:920px;margin:auto;padding:clamp(22px,4vw,40px)}.nm-online-lobby h1{font-size:clamp(28px,4vw,42px);margin:16px 0}.nm-online-lobby p{line-height:1.7}.nm-online-lobby select,.nm-online-lobby input{width:100%;margin:8px 0 18px}.nm-online-lobby .row{flex-wrap:wrap;gap:10px}.nm-online-lobby .field{margin-top:24px}
.online-video,.online-frame{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;background:#06151f}.online-video{opacity:0}.online-video.ready{opacity:1}.online-hud{position:absolute;inset:0;z-index:14;pointer-events:none}.online-score{position:absolute;left:1%;top:1%;background:#0d302aed;border-radius:7px;padding:6px 9px;color:white;min-width:32%;max-width:55%;border-left:3px solid #ffe174}.online-score>span{display:grid;grid-template-columns:19px minmax(0,1fr) 24px;align-items:center;gap:6px;font-size:clamp(9px,1.2vw,14px);padding:2px 0}.online-score .crest-image{width:17px;height:19px;object-fit:contain}.online-score small{grid-column:2/4;color:#a5efae;letter-spacing:3px;line-height:1}.online-score b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.online-score strong{color:#ffe174}.online-round{position:absolute;right:1%;top:1%;padding:10px;background:#0d302aed;border-radius:7px;font-size:clamp(9px,1vw,13px);color:white}.online-phase{position:absolute;right:1%;bottom:7%;max-width:85%;margin:0;background:#0d302af2;color:white;padding:8px 12px;border-left:3px solid #ffe174;border-radius:4px;font-size:clamp(9px,1.2vw,14px)}
#game:has(.online-hud){touch-action:none}#game:has(.online-hud) ruffle-player{width:100%;height:100%}
.match-overlay{background:var(--bg);color:var(--text)}.match-overlay .match-help,.match-overlay .match-meta,.match-overlay .fine{color:var(--muted)}.score-head{color:var(--green)}.match-top .match-tools{gap:8px}.match-tools .danger{color:#ffb3b9}:root[data-theme="light"] .match-tools .danger{color:#9b2438}.nm-story .tag{color:var(--accent)}
.footer-about{padding:0;border:0;background:transparent!important;color:var(--muted);text-decoration:underline;font:inherit;cursor:pointer}
.online-video,.online-frame{object-fit:contain}.online-score{background:#10362c;width:37%;max-width:50%;min-width:0;box-sizing:border-box}.online-round{background:#10362c;min-width:15%;text-align:center;box-sizing:border-box}.online-phase{background:#10362c}
:root[data-theme="light"] body.high-contrast{--bg:#fff;--panel:#fff;--control:#fff;--input:#fff;--facts:#fff;--orbit:#e5f0e8;--text:#000;--muted:#111;--edge:#111;--accent:#105b31;--green:#174a2c;--input-edge:#111;--field-label:#000}
:root[data-theme="dark"] body.high-contrast{--bg:#000;--panel:#000;--control:#000;--input:#000;--facts:#000;--orbit:#09271b;--text:#fff;--muted:#fff;--edge:#fff;--accent:#a4efad;--green:#ffe174;--input-edge:#fff;--field-label:#fff}
body.high-contrast .match-overlay{background:var(--bg)!important;color:var(--text)!important}body.high-contrast :is(.match-help,.result-box,.badge,.score-head){color:var(--text)!important;background:var(--panel);border-color:var(--edge)}body.high-contrast .nm-tutorial{background:var(--panel)!important;color:var(--text)!important;border-color:var(--edge)!important}
/* Consistent surface and text pairs across both themes, including saved accessibility preferences. */
body{color:var(--text)}
:is(.app,.match-overlay) :is(h1,h2,h3,h4,label,.field,.table-title,.picker-side,.picker-facts b,.quick-match-summary,.career-save b,.rules-text,.rule-card){color:var(--text)}
:is(.app,.match-overlay) :is(.muted,.fine,.picker-league,.picker-hint,.picker-ready,.nm-counts span,.nm-progress small,.match-meta,.match-help,.nm-story p,.career-intro p,footer){color:var(--muted)}
:is(.app,.match-overlay) :is(input,select,textarea){background:var(--input);color:var(--text);border-color:var(--input-edge);color-scheme:inherit}
:is(.app,.match-overlay) :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
:is(.app,.match-overlay) :is(.nm-menu .nav,.nm-tutorial,.result-box,.match-card,.coach-header,.tie,.career-fixture,.career-stats div,.kit-choice,.rule-card,.club-picker,.arena-options,.daily-card,.career-intro,.saved-card){background:var(--panel);color:var(--text);border-color:var(--edge)}
:is(.app,.match-overlay) :is(.result-box p,.coach-header p,.career-hero p,.rules-text p,.match-help span){color:var(--muted)}
:is(.app,.match-overlay) :is(.stage-banner,.career-tabs button.active,.stage-tabs button.active){background:var(--active);color:#fff;border-color:var(--edge)}
.stage-banner :is(.tag,.round,h2,p){color:#fff}.stage-banner .round{color:#ffe174}
:is(.app,.match-overlay) a{color:var(--accent)}
:root[data-theme="light"] .badge{background:#dfede5;color:#163d2c;border:1px solid #94b6a2}
:root[data-theme="dark"] .badge{background:#183c32;color:#c9f7d6;border:1px solid #517867}
body.high-contrast :is(.panel,.competition,.saved-card,.nm-online-lobby,.nm-menu .nav,.nm-tutorial,.result-box,.match-card,.coach-header,.tie,.career-fixture,.career-stats div,.champions-grid article,.drawer-title,.kit-choice,.rule-card,.club-picker,.arena-options,.daily-card,.career-intro,.match-overlay,.match-help,dialog){background:var(--panel)!important;color:var(--text)!important;border-color:var(--edge)!important;box-shadow:none!important}
body.high-contrast :is(.app,.match-overlay,dialog) :is(h1,h2,h3,h4,p,small,label,.field,.tag,.muted,.fine,.picker-side,.picker-ready,.picker-facts b,.picker-league,.picker-hint,.score-head,.badge,.splash-edition,.splash-vs,th,td){color:var(--text)!important;text-shadow:none!important}
body.high-contrast :is(input,select,textarea,button,.nav button,.filters button,.wheel-arrow){background:var(--control)!important;color:var(--text)!important;border:1px solid var(--edge)!important;opacity:1}
:root[data-theme="light"] body.high-contrast :is(.primary,.nav button.active,.filters button.active){background:#000!important;color:#fff!important}
:root[data-theme="dark"] body.high-contrast :is(.primary,.nav button.active,.filters button.active){background:#fff!important;color:#000!important}
body.high-contrast button:disabled{opacity:.55}body.high-contrast .brand-home{background:transparent!important;border:0!important}
body.high-contrast :is(.picker-facts,.club-orbit,.team-card){background:var(--facts)!important;border-color:var(--edge)!important}
:root[data-theme="light"] body.high-contrast .stage-banner{background:#fff!important;color:#000!important}:root[data-theme="light"] body.high-contrast .stage-banner *{color:#000!important}
:root[data-theme="dark"] body.high-contrast .stage-banner{background:#000!important;color:#fff!important}:root[data-theme="dark"] body.high-contrast .stage-banner *{color:#fff!important}
/* These labels sit over the green pitch and require a fixed dark surface in every theme. */
body.high-contrast :is(.player-name,#fullscreenPlayerName,.online-score,.online-round,.online-phase){background:#092b25!important;color:#fff!important;border-color:#fff!important}
body.high-contrast :is(.online-score,.online-phase) *{color:#fff!important}
#themeToggle[aria-checked="true"]{background:#174b36;border-color:var(--accent)}#themeToggle[aria-checked="true"]:before{background:#e8fff0}#themeToggle[aria-checked="true"] .theme-moon{color:#174b36}.brand-home:hover img{filter:drop-shadow(0 3px 7px #65e99044)}.online-round{min-width:18%}
