/* UK vs the World only */
.game .uvw-who { font-size: var(--step--1); color: var(--text-secondary); }
.game .uvw-lab { display: block; font-weight: var(--weight-semibold); margin: var(--space-4) 0 var(--space-2); }

/* The ladder: one slot per country (highest on the left), and the UK token gliding along it. --n is the number of
   countries, --i the token's slot (0 = highest), --tilt a lean while it moves. The real range input lies on top,
   invisible, so the whole ladder can be dragged, tapped or moved with the arrow keys. */
.game .uvw-track { position: relative; height: 96px; margin: var(--space-3) 0 var(--space-1); }
.game .uvw-slots { position: absolute; left: 0; right: 0; bottom: 6px; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; height: 34px; }
.game .uvw-slot { position: relative; background: var(--surface-sunken); border: 1px solid var(--rule); transition: background-color 220ms ease-out, transform 220ms ease-out; }
.game .uvw-slot i { position: absolute; left: 0; right: 0; bottom: -18px; text-align: center; font: 10px var(--font-mono); font-style: normal; color: var(--text-muted); }
.game .uvw-slot.is-above { background: color-mix(in srgb, var(--chart-6) 55%, transparent); transform: scaleY(.82); transform-origin: bottom; }
.game .uvw-token { position: absolute; top: 2px; left: calc((var(--i) + .5) / var(--n) * 100%); width: 52px; height: 52px; margin-left: -26px; display: grid; place-items: center;
  transform: rotate(var(--tilt, 0deg)); transition: left 420ms cubic-bezier(.34, 1.56, .64, 1), transform 200ms ease-out; pointer-events: none; z-index: 1; }
.game .uvw-token b { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; font: 800 15px var(--font-sans); letter-spacing: .02em;
  color: #fff; background: radial-gradient(circle at 35% 30%, #2a5aa8, #1D3F7A); box-shadow: 0 0 0 3px #fff, 0 0 0 6px #C8102E, 0 6px 10px rgb(0 0 0 / .25); }
.game .uvw-token::after { content: ""; position: absolute; bottom: -12px; left: 50%; margin-left: -7px; border: 7px solid transparent; border-top-color: #C8102E; }
.game .uvw-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: grab; z-index: 2; }
.game .uvw-range:active { cursor: grabbing; }
.game .uvw-track:has(.uvw-range:focus-visible) .uvw-slots { outline: var(--focus-ring); outline-offset: 4px; }
.game .uvw-scale { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: var(--step--2); color: var(--text-muted); margin-top: 16px; }
.game .uvw-pick { display: flex; align-items: center; justify-content: center; gap: var(--space-4); margin: var(--space-2) 0; }
.game .uvw-out { display: block; min-width: 11ch; text-align: center; font-family: var(--font-serif); font-weight: var(--weight-display); font-size: var(--step-4); }

/* On the reveal, the token swoops from your guess (a ghost stays there) to the real place */
.game .uvw-track.is-reveal .uvw-token { transition: left 900ms cubic-bezier(.5, -0.35, .25, 1.4); }
.game .uvw-ghost { position: absolute; top: 14px; left: calc((var(--g) + .5) / var(--n) * 100%); transform: translateX(-50%); font: 600 11px var(--font-mono); text-transform: uppercase;
  color: var(--accent); border: 2px dashed var(--accent); border-radius: 999px; padding: 6px 8px; opacity: 0; transition: opacity 300ms 500ms; white-space: nowrap; }
.game .uvw-track.is-moved .uvw-ghost { opacity: 1; }

.game .uvw-table { list-style: none; padding: 0; margin: var(--space-4) 0; }
.game .uvw-row { display: grid; grid-template-columns: 3rem minmax(0, 11rem) minmax(0, 1fr) 5.5rem; gap: var(--space-3); align-items: center; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: var(--step--1); }
.game .uvw-rank { font-family: var(--font-mono); color: var(--text-muted); }
.game .uvw-barw { display: block; height: 14px; background: var(--track); }
.game .uvw-bar { display: block; height: 100%; background: var(--chart-6); transition: width 600ms var(--ease-out, ease-out); }
.game .uvw-bar.is-neg { background: repeating-linear-gradient(135deg, var(--chart-6) 0 4px, transparent 4px 8px); }
.game .uvw-val { text-align: right; font-variant-numeric: tabular-nums; }
.game .uvw-row.is-uk { font-weight: var(--weight-semibold); }
.game .uvw-row.is-uk .uvw-bar { background: #1D3F7A; }
.game .uvw-row.is-guess { box-shadow: inset 4px 0 0 var(--accent); }
.game .uvw-row.is-guess .uvw-rank { padding-left: 8px; }
.game .uvw-tag { color: var(--accent); font-weight: var(--weight-regular); }

@media (max-width: 720px) {
  .game .uvw-row { grid-template-columns: 2.4rem minmax(0, 1fr) 4.5rem; }
  .game .uvw-barw { grid-column: 2 / 4; grid-row: 2; }
  .game .uvw-token { width: 40px; height: 40px; margin-left: -20px; }
  .game .uvw-token b { width: 36px; height: 36px; font-size: 12px; }
  .game .uvw-slot i { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .game .uvw-token, .game .uvw-track.is-reveal .uvw-token, .game .uvw-slot { transition: none; }
}
