/* The finals reveal: a 16:9 big-screen page. Builds on styles.css for tokens
   and fonts. Everything is sized in --u, 1% of the stage width, so the stage
   letterboxes to any screen and keeps its proportions. */

:root {
  --u: min(1vw, 1.7778vh);
  --gold: #f4bf4f;
  --silver: #c9d3df;
  --bronze: #d58b4f;
}

html,
body.reveal-body {
  height: 100%;
  overflow: hidden;
  scroll-behavior: auto;
}

body.reveal-body {
  display: grid;
  place-items: center;
  background: #000;
  color: var(--white);
}

body.reveal-body.idle,
body.reveal-body.idle * {
  cursor: none !important;
}

.reveal-stage {
  position: relative;
  width: min(100vw, 177.78vh);
  height: min(100vh, 56.25vw);
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(40, 229, 83, 0.12), transparent 60%),
    var(--navy);
  font-size: calc(var(--u) * 1.5);
  line-height: 1.3;
}

.reveal-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 1.5);
  padding: calc(var(--u) * 4);
  text-align: center;
}

.reveal-eyebrow {
  margin: 0;
  color: var(--green);
  font-size: calc(var(--u) * 1.4);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.reveal-heading {
  margin: 0;
  font-family: "Bebas Neue", "Outfit", sans-serif;
  font-size: calc(var(--u) * 5);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
}

.reveal-heading .accent {
  color: var(--green);
}

.reveal-sub {
  margin: 0;
  color: var(--dim);
  font-size: calc(var(--u) * 1.8);
}

.reveal-hint {
  position: absolute;
  bottom: calc(var(--u) * 2);
  left: 0;
  right: 0;
  margin: 0;
  color: var(--dim);
  font-size: calc(var(--u) * 1.1);
  text-align: center;
  opacity: 0.7;
}

.country {
  display: inline-block;
  padding: 0.1em 0.45em;
  border: 1px solid var(--line-dark);
  border-radius: 0.4em;
  background: var(--navy-raised);
  color: var(--dim);
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.08em;
  vertical-align: middle;
}

/* A nation's flag, sized to the text around it. Every flag gets the same
   7:5 box, close to most Nordic flags, so they line up side by side. */
.flag {
  display: inline-block;
  flex: none;
  height: 0.8em;
  width: auto;
  aspect-ratio: 7 / 5;
  border-radius: 0.08em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
  vertical-align: -0.08em;
}

/* --- Lock --- */

.reveal-countdown {
  font-family: "Bebas Neue", "Outfit", sans-serif;
  font-size: calc(var(--u) * 7);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--green);
}

.reveal-key-form {
  display: flex;
  gap: calc(var(--u) * 0.8);
  margin-top: calc(var(--u) * 1.5);
}

.reveal-key-form input,
.reveal-key-form button {
  padding: 0.5em 0.9em;
  border: 1px solid var(--line-dark);
  border-radius: 0.5em;
  font-size: calc(var(--u) * 1.3);
}

.reveal-key-form input {
  width: calc(var(--u) * 28);
  background: var(--navy-card);
  color: #fff;
}

.reveal-key-form button {
  background: var(--green);
  border-color: var(--green);
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.reveal-error {
  min-height: 1.3em;
  margin: 0;
  color: var(--danger);
  font-size: calc(var(--u) * 1.2);
}

/* --- Ready check --- */

.reveal-checklist {
  display: grid;
  gap: calc(var(--u) * 0.6);
  width: min(100%, calc(var(--u) * 70));
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: calc(var(--u) * 1.4);
}

.reveal-checklist li {
  display: flex;
  gap: 0.7em;
  padding: 0.5em 0.8em;
  border-radius: 0.5em;
  background: var(--navy-card);
}

.reveal-checklist li::before {
  content: "✓";
  color: var(--green);
  font-weight: 800;
}

.reveal-checklist li.warn::before {
  content: "!";
  color: var(--warning);
}

.reveal-checklist li.warn {
  background: rgba(244, 191, 79, 0.12);
  color: var(--warning);
}

.reveal-ready {
  color: var(--green);
}

.reveal-ready.warn {
  color: var(--warning);
}

.reveal-buttons {
  display: flex;
  gap: calc(var(--u) * 1);
}

.reveal-button {
  padding: 0.4em 1em;
  border: 1px solid var(--line-dark);
  border-radius: 0.5em;
  background: var(--navy-card);
  color: var(--dim);
  font-size: calc(var(--u) * 1.1);
  cursor: pointer;
}

/* --- Title --- */

.reveal-title .reveal-heading {
  font-size: calc(var(--u) * 9);
}

.reveal-sprites {
  display: flex;
  gap: calc(var(--u) * 3);
}

.reveal-sprites img {
  width: calc(var(--u) * 5);
  height: calc(var(--u) * 5);
  object-fit: contain;
  image-rendering: pixelated;
}

/* --- Places 4-5: the extended podium --- */

/* 4 · 2 · 1 · 3 · 5, every step the same width. Step heights come from --h
   (in --u). A step not yet called is collapsed to a thin line on the floor,
   with no number; the top three are muted besides. Calling a chaser
   (.shown) brings a spotlight down on it and raises its step, then drops
   its name in; .grown raises the top three, 3rd to 1st, in their colours. */
.ext-podium {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: calc(var(--u) * 1.5);
  width: 100%;
  isolation: isolate;
  animation: rise 0.8s ease both;
}

.ext-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--u) * 0.8);
  width: calc(var(--u) * 16);
  transition: opacity 0.9s ease;
}

.ext-1 { --h: 15; --delay: 0.7s; }
.ext-2 { --h: 11; --delay: 0.35s; }
.ext-3 { --h: 8; --delay: 0s; }
.ext-4 { --h: 5.5; }
.ext-5 { --h: 4; }

.ext-info {
  display: grid;
  justify-items: center;
  gap: calc(var(--u) * 0.6);
  width: 100%;
  opacity: 0;
  transform: translateY(20%);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ext-step.shown .ext-info,
.ext-podium.grown .ext-top .ext-info {
  opacity: 1;
  transform: none;
}

.ext-podium.grown .ext-top .ext-info {
  transition-delay: calc(var(--delay) + 0.6s);
}

.ext-info .flag {
  height: calc(var(--u) * 2.6);
}

.ext-info .medal {
  height: calc(var(--u) * 6);
}

.ext-team {
  max-width: 100%;
  overflow-wrap: anywhere;
  font-size: calc(var(--u) * 2.2);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.ext-top .ext-team {
  color: var(--dim);
  font-family: "Bebas Neue", "Outfit", sans-serif;
  font-size: calc(var(--u) * 5);
  font-weight: 400;
}

.ext-score {
  color: var(--dim);
  font-size: calc(var(--u) * 1.6);
  font-variant-numeric: tabular-nums;
}

.ext-block {
  display: grid;
  place-items: center;
  width: 100%;
  height: calc(var(--u) * var(--h));
  overflow: hidden;
  border-radius: calc(var(--u) * 0.8) calc(var(--u) * 0.8) 0 0;
  background: #5f7088;
  color: var(--navy);
  font-family: "Bebas Neue", "Outfit", sans-serif;
  /* Scaled down on the low steps, so the number fits inside its step. */
  font-size: calc(var(--u) * min(4.5, var(--h) * 0.7));
  line-height: 1;
  /* The overshoot gives the rise a little bounce. */
  transition:
    height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.9s ease,
    color 0.4s ease,
    opacity 0.6s ease,
    box-shadow 0.8s ease;
}

/* Collapsed: a thin line, no number. */
.ext-step:not(.ext-top):not(.shown) .ext-block,
.ext-podium:not(.grown) .ext-top .ext-block {
  height: calc(var(--u) * 0.5);
  color: transparent;
}

.ext-step:not(.ext-top):not(.shown) .ext-block {
  opacity: 0.45;
}

.ext-podium:not(.grown) .ext-top {
  opacity: 0.5;
}

.ext-podium:not(.grown) .ext-top .ext-block {
  background: #26324a;
}

/* Rising: the step goes up once the light is on, the number after it. */
.ext-step.shown .ext-block {
  transition-delay: 0.3s, 0s, 1s, 0s, 0s;
}

.ext-podium.grown .ext-top .ext-block {
  transition-delay: var(--delay), var(--delay), calc(var(--delay) + 0.6s), 0s, 0s;
}

.ext-podium.grown .ext-1 .ext-block { background: var(--gold); }
.ext-podium.grown .ext-2 .ext-block { background: var(--silver); }
.ext-podium.grown .ext-3 .ext-block { background: var(--bronze); }

/* The spotlight: a beam from above, flickering on, with a pool of light at
   the foot of the step. It stays on the team called last (.latest) and
   fades over to the next one. */
.ext-step:not(.ext-top)::before,
.ext-step:not(.ext-top)::after {
  content: "";
  position: absolute;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.ext-step:not(.ext-top)::before {
  right: -40%;
  bottom: 0;
  left: -40%;
  height: calc(var(--u) * 60);
  background: linear-gradient(to bottom, rgba(255, 244, 214, 0.04), rgba(255, 244, 214, 0.3) 70%, rgba(255, 244, 214, 0.45));
  clip-path: polygon(43% 0, 57% 0, 100% 100%, 0 100%);
  filter: blur(calc(var(--u) * 0.5));
  transform-origin: 50% 0;
}

.ext-step:not(.ext-top)::after {
  right: -30%;
  bottom: calc(var(--u) * -1.5);
  left: -30%;
  height: calc(var(--u) * 3);
  background: radial-gradient(ellipse at center, rgba(255, 244, 214, 0.5), transparent 70%);
}

.ext-step.latest::before,
.ext-step.latest::after {
  opacity: 1;
}

/* .fresh: the step called just now, going forwards. No fill on the beam:
   it then rests on .latest. */
.ext-step.fresh::before {
  animation: beam-on 0.9s ease;
}

.ext-step.latest .ext-block {
  box-shadow: 0 0 calc(var(--u) * 3) rgba(255, 244, 214, 0.3);
}

/* The name drops in from above once the step is up. */
.ext-step.fresh .ext-info {
  animation: drop-in 0.7s 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes beam-on {
  0% { opacity: 0; transform: scaleX(0.25); }
  25% { opacity: 1; }
  40% { opacity: 0.35; }
  55% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}

@keyframes drop-in {
  from { opacity: 0; transform: translateY(-80%); }
}

/* --- Top 3 --- */

.reveal-top-cards {
  display: flex;
  gap: calc(var(--u) * 3);
  justify-content: center;
  width: 100%;
}

.reveal-top-card {
  display: grid;
  gap: calc(var(--u) * 1);
  place-items: center;
  width: calc(var(--u) * 26);
  padding: calc(var(--u) * 3) calc(var(--u) * 2);
  border: 1px solid var(--line-dark);
  border-radius: calc(var(--u) * 1);
  background: var(--navy-card);
  animation: rise 0.7s ease both;
}

.reveal-top-card:nth-child(2) {
  animation-delay: 0.15s;
}

.reveal-top-card:nth-child(3) {
  animation-delay: 0.3s;
}

.reveal-top-card strong {
  font-size: calc(var(--u) * 2.6);
  line-height: 1.1;
}

.reveal-top-card .flag {
  height: calc(var(--u) * 4);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8%);
  }
}

/* --- Race --- */

.reveal-race {
  position: absolute;
  inset: calc(var(--u) * 1.6) calc(var(--u) * 2);
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: calc(var(--u) * 0.6);
}

.race-top {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 1.5);
}

.race-top .reveal-eyebrow {
  white-space: nowrap;
}

.race-progress {
  flex: 1;
  height: calc(var(--u) * 0.6);
  overflow: hidden;
  border-radius: 999px;
  background: var(--navy-raised);
}

.race-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
}

.race-tick,
.race-speed {
  color: var(--dim);
  font-size: calc(var(--u) * 1.2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.race-boards {
  display: grid;
  grid-template-columns: repeat(var(--boards, 3), minmax(0, 1fr));
  gap: calc(var(--u) * 1.5);
  min-height: 0;
}

.race-board {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: calc(var(--u) * 0.6);
  min-height: 0;
}

/* "Takes the lead": a fixed-height line so the boards never shift. */
.race-callout {
  height: calc(var(--u) * 3);
  margin: 0;
  color: var(--gold);
  font-family: "Bebas Neue", "Outfit", sans-serif;
  font-size: calc(var(--u) * 2.8);
  line-height: calc(var(--u) * 3);
  letter-spacing: 0.04em;
  text-align: center;
  opacity: 0;
}

.race-callout.show {
  animation: callout 2.8s ease forwards;
}

@keyframes callout {
  0% { opacity: 0; transform: scale(0.85); }
  12% { opacity: 1; transform: scale(1.06); }
  20% { transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

/* The podium step above each board: height and colour by current place,
   sliding between them. The area is as tall as the 1st-place step, so the
   boards stay put. */
.race-step-area {
  display: flex;
  align-items: end;
  justify-content: center;
  height: calc(var(--u) * 7);
}

.race-step {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 0.8);
  width: 60%;
  height: calc(var(--u) * 3.5);
  border-radius: calc(var(--u) * 0.6) calc(var(--u) * 0.6) 0 0;
  background: var(--bronze);
  color: var(--navy);
  line-height: 1;
  transition: height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.6s ease;
}

.race-step.place-1 {
  height: calc(var(--u) * 7);
  background: var(--gold);
}

.race-step.place-2 {
  height: calc(var(--u) * 5);
  background: var(--silver);
}

.race-step.place-3 {
  height: calc(var(--u) * 3.5);
  background: var(--bronze);
}

.race-step-place {
  display: flex;
  font-family: "Bebas Neue", "Outfit", sans-serif;
  font-size: calc(var(--u) * 2.6);
}

.race-step .medal {
  height: calc(var(--u) * 3.1);
}

.race-step-gap {
  font-size: calc(var(--u) * 1.1);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.race-step.climbed {
  animation: climb 0.7s ease;
}

@keyframes climb {
  30% {
    transform: scale(1.12);
    box-shadow: 0 0 calc(var(--u) * 2) rgba(244, 191, 79, 0.8);
  }
}

/* Flag, team and score as one group, so the score reads as the team's. */
.race-board-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-width: 0;
  font-size: calc(var(--u) * 1.8);
}

.race-board-head .flag {
  height: 0.9em;
}

.race-board-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.race-board-score {
  flex: none;
  margin-left: 0.3em;
  color: var(--green);
  font-weight: 800;
  font-size: 1.2em;
  font-variant-numeric: tabular-nums;
}

.race-canvas-wrap {
  position: relative;
  border-top: calc(var(--u) * 0.3) solid var(--team, transparent);
  padding-top: calc(var(--u) * 0.4);
  display: grid;
  place-items: center;
  min-height: 0;
}

.race-canvas-wrap canvas {
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: 1;
  border-radius: calc(var(--u) * 0.6);
}

.race-no-replay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: calc(var(--u) * 0.6);
  background: var(--navy-card);
  color: var(--dim);
  font-size: calc(var(--u) * 2);
  font-weight: 700;
}

.race-note {
  margin: 0;
  color: var(--dim);
  font-size: calc(var(--u) * 1.1);
  text-align: center;
}

/* --- Score graph --- */

.reveal-chart {
  position: absolute;
  inset: calc(var(--u) * 2.5) calc(var(--u) * 3);
  display: flex;
  flex-direction: column;
  gap: calc(var(--u) * 1.2);
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--u) * 2);
}

.chart-legend {
  display: flex;
  gap: calc(var(--u) * 2);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: calc(var(--u) * 1.5);
  font-weight: 700;
}

.chart-legend li {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.chart-key {
  display: inline-block;
  width: 1.2em;
  height: 0.3em;
  border-radius: 999px;
  background: var(--key);
}

/* Places 4 and 5: dashed and quieter than the finalists. */
.muted .chart-key {
  background: repeating-linear-gradient(90deg, var(--key) 0 0.35em, transparent 0.35em 0.55em);
  border-radius: 0;
}

.chart-legend li.muted {
  color: var(--dim);
  font-weight: 600;
}

.chart-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid line {
  stroke: var(--line-dark);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-grid line.zero {
  stroke: #415562;
}

.chart-axis text {
  fill: var(--dim);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.chart-axis .chart-axis-title {
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* 3px rather than the usual 2px: this is read from across a hall. */
.chart-lines path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chart-lines path.muted {
  stroke-width: 2;
  stroke-dasharray: 10 7;
  stroke-linecap: butt;
  opacity: 0.8;
}

.chart-axis-line {
  stroke: #415562;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.chart-ends circle,
.chart-hover circle {
  stroke: var(--navy);
  stroke-width: 3;
}

.chart-ends,
.chart-labels {
  opacity: 0;
  animation: fade-in 0.6s ease 3.9s forwards;
}

@keyframes fade-in {
  to { opacity: 1; }
}

.chart-labels line {
  stroke: var(--dim);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-labels text {
  fill: var(--white);
  font-size: 28px;
  font-weight: 700;
}

.chart-labels text.muted {
  fill: var(--dim);
  font-size: 24px;
  font-weight: 600;
}

.chart-labels .chart-label-score {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.chart-crosshair {
  stroke: var(--dim);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.chart-hit {
  fill: transparent;
  pointer-events: all;
}

.chart-tooltip {
  position: absolute;
  top: 0;
  display: grid;
  gap: 0.25em;
  min-width: 12em;
  padding: 0.6em 0.8em;
  border: 1px solid var(--line-dark);
  border-radius: 0.5em;
  background: var(--navy-raised);
  font-size: calc(var(--u) * 1.1);
  pointer-events: none;
  transform: translateX(14px);
}

.chart-tooltip.flip {
  transform: translateX(calc(-100% - 14px));
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-tooltip span {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.chart-tooltip b {
  margin-left: auto;
  padding-left: 1em;
  font-variant-numeric: tabular-nums;
}

/* --- Medals --- */

.medal {
  width: auto;
  aspect-ratio: 40 / 54;
  flex: none;
  overflow: visible;
}

.medal text {
  font-family: "Bebas Neue", "Outfit", sans-serif;
  font-size: 22px;
}

/* --- Winner --- */

.reveal-podium {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: calc(var(--u) * 2);
  width: 100%;
}

.podium-place {
  display: grid;
  justify-items: center;
  gap: calc(var(--u) * 0.8);
  width: calc(var(--u) * 24);
  animation: rise 0.8s ease both;
}

.podium-place .podium-team {
  font-size: calc(var(--u) * 2.4);
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.podium-place .medal {
  height: calc(var(--u) * 6);
}

.podium-1 .medal {
  height: calc(var(--u) * 8);
}

.podium-place .flag {
  height: calc(var(--u) * 3);
}

.podium-place .podium-score {
  color: var(--dim);
  font-size: calc(var(--u) * 1.6);
  font-variant-numeric: tabular-nums;
}

.podium-block {
  display: grid;
  place-items: center;
  width: 100%;
  border-radius: calc(var(--u) * 0.8) calc(var(--u) * 0.8) 0 0;
  color: var(--navy);
  font-family: "Bebas Neue", "Outfit", sans-serif;
  font-size: calc(var(--u) * 6);
}

.podium-1 {
  animation-delay: 0.6s;
}

.podium-1 .podium-block {
  height: calc(var(--u) * 15);
  background: var(--gold);
}

.podium-1 .podium-team {
  color: var(--gold);
  font-size: calc(var(--u) * 3.2);
}

.podium-2 {
  animation-delay: 0.3s;
}

.podium-2 .podium-block {
  height: calc(var(--u) * 10);
  background: var(--silver);
}

.podium-3 .podium-block {
  height: calc(var(--u) * 7);
  background: var(--bronze);
}

.reveal-table {
  width: min(100%, calc(var(--u) * 80));
  border-collapse: collapse;
  font-size: min(calc(var(--u) * 1.6), calc(var(--u) * 30 / var(--rows, 10)));
}

.reveal-table th {
  padding: 0.4em 0.8em;
  color: var(--dim);
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.reveal-table td {
  padding: 0.35em 0.8em;
  border-top: 1px solid var(--line-dark);
  font-variant-numeric: tabular-nums;
}

.reveal-table td:first-child {
  color: var(--dim);
  font-weight: 800;
}

.reveal-table td:nth-child(2) {
  font-weight: 700;
}

.table-rank {
  display: inline-flex;
  align-items: center;
  min-height: 1.6em;
}

.table-rank .medal {
  height: 1.6em;
}

.reveal-table .num {
  text-align: right;
}

.reveal-table tr.podium-row-1 td:nth-child(2) {
  color: var(--gold);
}

/* --- Controls --- */

.reveal-hud {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: end;
  gap: 8px;
  max-width: calc(100vw - 24px);
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(11, 19, 34, 0.85);
  color: var(--dim);
  font-size: 13px;
  transition: opacity 0.4s ease;
}

body.idle .reveal-hud {
  opacity: 0;
  pointer-events: none;
}

.reveal-hud button {
  min-width: 34px;
  height: 30px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--navy-card);
  color: #fff;
  cursor: pointer;
}

@media (max-width: 720px) {
  .reveal-hud-keys {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .race-step,
  .ext-step,
  .ext-info,
  .ext-block {
    transition: none !important;
  }

  .ext-podium,
  .ext-podium *,
  .ext-podium *::before,
  .ext-podium *::after {
    animation: none !important;
  }

  .reveal-top-card,
  .podium-place,
  .race-step.climbed,
  .chart-ends,
  .chart-labels {
    animation: none;
    opacity: 1;
  }

  .race-callout.show {
    animation: none;
    opacity: 1;
  }
}
