/* ============================================================================
   DUGOUT - the daily descent. Loaded by dugout.html only. (Class names keep
   the old working name "rowz-".)

   One stage: a floodlit stand at night. You start at the back, in Row Z,
   and every rarer answer walks the FourPlayers mark DOWN the stand towards
   the pitch. Land the one perfect answer and you are in the dugout: the
   manager. Every animation has a reduced-motion fallback at the bottom.

   Tier colours, least to most points (also chips, pips, bars, reveals):
     Row Z grey #8b96a3   Upper Tier orange #ff9f43   Lower Tier gold #ffd166
     Front Row cyan #4fd8ff   The Dugout lime #6bff61 (the brand colour)
   ========================================================================== */

.rowz-stage {
  --rz-accent: #6bff61;
  --rz-blue: #4fd8ff;
  /* Tier colours, least to most points */
  --rz-rowz: #8b96a3;   /* Row Z, back of the stand: grey */
  --rz-upper: #ff9f43;  /* Upper Tier: orange */
  --rz-lower: #ffd166;  /* Lower Tier: gold */
  --rz-front: #4fd8ff;  /* Front Row: cyan */
  --rz-dugout: #6bff61; /* The Dugout: brand lime */
  --rz-miss: #ff5a5a;
  --rz-amber: #ffb020;
  --rz-ink: #f4f7fb;
  --rz-muted: #9aa6b4;
  --rz-glass: rgba(9, 13, 20, 0.82);
  --pitch-h: 74px;
  --stand-h: 52%;
  --climb: 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  min-height: max(640px, calc(100svh - 90px));
  padding: 1.6rem 1rem calc(var(--pitch-h) + 1.4rem);
  color: var(--rz-ink);
  background: radial-gradient(120% 70% at 50% 0%, #1b2a44 0%, #0d1525 45%, #060a12 100%);
  transition: min-height 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rowz-stage.is-playing { min-height: 0; padding-top: 1rem; }
.rowz-stage a { color: var(--rz-accent); }

/* ── Sky, floodlights, stars ──────────────────────────────────────── */
.rowz-sky { position: absolute; inset: 0; z-index: -3; pointer-events: none; }
.rowz-stars {
  position: absolute;
  inset: 0 0 45% 0;
  background-image:
    radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 9%, #cfe 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 61% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 12%, #dfe 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 30%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 34%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 47% 6%, #fff 50%, transparent 51%);
  background-size: 420px 260px;
  opacity: 0.55;
  animation: rz-twinkle 5s ease-in-out infinite alternate;
}
@keyframes rz-twinkle { to { opacity: 0.25; } }

.rowz-floodlight {
  position: absolute;
  top: 3%;
  width: 70px;
  height: 34px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 20% 35%, #fffbe6 0 5px, transparent 6px),
    radial-gradient(circle at 50% 35%, #fffbe6 0 5px, transparent 6px),
    radial-gradient(circle at 80% 35%, #fffbe6 0 5px, transparent 6px),
    radial-gradient(circle at 35% 75%, #fffbe6 0 5px, transparent 6px),
    radial-gradient(circle at 65% 75%, #fffbe6 0 5px, transparent 6px),
    #1a2333;
  box-shadow: 0 0 40px 10px rgba(255, 248, 210, 0.35);
}
.rowz-floodlight--l { left: 6%; }
.rowz-floodlight--r { right: 6%; }
.rowz-beam {
  position: absolute;
  top: 70%;
  left: 50%;
  width: 520px;
  height: 900px;
  transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(255, 250, 220, 0.22), rgba(255, 250, 220, 0) 70%);
  clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%);
  mix-blend-mode: screen;
  animation: rz-sweep 9s ease-in-out infinite alternate;
}
.rowz-floodlight--l .rowz-beam { transform: translateX(-50%) rotate(-24deg); --from: -24deg; --to: -12deg; }
.rowz-floodlight--r .rowz-beam { transform: translateX(-50%) rotate(24deg); --from: 24deg; --to: 12deg; animation-delay: -4s; }
@keyframes rz-sweep {
  from { transform: translateX(-50%) rotate(var(--from)); }
  to { transform: translateX(-50%) rotate(var(--to)); }
}

/* ── The stand ────────────────────────────────────────────────────── */
.rowz-stand {
  position: absolute;
  z-index: -2;
  left: 50%;
  bottom: var(--pitch-h);
  width: min(1200px, 135%);
  height: var(--stand-h);
  display: flex;
  flex-direction: column;
  transform: translateX(-50%) perspective(900px) rotateX(34deg);
  transform-origin: 50% 100%;
  pointer-events: none;
}
.rowz-tier {
  --c: var(--rz-rowz);
  position: relative;
  flex: 1;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.45) 0 2px, transparent 2px 16px),
    repeating-linear-gradient(180deg, color-mix(in srgb, var(--c) 34%, #0b111b) 0 7px, #070b12 7px 12px);
  border-top: 2px solid color-mix(in srgb, var(--c) 70%, transparent);
  box-shadow: inset 0 10px 24px rgba(0, 0, 0, 0.45);
}
.rowz-tier span {
  position: absolute;
  left: 9%;
  top: 6px;
  font-family: "Anton", var(--font-head);
  font-size: 0.9rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c);
  text-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent);
}
/* Top to bottom; heights match the score bands (Row Z 0-70, Upper 70-210,
   Lower 210-420, Front Row 420-595, Dugout 595-700), so the token sits in
   the tier your total names. */
.rowz-tier--rowz { --c: var(--rz-rowz); flex: 10; }
.rowz-tier--upper { --c: var(--rz-upper); flex: 20; }
.rowz-tier--lower { --c: var(--rz-lower); flex: 30; }
.rowz-tier--front { --c: var(--rz-front); flex: 25; }
.rowz-tier--dugout { --c: var(--rz-dugout); flex: 15; }
/* Phone torches in the crowd */
.rowz-crowd { position: absolute; inset: 0; }
.rowz-crowd i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff8d6;
  box-shadow: 0 0 6px 1px rgba(255, 248, 214, 0.8);
  opacity: 0;
  animation: rz-torch var(--t, 3s) ease-in-out var(--d, 0s) infinite;
}
@keyframes rz-torch { 0%, 100% { opacity: 0; } 40%, 60% { opacity: 0.9; } }

.rowz-pitch {
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--pitch-h);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0 2px, transparent 2px),
    repeating-linear-gradient(90deg, #1f7a34 0 60px, #24893b 60px 120px);
  box-shadow: 0 -18px 40px rgba(107, 255, 97, 0.12);
}

/* You: the FourPlayers mark, walking DOWN the stand towards the dugout. */
.rowz-token {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: calc(var(--pitch-h) - 26px + (1 - var(--climb)) * var(--stand-h-px, 330px));
  width: 56px;
  height: 56px;
  transform: translateX(-50%);
  transition: bottom 1100ms cubic-bezier(0.25, 1.4, 0.4, 1);
  filter: drop-shadow(0 0 12px rgba(107, 255, 97, 0.7));
  pointer-events: none;
}
.rowz-token svg { width: 100%; height: 100%; animation: rz-spin 14s linear infinite; }
.rowz-token b {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(6px, -50%);
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: var(--rz-accent);
  color: #071006;
  font-family: "Anton", var(--font-head);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
@keyframes rz-spin { to { transform: rotate(360deg); } }

.rowz-scanlines {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* ── HUD + title ──────────────────────────────────────────────────── */
.rowz-hud {
  position: absolute;
  z-index: 3;
  top: 0.9rem;
  right: 0.9rem;
  display: flex;
  gap: 0.35rem;
}
.rowz-hud span {
  display: grid;
  justify-items: center;
  min-width: 3.4rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(6, 10, 16, 0.7);
  backdrop-filter: blur(6px);
}
.rowz-hud small { font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--rz-muted); }
.rowz-hud strong { font-family: "Anton", var(--font-head); font-weight: 400; font-size: 1.15rem; line-height: 1.1; }

.rowz-title-wrap { position: relative; z-index: 2; text-align: center; margin-top: clamp(1rem, 5vh, 3.4rem); transition: margin 500ms ease; }
.rowz-title {
  position: relative;
  margin: 0;
  font-family: "Anton", var(--font-head);
  font-weight: 400;
  font-size: clamp(4.6rem, 15vw, 10.5rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: -4px 0 0 rgba(79, 216, 255, 0.85), 4px 0 0 rgba(107, 255, 97, 0.85), 0 0 34px rgba(107, 255, 97, 0.35);
  transition: font-size 500ms ease;
}
/* A glitch slice every few seconds, like a stadium screen catching. */
.rowz-title::before,
.rowz-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: #fff;
  pointer-events: none;
  opacity: 0;
}
.rowz-title::before { text-shadow: -6px 0 var(--rz-blue); animation: rz-glitch-a 5.5s steps(1) infinite; }
.rowz-title::after { text-shadow: 6px 0 var(--rz-accent); animation: rz-glitch-b 5.5s steps(1) infinite; }
@keyframes rz-glitch-a {
  0%, 89%, 100% { opacity: 0; clip-path: inset(0 0 100% 0); }
  90% { opacity: 1; clip-path: inset(18% 0 60% 0); transform: translateX(-6px); }
  92% { opacity: 1; clip-path: inset(62% 0 12% 0); transform: translateX(5px); }
  94% { opacity: 0; }
}
@keyframes rz-glitch-b {
  0%, 90%, 100% { opacity: 0; clip-path: inset(0 0 100% 0); }
  91% { opacity: 1; clip-path: inset(40% 0 38% 0); transform: translateX(7px); }
  93% { opacity: 1; clip-path: inset(8% 0 80% 0); transform: translateX(-4px); }
  95% { opacity: 0; }
}
.rowz-subtitle {
  margin: 0.5rem 0 0;
  font-family: "Anton", var(--font-head);
  font-size: clamp(0.95rem, 2.2vw, 1.35rem);
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: var(--rz-accent);
  text-shadow: 0 0 14px rgba(107, 255, 97, 0.6);
  padding-left: 0.55em;
}
.rowz-stage.is-playing .rowz-title-wrap { margin-top: 0; }
.rowz-stage.is-playing .rowz-title { font-size: clamp(2rem, 6vw, 3rem); }
.rowz-stage.is-playing .rowz-subtitle { display: none; }

/* ── Panel (intro, question, reveal, results all live in here) ────── */
.rowz-panel {
  position: relative;
  z-index: 2;
  width: min(760px, 100%);
  display: grid;
  justify-items: center;
}
.rowz-panel > div { width: 100%; animation: rz-in 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rz-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.rowz-loading { margin: 2rem 0; color: var(--rz-muted); letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.8rem; }
.rowz-glass {
  background: var(--rz-glass);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 3px solid var(--rz-accent);
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  padding: clamp(1.1rem, 3vw, 1.8rem);
}
.rowz-kicker { margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--rz-muted); }

/* Intro */
.rowz-intro { display: grid; justify-items: center; gap: 1.1rem; text-align: center; }
.rowz-tagline { margin: 0; font-family: "Space Grotesk", var(--font-body); font-size: clamp(0.85rem, 2vw, 1.05rem); letter-spacing: 0.08em; color: #cfd8e3; }
.rowz-tagline b { color: var(--rz-accent); font-weight: 700; }
.rowz-tagline i { font-style: normal; color: var(--rz-muted); padding: 0 0.4rem; }

/* THE button. Big, lit, and it wobbles until you press it. */
.rowz-seat-btn {
  position: relative;
  width: min(620px, 100%);
  padding: 1.25rem 1.5rem;
  border: 3px solid var(--rz-accent);
  border-radius: 16px;
  background: linear-gradient(180deg, #0f1a12, #070c08);
  color: var(--rz-accent);
  font-family: "Anton", var(--font-head);
  font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(107, 255, 97, 0.7);
  box-shadow: 0 0 0 6px rgba(107, 255, 97, 0.12), 0 0 46px rgba(107, 255, 97, 0.45), inset 0 0 30px rgba(107, 255, 97, 0.18);
  cursor: pointer;
  animation: rz-bobble 3s ease-in-out infinite;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.rowz-seat-label { display: inline-flex; align-items: center; justify-content: center; }
.rowz-seat-label::before,
.rowz-seat-label::after {
  content: "\25BC";
  display: inline-block;
  font-size: 0.6em;
  animation: rz-arrow 1.4s ease-in-out infinite;
}
.rowz-seat-label::before { margin-right: 0.8em; }
.rowz-seat-label::after { margin-left: 0.8em; animation-delay: -0.7s; }
.rowz-seat-btn small { display: block; margin-top: 0.45rem; font-family: "Space Grotesk", var(--font-body); font-size: 0.8rem; letter-spacing: 0.18em; color: #cfe; text-shadow: none; }
.rowz-seat-btn:hover,
.rowz-seat-btn:focus-visible {
  animation-play-state: paused;
  background: var(--rz-accent);
  color: #061006;
  text-shadow: none;
  outline: none;
  box-shadow: 0 0 0 6px rgba(107, 255, 97, 0.3), 0 0 70px rgba(107, 255, 97, 0.75);
}
.rowz-seat-btn:hover small, .rowz-seat-btn:focus-visible small { color: #061006; }
.rowz-seat-btn:active { transform: scale(0.98); }
@keyframes rz-bobble {
  0%, 55%, 100% { transform: rotate(0) translateX(0); }
  62% { transform: rotate(-2.6deg) translateX(-8px); }
  69% { transform: rotate(2.4deg) translateX(8px); }
  76% { transform: rotate(-1.6deg) translateX(-4px); }
  83% { transform: rotate(1deg) translateX(3px); }
  90% { transform: rotate(0) translateX(0); }
}
@keyframes rz-arrow { 0%, 100% { transform: translateY(-3px); opacity: 0.7; } 50% { transform: translateY(5px); opacity: 1; } }

.rowz-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.rowz-meta span, .rowz-meta button {
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(6, 10, 16, 0.65);
  color: #cfd8e3;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.rowz-meta button { cursor: pointer; }
.rowz-meta button:hover { border-color: var(--rz-accent); color: var(--rz-accent); }
.rowz-how { width: min(620px, 100%); text-align: left; }
.rowz-how ul { margin: 0.6rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.3rem; color: #cfd8e3; font-size: 0.92rem; }
.rowz-tier-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; margin-top: 0.7rem; }

/* Chips */
.rowz-chip {
  --c: var(--rz-rowz);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c) 70%, transparent);
  background: color-mix(in srgb, var(--c) 16%, transparent);
  color: var(--rz-ink);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.rowz-chip b { color: var(--c); font-weight: 800; }
.rowz-stage .is-rowz { --c: var(--rz-rowz); }
.rowz-stage .is-upper { --c: var(--rz-upper); }
.rowz-stage .is-lower { --c: var(--rz-lower); }
.rowz-stage .is-front { --c: var(--rz-front); }
.rowz-stage .is-dugout { --c: var(--rz-dugout); }
.rowz-stage .is-miss, .rowz-stage .is-seen { --c: var(--rz-miss); }
.rowz-stage .is-seen { --c: #56606c; }

/* Question */
.rowz-question { display: grid; gap: 0.85rem; }
.rowz-qhead { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.rowz-possible { margin: 0; font-size: 0.78rem; color: var(--rz-muted); }
.rowz-prompt {
  margin: 0;
  font-family: "Anton", var(--font-head);
  font-weight: 400;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.rowz-hint { margin: -0.4rem 0 0; font-size: 0.8rem; color: var(--rz-muted); }
/* Stadium clock: 25 lit cells that go out one by one. */
.rowz-clock { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.7rem; }
.rowz-clock-num { font-family: "Anton", var(--font-head); font-size: 2rem; line-height: 1; min-width: 2.2ch; text-align: right; color: var(--rz-accent); font-variant-numeric: tabular-nums; }
.rowz-cells { display: grid; grid-template-columns: repeat(25, 1fr); gap: 3px; }
.rowz-cells i { height: 14px; border-radius: 2px; background: var(--rz-accent); box-shadow: 0 0 8px rgba(107, 255, 97, 0.55); transition: background 200ms ease, box-shadow 200ms ease, opacity 200ms ease; }
.rowz-cells i.is-off { background: #1b2430; box-shadow: none; }
.rowz-clock.is-low .rowz-clock-num { color: var(--rz-miss); animation: rz-pulse 0.5s ease-in-out infinite alternate; }
.rowz-clock.is-low .rowz-cells i:not(.is-off) { background: var(--rz-miss); box-shadow: 0 0 10px rgba(255, 90, 90, 0.7); }
@keyframes rz-pulse { to { transform: scale(1.15); } }

.rowz-form { position: relative; }
.rowz-input-row { display: flex; gap: 0.5rem; }
.rowz-input-row input {
  flex: 1;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.45);
  color: var(--rz-ink);
  font: inherit;
  font-size: 1.15rem;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}
.rowz-input-row input:focus { outline: none; border-color: var(--rz-accent); box-shadow: 0 0 0 4px rgba(107, 255, 97, 0.18); }
.rowz-input-row input.is-miss { border-color: var(--rz-amber); background: rgba(255, 176, 32, 0.14); box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.25); animation: rz-shake 380ms ease; }
.rowz-lock {
  padding: 0 1.3rem;
  border: 0;
  border-radius: 12px;
  background: var(--rz-accent);
  color: #061006;
  font-family: "Anton", var(--font-head);
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.rowz-lock:hover { filter: brightness(1.1); }
@keyframes rz-shake {
  20% { transform: translateX(-8px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(3px); }
}
.rowz-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 6;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: #0b111b;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  max-height: 15rem;
  overflow: auto;
}
.rowz-suggest button { display: block; width: 100%; text-align: left; padding: 0.6rem 0.7rem; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.rowz-suggest button:hover, .rowz-suggest button:focus-visible { background: rgba(107, 255, 97, 0.14); outline: none; }
.rowz-feedback { margin: 0; min-height: 1.3em; font-size: 0.9rem; color: var(--rz-muted); }
.rowz-feedback.is-miss { color: var(--rz-amber); }
.rowz-misses { display: flex; flex-wrap: wrap; gap: 0.3rem; min-height: 0; }
.rowz-misses span {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 176, 32, 0.5);
  background: rgba(255, 176, 32, 0.1);
  color: #ffd38a;
  font-size: 0.78rem;
  text-decoration: line-through;
  animation: rz-pop 260ms cubic-bezier(0.3, 1.6, 0.5, 1) both;
}
@keyframes rz-pop { from { transform: scale(0.4); opacity: 0; } to { transform: none; opacity: 1; } }
.rowz-skip { justify-self: start; border: 0; background: none; padding: 0; color: var(--rz-muted); font: inherit; font-size: 0.8rem; text-decoration: underline; cursor: pointer; }

/* Reveal */
.rowz-reveal { --c: var(--rz-rowz); display: grid; justify-items: center; gap: 0.45rem; text-align: center; border-top-color: var(--c); }
.rowz-reveal-name { margin: 0; font-size: 1.15rem; font-weight: 700; }
.rowz-reveal-tier {
  margin: 0;
  font-family: "Anton", var(--font-head);
  font-weight: 400;
  font-size: clamp(2.8rem, 9vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--c);
  text-shadow: 0 0 26px color-mix(in srgb, var(--c) 55%, transparent);
}
.rowz-reveal-points { margin: 0; font-family: "Anton", var(--font-head); font-size: 1.6rem; color: var(--rz-ink); }
.rowz-reveal-sub, .rowz-reveal-crowd, .rowz-reveal-top { margin: 0; color: #c4ced9; }
.rowz-reveal-top strong { color: var(--rz-ink); }
.rowz-next {
  margin-top: 0.4rem;
  padding: 0.85rem 1.8rem;
  border: 2px solid var(--c);
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 18%, #070b12);
  color: var(--rz-ink);
  font-family: "Anton", var(--font-head);
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.rowz-next:hover, .rowz-next:focus-visible { background: var(--c); color: #061006; outline: none; }
.rowz-reveal.is-rowz { filter: saturate(0.6); }
/* The Dugout answer's logo animation plays alone; the card waits for it. */
.rowz-reveal { transition: opacity 320ms ease, transform 320ms cubic-bezier(0.2, 1.3, 0.4, 1); }
.rowz-reveal.is-held { opacity: 0; transform: scale(0.94); pointer-events: none; animation: none; }

/* Pips */
.rowz-pips { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.4rem; width: min(760px, 100%); margin: 0; padding: 0; list-style: none; }
.rowz-pip { --c: rgba(255, 255, 255, 0.14); height: 8px; border-radius: 999px; background: var(--c); }
.rowz-pip[class*="is-"]:not(.is-current) { box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); }
.rowz-pip.is-current { --c: #fff; animation: rz-blink 1s ease-in-out infinite; }
@keyframes rz-blink { 50% { opacity: 0.3; } }

/* Results */
.rowz-results { display: grid; gap: 0.95rem; }
.rowz-final { margin: 0; text-align: center; font-family: "Anton", var(--font-head); font-weight: 400; font-size: clamp(3.4rem, 11vw, 6rem); line-height: 1; text-shadow: -3px 0 rgba(79, 216, 255, 0.8), 3px 0 rgba(107, 255, 97, 0.8); }
.rowz-final small { font-size: 0.35em; color: var(--rz-muted); text-shadow: none; }
.rowz-final-band { --c: var(--rz-rowz); margin: -0.3rem 0 0; text-align: center; font-family: "Anton", var(--font-head); font-size: 1.3rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c); }
.rowz-standing { margin: 0; text-align: center; color: #cfd8e3; }
.rowz-standing strong { color: var(--rz-accent); font-size: 1.15em; }
.rowz-actions { display: flex; justify-content: center; align-items: center; gap: 1rem; flex-wrap: wrap; }
.rowz-share {
  padding: 0.85rem 1.6rem;
  border: 0;
  border-radius: 12px;
  background: var(--rz-accent);
  color: #061006;
  font-family: "Anton", var(--font-head);
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(107, 255, 97, 0.45);
}
.rowz-next-in { font-size: 0.85rem; color: var(--rz-muted); }
.rowz-next-in strong { color: var(--rz-ink); }
.rowz-signin { margin: 0; padding: 0.65rem 0.8rem; border: 1px dashed rgba(255, 255, 255, 0.25); border-radius: 10px; font-size: 0.88rem; text-align: center; color: #cfd8e3; }
.rowz-qs { display: grid; gap: 0.45rem; }
.rowz-q { border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; background: rgba(0, 0, 0, 0.3); }
.rowz-q summary { display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.8rem; cursor: pointer; list-style: none; }
.rowz-q summary::-webkit-details-marker { display: none; }
.rowz-q-n { flex: 0 0 auto; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.08); font-size: 0.78rem; font-weight: 800; }
.rowz-q-text { flex: 1; min-width: 0; font-size: 0.92rem; }
.rowz-q-body { padding: 0 0.8rem 0.8rem; display: grid; gap: 0.5rem; }
.rowz-footnote { margin: 0; font-size: 0.8rem; color: var(--rz-muted); }
.rowz-bars { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.35rem; }
.rowz-bars li { display: grid; grid-template-columns: minmax(0, 11rem) 1fr 2.8rem; align-items: center; gap: 0.5rem; font-size: 0.86rem; }
.rowz-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rowz-bar-track { height: 0.65rem; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.rowz-bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 60%, transparent); transform-origin: left; animation: rz-grow 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rz-grow { from { transform: scaleX(0); } }
.rowz-bar-pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--rz-muted); }
.rowz-gem { margin: 0; font-size: 0.88rem; padding: 0.5rem 0.65rem; border-radius: 10px; background: rgba(107, 255, 97, 0.08); border: 1px solid rgba(107, 255, 97, 0.4); }
.rowz-board h3 { margin: 0 0 0.45rem; font-family: "Anton", var(--font-head); font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; font-size: 1.1rem; }
.rowz-board ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.25rem; }
.rowz-board li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0.7rem; border-radius: 8px; background: rgba(255, 255, 255, 0.04); font-size: 0.9rem; }
.rowz-board li.is-you { background: rgba(107, 255, 97, 0.16); font-weight: 700; }
.rowz-more { margin: 0; text-align: center; font-size: 0.88rem; color: var(--rz-muted); }

/* ── Reveal effects (scripts/rowz-game.js builds these into #rowz-fx) ─ */
.rowz-fx { position: absolute; inset: 0; z-index: 20; pointer-events: none; overflow: hidden; }
.rz-flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, var(--c), transparent 65%); opacity: 0; animation: rz-flash 600ms ease-out forwards; }
@keyframes rz-flash { 15% { opacity: 0.55; } 100% { opacity: 0; } }
.rz-burst { position: absolute; left: 50%; top: 45%; width: 0; height: 0; }
.rz-p {
  position: absolute;
  left: -4px;
  top: -4px;
  width: var(--s, 8px);
  height: var(--s, 8px);
  border-radius: 2px;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
  transform: rotate(var(--a)) translateX(0);
  animation: rz-fly var(--t, 800ms) cubic-bezier(0.15, 0.7, 0.3, 1) var(--d, 0ms) forwards;
}
.rz-p.is-spark { width: 3px; height: 18px; border-radius: 2px; }
@keyframes rz-fly {
  0% { transform: rotate(var(--a)) translateX(0) scale(1); opacity: 1; }
  100% { transform: rotate(var(--a)) translateX(var(--r)) scale(0.2); opacity: 0; }
}
.rz-ring { position: absolute; left: 50%; top: 45%; width: 40px; height: 40px; margin: -20px; border: 3px solid var(--c); border-radius: 50%; opacity: 0.9; animation: rz-ring 800ms ease-out forwards; }
@keyframes rz-ring { to { transform: scale(14); opacity: 0; border-width: 1px; } }
.rz-stamp {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  font-family: "Anton", var(--font-head);
  font-size: clamp(3rem, 12vw, 7rem);
  letter-spacing: 0.06em;
  color: var(--c);
  text-shadow: 0 0 40px var(--c), 0 6px 0 rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  animation: rz-stamp 1200ms cubic-bezier(0.2, 1.4, 0.3, 1) forwards;
}
@keyframes rz-stamp {
  0% { transform: translate(-50%, -50%) scale(2.6) rotate(-6deg); opacity: 0; }
  25% { transform: translate(-50%, -50%) scale(1) rotate(-3deg); opacity: 1; }
  75% { transform: translate(-50%, -50%) scale(1.04) rotate(-3deg); opacity: 1; }
  100% { transform: translate(-50%, -60%) scale(1.1) rotate(-3deg); opacity: 0; }
}

/* Row Z: the anti-celebration. Everything goes grey and the word lands with a thud. */
.rowz-stage.is-dull { filter: grayscale(0.85) brightness(0.8); transition: filter 200ms ease; }
.rz-thud {
  position: absolute;
  left: 50%;
  top: 40%;
  font-family: "Anton", var(--font-head);
  font-size: clamp(2.4rem, 9vw, 4.8rem);
  letter-spacing: 0.06em;
  color: #6f7883;
  transform: translateX(-50%);
  animation: rz-thud 1000ms cubic-bezier(0.5, 0, 0.75, 0) forwards;
}
@keyframes rz-thud {
  0% { transform: translate(-50%, -160px); opacity: 0; }
  35% { transform: translate(-50%, 0) scaleY(1); opacity: 1; animation-timing-function: ease-out; }
  45% { transform: translate(-50%, 6px) scale(1.12, 0.78); }
  60% { transform: translate(-50%, 0) scale(1); }
  85% { opacity: 1; }
  100% { transform: translate(-50%, 18px); opacity: 0; }
}
.rz-dust { position: absolute; left: 50%; top: 52%; width: 10px; height: 10px; border-radius: 50%; background: #5d6670; opacity: 0; animation: rz-dust 900ms ease-out 330ms forwards; }
@keyframes rz-dust { 0% { opacity: 0.7; transform: translate(0, 0) scale(0.6); } 100% { opacity: 0; transform: translate(var(--x), 26px) scale(1.8); } }

/* The Dugout answer: the FourPlayers mark assembles itself, then the stadium erupts. */
.rz-logo-wrap { position: absolute; left: 50%; top: 42%; width: 0; height: 0; }
.rz-rays {
  position: absolute;
  left: -260px;
  top: -260px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(107, 255, 97, 0.28) 0 8deg, transparent 8deg 22deg);
  mask: radial-gradient(circle, #000 20%, transparent 70%);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%);
  opacity: 0;
  animation: rz-rays 1500ms ease-out 400ms forwards;
}
@keyframes rz-rays { 0% { opacity: 0; transform: rotate(0) scale(0.4); } 30% { opacity: 1; } 100% { opacity: 0; transform: rotate(90deg) scale(1.3); } }
.rz-logo { position: absolute; left: -90px; top: -90px; width: 180px; height: 180px; overflow: visible; filter: drop-shadow(0 0 22px rgba(107, 255, 97, 0.9)); animation: rz-logo-out 1800ms ease forwards; }
.rz-logo line { stroke-dasharray: 22; stroke-dashoffset: 22; animation: rz-draw 260ms ease-out forwards; }
.rz-logo line:nth-child(1) { animation-delay: 380ms; }
.rz-logo line:nth-child(2) { animation-delay: 440ms; }
.rz-logo line:nth-child(3) { animation-delay: 500ms; }
.rz-logo line:nth-child(4) { animation-delay: 560ms; }
@keyframes rz-draw { to { stroke-dashoffset: 0; } }
.rz-logo circle { transform-box: fill-box; transform-origin: center; animation: rz-dot 380ms cubic-bezier(0.2, 1.5, 0.4, 1) both; }
.rz-logo circle:nth-child(1) { --fx: -120px; --fy: -120px; }
.rz-logo circle:nth-child(2) { --fx: 120px; --fy: -120px; animation-delay: 70ms; }
.rz-logo circle:nth-child(3) { --fx: 120px; --fy: 120px; animation-delay: 140ms; }
.rz-logo circle:nth-child(4) { --fx: -120px; --fy: 120px; animation-delay: 210ms; }
@keyframes rz-dot { from { transform: translate(var(--fx), var(--fy)) scale(0.2); opacity: 0; } to { transform: none; opacity: 1; } }
.rz-logo polygon { transform-box: fill-box; transform-origin: center; animation: rz-ball 700ms cubic-bezier(0.2, 1.6, 0.4, 1) 640ms both; }
@keyframes rz-ball { from { transform: scale(0) rotate(-180deg); } 70% { transform: scale(1.5) rotate(20deg); } to { transform: scale(1) rotate(0); } }
@keyframes rz-logo-out { 0%, 70% { transform: scale(1); opacity: 1; } 82% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(0.2) translateY(-200px); opacity: 0; } }
.rz-logo-word {
  position: absolute;
  left: 50%;
  top: calc(42% + 110px);
  transform: translateX(-50%);
  font-family: "Anton", var(--font-head);
  font-size: clamp(2.6rem, 10vw, 5.4rem);
  letter-spacing: 0.08em;
  color: var(--rz-accent);
  text-shadow: -3px 0 var(--rz-blue), 3px 0 #fff, 0 0 40px var(--rz-accent);
  white-space: nowrap;
  opacity: 0;
  animation: rz-word 1000ms cubic-bezier(0.2, 1.4, 0.3, 1) 700ms forwards;
}
@keyframes rz-word { 0% { opacity: 0; transform: translateX(-50%) scale(0.5); } 25% { opacity: 1; transform: translateX(-50%) scale(1.08); } 80% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 0; transform: translateX(-50%) scale(1); } }
.rz-dim { position: absolute; inset: 0; background: rgba(2, 5, 9, 0.7); animation: rz-dim 1800ms ease forwards; }
@keyframes rz-dim { 0% { opacity: 0; } 12%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* Out of time */
.rz-whistle { position: absolute; inset: 0; box-shadow: inset 0 0 160px 40px rgba(255, 60, 60, 0.6); opacity: 0; animation: rz-flash 900ms ease-out forwards; }

/* ── Small screens ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .rowz-stage { --pitch-h: 54px; gap: 0.8rem; padding: 3.6rem 0.75rem calc(var(--pitch-h) + 1rem); min-height: calc(100svh - 70px); }
  .rowz-stage.is-playing { padding-top: 3.4rem; }
  .rowz-hud { left: 0.6rem; right: 0.6rem; justify-content: center; }
  .rowz-floodlight { width: 46px; height: 24px; }
  .rowz-tier span { font-size: 0.65rem; left: 4%; }
  .rowz-input-row { flex-direction: column; }
  .rowz-lock { padding: 0.8rem; }
  .rowz-cells i { height: 10px; }
  .rowz-bars li { grid-template-columns: minmax(0, 7.5rem) 1fr 2.4rem; }
  .rowz-q summary { flex-wrap: wrap; }
  .rowz-q-text { flex-basis: calc(100% - 2.4rem); }
  .rowz-seat-btn { padding: 1.1rem 0.8rem; }
  .rowz-seat-label::before { margin-right: 0.45em; }
  .rowz-seat-label::after { margin-left: 0.45em; }
}

/* ── Motion safety: keep every colour, drop every movement ────────── */
@media (prefers-reduced-motion: reduce) {
  .rowz-stage *, .rowz-stage *::before, .rowz-stage *::after { animation: none !important; transition: none !important; }
  .rowz-fx { display: none; }
  .rowz-title::before, .rowz-title::after { display: none; }
}

/* ── Share your seat (scripts/rowz-share.js) ──────────────────────── */
body.rzs-open { overflow: hidden; }
.rzs-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 4, 8, 0.82);
  backdrop-filter: blur(6px);
  animation: rz-in 240ms ease both;
}
.rzs-card {
  position: relative;
  display: grid;
  gap: 0.85rem;
  justify-items: center;
  width: min(460px, 100%);
  max-height: 100%;
}
.rzs-canvas {
  width: auto;
  max-width: 100%;
  height: min(72svh, 575px);
  aspect-ratio: 1080 / 1350;
  border-radius: 18px;
  box-shadow: 0 0 0 2px rgba(107, 255, 97, 0.5), 0 0 60px rgba(107, 255, 97, 0.35), 0 30px 80px rgba(0, 0, 0, 0.7);
}
.rzs-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; width: 100%; }
.rzs-btn {
  flex: 1 1 auto;
  padding: 0.8rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: #0b111b;
  color: #f4f7fb;
  font-family: "Anton", var(--font-head);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.rzs-btn:hover:not([disabled]) { border-color: #6bff61; color: #6bff61; }
.rzs-btn[disabled] { opacity: 0.55; cursor: progress; }
.rzs-btn--main { flex-basis: 100%; border-color: #6bff61; background: #6bff61; color: #061006; font-size: 1.35rem; box-shadow: 0 0 30px rgba(107, 255, 97, 0.45); }
.rzs-btn--main:hover:not([disabled]) { color: #061006; filter: brightness(1.08); }
.rzs-btn--main[disabled] span::after { content: ""; display: inline-block; width: 0.8em; height: 0.8em; margin-left: 0.5em; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rz-spin 0.8s linear infinite; vertical-align: -0.1em; }
.rzs-status { margin: 0; min-height: 1.2em; font-size: 0.85rem; color: #c4ced9; text-align: center; }
.rzs-close {
  position: absolute;
  top: -0.4rem;
  right: -0.4rem;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 50%;
  background: #f4f7fb;
  color: #061006;
  font-size: 1.1rem;
  cursor: pointer;
}
