@import url("/assets/css/dartsos-scrollbars.css");
@import url("/assets/css/scorer-design-tokens.css");
@import url("/assets/css/scorer-portrait-keypad.css");
@import url("/assets/css/scorer-keypad-tokens.css");
@import url("/assets/css/scorer-typography.css");

/**
 * Kiosk scorer surface styles (darts-manager app.scss subset).
 * Design tokens: /assets/css/scorer-design-tokens.css
 */

main.vk-score-embed {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0 !important;
}

[data-kiosk-tier="desktopTv"] main:not(.vk-score-embed) {
  --scorer-remaining-box-h: 4rem;
  --scorer-remaining-box-fs: 3.25rem;
}

.numeric-display {
  font-family: "Share Tech Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "zero" 1;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.scorer-keypad-ripple {
  touch-action: manipulation;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 0.06s ease-out,
    box-shadow 0.06s ease-out,
    filter 0.06s ease-out;
}

.scorer-keypad-ripple:active:not(:disabled),
.scorer-keypad-ripple.scorer-keypad-ripple--pressed:not(:disabled) {
  transform: scale(0.98);
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.14);
}

.scorer-keypad-ripple:disabled {
  transform: none;
  box-shadow: none;
}

.scorer-keypad-ripple--light:active:not(:disabled),
.scorer-keypad-ripple--light.scorer-keypad-ripple--pressed:not(:disabled) {
  box-shadow: inset 0 0 0 9999px rgba(15, 23, 42, 0.08);
}

.dark .scorer-keypad-ripple--light:active:not(:disabled),
.dark .scorer-keypad-ripple--light.scorer-keypad-ripple--pressed:not(:disabled) {
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.08);
}

.scorer-keypad-ripple--light.scorer-quick-preset-btn:active:not(:disabled),
.scorer-keypad-ripple--light.scorer-quick-preset-btn.scorer-keypad-ripple--pressed:not(:disabled) {
  box-shadow: none;
  transform: scale(0.98);
}

.dark .scorer-keypad-ripple--light.scorer-quick-preset-btn:active:not(:disabled),
.dark .scorer-keypad-ripple--light.scorer-quick-preset-btn.scorer-keypad-ripple--pressed:not(:disabled) {
  box-shadow: none;
}

/**
 * Ink ripple: must paint above keypad labels (`z-[2]`) so the wave is visible on tap.
 * JS inserts this span as the first child; gradient fill comes from inline styles in press-ripple.js.
 */
.scorer-keypad-ripple-wave {
  position: absolute;
  inset: auto;
  border-radius: 50%;
  pointer-events: none;
  z-index: 25;
  flex: none;
  margin: 0;
  transform: scale3d(0, 0, 1);
  transform-origin: center center;
  opacity: 0.55;
  animation: scorer-keypad-ripple-wave 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: transform, opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@keyframes scorer-keypad-ripple-wave {
  from {
    transform: scale3d(0, 0, 1);
    opacity: 0.55;
  }
  35% {
    opacity: 0.42;
  }
  to {
    transform: scale3d(1, 1, 1);
    opacity: 0;
  }
}

/* Slightly snappier wave on Panel pad */
main[data-scorer-theme="panel"] .scorer-keypad-ripple-wave {
  animation-duration: 0.4s;
  animation-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  .scorer-keypad-ripple-wave {
    animation: none;
    opacity: 0 !important;
    transform: scale3d(0, 0, 1) !important;
  }
}

.layout-scorer-landscape-gate {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 250;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  text-align: center;
  background: rgba(10, 10, 12, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
}

/**
 * Do not use Alpine `x-show` on this node: when visible, Alpine sets an inline `display` that beats
 * the `display: none` above and blocks the whole scorer (blank / “won’t load”) for standalone phone URLs.
 * Visibility is controlled only by CSS below + the portrait media query.
 */
main.vk-score-embed .layout-scorer-landscape-gate {
  display: none !important;
}

@media (orientation: portrait) and (min-width: 640px) and (pointer: fine) {
  /* Public kiosk `#view` + classic admin `#admin` (training/challenge/fixture scorer bleed). */
  html:has(#view.layout-scorer-bleed) .layout-scorer-landscape-gate,
  html:has(#admin.layout-scorer-bleed) .layout-scorer-landscape-gate {
    display: flex;
  }
  html:has(#view.layout-scorer-bleed),
  html:has(#admin.layout-scorer-bleed) {
    overflow: hidden;
    height: 100%;
  }
}

/* ----- DartsOS kiosk backdrop (dark logo: near-black + soft emerald/indigo/rose glow) ----- */
:root {
  --dartsos-bg: #010208;
}

html.dark body.public-tv-board-shell {
  background-color: var(--dartsos-bg);
  background-image:
    radial-gradient(circle at 50% 38%, rgba(34, 197, 94, 0.14), transparent 44%),
    radial-gradient(circle at 18% 78%, rgba(99, 102, 241, 0.09), transparent 50%),
    radial-gradient(circle at 82% 72%, rgba(244, 63, 94, 0.08), transparent 52%),
    radial-gradient(120vmax 120vmax at 50% 48%, rgba(6, 10, 20, 0.97), var(--dartsos-bg));
  background-attachment: fixed;
}

html:not(.dark) body.public-tv-board-shell {
  background-color: #eef2f7;
  background-image:
    radial-gradient(circle at 50% 32%, rgba(16, 185, 129, 0.1), transparent 46%),
    radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.06), transparent 52%),
    radial-gradient(circle at 80% 75%, rgba(244, 63, 94, 0.05), transparent 54%),
    linear-gradient(180deg, #f8fafc 0%, #e8edf4 100%);
  background-attachment: fixed;
}

.dartboard-bg-img {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.dartboard-bg-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/assets/branding/watermark-light.png");
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: clamp(320px, 70vmin, 1000px);
  opacity: 0.075;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.dark .dartboard-bg-img::before {
  background-image: url("/assets/branding/watermark-dark.png");
  opacity: 0.085;
}

.dark .public-tv-board-bg.dartboard-bg-img::before {
  opacity: 0.1;
}

@media (min-width: 1280px) {
  .dartboard-bg-img::before {
    background-size: clamp(420px, 60vmin, 1100px);
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .dartboard-bg-img::before {
    background-size: clamp(280px, 60vmin, 900px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dartboard-bg-img {
    filter: none;
  }
  .dartboard-bg-img::before {
    filter: none;
  }
}

/* Venue / tablet landscape: full-width keypad + side history (quick-match + training embed). */
@media (min-width: 768px) {
  main.scorer-tablet-wide {
    max-width: 100% !important;
    padding-inline: 0.25rem !important;
  }

  main.scorer-tablet-wide .scorer-keypad-history-grid {
    margin-inline: 0 !important;
    max-width: none !important;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) min(16.5rem, 30%) !important;
    align-items: start;
    gap: 0.65rem;
  }

  main.scorer-tablet-wide .scorer-keypad-history-grid > section {
    grid-column: 1 / 2 !important;
    min-width: 0;
  }

  main.scorer-tablet-wide .scorer-keypad-history-grid > aside {
    grid-column: 2 / 3 !important;
    position: sticky;
    top: 0.35rem;
    align-self: start;
    max-height: calc(100dvh - var(--scorer-chrome-offset, 8rem));
    overflow-y: auto;
    min-width: 0;
  }

  main.scorer-tablet-wide .scorer-keypad-history-grid--no-aside {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  main.scorer-tablet-wide .scorer-keypad-history-grid--no-aside > section {
    grid-column: 1 / -1 !important;
  }

  main.scorer-tablet-wide[data-scorer-theme="sidecar"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) !important;
    align-items: stretch;
  }

  /* Panel: side history column sized in scorer-layout-themes.css (4fr keypad + 1fr history). */
  main.scorer-tablet-wide[data-scorer-theme="panel"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) {
    grid-template-columns: minmax(0, 4fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    align-items: stretch !important;
  }

  main.scorer-tablet-wide[data-scorer-theme="panel"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) > section {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
  }

  main.scorer-tablet-wide[data-scorer-theme="panel"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) > aside {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
    max-height: none !important;
  }

  main.scorer-tablet-wide .scorer-history-scroll {
    max-height: calc(100dvh - var(--scorer-chrome-offset, 8rem)) !important;
  }

  main.scorer-tablet-wide[data-scorer-theme="panel"] .scorer-history-scroll {
    max-height: none !important;
  }
}

@media (min-width: 981px) {
  main.scorer-tablet-wide .scorer-keypad-history-grid {
    grid-template-columns: minmax(0, 1fr) min(18rem, 26%) !important;
    gap: 0.85rem;
  }

  main.scorer-tablet-wide[data-scorer-theme="panel"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) {
    display: grid !important;
    grid-template-columns: minmax(0, 4fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
  }
}

/* Wide tablet / 1280-frame safe width: 4+2 history columns; 6-col keypad with icon util buttons. */
@media (min-width: 1152px) {
  main.scorer-tablet-wide .scorer-keypad-history-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 0.85rem;
  }

  main.scorer-tablet-wide .scorer-keypad-history-grid > section {
    grid-column: 1 / 5 !important;
    min-width: 0;
  }

  main.scorer-tablet-wide .scorer-keypad-history-grid > aside {
    grid-column: 5 / 7 !important;
    min-width: 0;
  }

  main.scorer-tablet-wide[data-scorer-theme="sidecar"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) !important;
  }

  main.scorer-tablet-wide[data-scorer-theme="sidecar"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) > section {
    grid-column: 1 / 2 !important;
  }

  main.scorer-tablet-wide[data-scorer-theme="sidecar"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) > aside {
    grid-column: 2 / 3 !important;
  }

  main.scorer-tablet-wide[data-scorer-theme="panel"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) {
    display: grid !important;
    grid-template-columns: minmax(0, 4fr) minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
  }

  main.scorer-tablet-wide[data-scorer-theme="panel"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) > section {
    grid-column: 1 / 2 !important;
    grid-row: 1 / 2 !important;
  }

  main.scorer-tablet-wide[data-scorer-theme="panel"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) > aside {
    grid-column: 2 / 3 !important;
    grid-row: 1 / 2 !important;
  }

  main.scorer-tablet-wide .scorer-keypad-history-grid--no-aside {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  main.scorer-tablet-wide .scorer-keypad-history-grid--no-aside > section {
    grid-column: 1 / -1 !important;
  }

  main.scorer-tablet-wide
    .kiosk-scorer-keypad-layer.kiosk-mobile-portrait-keypad-grid.grid-cols-6:not(.kiosk-scorer-keypad-quick-overlay)
    .scorer-keypad-cell-zero {
    grid-column: 4 / 5;
  }

  main.scorer-tablet-wide
    .kiosk-scorer-keypad-layer.kiosk-mobile-portrait-keypad-grid.grid-cols-6:not(.kiosk-scorer-keypad-quick-overlay)
    .scorer-keypad-util--back {
    grid-column: 5 / 6;
  }

  main.scorer-tablet-wide
    .kiosk-scorer-keypad-layer.kiosk-mobile-portrait-keypad-grid.grid-cols-6:not(.kiosk-scorer-keypad-quick-overlay)
    .scorer-keypad-util--clear {
    grid-column: 6 / 7;
  }

  main.scorer-tablet-wide .scorer-keypad-util-btn .scorer-keypad-util-label {
    display: none !important;
  }
}

main.scorer-tablet-wide .scorer-action-btn {
  letter-spacing: 0.05em;
}

main.scorer-tablet-wide .scorer-action-btn--enter {
  font-size: 1.125rem;
}

main.scorer-tablet-wide .scorer-action-btn--undo {
  font-size: 0.8125rem;
  padding-inline: 0.375rem;
  gap: 0.35rem;
}

main.scorer-tablet-wide .scorer-action-btn--undo .scorer-action-btn-icon {
  font-size: 1rem !important;
}

main.scorer-tablet-wide .scorer-match-scoreboard__primary-label {
  display: none !important;
}

main.scorer-tablet-wide .scorer-match-scoreboard__primary-num {
  font-size: var(--scorer-scoreboard-primary-fs, clamp(3.35rem, 6.1vw, 4.35rem));
  line-height: 0.95;
}

main.scorer-tablet-wide .scorer-match-scoreboard__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 0.8rem;
  align-items: center;
}

main.scorer-tablet-wide .scorer-match-scoreboard__panel .scorer-match-scoreboard__identity {
  grid-column: 1 / -1;
}

main.scorer-tablet-wide .scorer-match-scoreboard__panel .scorer-match-scoreboard__primary {
  grid-column: 2;
  grid-row: 2;
  margin-top: 0.2rem;
}

main.scorer-tablet-wide .scorer-match-scoreboard__panel .scorer-match-scoreboard__visits {
  grid-column: 1;
  grid-row: 2;
  margin-top: 0.2rem;
  justify-content: flex-start;
}

main.scorer-tablet-wide .scorer-match-scoreboard__panel--away .scorer-match-scoreboard__primary {
  grid-column: 1;
  text-align: left;
}

main.scorer-tablet-wide .scorer-match-scoreboard__panel--away .scorer-match-scoreboard__visits {
  grid-column: 2;
  justify-content: flex-end;
}

main.scorer-tablet-wide {
  --scorer-remaining-box-h: 8.25rem;
  --scorer-remaining-box-fs: clamp(5.55rem, 12vw, 7.95rem);
  --scorer-remaining-compact-box-h: 6.75rem;
  --scorer-remaining-compact-box-fs: clamp(4.05rem, 9vw, 5.55rem);
  --scorer-player-card-h: 12rem;
}

main.scorer-tablet-wide .scorer-player-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.55rem;
}

main.scorer-tablet-wide .vk-embed-player-card .scorer-player-card__body {
  display: flex;
  grid-template-columns: unset;
}

main.scorer-tablet-wide .scorer-player-card__identity {
  grid-column: 1;
}

main.scorer-tablet-wide .vk-embed-player-card .scorer-player-card__identity {
  grid-column: unset;
}

main.scorer-tablet-wide .scorer-player-card__visits {
  grid-column: 2;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.2rem;
}

main.scorer-tablet-wide .vk-embed-player-card .scorer-player-card__visits {
  grid-column: unset;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

@media (min-width: 768px) {
  main.scorer-tablet-wide .scorer-keypad-digit:not(.scorer-keypad-digit--portrait),
  main.scorer-tablet-wide .scorer-keypad-util-btn:not(.scorer-keypad-digit--portrait) {
    min-height: 5rem;
    font-size: 1.85rem;
  }
}

@media (min-width: 640px) {
  main.scorer-tablet-wide .scorer-action-btn--enter {
    font-size: 1.35rem;
  }

  main.scorer-tablet-wide .scorer-action-btn--undo {
    font-size: 0.875rem;
  }

  main.scorer-tablet-wide .scorer-action-btn--undo .scorer-action-btn-icon {
    font-size: 1.125rem !important;
  }
}

/* Venue quick-match / training embed: compact score strip */
.vk-embed-venue-score-header {
  padding-top: max(1px, env(safe-area-inset-top, 0px)) !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.vk-embed-venue-score-header .vk-embed-score-header-inner {
  padding-top: 0.125rem;
  padding-bottom: 0;
}

.vk-embed-venue-score-header .vk-embed-score-header-row > .scorer-match-header__board-wrap {
  padding-top: 0;
  padding-bottom: 0;
}

.vk-embed-venue-score-header .vk-embed-score-center {
  gap: 0.625rem;
}

@media (min-width: 640px) {
  .vk-embed-venue-score-header .vk-embed-score-center {
    gap: 0.875rem;
  }
}

@media (min-width: 768px) {
  .vk-embed-venue-score-header .vk-embed-score-center {
    gap: 1.125rem;
  }
}

.vk-embed-venue-score-header .vk-embed-score-num {
  font-size: 1.125rem;
  line-height: 1;
}

@media (min-width: 640px) {
  .vk-embed-venue-score-header .vk-embed-score-num {
    font-size: 1.35rem;
  }
}

.vk-embed-venue-score-header .vk-embed-legs-pill {
  min-width: 2.85rem;
  max-width: 5.25rem;
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
  margin-inline: 0.125rem;
}

.vk-embed-venue-score-header .vk-embed-legs-pill .scorer-match-header__race-score {
  font-size: 0.8125rem;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  text-transform: none;
}

.vk-embed-venue-score-header .vk-embed-header-bar {
  min-height: var(--scorer-header-h, 3.25rem);
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}

.vk-embed-venue-score-header .vk-embed-header-action {
  min-height: var(--scorer-header-action-min, 2.9rem);
  min-width: var(--scorer-header-action-min, 2.9rem);
}

@media (min-width: 640px) {
  .vk-embed-venue-score-header .vk-embed-header-action {
    min-height: var(--scorer-header-action-min, 3rem);
    min-width: var(--scorer-header-action-min, 3rem);
  }
}

.scorer-match-header--venue-embed-two-btn {
  height: auto;
  min-height: var(--scorer-header-h, 3.25rem);
  max-height: none;
}

main.vk-score-embed > section,
main.vk-score-embed > .scorer-live-body {
  gap: 0.125rem !important;
}

main.vk-score-embed .scorer-player-strip,
main.vk-score-embed .vk-embed-player-strip {
  gap: 0.25rem !important;
  margin-bottom: 0 !important;
  flex: 0 0 auto;
  min-height: 0;
  max-height: var(--scorer-player-strip-max);
  overflow-x: hidden;
  overflow-y: auto;
}

main.vk-score-embed .vk-embed-player-card,
main.vk-score-embed .scorer-player-card {
  min-height: var(--scorer-player-card-h) !important;
  max-height: var(--scorer-player-card-h);
  flex: 0 0 auto;
}

/* Tier is on <main> — beat generic embed chrome so remaining scores can scale up */
main.vk-score-embed.scorer-tablet-wide[data-kiosk-tier="tabletLandscape"],
main.vk-score-embed.scorer-tablet-wide[data-kiosk-tier="desktopTv"] {
  --scorer-player-strip-max: 22dvh;
  --scorer-player-card-h: 13.5rem;
  --scorer-remaining-box-h: 8.25rem;
  --scorer-remaining-box-fs: clamp(5.55rem, 12vw, 7.95rem);
  --scorer-remaining-compact-box-h: 6.75rem;
  --scorer-remaining-compact-box-fs: clamp(4.05rem, 9vw, 5.55rem);
  --vk-embed-player-avatar: clamp(4.75rem, 10dvh, 5.5rem);
  --vk-embed-player-name-fs: clamp(1.125rem, 2.5dvh, 1.625rem);
  --vk-embed-visit-pill-fs: clamp(1.05rem, 2.2dvh, 1.375rem);
  --vk-embed-visit-pill-min: 2.85rem;
  --vk-embed-visit-pill-h: 2.5rem;
}

/* Four singles on tablet: four player rows — compact remaining boxes so roster + keypad fit. */
main.vk-score-embed.scorer-tablet-wide.scorer-tablet-wide--four-singles[data-kiosk-tier="tabletLandscape"],
main.vk-score-embed.scorer-tablet-wide.scorer-tablet-wide--four-singles[data-kiosk-tier="desktopTv"] {
  --scorer-player-card-h: 9.25rem;
  --scorer-remaining-box-h: 5.25rem;
  --scorer-remaining-box-fs: clamp(3.1rem, 7.5vw, 4.35rem);
  --scorer-remaining-compact-box-h: 4.5rem;
  --scorer-remaining-compact-box-fs: clamp(2.75rem, 6vw, 3.5rem);
  --vk-embed-player-avatar: clamp(3.35rem, 7dvh, 4.15rem);
  --vk-embed-player-name-fs: clamp(0.95rem, 2dvh, 1.15rem);
  --vk-embed-visit-pill-fs: clamp(0.875rem, 1.75dvh, 1.05rem);
  --vk-embed-visit-pill-min: 2.2rem;
  --vk-embed-visit-pill-h: 1.95rem;
}

main.vk-score-embed.scorer-tablet-wide.scorer-tablet-wide--four-singles .vk-embed-player-card {
  padding: 0.35rem 0.5rem;
  column-gap: 0.5rem;
}

main.vk-score-embed.scorer-tablet-wide.scorer-tablet-wide--four-singles .scorer-player-card__player-stack {
  gap: 0.28rem;
}

main.vk-score-embed.scorer-tablet-wide.scorer-tablet-wide--four-singles .scorer-player-card__visits {
  gap: 0.3rem;
}

main.vk-score-embed.scorer-tablet-wide .scorer-remaining-box {
  min-width: max(3.25rem, calc(var(--scorer-remaining-box-fs) * 1.35));
}

main.vk-score-embed.scorer-tablet-wide .scorer-remaining-display {
  font-size: var(--scorer-remaining-box-fs) !important;
  line-height: 0.95;
}

main.vk-score-embed .scorer-keypad-zone,
main.vk-score-embed .vk-embed-keypad-block {
  gap: 0.25rem !important;
  margin-top: 0 !important;
  flex: 1 1 auto;
  min-height: 0;
}

main.vk-score-embed .scorer-match-scoreboard {
  flex: 0 0 auto;
  min-height: 0;
  /* margin-top: 0.375rem; */
}

@media (orientation: landscape) {
  .vk-embed-venue-score-header .vk-embed-checkout-line {
    display: none !important;
  }
}

/* ----- Match header (minimal strip — all scorers) ----- */

.scorer-match-header {
  flex-shrink: 0;
  height: var(--scorer-header-h);
  min-height: var(--scorer-header-h);
  max-height: var(--scorer-header-h);
  overflow: hidden;
  --smh-accent: rgb(52 211 153);
  --smh-home: rgb(16 185 129);
  --smh-away: rgb(56 189 248);
  --smh-shell-bg: linear-gradient(180deg, rgb(15 23 42 / 0.98) 0%, rgb(30 41 59 / 0.96) 42%, rgb(15 23 42 / 0.99) 100%);
  --smh-shell-edge: rgb(255 255 255 / 0.12);
  --smh-shell-glow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 8px 28px rgb(0 0 0 / 0.38);
  --smh-score-bg: linear-gradient(180deg, rgb(51 65 85 / 0.92) 0%, rgb(30 41 59 / 0.98) 100%);
  --smh-score-edge: rgb(255 255 255 / 0.14);
  --smh-race-bg: linear-gradient(180deg, rgb(2 6 23) 0%, rgb(15 23 42) 100%);
  --smh-race-text: rgb(248 250 252);
  --smh-race-sub: rgb(148 163 184);
  --smh-action-text: rgb(226 232 240);
  --smh-action-hover: rgb(255 255 255 / 0.08);
}

.scorer-match-header--minimal .scorer-match-header__shell {
  height: 100%;
  border-radius: 0.5rem;
  box-shadow: none;
  border-color: rgb(148 163 184 / 0.35);
  background: rgb(248 250 252 / 0.98);
}

.dark .scorer-match-header--minimal .scorer-match-header__shell {
  border-color: rgb(255 255 255 / 0.1);
  background: rgb(23 23 23 / 0.95);
}

.scorer-match-header--minimal .scorer-match-header__shell::after {
  display: none;
}

.scorer-match-header--minimal .scorer-match-header__row {
  height: 100%;
  align-items: center;
}

.scorer-match-header--minimal .scorer-match-header__board-wrap {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 0.35rem;
  height: 100%;
}

.scorer-match-header--minimal .scorer-match-header__board {
  gap: 0.4rem;
}

.scorer-match-header--minimal .scorer-match-header__score-box {
  min-width: 2.15rem;
  padding: 0.15rem 0.35rem;
  border-radius: 0.45rem;
  box-shadow: none;
}

.scorer-match-header--minimal .scorer-match-header__score-num,
.scorer-match-header--minimal .vk-embed-score-num {
  font-size: 1rem;
  font-weight: 800;
}

@media (min-width: 640px) {
  .scorer-match-header--minimal .scorer-match-header__score-num,
  .scorer-match-header--minimal .vk-embed-score-num {
    font-size: 1.125rem;
  }
}

.scorer-match-header--minimal .scorer-match-header__race,
.scorer-match-header--minimal .vk-embed-legs-pill {
  min-width: 2.35rem;
  max-width: 3.5rem;
  padding: 0.1rem 0.25rem;
}

.scorer-match-header--minimal .scorer-match-header__race-label,
.scorer-match-header--minimal .vk-embed-legs-pill > span:first-child {
  font-size: 0.5rem;
}

.scorer-match-header--minimal .scorer-match-header__race-sub,
.scorer-match-header--minimal .vk-embed-legs-pill > span:nth-child(2) {
  font-size: 0.4375rem;
}

.scorer-match-header--minimal .scorer-match-header__meta--inline {
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  /* margin-left: 0.5rem;
  padding-left: 0.65rem; */
  /* border-left: 1px solid rgb(148 163 184 / 0.35); */
  text-align: left;
}

.dark .scorer-match-header--minimal .scorer-match-header__meta--inline {
  border-left-color: rgb(255 255 255 / 0.1);
}

@media (min-width: 1024px) {
  .scorer-match-header--minimal .scorer-match-header__meta--inline {
    display: flex;
  }
}

.scorer-match-header--minimal .scorer-match-header__meta--inline .scorer-match-header__checkout {
  max-width: none;
  white-space: nowrap;
}

.scorer-match-header--minimal .scorer-match-header__team--embed-hidden {
  display: none !important;
}

.scorer-match-header--minimal .scorer-match-header__action,
.scorer-match-header--minimal .vk-embed-header-action {
  min-height: var(--scorer-header-h);
  min-width: 2.5rem;
  padding: 0 0.5rem;
}

.scorer-match-header--minimal .scorer-match-header__action.scorer-match-header__action--rail {
  align-self: center;
  height: 2.15rem;
  width: 2.15rem;
  min-height: 2.15rem;
  min-width: 2.15rem;
  padding: 0;
}

@media (min-width: 768px) {
  .scorer-match-header--minimal .scorer-match-header__action.scorer-match-header__action--rail {
    height: 2.35rem;
    width: 2.35rem;
    min-height: 2.35rem;
    min-width: 2.35rem;
  }
}

.scorer-match-header--minimal .scorer-match-header__menu-btn {
  min-height: var(--scorer-header-h);
  min-width: 2.5rem;
}

.scorer-match-header--minimal .scorer-match-header__menu {
  border-left: 1px solid var(--smh-shell-edge);
  border-right: 0;
}

.scorer-match-header--menu-open {
  overflow: visible;
}

.scorer-match-header--menu-open .scorer-match-header__shell,
.scorer-match-header--menu-open .scorer-match-header__row {
  overflow: visible;
}

@media (max-width: 639px) {
  .scorer-match-header--menu-open .scorer-match-header__menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 115;
    border: 0;
    background: rgb(2 6 23 / 0.35);
    padding: 0;
    cursor: default;
  }

  .scorer-match-header--menu-open .scorer-match-header__dropdown {
    position: fixed;
    top: calc(max(2px, env(safe-area-inset-top, 0px)) + var(--scorer-header-h, 3rem) + 0.35rem);
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    left: auto;
    z-index: 120;
    min-width: min(18rem, calc(100vw - 1rem));
    max-width: calc(100vw - 1rem);
  }

  .scorer-match-header--menu-open {
    z-index: 120;
  }
}

/* Mobile phone scorer: legs/sets pill + header meta; no ☰ menu. */
.scorer-match-header--mobile-phone {
  overflow: visible;
}

.scorer-match-header--mobile-phone .scorer-match-header__menu {
  display: none !important;
}

.scorer-match-header--mobile-phone .scorer-match-header__shell,
.scorer-match-header--mobile-phone .scorer-match-header__row {
  overflow: visible;
}

.scorer-match-header--mobile-phone .scorer-match-header__actions {
  display: flex !important;
  align-items: stretch;
  border-left: 1px solid var(--smh-shell-edge);
}

.scorer-match-header--mobile-phone .scorer-match-header__action-label {
  display: none;
}

.scorer-match-header--mobile-phone .scorer-match-header__meta--inline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.05rem;
  margin: 0;
  padding: 0;
  text-align: left;
}

.scorer-match-header--mobile-phone .scorer-match-header__meta--inline .scorer-match-header__checkout {
  max-width: 100%;
  white-space: normal;
  font-size: 0.625rem;
  line-height: 1.25;
}

@media (max-width: 767px) {
  main:not(.scorer-tablet-wide) .scorer-match-header--minimal .scorer-match-header__menu {
    display: none !important;
  }

  main:not(.scorer-tablet-wide) .scorer-match-header--minimal .scorer-match-header__actions {
    display: flex !important;
    align-items: stretch;
    border-left: 1px solid var(--smh-shell-edge);
  }

  main:not(.scorer-tablet-wide) .scorer-match-header--minimal .scorer-match-header__action-label {
    display: none;
  }

  main:not(.scorer-tablet-wide) .scorer-match-header--minimal .scorer-match-header__meta--inline {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.05rem;
    margin: 0;
    padding: 0;
    text-align: left;
  }

  main:not(.scorer-tablet-wide) .scorer-match-header--minimal .scorer-match-header__meta--inline .scorer-match-header__checkout {
    max-width: 100%;
    white-space: normal;
    font-size: 0.625rem;
    line-height: 1.25;
  }

  main:not(.scorer-tablet-wide) .scorer-match-header--minimal .scorer-match-header__actions .scorer-match-header__action[aria-label="Close"],
  main:not(.scorer-tablet-wide) .scorer-match-header--minimal .scorer-match-header__actions .scorer-match-header__action[title="Close"] {
    display: none !important;
  }
}

.scorer-match-header--mobile-phone.scorer-match-header--menu-open {
  z-index: 120;
}

.scorer-match-header--mobile-phone .scorer-match-header__menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 115;
  border: 0;
  background: rgb(2 6 23 / 0.35);
  padding: 0;
  cursor: default;
}

.scorer-match-header--mobile-phone .scorer-match-header__dropdown {
  position: fixed;
  top: calc(max(2px, env(safe-area-inset-top, 0px)) + var(--scorer-header-h, 3rem) + 0.35rem);
  right: max(0.5rem, env(safe-area-inset-right, 0px));
  left: auto;
  z-index: 120;
  min-width: min(18rem, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
}

.scorer-match-header__fullscreen-btn {
  display: none;
  shrink: 0;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: var(--scorer-header-h, 2.85rem);
  min-width: 2.5rem;
  border: 0;
  border-left: 1px solid var(--smh-shell-edge);
  background: transparent;
  padding: 0 0.65rem;
  font-size: 1rem;
  color: var(--smh-action-text);
  transition: background-color 0.15s ease;
}

.scorer-match-header__fullscreen-btn:hover {
  background: var(--smh-action-hover);
}

.scorer-match-header__rail-btn {
  display: none;
  shrink: 0;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: var(--scorer-header-h, 2.85rem);
  min-width: 2.5rem;
  border: 0;
  border-left: 1px solid var(--smh-shell-edge);
  background: transparent;
  padding: 0 0.65rem;
  font-size: 1rem;
  color: var(--smh-action-text);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.scorer-match-header__rail-btn:hover {
  background: var(--smh-action-hover);
}

.scorer-match-header__rail-btn[aria-pressed='true'] {
  color: rgb(52 211 153);
}

.scorer-match-header--mobile-phone .scorer-match-header__rail-btn {
  display: inline-flex;
}

.scorer-match-header--mobile-phone .scorer-match-header__fullscreen-btn {
  display: inline-flex;
}

.scorer-match-header--mobile-phone .scorer-match-header__actions .scorer-match-header__action[aria-label="Close"],
.scorer-match-header--mobile-phone .scorer-match-header__actions .scorer-match-header__action[title="Close"] {
  display: none !important;
}

/* Venue training embed: compact sky brand on the left (mobile phone header). */
.scorer-match-header__embed-brand {
  display: none;
}

.scorer-match-header--mobile-phone.scorer-match-header--training-embed .scorer-match-header__embed-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  shrink: 0;
  min-height: var(--scorer-header-h, 2.85rem);
  padding-inline: 0.35rem 0.55rem;
  border-right: 1px solid var(--smh-shell-edge);
}

.scorer-match-header__embed-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  width: 2rem;
  shrink: 0;
  border-radius: 0.55rem;
  background: linear-gradient(to bottom right, rgb(3 105 161), rgb(2 132 199), rgb(7 89 133));
  box-shadow: 0 1px 2px rgb(12 74 110 / 0.2), inset 0 0 0 1px rgb(12 74 110 / 0.15);
  color: rgb(255 255 255);
  font-size: 0.875rem;
}

.scorer-match-header__embed-brand-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(12 74 110);
  white-space: nowrap;
}

.scorer-match-header--mobile-phone.scorer-match-header--training-embed .scorer-match-header__board-wrap {
  display: flex !important;
  min-width: 0;
  flex: 1;
}

@media (prefers-color-scheme: dark) {
  .scorer-match-header__embed-brand-label {
    color: rgb(186 230 253);
  }

  .scorer-match-header__embed-brand-icon {
    background: linear-gradient(to bottom right, rgb(56 189 248), rgb(125 211 252), rgb(14 165 233));
    color: rgb(8 47 73);
  }
}

.scorer-match-header--minimal .scorer-match-header__fullscreen-btn {
  min-height: var(--scorer-header-h);
}

.scorer-match-header__race-slot {
  border-right: 1px solid var(--smh-shell-edge);
}

.scorer-match-header__race-slot .scorer-match-header__race,
.scorer-match-header__race-slot .scorer-match-header__race--inline {
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  max-height: 36px;
  min-width: 0;
  max-width: none !important;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.scorer-match-header--minimal .scorer-match-header__race-slot .scorer-match-header__race,
.scorer-match-header--minimal .scorer-match-header__race-slot .vk-embed-legs-pill {
  min-width: 0 !important;
  max-width: none !important;
}

.scorer-match-header__race-slot .scorer-match-header__race-label,
.scorer-match-header__race-slot .scorer-match-header__race-score,
.scorer-match-header__race-slot .vk-embed-legs-pill > .scorer-match-header__race-label,
.scorer-match-header__race-slot .vk-embed-legs-pill > .scorer-match-header__race-score {
  margin-top: 0 !important;
  width: auto !important;
  flex: 0 0 auto;
  font-size: 0.6875rem !important;
  font-weight: 700 !important;
  line-height: 1.2;
  letter-spacing: 0.04em;
  color: var(--smh-race-text);
  text-transform: uppercase;
}

.scorer-match-header--mobile-phone .scorer-match-header__race-slot .scorer-match-header__race-label,
.scorer-match-header--mobile-phone .scorer-match-header__race-slot .vk-embed-legs-pill > .scorer-match-header__race-label {
  font-size: 0.5625rem !important;
  letter-spacing: 0.1em;
  color: var(--smh-race-sub);
}

.scorer-match-header--mobile-phone .scorer-match-header__race-slot .scorer-match-header__race-score,
.scorer-match-header--mobile-phone .scorer-match-header__race-slot .vk-embed-legs-pill > .scorer-match-header__race-score {
  font-size: 0.8125rem !important;
  font-weight: 800 !important;
  letter-spacing: 0;
  text-transform: none;
}

.scorer-match-header__race-slot .scorer-match-header__race-score {
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.scorer-match-header__dropdown-item--disabled,
.scorer-match-header__dropdown-item:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__throw-badge {
  display: none !important;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 0.35rem;
  row-gap: 0.2rem;
  padding: 0.5rem 0.65rem;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__identity {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__primary {
  grid-column: 2;
  grid-row: 1;
  margin-top: 0;
  align-self: center;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__visits {
  grid-column: 1 / -1;
  grid-row: 2;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__panel--away {
  grid-template-columns: auto minmax(0, 1fr);
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__panel--away .scorer-match-scoreboard__identity {
  grid-column: 2;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__panel--away .scorer-match-scoreboard__primary {
  grid-column: 1;
  grid-row: 1;
  text-align: left;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__avatar {
  width: 2.25rem;
  height: 2.25rem;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__identity-text {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__panel--away .scorer-match-scoreboard__identity-text {
  flex: 1 1 0;
  min-width: 0;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__role {
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__primary-num {
  font-size: clamp(1.75rem, 9vw, 2.5rem);
  line-height: 1;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__name {
  font-size: 0.75rem;
}

.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__primary-label,
.scorer-scoreboard-slot--mobile-phone .scorer-match-scoreboard__side-stats {
  display: none !important;
}

.scorer-match-header--minimal .scorer-match-header__actions {
  border-left: 1px solid var(--smh-shell-edge);
  border-right: 0;
}

.dark .scorer-match-header {
  --smh-accent: rgb(52 211 153);
  --smh-home: rgb(52 211 153);
  --smh-away: rgb(125 211 252);
  --smh-shell-bg: linear-gradient(180deg, rgb(15 23 42 / 0.98) 0%, rgb(30 41 59 / 0.96) 42%, rgb(2 6 23 / 0.99) 100%);
  --smh-shell-edge: rgb(255 255 255 / 0.12);
  --smh-shell-glow: inset 0 1px 0 rgb(255 255 255 / 0.08), 0 8px 28px rgb(0 0 0 / 0.45);
  --smh-score-bg: linear-gradient(180deg, rgb(51 65 85 / 0.92) 0%, rgb(30 41 59 / 0.98) 100%);
  --smh-score-edge: rgb(255 255 255 / 0.14);
  --smh-race-bg: linear-gradient(180deg, rgb(2 6 23) 0%, rgb(15 23 42) 100%);
  --smh-race-text: rgb(248 250 252);
  --smh-race-sub: rgb(148 163 184);
  --smh-action-text: rgb(226 232 240);
  --smh-action-hover: rgb(255 255 255 / 0.08);
}

html:not(.dark) .scorer-match-header {
  --smh-shell-bg: linear-gradient(180deg, rgb(248 250 252) 0%, rgb(241 245 249) 48%, rgb(226 232 240 / 0.95) 100%);
  --smh-shell-edge: rgb(148 163 184 / 0.45);
  --smh-shell-glow: inset 0 1px 0 rgb(255 255 255 / 0.9), 0 4px 18px rgb(15 23 42 / 0.12);
  --smh-score-bg: linear-gradient(180deg, rgb(255 255 255) 0%, rgb(248 250 252) 100%);
  --smh-score-edge: rgb(148 163 184 / 0.5);
  --smh-action-text: rgb(51 65 85);
  --smh-action-hover: rgb(241 245 249);
}

html:not(.dark) .scorer-match-header__team:first-of-type {
  color: rgb(4 120 87);
  background: rgb(16 185 129 / 0.12);
}

html:not(.dark) .scorer-match-header__team:last-of-type {
  color: rgb(3 105 161);
  background: rgb(56 189 248 / 0.12);
}

.scorer-match-header__shell {
  position: relative;
  border: 1px solid var(--smh-shell-edge);
  border-radius: 0.875rem;
  background: var(--smh-shell-bg);
  box-shadow: var(--smh-shell-glow);
  overflow: hidden;
}

.scorer-match-header__shell::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgb(234 179 8 / 0.75), transparent);
  pointer-events: none;
}

@media (min-width: 640px) {
  .scorer-match-header__shell {
    border-radius: 1rem;
  }
}

.scorer-match-header__row {
  display: flex;
  min-width: 0;
  align-items: stretch;
}

.scorer-match-header__board-wrap {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.3rem 0.4rem;
  /* Flex middle column must not steal taps meant for header action buttons. */
  pointer-events: none;
}

.scorer-match-header__board-wrap > * {
  pointer-events: auto;
}

.scorer-match-header__program {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.625rem;
  border: 1px solid rgb(139 92 246 / 0.35);
  background: linear-gradient(
    90deg,
    rgb(46 16 101 / 0.92) 0%,
    rgb(10 10 10 / 0.88) 100%
  );
}

.scorer-match-header__program-primary {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(221 214 254);
}

.scorer-match-header__program-secondary {
  margin: 0;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.25;
  color: rgb(237 233 254 / 0.92);
}

@media (min-width: 640px) {
  .scorer-match-header__program {
    padding: 0.3rem 0.65rem;
    border-radius: 0.75rem;
  }

  .scorer-match-header__program-primary {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
  }

  .scorer-match-header__program-secondary {
    font-size: 0.6875rem;
  }
}

@media (min-width: 640px) {
  .scorer-match-header__board-wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.65rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__board-wrap {
    padding: 0.55rem 0.85rem;
    gap: 1rem;
  }
}

.scorer-match-header__board {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

@media (min-width: 640px) {
  .scorer-match-header__board {
    gap: 0.55rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__board {
    gap: 0.75rem;
  }
}

.scorer-match-header__team {
  display: none;
  max-width: 4.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgb(203 213 225);
  padding: 0.15rem 0.35rem;
  border-radius: 0.35rem;
  background: rgb(255 255 255 / 0.06);
}

.scorer-match-header__team:first-of-type {
  color: rgb(167 243 208);
  background: rgb(16 185 129 / 0.15);
}

.scorer-match-header__team:last-of-type {
  color: rgb(186 230 253);
  background: rgb(56 189 248 / 0.15);
}

@media (min-width: 420px) {
  .scorer-match-header__team {
    display: block;
    max-width: 5rem;
  }
}

@media (min-width: 640px) {
  .scorer-match-header__team {
    max-width: 7rem;
    font-size: 0.6875rem;
  }
}

@media (min-width: 768px) {
  .scorer-match-header__team {
    max-width: 9rem;
    font-size: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__team {
    max-width: 11rem;
    font-size: 0.8125rem;
  }
}

.scorer-match-header__score-box {
  min-width: 2.65rem;
  border: 1px solid var(--smh-score-edge);
  border-radius: 0.625rem;
  background: var(--smh-score-bg);
  padding: 0.3rem 0.45rem;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.12),
    inset 0 -2px 6px rgb(0 0 0 / 0.22),
    0 0 0 1px rgb(0 0 0 / 0.12);
}

.scorer-match-header__score-box:first-of-type {
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.12),
    inset 0 -2px 6px rgb(0 0 0 / 0.22),
    0 0 12px rgb(16 185 129 / 0.18);
}

.scorer-match-header__score-box:last-of-type {
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.12),
    inset 0 -2px 6px rgb(0 0 0 / 0.22),
    0 0 12px rgb(56 189 248 / 0.16);
}

@media (min-width: 640px) {
  .scorer-match-header__score-box {
    min-width: 3rem;
    border-radius: 0.75rem;
    padding: 0.4rem 0.55rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__score-box {
    min-width: 3.35rem;
    padding: 0.5rem 0.7rem;
  }
}

.scorer-match-header__score-num,
.scorer-match-header .vk-embed-score-num {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: rgb(15 23 42);
}

.dark .scorer-match-header__score-num,
.dark .scorer-match-header .vk-embed-score-num {
  color: rgb(248 250 252);
}

@media (min-width: 640px) {
  .scorer-match-header__score-num,
  .scorer-match-header .vk-embed-score-num {
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) {
  .scorer-match-header__score-num,
  .scorer-match-header .vk-embed-score-num {
    font-size: 1.75rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__score-num,
  .scorer-match-header .vk-embed-score-num {
    font-size: 2rem;
  }
}

@media (min-width: 1280px) {
  .scorer-match-header__score-num,
  .scorer-match-header .vk-embed-score-num {
    font-size: 2.25rem;
  }
}

.scorer-match-header__race,
.scorer-match-header .vk-embed-legs-pill {
  display: flex;
  min-width: 3.15rem;
  max-width: 6.5rem;
  shrink: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 0.625rem;
  background: var(--smh-race-bg);
  padding: 0.25rem 0.4rem;
  text-align: center;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12), 0 2px 8px rgb(0 0 0 / 0.28);
}

@media (min-width: 640px) {
  .scorer-match-header__race,
  .scorer-match-header .vk-embed-legs-pill {
    min-width: 3.75rem;
    max-width: 7.5rem;
    border-radius: 0.75rem;
    padding: 0.35rem 0.5rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__race,
  .scorer-match-header .vk-embed-legs-pill {
    min-width: 4.25rem;
    max-width: 8.5rem;
    padding: 0.4rem 0.65rem;
  }
}

.scorer-match-header__race-label,
.scorer-match-header .vk-embed-legs-pill > span:first-child {
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--smh-race-sub);
}

@media (min-width: 640px) {
  .scorer-match-header__race-label,
  .scorer-match-header .vk-embed-legs-pill > span:first-child {
    font-size: 0.625rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__race-label,
  .scorer-match-header .vk-embed-legs-pill > span:first-child {
    font-size: 0.6875rem;
  }
}

.scorer-match-header__race-sub,
.scorer-match-header .vk-embed-legs-pill > span:nth-child(2) {
  margin-top: 0.125rem;
  width: 100%;
  font-size: 0.4375rem;
  font-weight: 600;
  line-height: 1.15;
  color: var(--smh-race-text);
}

@media (min-width: 640px) {
  .scorer-match-header__race-sub,
  .scorer-match-header .vk-embed-legs-pill > span:nth-child(2) {
    font-size: 0.5rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__race-sub,
  .scorer-match-header .vk-embed-legs-pill > span:nth-child(2) {
    font-size: 0.5625rem;
  }
}

.scorer-match-header__meta {
  display: none;
  shrink: 0;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
  text-align: right;
}

.scorer-match-header--minimal .scorer-match-header__meta:not(.scorer-match-header__meta--inline) {
  display: none !important;
}

@media (min-width: 640px) {
  .scorer-match-header:not(.scorer-match-header--minimal) .scorer-match-header__meta {
    display: flex;
  }
}

.scorer-match-header__meta-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

@media (min-width: 768px) {
  .scorer-match-header__meta-row {
    gap: 0.55rem;
  }
}

.scorer-match-header__dart-icon {
  display: inline-flex;
  shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--smh-accent);
  font-size: 0.875rem;
  line-height: 1;
}

@media (min-width: 640px) {
  .scorer-match-header__dart-icon {
    font-size: 1rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__dart-icon {
    font-size: 1.125rem;
  }
}

.scorer-match-header__meta-label {
  display: none;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(100 116 139);
}

.dark .scorer-match-header__meta-label {
  color: rgb(148 163 184);
}

@media (min-width: 768px) {
  .scorer-match-header__meta-label {
    display: inline;
    font-size: 0.75rem;
  }
}

.scorer-match-header__meta-value {
  font-size: 0.9375rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: rgb(15 23 42);
}

.dark .scorer-match-header__meta-value {
  color: rgb(248 250 252);
}

@media (min-width: 768px) {
  .scorer-match-header__meta-value {
    font-size: 1.0625rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__meta-value {
    font-size: 1.1875rem;
  }
}

.scorer-match-header__checkout {
  max-width: 10rem;
  font-size: 0.5625rem;
  line-height: 1.25;
  color: rgb(100 116 139);
}

.dark .scorer-match-header__checkout {
  color: rgb(148 163 184);
}

@media (min-width: 768px) {
  .scorer-match-header__checkout {
    max-width: 12rem;
    font-size: 0.625rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__checkout {
    max-width: 14rem;
    font-size: 0.6875rem;
  }
}

.scorer-match-header__lead {
  display: flex;
  shrink: 0;
  align-items: stretch;
}

.scorer-match-header__action--overview {
  border-left: 0;
  border-right: 1px solid var(--smh-shell-edge);
}

.scorer-match-header__actions {
  display: none;
  position: relative;
  z-index: 2;
  shrink: 0;
  align-items: stretch;
  border-left: 1px solid var(--smh-shell-edge);
}

@media (min-width: 640px) {
  .scorer-match-header__actions {
    display: flex;
  }
}

/* Embed / dedicated scorers: sidebar toggle must stay visible below the sm breakpoint. */
main.vk-score-embed .scorer-match-header__actions,
.scorer-match-header--minimal .scorer-match-header__actions {
  display: flex;
}

.scorer-match-header__action,
.scorer-match-header .vk-embed-header-action {
  display: inline-flex;
  min-height: var(--scorer-header-action-min, 2.85rem);
  min-width: var(--scorer-header-action-min, 2.85rem);
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  /* border-left: 1px solid var(--smh-shell-edge); */
  background: transparent;
  padding: 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--smh-action-text);
  transition: background-color 0.15s ease, color 0.15s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.scorer-match-header__action:hover,
.scorer-match-header .vk-embed-header-action:hover {
  background: var(--smh-action-hover);
}

.scorer-match-header__actions .scorer-match-header__action:first-child,
.scorer-match-header__actions > button:first-child {
  border-left: 0;
}

/* Abandon / leave — divider + breathing room before history / TV controls. */
.scorer-match-header__action--abandon {
  border-right: 1px solid var(--smh-shell-edge);
  margin-right: 0.75rem;
  padding-inline: 1rem;
  min-height: max(var(--kiosk-touch-min, 3rem), 3rem);
  min-width: max(4.75rem, var(--kiosk-touch-min, 3rem));
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
  overflow: hidden;
  --scorer-abandon-hold-duration: 1.5s;
}

.scorer-match-header__action--abandon-holding::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgb(244 63 94 / 0.22);
  transform: scaleX(0);
  transform-origin: left center;
  animation: scorer-abandon-hold-fill var(--scorer-abandon-hold-duration, 1.5s) linear forwards;
  pointer-events: none;
}

.dark .scorer-match-header__action--abandon-holding::before {
  background: rgb(251 113 133 / 0.28);
}

@keyframes scorer-abandon-hold-fill {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.scorer-match-header__action--rail {
  border-left: 0;
  margin-left: 0.25rem;
  min-width: 3.25rem;
  padding-inline: 0.75rem;
}

@media (min-width: 768px) {
  .scorer-match-header__action--abandon {
    margin-right: 1rem;
    padding-inline: 1rem;
  }

  .scorer-match-header__action--rail {
    min-width: var(--kiosk-touch-min, 4rem);
    padding-inline: 0.875rem;
  }
}

@media (min-width: 768px) {
  .scorer-match-header__action,
  .scorer-match-header .vk-embed-header-action {
    min-height: var(--kiosk-touch-min, 4rem);
    min-width: var(--kiosk-touch-min, 4rem);
    padding: 0 0.95rem;
    font-size: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__action,
  .scorer-match-header .vk-embed-header-action {
    min-height: var(--kiosk-touch-min, 4rem);
    min-width: var(--kiosk-touch-min, 4rem);
    padding: 0 1.05rem;
  }
}

.scorer-match-header__action-icon {
  font-size: 1.125rem;
  line-height: 1;
}

@media (min-width: 768px) {
  .scorer-match-header__action-icon {
    font-size: 1.375rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-header__action-icon {
    font-size: 1.4375rem;
  }
}

.scorer-match-header__action-label {
  display: none;
}

@media (min-width: 900px) {
  .scorer-match-header__action-label {
    display: inline;
  }
}

.scorer-match-header__menu {
  position: relative;
  shrink: 0;
  border-left: 1px solid var(--smh-shell-edge);
}

@media (min-width: 640px) {
  .scorer-match-header__menu {
    display: none;
  }
}

.scorer-match-header__menu-btn {
  display: inline-flex;
  height: 100%;
  min-height: 2.85rem;
  min-width: 2.85rem;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  padding: 0 0.75rem;
  font-size: 1.125rem;
  color: var(--smh-action-text);
  transition: background-color 0.15s ease;
}

.scorer-match-header__menu-btn:hover {
  background: var(--smh-action-hover);
}

.scorer-match-header__dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 60;
  min-width: 12.5rem;
  overflow: hidden;
  border: 1px solid var(--smh-shell-edge);
  border-radius: 0.75rem;
  background: rgb(255 255 255 / 0.98);
  padding: 0.35rem;
  box-shadow: 0 10px 28px rgb(15 23 42 / 0.18);
}

.dark .scorer-match-header__dropdown {
  background: rgb(15 23 42 / 0.98);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.45);
}

.scorer-match-header__dropdown-meta {
  border-bottom: 1px solid rgb(226 232 240 / 0.9);
  padding: 0.45rem 0.55rem 0.55rem;
}

.dark .scorer-match-header__dropdown-meta {
  border-bottom-color: rgb(255 255 255 / 0.1);
}

.scorer-match-header__dropdown-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.65rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  padding: 0.65rem 0.7rem;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgb(30 41 59);
  transition: background-color 0.15s ease;
}

.dark .scorer-match-header__dropdown-item {
  color: rgb(248 250 252);
}

.scorer-match-header__dropdown-item:hover {
  background: rgb(241 245 249);
}

.dark .scorer-match-header__dropdown-item:hover {
  background: rgb(255 255 255 / 0.08);
}

.scorer-match-header__dropdown-item--danger {
  color: rgb(190 18 60);
}

.dark .scorer-match-header__dropdown-item--danger {
  color: rgb(251 113 133);
}

.scorer-match-header__rail-btn {
  display: inline-flex;
  height: 2.15rem;
  width: 2.15rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid var(--smh-shell-edge);
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12);
  pointer-events: none;
}

.scorer-match-header__rail-btn *,
.scorer-match-header__action--rail .scorer-match-header__action-icon {
  pointer-events: none;
}

/* Sidebar toggle: TV + mobile icons in one pill button. */
.scorer-match-header__rail-icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  pointer-events: none;
}

.scorer-match-header__action--rail .scorer-match-header__rail-icons .scorer-match-header__action-icon {
  font-size: 0.9375rem;
  line-height: 1;
}

.scorer-match-header__action--rail {
  gap: 0;
  padding: 0 0.625rem;
  height: var(--scorer-header-action-min, 2.85rem);
  width: auto;
  min-height: var(--scorer-header-action-min, 2.85rem);
  min-width: 3.25rem;
  border-radius: 9999px;
  border: 1px solid var(--smh-shell-edge);
  background: rgb(255 255 255 / 0.08);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.scorer-match-header__action--rail.scorer-match-header__action--rail-open {
  background: rgb(14 165 233 / 0.2);
  border-color: rgb(14 165 233 / 0.42);
}

@media (min-width: 768px) {
  .scorer-match-header__rail-btn {
    height: var(--kiosk-touch-min, 4rem);
    width: auto;
    min-width: var(--kiosk-touch-min, 4rem);
    padding: 0 0.875rem;
  }

  .scorer-match-header__action--rail {
    height: var(--kiosk-touch-min, 4rem);
    min-height: var(--kiosk-touch-min, 4rem);
    min-width: calc(var(--kiosk-touch-min, 4rem) + 0.75rem);
    padding: 0 0.875rem;
  }

  .scorer-match-header__action--rail .scorer-match-header__rail-icons .scorer-match-header__action-icon {
    font-size: 1.25rem;
  }
}

@media (orientation: landscape) and (max-width: 639px) {
  .scorer-match-header__checkout--desktop {
    display: none !important;
  }
}

/* Score entry row above numpad (quick toggles + input). */
.kiosk-scorer-score-keypad-row {
  margin-bottom: 12px;
}

/* Shared quick-match + training scorer keypad (overlay on narrow / venue tablet). */
@media (orientation: portrait) and (max-width: 980px) {
  .kiosk-mobile-portrait-hide-role {
    display: none !important;
  }
  .kiosk-mobile-portrait-keypad-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .kiosk-mobile-portrait-quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Keypad quick-score overlay: stack quick grid on top of digits at every width. */
.kiosk-scorer-keypad-overlay-host {
  display: grid;
  position: relative;
}

.kiosk-scorer-keypad-overlay-host > .kiosk-scorer-keypad-layer {
  grid-area: 1 / 1;
  min-width: 0;
  width: 100%;
  align-self: stretch;
  align-content: stretch;
  align-items: stretch;
}

.kiosk-scorer-keypad-quick-overlay {
  align-items: stretch;
  align-content: stretch;
}

.kiosk-scorer-keypad-overlay-host > .kiosk-scorer-keypad-layer.kiosk-mobile-portrait-keypad-grid {
  align-items: stretch;
  align-content: stretch;
}

.kiosk-scorer-keypad-quick-overlay .scorer-quick-preset-btn.scorer-keypad-digit {
  border: 0;
  box-shadow: none;
  align-self: stretch;
  height: 100%;
}

.kiosk-scorer-keypad-quick-overlay .kiosk-scorer-keypad-quick-spacer {
  align-self: stretch;
  min-height: 0;
}

/* v2 scoring grid: digit layer grid tracks (overlay must not force display — breaks x-show) */
.kiosk-scoring-grid .kiosk-scorer-keypad-overlay-host > .kiosk-scorer-keypad-layer.kiosk-mobile-portrait-keypad-grid:not(.kiosk-scorer-keypad-quick-overlay) {
  display: grid !important;
  gap: 0.5rem !important;
  align-items: stretch !important;
  align-content: stretch !important;
  grid-auto-rows: minmax(var(--kiosk-touch-score-min), 1fr);
}

.kiosk-scoring-grid .kiosk-scorer-keypad-overlay-host > .kiosk-scorer-keypad-layer.kiosk-scorer-keypad-quick-overlay {
  gap: 0.5rem !important;
  align-items: stretch !important;
  align-content: stretch !important;
  grid-auto-rows: minmax(var(--kiosk-touch-score-min), 1fr);
}

.kiosk-scoring-grid .kiosk-scorer-keypad-quick-overlay .scorer-quick-preset-btn.scorer-keypad-digit,
.kiosk-scoring-grid .kiosk-scorer-keypad-quick-overlay .kiosk-scorer-keypad-quick-spacer {
  height: 100%;
  min-height: var(--kiosk-touch-score-min) !important;
  max-height: var(--kiosk-touch-score-max);
  margin: 0;
  box-sizing: border-box;
}

.kiosk-scorer-keypad-quick-overlay--open {
  pointer-events: auto !important;
  background: rgb(255 255 255 / 0.98) !important;
}

.dark .kiosk-scorer-keypad-quick-overlay--open {
  background: rgb(23 23 23 / 0.98) !important;
}

@media (max-width: 980px) {
  .kiosk-scorer-inline-quick,
  .kiosk-scorer-desktop-quick-panel {
    display: none !important;
  }
  .kiosk-scorer-score-field {
    grid-column: 1 / -1 !important;
    min-height: 3.5rem;
  }
  .kiosk-scorer-score-entry-inner {
    min-height: 3.5rem;
  }
  .kiosk-scorer-score-entry-inner input.scorer-score-input-field {
    min-height: 3.85rem;
  }
  .kiosk-scorer-keypad-overlay-host {
    display: grid;
  }
  .kiosk-scorer-keypad-overlay-host > .kiosk-scorer-keypad-layer {
    grid-area: 1 / 1;
    min-width: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    align-self: stretch;
    align-content: stretch;
    align-items: stretch;
    grid-auto-rows: minmax(4.6rem, 1fr);
  }
  .kiosk-scorer-keypad-quick-overlay {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
    backdrop-filter: none;
    align-items: stretch;
    align-content: stretch;
  }
  .kiosk-scorer-keypad-quick-spacer {
    visibility: hidden;
    pointer-events: none;
    align-self: stretch;
    min-height: 4.6rem;
  }

  .kiosk-scorer-keypad-quick-overlay .scorer-quick-preset-btn.scorer-keypad-digit {
    min-height: 4.6rem !important;
    height: 100%;
  }
  .kiosk-scorer-score-quick-toggle,
  .kiosk-scorer-score-history-toggle {
    width: calc((100% - 2 * 0.375rem) / 6);
    min-width: 2.85rem;
  }
  @media (orientation: landscape) {
    .kiosk-scorer-score-quick-toggle,
    .kiosk-scorer-score-history-toggle {
      width: calc((100% - 3 * 0.375rem) / 8);
    }
  }
}

.kiosk-scorer-mobile-history-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgb(15 23 42 / 0.45);
}

.kiosk-scorer-mobile-history-drawer {
  position: fixed;
  top: 10px;
  right: 0;
  bottom: 0;
  z-index: 61;
  display: flex;
  flex-direction: column;
  width: min(88vw, 22rem);
  max-width: 100%;
  border-left: 1px solid rgb(226 232 240 / 0.95);
  background: rgb(255 255 255);
  box-shadow: -12px 0 40px rgb(15 23 42 / 0.18);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.dark .kiosk-scorer-mobile-history-drawer {
  border-left-color: rgb(64 64 64 / 0.95);
  background: rgb(23 23 23);
  box-shadow: -12px 0 40px rgb(0 0 0 / 0.45);
}

.kiosk-scorer-mobile-history-drawer .scorer-history-scroll {
  max-height: none;
  height: 100%;
}

@media (min-width: 768px) {
  .kiosk-scorer-mobile-history-drawer {
    width: min(46vw, 26rem);
  }
}

@media (min-width: 640px) and (max-width: 980px) {
  .kiosk-scorer-score-quick-toggle,
  .kiosk-scorer-score-history-toggle {
    width: calc((100% - 2 * 0.5rem) / 6);
  }
  @media (orientation: landscape) {
    .kiosk-scorer-score-quick-toggle,
    .kiosk-scorer-score-history-toggle {
      width: calc((100% - 3 * 0.5rem) / 8);
    }
  }
}

@media (min-width: 768px) and (max-width: 980px) {
  .kiosk-scorer-score-quick-toggle,
  .kiosk-scorer-score-history-toggle {
    width: calc((100% - 2 * 0.625rem) / 6);
  }
  @media (orientation: landscape) {
    .kiosk-scorer-score-quick-toggle,
    .kiosk-scorer-score-history-toggle {
      width: calc((100% - 3 * 0.625rem) / 8);
    }
  }
}

@media (min-width: 981px) {
  .kiosk-scorer-score-quick-toggle,
  .kiosk-scorer-score-history-toggle {
    width: 18.75%;
    min-width: 3.5rem;
    max-width: 6rem;
  }
  main.scorer-tablet-wide .kiosk-scorer-inline-quick,
  main.scorer-tablet-wide .kiosk-scorer-desktop-quick-panel {
    display: none !important;
  }
  main.scorer-tablet-wide .kiosk-scorer-score-field {
    grid-column: 1 / -1 !important;
    min-height: 3rem;
  }
  main.scorer-tablet-wide .kiosk-scorer-score-entry-inner {
    min-height: 4.25rem;
  }
  main.scorer-tablet-wide .kiosk-scorer-score-entry-inner input,
  main.scorer-tablet-wide .scorer-score-input-field {
    min-height: 3.85rem;
  }
  main.scorer-tablet-wide .scorer-keypad-digit:not(.scorer-keypad-digit--portrait),
  main.scorer-tablet-wide .scorer-keypad-util-btn:not(.scorer-keypad-digit--portrait) {
    min-height: 5rem;
    font-size: 1.85rem;
  }
  main.scorer-tablet-wide .kiosk-scorer-keypad-overlay-host {
    display: grid;
  }
  main.scorer-tablet-wide .kiosk-scorer-keypad-overlay-host > .kiosk-scorer-keypad-layer {
    grid-area: 1 / 1;
    min-width: 0;
    width: 100%;
    align-self: stretch;
    align-content: stretch;
    align-items: stretch;
  }
  main.scorer-tablet-wide .kiosk-scorer-keypad-quick-overlay {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    --tw-ring-shadow: 0 0 #0000;
    backdrop-filter: none;
    align-items: stretch;
    align-content: stretch;
  }
  main.scorer-tablet-wide .kiosk-scorer-keypad-quick-spacer {
    visibility: hidden;
    pointer-events: none;
    align-self: stretch;
  }
  main.scorer-tablet-wide .kiosk-scorer-score-quick-toggle {
    width: calc((100% - 3 * 0.625rem) / 8);
    min-width: 2.85rem;
    max-width: none;
  }
}

/* ----- Unified scorer layout (kiosk, mobile, training, challenge, fixture) ----- */

.scorer-live-body {
  min-height: 0;
}

main.vk-score-embed > .scorer-live-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* Venue tablet embed: flat live body — no decorative border on the section shell. */
main.vk-score-embed > .scorer-live-body.scorer-live-body--match-console {
  border: none;
  box-shadow: none;
  padding: 0;
}

main.vk-score-embed > .scorer-live-body.scorer-live-body--match-console::before,
main.vk-score-embed > .scorer-live-body.scorer-live-body--match-console::after {
  border: none;
  padding: 1px;
  box-shadow: none;
  background: transparent;
}

.scorer-player-strip {
  flex: 0 0 auto;
  min-height: 0;
  max-height: var(--scorer-player-strip-max);
  overflow-x: hidden;
  overflow-y: auto;
}

main:not(.vk-score-embed) .scorer-player-strip {
  flex: 1 1 auto;
  max-height: none;
}

.scorer-keypad-zone {
  flex-shrink: 0;
  --scorer-keypad-section-gap: 0.5rem;
  /* Layout theme tokens (overridden in scorer-layout-themes.css) */
  --scorer-digit-bg: rgb(15 23 42);
  --scorer-digit-fg: #fff;
  --scorer-digit-bg-hover: rgb(30 41 59);
  --scorer-util-back-bg: rgb(2 132 199);
  --scorer-util-back-bg-hover: rgb(14 165 233);
  --scorer-util-clear-bg: rgb(225 29 72);
  --scorer-util-clear-bg-hover: rgb(244 63 94);
  --scorer-util-fg: #fff;
  --scorer-enter-bg: rgb(5 150 105);
  --scorer-enter-bg-hover: rgb(16 185 129);
  --scorer-enter-fg: #fff;
  --scorer-input-min-h: 3.5rem;
  --scorer-keypad-min-h: 3rem;
  --scorer-score-field-bg: rgb(255 255 255);
  --scorer-score-field-border: rgb(203 213 225);
  --scorer-score-field-fg: rgb(15 23 42);
  --scorer-quick-toggle-bg: rgb(241 245 249 / 0.9);
  --scorer-quick-toggle-fg: rgb(51 65 85);
}

.dark .scorer-keypad-zone {
  --scorer-digit-bg: rgb(245 245 245);
  --scorer-digit-fg: rgb(23 23 23);
  --scorer-digit-bg-hover: rgb(255 255 255);
  --scorer-score-field-bg: rgb(23 23 23);
  --scorer-score-field-border: rgb(64 64 64);
  --scorer-score-field-fg: rgb(245 245 245);
  --scorer-quick-toggle-bg: rgb(38 38 38 / 0.95);
  --scorer-quick-toggle-fg: rgb(229 229 229);
}

@media (min-width: 640px) {
  .scorer-keypad-zone {
    --scorer-keypad-section-gap: 0.625rem;
  }
}

/* Score entry → digits → Enter/Undo vertical rhythm (all scorers). */
.scorer-keypad-stack {
  display: flex;
  flex-direction: column;
  gap: var(--scorer-keypad-section-gap);
}

.scorer-keypad-body {
  display: flex;
  flex-direction: column;
  gap: var(--scorer-keypad-section-gap);
}

/* Player cards — darts-first hierarchy */
.scorer-player-card {
  display: flex;
  min-height: var(--scorer-player-card-h);
  max-height: var(--scorer-player-card-h);
  align-items: stretch;
  gap: 0.5rem;
  border-radius: 0.75rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgb(226 232 240 / 0.85);
  background: rgb(248 250 252 / 0.95);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}

.dark .scorer-player-card {
  border-color: rgb(64 64 64 / 0.85);
  background: rgb(23 23 23 / 0.75);
}

.scorer-player-card--active {
  border-color: rgb(5 150 105 / 0.55);
  border-left-width: 4px;
  border-left-color: rgb(5 150 105);
  background: rgb(255 255 255 / 0.98);
  box-shadow: 0 1px 3px rgb(5 150 105 / 0.12);
}

.dark .scorer-player-card--active {
  border-color: rgb(16 185 129 / 0.45);
  border-left-color: rgb(16 185 129);
  background: rgb(23 23 23 / 0.92);
}

.scorer-player-card__avatar {
  height: 2.5rem;
  width: 2.5rem;
  flex-shrink: 0;
  align-self: center;
  border-radius: 0.625rem;
  object-fit: cover;
}

@media (min-width: 640px) {
  .scorer-player-card__avatar {
    height: 2.75rem;
    width: 2.75rem;
  }
}

.scorer-player-card__body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.1rem 0;
}

.scorer-player-card__identity {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 0.35rem;
}

.scorer-player-card__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.2;
  color: rgb(15 23 42);
}

.dark .scorer-player-card__name {
  color: rgb(248 250 252);
}

@media (min-width: 640px) {
  .scorer-player-card__name {
    font-size: 0.8125rem;
  }
}

.scorer-player-card__role {
  flex-shrink: 0;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(100 116 139);
}

.scorer-player-card--active .scorer-player-card__role {
  color: rgb(4 120 87);
}

.dark .scorer-player-card--active .scorer-player-card__role {
  color: rgb(52 211 153 / 0.95);
}

.scorer-player-card__visits {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
}

.scorer-player-card__visit-pill {
  display: inline-flex;
  min-width: 1.55rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  border: 1px solid rgb(226 232 240 / 0.85);
  background: rgb(241 245 249 / 0.95);
  padding: 0.125rem 0.25rem;
  font-size: 0.625rem;
  font-weight: 900;
  line-height: 1;
  color: rgb(51 65 85);
}

.dark .scorer-player-card__visit-pill {
  border-color: rgb(64 64 64);
  background: rgb(38 38 38 / 0.9);
  color: rgb(229 229 229);
}

.scorer-player-card__remaining-col {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  align-self: stretch;
}

.scorer-remaining-box {
  display: inline-flex;
  height: var(--scorer-remaining-box-h);
  min-height: var(--scorer-remaining-box-h);
  max-height: var(--scorer-remaining-box-h);
  min-width: max(3.25rem, calc(var(--scorer-remaining-box-fs) * 1.35));
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  padding: 0 0.35rem;
}

.scorer-remaining-box--compact {
  height: var(--scorer-remaining-compact-box-h);
  min-height: var(--scorer-remaining-compact-box-h);
  max-height: var(--scorer-remaining-compact-box-h);
  min-width: 2.5rem;
}

.scorer-remaining-box--history-edit {
  box-shadow:
    0 0 0 2px rgb(245 158 11),
    0 0 0 4px rgb(245 158 11 / 0.28);
}

.dark .scorer-remaining-box--history-edit {
  box-shadow:
    0 0 0 2px rgb(251 191 36 / 0.95),
    0 0 0 4px rgb(245 158 11 / 0.22);
}

.scorer-remaining-hit {
  cursor: pointer;
  touch-action: manipulation;
  border: 0;
  background: transparent;
  padding: 0.125rem 0.25rem;
  margin: -0.125rem -0.25rem;
  border-radius: 0.5rem;
  line-height: 0.95;
  transition: background-color 150ms ease, transform 150ms ease;
}

.scorer-remaining-hit:hover {
  background: rgb(148 163 184 / 0.12);
}

.scorer-remaining-hit:active {
  transform: scale(0.98);
}

.scorer-remaining-display {
  font-size: var(--scorer-remaining-box-fs);
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

main.vk-score-embed .scorer-remaining-display {
  font-size: var(--scorer-remaining-box-fs);
}

.scorer-remaining-display--compact {
  font-size: var(--scorer-remaining-compact-box-fs);
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

/* Player stats modal — centered on mobile phone scorer (not bottom sheet) */
.scorer-player-stats-backdrop {
  align-items: center;
}

.scorer-player-stats-dialog {
  max-height: min(92dvh, 36rem);
  overflow-y: auto;
}

/* Player stats carousel dialog (arcade roster style) */
.scorer-player-stats-carousel {
  padding-left: 2rem;
  padding-right: 2rem;
}

.scorer-player-stats-side {
  display: inline-flex;
  margin-top: 0.35rem;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scorer-player-stats-side.is-home {
  background: rgb(16 185 129 / 0.18);
  color: rgb(167 243 208);
}

.scorer-player-stats-side.is-away {
  background: rgb(56 189 248 / 0.18);
  color: rgb(186 230 253);
}

.scorer-player-stats-slide .challenge-duel-stats {
  margin-top: 0.75rem;
}

/* Player stats carousel — embed shell does not load kiosk-duel-picker.css */
.scorer-player-stats-dialog .challenge-duel-carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 0;
  padding: 0 2.25rem;
}

.scorer-player-stats-dialog .challenge-duel-carousel-viewport {
  width: 100%;
  min-height: 9.5rem;
  overflow: hidden;
  border-radius: 0.75rem;
}

.scorer-player-stats-dialog .challenge-duel-carousel-track {
  display: flex;
  width: 100%;
  will-change: transform;
}

.scorer-player-stats-dialog .challenge-duel-carousel-track.is-animating {
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.scorer-player-stats-dialog .challenge-duel-carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.15rem 0.5rem 0.35rem;
  opacity: 0.55;
  transform: scale(0.94);
  transition: opacity 0.32s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.scorer-player-stats-dialog .challenge-duel-carousel-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.scorer-player-stats-dialog .challenge-duel-avatar {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 1rem;
  object-fit: cover;
  border: 2px solid rgb(255 255 255 / 0.2);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.35);
  background: rgb(255 255 255 / 0.06);
}

.scorer-player-stats-dialog .challenge-duel-name {
  margin-top: 0.45rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}

.scorer-player-stats-dialog .challenge-duel-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.25rem;
  width: 100%;
  margin-top: 0.5rem;
}

.scorer-player-stats-dialog .challenge-duel-stat {
  border-radius: 0.5rem;
  padding: 0.28rem 0.2rem;
  background: rgb(255 255 255 / 0.05);
  border: 1px solid rgb(255 255 255 / 0.06);
}

.scorer-player-stats-dialog .challenge-duel-stat-val {
  display: block;
  font-size: 0.875rem;
}

.scorer-player-stats-dialog .challenge-duel-stat-lbl {
  display: block;
  margin-top: 0.15rem;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.4);
}

.scorer-player-stats-dialog .challenge-duel-carousel-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-top: -1rem;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 0.18);
  background: rgb(8 12 24 / 0.85);
  color: rgb(255 255 255 / 0.85);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.scorer-player-stats-dialog .challenge-duel-carousel-nav:hover:not(:disabled) {
  border-color: rgb(251 113 133 / 0.55);
  background: rgb(244 63 94 / 0.2);
}

.scorer-player-stats-dialog .challenge-duel-carousel-nav:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.scorer-player-stats-dialog .challenge-duel-carousel-nav--prev {
  left: 0;
}

.scorer-player-stats-dialog .challenge-duel-carousel-nav--next {
  right: 0;
}

.scorer-player-stats-dialog .challenge-duel-carousel-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.45rem;
  padding: 0 0.15rem;
}

.scorer-player-stats-dialog .challenge-duel-carousel-counter {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgb(255 255 255 / 0.5);
}

.scorer-score-input-field,
.kiosk-scorer-score-entry-inner .scorer-score-input-field,
.kiosk-scorer-score-entry-inner input.scorer-score-input-field {
  box-sizing: border-box;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  font-size: 3.85rem !important;
  font-weight: 800;
  line-height: 1;
  min-height: 3.85rem;
}

.scorer-keypad-digit {
  min-height: var(--scorer-keypad-min-h, 3rem);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
  background-color: var(--scorer-digit-bg);
  color: var(--scorer-digit-fg);
  transition: background-color 0.15s ease;
}

.scorer-keypad-digit:hover:not(:disabled) {
  background-color: var(--scorer-digit-bg-hover);
}

.scorer-keypad-util--back {
  background-color: var(--scorer-util-back-bg);
  color: var(--scorer-util-fg);
}

.scorer-keypad-util--back:hover:not(:disabled) {
  background-color: var(--scorer-util-back-bg-hover);
}

.scorer-keypad-util--clear {
  background-color: var(--scorer-util-clear-bg);
  color: var(--scorer-util-fg);
}

.scorer-keypad-util--clear:hover:not(:disabled) {
  background-color: var(--scorer-util-clear-bg-hover);
}

@media (min-width: 640px) {
  .scorer-keypad-digit:not(.scorer-keypad-digit--portrait) {
    min-height: 4rem;
    font-size: 1.85rem;
  }
}

@media (min-width: 768px) {
  .scorer-keypad-digit:not(.scorer-keypad-digit--portrait) {
    min-height: 4.75rem;
    font-size: 2rem;
  }
}

@media (min-width: 981px) {
  .scorer-keypad-digit:not(.scorer-keypad-digit--portrait) {
    min-height: 5.75rem;
    font-size: 2rem;
  }
}

.scorer-keypad-digit--portrait {
  min-height: 4.6rem;
  font-size: 1.85rem;
}

.scorer-keypad-util-btn {
  min-height: 3rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .scorer-keypad-util-btn:not(.scorer-keypad-digit--portrait) {
    min-height: 4rem;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
  }
}

@media (min-width: 768px) {
  .scorer-keypad-util-btn:not(.scorer-keypad-digit--portrait) {
    min-height: 4.75rem;
  }
}

@media (min-width: 981px) {
  .scorer-keypad-util-btn:not(.scorer-keypad-digit--portrait) {
    min-height: 5.75rem;
  }
}

.scorer-keypad-util-btn.scorer-keypad-digit--portrait {
  min-height: 4.6rem;
}

.scorer-quick-preset-btn {
  border-width: 1px;
  border-style: solid;
}

.scorer-quick-preset-btn:not(.scorer-quick-preset-btn--ns) {
  border-color: rgb(124 45 18);
  background-color: rgb(154 52 18);
  color: rgb(255 247 237);
}

.scorer-quick-preset-btn:not(.scorer-quick-preset-btn--ns):hover:not(:disabled) {
  border-color: rgb(154 52 18);
  background-color: rgb(194 65 12);
}

.dark .scorer-quick-preset-btn:not(.scorer-quick-preset-btn--ns) {
  border-color: rgb(124 45 18);
  background-color: rgb(154 52 18);
  color: rgb(255 247 237);
}

.dark .scorer-quick-preset-btn:not(.scorer-quick-preset-btn--ns):hover:not(:disabled) {
  border-color: rgb(154 52 18);
  background-color: rgb(194 65 12);
}

.scorer-quick-preset-btn--ns {
  border-color: rgb(203 213 225);
  background-color: rgb(255 255 255) !important;
  color: rgb(15 23 42) !important;
}

.dark .scorer-quick-preset-btn--ns {
  border-color: rgb(255 255 255);
  background-color: rgb(255 255 255) !important;
  color: rgb(2 6 23) !important;
}

.scorer-quick-preset-btn--ns:hover:not(:disabled) {
  border-color: rgb(148 163 184);
  background-color: rgb(248 250 252) !important;
  color: rgb(15 23 42) !important;
}

.scorer-quick-preset-inline {
  min-height: 3.5rem;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

@media (min-width: 640px) {
  .scorer-quick-preset-inline {
    min-height: 4rem;
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) {
  .scorer-quick-preset-inline {
    min-height: 4.75rem;
    font-size: 2rem;
  }
}

.scorer-quick-preset-more {
  min-height: 3rem;
  font-size: 1rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .scorer-quick-preset-more {
    min-height: 3.5rem;
    font-size: 1.125rem;
  }
}

@media (min-width: 768px) {
  .scorer-quick-preset-more {
    min-height: 4rem;
  }
}

.scorer-action-btn {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: 0.75rem;
  min-height: 3.5rem;
  font-size: 1.25rem;
  line-height: 1.15;
}

@media (min-width: 640px) {
  .scorer-action-btn {
    min-height: 4.75rem;
    font-size: 1.35rem;
    letter-spacing: 0.1em;
  }
}

@media (min-width: 768px) {
  .scorer-action-btn {
    min-height: 5.25rem;
    font-size: 1.5rem;
    letter-spacing: 0.12em;
  }
}

.scorer-action-btn--enter {
  background-color: var(--scorer-enter-bg, rgb(5 150 105));
  color: var(--scorer-enter-fg, #fff);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

.scorer-action-btn--enter:hover:not(:disabled) {
  background-color: var(--scorer-enter-bg-hover, rgb(16 185 129));
}

.scorer-action-btn--enter:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.scorer-action-btn-icon {
  font-size: 1.35rem;
  line-height: 1;
}

@media (min-width: 640px) {
  .scorer-action-btn-icon {
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) {
  .scorer-action-btn-icon {
    font-size: 1.875rem;
  }
}

.scorer-keypad-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  gap: 0.375rem;
}

@media (min-width: 640px) {
  .scorer-keypad-row {
    gap: 0.5rem;
  }
}

@media (min-width: 768px) {
  .scorer-keypad-row {
    gap: 0.625rem;
  }
}

/* ----- Match-console scoreboard (shared dedicated scorers) ----- */

.scorer-match-scoreboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  /* margin-top: 0.5rem; */
}

@media (min-width: 768px) {
  .scorer-match-scoreboard {
    grid-template-columns: minmax(0, 1fr) minmax(8.5rem, 10.5rem) minmax(0, 1fr);
    align-items: stretch;
    gap: 0.75rem;
  }
}

@media (min-width: 1024px) {
  .scorer-match-scoreboard {
    grid-template-columns: minmax(0, 1fr) minmax(11rem, 13rem) minmax(0, 1fr);
    gap: 1rem;
  }
}

@media (max-height: 900px) {
  .scorer-match-scoreboard {
    gap: 0.625rem;
  }
}

.scorer-match-scoreboard__panel {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: box-shadow 0.3s, ring 0.3s;
}

@media (min-width: 640px) {
  .scorer-match-scoreboard__panel {
    padding: 1rem 1.15rem;
    border-radius: 1rem;
  }
}

@media (max-height: 900px) {
  .scorer-match-scoreboard__panel {
    padding: 0.75rem 0.85rem;
  }
}

.scorer-match-scoreboard__panel--home {
  border: 1px solid rgb(167 243 208 / 0.9);
  background: linear-gradient(180deg, rgb(236 253 245 / 0.95) 0%, rgb(255 255 255) 100%);
}

.dark .scorer-match-scoreboard__panel--home {
  border-color: rgb(6 78 59 / 0.45);
  background: linear-gradient(180deg, rgb(6 78 59 / 0.4) 0%, rgb(10 10 10 / 0.85) 100%);
}

.scorer-match-scoreboard__panel--away {
  border: 1px solid rgb(186 230 253 / 0.9);
  background: linear-gradient(180deg, rgb(240 249 255 / 0.95) 0%, rgb(255 255 255) 100%);
}

.dark .scorer-match-scoreboard__panel--away {
  border-color: rgb(12 74 110 / 0.45);
  background: linear-gradient(180deg, rgb(12 74 110 / 0.4) 0%, rgb(10 10 10 / 0.85) 100%);
}

.scorer-match-scoreboard__panel--home-turn {
  box-shadow: 0 0 0 2px rgb(16 185 129 / 0.45);
}

.scorer-match-scoreboard__panel--away-turn {
  box-shadow: 0 0 0 2px rgb(56 189 248 / 0.45);
}

.scorer-match-scoreboard__throw-badge {
  position: absolute;
  top: 0.65rem;
  z-index: 2;
  border-radius: 9999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scorer-match-scoreboard__throw-badge--home {
  right: 0.65rem;
  border: 1px solid rgb(16 185 129 / 0.4);
  background: rgb(16 185 129 / 0.15);
  color: rgb(6 95 70);
}

.dark .scorer-match-scoreboard__throw-badge--home {
  color: rgb(167 243 208);
}

.scorer-match-scoreboard__throw-badge--away {
  left: 0.65rem;
  border: 1px solid rgb(56 189 248 / 0.4);
  background: rgb(56 189 248 / 0.15);
  color: rgb(12 74 110);
}

.dark .scorer-match-scoreboard__throw-badge--away {
  color: rgb(186 230 253);
}

.scorer-match-scoreboard__identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.scorer-match-scoreboard__identity--tappable {
  cursor: pointer;
  touch-action: manipulation;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  text-align: inherit;
  font: inherit;
  color: inherit;
  width: 100%;
  max-width: 100%;
}

.scorer-match-scoreboard__identity--tappable:focus-visible {
  outline: 2px solid rgb(16 185 129 / 0.65);
  outline-offset: 2px;
  border-radius: 0.75rem;
}

.scorer-match-scoreboard__panel--away .scorer-match-scoreboard__identity--tappable:focus-visible {
  outline-color: rgb(56 189 248 / 0.75);
}

/* Away: name/stats beside avatar, grouped on the right (avatar at outer edge). */
.scorer-match-scoreboard__identity--away {
  flex-direction: row-reverse;
  justify-content: flex-start;
}

.scorer-match-scoreboard__panel--away .scorer-match-scoreboard__identity-text {
  flex: 0 1 auto;
  text-align: right;
}

.scorer-match-scoreboard__avatar {
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  object-fit: cover;
  background: transparent;
  padding: 0;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}

.scorer-match-scoreboard__avatar-hit {
  display: block;
  flex-shrink: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 0.75rem;
  line-height: 0;
}

.scorer-match-scoreboard__avatar-hit:focus-visible {
  outline: 2px solid rgb(16 185 129 / 0.65);
  outline-offset: 2px;
}

.scorer-match-scoreboard__panel--away .scorer-match-scoreboard__avatar-hit:focus-visible {
  outline-color: rgb(56 189 248 / 0.75);
}

.dark .scorer-match-scoreboard__avatar {
  background: rgb(0 0 0);
}

@media (min-width: 640px) {
  .scorer-match-scoreboard__avatar {
    width: 3.5rem;
    height: 3.5rem;
  }
}

@media (max-height: 900px) {
  .scorer-match-scoreboard__avatar {
    width: 2.75rem;
    height: 2.75rem;
  }
}

.scorer-match-scoreboard__avatar-ring {
  border: 1px solid rgb(203 213 225 / 0.9);
}

.scorer-match-scoreboard__avatar-ring--home-active {
  box-shadow: 0 0 0 4px rgb(52 211 153 / 0.85);
}

.scorer-match-scoreboard__avatar-ring--away-active {
  box-shadow: 0 0 0 4px rgb(56 189 248 / 0.85);
}

.scorer-match-scoreboard__identity-text {
  min-width: 0;
  flex: 1;
}

.scorer-match-scoreboard__role {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.scorer-match-scoreboard__role--home {
  color: rgb(6 95 70 / 0.85);
}

.dark .scorer-match-scoreboard__role--home {
  color: rgb(110 231 183 / 0.9);
}

.scorer-match-scoreboard__role--away {
  color: rgb(12 74 110 / 0.85);
}

.dark .scorer-match-scoreboard__role--away {
  color: rgb(125 211 252 / 0.9);
}

.scorer-match-scoreboard__name {
  margin-top: 0.125rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgb(15 23 42);
}

.dark .scorer-match-scoreboard__name {
  color: rgb(248 250 252);
}

@media (max-height: 900px) {
  .scorer-match-scoreboard__name {
    font-size: 0.9rem;
  }
}

.scorer-match-scoreboard__side-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.35rem;
  margin-top: 0.2rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  color: rgb(71 85 105);
}

.dark .scorer-match-scoreboard__side-stats {
  color: rgb(148 163 184);
}

.scorer-match-scoreboard__panel--away .scorer-match-scoreboard__side-stats {
  justify-content: flex-end;
}

.scorer-match-scoreboard__side-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2rem;
}

.scorer-match-scoreboard__side-stat-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.scorer-match-scoreboard__side-stat-val {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.scorer-match-scoreboard__side-stat-sep {
  opacity: 0.45;
}

@media (max-height: 900px) {
  .scorer-match-scoreboard__side-stats {
    font-size: 0.625rem;
  }
}

main.vk-score-embed .scorer-match-scoreboard__side-stats {
  font-size: 0.625rem;
}

.scorer-match-scoreboard__primary {
  margin-top: 0.75rem;
  text-align: center;
}

.scorer-match-scoreboard__panel--home .scorer-match-scoreboard__primary,
.scorer-match-scoreboard__panel--away .scorer-match-scoreboard__primary {
  text-align: right;
}

.scorer-match-scoreboard__primary-hit {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
  text-align: inherit;
}

.scorer-match-scoreboard__primary-num {
  font-size: clamp(3.25rem, 14vw, 4.25rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
  .scorer-match-scoreboard__primary-num {
    font-size: clamp(3.75rem, 10vw, 5rem);
  }
}

@media (min-width: 768px) {
  .scorer-match-scoreboard__primary-num {
    font-size: clamp(4rem, 8vw, 5.5rem);
  }
}

.scorer-match-scoreboard__primary-num--home {
  color: rgb(4 47 46);
}

.dark .scorer-match-scoreboard__primary-num--home {
  color: rgb(236 253 245);
}

.scorer-match-scoreboard__primary-num--away {
  color: rgb(8 47 73);
}

.dark .scorer-match-scoreboard__primary-num--away {
  color: rgb(240 249 255);
}

@media (max-height: 900px) {
  .scorer-match-scoreboard__primary-num {
    font-size: clamp(2.75rem, 12vw, 3.75rem);
  }

  @media (min-width: 640px) {
    .scorer-match-scoreboard__primary-num {
      font-size: clamp(3rem, 9vw, 4.25rem);
    }
  }

  [data-kiosk-tier="tabletLandscape"] main.scorer-tablet-wide .scorer-match-scoreboard__primary-num,
  [data-kiosk-tier="desktopTv"] main.scorer-tablet-wide .scorer-match-scoreboard__primary-num,
  main.scorer-tablet-wide[data-kiosk-tier="tabletLandscape"] .scorer-match-scoreboard__primary-num,
  main.scorer-tablet-wide[data-kiosk-tier="desktopTv"] .scorer-match-scoreboard__primary-num {
    font-size: var(--scorer-scoreboard-primary-fs) !important;
  }

  .scorer-match-scoreboard__primary {
    margin-top: 0.4rem;
  }
}

.scorer-match-scoreboard__primary-label {
  margin-top: 0.2rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.scorer-match-scoreboard__primary-label--home {
  color: rgb(6 95 70 / 0.75);
}

.dark .scorer-match-scoreboard__primary-label--home {
  color: rgb(110 231 183 / 0.8);
}

.scorer-match-scoreboard__primary-label--away {
  color: rgb(12 74 110 / 0.75);
}

.dark .scorer-match-scoreboard__primary-label--away {
  color: rgb(125 211 252 / 0.8);
}

.scorer-match-scoreboard__visits {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.scorer-match-scoreboard__panel--home .scorer-match-scoreboard__visits,
.scorer-match-scoreboard__panel--away .scorer-match-scoreboard__visits {
  justify-content: flex-end;
}

.scorer-match-scoreboard__visit-pill {
  border-radius: 0.5rem;
  background: rgb(255 255 255 / 0.85);
  padding: 0.28rem 0.65rem;
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1.2;
  border: 1px solid rgb(203 213 225 / 0.8);
  min-width: 2.25rem;
  text-align: center;
}

@media (min-width: 640px) {
  .scorer-match-scoreboard__visit-pill {
    padding: 0.32rem 0.75rem;
    font-size: 1.0625rem;
    min-width: 2.55rem;
  }
}

.dark .scorer-match-scoreboard__visit-pill {
  background: rgb(0 0 0 / 0.35);
  border-color: rgb(255 255 255 / 0.12);
}

.scorer-match-scoreboard__center {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.65rem;
  border-radius: 1rem;
  border: 1px solid rgb(226 232 240 / 0.85);
  background: linear-gradient(180deg, rgb(248 250 252 / 0.95) 0%, rgb(255 255 255) 100%);
  padding: 0.85rem 1rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.dark .scorer-match-scoreboard__center {
  border-color: rgb(64 64 64);
  background: linear-gradient(180deg, rgb(23 23 23 / 0.9) 0%, rgb(10 10 10 / 0.95) 100%);
}

@media (max-height: 900px) {
  .scorer-match-scoreboard__center {
    gap: 0.45rem;
    padding: 0.65rem 0.85rem;
  }
}

.scorer-match-scoreboard__center-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

@media (min-width: 640px) {
  .scorer-match-scoreboard__center-chips {
    flex-direction: column;
    gap: 0.65rem;
  }
}

.scorer-match-scoreboard__center-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 0.75rem;
  border: 1px solid rgb(226 232 240 / 0.9);
  background: rgb(255 255 255 / 0.7);
  padding: 0.35rem 0.65rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
}

.dark .scorer-match-scoreboard__center-chip {
  border-color: rgb(82 82 82);
  background: rgb(38 38 38 / 0.6);
}

.scorer-match-scoreboard__center-chip-label {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgb(100 116 139);
}

.dark .scorer-match-scoreboard__center-chip-label {
  color: rgb(163 163 163);
}

.scorer-match-scoreboard__center-legs {
  font-size: 1.15rem;
  font-weight: 900;
  color: rgb(15 23 42);
}

.dark .scorer-match-scoreboard__center-legs {
  color: rgb(245 245 245);
}

.scorer-match-scoreboard__center-dash {
  margin: 0 0.2rem;
  color: rgb(148 163 184);
}

.scorer-match-scoreboard__center-subline,
.scorer-match-scoreboard__center-detail {
  text-align: center;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(100 116 139);
}

.scorer-match-scoreboard__center-detail {
  letter-spacing: normal;
  text-transform: none;
  font-size: 0.6875rem;
  font-weight: 500;
}

.scorer-match-scoreboard__center-turn {
  margin-top: 0.15rem;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 700;
  color: rgb(5 150 105);
}

.dark .scorer-match-scoreboard__center-turn {
  color: rgb(110 231 183);
}

main.vk-score-embed .scorer-match-scoreboard__panel {
  padding: 0.55rem 0.65rem;
}

main.vk-score-embed:not(.scorer-tablet-wide) .scorer-match-scoreboard__primary-num {
  font-size: clamp(2.75rem, 12vw, 3.75rem);
}

@media (min-width: 640px) {
  main.vk-score-embed:not(.scorer-tablet-wide) .scorer-match-scoreboard__primary-num {
    font-size: clamp(3rem, 9vw, 4.25rem);
  }
}

main.vk-score-embed .scorer-match-scoreboard__visit-pill {
  font-size: 0.875rem;
  padding: 0.24rem 0.58rem;
  min-width: 2.05rem;
}

@media (min-width: 640px) {
  main.vk-score-embed .scorer-match-scoreboard__visit-pill {
    font-size: 2rem;
    padding: 0.28rem 0.68rem;
    min-width: 2.35rem;
  }
}

main.vk-score-embed .scorer-match-scoreboard__name {
  font-size: 0.8125rem;
}

.scorer-live-body.scorer-live-body--match-console {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  --scorer-scoreboard-keypad-gap: 0.2rem;
}

@media (min-width: 640px) {
  .scorer-live-body.scorer-live-body--match-console {
    --scorer-scoreboard-keypad-gap: 0.25rem;
  }
}

/* Breathing room between remaining-score strip and score entry keypad. */
.scorer-live-body--match-console:has(.scorer-scoreboard-slot) > .scorer-keypad-zone,
.scorer-live-body--match-console:has(.scorer-scoreboard-slot) .scorer-keypad-section {
  margin-top: var(--scorer-scoreboard-keypad-gap);
}

/* ----- Throw history (mobile scroll + collapsible panel) ----- */

.scorer-history-scroll {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.scorer-history-visit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.625rem 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.75rem;
  background: rgb(248 250 252);
  outline: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.dark .scorer-history-visit {
  background: rgb(10 10 10 / 0.45);
}

.scorer-history-visit--editable {
  cursor: pointer;
}

.scorer-history-visit--editable:focus-visible {
  box-shadow: 0 0 0 2px rgb(14 165 233);
}

.scorer-history-visit--locked {
  cursor: not-allowed;
  opacity: 0.72;
}

.scorer-history-visit--editing {
  background: rgb(240 249 255 / 0.92);
  box-shadow: 0 0 0 2px rgb(14 165 233);
}

.dark .scorer-history-visit--editing {
  background: rgb(8 47 73 / 0.35);
}

.scorer-history-visit__avatar {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 9999px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgb(226 232 240 / 0.95);
}

.dark .scorer-history-visit__avatar {
  box-shadow: 0 0 0 1px rgb(82 82 82 / 0.95);
}

.scorer-history-visit__main {
  min-width: 0;
}

.scorer-history-visit__name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.5rem;
  min-width: 0;
}

.scorer-history-visit__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  color: rgb(15 23 42);
}

.dark .scorer-history-visit__name {
  color: rgb(245 245 245);
}

.scorer-history-visit__tag {
  flex-shrink: 0;
  border-radius: 0.375rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.scorer-history-visit__tag--bust {
  color: rgb(225 29 72);
}

.dark .scorer-history-visit__tag--bust {
  color: rgb(253 164 175);
}

.scorer-history-visit__tag--out {
  background: rgb(209 250 229 / 0.85);
  color: rgb(22 101 52);
}

.dark .scorer-history-visit__tag--out {
  background: rgb(6 78 59 / 0.45);
  color: rgb(167 243 208);
}

.scorer-history-visit__score {
  flex-shrink: 0;
  min-width: 2.25rem;
  text-align: right;
  font-family: var(--font-numeric-display, ui-monospace, monospace);
  font-size: 1.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: rgb(15 23 42);
}

.dark .scorer-history-visit__score {
  color: rgb(245 245 245);
}

.scorer-history-visit__score--bust {
  color: rgb(225 29 72);
}

.dark .scorer-history-visit__score--bust {
  color: rgb(253 164 175);
}

@media (min-width: 640px) {
  .scorer-history-visit {
    padding: 0.6875rem 0.875rem;
  }

  .scorer-history-visit__name {
    font-size: 0.9375rem;
  }

  .scorer-history-visit__score {
    font-size: 1.375rem;
  }
}

.scorer-history-mobile-toggle {
  min-height: 2.75rem;
}

@media (min-width: 768px) {
  .scorer-history-scroll {
    max-height: min(42vh, 22rem);
  }
}

@media (min-width: 1024px) {
  .scorer-history-scroll {
    max-height: min(52vh, 28rem);
  }
}

@media (min-width: 1280px) {
  .scorer-history-scroll {
    max-height: min(50vh, 30rem);
  }
}

/* Phone / narrow embed: history lives in keypad overlay; keep keypad column from scrolling aside below. */
@media (max-width: 767px) {
  main:not(.scorer-tablet-wide) .scorer-keypad-zone,
  main:not(.scorer-tablet-wide) .scorer-keypad-section {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: visible;
  }

  main:not(.scorer-tablet-wide) .scorer-keypad-history-grid {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  main:not(.scorer-tablet-wide) .scorer-keypad-history-grid > aside {
    display: none !important;
  }

  main:not(.scorer-tablet-wide) .scorer-keypad-stack {
    min-height: 0;
  }
}

main.vk-score-embed:not(.scorer-tablet-wide) .scorer-history-scroll {
  min-height: 12rem;
  max-height: min(48dvh, 26rem) !important;
}

/* Phone QR scorer (embed + window, not venue tablet shell) */
main.vk-score-embed.vk-score-embed--phone-scorer:not(.scorer-tablet-wide) .scorer-match-header {
  display: none !important;
}

main.vk-score-embed.vk-score-embed--phone-scorer:not(.scorer-tablet-wide) .scorer-scoreboard-slot {
  flex-shrink: 0;
}

main.vk-score-embed.vk-score-embed--phone-scorer:not(.scorer-tablet-wide) .scorer-keypad-section,
main.vk-score-embed.vk-score-embed--phone-scorer:not(.scorer-tablet-wide) .scorer-keypad-zone {
  min-height: 0;
}

main.vk-score-embed.vk-score-embed--phone-scorer:not(.scorer-tablet-wide) .scorer-keypad-stack {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

main.vk-score-embed.vk-score-embed--phone-scorer:not(.scorer-tablet-wide) .scorer-keypad-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

main.vk-score-embed.vk-score-embed--phone-scorer:not(.scorer-tablet-wide) .kiosk-scorer-keypad-overlay-host {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
}

main.vk-score-embed.vk-score-embed--phone-scorer:not(.scorer-tablet-wide) .scorer-keypad-submit-row {
  flex-shrink: 0;
  margin-top: 0;
  position: relative;
  z-index: 6;
  padding-top: 0.35rem;
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom, 0px));
  background: rgb(10 10 10 / 0.98);
  /* border-top: 1px solid rgb(255 255 255 / 0.08); */
}

.dark main.vk-score-embed.vk-score-embed--phone-scorer:not(.scorer-tablet-wide) .scorer-keypad-submit-row {
  background: rgb(10 10 10 / 0.98);
  border-top-color: rgb(255 255 255 / 0.1);
}

main.vk-score-embed.vk-score-embed--phone-scorer:not(.scorer-tablet-wide) .scorer-keypad-body {
  gap: 0.5rem;
}

main.vk-score-embed.vk-score-embed--phone-scorer .kiosk-scorer-keypad-quick-overlay--open {
  align-items: stretch !important;
  align-content: stretch !important;
  min-height: 100%;
  grid-auto-rows: minmax(4.6rem, 1fr);
}

main.vk-score-embed.vk-score-embed--phone-scorer .kiosk-scorer-keypad-quick-overlay--open .scorer-quick-preset-btn {
  min-height: 4.6rem !important;
  height: 100%;
}

main.vk-score-embed.vk-score-embed--phone-scorer .kiosk-scorer-score-history-toggle-row {
  background: rgb(241 245 249 / 0.98) !important;
}

.dark main.vk-score-embed.vk-score-embed--phone-scorer .kiosk-scorer-score-history-toggle-row {
  background: rgb(38 38 38 / 0.98) !important;
}

/* Scoreboard visit pills: swipe through recent throws on narrow screens. */
@media (max-width: 767px) {
  .scorer-match-scoreboard__visits {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    max-width: 100%;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }

  .scorer-match-scoreboard__panel--home .scorer-match-scoreboard__visits,
  .scorer-match-scoreboard__panel--away .scorer-match-scoreboard__visits {
    justify-content: flex-start;
  }

  .scorer-match-scoreboard__visit-pill {
    flex: 0 0 auto;
  }
}

.scorer-toolbar-row {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: stretch;
  gap: 0.35rem;
}

.scorer-shell-max-xl {
  width: 100%;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1536px) {
  .scorer-shell-max-xl:not(.vk-score-embed) {
    max-width: 1280px;
  }
}

/* Modular scorer shell — challenge media rail slot */
.scorer-shell--with-media .scorer-live-stack__body {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .scorer-shell--with-media .scorer-live-stack__body {
    grid-template-columns: minmax(0, 1fr) min(16rem, 22%);
  }
}

.scorer-media-rail {
  min-height: 8rem;
}

.scorer-roster--quad .scorer-player-card__name {
  font-size: 0.8125rem;
}

.scorer-roster--triple .scorer-player-card {
  padding: 0.35rem 0.5rem;
}

/* Fixture hub overview — extra-compact layout on tablet landscape only (not desktop TV / portrait) */
/* Fixture hub: program list scrolls inside the panel (especially when TV/QR sidebar is open). */
.vk-fixture-match-hub--shell-rail-open > .vk-fixture-hub-body,
[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub > .vk-fixture-hub-body {
  gap: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.vk-fixture-match-hub--shell-rail-open .vk-fixture-hub-scoreboard,
[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-scoreboard {
  flex-shrink: 0;
}

.vk-fixture-match-hub--shell-rail-open .vk-fixture-hub-main-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.vk-fixture-match-hub--shell-rail-open .vk-fixture-hub-spotlight {
  flex-shrink: 0;
}

.vk-fixture-match-hub--shell-rail-open .vk-fixture-hub-program {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.vk-fixture-match-hub--shell-rail-open .vk-fixture-hub-program-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-scoreboard {
  padding: 0.5rem 0.75rem;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-scoreboard .numeric-display {
  margin-top: 0.125rem;
  font-size: 1.5rem;
  line-height: 1;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-main-grid {
  flex: 1;
  min-height: 0;
  gap: 0.5rem;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-spotlight {
  padding: 0.5rem 0.625rem;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-spotlight-title {
  margin-top: 0;
  font-size: 0.875rem;
  line-height: 1.2;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-spotlight-matchup {
  margin-top: 0.125rem;
  font-size: 0.625rem;
  line-height: 1.25;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-spotlight-summary {
  margin-top: 0.125rem;
  font-size: 0.5625rem;
  line-height: 1.2;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-spotlight-legs {
  margin-top: 0.375rem;
  gap: 0.375rem;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-spotlight-leg-box {
  padding: 0.375rem 0.5rem;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-spotlight-leg-score {
  margin-top: 0.125rem;
  font-size: 1.25rem;
  line-height: 1;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-program {
  min-height: 0;
  flex: 1;
  padding: 0.5rem;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-program-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 0.25rem;
  -webkit-overflow-scrolling: touch;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-program-scroll > .vk-fixture-hub-program-item {
  min-height: 4.75rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

[data-kiosk-tier="tabletLandscape"] .vk-fixture-match-hub .vk-fixture-hub-program-scroll > .vk-fixture-hub-program-item .mt-2\.5 {
  margin-top: 0.375rem;
}

/* Venue kiosk iframe on tablet landscape: split chrome slots — race bar + roster + keypad flex independently. */
[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide {
  --scorer-header-h: 2.8rem;
  --scorer-tablet-kiosk-race-bar-h: var(--kiosk-touch-score-min);
  /* History rail sticky height: header + race row + up to two stacked player cards (four singles). */
  --scorer-chrome-offset: calc(
    var(--scorer-header-h)
    + var(--scorer-tablet-kiosk-race-bar-h)
    + (var(--scorer-player-card-h, 12rem) * 2)
    + 0.75rem
  );
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide.scorer-tablet-wide--four-singles {
  --scorer-chrome-offset: calc(
    var(--scorer-header-h)
    + var(--scorer-tablet-kiosk-race-bar-h)
    + (var(--scorer-player-card-h, 9.25rem) * 2)
    + 0.75rem
  );
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide.scorer-tablet-wide--team-doubles {
  /* Doubles: race bar + single row of two team remainings (same height as 1v1). */
  --scorer-tablet-kiosk-doubles-strip-h: calc(var(--scorer-remaining-box-h) + 2.75rem);
  --scorer-chrome-offset: calc(
    var(--scorer-header-h)
    + var(--scorer-tablet-kiosk-race-bar-h)
    + var(--scorer-tablet-kiosk-doubles-strip-h)
    + 0.75rem
  );
}

.scorer-tablet-kiosk-doubles-side__label {
  letter-spacing: 0.14em;
}

.scorer-tablet-kiosk-doubles-side__players {
  min-height: 1.25rem;
}

.scorer-tablet-kiosk-doubles-side__remaining {
  width: 100%;
}

.scorer-tablet-kiosk-doubles-side__remaining .scorer-remaining-display {
  font-size: var(--scorer-remaining-box-fs) !important;
  line-height: 0.95;
}

.scorer-tablet-kiosk-doubles-side--home .scorer-tablet-kiosk-doubles-side__remaining {
  border-color: rgb(147 197 253 / 0.45);
}

.scorer-tablet-kiosk-doubles-side--away .scorer-tablet-kiosk-doubles-side__remaining {
  border-color: rgb(252 165 165 / 0.45);
}

/* Venue tablet embed: avatar → name → visit pills stacked left; remaining stays right. */
[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .vk-embed-player-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.75rem;
  padding: 0.5rem 0.65rem;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .vk-embed-player-card .scorer-player-card__player-stack {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .vk-embed-player-card .scorer-player-card__avatar {
  width: var(--vk-embed-player-avatar);
  height: var(--vk-embed-player-avatar);
  align-self: flex-start;
  border-radius: 0.75rem;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .vk-embed-player-card .scorer-player-card__body {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .vk-embed-player-card .scorer-player-card__identity {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .vk-embed-player-card .scorer-player-card__name {
  overflow: visible;
  max-width: 100%;
  white-space: normal;
  text-overflow: unset;
  font-size: var(--vk-embed-player-name-fs);
  line-height: 1.15;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .vk-embed-player-card .scorer-player-card__role {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .vk-embed-player-card .scorer-player-card__visits {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .vk-embed-player-card .scorer-player-card__visit-pill {
  min-width: var(--vk-embed-visit-pill-min);
  min-height: var(--vk-embed-visit-pill-h);
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  font-size: var(--vk-embed-visit-pill-fs);
  line-height: 1;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .vk-embed-player-card .scorer-player-card__remaining-col {
  align-self: center;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-tablet-kiosk-chrome-slot,
[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-tablet-kiosk-roster-slot {
  flex: 0 0 auto;
  min-height: 0;
  min-width: 0;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-tablet-kiosk-keypad-slot {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-tablet-kiosk-roster-slot .scorer-player-strip,
[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-tablet-kiosk-roster-slot .vk-embed-player-strip {
  max-height: none;
  overflow-x: hidden;
  overflow-y: visible;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-tablet-kiosk-chrome-slot .scorer-tablet-kiosk-race-bar {
  margin-bottom: 0;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-match-header--minimal .scorer-match-header__action,
[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-match-header--minimal .vk-embed-header-action {
  min-height: 2.35rem;
  min-width: 2.35rem;
  padding: 0 0.45rem;
  font-size: 0.625rem;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-match-scoreboard-slot {
  padding-block: 0.125rem !important;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-match-scoreboard__primary-num,
[data-kiosk-tier="desktopTv"] main.vk-score-embed.scorer-tablet-wide .scorer-match-scoreboard__primary-num,
main.vk-score-embed.scorer-tablet-wide[data-kiosk-tier="tabletLandscape"] .scorer-match-scoreboard__primary-num,
main.vk-score-embed.scorer-tablet-wide[data-kiosk-tier="desktopTv"] .scorer-match-scoreboard__primary-num {
  font-size: var(--scorer-scoreboard-primary-fs) !important;
  line-height: 0.95;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .kiosk-scorer-score-entry-inner,
[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .kiosk-scorer-score-entry-inner input,
[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-score-input-field {
  min-height: 2.75rem;
}

/* Turn-only player strip (fixture doubles/beer) */
.scorer-player-strip--turn-only .scorer-player-card--compact {
  min-height: var(--scorer-player-card-h-compact, 3.25rem);
  padding: 0.35rem 0.5rem;
  gap: 0.5rem;
}

.scorer-player-strip--turn-only .scorer-player-card__avatar {
  width: 2.25rem;
  height: 2.25rem;
}

.scorer-player-strip--turn-only .scorer-player-card__name {
  font-size: 0.8125rem;
  line-height: 1.2;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-digit:not(.scorer-keypad-digit--portrait),
[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-util-btn:not(.scorer-keypad-digit--portrait) {
  min-height: var(--kiosk-touch-score-min, 5.625rem);
  max-height: none;
  height: 100%;
  font-size: clamp(2rem, 4.2vh, 3.3rem);
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-zone {
  flex-shrink: 1;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 0.65rem;
  align-items: stretch;
  height: 100%;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) > section {
  grid-column: 1 / 2;
  min-height: 0;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) > aside {
  grid-column: 2 / 3;
  position: relative;
  top: auto;
  align-self: stretch;
  max-height: none;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide[data-scorer-theme="panel"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) {
  display: grid !important;
  grid-template-columns: minmax(0, 4fr) minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  height: 100%;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide[data-scorer-theme="panel"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) > section {
  grid-column: 1 / 2 !important;
  grid-row: 1 / 2 !important;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide[data-scorer-theme="panel"] .scorer-keypad-history-grid:not(.scorer-keypad-history-grid--no-aside) > aside {
  grid-column: 2 / 3 !important;
  grid-row: 1 / 2 !important;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-history-aside {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.85rem;
  border: 1px solid rgb(148 163 184 / 0.35);
  background: rgb(248 250 252 / 0.92);
}

.dark [data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-history-aside {
  border-color: rgb(255 255 255 / 0.1);
  background: rgb(23 23 23 / 0.92);
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-history-aside__head {
  flex-shrink: 0;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-history-aside__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-history-aside .scorer-history-scroll {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: none !important;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-section,
[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-zone {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-history-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  align-items: stretch;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-history-grid > section {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .vk-embed-keypad-block,
[data-kiosk-tier="desktopTv"] main.vk-score-embed.scorer-tablet-wide .vk-embed-keypad-block {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-stack,
[data-kiosk-tier="desktopTv"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-stack {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-body,
[data-kiosk-tier="desktopTv"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-body > .kiosk-scorer-keypad-overlay-host,
[data-kiosk-tier="desktopTv"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-body > .kiosk-scorer-keypad-overlay-host {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-body > .kiosk-scorer-keypad-overlay-host > .kiosk-scorer-keypad-layer,
[data-kiosk-tier="desktopTv"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-body > .kiosk-scorer-keypad-overlay-host > .kiosk-scorer-keypad-layer {
  height: 100%;
  min-height: 0;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-segment-keypad,
[data-kiosk-tier="desktopTv"] main.vk-score-embed.scorer-tablet-wide .scorer-segment-keypad {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-segment-keypad__main,
[data-kiosk-tier="desktopTv"] main.vk-score-embed.scorer-tablet-wide .scorer-segment-keypad__main {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-submit-row,
[data-kiosk-tier="desktopTv"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-submit-row {
  flex-shrink: 0;
  margin-top: 0;
  position: relative;
  z-index: 6;
  padding-top: 0.25rem;
  padding-bottom: max(0.25rem, env(safe-area-inset-bottom, 0px));
  background: rgb(10 10 10 / 0.98);
  /* border-top: 1px solid rgb(255 255 255 / 0.08); */
}

.dark [data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-submit-row {
  border-top-color: rgb(255 255 255 / 0.1);
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-action-btn--enter,
[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-action-btn--undo,
[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-keypad-edit-action {
  min-height: var(--kiosk-touch-score-min);
  max-height: none;
  padding-block: 0;
  font-size: clamp(1.75rem, 3.6vh, 3.3rem);
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .scorer-history-scroll {
  max-height: none !important;
  height: 100%;
  min-height: 0;
}

[data-kiosk-tier="tabletLandscape"] main.vk-score-embed.scorer-tablet-wide .kiosk-scorer-mobile-history-drawer__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* Tablet venue kiosk: legs/sets row above remaining score cards — keypad row height + column grid */
.scorer-tablet-kiosk-race-bar {
  grid-auto-rows: minmax(var(--kiosk-touch-score-min), 1fr);
}

.scorer-tablet-kiosk-race-bar__side,
.scorer-tablet-kiosk-race-bar__center,
.scorer-tablet-kiosk-race-bar__pill,
.scorer-tablet-kiosk-race-bar__next,
.scorer-tablet-kiosk-race-bar__match-hint {
  min-height: var(--kiosk-touch-score-min);
  max-height: var(--kiosk-touch-score-max, none);
}

.scorer-tablet-kiosk-race-bar__pill {
  border-color: rgb(148 163 184 / 0.55);
  background: linear-gradient(180deg, rgb(248 250 252 / 0.98) 0%, rgb(241 245 249 / 0.96) 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.75);
}

.dark .scorer-tablet-kiosk-race-bar__pill {
  border-color: rgb(255 255 255 / 0.12);
  background: linear-gradient(180deg, rgb(38 38 38 / 0.96) 0%, rgb(23 23 23 / 0.98) 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.06);
}

.scorer-tablet-kiosk-race-bar__pill--home {
  border-color: rgb(16 185 129 / 0.45);
  background: linear-gradient(180deg, rgb(236 253 245 / 0.98) 0%, rgb(209 250 229 / 0.92) 100%);
}

.dark .scorer-tablet-kiosk-race-bar__pill--home {
  border-color: rgb(52 211 153 / 0.35);
  background: linear-gradient(180deg, rgb(6 78 59 / 0.55) 0%, rgb(2 44 34 / 0.72) 100%);
}

.scorer-tablet-kiosk-race-bar__pill--away {
  border-color: rgb(56 189 248 / 0.45);
  background: linear-gradient(180deg, rgb(240 249 255 / 0.98) 0%, rgb(224 242 254 / 0.92) 100%);
}

.dark .scorer-tablet-kiosk-race-bar__pill--away {
  border-color: rgb(56 189 248 / 0.35);
  background: linear-gradient(180deg, rgb(12 74 110 / 0.55) 0%, rgb(8 47 73 / 0.72) 100%);
}

.scorer-tablet-kiosk-race-bar__pill-label {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
  color: rgb(100 116 139);
}

.dark .scorer-tablet-kiosk-race-bar__pill-label {
  color: rgb(148 163 184);
}

.scorer-tablet-kiosk-race-bar__pill--home .scorer-tablet-kiosk-race-bar__pill-label {
  color: rgb(4 120 87);
}

.dark .scorer-tablet-kiosk-race-bar__pill--home .scorer-tablet-kiosk-race-bar__pill-label {
  color: rgb(110 231 183);
}

.scorer-tablet-kiosk-race-bar__pill--away .scorer-tablet-kiosk-race-bar__pill-label {
  color: rgb(3 105 161);
}

.dark .scorer-tablet-kiosk-race-bar__pill--away .scorer-tablet-kiosk-race-bar__pill-label {
  color: rgb(125 211 252);
}

.scorer-tablet-kiosk-race-bar__pill-value {
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 900;
  line-height: 0.95;
  color: rgb(15 23 42);
}

.dark .scorer-tablet-kiosk-race-bar__pill-value {
  color: rgb(248 250 252);
}

.scorer-tablet-kiosk-race-bar__pill-sub {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  color: rgb(71 85 105);
}

.dark .scorer-tablet-kiosk-race-bar__pill-sub {
  color: rgb(148 163 184);
}

.scorer-tablet-kiosk-race-bar__next-label {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.1;
  color: rgb(109 40 217);
}

.dark .scorer-tablet-kiosk-race-bar__next-label {
  color: rgb(196 181 253);
}

.scorer-tablet-kiosk-race-bar__next-name {
  font-size: clamp(0.85rem, 2vw, 1rem);
  font-weight: 800;
  line-height: 1.15;
  color: rgb(46 16 101);
}

.dark .scorer-tablet-kiosk-race-bar__next-name {
  color: rgb(237 233 254);
}

.scorer-tablet-kiosk-race-bar__match-hint-text {
  font-size: clamp(0.65rem, 1.6vw, 0.78rem);
  font-weight: 700;
  line-height: 1.2;
  color: rgb(51 65 85);
}

.dark .scorer-tablet-kiosk-race-bar__match-hint-text {
  color: rgb(203 213 225);
}

/* ----- TV match boards (fixture / challenge / tournament — readable from several metres) ----- */
.tv-match-board,
.tv-fixture-board {
  --tv-fb-stat-value: clamp(2.25rem, 4.5vw, 4rem);
  --tv-fb-stat-label: clamp(0.8rem, 1.35vw, 1.05rem);
  --tv-fb-player-name: clamp(1.35rem, 2.5vw, 2.35rem);
  --tv-fb-team-name: clamp(1.35rem, 2.4vw, 2.1rem);
  --tv-fb-match-title: clamp(1.75rem, 3.5vw, 3.25rem);
  --tv-fb-live-remaining: clamp(5.5rem, 13vw, 10.5rem);
  --tv-fb-leg-score: clamp(4rem, 8.5vw, 6.75rem);
  --tv-fb-fixture-stat-value: clamp(2.75rem, 5.5vw, 4.75rem);
  --tv-fb-fixture-stat-label: clamp(0.95rem, 1.55vw, 1.25rem);
  --tv-fb-visit-score: clamp(2.25rem, 4.8vw, 3.75rem);
}

.tv-match-board .tv-fb-match-title,
.tv-fixture-board .tv-fb-match-title {
  font-size: var(--tv-fb-match-title);
  line-height: 1.1;
}

.tv-match-board .tv-fb-team-logo,
.tv-fixture-board .tv-fb-team-logo {
  width: clamp(3.75rem, 6.5vw, 5.75rem);
  height: clamp(3.75rem, 6.5vw, 5.75rem);
}

.tv-match-board .tv-fb-team-name,
.tv-fixture-board .tv-fb-team-name,
.tv-match-board .tv-fb-participant-name,
.tv-fixture-board .tv-fb-participant-name {
  font-size: var(--tv-fb-team-name);
  line-height: 1.15;
}

.tv-match-board .tv-fb-player-avatar,
.tv-fixture-board .tv-fb-player-avatar,
.tv-match-board .tv-fb-participant-avatar,
.tv-fixture-board .tv-fb-participant-avatar {
  width: clamp(5rem, 8.5vw, 7.25rem);
  height: clamp(5rem, 8.5vw, 7.25rem);
}

.tv-match-board .tv-fb-player-name,
.tv-fixture-board .tv-fb-player-name {
  font-size: var(--tv-fb-player-name);
  line-height: 1.12;
}

.tv-match-board .tv-fb-stat-cell,
.tv-fixture-board .tv-fb-stat-cell {
  min-height: clamp(5.25rem, 10vw, 7.25rem);
}

.tv-match-board .tv-fb-stat-cell--identity,
.tv-fixture-board .tv-fb-stat-cell--identity {
  min-height: clamp(6rem, 11vw, 8.5rem);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.tv-match-board .tv-fb-stat-identity-avatar,
.tv-fixture-board .tv-fb-stat-identity-avatar {
  width: clamp(3.25rem, 5.25vw, 4.75rem);
  height: clamp(3.25rem, 5.25vw, 4.75rem);
}

.tv-match-board .tv-fb-stat-identity-name,
.tv-fixture-board .tv-fb-stat-identity-name {
  font-size: clamp(0.8rem, 1.35vw, 1.05rem);
  line-height: 1.15;
  max-width: 100%;
}

.tv-match-board .tv-fb-stat-label,
.tv-fixture-board .tv-fb-stat-label {
  font-size: var(--tv-fb-stat-label);
  letter-spacing: 0.1em;
}

.tv-match-board .tv-fb-stat-value,
.tv-fixture-board .tv-fb-stat-value {
  font-size: var(--tv-fb-stat-value) !important;
  line-height: 1;
}

.tv-match-board .tv-fb-game-stage,
.tv-fixture-board .tv-fb-game-stage {
  font-size: clamp(1.5rem, 2.9vw, 2.65rem) !important;
  line-height: 1.1;
}

.tv-match-board .tv-fb-leg-stage,
.tv-fixture-board .tv-fb-leg-stage,
.tv-match-board .tv-fb-game-meta,
.tv-fixture-board .tv-fb-game-meta,
.tv-match-board .tv-fb-center-meta,
.tv-fixture-board .tv-fb-center-meta {
  font-size: clamp(1.15rem, 2.1vw, 1.85rem) !important;
  line-height: 1.15;
}

.tv-match-board .tv-fb-next-avatar,
.tv-fixture-board .tv-fb-next-avatar {
  width: clamp(4.25rem, 7.5vw, 6.25rem);
  height: clamp(4.25rem, 7.5vw, 6.25rem);
}

.tv-match-board .tv-fb-next-name,
.tv-fixture-board .tv-fb-next-name {
  font-size: clamp(1.05rem, 1.9vw, 1.55rem);
}

.tv-match-board .tv-fb-live-avatar,
.tv-fixture-board .tv-fb-live-avatar {
  width: clamp(5rem, 8.5vw, 7.25rem);
  height: clamp(5rem, 8.5vw, 7.25rem);
}

.tv-match-board .tv-fb-live-name,
.tv-fixture-board .tv-fb-live-name {
  font-size: clamp(1.45rem, 2.6vw, 2.35rem);
  line-height: 1.12;
}

.tv-match-board .tv-fb-live-remaining,
.tv-fixture-board .tv-fb-live-remaining,
.tv-match-board .tv-fb-tournament-remaining,
.tv-fixture-board .tv-fb-tournament-remaining {
  font-size: var(--tv-fb-live-remaining) !important;
  line-height: 0.92;
}

.tv-match-board .tv-fb-leg-label,
.tv-fixture-board .tv-fb-leg-label,
.tv-match-board .tv-fb-side-label,
.tv-fixture-board .tv-fb-side-label {
  font-size: clamp(0.9rem, 1.45vw, 1.15rem);
  letter-spacing: 0.14em;
}

.tv-match-board .tv-fb-leg-score,
.tv-fixture-board .tv-fb-leg-score,
.tv-match-board .tv-fb-match-pts,
.tv-fixture-board .tv-fb-match-pts,
.tv-match-board .tv-fb-tournament-legs,
.tv-fixture-board .tv-fb-tournament-legs {
  font-size: var(--tv-fb-leg-score) !important;
  line-height: 1;
}

.tv-match-board .tv-fb-section-label,
.tv-fixture-board .tv-fb-section-label {
  font-size: clamp(0.95rem, 1.5vw, 1.2rem);
  letter-spacing: 0.14em;
}

.tv-match-board .tv-fb-section-badge,
.tv-fixture-board .tv-fb-section-badge {
  font-size: clamp(0.85rem, 1.35vw, 1.05rem);
}

.tv-match-board .tv-fb-visit-actor,
.tv-fixture-board .tv-fb-visit-actor {
  font-size: clamp(0.95rem, 1.55vw, 1.25rem);
}

.tv-match-board .tv-fb-visit-score,
.tv-fixture-board .tv-fb-visit-score {
  font-size: var(--tv-fb-visit-score) !important;
  line-height: 1;
}

.tv-match-board .tv-fb-visit-meta,
.tv-fixture-board .tv-fb-visit-meta {
  font-size: clamp(0.85rem, 1.35vw, 1.05rem) !important;
}

.tv-match-board .tv-fb-fixture-stat-label,
.tv-fixture-board .tv-fb-fixture-stat-label {
  font-size: var(--tv-fb-fixture-stat-label);
  letter-spacing: 0.12em;
}

.tv-match-board .tv-fb-fixture-stat-value,
.tv-fixture-board .tv-fb-fixture-stat-value {
  font-size: var(--tv-fb-fixture-stat-value) !important;
  line-height: 1;
}

.tv-match-board .tv-fb-180-value,
.tv-fixture-board .tv-fb-180-value {
  font-size: clamp(5.5rem, 14vw, 11rem) !important;
  line-height: 0.92;
}

.tv-match-board .tv-fb-180-subtitle,
.tv-fixture-board .tv-fb-180-subtitle {
  font-size: clamp(2rem, 4vw, 3.5rem);
}

.tv-match-board .tv-fb-180-avatar,
.tv-fixture-board .tv-fb-180-avatar {
  width: clamp(10rem, 18vw, 14rem);
  height: clamp(10rem, 18vw, 14rem);
}

.tv-match-board .tv-fb-180-name,
.tv-fixture-board .tv-fb-180-name {
  font-size: clamp(2rem, 4.2vw, 3.75rem);
  line-height: 1.1;
}

.tv-match-board .tv-fb-winner-title,
.tv-fixture-board .tv-fb-winner-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem) !important;
  line-height: 1.05;
}

.tv-match-board .tv-fb-winner-subtitle,
.tv-fixture-board .tv-fb-winner-subtitle {
  font-size: clamp(1.15rem, 2vw, 1.65rem);
}

.tv-match-board .tv-fb-tournament-panel,
.tv-fixture-board .tv-fb-tournament-panel {
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

@media (min-width: 1920px) {
  .tv-match-board,
  .tv-fixture-board {
    --tv-fb-stat-value: 4.25rem;
    --tv-fb-live-remaining: 11rem;
    --tv-fb-leg-score: 7rem;
    --tv-fb-fixture-stat-value: 5rem;
  }
}

/* Tablet Capacitor shell — scoped via data-tablet-shell on documentElement */
html[data-tablet-shell='1'] .scorer-keypad-stack,
html[data-tablet-shell='1'] .kiosk-scoring-grid,
html[data-tablet-shell='1'] .match-keypad-zone {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

html[data-tablet-shell='1'] .scorer-history-scroll,
html[data-tablet-shell='1'] .vk-hub-panel {
  overscroll-behavior: contain;
}

html[data-tablet-shell='1'] .vk-inline-scorer-root {
  touch-action: manipulation;
}

