:root {
  color-scheme: dark;
  --ink: #f7fbff;
  --muted: #a8b3c7;
  --panel: rgba(16, 21, 32, 0.78);
  --panel-strong: rgba(19, 26, 40, 0.94);
  --line: rgba(255, 255, 255, 0.14);
  --danger: #ff4f68;
  --good: #53e8a5;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 210, 63, 0.18), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(53, 167, 255, 0.24), transparent 30%),
    linear-gradient(135deg, #0d1320 0%, #151928 44%, #221525 100%);
  overflow-x: hidden;
}

body.screen-main {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--good);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stadium {
  width: min(1500px, calc(100vw - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 28px;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 14px;
}

.screen-main .stadium {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  grid-template-rows: var(--scoreboard-height, clamp(128px, 22vh, 212px)) minmax(0, 1fr);
  gap: var(--stage-gap, 10px);
  padding: var(--stage-pad-y, 12px) 0;
}

.scoreboard,
.race-shell,
.podium,
.phone-panel,
.admin-layout {
  backdrop-filter: blur(22px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.scoreboard {
  min-height: 212px;
  border-radius: 8px;
  padding: 0;
  display: block;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.screen-main .scoreboard {
  height: var(--scoreboard-height, clamp(128px, 22vh, 212px));
  min-height: 0;
}

.scenery {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(151, 184, 205, 0.25), rgba(13, 19, 30, 0.08) 34%, transparent 44%),
    linear-gradient(180deg, transparent 0 39%, rgba(28, 34, 43, 0.76) 39% 64%, #151922 64% 100%);
}

.scenery::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%) 0 42px / 126px 7px repeat-x,
    linear-gradient(180deg, #363c45, #1d222b 55%, #10141c);
  border-top: 3px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 22px 28px rgba(0, 0, 0, 0.34);
}

.scenery::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.12), transparent 16%, transparent 84%, rgba(255,255,255,0.1)),
    radial-gradient(circle at 50% 0%, rgba(114, 247, 255, 0.16), transparent 45%);
  pointer-events: none;
}

.scenery-strip {
  position: absolute;
  left: 0;
  bottom: var(--scenery-strip-bottom, 86px);
  display: flex;
  align-items: end;
  gap: var(--scenery-gap, 32px);
  width: max-content;
  filter: saturate(0.92) contrast(1.05);
  animation: sceneryDrive 42s linear infinite;
}

.scenery-strip > span {
  flex: 0 0 auto;
  position: relative;
  display: block;
}

.skyline {
  width: var(--skyline-width, 180px);
  height: var(--skyline-height, 92px);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.52) 8px, transparent 8px) 18px 14px / 30px 20px repeat,
    linear-gradient(180deg, #495468, #252c38);
  clip-path: polygon(0 100%, 0 24%, 18% 24%, 18% 8%, 33% 8%, 33% 32%, 48% 32%, 48% 0, 66% 0, 66% 18%, 82% 18%, 82% 34%, 100% 34%, 100% 100%);
  opacity: 0.9;
}

.s2 { height: var(--skyline-s2-height, 116px); width: var(--skyline-s2-width, 210px); opacity: 0.82; }
.s3 { height: var(--skyline-s3-height, 78px); width: var(--skyline-s3-width, 150px); opacity: 0.74; }

.warehouse,
.glass-tower {
  width: var(--warehouse-width, 140px);
  height: var(--warehouse-height, 74px);
  border-radius: 5px 5px 0 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.18) 1px, transparent 1px) 0 0 / 18px 100%,
    linear-gradient(180deg, #6d7888, #353d49);
}

.warehouse.wide { width: var(--warehouse-wide-width, 220px); height: var(--warehouse-wide-height, 64px); }

.glass-tower {
  width: var(--tower-width, 74px);
  height: var(--tower-height, 132px);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.34) 10px, transparent 10px) 10px 10px / 26px 18px repeat,
    linear-gradient(180deg, #90a8ba, #3f4b5b);
}

.lightmast {
  width: var(--mast-width, 9px);
  height: var(--mast-height, 122px);
  background: #aeb7c4;
  box-shadow: var(--mast-arm-offset, 44px) 0 #aeb7c4;
}

.lightmast::before,
.lightmast::after {
  content: "";
  position: absolute;
  top: 2px;
  width: var(--mast-lamp-width, 44px);
  height: var(--mast-lamp-height, 10px);
  border-radius: 999px;
  background: rgba(255, 244, 190, 0.78);
  box-shadow: 0 0 18px rgba(255, 244, 190, 0.32);
}

.lightmast::before { left: var(--mast-lamp-left, -34px); }
.lightmast::after { left: var(--mast-lamp-right, 44px); }
.lightmast.small { height: var(--mast-small-height, 92px); }

.real-billboard {
  width: var(--billboard-width, 150px);
  height: var(--billboard-height, 62px);
  display: grid;
  place-items: center;
  margin-bottom: var(--billboard-bottom, 24px);
  border-radius: 4px;
  color: rgba(255,255,255,0.9);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent),
    #2a3444;
  border: 2px solid rgba(255,255,255,0.28);
  font-size: var(--billboard-font, 12px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.05;
  text-align: center;
  box-shadow: 0 18px 0 -12px #9ca7b5;
}

.real-billboard::after {
  content: "";
  position: absolute;
  left: var(--billboard-post-left, 68px);
  top: var(--billboard-height, 62px);
  width: var(--billboard-post-width, 10px);
  height: var(--billboard-post-height, 28px);
  background: #9ca7b5;
}

.real-billboard.alt {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.18), transparent),
    #6b314e;
}

.overpass {
  width: var(--overpass-width, 210px);
  height: var(--overpass-height, 92px);
  border-top: var(--overpass-border, 13px) solid #687484;
  border-left: var(--overpass-side, 12px) solid #687484;
  border-right: var(--overpass-side, 12px) solid #687484;
  opacity: 0.82;
}

.overpass.low { height: var(--overpass-low-height, 70px); }

.barrier {
  width: var(--barrier-width, 190px);
  height: var(--barrier-height, 34px);
  background:
    repeating-linear-gradient(110deg, #d8dde5 0 16px, #3b4453 16px 30px);
  opacity: 0.72;
}

@keyframes sceneryDrive {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(48px, 7vw, 112px);
  line-height: 0.9;
  font-weight: 900;
}

.join-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 360px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}

.qr-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 30;
  width: min(680px, calc(100vw - 40px));
  min-height: 188px;
  justify-content: center;
  padding: 20px 24px;
  background: rgba(8, 12, 20, 0.86);
  transform: translate(-50%, -50%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52);
}

.join-card img {
  width: 106px;
  height: 106px;
  border-radius: 8px;
  background: white;
}

.qr-panel img {
  width: clamp(128px, 11vw, 172px);
  height: clamp(128px, 11vw, 172px);
}

.join-card span,
.join-card strong {
  display: block;
}

.join-card span {
  color: var(--muted);
  margin-bottom: 6px;
}

.join-card strong {
  max-width: 280px;
  overflow-wrap: anywhere;
  font-size: 18px;
}

.qr-panel span {
  font-size: 18px;
}

.qr-panel strong {
  max-width: 460px;
  font-size: clamp(20px, 2vw, 30px);
}

.race-shell {
  border-radius: 8px;
  padding: 18px;
  display: flex;
  min-height: 520px;
  flex-direction: column;
}

.screen-main .race-shell {
  min-height: 0;
  overflow: hidden;
  padding: var(--race-pad, 10px);
}

.race-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.race-topline span {
  color: var(--muted);
  font-weight: 800;
}

.race-topline strong {
  display: block;
  margin-top: 3px;
  font-size: 26px;
}

.host-label {
  display: block;
  margin-top: 3px;
  color: rgba(247, 251, 255, 0.72);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.capacity {
  min-width: 96px;
  padding: 12px 18px;
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  font-size: 22px;
  font-weight: 900;
}

.track {
  flex: 1;
  display: grid;
  align-content: start;
  grid-auto-rows: minmax(94px, auto);
  gap: 12px;
}

.screen-main .track {
  min-height: 0;
  align-content: stretch;
}

.lane {
  display: grid;
  grid-template-columns: var(--lane-info-width, 210px) 1fr;
  gap: 14px;
  min-height: var(--lane-height, 94px);
  align-items: center;
}

.lane-info {
  height: 100%;
  border-radius: 8px;
  padding: var(--lane-padding, 16px);
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.lane-info strong,
.lane-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lane-info strong {
  font-size: var(--lane-name-size, 22px);
}

.lane-info span {
  margin-top: 8px;
  color: var(--muted);
  font-weight: 800;
}

.lane.no-mic .lane-info {
  background:
    linear-gradient(135deg, rgba(255, 210, 63, 0.24), rgba(255, 79, 104, 0.14)),
    var(--panel-strong);
  border-color: rgba(255, 210, 63, 0.66);
  box-shadow: inset 0 0 0 1px rgba(255, 210, 63, 0.18), 0 0 26px rgba(255, 210, 63, 0.2);
}

.lane.no-mic .lane-info span {
  color: #ffd23f;
}

.lane.no-mic .road {
  border-color: rgba(255, 210, 63, 0.46);
  background:
    linear-gradient(90deg, rgba(255, 210, 63, 0.26) 50%, transparent 50%) 0 50% / 78px 4px repeat-x,
    linear-gradient(180deg, #332737, #151018);
}

.lane.no-mic .progress-badge {
  color: #071017;
  background: linear-gradient(135deg, #ffd23f, #ff9d42);
  border-color: transparent;
  box-shadow: 0 0 24px rgba(255, 210, 63, 0.35);
}

.road {
  position: relative;
  height: var(--lane-height, 94px);
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 50%, transparent 50%) 0 50% / 78px 4px repeat-x,
    linear-gradient(180deg, #252b37, #111720);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.finish {
  position: absolute;
  inset: 0 26px 0 auto;
  width: 22px;
  background:
    linear-gradient(45deg, #fff 25%, #111 25%, #111 50%, #fff 50%, #fff 75%, #111 75%) 0 0 / 16px 16px;
  opacity: 0.95;
}

.car {
  position: absolute;
  left: calc(var(--x) * 0.86);
  bottom: var(--car-bottom, 8px);
  width: var(--car-width, 160px);
  transform: translateX(-8%);
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.42));
  transition: left 260ms linear;
}

.progress-badge {
  position: absolute;
  right: 58px;
  top: 10px;
  z-index: 2;
  min-width: 132px;
  max-width: 240px;
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-radius: 8px;
  color: rgba(247, 251, 255, 0.92);
  background: rgba(5, 8, 14, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  font-size: var(--progress-size, 13px);
  font-weight: 900;
  white-space: nowrap;
}

.track-duel {
  --lane-info-width: 250px;
  --lane-height: clamp(128px, 19vh, 178px);
  --lane-padding: 20px;
  --lane-name-size: clamp(28px, 2.5vw, 38px);
  --car-width: clamp(190px, 16vw, 260px);
  --car-bottom: 12px;
  --progress-size: 15px;
  gap: 18px;
}

.track-duel .lane-info span {
  font-size: clamp(16px, 1.2vw, 20px);
}

.lane.ghost .lane-info strong {
  font-size: clamp(20px, 1.7vw, 28px);
}

.lane.ghost .lane-info span {
  font-size: clamp(13px, 1vw, 16px);
}

.track-duel .road {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 50%, transparent 50%) 0 50% / 110px 6px repeat-x,
    linear-gradient(180deg, #2d3442, #111720);
}

.track-medium {
  --lane-info-width: 230px;
  --lane-height: clamp(104px, 15vh, 140px);
  --lane-name-size: 25px;
  --car-width: clamp(170px, 16vw, 230px);
  --car-bottom: 10px;
  --progress-size: 13px;
  gap: 14px;
}

.track-compact {
  --lane-info-width: 168px;
  --lane-height: 100%;
  --lane-padding: 7px 10px;
  --lane-name-size: 15px;
  --car-width: clamp(86px, 8vw, 112px);
  --car-bottom: 0px;
  --progress-size: 9px;
  grid-template-rows: repeat(var(--lane-count, 6), minmax(0, 1fr));
  gap: 4px;
}

.track-compact .lane {
  min-height: 0;
  height: 100%;
}

.track-compact .road {
  height: 100%;
}

.track-compact .lane-info span {
  margin-top: 1px;
  font-size: 10px;
}

.track-compact .lane.no-mic .lane-info span,
.track-packed .lane.no-mic .lane-info span {
  font-size: 9px;
  white-space: normal;
  line-height: 1.05;
}

.track-compact .progress-badge {
  right: 34px;
  top: 3px;
  min-width: 72px;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 6px;
}

.track-packed {
  --lane-info-width: 152px;
  --lane-height: clamp(42px, 5.2vh, 52px);
  --lane-padding: 6px 9px;
  --lane-name-size: 14px;
  --car-width: clamp(74px, 6.8vw, 98px);
  --car-bottom: 0px;
  --progress-size: 9px;
  grid-template-rows: repeat(var(--lane-count, 10), minmax(0, 1fr));
  gap: 3px;
}

.track-packed .lane {
  min-height: 0;
  height: 100%;
}

.track-packed .road {
  height: 100%;
}

.track-packed .lane-info span {
  margin-top: 1px;
  font-size: 10px;
}

.track-packed .progress-badge {
  right: 34px;
  top: 3px;
  min-width: 72px;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 6px;
}

.track-packed .finish {
  right: 18px;
  width: 16px;
  background-size: 12px 12px;
}

.compact-race {
  --scoreboard-height: clamp(92px, 15vh, 128px);
  --stage-gap: 8px;
  --stage-pad-y: 8px;
  --race-pad: 8px;
  --scenery-strip-bottom: 43px;
  --scenery-gap: 22px;
  --skyline-width: 118px;
  --skyline-height: 54px;
  --skyline-s2-width: 136px;
  --skyline-s2-height: 64px;
  --skyline-s3-width: 100px;
  --skyline-s3-height: 46px;
  --warehouse-width: 92px;
  --warehouse-height: 42px;
  --warehouse-wide-width: 142px;
  --warehouse-wide-height: 38px;
  --tower-width: 46px;
  --tower-height: 66px;
  --mast-width: 6px;
  --mast-height: 66px;
  --mast-small-height: 54px;
  --mast-arm-offset: 28px;
  --mast-lamp-width: 28px;
  --mast-lamp-height: 7px;
  --mast-lamp-left: -22px;
  --mast-lamp-right: 28px;
  --billboard-width: 96px;
  --billboard-height: 38px;
  --billboard-bottom: 12px;
  --billboard-font: 9px;
  --billboard-post-left: 43px;
  --billboard-post-width: 7px;
  --billboard-post-height: 16px;
  --overpass-width: 132px;
  --overpass-height: 54px;
  --overpass-low-height: 42px;
  --overpass-border: 8px;
  --overpass-side: 8px;
  --barrier-width: 118px;
  --barrier-height: 22px;
}

.packed-race {
  --scoreboard-height: clamp(72px, 11vh, 96px);
  --stage-gap: 6px;
  --stage-pad-y: 6px;
  --race-pad: 7px;
  --scenery-strip-bottom: 34px;
  --scenery-gap: 18px;
  --skyline-width: 92px;
  --skyline-height: 42px;
  --skyline-s2-width: 108px;
  --skyline-s2-height: 46px;
  --skyline-s3-width: 78px;
  --skyline-s3-height: 34px;
  --warehouse-width: 72px;
  --warehouse-height: 32px;
  --warehouse-wide-width: 112px;
  --warehouse-wide-height: 30px;
  --tower-width: 36px;
  --tower-height: 46px;
  --mast-width: 5px;
  --mast-height: 46px;
  --mast-small-height: 44px;
  --mast-arm-offset: 22px;
  --mast-lamp-width: 22px;
  --mast-lamp-height: 6px;
  --mast-lamp-left: -17px;
  --mast-lamp-right: 22px;
  --billboard-width: 76px;
  --billboard-height: 30px;
  --billboard-bottom: 8px;
  --billboard-font: 8px;
  --billboard-post-left: 34px;
  --billboard-post-width: 6px;
  --billboard-post-height: 12px;
  --overpass-width: 104px;
  --overpass-height: 42px;
  --overpass-low-height: 34px;
  --overpass-border: 6px;
  --overpass-side: 6px;
  --barrier-width: 92px;
  --barrier-height: 18px;
}

.compact-race .scenery-strip,
.packed-race .scenery-strip {
  bottom: var(--scenery-strip-bottom);
  transform: none;
}

.compact-race .scenery::before,
.packed-race .scenery::before {
  height: 54px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%) 0 25px / 96px 5px repeat-x,
    linear-gradient(180deg, #363c45, #1d222b 55%, #10141c);
}

.compact-race .race-shell,
.packed-race .race-shell {
  min-height: 0;
  padding: var(--race-pad);
}

.compact-race .race-topline,
.packed-race .race-topline {
  margin-bottom: 6px;
}

.compact-race .race-topline strong,
.packed-race .race-topline strong {
  font-size: 18px;
}

.compact-race .race-topline span,
.packed-race .race-topline span {
  font-size: 11px;
}

.compact-race .host-label,
.packed-race .host-label {
  margin-top: 1px;
  font-size: 10px;
}

.compact-race .capacity,
.packed-race .capacity {
  min-width: 66px;
  padding: 5px 10px;
  font-size: 15px;
}

.ghost {
  opacity: 0.42;
}

.car-body {
  fill: var(--car);
}

.car-light,
.hub {
  fill: var(--accent);
}

.car-glass {
  fill: #d9f5ff;
  opacity: 0.92;
}

.dps-body {
  fill: #f7f8fb;
  stroke: rgba(10, 18, 30, 0.18);
  stroke-width: 1.5;
}

.dps-blue {
  fill: #1468b8;
}

.dps-door {
  fill: rgba(255, 255, 255, 0.72);
}

.dps-glass {
  fill: #cfefff;
  opacity: 0.92;
}

.dps-light {
  fill: #fff4a8;
}

.dps-bar-red {
  fill: #ff334d;
  filter: drop-shadow(0 0 4px rgba(255, 51, 77, 0.8));
}

.dps-bar-blue {
  fill: #2f8cff;
  filter: drop-shadow(0 0 4px rgba(47, 140, 255, 0.8));
}

.dps-text {
  fill: #fff;
  font-family: Inter, Arial, sans-serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 1px;
}

.dps-badge {
  fill: var(--car);
  opacity: 0.9;
}

.wheel {
  fill: #06080d;
}

.car-shadow {
  fill: rgba(0, 0, 0, 0.26);
}

.countdown {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 20;
  background: rgba(4, 7, 12, 0.58);
  backdrop-filter: blur(8px);
  font-size: clamp(92px, 18vw, 260px);
  font-weight: 900;
  text-shadow: 0 18px 52px rgba(0, 0, 0, 0.5);
}

.podium {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  padding: 28px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--car, #53e8a5) 28%, transparent), transparent 30%),
    rgba(5, 8, 14, 0.78);
  backdrop-filter: blur(12px);
}

.podium span,
.podium p {
  color: rgba(247, 251, 255, 0.78);
  font-weight: 800;
}

.podium strong {
  display: block;
  font-size: clamp(68px, 14vw, 220px);
  line-height: 0.95;
  color: white;
  text-shadow: 0 22px 70px color-mix(in srgb, var(--car, #53e8a5) 50%, rgba(0, 0, 0, 0.6));
}

.podium p {
  margin: 18px 0 0;
  font-size: clamp(22px, 3vw, 42px);
}

.winner-burst {
  width: min(1100px, 94vw);
  min-height: min(600px, 82vh);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--car) 25%, transparent), rgba(255, 255, 255, 0.07)),
    rgba(18, 24, 36, 0.84);
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.58), inset 0 0 80px color-mix(in srgb, var(--accent) 18%, transparent);
  text-align: center;
}

.winner-burst span {
  color: var(--accent);
  font-size: clamp(18px, 2vw, 30px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.standings {
  width: min(680px, 88vw);
  margin: 22px auto 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.standings li {
  min-height: 44px;
  display: grid;
  grid-template-columns: 44px 1fr 72px;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.standings li span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #061017;
  background: var(--car);
  font-size: 16px;
  letter-spacing: 0;
}

.standings li strong,
.standings li em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standings li strong {
  font-size: clamp(16px, 2vw, 24px);
  text-align: left;
}

.standings li em {
  color: rgba(247, 251, 255, 0.8);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.winner-host {
  display: block;
  margin-top: 14px;
  color: rgba(247, 251, 255, 0.62);
  font-size: clamp(12px, 1.2vw, 16px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


.quick-controls {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(8, 12, 20, 0.72);
  border: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.32);
  pointer-events: auto;
}

.quick-controls-body {
  display: flex;
  gap: 5px;
}

.quick-controls.collapsed .quick-controls-body {
  display: none;
}

.quick-controls button,
.quick-controls a {
  position: relative;
  z-index: 1;
  min-height: 30px;
  border-radius: 8px;
  padding: 0 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  display: inline-grid;
  place-items: center;
  text-decoration: none;
  font-size: 11px;
  font-weight: 900;
  touch-action: manipulation;
  user-select: none;
}

.quick-controls .quick-toggle {
  width: 30px;
  min-width: 30px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.quick-modes {
  display: flex;
  gap: 4px;
}

.quick-mode.active {
  color: #061017;
  background: #ffd23f;
  border-color: transparent;
}

.quick-controls .quick-primary {
  color: #061017;
  background: linear-gradient(135deg, #53e8a5, #72f7ff);
  border: 0;
}

.quick-controls .quick-danger {
  color: white;
  background: rgba(255, 79, 104, 0.28);
  border-color: rgba(255, 79, 104, 0.48);
}

.screen-phone {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 18px;
}

.phone-panel {
  width: min(100%, 480px);
  border-radius: 8px;
  padding: 22px;
}

.join-form h1 {
  margin-bottom: 28px;
  font-size: 46px;
}

label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-weight: 800;
}

input {
  width: 100%;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 16px;
  outline: none;
}

input:focus {
  border-color: rgba(83, 232, 165, 0.86);
}

.color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.color-choice {
  min-height: 54px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  font-weight: 900;
}

.color-choice.selected {
  outline: 3px solid rgba(83, 232, 165, 0.54);
}

.color-choice span,
.player-dot {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--swatch, var(--car));
  box-shadow: 0 0 24px var(--swatch, var(--car));
}

.primary,
.secondary,
.danger {
  min-height: 52px;
  border-radius: 8px;
  padding: 0 18px;
  color: #061017;
  background: linear-gradient(135deg, #53e8a5, #72f7ff);
  font-weight: 900;
}

.secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
}

.danger {
  color: white;
  background: rgba(255, 79, 104, 0.22);
  border: 1px solid rgba(255, 79, 104, 0.42);
}

.error {
  min-height: 24px;
  color: #ff91a2;
  font-weight: 800;
}

.driver-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.driver-card p {
  margin-bottom: 4px;
  color: var(--muted);
  font-weight: 900;
}

.driver-card strong {
  font-size: 30px;
}

.mini-car {
  width: 130px;
}

.meter {
  position: relative;
  height: 280px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

#meterFill {
  position: absolute;
  inset: auto 0 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #53e8a5, #ffd23f, #ff4fb8);
  transition: width 80ms linear;
}

#meterText {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 64px;
  font-weight: 900;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.44);
}

.hint {
  color: var(--muted);
  margin: 14px 0 0;
  line-height: 1.45;
}

.admin-layout {
  width: min(1120px, calc(100vw - 36px));
  margin: 28px auto;
  border-radius: 8px;
  padding: 24px;
}

.admin-header,
.section-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-header h1 {
  font-size: 58px;
}

.admin-actions,
.mode-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-section {
  margin-top: 28px;
}

.admin-section h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.admin-section-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-limit-line {
  align-items: end;
}

.admin-limit-control {
  display: grid;
  grid-template-columns: 96px auto;
  gap: 10px;
  align-items: end;
}

.admin-limit-control input {
  height: 52px;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
}

.max-presets {
  display: grid;
  grid-template-columns: repeat(10, minmax(38px, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.max-presets button {
  min-height: 42px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-weight: 900;
}

.max-presets button.active {
  color: #071017;
  background: linear-gradient(135deg, #53e8a5, #ffd23f);
  border-color: transparent;
}

.mode-tabs button {
  min-height: 48px;
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  font-weight: 900;
}

.mode-tabs .active {
  color: #071017;
  background: #ffd23f;
}

.admin-players {
  display: grid;
  gap: 10px;
}

.admin-player {
  display: grid;
  grid-template-columns: 28px 1fr 72px auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
}

.admin-player span {
  color: var(--muted);
  font-weight: 900;
  text-align: right;
}

.empty {
  min-height: 100px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 8px;
  border: 1px dashed var(--line);
  font-weight: 900;
}

.join-host,
.admin-host {
  margin: -18px 0 22px;
  color: rgba(247, 251, 255, 0.72);
  font-weight: 900;
}

.screen-sales {
  min-height: 100vh;
  overflow-x: hidden;
}

.sales-page {
  width: min(1180px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.narrow-page {
  width: min(900px, calc(100vw - 36px));
}

.sales-hero {
  min-height: min(760px, calc(100vh - 56px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.84fr);
  align-items: center;
  gap: 34px;
}

.sales-copy h1,
.activation-page h1,
.document-page h1 {
  margin-bottom: 24px;
  font-size: clamp(58px, 9vw, 132px);
  line-height: 0.88;
  letter-spacing: 0;
}

.sales-lead {
  max-width: 720px;
  color: rgba(247, 251, 255, 0.82);
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.28;
  font-weight: 800;
}

.sales-actions,
.cabinet-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.sales-button,
.cabinet-links a {
  min-height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  padding: 0 20px;
  text-decoration: none;
}

.sales-race {
  position: relative;
  min-width: 0;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(16, 21, 32, 0.78);
  box-shadow: 0 32px 95px rgba(0, 0, 0, 0.42);
}

.sales-race img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sales-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(136, 180, 205, 0.38), rgba(14, 20, 31, 0.2) 34%, rgba(14, 20, 31, 0.92) 35%),
    #151b27;
  box-shadow: 0 32px 95px rgba(0, 0, 0, 0.42);
}

.sales-panorama {
  height: 38%;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.35) 12px, transparent 12px) 32px 28px / 54px 32px repeat,
    linear-gradient(90deg, #536477 0 24%, #2c3545 24% 36%, #738395 36% 52%, #3d4858 52% 70%, #5f6d7e 70% 100%);
  clip-path: polygon(0 100%, 0 34%, 13% 34%, 13% 18%, 25% 18%, 25% 44%, 38% 44%, 38% 8%, 53% 8%, 53% 38%, 68% 38%, 68% 24%, 83% 24%, 83% 46%, 100% 46%, 100% 100%);
  opacity: 0.86;
}

.sales-lane {
  position: relative;
  height: 82px;
  margin: 30px 28px 0;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.2) 50%, transparent 50%) 0 50% / 88px 5px repeat-x,
    linear-gradient(180deg, #303847, #111720);
  border: 1px solid rgba(255,255,255,0.14);
}

.sales-lane span {
  position: absolute;
  left: 16%;
  bottom: 10px;
  width: 138px;
  height: 54px;
  border-radius: 22px 34px 14px 14px;
  background: linear-gradient(135deg, #35a7ff, #72f7ff);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.32);
}

.sales-lane span::before,
.sales-lane span::after {
  content: "";
  position: absolute;
  bottom: -10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #070b12;
  border: 7px solid #d9f5ff;
}

.sales-lane span::before { left: 22px; }
.sales-lane span::after { right: 18px; }

.sales-lane.alt span {
  left: 42%;
  background: linear-gradient(135deg, #ff4fb8, #ffd1ed);
}

.sales-lane strong {
  position: absolute;
  right: 22px;
  inset-block: 0;
  width: 18px;
  background:
    linear-gradient(45deg, #fff 25%, #111 25%, #111 50%, #fff 50%, #fff 75%, #111 75%) 0 0 / 14px 14px;
}

.sales-finish {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #53e8a5, #ffd23f, #ff4fb8);
}

.sales-grid,
.details-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.sales-grid article,
.sales-section,
.price-panel,
.cabinet-card {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(16, 21, 32, 0.78);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px);
}

.sales-grid article {
  min-height: 220px;
  padding: 22px;
}

.sales-grid article span {
  display: block;
  margin-bottom: 28px;
  color: #ffd23f;
  font-size: 13px;
  font-weight: 900;
}

.sales-grid h2,
.sales-section h2 {
  font-size: clamp(24px, 3vw, 42px);
  line-height: 1;
}

.sales-grid p,
.sales-section p,
.sales-section li,
.sales-footer p {
  color: rgba(247, 251, 255, 0.76);
  line-height: 1.55;
  font-weight: 700;
}

.sales-section {
  margin-top: 16px;
  padding: 28px;
}

.product-section,
.activation-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.64fr);
  align-items: center;
  gap: 24px;
}

.price-panel {
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(83, 232, 165, 0.18), rgba(114, 247, 255, 0.08)),
    rgba(18, 24, 36, 0.92);
}

.price-panel span,
.cabinet-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.price-panel strong {
  display: block;
  margin: 10px 0;
  color: #fff;
  font-size: clamp(48px, 6vw, 74px);
  line-height: 1;
}

.price-buy-button {
  width: 100%;
  margin-top: 18px;
}

.activation-form {
  display: grid;
  gap: 12px;
}

.checkbox-line {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  color: rgba(247, 251, 255, 0.82);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.checkbox-line input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #53e8a5;
}

.checkbox-line a {
  color: #72f7ff;
}

.payment-card h2 {
  font-size: clamp(44px, 7vw, 76px);
}

.activation-form.stacked {
  max-width: 560px;
  margin-top: 24px;
}

.form-note,
.activation-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.warning-note {
  color: #ffd23f !important;
  border: 1px solid rgba(255, 210, 63, 0.34);
  background: rgba(255, 210, 63, 0.1);
}

.activation-error {
  color: #ffb0bd !important;
  border: 1px solid rgba(255, 79, 104, 0.36);
}

.cabinet-card {
  margin-top: 24px;
  padding: 24px;
}

.cabinet-card h2 {
  margin: 10px 0;
}

.details-section {
  grid-template-columns: 1fr 1fr;
}

.details-section ul {
  margin: 18px 0 0;
  padding-left: 20px;
}

.details-section li + li {
  margin-top: 10px;
}

.sales-footer {
  padding: 24px 0 0;
}

.sales-footer p {
  margin-bottom: 7px;
}

.sales-footer a {
  color: #72f7ff;
  font-weight: 900;
}

.sales-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.document-page .sales-section h2 {
  margin-top: 28px;
  font-size: 28px;
}

.owner-page {
  width: min(1380px, calc(100vw - 36px));
}

.owner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 0 18px;
}

.owner-header h1,
.owner-login h1 {
  font-size: clamp(46px, 7vw, 92px);
}

.owner-notice {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 8px;
  color: #061017;
  background: linear-gradient(135deg, #53e8a5, #72f7ff);
  font-weight: 900;
}

.owner-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.owner-stats article {
  min-height: 112px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(16, 21, 32, 0.78);
  backdrop-filter: blur(22px);
}

.owner-stats span,
.owner-games small,
.owner-state small,
.owner-row strong small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.owner-stats strong {
  display: block;
  margin-top: 10px;
  font-size: 42px;
}

.owner-add-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.owner-table {
  display: grid;
  gap: 8px;
  overflow-x: auto;
}

.owner-row {
  min-width: 1200px;
  display: grid;
  grid-template-columns: 160px minmax(210px, 1fr) 150px 220px 130px 190px 112px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.owner-row-head {
  min-height: 44px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.owner-row input,
.owner-row select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 12px;
  outline: none;
}

.owner-row select {
  appearance: none;
}

.owner-state {
  color: rgba(247, 251, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
}

.owner-games {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.owner-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.owner-links a {
  color: #72f7ff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 760px) {
  .stadium {
    width: min(100% - 24px, 1500px);
    padding: 12px 0;
  }

  .screen-main .stadium {
    width: min(100% - 16px, 1500px);
    padding: var(--stage-pad-y, 6px) 0;
  }

  .scoreboard,
  .admin-header,
  .section-line {
    align-items: stretch;
    flex-direction: column;
  }

  .join-card {
    min-width: 0;
    width: 100%;
  }

  .lane {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .lane-info {
    height: auto;
  }

  .car {
    width: 124px;
  }

  .compact-race {
    --scoreboard-height: clamp(68px, 10vh, 86px);
    --stage-gap: 5px;
    --stage-pad-y: 5px;
    --race-pad: 5px;
  }

  .packed-race .scoreboard {
    min-height: 0;
  }

  .compact-race .lane,
  .packed-race .lane {
    grid-template-columns: 86px 1fr;
    gap: 4px;
    min-height: 0;
  }

  .compact-race .lane-info,
  .packed-race .lane-info {
    height: 100%;
    padding: 4px 6px;
  }

  .compact-race .lane-info strong,
  .packed-race .lane-info strong {
    font-size: 12px;
  }

  .compact-race .lane-info span,
  .packed-race .lane-info span {
    font-size: 9px;
  }

  .compact-race .road,
  .packed-race .road {
    height: 100%;
  }

  .compact-race .car,
  .packed-race .car {
    width: 72px;
  }

  .packed-race .progress-badge {
    right: 24px;
    min-width: 62px;
    font-size: 8px;
  }

  .quick-controls {
    left: 12px;
    right: 12px;
    bottom: 12px;
    align-items: flex-start;
    justify-content: flex-start;
    max-width: calc(100vw - 24px);
  }

  .quick-controls-body {
    flex: 1;
    flex-wrap: wrap;
    min-width: 0;
  }

  .quick-modes {
    flex-wrap: wrap;
  }

  .quick-controls button,
  .quick-controls a {
    min-height: 28px;
    padding: 0 7px;
    font-size: 10px;
  }

  .quick-controls .quick-toggle {
    flex: 0 0 28px;
    width: 28px;
    min-width: 28px;
    font-size: 16px;
  }

  .admin-player {
    grid-template-columns: 28px 1fr;
  }

  .admin-player span,
  .admin-player button {
    grid-column: 2;
  }

  .admin-limit-control {
    grid-template-columns: 1fr;
  }

  .max-presets {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
  }

  .sales-page {
    width: min(100% - 24px, 1180px);
    padding: 18px 0 28px;
  }

  .sales-hero,
  .product-section,
  .activation-section,
  .details-section,
  .sales-grid {
    grid-template-columns: 1fr;
  }

  .sales-hero {
    min-height: auto;
    gap: 20px;
  }

  .sales-copy h1,
  .activation-page h1,
  .document-page h1 {
    font-size: clamp(48px, 17vw, 76px);
  }

  .sales-lead {
    font-size: 18px;
  }

  .sales-race {
    aspect-ratio: 16 / 10;
  }

  .sales-grid article {
    min-height: 0;
  }

  .sales-section {
    padding: 20px;
  }

  .owner-header,
  .owner-add-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .owner-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* Keep every lane and the controls inside the available screen height. */
.screen-main .stadium {
  padding-bottom: calc(var(--controls-space, 0px) + 10px);
}
.screen-main .track {
  grid-template-rows: repeat(var(--lane-count, 2), minmax(0, 1fr));
  grid-auto-rows: unset;
  gap: 6px;
}
.screen-main .lane {
  min-height: 0;
  height: 100%;
  grid-template-columns: minmax(0, var(--lane-info-width, 180px)) minmax(0, 1fr);
}
.screen-main .lane-info {
  min-width: 0;
  min-height: 0;
  padding: 5px 9px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.screen-main .lane-info span { margin-top: 3px; }
.screen-main .road { height: 100%; min-height: 0; }
.screen-main .car {
  width: var(--car-width, 100px);
  left: calc((100% - var(--car-width, 100px)) * var(--progress, 0));
  bottom: 2px;
  transform: none;
  line-height: 0;
}
.screen-main .car svg { display: block; width: 100%; height: auto; }
.screen-main .track-duel { --lane-name-size: 30px; --lane-info-width: 225px; }
.screen-main .progress-badge {
  top: 2px;
  right: 30px;
  min-height: 16px;
  min-width: 0;
  padding: 1px 5px;
  font-size: 11px;
  border-radius: 4px;
}
.screen-main .lane.ghost .lane-info strong { font-size: 18px; }
.screen-main .race-topline { flex-shrink: 0; }
.screen-main .race-topline > div:first-child { min-width: 0; }
.host-label { overflow-wrap: anywhere; letter-spacing: 0; }
.countdown { z-index: 40; font-size: 160px; pointer-events: none; }
.podium {
  padding: 12px 16px calc(var(--controls-space, 0px) + 12px);
  background: rgba(5, 8, 14, .92);
  overflow: auto;
}
.winner-burst {
  width: min(1050px, 100%);
  min-height: 0;
  max-height: 100%;
  padding: 18px;
  gap: 8px;
  border: none;
  background: transparent;
  box-shadow: none;
}
.winner-burst > strong {
  font-size: 76px;
  line-height: 1.03;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.winner-burst > span { font-size: 20px; letter-spacing: 0; }
.winner-burst > p { font-size: 23px; margin: 0; }
.winner-host { font-size: 13px; letter-spacing: 0; margin-top: 4px; }
.standings { width: min(680px, 100%); gap: 4px; margin: 8px 0 0; }
.standings li { min-height: 28px; padding: 3px 10px; grid-template-columns: 26px minmax(0, 1fr) 52px; }
.standings li span { width: 22px; height: 22px; font-size: 13px; }
.standings li strong { font-size: 17px; line-height: 1.15; }
.standings li em { font-size: 14px; }
.connection-status {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  max-width: calc(100% - 20px);
  padding: 9px 14px;
  color: #fff;
  background: #943e31;
  border: 1px solid #ee967c;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  pointer-events: none;
}
button[data-busy] { opacity: .65; cursor: wait; }
.owner-row > strong { min-width: 0; overflow-wrap: anywhere; }
.admin-player.no-mic .player-dot { outline: 3px solid #ffd23f; outline-offset: 3px; }
.color-choice[hidden] { display: none; }
.quick-controls { bottom: 6px; }
@media (max-width: 760px) {
  .screen-main .stadium { padding-bottom: calc(var(--controls-space, 0px) + 10px); --scoreboard-height: 85px; }
  .screen-main .scoreboard { min-height: 0; }
  .screen-main .lane { grid-template-columns: minmax(0, 100px) minmax(0, 1fr); gap: 4px; }
  .screen-main .lane-info { padding: 3px 5px; }
  .screen-main .lane-info strong, .screen-main .lane.ghost .lane-info strong { font-size: 13px; }
  .screen-main .lane-info span { font-size: 9px; }
  .screen-main .progress-badge { font-size: 8px; right: 20px; }
  .screen-main .race-topline { margin-bottom: 6px; }
  .screen-main .race-topline strong { font-size: 18px; }
  .screen-main .capacity { min-width: 52px; padding: 6px; font-size: 17px; }
  .screen-main .host-label { font-size: 11px; }
  .countdown { font-size: 86px; }
  .qr-panel { width: calc(100% - 24px); padding: 16px; }
  .qr-panel strong { overflow-wrap: anywhere; font-size: 17px; }
  .winner-burst { padding: 4px; gap: 6px; }
  .winner-burst > strong { font-size: 38px; }
  .winner-burst > span { font-size: 16px; }
  .winner-burst > p { font-size: 16px; }
  .standings li { min-height: 25px; padding: 2px 6px; }
  .standings li strong { font-size: 14px; }
  .winner-host { font-size: 11px; }
}
@media (max-height: 650px) {
  .screen-main .stadium { --scoreboard-height: 68px; --stage-gap: 4px; }
  .screen-main .scoreboard { min-height: 0; }
  .screen-main .race-topline { margin-bottom: 4px; }
  .screen-main .race-topline strong { font-size: 16px; }
  .screen-main .track { gap: 3px; }
  .winner-burst { gap: 3px; padding: 4px; }
  .winner-burst > strong { font-size: 34px; }
  .winner-burst > span, .winner-burst > p { font-size: 15px; }
  .standings { gap: 2px; margin-top: 3px; }
  .standings li { min-height: 23px; padding: 1px 6px; }
  .standings li strong { font-size: 13px; }
  .winner-host { font-size: 10px; margin: 0; }
}
@media (max-height: 500px) and (min-width: 700px) {
  .screen-main .track-packed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
  }
  .screen-main .track-packed .lane { grid-template-columns: 100px minmax(0, 1fr); }
  .screen-main .track-packed .lane-info strong { font-size: 12px; }
  .screen-main .track-packed .lane-info span { font-size: 9px; }
  .screen-main .track-packed .progress-badge { font-size: 8px; }
  .standings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .winner-burst > strong { font-size: 30px; }
}
