/* =====================================================================
   ¿Te la juegas?: a guided wager on the studio floor.

   Two surfaces, one at a time:
     .rk-marquee  broadcast moments over the stage (title, turn, "¡No va
                  más!", verdict). Never interactive.
     .rk-desk     the one thing to do or to read now, under the stage.

   Colour is functional: --spot (gold) for the protagonist and the main
   action, --signal (cyan) for neutral info and selection, --success for
   "acertará" and gains, --danger for "fallará" and losses. Every state
   also has an icon or a word: nothing relies on colour alone.
   ===================================================================== */

/* --- Layout: the stage takes the whole width; the scoreboard lives on
       the atriles, so the floating ranking and the lower third go away. */
body.game-active.te-la-juegas .broadcast {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(160px, 1fr) auto auto;
  grid-template-areas: "hud" "q" "stage" "desk" "ans";
}
body.te-la-juegas .rank-overlay,
body.te-la-juegas .answer-feedback { display: none !important; }
.rk-marquee, .rk-desk { display: none; }
body.game-active.te-la-juegas .rk-marquee {
  grid-area: stage; position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1fr);
  align-content: start; justify-items: center; padding: clamp(6px, 1.5%, 18px) 12px 0;
  pointer-events: none; min-width: 0;
}
body.game-active.te-la-juegas .rk-desk {
  grid-area: desk; display: block; justify-self: center; width: min(100%, 820px); min-width: 0;
}
body.game-active.te-la-juegas .rk-desk.is-empty { display: none; }

/* HUD: the timer only when there is something to do against the clock. */
body.te-la-juegas:not([data-risk-phase="betting"]):not([data-risk-phase="answering"]) .hud-timer-text,
body.te-la-juegas:not([data-risk-phase="betting"]):not([data-risk-phase="answering"]) .hud-timer-wrap { visibility: hidden; }
body.te-la-juegas .hud-counter { color: var(--spot-strong); }
body.te-la-juegas .hud-timer-fill { background: var(--signal); }
body.te-la-juegas .hud-timer-fill.warning { background: var(--warning); }
body.te-la-juegas .hud-timer-fill.urgent { background: var(--danger); }
/* The player's role in this turn, where other mechanics show the category. */
.hud-category.is-role { text-transform: none; letter-spacing: .02em; font-size: 1rem; }

/* While betting, the question steps back so the decision leads. */
.hud-question-area.is-compact h2 { padding: 10px 20px; font-size: clamp(1rem, .82rem + .7vw, 1.4rem); }
.hud-question-area.is-compact h2::before { background: var(--line-3); }

/* Bettors watch the protagonist's options without being able to press them. */
.answer-opt.is-watching:disabled { opacity: .82; cursor: default; }

/* A title over the stage takes the place of the shot label. */
body.te-la-juegas:has(.rk-marquee:not(.is-empty)) .broadcast-label { opacity: 0; }

/* Emblem: "2/6" */
.ef-code small { font-size: .45em; color: var(--text-3); }

/* --- Shared bits ---------------------------------------------------- */
.rk-marquee .pc, .rk-desk .pc { color: var(--pc); }
.rk-bet-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pc, var(--text-1)); font-weight: 700; }
.rk-marquee .is-up, .rk-desk .is-up { color: var(--success-strong); }
.rk-marquee .is-down, .rk-desk .is-down { color: var(--danger-strong); }

/* =====================================================================
   Marquee
   ===================================================================== */
.rk-card, .rk-turn, .rk-stamp, .rk-verdict, .rk-tag {
  max-width: min(100%, 900px);
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgb(12 20 36 / .96), rgb(6 10 20 / .97));
  box-shadow: var(--edge-highlight), var(--shadow-3);
  text-align: center;
}

/* Opening: the title of the game, once per block. */
.rk-opening { display: grid; justify-items: center; gap: 8px; padding: 12px clamp(16px, 4vw, 36px) 14px; border-color: var(--spot-line); }
.rk-show-title {
  margin: 0; font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.6rem, 1.6rem + 4vw, 5rem); line-height: .86; letter-spacing: .005em;
  color: var(--spot); text-shadow: 0 2px 0 #7a4b0a, 0 0 34px rgb(246 183 82 / .35);
}
.rk-lede { margin: 0; max-width: 52ch; color: var(--text-1); font-size: clamp(1.02rem, .9rem + .5vw, 1.3rem); font-weight: 600; line-height: 1.35; text-wrap: balance; }
.rk-rules { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; margin: 2px 0 0; padding: 0; list-style: none; }
.rk-rules li {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: var(--surface-sunken); color: var(--text-2); font-size: var(--fs-sm);
}
.rk-rules li i { color: var(--spot); font-size: 1.05rem; }
.rk-rules li.is-up i { color: var(--success); }
.rk-rules li.is-down i { color: var(--danger); }
.rk-rules b { color: var(--text-1); }

/* Turn: who answers. The name in the contestant's colour. */
.rk-turn { display: grid; justify-items: center; gap: 2px; padding: 10px clamp(18px, 4vw, 36px) 12px; border-color: color-mix(in srgb, var(--pc) 55%, transparent); }
.rk-turn-count { color: var(--text-2); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
.rk-turn-name { display: grid; justify-items: center; margin: 0; font-family: var(--font-display); font-weight: 800; text-transform: uppercase; line-height: .9; }
.rk-turn-name small { font-size: clamp(1.2rem, 1rem + .8vw, 1.7rem); color: var(--text-1); letter-spacing: .04em; }
.rk-turn-name span {
  position: relative; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: clamp(2.8rem, 1.8rem + 3.6vw, 4.8rem); color: var(--pc); padding-bottom: 6px;
}
.rk-turn-name span::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: 0; height: 3px; border-radius: 3px; background: var(--spot); }
.rk-turn-role {
  display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 0; padding: 6px 14px; border-radius: var(--r-pill);
  font-weight: 650; font-size: clamp(.95rem, .88rem + .3vw, 1.1rem);
  color: var(--signal-strong); background: var(--signal-soft); border: 1px solid var(--signal-line);
}
.rk-turn-role.is-protagonist { color: var(--spot-strong); background: var(--spot-soft); border-color: var(--spot-line); }

/* Bets closed. */
.rk-stamp { display: grid; gap: 2px; padding: 14px 34px 16px; border-color: var(--signal-line); }
.rk-stamp span { color: var(--signal-strong); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; }
.rk-stamp strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.4rem, 1.6rem + 3vw, 4rem); line-height: .95; text-transform: uppercase; color: var(--text-1); }

.rk-tag {
  --tone: var(--spot);
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; border-radius: var(--r-pill);
  border-color: color-mix(in srgb, var(--tone) 55%, transparent);
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: .06em; text-transform: uppercase;
  color: color-mix(in srgb, var(--tone) 50%, #fff);
}
.rk-tag.is-right { --tone: var(--success); }
.rk-tag.is-wrong { --tone: var(--danger); }
.rk-tag.is-timeout { --tone: var(--warning); }

/* Verdict: right/wrong, the right answer, then the protagonist's points. */
.rk-verdict { --tone: var(--success); display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 20px; padding: 10px clamp(18px, 3vw, 30px);
  border-color: color-mix(in srgb, var(--tone) 60%, transparent);
  box-shadow: var(--edge-highlight), 0 0 0 1px color-mix(in srgb, var(--tone) 25%, transparent), 0 0 40px color-mix(in srgb, var(--tone) 22%, transparent), var(--shadow-3); }
.rk-verdict.is-wrong { --tone: var(--danger); }
.rk-verdict.is-timeout { --tone: var(--warning); }
.rk-verdict-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.6rem); line-height: .92; text-transform: uppercase; color: color-mix(in srgb, var(--tone) 55%, #fff); }
.rk-verdict-answer { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-width: 0; color: var(--text-1); font-weight: 650; font-size: clamp(1rem, .9rem + .4vw, 1.2rem); }
.rk-verdict-answer b { display: grid; place-items: center; flex-shrink: 0; width: 30px; height: 30px; border-radius: var(--r-sm); background: var(--success); color: var(--success-ink); font-family: var(--font-display); font-size: 1.15rem; }

/* =====================================================================
   Desk
   ===================================================================== */
.rw, .rk-wait, .rk-cue, .rk-reveal, .rk-callout, .rk-tally, .rk-board, .rk-final {
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: var(--surface-panel); box-shadow: var(--edge-highlight), var(--shadow-2);
}

/* Reading: a short instruction and the reading time. */
.rk-cue { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 18px 18px; overflow: hidden; }
.rk-cue > i { flex-shrink: 0; font-size: 1.8rem; color: var(--signal); }
.rk-cue p { margin: 0; color: var(--text-2); font-size: clamp(1rem, .92rem + .35vw, 1.2rem); line-height: 1.35; }
.rk-cue strong { color: var(--text-1); }
.rk-readbar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgb(255 255 255 / .06); }
.rk-readbar span { display: block; height: 100%; background: var(--signal); transform-origin: left; transform: scaleX(0); transition: transform .1s linear; }

/* --- The bet wizard ------------------------------------------------- */
.rw { display: grid; gap: 12px; padding: 12px clamp(12px, 2.4vw, 20px) 16px; border-color: var(--spot-line); }
.rw-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rw-steps { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; min-width: 0; }
.rw-steps li {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border-radius: var(--r-pill);
  color: var(--text-3); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
}
.rw-steps li span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-3); font-family: var(--font-display); font-weight: 700; font-size: .85rem; }
.rw-steps li.is-done { color: var(--text-2); }
.rw-steps li.is-done span { border-color: var(--signal-line); background: var(--signal-soft); color: var(--signal-strong); }
.rw-steps li.is-current { color: var(--spot-strong); background: var(--spot-soft); }
.rw-steps li.is-current span { border-color: var(--spot); background: var(--spot); color: var(--spot-ink); }
.rw-body { display: grid; gap: 12px; min-width: 0; }
.rw-q {
  margin: 0; text-align: center; text-wrap: balance;
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em;
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.3rem); line-height: 1;
}

/* Step 1: two big calls. */
.rw-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rw-pick {
  --tone: var(--success); --tone-ink: var(--success-ink);
  display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 132px; padding: 14px;
  border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent); border-radius: var(--r-lg);
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 16%, #0f1a2c), color-mix(in srgb, var(--tone) 6%, #0a1220));
  color: var(--text-1); cursor: pointer;
  box-shadow: var(--edge-highlight), var(--shadow-1);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), background-color var(--dur-fast), border-color var(--dur-fast);
}
.rw-pick.is-against { --tone: var(--danger); --tone-ink: var(--danger-ink); }
.rw-pick-icon {
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%;
  border: 3px solid var(--tone); color: var(--tone); font-size: 2rem;
  box-shadow: 0 0 22px color-mix(in srgb, var(--tone) 30%, transparent);
}
.rw-pick-word { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); line-height: 1; text-transform: uppercase; letter-spacing: .03em; }
@media (hover: hover) {
  .rw-pick:not(:disabled):hover { transform: translateY(-2px); border-color: var(--tone); box-shadow: var(--edge-highlight), 0 0 0 1px var(--tone), 0 10px 30px color-mix(in srgb, var(--tone) 22%, transparent); }
}
.rw-pick:not(:disabled):active { transform: scale(.98); }
.rw-pick.is-chosen { border-color: var(--tone); background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 34%, #0f1a2c), color-mix(in srgb, var(--tone) 18%, #0a1220)); box-shadow: 0 0 0 2px var(--tone), 0 0 34px color-mix(in srgb, var(--tone) 32%, transparent); }
.rw-pick.is-chosen .rw-pick-icon { background: var(--tone); color: var(--tone-ink); }

/* Step 2: the stakes. A four-segment meter shows how much is at risk. */
.rw-context { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); }
.rw-chip {
  --tone: var(--success);
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--tone) 55%, transparent); background: color-mix(in srgb, var(--tone) 14%, transparent);
  color: color-mix(in srgb, var(--tone) 50%, #fff); font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em;
}
.rw-chip.is-against { --tone: var(--danger); }
.rw-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: inherit; font-weight: 600; cursor: pointer;
}
@media (hover: hover) { .rw-back:not(:disabled):hover { color: var(--text-1); border-color: var(--line-3); } }
.rw-ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rw-stake {
  display: grid; justify-items: center; align-content: center; gap: 2px;
  min-height: 116px; padding: 12px 8px 14px;
  border: 1px solid var(--spot-line); border-radius: var(--r-md);
  background: linear-gradient(180deg, #17233a, #0f1828); color: var(--text-1); cursor: pointer;
  box-shadow: var(--edge-highlight), var(--shadow-1);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), border-color var(--dur-fast), background-color var(--dur-fast);
}
.rw-stake strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.1rem, 1.6rem + 1.4vw, 3rem); line-height: .95; }
.rw-stake small { color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; }
.rw-meter { display: flex; gap: 3px; margin-top: 8px; }
.rw-meter i { width: 12px; height: 6px; border-radius: 2px; background: rgb(255 255 255 / .1); }
.rw-meter i.is-on { background: var(--spot); box-shadow: 0 0 8px rgb(246 183 82 / .45); }
@media (hover: hover) {
  .rw-stake:not(:disabled):hover { transform: translateY(-2px); border-color: var(--spot); box-shadow: var(--edge-highlight), var(--glow-spot); }
}
.rw-stake:not(:disabled):active { transform: scale(.97); }
.rw-stake.is-chosen { border-color: var(--spot); background: linear-gradient(180deg, #3a2a10, #22180a); box-shadow: 0 0 0 2px var(--spot), 0 0 30px rgb(246 183 82 / .3); }
.rw-stake.is-chosen small { color: var(--text-1); }

/* Step 3: the bet in words, then confirm. */
.rw-summary {
  --tone: var(--success);
  display: grid; justify-items: center; gap: 4px; padding: 12px; border-radius: var(--r-md);
  background: var(--surface-sunken); border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent); text-align: center;
}
.rw-summary.is-against { --tone: var(--danger); }
.rw-sum-pick { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1; text-transform: uppercase; color: color-mix(in srgb, var(--tone) 45%, #fff); }
.rw-sum-pick i { color: var(--tone); }
.rw-sum-stake { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.2rem, 1rem + .7vw, 1.6rem); text-transform: uppercase; color: var(--text-1); }
.rw-sum-stake strong { color: var(--spot); font-size: 1.5em; }
.rw-sum-odds { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 2px 0 0; font-size: var(--fs-sm); color: var(--text-2); }
.rw-sum-odds b { font-family: var(--font-display); font-size: 1.1rem; }
.rw-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; }
.rw-actions .btn { width: 100%; min-height: 56px; }
.rw-confirm { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; letter-spacing: .04em; text-transform: uppercase; }

.rw-note { margin: 0; text-align: center; font-weight: 650; font-size: var(--fs-sm); }
.rw-note.is-hurry { color: var(--warning); }
.rw-note.is-error { color: var(--danger-strong); }
.rw-note[hidden] { display: none; }

/* Countdown ring (desk) */
.rk-ring { position: relative; display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; }
.rk-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.rk-ring circle { fill: none; stroke-width: 4; }
.rk-ring-track { stroke: rgb(255 255 255 / .08); }
.rk-ring-fill { stroke: var(--signal); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .1s linear, stroke var(--dur-base); }
.rk-ring b { position: relative; font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; line-height: 1; }
.rk-ring.is-urgent .rk-ring-fill { stroke: var(--danger); }
.rk-ring.is-urgent b { color: var(--danger-strong); }

/* --- Waiting (bettor after confirming, protagonist during bets) ------ */
.rk-wait { display: grid; justify-items: center; gap: 6px; padding: 16px 18px; text-align: center; }
.rk-wait.is-locked { border-color: rgb(61 220 145 / .45); }
.rk-wait.is-protagonist { border-color: var(--spot-line); }
.rk-wait .rk-ring { width: 64px; height: 64px; }
.rk-wait .rk-ring b { font-size: 1.8rem; }
.rk-seal { display: grid; place-items: center; font-size: 3rem; line-height: 1; color: var(--success); filter: drop-shadow(0 0 16px rgb(61 220 145 / .4)); }
.rk-wait-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.2rem); line-height: 1; text-transform: uppercase; text-wrap: balance; }
.rk-wait.is-locked .rk-wait-title { color: var(--success-strong); }
.rk-wait-bet { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; color: var(--text-2); }
.rk-wait-bet b { color: var(--spot); font-family: var(--font-display); font-size: 1.3rem; }
.rk-wait-sub { margin: 0; color: var(--text-2); }
.rk-progress { display: grid; justify-items: center; gap: 6px; margin-top: 4px; }
.rk-progress-text { color: var(--text-3); font-size: var(--fs-sm); font-weight: 600; }
.rk-pips { display: flex; gap: 6px; }
.rk-pips i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-3); }
.rk-pips i.is-ready { border-color: var(--success); background: var(--success); }
.rk-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rk-dots li {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 8px; border-radius: var(--r-pill);
  border: 1px solid var(--line-2); color: var(--text-3); font-size: var(--fs-sm);
}
.rk-dots li span { color: var(--pc); font-weight: 650; }
.rk-dots li.is-ready { border-color: rgb(61 220 145 / .45); background: var(--success-soft); }
.rk-dots li.is-ready i { color: var(--success); }

/* --- Revealed bets ------------------------------------------------------ */
.rk-reveal { display: grid; gap: 10px; padding: 12px 14px; }
.rk-reveal-sum { margin: 0; text-align: center; color: var(--text-2); font-size: clamp(1rem, .92rem + .3vw, 1.15rem); }
.rk-reveal-sum b { color: var(--text-1); font-family: var(--font-display); font-size: 1.3em; }
.rk-bets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rk-bet {
  --tone: var(--text-3);
  display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 10px; min-width: 0; max-width: 100%;
  padding: 8px 14px; border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--tone) 50%, transparent); background: color-mix(in srgb, var(--tone) 10%, var(--ink-2));
}
.rk-bet.is-for { --tone: var(--success); }
.rk-bet.is-against { --tone: var(--danger); }
.rk-bet.is-sealed, .rk-bet.is-none { grid-template-columns: auto auto; }
.rk-bet-pick { display: inline-flex; align-items: center; gap: 4px; color: color-mix(in srgb, var(--tone) 50%, #fff); font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; text-transform: uppercase; }
.rk-bet.is-none .rk-bet-pick, .rk-bet.is-sealed .rk-bet-pick { color: var(--text-3); font-family: var(--font-ui); font-size: var(--fs-sm); font-weight: 600; text-transform: none; }
.rk-bet-amount { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--text-1); }
.rk-bets.is-compact { gap: 6px; }
.rk-bets.is-compact .rk-bet { padding: 3px 10px; gap: 6px; }
.rk-bets.is-compact .rk-bet-amount { font-size: 1.1rem; }

/* --- Answering ----------------------------------------------------------- */
.rk-callout { display: grid; justify-items: center; gap: 8px; padding: 10px 14px; text-align: center; }
.rk-callout strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); line-height: 1; text-transform: uppercase; }
.rk-callout.is-protagonist { border-color: var(--spot-line); box-shadow: var(--edge-highlight), var(--glow-spot); }
.rk-callout.is-protagonist strong { color: var(--spot); }

/* --- Turn points: protagonist first, then the bettors --------------------- */
.rk-tally { padding: 8px 12px; }
.rk-tally ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.rk-delta { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 4.5ch; align-items: center; gap: 10px; padding: 5px 8px; border-radius: var(--r-sm); }
.rk-delta:first-child { background: var(--spot-soft); }
.rk-delta.is-me { box-shadow: inset 0 0 0 1px var(--line-3); }
.rk-delta-why { color: var(--text-2); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-delta-value { justify-self: end; font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1; color: var(--text-2); }
.rk-delta.is-hidden .rk-delta-why { visibility: hidden; }
.rk-delta.is-hidden .rk-delta-value::before { content: "···"; color: var(--text-3); }

/* --- Scoreboard of the block (between turns) -------------------------------- */
.rk-board { display: grid; gap: 8px; padding: 10px 12px; }
.rk-board ol { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rk-board li { display: inline-flex; align-items: baseline; gap: 8px; min-width: 0; padding: 6px 12px; border-radius: var(--r-md); border: 1px solid var(--line-1); background: var(--surface-sunken); }
.rk-board li.is-me { border-color: var(--spot-line); background: var(--spot-soft); }
.rk-board-rank { color: var(--spot-strong); font-family: var(--font-display); font-weight: 700; }
.rk-board li b { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; }
.rk-board li small { font-weight: 700; font-size: var(--fs-xs); }
.rk-next { margin: 0; text-align: center; color: var(--text-3); font-size: var(--fs-sm); }

/* --- Final standings of the block --------------------------------------------- */
.rk-final { display: grid; gap: 8px; padding: 12px 14px; border-color: var(--spot-line); }
.rk-final-title { margin: 0; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); text-transform: uppercase; color: var(--spot-strong); }
.rk-final-table { width: 100%; border-collapse: separate; border-spacing: 0 4px; }
.rk-final-table th { padding: 0 8px; color: var(--text-3); font-size: var(--fs-xs); font-weight: 600; text-align: left; }
.rk-final-table th:nth-child(n+3), .rk-final-table td:nth-child(n+3) { text-align: right; }
.rk-final-table td { padding: 8px; background: var(--surface-sunken); }
.rk-final-table td:first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.rk-final-table td:last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.rk-final-table tr.is-me td { background: var(--spot-soft); }
.rk-final-rank { width: 4.5em; color: var(--spot-strong); font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.rk-final-rank small { display: block; color: var(--text-3); font-family: var(--font-ui); font-size: 10px; font-weight: 600; }
.rk-final-score { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--text-2); }
.rk-final-award { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--spot); }
.rk-final-note { margin: 0; text-align: center; color: var(--text-3); font-size: var(--fs-xs); }

/* Keyboard focus, everywhere in the desk */
.rw-pick:focus-visible, .rw-stake:focus-visible, .rw-back:focus-visible, .rw-actions .btn:focus-visible {
  outline: 3px solid var(--signal); outline-offset: 3px;
}
.rw-pick:disabled, .rw-stake:disabled { opacity: .5; cursor: not-allowed; }

/* =====================================================================
   Motion: one entrance per moment, short; nothing blocks a control.
   ===================================================================== */
@media (prefers-reduced-motion: no-preference) {
  body:not(.reduce-motion) .rk-opening { animation: rkCard var(--dur-stage) var(--ease-out); }
  body:not(.reduce-motion) .rk-show-title { animation: rkTitle 900ms var(--ease-pop) 80ms backwards; }
  body:not(.reduce-motion) .rk-rules li { animation: rkUp var(--dur-slow) var(--ease-out) backwards; }
  body:not(.reduce-motion) .rk-rules li:nth-child(1) { animation-delay: 700ms; }
  body:not(.reduce-motion) .rk-rules li:nth-child(2) { animation-delay: 900ms; }
  body:not(.reduce-motion) .rk-rules li:nth-child(3) { animation-delay: 1100ms; }
  body:not(.reduce-motion) .rk-turn { animation: rkCard var(--dur-slow) var(--ease-out); }
  body:not(.reduce-motion) .rk-turn-name span { animation: rkWipe 520ms var(--ease-out) 120ms backwards; }
  body:not(.reduce-motion) .rk-turn-name span::after { animation: rkBar 600ms var(--ease-out) 380ms backwards; }
  body:not(.reduce-motion) .rk-turn-role { animation: rkUp var(--dur-slow) var(--ease-out) 650ms backwards; }
  body:not(.reduce-motion) .rk-stamp { animation: rkStamp 360ms var(--ease-pop); }
  body:not(.reduce-motion) .rk-tag { animation: rkDown var(--dur-base) var(--ease-out); }
  body:not(.reduce-motion) .rk-verdict { animation: rkStamp 420ms var(--ease-pop); }
  body:not(.reduce-motion) .rk-desk.rk-enter > * { animation: rkUp var(--dur-base) var(--ease-out); }
  body:not(.reduce-motion) .rk-desk:not(.rk-enter) .rw-body { animation: rkStep var(--dur-base) var(--ease-out); }
  body:not(.reduce-motion) .rw-pick, body:not(.reduce-motion) .rw-stake { animation: rkUp var(--dur-base) var(--ease-out) backwards; }
  body:not(.reduce-motion) .rw-pick:nth-child(2) { animation-delay: 50ms; }
  body:not(.reduce-motion) .rw-stake:nth-child(2) { animation-delay: 30ms; }
  body:not(.reduce-motion) .rw-stake:nth-child(3) { animation-delay: 60ms; }
  body:not(.reduce-motion) .rw-stake:nth-child(4) { animation-delay: 90ms; }
  body:not(.reduce-motion) .is-pressed { animation: rkPress 200ms var(--ease-out); }
  body:not(.reduce-motion) .rk-seal { animation: rkSeal 520ms var(--ease-pop); }
  body:not(.reduce-motion) .rk-reveal:not(.is-sealed) .rk-bet { animation: rkFlip 420ms var(--ease-pop) calc(var(--i) * 140ms) backwards; }
  body:not(.reduce-motion) .rk-delta:not(.is-hidden) .rk-delta-value { animation: rkPop 360ms var(--ease-pop) calc(var(--i, 0) * 90ms) backwards; }
  body:not(.reduce-motion) .rk-board li { animation: rkUp var(--dur-slow) var(--ease-out) backwards; }
  body:not(.reduce-motion) .rk-final-table tbody tr { animation: rkUp var(--dur-slow) var(--ease-out) backwards; }
  body:not(.reduce-motion) .rk-final-table tbody tr:nth-child(2) { animation-delay: 120ms; }
  body:not(.reduce-motion) .rk-final-table tbody tr:nth-child(3) { animation-delay: 240ms; }
  body:not(.reduce-motion) .rk-final-table tbody tr:nth-child(n+4) { animation-delay: 360ms; }
}
@keyframes rkCard { from { opacity: 0; transform: translateY(-14px); } }
@keyframes rkTitle { from { opacity: 0; transform: scale(1.18); letter-spacing: .08em; } }
@keyframes rkUp { from { opacity: 0; transform: translateY(10px); } }
@keyframes rkDown { from { opacity: 0; transform: translateY(-8px); } }
@keyframes rkStep { from { opacity: 0; transform: translateX(22px); } }
@keyframes rkWipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rkBar { from { transform: scaleX(0); } }
@keyframes rkStamp { from { opacity: 0; transform: scale(1.12); } }
@keyframes rkPress { 50% { transform: scale(1.04); } }
@keyframes rkSeal { from { opacity: 0; transform: scale(.4) rotate(-20deg); } }
@keyframes rkFlip { from { opacity: 0; transform: perspective(500px) rotateX(-80deg); } }
@keyframes rkPop { from { opacity: 0; transform: scale(.6); } }

/* =====================================================================
   Phones, portrait: question, then the action, then the stage.
   The stage shrinks while a decision is on screen.
   ===================================================================== */
@media (orientation: portrait), (max-width: 899px) and (min-height: 541px) {
  body.game-active.te-la-juegas .broadcast {
    grid-template-rows: auto auto minmax(140px, 1fr) auto auto;
    grid-template-areas: "hud" "q" "stage" "desk" "ans";
  }
  body.game-active.te-la-juegas[data-risk-phase="betting"] .broadcast,
  body.game-active.te-la-juegas[data-risk-phase="answering"] .broadcast { grid-template-rows: auto auto minmax(110px, 1fr) auto auto; }
}
@media (max-width: 599px) {
  .rw { gap: 10px; padding: 10px 10px 12px; }
  .rw-steps li { padding: 3px; font-size: 0; gap: 0; }
  .rw-steps li.is-current { padding-right: 10px; font-size: var(--fs-sm); gap: 6px; }
  .rw-picks { gap: 8px; }
  .rw-pick { min-height: 112px; gap: 8px; }
  .rw-pick-icon { width: 50px; height: 50px; font-size: 1.6rem; }
  .rw-ladder { gap: 6px; }
  .rw-stake { min-height: 96px; padding: 10px 4px 12px; }
  .rw-meter i { width: 9px; }
  .rw-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); }
  .rw-confirm { font-size: 1.15rem; }
  .rk-rules { display: grid; justify-items: center; }
  .rk-rules li { font-size: var(--fs-xs); }
  .rk-delta { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 4ch; gap: 6px; }
  .rk-delta-value { font-size: 1.4rem; }
  .rk-final-table th { font-size: 10px; padding: 0 4px; }
  .rk-final-table td { padding: 6px 4px; }
  .hud-category.is-role { font-size: .85rem; }
  .hud-role-who { display: none; }
}

/* =====================================================================
   Phones, landscape: stage left, everything to read or do on the right.
   ===================================================================== */
@media (orientation: landscape) and (max-height: 540px) {
  body.game-active.te-la-juegas .broadcast {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    grid-template-rows: auto auto auto minmax(0, 1fr);
    grid-template-areas:
      "hud hud"
      "stage q"
      "stage desk"
      "stage ans";
  }
  body.game-active.te-la-juegas .rk-desk { width: 100%; }
  body.game-active.te-la-juegas .rk-marquee { padding: 6px 0 0; overflow: hidden; }
  .rk-marquee > * { max-width: 100%; min-width: 0; }
  .rk-verdict { gap: 2px 12px; padding: 8px 12px; }
  .rk-verdict-answer { font-size: .9rem; overflow-wrap: anywhere; }
  /* No room for the four options and the points: the verdict already
     names the right answer. */
  body.game-active.te-la-juegas[data-risk-phase="resolution"] .answer-overlay { display: none; }
  body.te-la-juegas .answer-opt { min-height: 46px; }
  .rk-show-title { font-size: 2.6rem; }
  .rk-lede { font-size: .95rem; }
  .rk-rules { display: none; }
  .rk-turn-name span { font-size: 2.8rem; }
  .rk-turn-name small { font-size: 1.1rem; }
  .rk-turn-role { font-size: .85rem; }
  .rk-opening, .rk-turn, .rk-verdict, .rk-stamp { padding: 8px 14px; gap: 4px; }
  .rk-verdict-title, .rk-stamp strong { font-size: 1.8rem; }
  .rw { gap: 6px; padding: 6px 10px 8px; }
  .rw-body { gap: 6px; }
  .rw-q { font-size: 1.2rem; }
  .rw-steps li { padding: 2px; font-size: 0; gap: 0; }
  .rw-steps li.is-current { padding-right: 8px; font-size: var(--fs-xs); gap: 4px; }
  .rw-pick { min-height: 70px; grid-auto-flow: column; align-items: center; justify-content: center; gap: 10px; padding: 8px; }
  .rw-pick-icon { width: 38px; height: 38px; font-size: 1.2rem; border-width: 2px; }
  .rw-pick-word { font-size: 1.4rem; }
  .rw-stake { min-height: 62px; padding: 4px; }
  .rw-stake strong { font-size: 1.6rem; }
  .rw-stake small { display: none; }
  .rw-meter { margin-top: 4px; }
  .rw-summary { padding: 6px; gap: 2px; }
  .rw-sum-pick { font-size: 1.3rem; }
  .rw-sum-stake { font-size: 1rem; }
  .rw-actions .btn { min-height: 46px; }
  .rk-ring { width: 40px; height: 40px; }
  .rk-ring b { font-size: 1.1rem; }
  .rk-wait { gap: 4px; padding: 8px 10px; }
  .rk-wait .rk-ring { width: 46px; height: 46px; }
  .rk-seal { font-size: 2rem; }
  .rk-wait-title { font-size: 1.3rem; }
  .rk-cue { padding: 8px 12px 12px; }
  .rk-bet { padding: 4px 10px; }
  .rk-bet-amount { font-size: 1.2rem; }
  .rk-delta { padding: 2px 6px; }
  .rk-delta-value { font-size: 1.25rem; }
  .rk-final { padding: 6px 10px; gap: 4px; }
  .rk-final-title { font-size: 1.3rem; }
  .rk-final-table td { padding: 4px 6px; }
}
