/* Shared game presentation: a single brand, a single decision clock, quiet handoffs. */
:root { --kk-press: 120ms; --kk-enter: 180ms; --kk-ease: cubic-bezier(.2,.7,.2,1); }
.skip-link { background:var(--kk-accent) !important; color:var(--kk-accent-text) !important; }
/* .st-tabbar steht nur in index.html (Home). Der frühere Shared-Override hat die Home-Tab-Bar auf dunkles --kk-surface gezwungen und damit das inaktive Tab-Label unsichtbar gemacht. Entfernt — kk-home.css setzt das Material-Blur selbst. */
.kk-intro-rules b { color:var(--kk-accent) !important; }
/* Older mode-specific layers redefine these tokens locally. Reset the same roles
   at their scope instead of changing semantic correct/incorrect chip colours. */
body #game-stage#game-stage, body #game-stage#game-stage .match,
body #game-stage#game-stage .panel, body .kk-night {
  --kk-bg:#101D16; --kk-ink:#F4F0E6; --kk-muted:#B8C5B4;
  --kk-surface:#1B2D23; --kk-dark:#1B2D23; --kk-dark-surf:#294235;
  --kk-dark-muted:#C5D0C1; --kk-accent:#C9FF35; --kk-accent-text:#101D16;
  --kk-amp:#FFE4AC; --kk-miss:#FF5B24; --kk-line:#46604E;
  --kk-paper:#101D16; --kk-paper-2:#14251C; --kk-field:#17291F;
  --paper:var(--kk-bg); --ink:var(--kk-ink); --muted:var(--kk-muted);
  --surface:var(--kk-surface); --line:var(--kk-line);
}
html:has(.kk-night), body.kk-subpage:has(.kk-night), body.tr-body:has(.kk-night),
body.in-match, body.in-match .play-view, body.in-playing .play-view,
body:has(.panel.jahrgang.jg) .play-view, body:has(.panel.result.res) .play-view {
  background:var(--kk-bg) !important;
}
body.in-match #game-stage#game-stage :is(.panel,.match,.jg-body,.career-intro,.career-path),
body .kk-full { background:var(--kk-bg) !important; color:var(--kk-ink); }
body.in-match #game-stage#game-stage :is(.match-top,.jg-sheet,.jg-next,.jg-row,.darts-category-banner,
  .darts-pod,.darts-result-zone,.gc-row,.guess-turn-state,.career-turn-state),
body .kk-sp-avatar { background:var(--kk-surface) !important; color:var(--kk-ink) !important; }
body #game-stage :is(.jg-chip,.jg-step,.career-station,.field,.bw-stat-context > div),
body .kk-blitz-btn { background:var(--kk-dark-surf); color:var(--kk-ink); }
body #game-stage :is(.jg-question,.career-intro h2,.gc-row-name) { color:var(--kk-ink); }
body #game-stage :is(.jg-count,.jg-kicker,.jg-hint,.career-intro p,.gc-row-who,.jg-row-name small) { color:var(--kk-muted); }
body #game-stage :is(.guess-input,.career-guess-input) { background:var(--kk-surface) !important; border-color:var(--kk-line); }
body #game-stage :is(.field,input[type="text"]) { background:var(--kk-field) !important; color:var(--kk-ink) !important; }
body #game-stage :is(.jg-slider,.jg-stepper input) { accent-color:var(--kk-accent); }

/* Consistent clock typography. Only decision clocks change urgency. */
#game-stage .flow-clock { display:flex; align-items:center; gap:10px; margin:8px 0; min-height:28px; }
#game-stage .flow-clock .cd { flex:none; font:700 16px/1.25 var(--kk-body) !important; font-variant-numeric:tabular-nums; color:var(--kk-muted); letter-spacing:0; animation:none !important; }
#game-stage .flow-clock .cd.is-low { color:var(--kk-miss); }
#game-stage .flow-clock .bar { flex:1; height:4px !important; margin:0 !important; max-width:none; background:var(--kk-dark-surf); }
#game-stage .flow-clock .bar i { background:var(--kk-accent); transition:none; }
#game-stage .flow-clock .bar i.is-low { background:var(--kk-miss); }
#game-stage .flow-clock[hidden], #game-stage [hidden] { display:none !important; }
#game-stage .bestwert-play[data-submit-state="success"] .flow-clock { display:none; }
#game-stage .flow-wait { margin:12px 0; padding:10px 12px; border-radius:10px; background:var(--kk-surface); color:var(--kk-muted); font:500 14px/1.4 var(--kk-body); text-align:center; }
#game-stage .flow-wait::before { content:'→'; margin-right:8px; color:var(--kk-accent); }
#game-stage .flow-help { margin:8px 0; color:var(--kk-muted); font:400 14px/1.45 var(--kk-body); min-width:0; }
#game-stage .flow-help > summary { display:flex; align-items:center; min-height:44px; cursor:pointer; font-weight:600; list-style:none; gap:8px; }
#game-stage .flow-help > summary::before { content:'+'; font-size:20px; color:var(--kk-accent); }
#game-stage .flow-help[open] > summary::before { content:'−'; }
#game-stage .flow-help > :not(summary) { margin:6px 0 10px; }
#game-stage .flow-help > summary:focus-visible { outline:2px solid var(--kk-accent); outline-offset:2px; }
#game-stage .flow-context .bw-stat-context { margin:0; }
#game-stage .flow-context > summary { font-size:13px; min-height:36px; }
#game-stage .flow-history { margin-top:8px; }
#game-stage .flow-history .gc-row { margin-top:10px; }
#game-stage .career-intro { padding-block:10px; }
#game-stage .career-intro h2 { font:800 clamp(22px,6vw,28px)/1.12 var(--kk-display); margin:4px 0 8px; }
#game-stage .bw-pair-status { display:none; } /* Slot labels and n/2 already communicate this. */
/* One scroll owner for slots and candidates; a hidden status must not leave
   an implicit grid row or a second, nested scrolling region. */
#game-stage .panel.bestwert-play:has(.bw-action-zone) .bw-answer[data-bw-type="kombi"] {
  display:block;
}
#game-stage .bw-answer[data-bw-type="kombi"] > .bw-pick-grid { overflow:visible; max-height:none; }
.kk-halftime-score-feedback { outline:2px solid var(--kk-accent); outline-offset:4px; border-radius:8px; }
#game-stage .bestwert-play > .flow-instructions { margin:0 16px; }
#game-stage .bestwert-play > .flow-instructions > summary { min-height:36px; }
body.in-match #game-stage#game-stage :is(.tcard,.dcard,.jg-chip,.jg-step,.score-list > li) {
  background:var(--kk-surface); color:var(--kk-ink); border-color:var(--kk-line);
}
body.in-playing #game-stage#game-stage .match { background:var(--kk-bg) !important; }
body.in-match #game-stage#game-stage .gc-chip.is-arrow { background:var(--kk-dark-surf); }
body.in-match #game-stage#game-stage .gc-chip.is-arrow :is(.gc-chip-lbl,.gc-chip-val) { color:var(--kk-ink); }
body.in-match #game-stage#game-stage .guess-reveal-card { background:var(--kk-surface); color:var(--kk-ink); border:1px solid var(--kk-line); }
body.in-match #game-stage#game-stage .guess-reveal-card :is(.kicker,.guess-target-attrs,.gta-label,.gta-value) { color:var(--kk-muted); }
body.in-match #game-stage#game-stage .guess-reveal-card .guess-target-attrs * { color:var(--kk-ink); }
body.in-match #game-stage#game-stage .guess-reveal-name { color:var(--kk-accent); }
body.in-match #game-stage#game-stage .career-turn-state { flex-shrink:0; }
#game-stage .match-top .flow-clock { display:flex !important; flex:0 0 auto; min-width:42px; margin:0; }
#game-stage .match-top .flow-clock .bar { display:none; }
#game-stage .match-top .flow-clock .cd { font-size:14px !important; }
body.in-match #game-stage#game-stage .dcard { background:var(--kk-surface) !important; color:var(--kk-ink) !important; }
/* Legacy selectors use mode classes in addition to the stage id. */
body.in-match #game-stage#game-stage#game-stage :is(.match-top,.darts-cat-header,.darts-action,.darts-log-drawer,.jg-bar,.jg-next,.score-list > li) {
  background:var(--kk-surface) !important; color:var(--kk-ink);
}
body.in-match #game-stage#game-stage#game-stage #darts-search {
  background:var(--kk-field) !important; color:var(--kk-ink) !important; border-color:var(--kk-line);
}
body.in-match #game-stage#game-stage#game-stage .match-top .icon-btn { background:var(--kk-dark-surf) !important; color:var(--kk-ink) !important; }
#game-stage .match .rail.is-starting .deck { filter:none; }
#game-stage .panel.jahrgang.jg .jg-step { min-width:44px; min-height:44px; font-size:24px; }
#game-stage :is(.bw-field-label,.jg-kicker,.jg-label) { text-transform:none; letter-spacing:0; }
#game-stage .match .pchip-fill { display:none; } /* Time is already in the turn status. */
#game-stage .match .pchip-time { display:none; }
#game-stage .kickoff, #game-stage .kickoff--go { display:none; }
#game-stage .match .rail.is-starting { filter:none; }
#game-stage .match:has(.rail.is-starting) :is(.board,.timeline-wrap) { filter:none; }
#game-stage .jg-body { padding-block:12px; }
#game-stage .jg-question { font-size:clamp(20px,5.7vw,26px); line-height:1.2; }
#game-stage .jg-sheet { border-radius:18px 18px 0 0; }
#game-stage .jg-year { font-size:clamp(58px,19vw,90px); }
#game-stage .jg-range { font-size:13px; }
#game-stage .match-top .icon-btn { min-width:44px; min-height:44px; height:44px; }
#game-stage :is(.anim-in,.bw-flash,.reveal) { animation-duration:var(--kk-enter) !important; animation-delay:0s !important; }
#game-stage :is(.guess-turn-dot,.career-turn-dot,.darts-pod.is-active,.pchip.is-active) { animation:none !important; }
.kk-full :is(.kk-in,.kk-q,.kk-d0,.kk-d1,.kk-d2,.kk-d3) { animation-duration:var(--kk-enter); animation-delay:0ms; }
.kk-full .kk-timer-badge { min-width:54px; font:700 16px/1.2 var(--kk-body); font-variant-numeric:tabular-nums; letter-spacing:0; }
.kk-full .kk-timer-badge--danger { color:var(--kk-miss); animation:none; }
.kk-full .kk-timer-bar-fill.kk-timer-bar--danger { background:var(--kk-miss); animation:none; }
.kk-full :is(.kk-abpfiff-next,.kk-abpfiff-hint,.kk-abpfiff-detail-title) { color:var(--kk-muted); }
:is(button,.btn,.kk-blitz-btn,.dcard):active:not(:disabled) { transform:scale(.985); transition:transform var(--kk-press) var(--kk-ease); }
@media(max-width:345px) {
  #game-stage .flow-clock { margin:4px 0; }
  #game-stage .flow-context > summary { font-size:12px; }
  #game-stage .career-intro { padding-block:6px; }
  #game-stage .jg-body { padding:10px 16px; }
  #game-stage .jg-sheet { padding-top:12px; }
}
@media(max-width:260px) {
  body.in-match #game-stage#game-stage .panel.jahrgang.jg { position:relative !important; height:auto !important; max-height:none; min-height:100dvh; overflow:visible !important; }
  #game-stage .panel.jahrgang.jg :is(.jg-body,.jg-sheet) { flex:none; height:auto; max-height:none; overflow:visible; }
  #game-stage .panel.jahrgang.jg .jg-question { font-size:16px; line-height:1.35; white-space:normal; overflow-wrap:anywhere; overflow:visible; }
  #game-stage .panel.jahrgang.jg .jg-stepper { display:grid; grid-template-columns:44px minmax(0,1fr) 44px; gap:4px; }
  #game-stage .panel.jahrgang.jg .jg-sheet { position:static; padding:12px 8px; }
  #game-stage .panel.jahrgang.jg .jg-year { font-size:56px; }
  #game-stage .panel.jahrgang.jg .jg-range { display:flex; justify-content:space-between; gap:8px; }
  body:has(.panel.jahrgang.jg) { overflow:auto !important; }
}
/* Geteilte Reveal-Bereitschaft: Auflösung + Punkte bleiben der visuelle Schwerpunkt.
   Die Aktion sitzt unterhalb ohne Abdunklung und ohne großen Countdown. */
#game-stage .ready-cta { display:flex; flex-direction:column; gap:8px; align-items:stretch; padding:10px 14px calc(12px + env(safe-area-inset-bottom,0)); background:var(--kk-bg); border-top:1px solid var(--kk-line); }
#game-stage .ready-cta .btn-primary { min-height:48px; font-weight:700; }
#game-stage .ready-cta .btn-primary[aria-pressed="true"] { background:var(--kk-dark-surf); color:var(--kk-ink); border:1px solid var(--kk-line); opacity:1; }
#game-stage .ready-cta .ready-wait { font:600 13px/1.25 var(--kk-body); color:var(--kk-muted); text-align:center; }
#game-stage .ready-cta .countdown { opacity:.72; font-size:12px; }
#game-stage .ready-cta .countdown .bar { height:3px; }
@media(prefers-reduced-motion:reduce) {
  #game-stage *, .kk-full * { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
  :is(button,.btn,.kk-blitz-btn,.dcard):active:not(:disabled) { transform:none; }
  /* Zustände müssen auch ohne Animation sofort verständlich sein:
     der "Bereit"-Status trägt eigenes Icon + Textwechsel + aria-pressed. */
  #game-stage .ready-cta .countdown .bar i { transition:none !important; }
}
