/* ── kk-home.css  ──────────────────────────────────────────────
   Startseite — Spieltag-Design auf DESIGN.md-Tokens migriert.
   Native iOS-Anmutung: Grouped Table (§8.2), Material-Tab-Bar (§8.6),
   Large Title Topbar (§8.7). Token-Quelle: kk-tokens.css.
   ─────────────────────────────────────────────────────────────── */

/* ── Legacy launch-shell (home-zine.css, kk-spieltag.css) ausblenden ── */
#start .launch-shell,
#start .launch-cover,
#start .launch-modes,
#start .launch-mode,
#start .launch-intro,
#start .launch-description,
#start .launch-wordmark,
#start .launch-avatar,
#start .launch-date,
#start .launch-action,
#start .launch-secondary,
#start .launch-detail,
#start .launch-status,
#start .launch-player {
  display: none !important;
}

/* ── HTML + Body: Light-Default; Dark-Mode via html[data-theme="dark"] ── */
html:has(#start.is-active),
body:has(#start.is-active) {
  background: var(--bg) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-text);
  min-height: 100dvh;
  margin: 0;
  padding: 0;
}

/* ── View: volle Höhe + Breite, position:fixed für zuverlässige
      Vermessung auf iOS nach Ansichtswechsel (Kabine -> Start). ── */
#start.is-active {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  inset: 0;
  width: auto !important;
  height: auto;
  background: var(--bg) !important;
  color: var(--text-primary) !important;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
}

/* ── Shell: scrollbarer Bereich über der Tab-Bar ── */
.st-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  width: 100%;
  min-height: 0;
  padding:
    calc(env(safe-area-inset-top, 0px) + var(--s-5))
    var(--gutter-mobile)
    calc(min(env(safe-area-inset-bottom, 0px), 10px) + 49px + var(--s-6));
  box-sizing: border-box;
  overflow-y: auto;
  background: var(--bg);
  color: var(--text-primary);
}

/* ── HEADER: Wordmark + Avatar ── */
.st-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}

.st-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  color: var(--text-primary);
  letter-spacing: 0;
  text-transform: lowercase;
  user-select: none;
}

.st-wm-line1,
.st-wm-line2 { display: block; }

.st-wm-amp { color: var(--accent); }

/* Avatar-Kreis */
.st-avatar {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full) !important;
  background: var(--surface-soft);
  color: var(--text-primary);
  font-family: var(--font-text);
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  user-select: none;
  box-shadow: var(--shadow-1);
}
.st-avatar svg { width: 22px; height: 22px; opacity: .85; }

/* ── DATUM-ZEILE / Large Title (§3, §8.7) ── */
.st-date-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2);
  margin-top: var(--s-2);
}

.st-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 34px;
  line-height: 41px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-transform: none;
  display: block;
  width: auto;
  text-align: left;
  white-space: nowrap;
}

.st-date {
  font-size: var(--t-foot);
  line-height: var(--t-foot-lh);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ── TAGESRÄTSEL-CARD: Editorial Home-Cover, ink-Hintergrund (DESIGN.md §8.3) ── */
.st-daily-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: var(--s-5);
  border-radius: var(--r-lg);
  background: var(--ink);
  color: var(--text-on-dark);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--dur-press) var(--ease-standard),
    filter var(--dur-ui) var(--ease-standard);
  box-shadow: var(--shadow-1);
}
.st-daily-card:active {
  transform: scale(.98);
  filter: brightness(1.05);
}
@media (hover: hover) {
  .st-daily-card:hover { filter: brightness(1.04); }
}

/* Live-Dot + Label */
.st-daily-top {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
}

.st-live-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: var(--accent);
  flex-shrink: 0;
  animation: st-pulse 2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .st-live-dot { animation: none; }
}

@keyframes st-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.st-daily-label {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: var(--t-foot);
  color: rgba(244, 240, 230, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Serie: "3 Tage in Folge" (ab Serie 2) */
.st-streak {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: var(--r-full);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  font-weight: 700;
  font-size: var(--t-cap1);
  white-space: nowrap;
}
.st-streak[hidden], .st-daily-next[hidden] { display: none; }

/* Nach dem Abpfiff: kein Live-Puls, Zeit bis morgen */
.st-daily-card[data-state="done"] .st-live-dot {
  animation: none;
  background: rgba(244, 240, 230, 0.45);
}
.st-daily-next {
  display: block;
  margin: -8px 0 var(--s-3);
  text-align: center;
  font-size: var(--t-foot);
  font-weight: 600;
  color: rgba(244, 240, 230, 0.65);
}

/* Score-Zeile */
.st-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}

.st-score-side {
  font-family: var(--font-text);
  font-weight: 700;
  font-size: var(--t-foot);
  color: rgba(244, 240, 230, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 36px;
}
.st-score-side--right { text-align: right; }

.st-score-board {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 72px;
  line-height: 1;
  color: var(--text-on-dark);
  letter-spacing: -0.02em;
  text-align: center;
  flex: 1;
}

/* Anstoß-Button — Primary-Pill (§8.1) */
.st-anstoss-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-text);
  font-weight: 700;
  font-size: var(--t-headline);
  letter-spacing: -0.005em;
  box-sizing: border-box;
  transition:
    transform var(--dur-press) var(--ease-standard),
    filter var(--dur-ui) var(--ease-standard);
}
.st-daily-card:active .st-anstoss-btn { filter: brightness(.96); }

/* ── WEITERE PARTIEN — iOS Grouped Table (§8.2) ── */
.st-weitere {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-2);
}

.st-weitere-title {
  margin: 0 0 0 var(--s-2);
  font-family: var(--font-text);
  font-weight: 600;
  font-size: var(--t-foot);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.st-partien-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-grouped);
  box-shadow: var(--shadow-1);
}

/* Partie-Zeile (72px mit Icon + Subtitle, §8.2) */
.st-partie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 72px;
  padding: var(--s-3) var(--s-4);
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-press) var(--ease-standard);
  position: relative;
}

/* Hairline-Separator, eingezogen um Icon-Spalte (§8.2) */
.st-partie::after {
  content: "";
  position: absolute;
  left: calc(var(--s-4) + 40px + var(--s-3));
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--separator);
  pointer-events: none;
}
.st-partie:last-child::after { display: none; }

.st-partie:active { background: var(--surface-soft); }
@media (hover: hover) {
  .st-partie:hover { background: var(--surface-soft); }
}

.st-partie-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-primary);
}

.st-partie-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.st-partie-name {
  font-family: var(--font-text);
  font-weight: 600;
  font-size: var(--t-headline);
  color: var(--text-primary);
  line-height: var(--t-headline-lh);
  letter-spacing: -0.005em;
}

.st-partie-sub {
  font-family: var(--font-text);
  font-weight: 400;
  font-size: var(--t-sub);
  color: var(--text-secondary);
  line-height: var(--t-sub-lh);
}

.st-chevron {
  color: var(--text-tertiary);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

/* ── Rejoin Banner ── */
.rejoin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-lg);
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-1);
}
.rejoin[hidden] { display: none !important; }
.rejoin .btn {
  min-height: 44px;
  width: auto;
  border: 0;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-text);
  font-weight: 700;
  font-size: var(--t-sub);
}

/* ── TAB-BAR — Material Blur (§8.6) ──
   Position:fixed statt sticky: nach Ansichtswechsel (Spiel -> Start) bleibt
   die Sticky-Höhe auf iOS zuweilen stehen; fixed hängt am echten Rand. */
.st-tabbar {
  display: flex;
  align-items: stretch;
  width: 100%;
  background: var(--material-regular);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid var(--separator);
  /* Safe-Area-Padding gecapt: auf iPhone-PWA ist env=34px, das macht die Bar unnoetig gross. 10px reicht als visueller Abstand zum Home-Indicator, der Rest wird vom OS-Overlay abgedeckt. */
  padding-bottom: min(env(safe-area-inset-bottom, 0px), 10px);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
}
/* Fallback falls Blur nicht unterstützt wird */
@supports not ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
  .st-tabbar { background: var(--bg-elevated); }
}

.st-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 49px;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: var(--t-foot);
  color: var(--text-secondary);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--dur-ui) var(--ease-standard);
  letter-spacing: 0;
  position: relative;
  isolation: isolate;
}

/* Active-Highlight-Pill in Lime (§8.6) */
.st-tab--active {
  color: var(--accent-ink);
  font-weight: 700;
}
.st-tab--active::before {
  content: "";
  position: absolute;
  top: 6px;
  /* .st-tabbar hat bereits padding-bottom: env(safe-area-inset-bottom); hier KEIN zusaetzliches env, sonst wird die Pill auf iPhone-PWA auf wenige px flachgedrueckt. */
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: min(120px, 70%);
  border-radius: var(--r-full);
  background: var(--accent);
  z-index: -1;
}

@media (hover: hover) {
  .st-tab:hover { color: var(--text-secondary); }
  .st-tab--active:hover { color: var(--text-primary); }
}

/* ── HiDPI Hairline (§8.2) ── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
  .st-partie::after { height: 0.5px; }
}

/* ── Mobile Safe Area ── */
@media (max-width: 479px) {
  .st-score-board { font-size: 60px; }
}

/* ── Gemeinsame Spielsprache: Bühne, Karten, Status und Griffzone ───────
   Diese letzte Ebene bündelt die Rollen für Start, Lobby und Bestwert!. */
:root {
  --kk-result: #FFE4AC;
  --kk-disabled: #33483A;
  --kk-disabled-text: #C1CCBD;
  --kk-focus: #C9FF35;
}

/* Die Startseite bleibt eine ruhige Auftaktfläche: Lime markiert ausschließlich
   den Anstoß, nicht jede dunkle Fläche. */
.st-daily-card,
.st-partie,
.st-tabbar {
  border-color: var(--kk-line) !important;
}
.st-daily-card { background: var(--kk-surface) !important; }
.st-anstoss-btn { background: var(--kk-accent) !important; color: var(--kk-accent-text) !important; }
.st-partie-icon { color: var(--kk-accent) !important; }

/* Eindeutige, gleiche Materialität für Lobby, Runde und Ergebnis. */
.panel.lobby,
.panel.bestwert-intro,
.panel.bestwert-play,
.panel.bestwert-wait,
.panel.bestwert-reveal,
.panel.result.res {
  background: var(--kk-bg) !important;
  color: var(--kk-ink) !important;
}
.panel.lobby .match-top,
.panel.bestwert-intro .match-top,
.panel.bestwert-play .match-top,
.panel.bestwert-wait .match-top,
.panel.bestwert-reveal .match-top,
.panel.result.res .match-top {
  background: var(--kk-surface) !important;
  border-bottom: 1px solid var(--kk-line) !important;
}
.match-top .round-tag {
  background: transparent !important;
  color: var(--kk-dark-muted) !important;
  padding: 0 !important;
  letter-spacing: .04em !important;
}
.match-top .icon-btn,
.panel.bestwert-play .match-top .icon-btn {
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  background: var(--kk-dark-surf) !important;
  color: var(--kk-ink) !important;
}

/* Karten sind die interaktiven Objekte; ihre Kante bleibt auch ohne Glow lesbar. */
.bw-stat-context div,
.bw-compare-card,
.bw-h2h-choice,
.bw-false-card,
.bw-pick-btn,
.bw-rank-row,
.bw-wait-row,
.bw-reveal-row,
.panel.lobby .lobby-row {
  background: var(--kk-surface) !important;
  border: 1px solid var(--kk-line) !important;
  box-shadow: none !important;
}
.bw-pick-btn,
.bw-false-card,
.bw-h2h-choice,
.bw-hl-choice { min-height: 52px; }
.bw-pick-btn.is-on {
  background: var(--kk-accent) !important;
  border-color: var(--kk-accent) !important;
  color: var(--kk-accent-text) !important;
}
.bw-pick-btn.is-on::before { content: '✓ '; font-weight: 800; }
.bw-hl-choice,
.bw-rank-arrows button {
  background: var(--kk-surface) !important;
  border-color: var(--kk-line) !important;
  color: var(--kk-ink) !important;
}
.bw-hl-choice:active,
.bw-false-card:active,
.bw-h2h-choice:active { background: color-mix(in srgb, var(--kk-accent) 16%, var(--kk-surface)) !important; }

/* Kopf an Kopf: Namen und die verdeckte Wertseite führen die Entscheidung. */
.bw-head-to-head { gap: 12px; }
.bw-h2h-cards { gap: 12px; grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr); }
.bw-h2h-choice {
  min-height: 172px;
  padding: 16px 12px;
  border-radius: 18px;
}
.bw-h2h-choice span { color: var(--kk-muted); }
.bw-h2h-choice b { font-size: clamp(1.25rem, 6vw, 1.65rem); line-height: 1; overflow-wrap: anywhere; }
.bw-h2h-choice strong { color: var(--kk-result); font-size: 42px; }
.bw-compare-versus { width: 38px; height: 38px; border-color: var(--kk-result); color: var(--kk-result); }

/* Normalzeit ist ein HUD, erst die Schlussphase erhält einen klaren Auftritt. */
.panel.bestwert-play .bw-countdown {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  max-width: none;
  margin: 12px 0 4px;
  text-align: left;
}
.panel.bestwert-play .bw-countdown .cd {
  color: var(--kk-dark-muted);
  font: 700 14px/1 var(--kk-body) !important;
  letter-spacing: 0;
  white-space: nowrap;
}
.panel.bestwert-play .bw-countdown .bar { width: auto; max-width: none; margin: 0; background: var(--kk-dark-surf) !important; }
.panel.bestwert-play .bw-countdown:has(.cd.is-low) { grid-template-columns: 1fr; gap: 7px; text-align: center; margin-block: 14px 6px; }
.panel.bestwert-play .bw-countdown .cd.is-low { color: var(--kk-miss) !important; font: 800 32px/.95 var(--kk-display) !important; }
.panel.bestwert-play .bw-countdown .bar i.is-low { background: var(--kk-miss) !important; }
.panel.bestwert-play .bw-prompt { font-size: clamp(1.42rem, 6.2vw, 2rem); line-height: 1.08; }
.panel.bestwert-play .bw-answer { margin-top: 16px; }
.bw-explainer { color: var(--kk-muted) !important; font-size: 13px !important; }

/* Primäre Aktionen, Kontrast und deaktivierte Zustände bleiben erkennbar. */
.btn-primary,
.bw-action-zone .bw-submit,
.panel.lobby .sticky-cta .btn-primary {
  background: var(--kk-accent) !important;
  color: var(--kk-accent-text) !important;
  border-color: var(--kk-accent) !important;
  box-shadow: none !important;
}
.btn-primary:disabled,
.bw-action-zone .bw-submit:disabled,
.panel.lobby .sticky-cta .btn-primary:disabled {
  opacity: 1 !important;
  background: var(--kk-disabled) !important;
  border-color: var(--kk-disabled) !important;
  color: var(--kk-disabled-text) !important;
}

/* Warteraum: Fortschritt ist das Zentrum; Reaktionen bleiben eine leise Griffzonen-Leiste. */
.panel.bestwert-wait { min-height: 100dvh; display: flex; flex-direction: column; }
.bw-wait-head { text-align: left; padding: clamp(18px, 6vh, 52px) 0 20px; }
.bw-wait-head h2 { color: var(--kk-result); font-size: clamp(2rem, 9vw, 3rem); line-height: .92; }
.bw-wait-row { min-height: 54px; }
.bw-wait-row.is-me { border-color: var(--kk-accent) !important; }
.bw-wait-row.is-done .bw-wait-progress { color: var(--kk-accent); }
.panel.bestwert-wait .react-bar {
  margin-top: auto;
  padding: 18px 0 calc(env(safe-area-inset-bottom, 0px) + 8px);
  border-top: 1px solid var(--kk-line);
  justify-content: space-between;
}
.panel.bestwert-wait .react-btn {
  width: 44px; height: 44px; min-height: 44px;
  padding: 0; border: 1px solid var(--kk-line); border-radius: 50%;
  background: var(--kk-surface); font-size: 18px; opacity: .72;
}

/* Ergebnis: Creme zeichnet den Anlass aus, Lime bleibt eine Aktion statt einer Trophäenfarbe. */
.panel.result.res { background: var(--kk-bg) !important; }
.panel.result.res .res-score-num,
.panel.result.res .res-verdict--win,
.panel.result.res .res-row.is-first .res-row-rank { color: var(--kk-result) !important; }
.panel.result.res .res-pill { background: var(--kk-dark-surf) !important; color: var(--kk-ink) !important; }
.panel.result.res .res-rank .res-row,
.panel.result.res .res-row { background: var(--kk-surface) !important; border-color: var(--kk-line) !important; }
.panel.result.res .res-row.is-me { border-color: var(--kk-accent) !important; }
.panel.result.res .sticky-cta { background: var(--kk-bg) !important; border-top: 1px solid var(--kk-line); }
.panel.result.res .react-btn {
  flex: 0 0 44px !important;
  width: 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  border-color: var(--kk-line) !important;
  background: var(--kk-surface) !important;
}
.panel.result.res .match-top .icon-btn { width: 44px !important; height: 44px !important; min-height: 44px !important; background: var(--kk-dark-surf) !important; color: var(--kk-ink) !important; }
.panel.result.res .btn-link { min-height: 44px; }
.panel.result.res .res-row-name b { overflow-wrap: break-word; word-break: normal; hyphens: auto; }

/* Ein sichtbarer Fokus gilt für alle echten Steuerflächen, auch im dunklen Header. */
:is(button, a, input, summary):focus-visible {
  outline: 3px solid var(--kk-focus) !important;
  outline-offset: 3px !important;
}
@media (min-width: 390px) {
  .panel.bestwert-play .bw-answer { margin-top: 22px; }
  .bw-h2h-choice { min-height: 198px; }
}
@media (prefers-reduced-motion: reduce) {
  .panel.bestwert-play *, .panel.bestwert-wait *, .panel.result.res * { animation: none !important; transition: none !important; }
}
@media (max-width: 899px) {
  html:has(body.in-playing),
  body.in-playing,
  body.in-playing .play-view,
  body:has(.panel.result.res) .play-view {
    background: var(--kk-bg) !important;
  }
  /* Der allgemeine Runden-Wrapper setzt lokale Navy-Variablen. Für Bestwert!
     werden sie explizit in die gemeinsame Markenwelt zurückgeführt. */
  body.in-playing .match:has(.bestwert-play),
  body.in-playing .match:has(.bestwert-wait),
  body.in-playing .match:has(.bestwert-reveal) {
    --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-miss: #FF5B24;
    --kk-line: #46604E;
  }
  body.in-playing .match:has(.bestwert-play) .match-top,
  body.in-playing .match:has(.bestwert-wait) .match-top,
  body.in-playing .match:has(.bestwert-reveal) .match-top {
    background: var(--kk-surface) !important;
    border-bottom: 1px solid var(--kk-line) !important;
  }
  body.in-playing .match:has(.bestwert-play) .match-top .round-tag,
  body.in-playing .match:has(.bestwert-wait) .match-top .round-tag,
  body.in-playing .match:has(.bestwert-reveal) .match-top .round-tag {
    color: var(--kk-dark-muted) !important;
  }
  body.in-playing .match:has(.bestwert-play) .match-top .icon-btn,
  body.in-playing .match:has(.bestwert-wait) .match-top .icon-btn,
  body.in-playing .match:has(.bestwert-reveal) .match-top .icon-btn {
    width: 44px !important; height: 44px !important; min-height: 44px !important;
    background: var(--kk-dark-surf) !important; color: var(--kk-ink) !important;
  }
}
html:has(.panel.result.res),
body:has(.panel.result.res) { background: var(--kk-bg) !important; }

/* §44 in kk-spieltag.css weist dem Stage-Container nochmals die frühere
   Navy-Palette zu. Bestwert! und sein Endstand erhalten hier dieselben Tokens
   wie Start und Lobby, ohne andere Spielmodi anzutasten. */
body.in-match #game-stage#game-stage[data-phase="bestwert_playing"],
body.in-match #game-stage#game-stage[data-phase="bestwert_revealing"],
body.in-match #game-stage#game-stage[data-phase="bestwert_intro"],
body.in-match #game-stage#game-stage[data-phase="result"]:has(.panel.result.res) {
  --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);
  --paper-2: var(--kk-paper-2);
  --surface: var(--kk-surface);
  --ink: var(--kk-ink);
  --ink-muted: var(--kk-muted);
  --muted: var(--kk-muted);
  --line: var(--kk-line);
  --good: var(--kk-accent);
}
