/* Visual polish: existing brand tokens, scoped overrides for the buildless UI.
   Keep interactive boundaries; remove competing decorative boundaries. */
body .btn, body .icon-btn, body .seg, body .mode-btn, body .field,
body .blitz-option, body .schaetz-step, body .home-solo-card {
  transition: transform var(--motion-press) var(--ease-game), background-color var(--motion-ui), border-color var(--motion-ui), box-shadow var(--motion-ui), opacity var(--motion-ui);
}
body .btn { min-height: 50px; border-width: 1px; border-radius: 12px; }
body .btn-primary { box-shadow: 0 3px 0 var(--ink); }
body .btn-secondary, body .btn-ghost { box-shadow: none; border-color: var(--line); }
body .btn-primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
body .btn:disabled { opacity: .48; transform: none; box-shadow: none; }
body .btn:has(.spinner):disabled { opacity: .85; }
body .field { min-height: 50px; border-width: 1px; border-color: color-mix(in srgb, var(--ink) 32%, transparent); border-radius: 12px; font-size: 16px; }
body .field:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px color-mix(in srgb, var(--lime) 65%, transparent); }
body .icon-btn { border-color: var(--line-soft); box-shadow: none; }
body.tr-body .topbar { flex-shrink: 0; }
body .btn-link, body .btn-hint { min-height: 44px; }
body .btn-hint { border: 0; background: transparent; box-shadow: none; color: var(--ink-muted); padding: 0 8px; }
body .btn-hint:active, body .icon-btn:active { transform: scale(.94); }
body .btn:focus-visible, body .icon-btn:focus-visible, body .blitz-option:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 5px var(--lime); }
body .cd, body .gmh-score, body .pchip-score, body .darts-score-num { font-variant-numeric: tabular-nums; }
body .cd.is-low { color: var(--bad); font-weight: 800; }

/* Selection and surrounding chrome: one surface per purpose. */
body .hero { padding-top: 20px; }
body .home-solo-card { min-width: 0; border: 0; border-radius: 14px; box-shadow: none; background: color-mix(in srgb, var(--surface) 65%, var(--paper-2)); }
body .home-solo-card b { overflow-wrap: anywhere; }
body .home-bots { gap: 8px; }
body .home-daily { border-width: 1px; box-shadow: 0 3px 0 var(--ink); }
body .start-card { border: 0; box-shadow: 0 8px 28px color-mix(in srgb, var(--ink) 7%, transparent); padding: 20px; }
body .bots-config { border: 0; background: var(--paper); }
body .lobby-row, body .score-row, body .series li { border: 0; border-bottom: 1px solid var(--line-soft); border-radius: 0; box-shadow: none; background: transparent; }
body .lobby-row.is-empty { border: 1px dashed var(--line); border-radius: 12px; }
body .lobby-row { display: grid; grid-template-columns: 32px minmax(0,1fr) auto auto; gap: 8px; padding: 10px 6px; min-width: 0; }
body .lobby-row .pchip-icon { width: 32px; height: 32px; }
body .lobby-name { min-width: 0; font-size: 14px; }
body .lobby-row em { font-size: 10px; padding: 3px 6px; }
body .lobby-row .icon-btn { flex: none; }
body .rules { border: 0; border-radius: 0; padding: 4px 0; background: transparent; }
body .lobby-row.is-new { animation-duration: var(--motion-reveal); }
body .mode-btn { box-shadow: none; }
body .mode-btn.is-on { box-shadow: inset 0 -3px 0 var(--ink); }
body .score-row { grid-template-columns: 24px 32px minmax(0,1fr) auto auto; gap: 8px; }
body .score-row b { font: 700 12px/1.35 var(--body); min-width: 0; }
body .score-row .sr-name { white-space: normal; overflow-wrap: anywhere; font-size: 13px; line-height: 1.3; }
body .score-row:has(.gain-wrap) { grid-template-columns: 24px 32px minmax(0,1fr) auto auto auto; }
body .score-row:has(.gain-wrap) b { font: 22px/1 var(--display); }
body .score-row.is-me { background: color-mix(in srgb, var(--lime) 12%, transparent); border-color: var(--line-soft); border-radius: 10px; }
body .gain { font-size: 20px; font-variant-numeric: tabular-nums; }
body .dialog { border: 0; border-radius: 20px; padding: 24px; }
body .dialog[open] { animation: ui-reveal var(--motion-ui) var(--ease-game) both; }
body .dialog::backdrop { background: color-mix(in srgb, var(--ink) 64%, transparent); }

/* Match shell. Preserve the existing responsive rail and safe-area rules. */
body .panel { border: 0; border-radius: 18px; box-shadow: 0 8px 28px color-mix(in srgb, var(--ink) 7%, transparent); }
body.in-match .panel { border-top: 0; box-shadow: none; }
body .panel .match-top { min-height: 44px; padding-bottom: 0; margin-bottom: 8px; border-bottom: 0; }
body .panel.guess > .match-top, body .panel.darts > .match-top,
body .panel.question > .match-top, body .panel.review > .match-top,
body .panel.result > .match-top { border: 0; padding-bottom: 0; margin-bottom: 0; }
body .round-tag { font-size: 11px; letter-spacing: .06em; line-height: 1.4; }
body .match-top .icon-btn { background: transparent; border-color: transparent; flex: 0 0 44px; }
body .pchip { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 6px; }
body .pchip.is-me { border: 0; }
body .pchip.is-active { background: transparent; color: var(--ink); box-shadow: none; transform: none; }
body .pchip.is-active .pchip-icon { outline: 2px solid var(--lime); outline-offset: 2px; }
body .pchip-name { font-size: 12px; }
body .pchip-score { font-size: 23px; }
body .status { min-height: 54px; padding: 10px 12px; border: 0; border-radius: 12px; box-shadow: none; background: var(--paper-2); }
body .status.is-mine { background: var(--ink); color: var(--paper); box-shadow: none; }
body .status.is-mine .status-text span { color: var(--paper-2); }
body .status-text b { font-size: 14px; }
body .status-text span { font-size: 12px; line-height: 1.35; }
body .status .turn-timer .cd { font-size: 24px; }
body .status.is-mine .cd.is-low { color: var(--cream); text-decoration: underline; text-underline-offset: 4px; }
body .bar { height: 4px; }
body .timeline-wrap { border: 0; box-shadow: none; background: transparent; }
body .tcard { border-color: var(--line-soft); box-shadow: 0 2px 4px color-mix(in srgb, var(--ink) 4%, transparent); }
body .tcard.is-mine { box-shadow: inset 3px 0 0 #ff5b24; }
body .tcard.is-good { border-color: var(--good); }
body .tcard.is-bad { border-color: var(--bad); }
body .slot { transition: height var(--motion-ui) var(--ease-game), background-color var(--motion-ui); }
body .slot.is-armed { height: 36px; }
body .slot.is-armed::after { top: 16px; }
body .slot.is-target { min-height: 48px; }
body .dcard { box-shadow: none; }

/* Wer bin ich? - unboxed duel, independent avatars and an immediate score. */
body .panel.guess { gap: 8px; }
body .guess-match-header { gap: 10px; border: 0; border-radius: 0; background: transparent; padding: 4px 0 10px; border-bottom: 1px solid var(--line-soft); }
body .gmh-meta { gap: 8px; }
body .gmh-era { font-size: 10px; color: var(--ink-muted); letter-spacing: .07em; }
body .gmh-tips { font-size: 11px; }
body .gmh-duel { gap: 10px; align-items: center; }
body .gmh-player { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 8px; padding: 3px 0; background: transparent; border: 0; border-radius: 0; color: var(--ink); }
body .gmh-player.is-active, body .gmh-player.is-active.is-me { background: transparent; color: var(--ink); border: 0; box-shadow: none; animation: none; }
body .gmh-player.is-me:not(.is-active) { border: 0; }
body .gmh-avatar { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--paper-2); }
body .gmh-player.is-active .gmh-avatar { outline: 3px solid var(--lime); outline-offset: 2px; }
body .gmh-player.is-active .gmh-avatar::after { content: ''; position: absolute; width: 8px; height: 8px; border: 2px solid var(--paper); border-radius: 50%; background: var(--ink); right: -3px; bottom: -1px; }
body .gmh-identity { min-width: 0; }
body .gmh-name { display: block; white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.25; }
body .gmh-player-state { display: block; margin-top: 2px; font-size: 9px; line-height: 1.2; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body .gmh-score { font-size: 26px; line-height: 1; }
body .gmh-vs { font: 18px/1 var(--display); color: var(--ink-muted); padding: 0; }
body .gmh-duel > .gmh-player:last-child { grid-template-columns: auto minmax(0,1fr) 38px; }
body .gmh-duel > .gmh-player:last-child .gmh-avatar { grid-column: 3; grid-row: 1; }
body .gmh-duel > .gmh-player:last-child .gmh-identity { grid-column: 2; grid-row: 1; text-align: right; }
body .gmh-duel > .gmh-player:last-child .gmh-score { grid-column: 1; grid-row: 1; }
body .gmh-multi { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 18px; }
body .guess-turn-state, body .career-turn-state { min-height: 40px; margin: 0; padding: 8px 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; gap: 8px; font-size: 13px; }
body .guess-turn-state.is-mine, body .career-turn-state.is-mine { background: transparent; border: 0; box-shadow: none; }
body .guess-turn-state b, body .career-turn-state b { min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
body .guess-turn-state .cd, body .career-turn-state .cd { min-width: 3ch; text-align: right; font-size: 20px; }
body .guess-turn-dot, body .career-turn-dot { width: 6px; height: 6px; background: var(--ink-muted); box-shadow: none; flex: 0 0 6px; }
body .guess-turn-state.is-mine .guess-turn-dot, body .career-turn-state.is-mine .career-turn-dot { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 45%, transparent); animation: none; }
body .guess-input { gap: 0; }
body .guess-input-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
body .guess-input-row .btn { width: auto; padding: 0 16px; min-height: 50px; font-size: 14px; }
body .guess-input-row #guess-search { font-size: 16px; }
body .guess-input .btn-hint { align-self: flex-end; font-size: 12px; }
body .guess-board { gap: 12px; margin: 0; }
body .gc-row { border: 0; border-radius: 12px; background: color-mix(in srgb, var(--paper-2) 55%, var(--surface)); padding: 10px; }
body .gc-row.is-target { background: color-mix(in srgb, var(--lime) 17%, var(--surface)); box-shadow: inset 3px 0 0 var(--good); }
body .gc-row-top { gap: 8px; padding: 0 0 8px; border: 0; }
body .gc-row-name { font-size: 14px; min-width: 0; }
body .gc-row-who { font-size: 10px; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body .gc-chips { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; padding: 0; }
body .gc-chip { position: relative; min-width: 0; min-height: 48px; gap: 4px; padding: 7px 4px; border: 0; border-radius: 7px; }
body .gc-chip.is-correct { background: color-mix(in srgb, var(--lime) 45%, var(--surface)); }
body .gc-chip.is-wrong { background: color-mix(in srgb, var(--paper) 70%, var(--surface)); }
body .gc-chip.is-arrow { background: var(--cream); }
body .gc-chip-lbl { font-size: 9px; letter-spacing: .03em; line-height: 1.25; }
body .gc-chip-val { font-size: 13px; line-height: 1.2; white-space: normal; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
body .gc-chip-marker { font-size: 10px; margin-right: 2px; }
body .gc-chip-flag { width: 27px; height: 18px; object-fit: cover; }
body .gc-chip-badge { min-width: 28px; height: 24px; border-radius: 5px; font-size: 10px; }
body .gc-row.gc-row-new { animation: ui-reveal var(--motion-reveal) var(--ease-game) both; }
body .gc-row.gc-row-new .gc-chip { animation: ui-chip-reveal 180ms var(--ease-game) both; animation-delay: var(--chip-delay,0ms); }
body .guess-empty { margin: 0; padding: 6px 0; font-size: 12px; color: var(--ink-muted); line-height: 1.5; }
body .guess-done-banner, body .guess-alldone-banner { margin: 0; padding: 10px 12px; border: 0; border-radius: 10px; font-size: 13px; }
body .guess-reveal-card, body .guess-target-reveal { background: var(--ink); color: var(--paper); border: 0; border-radius: 16px; padding: 24px 16px; box-shadow: none; }
body .guess-reveal-card .kicker, body .guess-target-reveal .kicker { color: var(--cream); margin: 0 0 12px; }
body .guess-reveal-name { font-size: clamp(26px,7vw,42px); color: var(--lime); overflow-wrap: anywhere; }
body .guess-target-attrs { gap: 12px 8px; margin-top: 18px; }
body .guess-target-attr { background: transparent; border: 0; padding: 0; }
body .guess-target-attr span { color: var(--paper-2); opacity: 1; font-size: 10px; }
body .guess-target-attr b { color: var(--paper); font-size: 13px; }

/* Career path stays a route, rather than a pile of cards. */
body .career-kicker { flex-wrap: wrap; gap: 8px; margin: 0; }
body .career-kicker b { border: 0; background: transparent; padding: 0; font-size: 10px; color: var(--orange-text); }
body .career-time-label { margin-left: auto; }
body .career-intro p { margin: 6px 0; font-size: 13px; }
body .career-path { gap: 4px; margin: 4px 0; }
body .career-path::before { left: 15px; background: var(--line); }
body .career-station { min-height: 44px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; animation: none; }
body .career-station.is-current { background: color-mix(in srgb, var(--cream) 48%, transparent); border: 0; box-shadow: none; }
body .career-station.is-new-clue { animation: ui-reveal var(--motion-reveal) var(--ease-game) both; }
body .career-station b { font-size: 14px; }
body .career-panel .guess-input { margin-top: 0; }
body .career-guess-row { border-left-width: 3px; }
body .career-guess-meta { font-size: 11px; }

/* Darts: scoreboard remains the focus. Preserve its viewport/keyboard logic. */
body .darts-cat-header { border: 0; border-radius: 0; box-shadow: none; background: transparent; padding: 0 0 8px; margin-bottom: 4px; flex-wrap: wrap; }
body .darts-pod { min-height: 138px; border: 1px solid transparent; background: color-mix(in srgb, var(--paper-2) 60%, var(--surface)); box-shadow: none; padding: 12px 8px; }
body .darts-pod.is-me { background: color-mix(in srgb, var(--lime) 12%, var(--surface)); }
body .darts-pod.is-active { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); box-shadow: none; transform: none; animation: none; }
body .darts-pod.is-active .darts-score-num { color: var(--lime); }
body .darts-pod.is-active .pchip-icon { outline: 2px solid var(--lime); outline-offset: 2px; }
body .darts-pod .pchip-icon { box-shadow: none; }
body .darts-name { display: block; white-space: normal; overflow-wrap: anywhere; font-size: 12px; line-height: 1.25; }
body .darts-pod-body { margin: 8px 0 6px; }
body .darts-score-label { font-size: 10px; opacity: .8; }
body .darts-score-num { font-size: clamp(32px,9vw,46px); }
body .darts-score-progress { height: 3px; }
body .darts-score-progress i { background: #ff5b24; }
body .darts-pod.is-active .darts-score-progress { background: color-mix(in srgb, var(--surface) 20%, transparent); }
body .darts-pod.is-active .darts-score-progress i { background: var(--lime); }
body .darts-pod-total, body .darts-pod-picks-label { color: var(--ink-muted); opacity: 1; font-size: 10px; }
body .darts-pod.is-active .darts-pod-total, body .darts-pod.is-active .darts-pod-picks-label { color: var(--paper-2); }
body .darts-pod.is-active .darts-pod-last, body .darts-pod.is-active .darts-pod-pick { color: var(--ink); background: var(--paper-2); }
body .darts-pod.is-active .darts-pod-pick.is-hit small { color: var(--good); }
body .darts-result-zone { border: 0; box-shadow: none; }
body .dr-heading { opacity: .8; }
body .dr-bust-label, body .dr-score.is-bust-col, body .dr-throw-val { color: var(--cream); }
body .darts-input { border: 0; box-shadow: none; }
body .darts-turn-banner { min-height: 48px; padding: 8px 10px; border: 0; box-shadow: none; }

/* Solo modes inject their base CSS; these scoped selectors stay authoritative. */
body .blitz-game { min-height: calc(100dvh - 76px - env(safe-area-inset-top,0px)); padding: 0; }
body .blitz-header { position: static; padding: 14px 0 10px; }
body .blitz-progress { flex-direction: row; align-items: baseline; gap: 8px; }
body .blitz-progress-kicker { font-size: 10px; letter-spacing: .08em; }
body .blitz-progress-count { font-size: 22px; font-variant-numeric: tabular-nums; }
body .blitz-timer-arc { stroke: var(--ink); transition: stroke-dashoffset 250ms linear, stroke var(--motion-ui); }
body .blitz-timer-arc--danger { stroke: var(--bad); }
body .blitz-timer-wrap:has(.blitz-timer-arc--danger) .blitz-timer-num { color: var(--bad); text-decoration: underline; text-underline-offset: 3px; }
body .blitz-game.is-timeout .blitz-timer-wrap::after { content: 'Zeit um'; position: absolute; right: 52px; top: 12px; width: 56px; color: var(--bad); font-size: 12px; font-weight: 700; }
body .blitz-question-wrap { padding: 24px 0 20px; }
body .blitz-question { font-size: clamp(21px,5.3vw,28px); line-height: 1.2; letter-spacing: -.5px; text-wrap: pretty; }
body .blitz-options { flex: 0; grid-template-columns: 1fr; padding: 0 0 16px; gap: 9px; }
body .blitz-option { min-height: 62px; padding: 12px 14px; border-width: 1px; border-color: var(--line-soft); border-radius: 12px; background: var(--surface); }
body .blitz-opt-letter { border: 0; background: var(--paper-2); width: 28px; height: 28px; }
body .blitz-opt-text { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
body .blitz-option--chosen { border-color: var(--ink); background: var(--lime); box-shadow: inset 3px 0 0 var(--ink); }
body .blitz-option--chosen .blitz-opt-letter { background: var(--ink); color: var(--lime); }
body .blitz-option--chosen::after { content: 'Gewählt'; margin-left: auto; font-size: 11px; font-weight: 800; }
body .blitz-intro { padding: 24px 0; }
body .blitz-intro__rules { gap: 0; margin-bottom: 24px; }
body .blitz-intro__rules li { background: transparent; border-radius: 0; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
body .blitz-result-item, body .blitz-result-row { box-shadow: none; }


/* Finite, event-driven motion. Scores always show the authoritative value. */
@keyframes ui-reveal { from { opacity: .35; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes ui-chip-reveal { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: none; } }
@keyframes ui-score { 40% { transform: translateY(-2px) scale(1.12); } }
@keyframes ui-turn { 40% { transform: scale(1.08); } }
body .ui-score-changed { animation: ui-score var(--motion-reveal) var(--ease-game) both; }
body .pchip.score-flash .pchip-score, body .darts-score-num.darts-score-change { animation: ui-score var(--motion-reveal) var(--ease-game) both; }
body .ui-turn-changed { animation: ui-turn var(--motion-reveal) var(--ease-game) both; }
body .anim-in, body .section-enter { animation: ui-reveal var(--motion-ui) var(--ease-game) both; }
body .reveal { animation-duration: var(--motion-reveal); animation-delay: 0ms !important; }

@media (hover: hover) {
  body .home-solo-card:hover { transform: translateY(-2px); background: var(--surface); box-shadow: 0 5px 14px color-mix(in srgb,var(--ink) 7%,transparent); }
  body .btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
  body .btn-primary:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
  body .btn-hint:hover { color: var(--ink); }
  body .blitz-option:hover:not(:disabled) { background: var(--paper-2); border-color: var(--ink); }
}
@media (max-width: 899px) {
  body.in-match .play-view { padding-inline: 10px; }
  body.in-match .panel { padding: 12px; border-radius: 16px; }
  body.in-darts .panel.darts { padding: 12px; }
  body.in-playing .status { border-radius: 12px; }
  body.in-playing .board .status { box-shadow: none; min-height: 52px; padding: 8px 10px; }
  body.in-playing .pchip { min-height: 46px; }
  body.in-playing .pchip-score { font-size: 20px; }
}
@media (min-width: 600px) {
  body .gc-chips { grid-template-columns: repeat(6,minmax(0,1fr)); }
  body .gmh-avatar { width: 44px; height: 44px; }
  body .gmh-player { grid-template-columns: 44px minmax(0,1fr) auto; gap: 12px; }
  body .gmh-duel > .gmh-player:last-child { grid-template-columns: auto minmax(0,1fr) 44px; }
  body .gmh-name { font-size: 14px; }
  body .gmh-score { font-size: 32px; }
  body .blitz-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body .blitz-option { min-height: 80px; }
}
@media (max-width: 370px) {
  body .home-solo-card { padding: 10px; }
  body .gmh-player { grid-template-columns: 32px minmax(0,1fr) auto; gap: 6px; }
  body .gmh-duel > .gmh-player:last-child { grid-template-columns: auto minmax(0,1fr) 32px; }
  body .gmh-avatar { width: 32px; height: 32px; }
  body .gmh-score { font-size: 23px; }
  body .gmh-name { font-size: 11px; }
  body .score-row { gap: 5px; padding-inline: 6px; }
  body .score-row b { max-width: 72px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  /* Retain animationend cleanup for existing reaction/score components. */
  body *, body *::before, body *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition: none !important; scroll-behavior: auto !important; }
}

/* -------------------------------------------------------------------------
   Mobile app consolidation, 2026-11
   One calm screen model: contextual top line, a single game focus, then the
   next action in the thumb zone. These rules deliberately avoid a permanent
   navigation bar; game actions remain contextual to the active round.
   ------------------------------------------------------------------------- */
@media (max-width: 899px) {
  :root { --app-gutter: 16px; --app-action-space: max(14px, env(safe-area-inset-bottom)); }
  body, body.tr-body { background: var(--paper); }

  /* Standalone screens should read as an app canvas, not a card on a page. */
  body.tr-body .topbar,
  body:not(.in-match) .topbar {
    height: calc(52px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) var(--app-gutter) 0;
    border-bottom: 1px solid var(--line-soft);
    background: var(--paper);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  body.tr-body .brand, body:not(.in-match) .brand { font-size: 13px; letter-spacing: -.35px; }
  body.tr-body .brand-ball, body:not(.in-match) .brand-ball { width: 24px; height: 24px; box-shadow: none; }
  body.tr-body .topbar-back { width: 44px; min-height: 44px; border-radius: 50%; }

  /* Home becomes a game hub: one feature, then a quiet mode list. */
  body:not(.in-match) { background: var(--paper); }
  body:not(.in-match) .hero { padding: 24px var(--app-gutter) 36px; }
  body:not(.in-match) .hero h1 { font-size: clamp(34px, 10vw, 46px); line-height: .98; margin-bottom: 22px; }
  body:not(.in-match) .home-daily { border: 0; border-radius: 16px; box-shadow: none; margin-bottom: 16px; }
  body:not(.in-match) .home-solo,
  body:not(.in-match) .home-bots { display: block; margin: 0 0 18px; }
  body:not(.in-match) .home-solo-card {
    position: relative;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 2px;
    border-radius: 0;
    border-bottom: 1px solid var(--line-soft);
    background: transparent;
  }
  body:not(.in-match) .home-solo-card:last-child { border-bottom: 0; }
  body:not(.in-match) .home-solo-icon { grid-row: span 2; font-size: 18px; }
  body:not(.in-match) .home-solo-card b { grid-column: 2; margin: 0; font-size: 14px; text-align: left; }
  body:not(.in-match) .home-solo-card span:not(.home-solo-icon) { grid-column: 2; font-size: 12px; }
  body:not(.in-match) .home-solo-card::after { content: '›'; grid-column: 3; grid-row: 1 / span 2; font: 26px/1 var(--display); color: var(--ink-muted); }
  body:not(.in-match) .start-card { border-radius: 16px; box-shadow: none; padding: 18px 0 0; background: transparent; }
  body:not(.in-match) .start-card::before { display: none; }
  body:not(.in-match) .bots-config { padding: 12px 0; }

  /* Multiplayer uses the entire display as the play surface. */
  body.in-match { background: var(--paper); }
  body.in-match .play-view { background: var(--paper); }
  body.in-match .panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 10px var(--app-gutter) calc(18px + env(safe-area-inset-bottom));
  }
  body.in-match .panel.guess, body.in-match .panel.darts { gap: 6px; }
  body.in-match .panel.guess, body.in-match .panel.darts {
    min-height: calc(100dvh - env(safe-area-inset-top));
    display: flex;
    flex-direction: column;
  }
  body.in-match .panel .match-top { min-height: 40px; margin-bottom: 4px; }
  body.in-match .match-top .icon-btn { border: 0; background: transparent; }
  body.in-match .round-tag { font-size: 11px; color: var(--ink-muted); }

  /* The duel is one row, not a row of contained widgets. */
  body.in-match .guess-match-header { padding: 4px 0 8px; }
  body.in-match .gmh-player { padding: 2px 0; }
  body.in-match .gmh-avatar { width: 34px; height: 34px; }
  body.in-match .gmh-score { font-size: 24px; }
  body.in-match .guess-turn-state, body.in-match .career-turn-state { min-height: 36px; padding: 4px 0 8px; }
  body.in-match .guess-turn-state .cd, body.in-match .career-turn-state .cd { font-size: 18px; }

  /* Lists and information use type and dividers; only active play is surfaced. */
  body.in-match .gc-row { padding: 10px 0; border-radius: 0; border-bottom: 1px solid var(--line-soft); background: transparent; }
  body.in-match .gc-row.is-target { padding: 10px; border-radius: 12px; border-bottom: 0; }
  body.in-match .panel.guess > .guess-board { flex: 1; }
  body.in-match .gc-chips { gap: 4px; }
  body.in-match .gc-chip { min-height: 46px; border-radius: 6px; }
  body.in-match .career-path { margin: 2px 0; }
  body.in-match .career-station { padding-inline: 4px; }
  body.in-match .darts-pod { border: 0; border-radius: 10px; }
  body.in-match .darts-pod.is-active { border: 0; }
  body.in-match .darts-result-zone { border-radius: 14px; margin-bottom: 6px; }

  /* Reusable contextual action zone. It is part of the active task, never global navigation. */
  body.in-match .guess-input {
    position: sticky;
    bottom: 0;
    z-index: 18;
    margin: 8px calc(-1 * var(--app-gutter)) calc(-18px - env(safe-area-inset-bottom));
    padding: 10px var(--app-gutter) var(--app-action-space);
    border-top: 1px solid var(--line-soft);
    background: color-mix(in srgb, var(--paper) 94%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  body.in-match .guess-input-row { gap: 8px; }
  body.in-match .guess-input-row .field { min-height: 52px; }
  body.in-match .guess-input-row .btn { min-height: 52px; }
  body.in-match .guess-suggestions { margin-bottom: 8px; }
  body.in-match .guess-input .btn-hint { display: none; }
  body.in-match .darts-action {
    border-width: 1px 0 0;
    border-radius: 0;
    box-shadow: none;
    background: color-mix(in srgb, var(--paper) 96%, transparent);
  }
  body.in-darts .panel.darts > .darts-board { order: 2; }
  body.in-darts .panel.darts > .darts-result-zone { order: 3; }
  body.in-darts .panel.darts > .darts-log { order: 4; }
  body.in-darts .panel.darts > .darts-action {
    order: 5;
    top: auto;
    bottom: 0;
    min-height: 0;
    margin-top: auto;
    margin-bottom: calc(-18px - env(safe-area-inset-bottom));
    padding: 10px var(--app-gutter) var(--app-action-space);
  }
  /* iOS shrinks the visual viewport instead of moving a bottom dock. When
     the keyboard opens, temporarily return the search tool to the stable
     upper slot. The existing VisualViewport guard keeps it above the keys;
     as soon as focus leaves, it resumes its quiet bottom position. */
  body.in-darts.darts-search-focus .panel.darts > .darts-action {
    order: 2;
    position: sticky;
    top: calc(env(safe-area-inset-top, 0px) + 8px);
    bottom: auto;
    width: 100%;
    max-width: 680px;
    min-height: 108px;
    margin: 0 auto 12px;
    padding: 10px;
    border-width: 1px;
    border-radius: 14px;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--ink) 10%, transparent);
    background: color-mix(in srgb, var(--paper) 97%, transparent);
  }
  body.in-darts.darts-search-focus .panel.darts > .darts-board { order: 3; }
  body.in-darts.darts-search-focus .panel.darts > .darts-result-zone { order: 4; }
  body.in-darts.darts-search-focus .panel.darts > .darts-log { order: 5; }

  /* Solo modes share the same app density and action treatment. */
  body .blitz-header { padding: 2px 0 8px; border-bottom: 1px solid var(--line-soft); }
  body .blitz-question-wrap { padding: 22px 0 18px; }
  body .blitz-options { gap: 2px; padding-bottom: 0; }
  body .blitz-option { min-height: 64px; border-width: 0 0 1px; border-radius: 0; background: transparent; }
  body .blitz-option--chosen { border-color: var(--ink); border-radius: 10px; }
  body .tr-rail { border-radius: 14px 14px 0 0; }
}
