/* ── Zip Blitz — THE RACE BAR'S PILL (playerbar.css) ─────────────────────────────
   One pill per player: avatar (initials or photo) + running total. Drawn by
   FACEOFF.pillHtml for the race (trivia.html renderPlayerbar) and for the bar the
   face-off lands on before a multiplayer race (versus.html), so the landing bar and
   the race bar are the same pill from the same rules (GHOSTS_SPEC.md "Countdown").
   The race's answer states (correct / wrong / pulse / left) stay in trivia.html. */
/* ONE line, always — up to 6 players (me + 5) must never wrap to a second row.
   nowrap + shrinkable pills; on a very narrow phone the pills compress rather
   than dropping down. */
.t-playerbar { display: none; justify-content: center; flex-wrap: nowrap; gap: 4px; margin-bottom: 10px; max-width: 100%; }
.t-playerbar.active { display: flex; }
/* Each player is a compact pill: avatar (initial) + score inline — short, so
   the fixed bar stays low. Shrinkable so 6 fit one line. */
.t-pb {
  /* The total sits CENTRED between the disc's right edge and the pill's (George, 2026-11-26: "When they
     become three digits they remain centred but widen"): the gap before the total and the padding after it
     are the one number, so the space either side of the number is equal at any width. 7px each keeps the
     pill the width it was (5px gap + 9px padding until then). */
  display: inline-flex; align-items: center; gap: 7px; min-width: 0; flex-shrink: 1;
  padding: 2px 7px 2px 2px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--rule);
  transition: border-color 0.2s;
}
.t-pb-av {
  /* 26px, PlayA's (canvas): two letters ("HM", "GB") at the type floor touched a 24px disc's edge (QA, 2026-11-20). */
  width: 26px; height: 26px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.82rem; font-weight: 700; color: #fff;
  background: var(--pcolor, var(--faint));
}
.t-pb.me .t-pb-av { background: var(--gold); color: #3a2e12; }
.t-pb-av img { width: 100%; height: 100%; object-fit: cover; }
.t-pb-total {
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  color: var(--text); font-variant-numeric: tabular-nums; line-height: 1;
  /* Room for two digits whatever they are (Fraunces' figures are not all one width, and 9 -> 10 grew the
     pill by 8px): a pill keeps its width as its total counts up, so the bar never squeezes on a score bump
     (follow-ups 2026-11-20). At 100 the box widens to fit and the pill with it, the number still centred in
     the space (the equal gap and padding above). flex: none so a squeezed bar never narrows the number. */
  min-width: 2.4ch; text-align: center; flex: none;
  transition: color 0.2s ease;
}

/* FIVE OR SIX PILLS (George, 2026-11-27: "this has moved the numbers FURTHER to the right ... It now looks aligned
   right"). When six pills did not fit, each pill shrank (flex-shrink: 1) but its disc and its number could not, so
   the squeeze ate the padding after the number and pushed it into the pill's edge; four pills fit, which is why
   rounds with fewer friends looked right. With five or more: smaller pills, and the number's own box takes the
   squeeze from BOTH sides - it holds the gap and the padding (the pill has neither) and centres the number in it
   with flex, which overflows evenly either way - so the number stays centred however tight the bar gets. */
.t-playerbar:has(> .t-pb:nth-child(5)) { gap: 3px; }
.t-playerbar:has(> .t-pb:nth-child(5)) .t-pb { gap: 0; padding-right: 0; }
.t-playerbar:has(> .t-pb:nth-child(5)) .t-pb-total {
  display: flex; justify-content: center; flex: 0 1 auto; min-width: 0; padding: 0 5px; font-size: 0.92rem;
}

/* A PLAYER JUST SCORED, in a game whose pill has no answer state to show: List Blitz's pill
   pulses in the player's own colour each time they find a name (2026-11-21). Trivia's answer
   states (green / red / grey per question) stay in trivia.html. */
.t-pb.pb-got { animation: tPbGot 0.6s ease-out; }
.t-pb.pb-got .t-pb-av { animation: tPbGotAv 0.6s ease-out; }
.t-pb.pb-done { border-color: var(--pcolor, var(--gold)); }
.t-pb.me.pb-done { border-color: var(--gold); }
@keyframes tPbGot { 0% { box-shadow: 0 0 0 0 var(--pcolor, var(--gold)); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: none; } }
@keyframes tPbGotAv { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.22); } }
@media (prefers-reduced-motion: reduce) { .t-pb.pb-got, .t-pb.pb-got .t-pb-av { animation: none; } }
