/* Display — big shared screen. "Sunny Circuit" look.
   Tokens + reusable bits live in /shared/theme.css; this file is layout +
   display-only composition. Class/ID names are contracted with display/main.js
   and SceneRenderer.js — don't rename without updating those. */

html, body {
  margin: 0; height: 100%;
  background:
    radial-gradient(900px 520px at 18% -8%, var(--warm-haze), transparent 60%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 55%, #f4fbff 100%);
  color: var(--ink);
  overflow: hidden;
}

/* ---- Lobby ---- */
#lobby {
  position: relative;
  z-index: 1;                 /* float the lobby over the #scene backdrop */
  height: 100%;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 4vw;
  padding: 6vh 7vw;
}

.lobby__left {
  padding: clamp(1.6rem, 3vw, 2.6rem) clamp(1.8rem, 3vw, 2.8rem);
  /* .card surface comes from the class in the markup */
}
.lobby__left h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: 0.01em;
  margin: 0 0 0.25em;
  color: var(--ink);
}
.lobby__left h1 span { color: var(--brand); }
.lobby__left .tagline {
  color: var(--ink-2);
  font-weight: 600;
  font-size: clamp(1rem, 1.5vw, 1.35rem);
  margin: 0 0 1.6rem;
  max-width: 30rem;
}

/* join box — the URL already carries the room code (…/BZK4), so there's no
   separate code chip. It's a <button>: click (or Enter/Space) copies the full
   join link to the clipboard, confirmed by the #toast. */
.join { margin-bottom: 1.3rem; }
.join__at {
  position: relative;
  display: block; width: 100%; text-align: left;
  font: inherit; color: inherit;
  border-radius: var(--r-sm);
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border: 2px solid var(--hairline);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.05s ease;
}
.join__at:hover { border-color: var(--brand); background: var(--surface); }
.join__at:active { transform: translateY(1px); }
.join__at:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.join__label {
  font-weight: 800; font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
}
.join__url {
  font-weight: 800; font-size: clamp(0.95rem, 1.3vw, 1.25rem);
  color: var(--ink); margin-top: 0.2rem; word-break: break-all;
}
/* the room code, highlighted within the URL — swap the colour to taste */
.join__code { color: var(--car-orange); letter-spacing: 0.03em; }

#count {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 800; color: var(--brand);
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  margin: 0.2rem 0 1rem;
}
#count::before {
  content: ''; width: 0.65rem; height: 0.65rem; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 0 4px rgba(43, 182, 115, 0.2);
}

/* Player seats — laid out in a single row, wrapping only when the card runs
   out of width. Empty seats render as placeholders (see renderRoster), so the
   card keeps the same footprint from 0 players to full instead of reflowing as
   people join. */
/* Always FOUR seats in one row (room is capped at 4 players), each an equal
   fraction of the card, so slots — and the card — scale fluidly with the
   viewport instead of wrapping. Empty seats stay dashed placeholders so the
   card keeps its footprint from 0 players to full as people join. */
#players {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.5rem, 0.8vw, 1rem);
}
.seat {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  min-width: 0; padding: 0.7rem 0.6rem 0.65rem;
  background: var(--surface);
  border: 3px solid var(--c, var(--hairline));
  border-radius: var(--r);
  box-shadow: var(--shadow-pop);
}
/* empty-seat placeholder — a square dashed box matching the .carthumb footprint */
.seat__open {
  width: 100%; aspect-ratio: 1 / 1; border-radius: var(--r-sm);
  background: repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.04) 0 7px, transparent 7px 14px);
}
.seat__name {
  display: flex; align-items: center; gap: 0.45rem; max-width: 100%;
  font-weight: 800; font-size: clamp(0.95rem, 1.15vw, 1.2rem); color: var(--ink);
}
.seat__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat__dot {
  width: 0.7rem; height: 0.7rem; border-radius: 50%; flex: none;
  background: var(--c, #888); box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.18);
}
.seat--off { opacity: 0.5; }
/* readiness check — a brand-green circle checkmark pinned to the seat's
   top-right corner; present (invisible) on every taken seat and revealed once
   the player's "I'm ready" lands, so the seat layout never shifts. */
.seat__ready {
  visibility: hidden;
  position: absolute; top: 0.45rem; right: 0.45rem;
  width: clamp(1.3rem, 1.9vw, 1.7rem); aspect-ratio: 1;
  display: grid; place-items: center;
  color: #fff; background: var(--brand);
  border: 2px solid #fff; border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18), inset 0 -2px 0 rgba(0, 0, 0, 0.14);
}
.seat__ready svg { width: 70%; height: 70%; }
.seat--ready .seat__ready { visibility: visible; }
/* host marker — a black star in the same top-right corner as the ready check
   (mutually exclusive: the host never readies). A white drop-shadow keeps it
   legible over any car livery behind it. */
.seat__host {
  position: absolute; top: 0.4rem; right: 0.5rem;
  width: clamp(1.4rem, 2vw, 1.8rem); aspect-ratio: 1;
  display: grid; place-items: center;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 1px 2px rgba(255, 255, 255, 0.9));
}
.seat__host svg { width: 100%; height: 100%; fill: var(--ink); }
.seat--open {
  background: transparent; border-style: dashed; border-color: #d4deea;
  box-shadow: none;
}
.seat--open .seat__name { color: var(--ink-3); }
.seat--open .seat__dot { display: none; }

/* QR — the join prompt lives in the welcome card's #count ("Scan the QR code to
   join"), so the QR itself is just the centered card. */
.lobby__right { position: relative; display: flex; align-items: center; justify-content: center; }
.qr-card {
  position: relative;
  background: #fff; border-radius: var(--r-lg); padding: 1.1rem;
  box-shadow: var(--shadow-float);
}
/* Reserve a square box up front (aspect-ratio, not the canvas' intrinsic size) so
   the card holds its final footprint before the async QR fetch resolves. A blank
   <canvas> is 300×150 (2:1); without this it would render half-height and the
   card would pop taller the moment renderQR swaps in the square bitmap. */
#qr { display: block; width: min(22vw, 32vh); aspect-ratio: 1 / 1; image-rendering: pixelated; }

/* Build/version badge — preview builds only (the server leaves it empty in
   production, and :empty hides it). Pinned to the lobby's bottom-right corner,
   deliberately quiet. Not uppercased so the commit hash stays lowercase hex. */
.version-badge {
  position: absolute; right: clamp(0.7rem, 1.4vw, 1.4rem); bottom: clamp(0.7rem, 1.4vh, 1.3rem);
  z-index: 2;
  font-weight: 700; font-size: clamp(0.7rem, 0.95vw, 0.88rem);
  letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  border: 2px solid var(--hairline); border-radius: var(--r-pill);
  padding: 0.25rem 0.7rem;
  pointer-events: none; user-select: none;
}
.version-badge:empty { display: none; }

/* ---- 3D scene: a persistent backdrop behind BOTH the lobby (orbiting preview)
   and the race (split-screen). The lobby/race sections layer on top. ---- */
/* Diorama backdrop (shown until a track is picked) — pin it to the viewport so it
   shares the #scene stacking context regardless of body height. */
#lobby-diorama { position: fixed; }
/* The 3D backdrop sits OVER the diorama (same z-0, later in the DOM). Visibility is by
   opacity, not display, so we can crossfade the track straight in over the diorama (the
   default background) — no intermediate veil. .hidden is a hard off for non-lobby paths;
   .is-dim drops it to transparent so the diorama beneath shows through (the fade base).
   FADE_MS in main.js mirrors this transition. */
#scene { position: fixed; inset: 0; z-index: 0; opacity: 1; transition: opacity 0.45s ease; }
#scene.is-dim { opacity: 0; }
#scene canvas { display: block; }
/* Track→track crossfade still: a frozen frame of the OUTGOING track, laid over the live
   canvas while the new track rebuilds underneath. Fading it out dissolves one circuit
   straight into the next — never dipping through the diorama. Inside #scene's z-0 stacking
   context (so it stays behind the lobby/race UI); FADE_MS in main.js mirrors this. */
#scene-snap { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;
  opacity: 1; transition: opacity 0.45s ease; pointer-events: none;
  /* Promote to its own compositor layer so the fade keeps animating off the main thread —
     it has to glide THROUGH setTrack's tens-of-ms rebuild block (which freezes the orbit),
     masking that hitch. main.js commits the fade a frame BEFORE the rebuild for this reason. */
  will-change: opacity; }
#scene-snap.is-fading { opacity: 0; }
/* Race section is now a transparent overlay container over #scene. */
#race { position: fixed; inset: 0; z-index: 2; }
/* Standalone track preview (track gallery "open ↗", not the grid iframe): the
   viewer drives the overview camera. #race sits above the canvas (z-2), so it
   must pass pointer events through for OrbitControls to receive drags. Toggled
   by the track TestHarness (html.cam-free); harmless here since track preview
   shows no race UI of its own. */
html.cam-free #race { pointer-events: none; }
/* Control legend for the free camera (created by the track TestHarness). Pinned
   bottom-centre, never catches pointer events, fades out after its timer. */
.cam-hint {
  position: fixed; left: 50%; bottom: 1.1rem; transform: translateX(-50%);
  z-index: 13; padding: 0.45rem 0.95rem; border-radius: 999px;
  background: rgba(20, 24, 30, 0.55); color: #fff;
  font: 600 0.85rem/1 'Nunito', system-ui, sans-serif; letter-spacing: 0.01em;
  white-space: nowrap; pointer-events: none; backdrop-filter: blur(4px);
  transition: opacity 0.7s ease;
}
.cam-hint.is-faded { opacity: 0; }
/* Diorama vignette: gently darken the frame edges so the eye locks to the centre,
   reinforcing the miniature/tilt-shift focus. Cosmetic only — never catches clicks. */
#scene::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 120% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.28) 100%);
}

#countdown {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700;
  font-size: 26vh; color: #fff;
  text-shadow: 0 6px 0 rgba(40, 70, 40, 0.28), 0 16px 32px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
/* "GO!" stays up the beat after the start (cars are already moving) and fades
   out over that ~1s window. Added/removed by onCountdownTick on the n=0 beat. */
#countdown.is-go { animation: countdown-go 1s ease-out forwards; }
@keyframes countdown-go {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.35); }
}

/* per-viewport (split-screen) label, anchored at each cell's top-left. No card:
   just the name + item indicator floating over the scene (cf. .cell-rank). */
.cell-label {
  position: absolute; display: none; margin: 0.7rem; pointer-events: none;
}
/* name on top, the big item indicator stacked + left-aligned below it (place + lap
   moved out to the top-right .cell-rank readout) */
.cell-label__row { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.cell-label__name {
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 2vw, 2.2rem);
  color: var(--c, var(--ink));
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Place + lap — top-right of the cell, no card. Dark ink (legible on the constant
   blue sky, no shadow). Big ordinal place, a smaller "Lap n/N" beneath. Positioned by
   _loop; the transform anchors its RIGHT edge to the left coord _loop sets (cell right). */
.cell-rank {
  position: absolute; display: none; transform: translateX(-100%);
  text-align: right; pointer-events: none; color: var(--ink);
}
.cell-rank__place { font-family: var(--font-display); font-weight: 700; line-height: 1; font-size: clamp(2rem, 3.6vw, 3.2rem); }
.cell-rank__lap { font-weight: 800; font-size: clamp(1.1rem, 1.75vw, 1.55rem); margin-top: 0.12rem; letter-spacing: 0.02em; white-space: nowrap; }

/* Held-item indicator — a FIXED reserved box (no reflow when empty) under the player
   name so players read what they got at a glance (the controller has no item UI;
   place/lap live in .cell-rank). The dashed outline box is ALWAYS shown; the item
   ICON sits inside it. No backing fill or shadow — the sky behind is a constant blue. */
.cell-label__item {
  flex: none; width: 120px; height: 120px; transform-origin: center;
  display: flex; align-items: center; justify-content: center;
  border-radius: 20px; border: 3px dashed color-mix(in srgb, var(--ink) 30%, transparent);
}
.cell-label__item svg { width: 70%; height: 70%; display: block; }
/* baked asset icons (e.g. the banana GLB render) — already square + padded */
.cell-label__item img { width: 78%; height: 78%; object-fit: contain; display: block; }
/* roulette spin: a fast scale/tilt flicker while the slot rolls */
.cell-label__item.rolling { animation: cellItemRoll 0.1s linear infinite; }
@keyframes cellItemRoll {
  0%   { filter: brightness(1.2); transform: scale(1.12) rotate(-4deg); }
  50%  { filter: brightness(0.9); transform: scale(0.97) rotate(4deg); }
  100% { filter: brightness(1.2); transform: scale(1.12) rotate(-4deg); }
}
/* landing pop: a big springy scale-in */
.cell-label__item.pop { animation: cellItemPop 0.5s cubic-bezier(0.2, 1.5, 0.35, 1); }
@keyframes cellItemPop {
  0%   { transform: scale(1.8); filter: brightness(1.6); }
  60%  { filter: brightness(1.15); }
  100% { transform: scale(1); filter: none; }
}

/* per-cell steer indicator (mirrors the phone bar), centered at the cell bottom */
.cell-steer {
  position: absolute; display: none; width: clamp(120px, 13vw, 240px); height: 1.6rem;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9); border: 1px solid var(--hairline);
  border-radius: var(--r-pill); overflow: hidden;
  box-shadow: 0 4px 10px rgba(30, 60, 90, 0.18);
  pointer-events: none;
}
.cell-steer::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: rgba(40, 80, 120, 0.18); }
.cell-steer__fill {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 50%; margin-left: -25%;
  background: var(--c, var(--brand)); border-radius: var(--r-pill); transition: transform 0.05s linear;
}
/* per-cell FINISHED overlay — a floating frosted card centred in a player's
   split-screen cell the moment they cross the line, while the rest of the field
   is still racing. _loop sets left/top to the cell centre; translate centres it.
   Lives in #scene (z-0) like the other cell overlays, so the full results screen
   (#results, in #race z-2) covers it once the race ends. */
.cell-finish {
  position: absolute; display: none; transform: translate(-50%, -50%);
  flex-direction: column; align-items: center; gap: 0.25rem; text-align: center;
  padding: clamp(0.7rem, 1.5vw, 1.3rem) clamp(1.1rem, 2.4vw, 2.2rem);
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--r); border-top: 6px solid var(--c, var(--brand));
  box-shadow: 0 14px 34px rgba(30, 60, 90, 0.3);
  pointer-events: none;
}
.cell-finish__badge {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(0.85rem, 1.4vw, 1.25rem); letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff; background: var(--c, var(--brand));
  padding: 0.2rem 0.9rem; border-radius: var(--r-pill);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
}
.cell-finish__place {
  font-family: var(--font-display); font-weight: 700; line-height: 1;
  font-size: clamp(2rem, 4vw, 3.4rem); color: var(--ink);
}
.cell-finish__time {
  font-weight: 800; font-size: clamp(0.95rem, 1.4vw, 1.4rem);
  color: var(--ink-2); font-variant-numeric: tabular-nums;
}

.stand__dot { width: 0.95rem; height: 0.95rem; border-radius: 50%; } /* results list */

/* results overlay — bright frosted glass + a floating card */
#results {
  position: fixed; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(233, 248, 255, 0.72); backdrop-filter: blur(10px);
}
#results h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.6rem); margin: 0 0 1rem; color: var(--ink);
}
#results-list {
  list-style: none; padding: 0; margin: 0; counter-reset: li;
  font-size: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; min-width: 24rem;
}
#results-list li {
  counter-increment: li;
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-sm); padding: 0.7rem 1.1rem; font-weight: 800;
  box-shadow: var(--shadow-pop);
}
#results-list li::before {
  content: counter(li); font-family: var(--font-display); font-weight: 700;
  color: var(--ink-3); min-width: 1.2em;
}
.res-time { margin-left: auto; color: var(--ink-3); font-weight: 700; font-variant-numeric: tabular-nums; }
/* Late joiners ride along under the field: no rank number, "Next race" status. */
#results-list li.is-joining::before { content: '–'; }
#results-list li.is-joining .res-time { font-style: italic; }
#results-newgame { margin-top: 1.8rem; }

/* ---- Pause ---- */
/* Pause button — pinned top-right over the scene during the countdown + race.
   .icon-btn (theme.css) gives it the toy-button look; we only place it here.
   It shares the top-right corner with each cell's place/lap readout, so it
   auto-fades after a few seconds idle (main.js toggles .is-idle); any pointer
   move / tap / key brings it back. The opacity transition is added to the
   .icon-btn set so hover/press feedback still animates. */
#pause-btn {
  position: fixed; z-index: 12;
  top: calc(1.1rem + env(safe-area-inset-top));
  right: calc(1.1rem + env(safe-area-inset-right));
  width: 3.4rem; height: 3.4rem;
  transition: opacity 0.4s ease, transform 0.06s ease, box-shadow 0.06s ease, filter 0.06s ease;
}
#pause-btn.is-idle { opacity: 0; pointer-events: none; }

/* Pause overlay — same bright frosted glass as the results screen, sits above
   the (frozen) race with a floating card of choices. */
#pause-overlay {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(233, 248, 255, 0.72); backdrop-filter: blur(10px);
}
.pause-card {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(1.2rem, 2.5vw, 2rem); text-align: center;
  padding: clamp(1.8rem, 4vw, 3rem) clamp(2.2rem, 5vw, 4rem);
}
.pause-card h2 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.4rem); margin: 0; color: var(--ink);
}
.pause-card__btns { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.pause-card__btns .btn { min-width: 9rem; }

/* ---- Device chooser ---- the display URL opened on a phone-sized screen
   (see #device-choice in index.html). Hidden by default; the media query below
   surfaces it on cramped viewports until a choice is made. Size-only triggers
   (no pointer/hover filters): the "run the big screen here OR join on your
   phone" fork applies to any small window, and continuing is one tap away.
   main.js adds html.device-choice-dismissed on "continue" AND at boot on big
   screens / dev surfaces, so a mid-session window resize can never resurface
   the chooser over a live lobby or race. */
#device-choice {
  display: none; position: fixed; inset: 0; z-index: 30;
  align-items: center; justify-content: center;
  padding: 1.2rem;
  background: rgba(233, 248, 255, 0.85); backdrop-filter: blur(10px);
}
.device-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 1rem; padding: 2rem 1.6rem; max-width: 26rem;
}
.device-card h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 2.2rem; line-height: 0.98; margin: 0; color: var(--ink);
}
.device-card h1 span { color: var(--brand); }
.device-card p { margin: 0; color: var(--ink-2); font-weight: 700; }
@media (max-width: 700px), (max-height: 500px) {
  html:not(.device-choice-dismissed) #device-choice { display: flex; }
}

/* ---- Narrow / portrait (e.g. someone opens the display on a phone) ----
   The lobby is designed for a wide screen; on a narrow viewport the two-column
   card | QR layout cramps. Stack instead: welcome card on top, QR below it. */
@media (max-width: 860px) {
  html, body { overflow-y: auto; }
  #lobby {
    grid-template-columns: 1fr;
    height: auto; min-height: 100%;
    align-content: start; justify-items: center;
    gap: 5vw; padding: 6vh 6vw;
  }
  .lobby__left { width: 100%; max-width: 30rem; }
  .lobby__right { flex-direction: column; }
  #qr { width: min(62vw, 38vh); }
}

/* ---- Toast ---- transient confirmation (e.g. "Copied"), bottom-centre.
   Hidden until .is-on is added; fades + slides in, then back out. */
.toast {
  position: fixed; left: 50%; bottom: 2.5rem; transform: translate(-50%, 1rem);
  z-index: 10;
  font-weight: 800; font-size: 1rem; color: #fff;
  background: var(--brand);
  padding: 0.7rem 1.4rem; border-radius: var(--r-pill);
  box-shadow: var(--shadow-float);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---- Sound hint ---- persistent pill while the browser still has audio
   locked (no user gesture yet); see #sound-hint in index.html. */
.sound-hint {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 10;
  font: inherit; font-weight: 800; font-size: 0.95rem; color: #fff;
  background: rgba(25, 35, 45, 0.7);
  border: 0; padding: 0.6rem 1.2rem; border-radius: var(--r-pill);
  box-shadow: var(--shadow-float);
  cursor: pointer;
}

/* ---- Now-playing music credit ---- bottom-left link: the current track +
   artist, linking to its source (also the on-screen CC-BY attribution). A dark
   translucent pill so it reads over the bright 3D scene without grabbing focus.
   Shares the sound-hint's corner, but they never show together (the hint is up
   only while audio is locked; this only during a race). */
.music-credit {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 9;
  max-width: min(46vw, 24rem);
  display: inline-block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font: inherit; font-weight: 700; font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.92); text-decoration: none;
  background: rgba(25, 35, 45, 0.55);
  padding: 0.4rem 0.9rem; border-radius: var(--r-pill);
  box-shadow: var(--shadow-float);
  opacity: 0.78; transition: opacity 0.2s ease, background 0.2s ease;
}
.music-credit::before { content: "\266A\00a0\00a0"; opacity: 0.9; } /* ♪ */
.music-credit:hover { opacity: 1; background: rgba(25, 35, 45, 0.72); }

/* ---- Reconnect card ---- a QR for a dropped player, centred in their own
   split-screen cell exactly like the FINISHED card. It REUSES .cell-finish for
   placement + chrome (absolute, translate(-50%,-50%), frosted card, livery
   top-border); _loop sets left/top and toggles display. .cell-reconnect only adds
   the spacing the QR content wants. */
.cell-reconnect { gap: 0.5rem; }
.rc-card__head {
  display: flex; align-items: center; max-width: 11rem;
  font-weight: 800; font-size: clamp(0.9rem, 1.1vw, 1.1rem); color: var(--ink);
}
.rc-card__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-card__sub {
  font-weight: 700; font-size: 0.72rem; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--ink-3);
}
.rc-card__qr {
  display: block; width: clamp(96px, 9vw, 132px); aspect-ratio: 1 / 1;
  border-radius: var(--r-sm); image-rendering: pixelated;
}
