/* BSC Martinsried Scoreboard */

:root {
  --bg: var(--u-bg-l, #f4f3ef);
  --surface: var(--u-surface-l, #ffffff);
  --surface-2: var(--u-surface-2-l, #eeede8);
  --surface-3: var(--u-surface-3-l, #e3e2dc);
  --ink: #151815;
  --ink-2: #5d635e;
  --line: var(--u-line-l, #dddcd5);
  --accent: var(--u-accent-l, #1b7a49);
  --accent-ink: var(--u-accent-ink-l, #ffffff);
  --accent-soft: var(--u-accent-soft-l, #dbeee2);
  --danger: #c23b30;
  --danger-soft: #f8dedb;
  --warn: #b86e00;
  --warn-soft: #fbead0;
  --p0: #e3a600;
  --p1: #d23c3c;
  --logo-ink: #1a1a1a;
  --logo-ring: transparent;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 20px rgba(0, 0, 0, .05);
  --radius: 18px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--u-bg-d, #0b100d);
    --surface: var(--u-surface-d, #141b17);
    --surface-2: var(--u-surface-2-d, #1b241f);
    --surface-3: var(--u-surface-3-d, #243029);
    --ink: #eef2ef;
    --ink-2: #99a49d;
    --line: var(--u-line-d, #26312b);
    --accent: var(--u-accent-d, #3fb477);
    --accent-ink: var(--u-accent-ink-d, #04140b);
    --accent-soft: var(--u-accent-soft-d, #173524);
    --danger: #f0675b;
    --danger-soft: #3a1c19;
    --warn: #f0a531;
    --warn-soft: #3a2a12;
    --p0: #f5c02e;
    --p1: #ee5a5a;
    --logo-ink: #eef2ef;
    --logo-ring: #eef2ef;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: var(--u-bg-d, #0b100d);
  --surface: var(--u-surface-d, #141b17);
  --surface-2: var(--u-surface-2-d, #1b241f);
  --surface-3: var(--u-surface-3-d, #243029);
  --ink: #eef2ef;
  --ink-2: #99a49d;
  --line: var(--u-line-d, #26312b);
  --accent: var(--u-accent-d, #3fb477);
  --accent-ink: var(--u-accent-ink-d, #04140b);
  --accent-soft: var(--u-accent-soft-d, #173524);
  --danger: #f0675b;
  --danger-soft: #3a1c19;
  --warn: #f0a531;
  --warn-soft: #3a2a12;
  --p0: #f5c02e;
  --p1: #ee5a5a;
  --logo-ink: #eef2ef;
  --logo-ring: #eef2ef;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .4; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }

.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.center-text { text-align: center; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }

.svg { display: inline-flex; line-height: 0; flex: none; }
.svg svg { width: 100%; height: 100%; }
.icon { width: 22px; height: 22px; }
.icon.accent { color: var(--accent); }

/* logo */
.logo-wrap .lg-text, .logo-wrap .lg-swoosh { fill: var(--logo-ink); }
.logo-wrap .lg-ball, .logo-wrap .lg-eight { fill: #1a1a1a; }
.logo-wrap .lg-num-bg, .logo-wrap .lg-shine { fill: #fff; }
.logo-wrap .lg-ball { stroke: var(--logo-ring); stroke-width: 3; }

/* balls */
.ball.sm { width: 28px; height: 28px; }
.ball.md { width: 44px; height: 44px; }
.ball.lg { width: clamp(64px, 16vw, 104px); height: clamp(64px, 16vw, 104px); }
.cue { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- controls */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: 12px;
  background: var(--surface-2); color: var(--ink); font-weight: 600;
  transition: background .15s, transform .08s;
}
.btn:not(:disabled):active { transform: scale(.97); }
@media (hover: hover) { .btn:not(:disabled):hover { background: var(--surface-3); } }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .btn.primary:not(:disabled):hover { background: var(--accent); filter: brightness(1.08); } }
.btn.danger { color: var(--danger); }
.btn.danger.primary, .dialog .btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 34px; padding: 0 10px; font-size: 14px; }
.btn.small .icon { width: 18px; height: 18px; }
.btn.block { width: 100%; }
.btn.large { min-height: 58px; font-size: 18px; border-radius: 16px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; color: var(--ink);
}
@media (hover: hover) { .icon-btn:not(:disabled):hover { background: var(--surface-2); } }

.segmented { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 12px; gap: 2px; flex-wrap: wrap; }
.segmented button { min-height: 38px; padding: 0 14px; border-radius: 9px; font-weight: 600; color: var(--ink-2); }
.segmented button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.segmented.small button { min-height: 32px; padding: 0 10px; font-size: 13px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-width: 52px; min-height: 46px; padding: 0 14px; border-radius: 999px;
  background: var(--surface-2); font-weight: 700; font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
}
.chip.on { background: var(--accent); color: var(--accent-ink); }

.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border-radius: 12px; }
.stepper-val { min-width: 48px; text-align: center; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }

.switch { position: relative; width: 52px; height: 32px; border-radius: 99px; background: var(--surface-3); transition: background .2s; flex: none; }
.switch span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch.on { background: var(--accent); }
.switch.on span { transform: translateX(20px); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.pdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pdot.p0 { background: var(--p0); }
.pdot.p1 { background: var(--p1); }

.pips { display: inline-flex; gap: 4px; align-items: center; }
.pips i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .5; }
.pips i.on { background: currentColor; opacity: 1; }

.badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; background: var(--surface-3); color: var(--ink-2); font-size: 11px; font-weight: 700; vertical-align: middle; }
.badge.warn { background: var(--warn-soft); color: var(--warn); }

.hint { font-size: 13px; color: var(--ink-2); }

/* ---------------------------------------------------------------- layout */

.page { min-height: 100vh; min-height: 100dvh; }

.topbar {
  display: flex; align-items: center; gap: 8px;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
}
.topbar-title { flex: 1; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }

.container { max-width: 1040px; margin: 0 auto; padding: 8px max(16px, env(safe-area-inset-right)) calc(32px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 16px; }
.container.narrow { max-width: 640px; }

/* home */
.hero { display: flex; align-items: center; gap: 20px; padding: 8px 4px 8px; }
.hero-logo { width: clamp(108px, 26vw, 168px); height: auto; }
.hero h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.05; letter-spacing: -.02em; }
.hero p { margin-top: 6px; font-size: 17px; }

.resume { display: flex; align-items: center; gap: 14px; padding: 14px 18px; text-align: left; border-color: var(--accent); }
.resume-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.resume-text strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.disc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 860px) { .disc-grid { grid-template-columns: repeat(4, 1fr); } }
.disc-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px 12px 20px; text-align: center; transition: transform .15s, border-color .15s; }
.disc-card:active { transform: scale(.98); }
@media (hover: hover) { .disc-card:hover { border-color: var(--accent); transform: translateY(-2px); } }
.disc-name { font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin-top: 4px; }
.footnote { text-align: center; margin-top: 8px; }

/* setup */
.form-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.form-card h2, .card > h2 { font-size: 17px; display: flex; align-items: center; gap: 8px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field.row { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.player-row { display: flex; align-items: center; gap: 10px; }
.player-row input {
  flex: 1; min-width: 0; height: 54px; padding: 0 14px; font-size: 18px; font-weight: 600;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2);
}
.player-row input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.break-pick {
  display: inline-flex; align-items: center; gap: 6px; height: 54px; padding: 0 12px; border-radius: 12px;
  font-size: 14px; font-weight: 700; color: var(--ink-2); border: 1.5px dashed var(--line);
}
.break-pick .cue { opacity: .45; }
.break-pick.on { color: var(--accent); border: 1.5px solid var(--accent); background: var(--accent-soft); }
.break-pick.on .cue { opacity: 1; }

.sticky-actions {
  position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}

/* ---------------------------------------------------------------- match */

.page.match {
  height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
  padding: 0 max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  user-select: none; -webkit-user-select: none;
}

.mbar { display: flex; align-items: center; gap: 8px; padding: max(8px, env(safe-area-inset-top)) 0 8px; }
.mbar-title { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.mbar-title > div { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.mbar-title strong { white-space: nowrap; }
.mbar-actions { display: flex; align-items: center; gap: 4px; }

.board { flex: 1; min-height: 0; display: grid; gap: 10px; grid-template-columns: 1fr minmax(200px, auto) 1fr; }

.panel {
  position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px;
  padding: 14px; border-radius: var(--radius); background: var(--surface); border: 2px solid var(--line);
  transition: border-color .2s, box-shadow .2s;
}
.panel::before { content: ""; position: absolute; left: 16px; right: 16px; top: -2px; height: 4px; border-radius: 0 0 4px 4px; }
.panel.p0::before { background: var(--p0); }
.panel.p1::before { background: var(--p1); }

.panel-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pname { flex: 1; min-width: 0; font-size: clamp(18px, 3.2vmin, 30px); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }

.break-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 99px;
  font-size: 13px; font-weight: 700; color: var(--ink-2); border: 1.5px dashed var(--line); flex: none;
}
.break-badge .cue { opacity: .4; }
.break-badge.on { color: var(--accent); background: var(--accent-soft); border: 1.5px solid transparent; }
.break-badge.on .cue { opacity: 1; }

.score { font-weight: 800; font-variant-numeric: tabular-nums; line-height: .9; letter-spacing: -.04em; }

.score-btn {
  flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 14px; background: var(--surface-2); transition: background .15s, transform .08s;
}
.score-btn .score { font-size: clamp(64px, 24vmin, 260px); }
.score-btn:not(:disabled):active { transform: scale(.985); background: var(--accent-soft); }
@media (hover: hover) { .score-btn:not(:disabled):hover { background: var(--surface-3); } }
.score-plus { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.score-plus .icon { width: 16px; height: 16px; }

.race-pips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; min-height: 10px; }
.race-pips i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-3); }
.panel.p0 .race-pips i.on { background: var(--p0); }
.panel.p1 .race-pips i.on { background: var(--p1); }

.panel-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; min-height: 44px; }
.foul-box { display: flex; align-items: center; gap: 8px; padding: 3px; border-radius: 12px; border: 1.5px solid transparent; }
.foul-box.warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.foul-box .foul-pips { color: var(--warn); padding: 0 4px; }
.foul-btn { color: var(--danger); }
.warn-text { font-weight: 800; color: var(--warn); }
.ext-btn { font-size: 14px; }
.ext-btn .icon { width: 18px; height: 18px; }
.ext-btn .pips { color: var(--accent); }

.center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-width: 0; }
.center-info { display: flex; flex-direction: column; align-items: center; }
.big-sep { font-size: clamp(22px, 4vmin, 36px); font-weight: 800; font-variant-numeric: tabular-nums; }

/* shot clock */
.clock { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.clock-face {
  position: relative; width: clamp(150px, 24vmin, 240px); aspect-ratio: 1; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line);
}
.ring-svg { position: absolute; inset: 0; }
.ring-svg circle { fill: none; stroke-width: 6; }
.ring-bg { stroke: var(--surface-3); }
.ring { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .12s linear; }
.clock-num { font-size: clamp(44px, 9vmin, 88px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.clock-label { font-size: 12px; color: var(--ink-2); font-weight: 600; margin-top: 4px; max-width: 70%; text-align: center; line-height: 1.2; }
.clock-face.warn .ring { stroke: var(--warn); }
.clock-face.warn .clock-num { color: var(--warn); }
.clock-face.expired { background: var(--danger-soft); border-color: var(--danger); animation: pulse 1s ease-in-out infinite; }
.clock-face.expired .clock-num, .clock-face.expired .clock-label { color: var(--danger); }
@keyframes pulse { 50% { transform: scale(1.03); } }
.clock-controls { display: flex; gap: 6px; }

/* 14.1 */
.straight-game .panel { justify-content: space-between; }
.straight-game .panel.active { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.at-table { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; flex: none; }
.score-static { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 12px; position: relative; }
.score-static .score { font-size: clamp(64px, 22vmin, 240px); }
.score.neg { color: var(--danger); }
.straight-game .panel.tappable { cursor: pointer; }
@media (hover: hover) { .straight-game .panel.tappable:hover { background: color-mix(in srgb, var(--accent-soft) 35%, var(--surface)); } }
.straight-game .panel.tappable:active { transform: scale(.99); }
.score-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 6px; min-height: 18px; }
.score-sub .need { margin-left: auto; }
.tap-hint { display: inline-flex; white-space: nowrap; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--accent); }
.tap-hint .icon { width: 14px; height: 14px; }
.run-picker { display: flex; flex-direction: column; gap: 12px; }
.run-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.run-summary > div { display: flex; flex-direction: column; align-items: center; padding: 8px; border-radius: 12px; background: var(--surface-2); }
.run-summary .stat-num { font-size: 28px; }
.stat-num.accent { color: var(--accent); }
.stat-num.neg { color: var(--danger); }
.picker-q { font-weight: 700; font-size: 15px; }
.run-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.btn.left-tile { flex-direction: column; gap: 0; min-height: 58px; padding: 4px 0; border-radius: 12px; }
.segmented.ending { display: grid; grid-template-columns: 1fr 1fr; }
.segmented.ending.is-foul button.on { background: var(--danger); color: #fff; }
.run-grid.is-foul .run-pts { color: var(--danger); }
.btn.break-foul-btn { background: var(--danger-soft); }
.btn.left-tile.rack-tile { background: var(--accent-soft); }
.run-left { font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.run-pts { font-size: 12px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.btn.rack-btn { flex-direction: column; gap: 2px; min-height: 64px; border-radius: 14px; }
.rack-btn .action-main { font-size: 22px; }
.need { font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 6px; transition: width .25s; }
.panel.p0 .progress i { background: var(--p0); }
.panel.p1 .progress i { background: var(--p1); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.mini-stats div { background: var(--surface-2); border-radius: 10px; padding: 6px 8px; text-align: center; }
.mini-stats dt { font-size: 11px; color: var(--ink-2); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mini-stats dd { margin: 0; font-size: clamp(16px, 2.6vmin, 22px); font-weight: 800; font-variant-numeric: tabular-nums; }

.center-stats { display: flex; gap: 10px; }
.stat-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 96px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.stat-num { font-size: clamp(30px, 6vmin, 52px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 11px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; text-align: center; margin-top: 4px; line-height: 1.2; }
.balls-tile { cursor: pointer; }
.run-tile .stat-num { color: var(--accent); }

.actionbar { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.actionbar-who { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.actions { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 10px; }
.btn.action { flex-direction: column; gap: 2px; min-height: clamp(64px, 11vmin, 96px); border-radius: 16px; padding: 6px 8px; }
.action-main { font-size: clamp(22px, 4vmin, 34px); font-weight: 800; line-height: 1; display: inline-flex; font-variant-numeric: tabular-nums; }
.action-main .icon { width: 28px; height: 28px; }
.action-sub { font-size: 13px; font-weight: 700; opacity: .85; text-align: center; line-height: 1.15; }
.ball-btn .action-main { font-size: clamp(30px, 6vmin, 48px); }
.btn.action.foul { color: var(--danger); }

.keys-hint { text-align: center; padding-top: 8px; }
@media (hover: none), (max-height: 700px) { .keys-hint { display: none; } }

/* portrait phones & tablets: stack */
@media (orientation: portrait), (max-width: 760px) {
  .rack-game .board { grid-template-columns: 1fr; grid-template-rows: 1fr auto 1fr; }
  .rack-game .center { flex-direction: row; gap: 14px; }
  .rack-game .center-info { display: none; }
  .rack-game .clock { flex-direction: row; }
  .rack-game .clock-face { width: clamp(96px, 15vh, 180px); }
  .rack-game .clock-controls { flex-direction: column; }
  .rack-game .clock-num { font-size: clamp(34px, 6vh, 64px); }
  .rack-game .score-btn .score { font-size: clamp(64px, 15vh, 220px); }

  .straight-game .board { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; }
  .straight-game .center { grid-column: 1 / -1; grid-row: 2; flex-direction: row; gap: 12px; }
  .straight-game .clock { flex-direction: row; }
  .straight-game .clock-face { width: clamp(92px, 13vh, 170px); }
  .straight-game .clock-controls { flex-direction: column; }
  .straight-game .clock-num { font-size: clamp(30px, 5vh, 60px); }
  .straight-game .score-static .score { font-size: clamp(52px, 12vh, 200px); }
  .straight-game .panel { padding: 12px 10px; gap: 8px; }
  .straight-game .pname { font-size: clamp(16px, 2.4vh, 28px); }
}

@media (max-width: 520px) {
  .actions { grid-template-columns: repeat(3, 1fr); }
  .ball-btn { grid-column: 1 / -1; }
  .straight-game .at-table { position: absolute; top: -10px; right: 8px; font-size: 10px; padding: 3px 8px; }
  .straight-game .at-table .cue { width: 12px; height: 12px; }
  .straight-game .mini-stats { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .straight-game .mini-stats div { padding: 4px 2px; }
  .straight-game .mini-stats dt { font-size: 9px; }
  .straight-game .stat-tile { min-width: 76px; padding: 8px; }
  .straight-game .panel-foot { min-height: 0; }
  .straight-game .ext-btn { min-height: 34px; padding: 0 8px; font-size: 12px; }
  .panel-foot .btn { min-height: 40px; }
  .hide-xs { display: none; }
  .hero { gap: 14px; }
}
@media (max-width: 640px) { .hide-sm { display: none; } }

/* short landscape phones */
@media (orientation: landscape) and (max-height: 500px) {
  .mbar { padding-top: 4px; padding-bottom: 4px; }
  .board { gap: 8px; }
  .panel { padding: 8px 10px; gap: 6px; }
  .mini-stats, .progress { display: none; }
  .clock-face { width: 120px; }
  .clock-num { font-size: 40px; }
  .btn.action { min-height: 52px; }
  .actionbar-who { display: none; }
  .center-info { display: none; }
}

/* result */
.result { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s; overflow-y: auto; }
.result-card { width: min(460px, 100%); padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; user-select: text; }
.trophy { width: 44px; height: 44px; color: var(--accent); }
.result-card h2 { font-size: 26px; }
.result-score { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; width: 100%; margin-top: 8px; }

.stat-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.stat-table th, .stat-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: right; }
.stat-table thead th { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.stat-table thead .pdot { margin-right: 6px; }
.stat-table tbody th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.stat-table td { font-weight: 700; }
.stat-table tr:last-child th, .stat-table tr:last-child td { border-bottom: 0; }

/* dialogs & toast */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .45); animation: fade .15s; }
.overlay.closing { opacity: 0; transition: opacity .15s; }
@keyframes fade { from { opacity: 0; } }
.dialog { width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.dialog h2 { font-size: 20px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.dialog-actions .btn { flex: 1 1 auto; }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-list .btn { justify-content: flex-start; }
.ball-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ball-grid .btn { padding: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 420px) { .ball-grid { grid-template-columns: repeat(5, 1fr); } }

.toast {
  position: fixed; z-index: 60; left: 50%; top: max(12px, env(safe-area-inset-top)); transform: translate(-50%, -140%);
  max-width: min(560px, calc(100vw - 24px)); padding: 12px 18px; border-radius: 14px;
  background: var(--ink); color: var(--bg); font-weight: 700; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.2); pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }
.toast.danger { background: var(--danger); color: #fff; }
.toast.warn { background: var(--warn); color: #1a1200; }
.toast.accent { background: var(--accent); color: var(--accent-ink); }

/* history */
.filter { align-self: flex-start; }
.hist-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hist-item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 16px; text-align: left; }
@media (hover: hover) { .hist-item:hover { border-color: var(--accent); } }
.hist-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hist-players { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: baseline; font-size: 16px; }
.hist-players span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-players span:last-child { text-align: right; }
.hist-players .won { font-weight: 800; }
.hist-score { font-weight: 800; font-variant-numeric: tabular-nums; }
.empty { padding: 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty-logo { width: 96px; opacity: .5; }
.row-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.history-detail .card { padding: 16px; }
.history-detail .card > h2 { margin-bottom: 10px; }
.detail-players { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.dp { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 17px; }
.dp strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dp.won strong { font-weight: 800; }
.dp.right { justify-content: flex-end; }
.detail-score { font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; }
.detail-head p { margin-top: 8px; }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
.log-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.log-table th, .log-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.log-table thead th { font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.log-table td .pdot { margin-right: 6px; }
.log-table .num { text-align: right; }
.log-table .strong { font-weight: 800; }
.mark { margin-left: 3px; font-size: 10px; font-weight: 800; color: var(--danger); }
.mark.win { color: var(--accent); }
.history-detail .hint { margin-top: 10px; }

/* settings */
.color-field { display: flex; flex-direction: column; gap: 10px; }
.color-field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.color-field-head label { font-size: 15px; font-weight: 700; color: var(--ink); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); box-shadow: inset 0 0 0 3px var(--surface); }
.swatch.on { border-color: var(--ink); }
.swatch.on::after { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--surface); opacity: .9; }
.swatch.custom { overflow: hidden; background: conic-gradient(#e5484d, #f5b400, #3fb477, #2f7de1, #8e4ec6, #e5484d); }
.swatch.custom input { position: absolute; inset: -8px; width: 56px; height: 56px; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.color-preview { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; }
.color-preview > * { min-height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; text-align: center; padding: 4px; }
.pv-primary { background: var(--accent); color: var(--accent-ink); }
.pv-soft { background: var(--accent-soft); color: var(--accent); border: 1.5px solid var(--accent); }
.pv-secondary { background: var(--surface-2); color: var(--ink); }

.settings .field.row { min-height: 48px; }
.about { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px; text-align: center; }
.about-logo { width: 110px; margin-bottom: 6px; }

/* ---------------------------------------------------------------- league match days */

.text-input {
  width: 100%; min-height: 48px; padding: 10px 12px; font-size: 16px; font-weight: 500;
  border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink);
}
.text-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
textarea.text-input { resize: vertical; line-height: 1.4; }
.sub-label { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.form-stack { display: flex; flex-direction: column; gap: 12px; }

.name-list { display: flex; flex-direction: column; gap: 10px; }
.name-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.name-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 12px; border-radius: 99px; background: var(--surface-2); font-weight: 600; }
.chip-x { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink-2); }
.chip-x .icon { width: 16px; height: 16px; }
@media (hover: hover) { .chip-x:hover { background: var(--surface-3); color: var(--danger); } }
.add-row { display: flex; gap: 8px; }
.add-row .text-input { flex: 1; min-width: 0; }

.fmt-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 800; letter-spacing: .04em; background: var(--accent); color: var(--accent-ink); flex: none; }
.fmt-badge.fmt-BBV { background: var(--ink); color: var(--bg); }
.badge.live { background: var(--accent-soft); color: var(--accent); }

.league-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; text-align: left; transition: transform .15s, border-color .15s; }
@media (hover: hover) { .league-card:hover { border-color: var(--accent); transform: translateY(-2px); } }
.league-icon { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); flex: none; }
.league-icon .icon { width: 30px; height: 30px; }
.league-card-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.team-list { display: flex; flex-direction: column; gap: 8px; }
.team-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); text-align: left; }
@media (hover: hover) { .team-row:hover { background: var(--surface-3); } }
.team-row-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.team-row .icon { color: var(--ink-2); }

.race-list { display: flex; flex-direction: column; gap: 8px; }
.race-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; }
.race-label { font-weight: 700; }

.format-summary { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.problem-list, .issues { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.issues.error { color: var(--danger); font-weight: 600; }
.issues.warn { color: var(--warn); font-weight: 600; }
.issues:empty { display: none; }
.issues-box { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }

.link-banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-color: var(--accent); background: var(--accent-soft); }
.link-banner .icon { color: var(--accent); }
.link-banner div { display: flex; flex-direction: column; }

/* overview */
.sp-head { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sp-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.sp-team { display: flex; flex-direction: column; min-width: 0; }
.sp-team strong { font-size: clamp(16px, 4vw, 22px); line-height: 1.2; overflow-wrap: anywhere; }
.sp-team.right { text-align: right; }
.sp-score { display: flex; flex-direction: column; align-items: center; font-size: clamp(34px, 9vw, 52px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.sp-score .small { font-size: 11px; font-weight: 600; margin-top: 4px; }

.round-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.round-card h2 { font-size: 18px; }
.round-card.state-locked { opacity: .6; }
.state-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); color: var(--ink-2); }
.state-chip .icon { width: 14px; height: 14px; }
.state-lineup .state-chip { background: var(--warn-soft); color: var(--warn); }
.state-playing .state-chip { background: var(--accent); color: var(--accent-ink); }
.state-done .state-chip { background: var(--accent-soft); color: var(--accent); }

.lineup-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .lineup-buttons { grid-template-columns: 1fr; } }
.lineup-slot { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.lineup-slot .btn.block { min-height: 60px; justify-content: flex-start; text-align: left; padding: 8px 14px; }
.lineup-slot.done .btn.block:disabled { opacity: 1; background: var(--accent-soft); color: var(--accent); }
.lineup-btn-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.lineup-btn-text small { font-weight: 500; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.game-list { display: flex; flex-direction: column; gap: 8px; }
.game-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.game-row.clickable { cursor: pointer; }
@media (hover: hover) { .game-row.clickable:hover { background: var(--surface-3); } }
.game-disc { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: var(--ink-2); text-transform: uppercase; letter-spacing: .03em; }
.game-disc .ball.sm { width: 22px; height: 22px; }
.game-line { display: grid; grid-template-columns: 1fr auto 1fr auto; align-items: center; gap: 10px; }
.gp { font-weight: 600; min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.gp.away { text-align: right; }
.gp.won { font-weight: 800; }
.hidden-name { color: var(--ink-2); display: inline-flex; }
.hidden-name .icon { width: 18px; height: 18px; }
.game-score { font-weight: 800; font-size: 18px; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: center; min-width: 64px; }
.game-pp { min-width: 34px; padding: 2px 6px; border-radius: 8px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--surface); }
.game-pp:empty { background: transparent; }
.game-extra { text-align: center; }
.game-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; }

.finish-card.done { padding: 22px; align-items: center; text-align: center; display: flex; flex-direction: column; gap: 6px; border-color: var(--accent); }
.finish-card .time-input { width: auto; min-width: 120px; }

/* lineup */
.gate { padding: 28px 22px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.gate h2 { font-size: 24px; }
.gate-icon { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background: var(--warn-soft); color: var(--warn); }
.gate-icon.ok { background: var(--accent-soft); color: var(--accent); }
.gate-icon .icon { width: 36px; height: 36px; }
.lineup-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-weight: 700; }
.lineup-game { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; border-width: 2px; }
.lineup-game.complete { border-color: var(--accent); }
.player-chip { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; padding: 6px 14px; }
.player-chip small { font-size: 10px; font-weight: 700; opacity: .8; }
.player-chip.elsewhere { opacity: .5; }
.player-chip.repeat:not(.on) { border-color: var(--warn); }
.player-chip.repeat.on { box-shadow: 0 0 0 2px var(--warn); }
.lineup-summary { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lineup-summary li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.lineup-summary .ball.sm { width: 24px; height: 24px; }

/* manual result */
.result-form { display: flex; flex-direction: column; gap: 10px; }
.pair-names { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; }
.pair-names strong:last-child { text-align: right; }
.pair-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.pair-label { font-size: 13px; font-weight: 700; color: var(--ink-2); text-align: center; min-width: 80px; }
.num-input { text-align: center; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* printable Spielbericht */
.report-page { background: var(--bg); }
.report {
  --r-ink: #111; --r-muted: #555; --r-box: #f1f1ee; --r-line: #222; --r-accent: var(--u-accent-l, #1b7a49); --r-pp: #fdf1d3;
  max-width: 820px; margin: 0 auto 32px; padding: 28px 32px; background: #fff; color: var(--r-ink);
  border-radius: 8px; box-shadow: 0 2px 20px rgba(0, 0, 0, .12); font-size: 13px; color-scheme: light;
}
.rp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 3px solid var(--r-accent); padding-bottom: 8px; margin-bottom: 14px; }
.rp-head h1 { font-size: 24px; color: var(--r-accent); }
.rp-sub { color: var(--r-muted); margin-top: 2px; }
.rp-logo { width: 84px; --logo-ink: #1a1a1a; --logo-ring: transparent; }
.rp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px 14px; margin-bottom: 18px; }
.rp-field { grid-column: span 2; display: flex; flex-direction: column; gap: 2px; }
.rp-field.half { grid-column: span 3; }
.rp-field.wide { grid-column: span 4; }
.rp-field:nth-child(2) { grid-column: span 2; }
.rp-label { font-size: 11px; color: var(--r-muted); }
.rp-value { min-height: 26px; padding: 4px 8px; background: var(--r-box); border-bottom: 1.5px solid var(--r-line); font-weight: 600; }
.rp-round { border-top: 2px solid var(--r-line); padding-top: 10px; margin-top: 8px; }
.rp-round h2 { position: relative; text-align: center; font-size: 18px; color: var(--r-accent); margin-bottom: 4px; }
.rp-pp-head { position: absolute; right: 0; top: 4px; font-size: 12px; }
.rp-game { margin: 6px 0 10px; }
.rp-disc { text-align: center; font-weight: 700; color: var(--r-accent); font-size: 12px; margin-bottom: 2px; }
.rp-line { display: grid; grid-template-columns: 1fr 110px 1fr 80px; gap: 12px; align-items: center; }
.rp-box { display: flex; align-items: center; min-height: 28px; padding: 3px 8px; background: var(--r-box); border-bottom: 1.5px solid var(--r-line); font-weight: 600; }
.rp-box.score, .rp-box.small { justify-content: center; }
.rp-box.pp { background: var(--r-pp); justify-content: center; min-width: 80px; }
.rp-pair { display: inline-grid; grid-template-columns: 1fr auto 1fr; gap: 6px; width: 100%; text-align: center; font-variant-numeric: tabular-nums; font-weight: 800; }
.rp-extra { display: flex; justify-content: center; gap: 36px; margin-top: 6px; }
.rp-extra > span { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rp-extra .rp-box { width: 120px; }
.rp-extra small { color: var(--r-muted); font-size: 11px; }
.rp-foot { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; border-top: 2px solid var(--r-line); padding-top: 12px; margin-top: 12px; }
.rp-protest { display: flex; flex-direction: column; gap: 8px; }
.rp-protest > div:first-child { display: flex; align-items: center; gap: 8px; }
.rp-check { display: inline-block; width: 14px; height: 14px; border: 1.5px solid var(--r-line); margin-left: 8px; }
.rp-check.on { background: var(--r-ink); box-shadow: inset 0 0 0 2px #fff; }
.rp-box.text { min-height: 70px; align-items: flex-start; white-space: pre-wrap; font-weight: 500; }
.rp-totals { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; }
.rp-totals > div { display: flex; align-items: center; gap: 10px; font-size: 16px; color: var(--r-accent); }
.rp-signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 34px; }
.rp-signs > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rp-sign-line { width: 100%; height: 32px; background: var(--r-box); border-bottom: 1.5px solid var(--r-line); }
.rp-signs small { font-size: 11px; color: var(--r-muted); }
.rp-races { text-align: center; margin-top: 16px; font-size: 11px; color: var(--r-muted); }

@media (max-width: 640px) {
  .report { padding: 18px 14px; border-radius: 0; font-size: 12px; }
  .rp-grid { grid-template-columns: 1fr 1fr; }
  .rp-field, .rp-field.half, .rp-field.wide, .rp-field:nth-child(2) { grid-column: span 1; }
  .rp-line { grid-template-columns: 1fr 76px 1fr 56px; gap: 6px; }
  .rp-box.pp { min-width: 56px; }
  .rp-foot { grid-template-columns: 1fr; }
  .rp-totals { align-items: stretch; }
  .rp-totals > div { justify-content: space-between; }
}

@media print {
  @page { size: A4; margin: 10mm; }
  body, .report-page { background: #fff !important; }
  .no-print, .toast, .overlay { display: none !important; }
  .report { box-shadow: none; margin: 0; padding: 0; max-width: none; font-size: 11px; }
  .rp-game { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.lineup-game h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.game-actions .btn:not(.primary) { background: var(--surface); }

/* ---------------------------------------------------------------- live tables */
.live-card.on { border-color: var(--accent); }
.live-code { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px; border-radius: 14px; background: var(--accent-soft); }
.code-digits { font-size: clamp(40px, 12vw, 64px); font-weight: 800; letter-spacing: .08em; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1.1; }
.table-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.table-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; }
.table-chip .icon { width: 16px; height: 16px; }
.table-chip.pending { background: var(--surface-2); color: var(--ink-2); }
.live-card > .btn.danger { align-self: center; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); }
.conn-online i { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.conn-online { color: var(--accent); }
.conn-offline i { background: var(--danger); }
.conn-offline { color: var(--danger); }
.conn-connecting i { background: var(--warn); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: middle; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.game-score.is-live { color: var(--accent); }
.game-row.mine { box-shadow: inset 0 0 0 2px var(--accent); }
.join-form p { font-size: 15px; }
.code-input { width: 100%; height: 76px; text-align: center; font-size: 40px; font-weight: 800; letter-spacing: .35em; padding-left: .35em; font-variant-numeric: tabular-nums; border-radius: 16px; border: 2px solid var(--line); background: var(--surface-2); color: var(--ink); }
.code-input:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.join-fields { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: end; }
.table-input { letter-spacing: .05em; padding-left: 0; }
.table-input::placeholder { font-size: 22px; letter-spacing: 0; color: var(--ink-2); opacity: .6; }
.add-row .table-input { height: 56px; font-size: 26px; flex: 0 0 110px; }
@media (max-width: 420px) { .join-fields { grid-template-columns: 1fr; } }
.remote .game-actions .btn { min-height: 44px; }
.warn-text { color: var(--warn); }
.card-head .btn.small { white-space: nowrap; }
.card-head h2 { min-width: 0; }

/* ---------------------------------------------------------------- rules */
.rules { display: flex; flex-direction: column; gap: 12px; }
.rule-sec { padding: 14px 16px; }
.rules.compact .rule-sec { padding: 10px 0; border-bottom: 1px solid var(--line); }
.rule-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.rule-head h2 { font-size: 16px; }
.rule-ref { flex: none; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rule-sec ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; line-height: 1.45; }
.rule-sec li::marker { color: var(--accent); }
.pdf-link { text-decoration: none; }
.rules-list { gap: 10px; }
.rules-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; text-align: left; }
.rules-row .disc-name { flex: 1; font-size: 18px; margin: 0; }
@media (hover: hover) { .rules-row:hover { border-color: var(--accent); } }
.league-icon.small { width: 44px; height: 44px; border-radius: 12px; }
.league-icon.small .icon { width: 24px; height: 24px; }
.dialog .rules.compact { max-height: 60dvh; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.rerack .hint { margin-bottom: 10px; }
.rr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rr-table th, .rr-table td { border: 1px solid var(--line); padding: 8px; vertical-align: top; text-align: left; }
.rr-table thead th { background: var(--accent-soft); color: var(--ink); font-weight: 700; }
.rr-table tbody th { background: var(--surface-2); font-weight: 700; width: 24%; }
.rr-table td.empty { border: none; background: none; }
.rr-table td.empty .rr-na { display: none; }
.rr-corner span { display: block; font-size: 11px; color: var(--ink-2); }
.rr-cell { display: flex; flex-direction: column; gap: 6px; }
.rr-cell > div { display: flex; flex-direction: column; }
.rr-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-2); }
.rr-v { font-weight: 600; }
.rr-na { color: var(--ink-2); }
.rr-stack { display: none; flex-direction: column; gap: 10px; }
.rr-group { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rr-group-head { display: flex; flex-direction: column; padding: 8px 12px; background: var(--accent-soft); }
.rr-case { padding: 8px 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.rr-when { font-size: 13px; font-weight: 700; color: var(--accent); }
.rr-case .rr-cell { flex-direction: row; gap: 16px; }
.rr-case .rr-cell > div { flex: 1; }
@media (max-width: 600px) {
  .rr-table-wrap { display: none; }
  .rr-stack { display: flex; }
}
.dialog .rr-table-wrap { display: none; }
.dialog .rr-stack { display: flex; }

/* innings history */
.innings-table td, .innings-table th { text-align: center; }
.innings-table td.num { text-align: center; }
.innings-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.inn-detail { display: block; font-size: 10px; font-weight: 600; color: var(--ink-2); line-height: 1.1; }
.inn-live { color: var(--accent); background: var(--accent-soft) !important; }
.innings-tile .stat-num .icon { width: 30px; height: 30px; }
.innings-tile { cursor: pointer; }
.result-card > .btn.block { margin-top: 4px; }
.dialog .innings-view .table-wrap { margin: 0; }
.lbl-short { display: none; }
@media (max-width: 520px) {
  .straight-game .center { gap: 8px; }
  .straight-game .center-stats { gap: 6px; }
  .straight-game .stat-tile { min-width: 60px; padding: 6px 8px; }
  .straight-game .stat-num { font-size: 26px; }
  .straight-game .lbl-long { display: none; }
  .straight-game .lbl-short { display: inline; }
  .straight-game .innings-tile { min-width: 46px; padding: 6px; }
  .straight-game .innings-tile .stat-num .icon { width: 24px; height: 24px; }
  .straight-game .clock-face { width: 84px; }
  .straight-game .clock-num { font-size: 28px; }
  .straight-game .clock-label { display: none; }
  .straight-game .clock-controls .icon-btn { width: 36px; height: 36px; }
}
.dialog .innings-table { font-size: 13px; }
.dialog .innings-table th, .dialog .innings-table td { padding: 6px 4px; }
.dialog .innings-table thead th { font-size: 10px; letter-spacing: 0; }
/* result card on narrow screens */
.result-card { min-width: 0; max-width: 100%; }
.result-card .stat-table { table-layout: fixed; }
.result-card .stat-table th, .result-card .stat-table td { overflow-wrap: anywhere; }
.result-actions .btn { min-width: 0; padding: 0 8px; }
@media (max-width: 520px) {
  .result { padding: 10px; place-items: start center; }
  .result-card { padding: 18px 14px; }
  .result-card .stat-table { font-size: 13px; }
  .result-card .stat-table tbody th { font-size: 12px; }
  .result-actions { grid-template-columns: 1fr 1fr; }
  .result-actions .btn.primary { grid-column: 1 / -1; }
  .result-actions .btn .icon { width: 18px; height: 18px; }
}

/* ---------------------------------------------------------------- slimmer center column */
.board { grid-template-columns: 1fr auto 1fr; }
.rack-game .board.no-center { grid-template-columns: 1fr 1fr; }
.straight-game .center-stats { flex-direction: column; width: 100%; }
.straight-game .center-stats .stat-tile { min-width: 0; width: 100%; }
.innings-btn { background: var(--surface); border: 1px solid var(--line); }
.innings-btn .icon { width: 18px; height: 18px; }
@media (orientation: portrait), (max-width: 760px) {
  .rack-game .board.no-center { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .straight-game .center-stats { width: auto; }
  .straight-game .center-stats .stat-tile { flex-direction: row; gap: 8px; justify-content: space-between; min-width: 120px; padding: 6px 12px; }
  .straight-game .center-stats .stat-label { margin-top: 0; }
  .straight-game .innings-btn > span:not(.icon) { display: none; }
  .straight-game .innings-btn { min-height: 44px; padding: 0 10px; }
}
@media (max-width: 520px) {
  .straight-game .center-stats .stat-tile { min-width: 96px; padding: 5px 10px; }
  .straight-game .center-stats .stat-num { font-size: 22px; }
}

/* ---------------------------------------------------------------- club logo watermark */
.panel.club-side { isolation: isolate; }
.club-mark { position: absolute; z-index: 0; pointer-events: none; line-height: 0; }
.club-mark svg { width: 100%; height: 100%; }
.panel .club-mark { left: 50%; top: 50%; width: min(92%, 60vh, 440px); aspect-ratio: 1; transform: translate(-50%, -50%); opacity: .09; }
.panel .club-mark .lg-ball, .panel .club-mark .lg-eight, .panel .club-mark .lg-text, .panel .club-mark .lg-swoosh { fill: var(--ink); stroke: none; }
.panel .club-mark .lg-num-bg, .panel .club-mark .lg-shine { fill: transparent; }
.panel.club-side .score-btn { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.panel.club-side .mini-stats div { background: color-mix(in srgb, var(--surface-2) 75%, transparent); }
.sp-team .eyebrow { display: inline-flex; align-items: center; gap: 6px; }
.sp-team.right .eyebrow { justify-content: flex-end; }
.club-badge { width: 26px; height: 26px; margin: -6px 0; }
.club-badge .lg-text, .club-badge .lg-swoosh { fill: var(--logo-ink); }

/* ---------------------------------------------------------------- club logo (custom) */
.custom-logo { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.custom-logo img { width: 100%; height: 100%; object-fit: contain; }
.hero-logo.custom-logo { height: clamp(108px, 26vw, 168px); }
.about-logo.custom-logo, .empty-logo.custom-logo { height: 96px; }
.rp-logo.custom-logo { height: 84px; }
.club-badge.custom-logo img { width: 26px; height: 26px; }
.panel .club-mark.custom-logo img { filter: grayscale(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .invert-dark:not(.rp-logo) img { filter: invert(1) hue-rotate(180deg); } }
:root[data-theme="dark"] .invert-dark:not(.rp-logo) img { filter: invert(1) hue-rotate(180deg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .panel .club-mark.invert-dark img { filter: grayscale(1) invert(1); } }
:root[data-theme="dark"] .panel .club-mark.invert-dark img { filter: grayscale(1) invert(1); }
.logo-editor { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo-preview { width: 112px; height: 112px; border-radius: 16px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; padding: 10px; flex: none; }
.logo-preview .club-preview { width: 100%; height: 100%; }
.logo-preview .club-preview svg { width: 100%; height: 100%; }
.logo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }

/* club account */
.account-row { display: flex; align-items: center; gap: 12px; }
.row-actions.left { justify-content: flex-start; }

/* ---------------------------------------------------------------- members */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; object-fit: cover; background: var(--accent-soft); color: var(--accent); font-weight: 800; overflow: hidden; }
.avatar.sm { width: 40px; height: 40px; font-size: 15px; }
.avatar.md { width: 56px; height: 56px; font-size: 20px; }
.avatar.lg { width: 96px; height: 96px; font-size: 34px; }
.account-row.as-button { width: 100%; padding: 8px; margin: -8px; border-radius: 12px; text-align: left; }
@media (hover: hover) { .account-row.as-button:hover { background: var(--surface-2); } }
.account-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.login-modes { align-self: stretch; display: grid; grid-template-columns: repeat(3, 1fr); }
.login-modes button { padding: 0 6px; }
.invite-input { letter-spacing: .12em; text-transform: uppercase; font-size: 30px; }
.login-form .dialog-actions { margin-top: 0; }
.invite-code { font: 800 clamp(30px, 9vw, 42px)/1.1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .08em; text-align: center; padding: 16px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); user-select: all; }

.member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.member-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.member-row:disabled { opacity: 1; cursor: default; }
@media (hover: hover) { .member-row:not(:disabled):hover { border-color: var(--accent); } }
.member-row.inactive { opacity: .6; }
.member-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.member-main .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-badges { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.member-badges .badge { margin-left: 0; }

.profile-head { padding: 18px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.profile-main { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 6px; }
.profile-main h2 { font-size: 22px; }
.facts { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.facts dt { color: var(--ink-2); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.member-home .avatar { flex: none; }

/* membership card (credit-card proportions) */
.card-main { align-items: center; }
.member-card {
  width: min(460px, 100%); aspect-ratio: 85.6 / 54; border-radius: 18px; padding: clamp(14px, 4vw, 22px);
  display: grid; grid-template-rows: auto 1fr auto; gap: 10px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 65%, #000));
  box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
}
.member-card.invalid { background: linear-gradient(135deg, #6b6f6c, #3f423f); }
.mc-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mc-logo { width: 40px; height: 40px; border-radius: 10px; background: #fff; padding: 4px; display: inline-flex; flex: none; }
.mc-logo .logo-wrap, .mc-logo svg, .mc-logo img { width: 100%; height: 100%; }
.mc-logo .lg-text, .mc-logo .lg-swoosh { fill: #1a1a1a; }
.mc-club { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.mc-club strong { font-size: clamp(14px, 3.8vw, 17px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-club span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.mc-body { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(10px, 3vw, 16px); align-items: center; min-height: 0; }
.mc-photo { width: clamp(64px, 20vw, 92px); aspect-ratio: 4 / 5; border-radius: 10px; object-fit: cover; background: rgba(255, 255, 255, .2); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.mc-person { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mc-name { font-size: clamp(17px, 5vw, 24px); line-height: 1.1; overflow-wrap: anywhere; }
.mc-no, .mc-role { font-size: 13px; opacity: .9; font-variant-numeric: tabular-nums; }
.mc-qr { width: clamp(72px, 22vw, 104px); background: #fff; border-radius: 10px; padding: 6px; }
.mc-qr .qr, .mc-qr svg { display: block; width: 100%; height: auto; }
.mc-foot { display: flex; justify-content: space-between; align-items: center; }
.mc-status { font-weight: 800; font-size: 14px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .18); }
@media print {
  .card-page .topbar, .card-page .hint, .card-page .row-actions { display: none !important; }
  .member-card { width: 85.6mm; box-shadow: none; border: 1px solid #999; }
}

/* ---------------------------------------------------------------- live view */
.live-status { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); color: var(--ink-2); }
.live-status.on { background: var(--danger); color: #fff; }
.live-status.on .live-dot { margin-right: 2px; }
.strong-line { font-weight: 700; }
.redacted-note { padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.redacted-note p { flex: 1; margin: 0; }
.redacted-note .icon { color: var(--ink-2); }
.game-row.live-now { box-shadow: inset 0 0 0 2px var(--accent); }
.game-disc .badge { margin-left: auto; text-transform: none; letter-spacing: 0; }
.live-link-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.live-link-row > div { flex: 1; display: flex; flex-direction: column; }
.member-picker { display: flex; flex-direction: column; gap: 8px; }
.member-picker .chip { display: inline-flex; align-items: center; gap: 4px; }
.member-picker .chip .icon { width: 16px; height: 16px; }

/* ---------------------------------------------------------------- statistics */
.season-chips .chip { min-height: 38px; }
.stat-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-summary > div { display: flex; flex-direction: column; align-items: center; padding: 10px 6px; border-radius: 12px; background: var(--surface-2); }
.stat-summary strong { font-size: clamp(22px, 6vw, 30px); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-summary span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.disc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.disc-stat { border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.disc-stat-head { display: flex; align-items: center; gap: 8px; }
.disc-stat-head strong { flex: 1; }
.winbar { height: 8px; border-radius: 8px; background: var(--danger-soft); overflow: hidden; }
.winbar i { display: block; height: 100%; background: var(--accent); border-radius: 8px; }
.mini-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; }
.mini-facts div { background: var(--surface-2); border-radius: 10px; padding: 6px 8px; text-align: center; }
.mini-facts dt { font-size: 11px; color: var(--ink-2); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mini-facts dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.recent-title { font-size: 15px; margin-top: 4px; }
.recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.recent-list li { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.recent-list li:last-child { border-bottom: 0; }
.recent-main { display: flex; flex-direction: column; min-width: 0; }
.recent-main strong, .recent-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-score { font-weight: 800; font-variant-numeric: tabular-nums; }
.wl { display: inline-flex; width: 26px; height: 26px; border-radius: 8px; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.wl.w { background: var(--accent-soft); color: var(--accent); }
.wl.l { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 420px) { .stat-summary { grid-template-columns: repeat(2, 1fr); } }

.pending-badge { margin-left: 0; white-space: nowrap; }

/* legal pages */
.legal-text { padding: clamp(18px, 4vw, 28px); display: flex; flex-direction: column; gap: 12px; max-width: 72ch; }
.legal-text h2 { font-size: 18px; margin-top: 8px; }
.legal-text p, .legal-text ul { margin: 0; line-height: 1.55; }
.legal-text ul { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.legal-links { text-align: center; }
.legal-links a { color: inherit; }
.legal-editor textarea { font: 14px/1.5 ui-monospace, "SF Mono", Menlo, monospace; min-height: 180px; }
.dialog:has(.legal-editor) { width: min(760px, 100%); }
.rp-box.rp-draw { font-weight: 800; padding: 3px 12px; }

/* platform: landing, signup, admin panel */
.platform-head { padding: clamp(28px, 7vw, 64px) 0 clamp(20px, 4vw, 36px); text-align: center; background: var(--tint); }
.platform-head .container { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.platform-head h1 { font-size: clamp(26px, 6vw, 40px); margin: 0; }
.platform-logo { height: clamp(52px, 12vw, 76px); width: auto; }
.lede { font-size: clamp(16px, 2.4vw, 19px); color: var(--muted); max-width: 52ch; margin: 0; }
.btn.big { padding: 13px 22px; font-size: 16px; }
.feature-list, .steps { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.feature-list { list-style: none; padding: 0; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; }
.feature-list .icon { color: var(--accent); flex: none; margin-top: 2px; }
.feature-list strong { display: block; }
.feature-list span { color: var(--muted); font-size: 14.5px; }
.steps { padding-left: 20px; }
.steps li { padding-left: 4px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--card); color: inherit; border-radius: 999px; padding: 7px 13px; font: inherit; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.chip-count { font-variant-numeric: tabular-nums; opacity: .8; font-size: 13px; }
.club-card .state-chip.pending { background: var(--warn-tint); color: var(--warn); }
.club-card .state-chip.suspended, .club-card .state-chip.rejected { background: var(--danger-tint); color: var(--danger); }
.kv { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.kv-row { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 10px; font-size: 14.5px; }
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.row-actions.wrap { flex-wrap: wrap; }
.ok-text { color: var(--accent); }
@media (max-width: 480px) { .kv-row { grid-template-columns: 1fr; gap: 0; } }

/* player profile */
.nickname { font-weight: 500; color: var(--muted); margin-left: 8px; font-size: .85em; }
.about-text { margin: 0; white-space: pre-wrap; line-height: 1.5; }
.profile .chip { font-size: 14px; }

/* platform pages use plain cards, which carry no padding of their own */
.page.platform .card:not(.gate):not(.form-card):not(.legal-text) {
  padding: clamp(16px, 3vw, 24px); display: flex; flex-direction: column; gap: 14px;
}
.page.platform main.container { display: flex; flex-direction: column; gap: 16px; padding-block: 20px; }
.club-card .row-actions { margin-top: 2px; }

/* built-in mark (no club logo uploaded yet) */
.default-logo { color: var(--accent); }
.platform-head .default-logo { color: var(--accent); }

/* login gate */
.gate-page main { padding-block: clamp(24px, 8vh, 72px); }
.gate-logo { height: clamp(56px, 14vw, 84px); width: auto; }
.gate .btn.big { width: min(280px, 100%); justify-content: center; }

.turnstile { min-height: 68px; display: flex; align-items: center; }

.club-choice { display: flex; flex-direction: column; gap: 8px; }
.btn.block { width: 100%; justify-content: center; }

.check-row { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.check-row input { width: 18px; height: 18px; }
