/* Token overrides, loaded after the arena and member styles. No fonts or remote assets. */
html[data-theme]{font-family:system-ui,-apple-system,"Segoe UI","Noto Sans TC","Noto Sans SC","Noto Sans JP","Noto Sans KR",sans-serif;background:var(--bg);color:var(--text);}
html[data-theme] body{color:var(--text);background:transparent;isolation:isolate;}
html[data-theme] body::before{content:"";position:fixed;inset:0;z-index:-2;pointer-events:none;background:var(--bg);}
html[data-background="aurora"] body::before{background:radial-gradient(ellipse at 18% 0%,color-mix(in srgb,var(--cyan) 17%,transparent),transparent 53%),radial-gradient(ellipse at 90% 80%,color-mix(in srgb,var(--purple) 17%,transparent),transparent 55%),var(--bg);}
html[data-background="dusk"] body::before{background:radial-gradient(ellipse at 20% 14%,#ba5c782d,transparent 65%),radial-gradient(ellipse at 100% 85%,#5269ce2d,transparent 65%),var(--bg);}
html[data-background="snowfield"] body::before{background:radial-gradient(circle at 20% 24%,color-mix(in srgb,var(--text) 15%,transparent) 1px,transparent 2px) 0 0/67px 73px,radial-gradient(ellipse at 70% 0%,color-mix(in srgb,var(--cyan) 14%,transparent),transparent 60%),var(--bg);}
html[data-background="ocean"] body::before{background:radial-gradient(ellipse at 50% -10%,#3dcecb26,transparent 57%),linear-gradient(160deg,transparent 35%,#1a5b9d1f 66%,transparent),var(--bg);}
html[data-custom-background="true"] body::before{background-image:linear-gradient(color-mix(in srgb,var(--bg) 82%,transparent),color-mix(in srgb,var(--bg) 82%,transparent)),var(--custom-background-image);background-size:cover;background-position:center;}
html[data-theme] :is(.arena-card,.opponent-card,.pressure-card,.handling-card,.mission-card,.party-panel,.keyboard-guide,.hold-guide,.modal,.info-dialog,.member-dialog,.srg-panel,.platform-card){background:var(--panel);border-color:var(--line);color:var(--text);}
html[data-theme] :is(.topbar,.arena-header,.arena-metrics,.arena-caption,.mode-tabs,.opponent-rail>.left-rail,.keyboard-finish,.keyboard-preset-section,.audio-credit,.cpu-party-status){border-color:var(--line);}
html[data-theme] :is(.mode-tabs,.keyboard-presets button,.presets button,.view-button,.hold-button,.item-button,.touch-controls button,.key-bindings button,select,input[type="text"],input[type="email"],input[type="password"],input[type="search"],.secondary-button,.sidebar-toggle,.blueprint-button,.pause-button){background:var(--panel-alt);border-color:var(--line);color:var(--text);}
html[data-theme] :is(.mode-tab.active,.view-button[aria-pressed="true"],.keyboard-presets button.selected,.presets button.selected){background:color-mix(in srgb,var(--lime) 13%,var(--panel));border-color:var(--lime);color:var(--lime);}
html[data-theme] :is(.primary-button,.hold-guide-steps>span.current){background:var(--lime);border-color:var(--lime);color:var(--on-accent);}
html[data-theme] :is(.primary-button span,.primary-button small){color:var(--on-accent);}
html[data-theme] :is(.brand-light,.keyboard-guide-heading strong,.keyboard-presets strong,.hold-guide p,.party-energy strong,.party-energy span,.item-button strong,.audio-feedback,.modal h2,.modal h3,.board-overlay h2){color:var(--text);}
html[data-theme] :is(.mode-info>p,.match-rules,.mission-card p,.keyboard-hand>span,.keyboard-finish>span,.key-tile small,.keyboard-finish small,.keyboard-presets small,.keyboard-preset-section>p,#keyboardAliases,.handling-card p,.slider-row p,.modal-intro,.storage-note,.help-item p,.help-note,.vision-step p,.audio-credit,.item-button small,.item-notice,.party-energy small,.cpu-note,.cpu-party-status,.thumb-label,.touch-finish>span,.touch-controls button>small,.hold-guide>small,.board-overlay>p:not(.eyebrow),.overlay-hint){color:var(--muted);}
html[data-theme] :is(.rail-label,.rail-detail,.hold-button>strong,.hold-empty,.hold-state,.mission-progress,.keyboard-guide-heading button,.text-button,.hold-discovery>button,.audio-credit a,.keyboard-preset-heading>span){color:var(--lime);}
html[data-theme] :is(.key-tile kbd,.keyboard-finish>kbd,kbd,.item-button kbd){background:var(--panel-alt);border-color:var(--line);color:var(--text);}
html[data-theme] :is(.board-shell,.cpu-board-wrap){background:var(--board-bg);border-color:var(--line);}
html[data-theme] .board-overlay{background:color-mix(in srgb,var(--panel) 95%,transparent);}
html[data-theme] .board-overlay .overlay-mark{color:var(--lime);}
html[data-theme] .arena-card:fullscreen{background:var(--bg);}
html[data-theme] input[type="range"],html[data-theme] input[type="checkbox"]{accent-color:var(--lime);}
html[data-theme] .party-energy progress::-webkit-progress-bar{background:var(--panel-alt);}
html[data-theme] .party-energy progress::-webkit-progress-value{background:var(--purple);}
html[data-theme] .party-energy progress::-moz-progress-bar{background:var(--purple);}
html[data-theme] .item-icon{color:var(--purple);}
html[data-theme] :is(button,a,select,input,canvas,summary):focus-visible{outline-color:var(--lime);}
/* Legacy game labels used pale colors intended for the original dark arena.
   Bind those descendants and their interaction states to the light surface;
   the CPU board remains dark and therefore keeps its own light text pair. */
html:is([data-theme="snow"],[data-theme="sakura"]) :is(
  .opponent-stats b,.pressure-number,.handling-values strong,
  .hold-guide-top strong,.opponent-header h3
){color:var(--text);}
html:is([data-theme="snow"],[data-theme="sakura"]) :is(
  .opponent-stats,.pressure-heading .mini-label,.pressure-number small,
  .pressure-card>p,.exchange-text,.player-id small,.match-clock>span,
  .side-metric>span,.arena-metrics span,.handling-values span,
  .section-index,.blueprint-button small,.hold-discovery,
  .controls-footer,.touch-finish>span>b
){color:var(--muted);}
html:is([data-theme="snow"],[data-theme="sakura"]) :is(
  .board-overlay .eyebrow,.overlay-secondary,.handling-heading button,
  .controls-footer>button
){color:var(--lime);}
html:is([data-theme="snow"],[data-theme="sakura"]) :is(
  .side-metric.b2b>strong,.mission-progress strong,.mission-card .mini-label
){color:var(--purple);}
html:is([data-theme="snow"],[data-theme="sakura"]) .opponent-header #opponentName{
  background:none;color:var(--text);font:inherit;letter-spacing:inherit;
  padding:0;margin:0;border-radius:0;
}
html:is([data-theme="snow"],[data-theme="sakura"]) .opponent-header #opponentBadge{
  background:var(--panel-alt);color:var(--lime);
}
html:is([data-theme="snow"],[data-theme="sakura"]) .cpu-idle{
  background:color-mix(in srgb,var(--board-bg) 88%,transparent);color:#eff6f4;
}
html:is([data-theme="snow"],[data-theme="sakura"]) .board-overlay{background:var(--panel);}
html:is([data-theme="snow"],[data-theme="sakura"]) .arena-caption{
  background:var(--panel-alt);color:var(--muted);
}
html:is([data-theme="snow"],[data-theme="sakura"]) :is(.avatar,.hold-guide-top button){
  background:var(--panel-alt);border-color:var(--lime);color:var(--lime);
}
html:is([data-theme="snow"],[data-theme="sakura"]) :is(
  .arena-metrics>div,.exchange-text,.overlay-secondary,.hold-discovery,
  .mission-progress,.touch-finish,.controls-footer
){border-color:var(--line);}
html:is([data-theme="snow"],[data-theme="sakura"]) :is(.pressure-track,.incoming-vertical){background:var(--line);}
html:is([data-theme="snow"],[data-theme="sakura"]) .caption-dot{background:var(--lime);}
html:is([data-theme="snow"],[data-theme="sakura"]) .pressure-card.danger{border-color:var(--red);}
html:is([data-theme="snow"],[data-theme="sakura"]) .pressure-card.danger .pressure-number{color:var(--red);}
html:is([data-theme="snow"],[data-theme="sakura"]) :is(
  .hold-button:hover:not(:disabled),.hold-button.pressed,
  .touch-controls button:active,.touch-controls button.pressed,
  .item-button:hover:not(:disabled)
){background:color-mix(in srgb,var(--lime) 12%,var(--panel));border-color:var(--lime);color:var(--text);}
html:is([data-theme="snow"],[data-theme="sakura"]) :is(
  .hold-button:disabled,.touch-controls button:disabled,.item-button:disabled
){background:var(--panel-alt);border-color:var(--line);border-style:dashed;opacity:1;}
html:is([data-theme="snow"],[data-theme="sakura"]) .hold-button:disabled :is(.rail-label,.hold-empty,strong){color:var(--muted);}
html:is([data-theme="snow"],[data-theme="sakura"]) .hold-button.cooldown+.hold-state{color:var(--muted);}
html:is([data-theme="snow"],[data-theme="sakura"]) .hold-guide-steps>span:not(.current){background:var(--panel-alt);color:var(--muted);}
html:is([data-theme="snow"],[data-theme="sakura"]) .hold-guide-steps>span.complete{color:var(--lime);}
html[lang="en"] .mode-tab{font-size:10px;padding-inline:9px;}
html[lang="en"] .hold-button>strong{font-size:10px;}
html[lang="ja"] :is(.mode-tab,.hold-button>strong){letter-spacing:0;}
html[lang="ko"] :is(.modal p,.mode-info p,.item-notice){word-break:keep-all;overflow-wrap:anywhere;}
@media(max-width:760px){html[lang="en"] .mode-tab{font-size:9px;padding-inline:2px;white-space:normal;min-height:34px;line-height:1.3;}html[lang="en"] .mode-tab .tab-symbol{display:none;}html[lang="en"] .hold-button>strong{font-size:8px;}html[lang="en"] .item-button strong{font-size:8px;}html[lang="en"] .item-button small{font-size:7px;}html[lang="ja"] .mode-tab{font-size:9px;}}
@media(prefers-reduced-motion:reduce){html[data-theme] *,html[data-theme] *::before,html[data-theme] *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important;}}
