/* ---------------------------------------------------------------------------
   说唱对决 · Rap Battle — HANDS-ON v2.3 "one universe"   prom/css/drill-rap2.css
   Cycle-3 (all four cycle-2 judges, ranked): the painted cutouts and the
   vector player now share ONE edge language (die-cut ink outline + feathered
   key + warm rim, #r2Diecut in rap2.js) while the player picks up paint
   (gradients, AO, grain); the land beat slams center-stage instead of
   whispering from the header; VS and the loss are staged frames, not voids;
   the crowd takes sides with the meter.
   Layout contract (drills/rap2.js):
     .rap2-select — full-bleed alley wall: marquee, four wheat-pasted battle
                    posters, murmur silhouettes along the bottom of the frame
     .rap2-battle — the WHOLE SCREEN is the venue now. The stage layer sits
                    absolute behind everything (sky / truss / marquee /
                    backline / floor with the horizon at 34% / both fighters /
                    a live crowd at the lens); the hud (goal + crowd meter)
                    and the court float OVER it. Cycle-1 judges: "the battle
                    screen is a form, not a stage" — the hard seam at ~28%,
                    the cream cards, the void margins. All gone:
       .r2-lyric   the opponent's couplet SPLASHED ACROSS THE SKY in giant
                   outlined type (karaoke-lit), a soft scrim behind it so
                   28px+ hanzi survive the busiest stage
       .r2-chip    comeback cards ON the stage apron — lacquer + gold leaf in
                   the prom look, night glass + neon edge in mvc
       .r2-say     mic = hero, hear = secondary, tap-in = tertiary but alive
       .r2-vsplash the VS intro — split wash, slam-in fighters, both standing
                   on a real floor with the crowd in front
       .r2-end     win / loss are SCENES: the stage stays visible behind a
                   vignette; the champ stands huge over a flare while the
                   crowd goes wild (win) or the room goes cold (loss)
   Couplets read as ONE row: the two .r2-bar halves sit side by side (own
   pinyin under own hanzi); they wrap only when a pair truly can't fit.
   Two looks while Lau picks a direction, switched by [data-look]:
     "prom" (default) — ink / lacquer / lantern-gold night stage
     "mvc"            — saturated neon arena, EQ-tower skyline GROUNDED at the
                        horizon (cycle-1: "towers float in air" — fixed)
   Stage vars written by JS: --m (0..1 crowd share, yours), --lean (-1..1),
   data-crowd (yours/split/theirs — which half of the room has its arms up).
   The reaction lane: .mg-burst slams center-stage over the sky band, above
   the lyric and clear of the meter (cycle-2: it collided with the 你 endcap
   and whispered) — never over the couplet being read (cycle-1 bug).
   --------------------------------------------------------------------------- */

.minigame.rap2 {
  --r2-ink: var(--dk-ink, #241335);
  --r2-paper: var(--dk-plate, #f4ead2);
  --r2-accent: #d1591a;          /* battle vermillion */
  --r2-gold: #e8b64c;            /* lantern gold — the karaoke light */
  --r2-oppside: #5a132e;         /* their crowd share: lacquer red-black.
                                    cycle-1: red-vs-gold parsed slowly —
                                    now the split is VALUE, not hue */
  --r2-night1: #150a26;          /* stage sky, deep */
  --r2-night2: #2c1548;          /* stage sky, glow */
  --r2-neonA: #ff9c4a;
  --r2-card: #301425;            /* lacquer card, on-stage chrome */
  --r2-cardup: #3e1a2e;          /* its lit top edge */
  --r2-cardink: #f7ead2;         /* text on lacquer */
  --r2-cardline: #c8963e;        /* gold-leaf edging */
  --dk-accent: var(--r2-accent);
  justify-content: flex-start;
  padding: 0;
  gap: 0;
  overflow: hidden;              /* the venue doesn't scroll; the court does */
}
.minigame.rap2[data-look="mvc"] {
  --r2-accent: #ff2e88;
  --r2-gold: #3ee6ff;
  --r2-oppside: #571089;
  --r2-night1: #12002e;
  --r2-night2: #3c0a6e;
  --r2-neonA: #ff2e88;
  --r2-card: #1b0836;
  --r2-cardup: #250c47;
  --r2-cardink: #eef4ff;
  --r2-cardline: #b62d78;
}

/* ------------------------------------------------------------ shared: karaoke
   The line being voiced lights word by word off the real audio position.
   .kara = the word under the needle (hot), .kara-done = already sung. Base
   text is white-on-outline everywhere the lyric now lives, so the ramp is
   white -> warm white (done) -> full gold + glow (hot). */
.rap2 .r2-bar .w.kara {
  color: var(--r2-gold);
  text-shadow: 0 0 10px color-mix(in srgb, var(--r2-gold) 80%, transparent),
               0 0 26px color-mix(in srgb, var(--r2-gold) 50%, transparent),
               2px 2px 0 var(--r2-ink), -2px 2px 0 var(--r2-ink),
               2px -2px 0 var(--r2-ink), -2px -2px 0 var(--r2-ink);
}
.rap2 .r2-bar .w.kara-done { color: color-mix(in srgb, var(--r2-gold) 72%, #fff); }
.rap2 .r2-bar.r2-sung .han { opacity: .95; }

/* ------------------------------------------- shared: the couplet as ONE row
   Both bar halves are inline-blocks — hanzi A + hanzi B on a single line,
   each with its pinyin directly beneath. The caesura rule between them spans
   hanzi + pinyin so the pair still reads as two lines of a couplet. They wrap
   only when the pair genuinely can't fit (long bars at 390px) — acceptable. */
.rap2 .r2-bar { display: inline-block; vertical-align: top; }
.rap2 .r2-bar[data-line="b"] {
  margin-left: 8px; padding-left: 14px;
  border-left: 2px solid rgba(255, 255, 255, .32);
}

/* -------------------------------------------------- shared: die-cut sprites
   Every painted cutout in the drill goes through the sticker press (DEKEY_SVG
   in rap2.js: key + feathered edge + ink outline + warm rim) and gets a
   grounding shadow — the cutouts now speak the vector player's edge language,
   which is cycle-3's answer to "two art universes on one stage". */
.rap2 img.sprite {
  filter: url(#r2Diecut) drop-shadow(0 8px 12px rgba(0, 0, 0, .55));
}
/* the meter coins clip to a circle — an outline inside a 48px coin is mud,
   so they keep the plain alpha knife */
.rap2 .r2-meter-face img.sprite { filter: url(#r2Dekey); }
/* the source art's crop borders (Leap's sleeve ends at the PNG's right edge,
   every bust ends at its bottom) must never print as a razor on stage: the
   img's last inches feather into the dark on both axes. The die-cut outline
   melts with the mask, which reads as stage-light falloff, not a crop. */
.r2-opp img {
  -webkit-mask-image: linear-gradient(to right, #000 86%, transparent 99.5%),
                      linear-gradient(to bottom, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, #000 86%, transparent 99.5%),
              linear-gradient(to bottom, #000 90%, transparent 100%);
  mask-composite: intersect;
  /* the lantern light lands ON the paint (c6 art judge: "stage lighting
     doesn't touch the cutouts") — a warm grade pulls every source palette
     toward the venue's amber, composed after the die-cut filter */
  filter: sepia(0.14) hue-rotate(-6deg) saturate(1.06) brightness(1.02);
}
/* Leap's PNG guillotines his basketball at the source's TOP border and runs
   tail + sleeve off the right — beside the comeback cards those printed as a
   half-disc over the apron and 30%-alpha smears in the card gaps (cycle-4
   forensics). Desktop: a soft pocket swallows the ball's corner and the right
   side ends IN darkness at the card column's edge (x≈74% of the img) — reads
   as stage-right shadow, not a crop. Keyed off data-opp on the battle root,
   the same hook the select posters use. Coordinates are img-box %. */
.rap2-battle[data-opp="leap"] .r2-opp img {
  -webkit-mask-image: linear-gradient(to right, #000 71%, transparent 74%),
                      linear-gradient(to bottom, #000 90%, transparent 100%),
                      radial-gradient(15% 9% at 67% 2%, transparent 54%, #000 98%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, #000 71%, transparent 74%),
              linear-gradient(to bottom, #000 90%, transparent 100%),
              radial-gradient(15% 9% at 67% 2%, transparent 54%, #000 98%);
  mask-composite: intersect;
}

/* ------------------------------------------------------------- the call-out */
.rap2-select { justify-content: flex-start; }
.r2-selscene {
  position: relative; width: 100%; height: 100%; flex: 1 1 auto;
  overflow-y: auto; overflow-x: hidden;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 16px 128px;
}
/* the wall the posters are pasted on — planked lacquer under lantern pools
   (prom) or graffiti-washed night brick under neon (mvc) */
.r2-selwall {
  position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 30% at 50% 0%, color-mix(in srgb, var(--r2-neonA) 26%, transparent), transparent 74%),
    radial-gradient(40% 26% at 8% 30%, color-mix(in srgb, var(--r2-gold) 14%, transparent), transparent 70%),
    radial-gradient(40% 26% at 94% 34%, color-mix(in srgb, var(--r2-accent) 12%, transparent), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 88px, rgba(0, 0, 0, .35) 88px 91px),
    linear-gradient(to bottom, #2a1226 0%, #1a0c1e 60%, #120818 100%);
}
.rap2[data-look="mvc"] .r2-selwall {
  background:
    radial-gradient(60% 30% at 50% 0%, color-mix(in srgb, var(--r2-neonA) 30%, transparent), transparent 74%),
    radial-gradient(40% 26% at 6% 32%, color-mix(in srgb, var(--r2-gold) 16%, transparent), transparent 70%),
    radial-gradient(40% 26% at 95% 36%, color-mix(in srgb, #b13ce8 22%, transparent), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(0, 0, 0, .4) 34px 37px),
    repeating-linear-gradient(90deg, transparent 0 72px, rgba(0, 0, 0, .28) 72px 75px),
    linear-gradient(to bottom, #240a44 0%, #170630 60%, #0e021f 100%);
}
.r2-neon {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 26px 12px;
  border: 3px solid var(--r2-neonA); border-radius: 16px;
  background: color-mix(in srgb, var(--r2-night1) 88%, var(--r2-neonA));
  box-shadow: 0 0 18px color-mix(in srgb, var(--r2-neonA) 45%, transparent),
              inset 0 0 22px color-mix(in srgb, var(--r2-neonA) 25%, transparent);
}
.r2-neon .han {
  font-size: clamp(26px, 5vw, 40px); font-weight: 800; letter-spacing: .12em;
  color: #fff;
  text-shadow: 0 0 8px var(--r2-neonA), 0 0 22px var(--r2-neonA), 0 0 44px color-mix(in srgb, var(--r2-neonA) 60%, transparent);
}
.r2-neon > span {
  font-size: var(--dk-caption, 14px); letter-spacing: .5em; text-indent: .5em;
  color: color-mix(in srgb, #fff 80%, var(--r2-neonA));
}
.r2-selsub {
  position: relative; margin: 0; font-size: var(--dk-label, 16px); text-align: center;
  color: #f3e8d8; text-shadow: 0 2px 6px rgba(0, 0, 0, .7);
}
.r2-selsub .han { font-weight: 700; margin-right: 6px; }
.r2-select {
  position: relative;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px); width: min(100%, 1180px); padding: 10px 4px 4px;
  /* the posters hang mid-wall, not huddled under the marquee — the dead
     bottom half was a cycle-1 complaint */
  flex: 1 1 auto; align-content: center;
}
/* battle posters, wheat-pasted: printed ray burst behind the art, a strip of
   tape up top, each sheet hung a degree or two off true */
.r2-pick {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 10px 12px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(255, 255, 255, .16), transparent 60%),
    var(--r2-paper);
  color: var(--r2-ink);
  border: 3px solid var(--r2-ink); border-radius: 6px;
  cursor: pointer; font: inherit;
  box-shadow: 0 10px 18px rgba(0, 0, 0, .5);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.r2-pick:nth-child(1) { transform: rotate(-1.7deg); }
.r2-pick:nth-child(2) { transform: rotate(1.3deg) translateY(6px); }
.r2-pick:nth-child(3) { transform: rotate(-1deg) translateY(2px); }
.r2-pick:nth-child(4) { transform: rotate(1.8deg) translateY(7px); }
.r2-pick::before {
  content: ""; position: absolute; top: -9px; left: 50%; width: 64px; height: 16px;
  transform: translateX(-50%) rotate(-2deg);
  background: color-mix(in srgb, var(--r2-gold) 55%, #fff); opacity: .8;
  border: 1px solid rgba(0, 0, 0, .25); border-radius: 2px;
}
.r2-pick:hover, .r2-pick:focus-visible {
  outline: none; border-color: var(--r2-accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 24px rgba(0, 0, 0, .55),
              0 0 22px color-mix(in srgb, var(--r2-accent) 40%, transparent);
}
/* the printed art window: a ray burst + floor band behind the figure, clipped
   like a real poster plate — a painted rectangle in here reads as the PRINT,
   not a crop bug */
.r2-pick-art {
  position: relative; align-self: stretch; height: clamp(130px, 26vh, 250px);
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden; border: 2.5px solid var(--r2-ink); border-radius: 4px;
  background:
    linear-gradient(to top, color-mix(in srgb, var(--r2-ink) 78%, var(--r2-accent)) 0 14%, transparent 14%),
    repeating-conic-gradient(from 8deg at 50% 46%,
      color-mix(in srgb, var(--r2-accent) 26%, var(--r2-paper)) 0 11deg,
      color-mix(in srgb, var(--r2-accent) 9%, var(--r2-paper)) 11deg 26deg);
}
.r2-pick-art :is(img, svg, .pcard) { max-height: 96%; height: 96%; width: auto; }
/* Rocket's print exposes its source margins at 2x — dither and the artist's
   sigline block lower-left. Can't repaint the PNG; CAN crop the plate into
   his face and torso and let the frame eat the rest. (His flame wheels stay:
   die-cut and outlined, they read as his gear, not debris.) The stray print
   blocks that survive ANY crop — a pale 遇! slug + its registration square
   left of his head, and a dither cluster low-left — sit on transparent
   ground clear of the figure, so the clip notches them off the left edge.
   Coordinates are img-box %, pixel-audited against rocket.png (678x900). */
.r2-pick[data-opp="rocket"] .r2-pick-art img {
  max-height: none; height: 168%; align-self: flex-start; margin-top: -7%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%,
    0 70%, 22.5% 70%, 22.5% 63.5%, 17% 63.5%, 17% 59%, 0 59%,
    0 27%, 28.5% 27%, 28.5% 14.5%, 0 14.5%);
}
/* Leap's poster: the source guillotines his basketball at the PNG's top —
   crop the plate up past the slice so the tail runs out of frame instead of
   ending in a half-disc (the frame's crop is the PRINT's, so it reads) */
.r2-pick[data-opp="leap"] .r2-pick-art img {
  max-height: none; height: 116%; align-self: flex-start; margin-top: -9%;
}
.r2-pick-name { font-size: var(--dk-read, 20px); font-weight: 800; margin-top: 4px; }
.r2-pick-en { font-size: var(--dk-caption, 14px); opacity: .7; }
/* the taunt reads at poster distance now — cycle-4 ux: 12-14px bilingual
   crammed to the pill edge, wrapping mid-phrase. Bigger type, balanced
   wraps, and the hanzi never breaks internally. */
.r2-pick-taunt {
  margin-top: 6px; font-size: 15px; line-height: 1.35; text-align: center;
  padding: 5px 14px 6px; border-radius: 14px;
  text-wrap: balance;
  background: color-mix(in srgb, var(--r2-accent) 14%, var(--r2-paper));
  border: 2px solid color-mix(in srgb, var(--r2-accent) 55%, var(--r2-ink));
}
.r2-pick-taunt .han { display: inline-block; font-weight: 700; margin-right: 4px; }
/* the murmur: front-row silhouettes between the lens and the wall */
.r2-selcrowd {
  position: fixed; left: 0; right: 0; bottom: 0; height: 104px;
  pointer-events: none; z-index: 6;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 40%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 40%);
}
.r2-selcrowd svg { width: 100%; height: 100%; }

/* --------------------------------------------------------------- the battle */
.rap2-battle { display: flex; flex-direction: column; }
.rap2-battle > .mg-head { display: none; } /* the marquee IS the title */

/* ---- the stage: the whole screen ---- */
.rap2-battle > .r2-hud, .rap2-battle > .r2-court {
  position: relative; z-index: 5; width: 100%; align-self: stretch;
}
.r2-stage {
  --lean: 0;
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
  background: var(--r2-night1);
  isolation: isolate;
}
.r2-sky {
  position: absolute; inset: 0;
  background:
    radial-gradient(26% 20% at 80% 12%, color-mix(in srgb, var(--r2-gold) 30%, transparent), transparent 70%),
    radial-gradient(140% 80% at 50% 104%, color-mix(in srgb, var(--r2-night2) 80%, var(--r2-neonA)) 0%, var(--r2-night2) 38%, var(--r2-night1) 82%);
}
/* (the paper moon is gone — cycle-4 art: a bare orb over the wall with no
   fixture sourcing it; the lantern row's soft wash in the sky layer above is
   all the landmark the corner needs) */
.rap2[data-look="mvc"] .r2-sky {
  background:
    repeating-linear-gradient(0deg, transparent 0 26px, color-mix(in srgb, var(--r2-gold) 12%, transparent) 26px 27px),
    repeating-linear-gradient(90deg, transparent 0 26px, color-mix(in srgb, var(--r2-gold) 9%, transparent) 26px 27px),
    radial-gradient(90% 46% at 50% 70%, #6e1596 0%, var(--r2-night2) 48%, var(--r2-night1) 84%);
}
/* the backline carries each look's identity behind the fighters:
   prom — a strung lantern row high over the stage
   mvc  — the EQ-tower SKYLINE, planted on the horizon (cycle-1: "towers
          float in air with no structure" — they're buildings now) */
.r2-backline {
  position: absolute; left: 5%; right: 5%; top: 6%; height: 13%;
  display: flex; justify-content: space-between; align-items: flex-start;
  z-index: 1; pointer-events: none;
}
.r2-backline i {
  position: relative; width: clamp(15px, 2vw, 24px); aspect-ratio: .82;
  border-radius: 46% / 50%;
  background: radial-gradient(58% 52% at 50% 40%, #ffe9b0 0%, var(--r2-gold) 52%, #a34a1c 100%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--r2-gold) 55%, transparent);
  transform-origin: 50% -14px;
  animation: r2-lantern 5.2s ease-in-out infinite;
}
.r2-backline i::before {
  content: ""; position: absolute; left: 50%; bottom: 100%; width: 2px; height: 13px;
  background: rgba(0, 0, 0, .55); transform: translateX(-1px);
}
.r2-backline i::after {
  content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 7px;
  background: color-mix(in srgb, var(--r2-gold) 70%, #000); transform: translateX(-1px);
}
.r2-backline i:nth-child(3n) {
  background: radial-gradient(58% 52% at 50% 40%, #ffd2a8 0%, var(--r2-accent) 55%, #7c2412 100%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--r2-accent) 55%, transparent);
}
.r2-backline i:nth-child(2n) { margin-top: 16px; }
.r2-backline i:nth-child(4n+1) { margin-top: 8px; }
.r2-backline i:nth-child(2n) { animation-delay: 1.3s; }
.r2-backline i:nth-child(3n) { animation-delay: 2.6s; }
.r2-backline i:nth-child(5n) { animation-delay: 3.7s; }
@keyframes r2-lantern { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
.rap2[data-look="mvc"] .r2-backline {
  left: 1%; right: 1%; top: auto; bottom: 66%; height: 30%;
  align-items: flex-end;
}
.rap2[data-look="mvc"] .r2-backline i {
  width: clamp(24px, 4.2vw, 58px); aspect-ratio: auto; margin: 0;
  border-radius: 3px 3px 0 0; border: 2px solid rgba(6, 0, 20, .6); border-bottom: 0;
  background:
    repeating-linear-gradient(to top, rgba(6, 0, 20, .55) 0 4px, transparent 4px 9px),
    repeating-linear-gradient(to right, rgba(6, 0, 20, .3) 0 5px, transparent 5px 9px),
    linear-gradient(to top, #29f07a 0%, #ffd23e 46%, #ff4d6b 80%, #b3123f 100%);
  box-shadow: 0 0 14px rgba(20, 6, 40, .8);
  transform-origin: 50% 100%;
  animation: r2-eq 1.4s steps(4, end) infinite alternate;
}
.rap2[data-look="mvc"] .r2-backline i::before, .rap2[data-look="mvc"] .r2-backline i::after { display: none; }
.rap2[data-look="mvc"] .r2-backline i:nth-child(1) { height: 58%; }
.rap2[data-look="mvc"] .r2-backline i:nth-child(2) { height: 82%; animation-delay: .22s; }
.rap2[data-look="mvc"] .r2-backline i:nth-child(3) { height: 66%; animation-delay: .5s; }
.rap2[data-look="mvc"] .r2-backline i:nth-child(4) { height: 94%; animation-delay: .12s; }
.rap2[data-look="mvc"] .r2-backline i:nth-child(5) { height: 74%; animation-delay: .64s; }
.rap2[data-look="mvc"] .r2-backline i:nth-child(6) { height: 88%; animation-delay: .34s; }
.rap2[data-look="mvc"] .r2-backline i:nth-child(7) { height: 60%; animation-delay: .8s; }
.rap2[data-look="mvc"] .r2-backline i:nth-child(8) { height: 97%; animation-delay: .06s; }
.rap2[data-look="mvc"] .r2-backline i:nth-child(9) { height: 70%; animation-delay: .48s; }
.rap2[data-look="mvc"] .r2-backline i:nth-child(10) { height: 84%; animation-delay: .28s; }
/* buildings breathe with the beat; they do not jump — they're architecture */
@keyframes r2-eq { from { transform: scaleY(.9); } to { transform: scaleY(1); } }
/* light truss + four par cans */
.r2-truss {
  position: absolute; top: 0; left: 3%; right: 3%; height: 10px;
  border-bottom: 3px solid #000;
  background: repeating-linear-gradient(90deg, #0a0514 0 18px, #1c1030 18px 36px);
  display: flex; justify-content: space-evenly; z-index: 3;
}
.r2-truss i {
  position: relative; top: 9px; width: 16px; height: 13px;
  background: #0a0514; border: 2px solid #000; border-radius: 3px 3px 6px 6px;
}
.r2-truss i::after {
  content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--r2-gold);
  box-shadow: 0 0 10px var(--r2-gold), 0 0 22px color-mix(in srgb, var(--r2-gold) 65%, transparent);
  animation: r2-parcan 2.6s ease-in-out infinite;
}
.r2-truss i:nth-child(2)::after { animation-delay: .6s; background: var(--r2-accent); box-shadow: 0 0 10px var(--r2-accent), 0 0 22px color-mix(in srgb, var(--r2-accent) 65%, transparent); }
.r2-truss i:nth-child(3)::after { animation-delay: 1.2s; }
.r2-truss i:nth-child(4)::after { animation-delay: 1.8s; background: var(--r2-accent); box-shadow: 0 0 10px var(--r2-accent), 0 0 22px color-mix(in srgb, var(--r2-accent) 65%, transparent); }
@keyframes r2-parcan { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
/* spotlight cones — full-height now, swaying, favouring whoever the crowd
   favours */
.r2-spot {
  position: absolute; top: -4%; width: 44%; height: 108%;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--r2-gold) 34%, transparent), transparent 76%);
  clip-path: polygon(46% 0, 54% 0, 98% 100%, 2% 100%);
  mix-blend-mode: screen; pointer-events: none; z-index: 2;
  transform-origin: 50% 0;
}
.r2-spot-l { left: -1%; animation: r2-swayL 7s ease-in-out infinite; opacity: calc(.6 - var(--lean) * .28); }
.r2-spot-r { right: -1%; animation: r2-swayR 7s ease-in-out infinite; opacity: calc(.6 + var(--lean) * .28); }
@keyframes r2-swayL { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(8deg); } }
@keyframes r2-swayR { 0%, 100% { transform: rotate(6deg); } 50% { transform: rotate(-8deg); } }
.r2-neon-stage {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  padding: 4px 18px; border-width: 2.5px; z-index: 6;
  animation: r2-flicker 6s steps(1) infinite;
}
.r2-neon-stage .han { font-size: clamp(16px, 2.4vw, 22px); }
@keyframes r2-flicker { 0%, 91%, 93.5%, 100% { opacity: 1; } 92%, 93% { opacity: .55; } }

/* the floor: horizon at 34%, boards running to the lens — the court sits ON
   this apron, which is what kills the form-on-void read */
.r2-floor {
  position: absolute; left: 0; right: 0; top: 34%; bottom: 0;
  z-index: 1;
  border-top: 3px solid rgba(0, 0, 0, .55);
  background:
    radial-gradient(58% 52% at 50% 30%, color-mix(in srgb, var(--r2-gold) 13%, transparent), transparent 74%),
    repeating-linear-gradient(90deg, transparent 0 84px, rgba(0, 0, 0, .26) 84px 87px),
    linear-gradient(to bottom, color-mix(in srgb, var(--r2-ink) 62%, #6b3f1d), color-mix(in srgb, var(--r2-ink) 86%, #000));
  box-shadow: 0 -1px 0 color-mix(in srgb, var(--r2-gold) 35%, transparent);
}
/* light pools where the fighters stand */
.r2-floor::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(26% 34% at 13% 12%, color-mix(in srgb, var(--r2-gold) 26%, transparent), transparent 70%),
    radial-gradient(24% 30% at 87% 30%, color-mix(in srgb, var(--r2-gold) 22%, transparent), transparent 70%);
}
.rap2[data-look="mvc"] .r2-floor {
  background:
    radial-gradient(58% 52% at 50% 30%, color-mix(in srgb, var(--r2-gold) 14%, transparent), transparent 74%),
    repeating-linear-gradient(90deg, transparent 0 84px, rgba(62, 230, 255, .14) 84px 86px),
    repeating-linear-gradient(0deg, transparent 0 64px, rgba(62, 230, 255, .08) 64px 66px),
    linear-gradient(to bottom, #1b0640, #0c0122);
  box-shadow: 0 -2px 14px color-mix(in srgb, var(--r2-accent) 45%, transparent);
}
/* cycle-4 forensics: the wall met the sky in a full-width razor at y≈305,
   slicing the lyric block and the win sunburst. Prom's junction is a LIGHT
   transition now — the boards rise out of the sky's own dark and sink into
   shadow again under the crowd, which also drowns the plank lines that read
   as crowd "tiling seams" through the win frame. mvc keeps its neon cut. */
.rap2[data-look="prom"] .r2-floor {
  border-top: 0;
  box-shadow: none;
  background:
    linear-gradient(to bottom, var(--r2-night1), color-mix(in srgb, var(--r2-night1) 55%, transparent) 9%, transparent 24%),
    linear-gradient(to bottom, transparent 58%, color-mix(in srgb, var(--r2-ink) 88%, #000) 96%),
    radial-gradient(58% 52% at 50% 30%, color-mix(in srgb, var(--r2-gold) 13%, transparent), transparent 74%),
    repeating-linear-gradient(90deg, transparent 0 84px, rgba(0, 0, 0, .26) 84px 87px),
    linear-gradient(to bottom, color-mix(in srgb, var(--r2-ink) 62%, #6b3f1d), color-mix(in srgb, var(--r2-ink) 86%, #000));
}

/* the crowd — the front rows between the lens and the stage, leaning toward
   whoever is winning and going wild on a landed bar */
.r2-crowd {
  position: absolute; left: 0; right: 0; bottom: 0; height: 15%;
  z-index: 4; pointer-events: none;
  transform: translateX(calc(var(--lean) * -1.5%));
  transition: transform .7s ease;
  /* NO fade mask here: cycle-4 forensics caught Leap's jacket reading through
     these heads — a front row OCCLUDES the stage, full stop; the band's top
     edge is the heads' own outline, which is what a real crowd looks like */
}
.r2-crowdart { width: 100%; height: 100%; }
/* backlit heads: each row a step darker toward the lens */
.r2-fan-head, .r2-fan-body { fill: #5b4383; }
.r2-fan-armL, .r2-fan-armR { stroke: #5b4383; stroke-width: 2; fill: none; stroke-linecap: round; opacity: 0; }
.r2-fan-armL, .r2-fan-armR { transform-box: fill-box; transform-origin: 50% 100%; }
.r2-fan-up .r2-fan-armR { opacity: .55; } /* a few arms stay up between bars — a room, not a lineup */
.r2-fan-phone { fill: #fff3d0; animation: r2-phone 2.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
.r2-fan-halo { fill: var(--r2-gold); opacity: .15; animation: r2-phone 2.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes r2-phone { 0%, 100% { opacity: .3; } 50% { opacity: .95; } }
.r2-crowdrow-mid .r2-fan-head, .r2-crowdrow-mid .r2-fan-body { fill: #3c2660; }
.r2-crowdrow-mid .r2-fan-armL, .r2-crowdrow-mid .r2-fan-armR { stroke: #3c2660; }
.r2-crowdrow-front .r2-fan-head, .r2-crowdrow-front .r2-fan-body { fill: #221139; }
.r2-crowdrow-front .r2-fan-armL, .r2-crowdrow-front .r2-fan-armR { stroke: #221139; }
.rap2[data-look="mvc"] .r2-fan-head, .rap2[data-look="mvc"] .r2-fan-body { fill: #8a5ad1; }
.rap2[data-look="mvc"] .r2-fan-armL, .rap2[data-look="mvc"] .r2-fan-armR { stroke: #8a5ad1; }
.rap2[data-look="mvc"] .r2-crowdrow-mid .r2-fan-head, .rap2[data-look="mvc"] .r2-crowdrow-mid .r2-fan-body { fill: #5c35a0; }
.rap2[data-look="mvc"] .r2-crowdrow-mid .r2-fan-armL, .rap2[data-look="mvc"] .r2-crowdrow-mid .r2-fan-armR { stroke: #5c35a0; }
.rap2[data-look="mvc"] .r2-crowdrow-front .r2-fan-head, .rap2[data-look="mvc"] .r2-crowdrow-front .r2-fan-body { fill: #2c1258; }
.rap2[data-look="mvc"] .r2-crowdrow-front .r2-fan-armL, .rap2[data-look="mvc"] .r2-crowdrow-front .r2-fan-armR { stroke: #2c1258; }
/* the haze the spotlights land in, so the crowd is lit from the stage */
.r2-crowd::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 130%;
  background: radial-gradient(90% 80% at 50% 100%, color-mix(in srgb, var(--r2-neonA) 20%, transparent), transparent 70%);
  pointer-events: none;
}
/* position rides the wrapper (.r2-fanpos, transform attr); the bob only ever
   animates the inner group — see the x=0 pileup scar in rap2.js crowdRowSVG */
.r2-fan { animation: r2-bob 1.32s ease-in-out infinite; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center bottom; }
@keyframes r2-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.8px); } }
.r2-crowd-hot .r2-fan { animation-duration: .5s; }
.r2-crowd-hot .r2-fan-armL, .r2-crowd-hot .r2-fan-armR { opacity: 1; animation: r2-wave .5s ease-in-out infinite alternate; }
.r2-crowd-hot .r2-fan-halo { opacity: .32; }
@keyframes r2-wave { from { transform: rotate(-6deg); } to { transform: rotate(8deg); } }

/* fighters — the opponent HUGE at stage left, bottom-cropped by the frame
   itself (the only crop that reads as cinematography, not a bug); you at
   mid-stage right, standing in your pool of light */
.r2-fighter { position: absolute; z-index: 3; display: flex; align-items: flex-end; }
.r2-opp { left: 0; bottom: -2%; height: 58%; transition: filter .3s ease, transform .3s ease; }
.r2-opp :is(img, svg:not(.r2-micstand)), .r2-opp .pcard { height: 100%; width: auto; }
.r2-opp .pcard { width: auto; }
.r2-you { right: 2.5%; bottom: 12%; height: 40%; }
/* grain first, shadow second: the turbulence tooth (helper svg in rap2.js)
   is the vector kid's half of the style bridge — .rap2 prefix so the end
   overlay's plain drop-shadow rule can't out-rank it */
.rap2 .r2-youart { height: 100%; width: auto; filter: url(#r2YouGrain) drop-shadow(0 8px 12px rgba(0, 0, 0, .5)); }
/* the YOU figure's palette — cloth and skin are top-lit GRADIENTS now (defs
   in the helper svg), with painted shade/sheen layers; the look's accents
   stay flat vars so both palettes keep owning cap and kicks */
.r2-you-jacket { fill: url(#r2YouJacket); }
.r2-you-panel { fill: url(#r2YouPanel); }
.r2-you-sleeve { stroke: url(#r2YouJacket); fill: none; }
.r2-you-pantleg { stroke: url(#r2YouPant); fill: none; }
.r2-you-hem { fill: #1d1136; }
.r2-you-skin { fill: url(#r2YouSkin); }
.r2-you-tee { fill: url(#r2YouTee); }
.r2-you-white { fill: #fff; }
.r2-you-ink { fill: #241335; }
.r2-you-cap, .r2-you-kick { fill: var(--r2-accent); }
.r2-you-capdark { fill: color-mix(in srgb, var(--r2-accent) 72%, #241335); }
.r2-you-sole { fill: #fff; }
.r2-you-chain { stroke: var(--r2-gold); fill: none; }
.r2-you-pendant { fill: var(--r2-gold); }
.r2-you-micball { fill: #d9d3e8; }
.r2-you-grille { fill: none; stroke: rgba(0, 0, 0, .35); stroke-width: 2; }
/* ambient occlusion + sheen + blush — the painted layers over the flats */
.r2-you-shade { fill: rgba(22, 11, 42, .26); }
.r2-you-sheen { fill: rgba(255, 244, 214, .16); }
.r2-you-blush { fill: rgba(226, 116, 80, .28); }
/* rim matches the cutouts' die-cut rim — one key light for both fighters */
.r2-you-rim { stroke: #ffd98a; fill: none; opacity: .7; }
/* the mic stand earned its keep on the old postage-stamp stage; at full-bleed
   scale it read as a stray rod floating over the apron cards */
.r2-micstand { display: none; }
/* whoever holds the floor glows; the other side dims a touch */
.r2-opp-active .r2-opp { filter: drop-shadow(0 0 20px color-mix(in srgb, var(--r2-gold) 55%, transparent)); transform: scale(1.015); }
.r2-opp-active .r2-you { opacity: .8; }
.r2-you-active .r2-you { filter: drop-shadow(0 0 18px color-mix(in srgb, var(--r2-gold) 65%, transparent)); }
.r2-you-active .r2-opp { opacity: .85; }

/* MVC-style nameplates at the fighters' feet — actually huge now; cycle-2's
   ux judge measured 你 in the crowd band at phone-print size */
.r2-nameplate {
  position: absolute; z-index: 6;
  font-style: italic; font-weight: 900; letter-spacing: .03em; line-height: 1;
  font-size: clamp(26px, 3.2vw, 40px); color: #fff;
  text-shadow:
    2px 2px 0 var(--r2-ink), -2px 2px 0 var(--r2-ink),
    2px -2px 0 var(--r2-ink), -2px -2px 0 var(--r2-ink),
    0 5px 12px rgba(0, 0, 0, .65);
  pointer-events: none;
}
.r2-nameplate-opp { left: 2%; bottom: 15%; }
.r2-nameplate-you { right: 2.5%; bottom: 7.5%; }

/* the opponent's shout bubble, beside their cutout. Hidden while they SPIT —
   the sky type is the shout now; barks return on the land beat */
.r2-shout {
  position: absolute; left: 1.5%; top: 45%; z-index: 7; max-width: 20%;
  background: var(--r2-paper); color: var(--r2-ink);
  border: 2.5px solid var(--r2-ink); border-radius: 12px;
  padding: 6px 12px; font-size: var(--dk-label, 16px);
}
.rap2-battle[data-phase="listen"] .r2-shout { display: none; }
.r2-shout::after {
  content: ""; position: absolute; left: 70%; top: 100%;
  border: 9px solid transparent; border-top-color: var(--r2-ink);
}
.r2-shout.bad { background: color-mix(in srgb, var(--r2-paper) 82%, var(--r2-oppside)); }
.r2-shout.pop { animation: r2-pop .18s ease-out; }
@keyframes r2-pop { from { transform: scale(.85); } to { transform: scale(1); } }

/* ---- the reaction lane ----
   The land beat is a CAMERA CUT (cycle-2, all four judges: the reward moment
   whispered from the header AND collided with the meter's 你 endcap): the
   badge now SLAMS in center-stage over the sky band, above the lyric, the
   loudest thing in the frame for its 950ms. The turntag under it yields for
   the beat (below, at the land-phase rule). */
.rap2 .mg-burst {
  left: 50%; right: auto; top: 21.5%; transform: translate(-50%, -50%);
  /* max-content, not shrink-to-fit: a left/right-anchored absolute box only
     gets the leftover run to one edge, which folded 五连！势不可挡！in two */
  width: max-content; max-width: min(92%, 720px); text-align: center;
  padding: 6px 18px; border-radius: 999px;
  background: color-mix(in srgb, var(--r2-night1) 82%, transparent);
  border: 2.5px solid var(--r2-gold);
  box-shadow: 0 0 16px color-mix(in srgb, var(--r2-gold) 45%, transparent);
}
.rap2 .mg-burst.bad { border-color: #b0506a; box-shadow: 0 0 16px rgba(120, 30, 60, .6); }
.rap2 .mg-burst.bad :is(.han, b) { font-size: 26px; }
/* one badge in the lane, ever: a streak headline retires the plain 可以/哦
   pill, and a newer streak retires an older one still mid-float (the probe
   lands five bars in two seconds; a real run just never sees the pileup) */
.rap2 .mg-burst:not(.streak):has(~ .mg-burst.streak) { display: none; }
.rap2 .mg-burst.streak:has(~ .mg-burst.streak) { display: none; }
/* the streak badge sheds the pill — pure slab type, MVC-style */
.rap2 .mg-burst.streak {
  background: none; border: 0; box-shadow: none; padding: 0;
  animation: r2-slam .95s cubic-bezier(.16, 1.3, .3, 1) both;
}
/* GOLD MUST ARRIVE: prom.css's shared streak style paints a 1.5px centered
   text-stroke OVER the fill, which at 900-weight hanzi swallows the gold and
   left cycle-3's badge reading ink-on-night (the "dark olive" all four judges
   flagged). Outline moves to text-shadow — the lyric's own idiom. */
.rap2 .mg-burst.streak :is(.han, b) {
  font-size: clamp(44px, 6.5vw, 76px); font-style: italic;
  color: var(--r2-gold);
  -webkit-text-stroke: 0;
  text-shadow:
    3px 3px 0 var(--r2-ink), -3px 3px 0 var(--r2-ink),
    3px -3px 0 var(--r2-ink), -3px -3px 0 var(--r2-ink),
    0 0 26px color-mix(in srgb, var(--r2-gold) 70%, transparent),
    0 0 60px color-mix(in srgb, var(--r2-gold) 40%, transparent);
}
@keyframes r2-slam {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(2.4) rotate(-3deg); }
  16% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-2deg); }
  30% { transform: translate(-50%, -50%) scale(1.1) rotate(-2deg); }
  42% { transform: translate(-50%, -50%) scale(1) rotate(-2deg); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, calc(-50% - 24px)) scale(1) rotate(-2deg); }
}
/* the badge owns the sky band while it's up — the OPPONENT'S pill ducks the
   collision; the 到你了 pill STAYS on the board, recast by landExchange as
   the verdict flash (cycle-4 ux: both pills vanished at land and nothing
   answered "whose turn / what just happened") */
.rap2-battle[data-phase="land"] .r2-turntag-opp { opacity: 0; transition: opacity .2s ease; }
.r2-turntag.is-hit {
  border-color: var(--r2-gold); color: #fff;
  background: color-mix(in srgb, var(--r2-card) 70%, var(--r2-gold));
  box-shadow: 0 0 14px color-mix(in srgb, var(--r2-gold) 50%, transparent);
}
.r2-turntag.is-miss {
  border-color: #b0506a; color: #f3dde3;
  background: color-mix(in srgb, var(--r2-card) 82%, #5a132e);
  box-shadow: 0 0 12px rgba(120, 30, 60, .55);
}

/* the land beat is pyro, not a gray-out: flash the room, surge the meter,
   the crowd wave rides .r2-crowd-hot (set by landExchange on a hit) */
.r2-stage.r2-crowd-hot::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: radial-gradient(80% 60% at 50% 40%, color-mix(in srgb, var(--r2-gold) 45%, transparent), transparent 74%);
  animation: r2-landflash .9s ease-out both;
}
@keyframes r2-landflash { 0% { opacity: .95; } 100% { opacity: 0; } }
.r2-stage.r2-crowd-hot .r2-spot { opacity: 1; } /* the beat of light hits both cones */
.rap2-battle:has(.r2-crowd-hot) .r2-meter-track { box-shadow: 0 0 18px color-mix(in srgb, var(--r2-gold) 60%, transparent); }
.rap2-battle:has(.r2-crowd-hot) .r2-meter-flame { transform: translate(-50%, -62%) scale(1.35); }

/* the crowd takes sides with the meter — paintMeter stamps data-crowd on the
   root, the same signal crowd.js already turns into cheers. Your half's arms
   and glowsticks come up as you take the room; the far half slows to a sulk.
   (Fans left of the SVG's centre are .r2-fan-l — the opponent's half.) */
.rap2-battle[data-crowd="yours"] .r2-fan-r .r2-fan-armR,
.rap2-battle[data-crowd="theirs"] .r2-fan-l .r2-fan-armR {
  opacity: .85; animation: r2-wave 1.1s ease-in-out infinite alternate;
}
.rap2-battle[data-crowd="yours"] .r2-fan-r .r2-fan-halo,
.rap2-battle[data-crowd="theirs"] .r2-fan-l .r2-fan-halo { opacity: .3; }
.rap2-battle[data-crowd="yours"] .r2-fan-l .r2-fan,
.rap2-battle[data-crowd="theirs"] .r2-fan-r .r2-fan { animation-duration: 2.6s; }
.r2-fan-stick { fill: var(--r2-gold); opacity: .85; }

/* ---- the VS splash ---- */
/* Fighters slam in from the wings at FULL opacity onto a real floor, crowd
   silhouettes in front — the splash happens IN the venue, not on a card. */
.r2-vsplash {
  position: absolute; inset: 0; z-index: 40;
  display: flex; align-items: flex-end; justify-content: center; gap: clamp(8px, 3.5vw, 36px);
  background: var(--r2-night1);
  overflow: hidden; cursor: pointer;
}
.r2-vsplash[hidden] { display: none; }
.r2-vs-bg {
  position: absolute; inset: -2%;
  background:
    radial-gradient(38% 52% at 24% 52%, color-mix(in srgb, var(--r2-oppside) 72%, #a43a3a), transparent 72%),
    radial-gradient(38% 52% at 78% 52%, color-mix(in srgb, var(--r2-gold) 55%, transparent), transparent 72%),
    repeating-linear-gradient(104deg, transparent 0 34px, rgba(255, 255, 255, .05) 34px 40px),
    linear-gradient(104deg,
      color-mix(in srgb, var(--r2-oppside) 65%, var(--r2-night1)) 0 49.3%,
      var(--r2-ink) 49.3% 50.7%,
      color-mix(in srgb, var(--r2-gold) 26%, var(--r2-night1)) 50.7% 100%);
  animation: r2-vs-bgslide .55s cubic-bezier(.2, 1, .3, 1) both;
}
@keyframes r2-vs-bgslide { from { transform: scale(1.18); } to { transform: scale(1); } }
.r2-vs-floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 15%; z-index: 1;
  border-top: 3px solid rgba(0, 0, 0, .5);
  background:
    repeating-linear-gradient(90deg, transparent 0 84px, rgba(0, 0, 0, .25) 84px 87px),
    linear-gradient(to bottom, color-mix(in srgb, var(--r2-ink) 68%, #6b3f1d), color-mix(in srgb, var(--r2-ink) 88%, #000));
}
.r2-vs-crowd {
  position: absolute; left: 0; right: 0; bottom: 0; height: 12%; z-index: 3;
  pointer-events: none;
  /* opaque, same as the battle crowd — the fighters must not ghost through */
}
.r2-vs-crowd svg { width: 100%; height: 100%; }
.r2-vsplash::after {
  content: ""; position: absolute; inset: 0; background: #fff; opacity: 0;
  pointer-events: none;
  animation: r2-vs-flash .5s ease-out .18s;
}
@keyframes r2-vs-flash { 0% { opacity: 0; } 30% { opacity: .7; } 100% { opacity: 0; } }
/* fighters LARGE — cycle-2: "half the frame is empty gradient, characters
   small at the bottom". The camera crops INTO them now: heads near the 1/3
   line, legs sunk behind the crowd band and the frame's own bottom edge,
   which is the only guillotine that reads as cinematography. */
.r2-vs-side {
  position: relative; z-index: 2;
  display: flex; align-items: flex-end;
  padding-bottom: 0; margin-bottom: -5vh;
  /* fighters do NOT shrink: flex squeeze + the global img max-width used to
     crush Leap to a 33px sliver at 390px (ratio distortion, not a crop) —
     overflow crops at the frame edges instead, which is the MVC read */
  flex: 0 0 auto;
}
.r2-vs-side :is(img, svg, .pcard) { height: clamp(300px, 78vh, 700px); width: auto; max-width: none; }
/* bitmap cutouts melt into the floor light instead of ending on a razor edge */
.r2-vs-side img {
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 88%, transparent 99%);
}
/* the opponent's INWARD edge is also the source PNG's crop border (Leap's
   sleeve) — feather it into the energy field */
.r2-vs-opp img {
  -webkit-mask-image: linear-gradient(to right, #000 87%, transparent 99.5%),
                      linear-gradient(to bottom, #000 88%, transparent 99%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, #000 87%, transparent 99.5%),
              linear-gradient(to bottom, #000 88%, transparent 99%);
  mask-composite: intersect;
}
/* Leap's ball is guillotined by the PNG's top border (a flat half-disc at
   full splash scale, cycle-4 forensics) — the top few percent feather DOWN
   so the ball melts into the truss light instead of ending on a razor; his
   hair starts below the ramp and keeps its edge */
.rap2-battle[data-opp="leap"] .r2-vs-opp img {
  -webkit-mask-image: linear-gradient(to right, #000 87%, transparent 99.5%),
                      linear-gradient(to bottom, transparent 0, #000 7%, #000 88%, transparent 99%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, #000 87%, transparent 99.5%),
              linear-gradient(to bottom, transparent 0, #000 7%, #000 88%, transparent 99%);
  mask-composite: intersect;
}
/* MVC's slab plates: giant chunky outlined names, one per corner, over the
   fighters' lower halves — not the tiny italics cycle 2 shipped */
.r2-vs-name {
  position: absolute; z-index: 4; bottom: 12%;
  font-weight: 900; letter-spacing: .04em; line-height: 1;
  font-size: clamp(34px, 7vw, 84px); color: #fff;
  text-shadow:
    3px 3px 0 var(--r2-ink), -3px 3px 0 var(--r2-ink),
    3px -3px 0 var(--r2-ink), -3px -3px 0 var(--r2-ink),
    0 3px 0 var(--r2-ink), 0 -3px 0 var(--r2-ink),
    3px 0 0 var(--r2-ink), -3px 0 0 var(--r2-ink),
    0 8px 18px rgba(0, 0, 0, .7);
  pointer-events: none;
}
.r2-vs-name-opp { left: 3%; transform: rotate(-2deg); }
.r2-vs-name-you { right: 3%; transform: rotate(2deg); }
.r2-vs-opp { animation: r2-vs-inL .42s cubic-bezier(.2, 1.45, .4, 1) both; }
.r2-vs-you { animation: r2-vs-inR .42s cubic-bezier(.2, 1.45, .4, 1) both; }
@keyframes r2-vs-inL { from { transform: translateX(-16vw); } to { transform: none; } }
@keyframes r2-vs-inR { from { transform: translateX(16vw); } to { transform: none; } }
.r2-vs-mark { position: relative; z-index: 2; align-self: center; display: flex; align-items: center; justify-content: center; }
/* the charge in the air between them: a blurred gold beam under the mark */
.r2-vs-mark::before {
  content: ""; position: absolute; left: 50%; top: -44vh; bottom: -44vh;
  width: clamp(60px, 9vw, 120px); transform: translateX(-50%);
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--r2-gold) 32%, transparent) 28% 72%, transparent);
  filter: blur(7px); pointer-events: none;
}
/* white core, full ink ring, gold corona — cycle-2's mark was gold-on-gold
   and vanished; a white core with only corner offsets still washed out over
   the gold half, so the ink wraps all eight ways and a hard shadow drops it
   off the wall */
.r2-vs-mark b {
  position: relative; z-index: 1;
  font-size: clamp(72px, 14vw, 150px); font-weight: 900; font-style: italic;
  color: #fff;
  text-shadow:
    5px 5px 0 var(--r2-ink), -5px 5px 0 var(--r2-ink),
    5px -5px 0 var(--r2-ink), -5px -5px 0 var(--r2-ink),
    0 5px 0 var(--r2-ink), 0 -5px 0 var(--r2-ink),
    5px 0 0 var(--r2-ink), -5px 0 0 var(--r2-ink),
    0 0 28px color-mix(in srgb, var(--r2-gold) 90%, transparent),
    0 14px 30px rgba(0, 0, 0, .8);
  /* SOLID from frame one: the splash gets screenshotted (and glanced at)
     EARLY — cycle-3 proved even a .55 opacity ramp gets caught mid-fade and
     prints the core lavender. The slam is scale-only now. */
  animation: r2-vs-slam .3s cubic-bezier(.2, 1.5, .4, 1) both;
}
@keyframes r2-vs-slam { from { transform: scale(2.1); } to { transform: scale(1); } }
.r2-vs-burst {
  position: absolute; left: 50%; top: 50%; width: clamp(260px, 48vw, 520px); aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: repeating-conic-gradient(color-mix(in srgb, var(--r2-gold) 55%, transparent) 0 9deg, transparent 9deg 24deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 8%, rgba(0, 0, 0, .75) 42%, transparent 72%);
  mask-image: radial-gradient(closest-side, #000 8%, rgba(0, 0, 0, .75) 42%, transparent 72%);
  animation: r2-spin 10s linear infinite; opacity: .6;
}
/* second ray wheel, counter-spinning — the field between them CHURNS */
.r2-vs-burst2 {
  width: clamp(340px, 62vw, 700px);
  animation-direction: reverse; animation-duration: 16s; opacity: .3;
}
@keyframes r2-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ---- the hud ---- */
/* margin-top clears the marquee; the gap between them is the reaction lane */
.r2-hud {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 7px;
  margin-top: 62px; padding: 8px 12px 4px; width: 100%;
}
/* on-stage chrome, not paper: the scoreboard hangs in the venue */
.r2-goal {
  align-self: center;
  padding: 3px 16px 4px; border-radius: 999px;
  background: color-mix(in srgb, var(--r2-card) 88%, transparent); color: var(--r2-cardink);
  border: 2px solid var(--r2-cardline);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .45);
}
.r2-goal .dk-goal-zh { color: var(--r2-cardink); }
.r2-goal .dk-goal-en { color: var(--r2-cardink); opacity: .72; }
/* this goal is the METER, not a count — the chip's n/total would be a second
   scoreboard disagreeing with the bar right under it (the exact two-numbers
   defect goalTarget() exists to prevent) */
.r2-goal .dk-goal-count { display: none; }
.r2-meter { display: flex; align-items: center; gap: 8px; width: min(58%, 640px); }
.r2-meter-face {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border: 3px solid var(--r2-ink); background: var(--r2-card);
  font-weight: 800; font-size: var(--dk-read, 20px); line-height: 1; color: var(--r2-cardink);
}
.r2-meter-face :is(img, svg, .pcard) { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
/* WHO OWNS THE GOLD: cycle-4 ux read a near-full fill as the OPPONENT
   dominating because the gold mass grows toward their face. Ownership is
   taught three ways now, no new chrome: each coin wears its side's tint as a
   crescent under it, the track carries a welded gold cap on the 你 end (the
   fill's home, present even at meter-low) and a lacquer-red cap on theirs,
   and the face the room is swinging toward pulses with the fill. */
.r2-meter-opp {
  border-color: color-mix(in srgb, var(--r2-oppside) 55%, #fff);
  box-shadow: 0 0 10px color-mix(in srgb, var(--r2-oppside) 60%, transparent),
              0 5px 0 -1px color-mix(in srgb, var(--r2-oppside) 55%, #fff);
}
.r2-meter-you {
  border-color: var(--r2-gold);
  box-shadow: 0 0 10px color-mix(in srgb, var(--r2-gold) 40%, transparent),
              0 5px 0 -1px var(--r2-gold);
}
.rap2-battle[data-crowd="yours"] .r2-meter-you,
.rap2-battle[data-crowd="theirs"] .r2-meter-opp { animation: r2-meterown 1.6s ease-in-out infinite; }
@keyframes r2-meterown { 50% { transform: scale(1.08); } }
.r2-meter-track {
  position: relative; flex: 1 1 auto; height: 30px; border-radius: 999px;
  border: 3px solid rgba(0, 0, 0, .6); overflow: visible;
  transition: box-shadow .3s ease;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--r2-oppside) 55%, #fff) 0 8px, transparent 16px),
    repeating-linear-gradient(-55deg, transparent 0 10px, rgba(0, 0, 0, .25) 10px 20px),
    linear-gradient(90deg, color-mix(in srgb, var(--r2-oppside) 80%, #000), var(--r2-oppside));
}
/* the halfway notch — the line the tug of war is fought over */
.r2-meter-track::before {
  content: ""; position: absolute; left: 50%; top: -6px; bottom: -6px; width: 2px;
  background: rgba(255, 255, 255, .35);
  transform: translateX(-1px);
}
/* the 你-end weld: a stub of gold fused to your coin, so the fill visibly
   POURS from your end of the track (paints over the fill, under the flame) */
.r2-meter-track::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 12px;
  border-radius: 0 999px 999px 0;
  background: var(--r2-gold);
  box-shadow: 0 0 8px color-mix(in srgb, var(--r2-gold) 55%, transparent);
}
.r2-meter-crowdfill {
  --m: 0.5;
  position: absolute; right: 0; top: 0; bottom: 0;
  width: calc(var(--m) * 100%);
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--r2-gold) 80%, var(--r2-accent)), var(--r2-gold));
  transition: width .6s cubic-bezier(.3, 1.3, .4, 1);
  overflow: hidden;
}
/* your side shimmers — winning ground should look like stage light */
.r2-meter-crowdfill::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, .4) 50%, transparent 68%);
  background-size: 220% 100%;
  animation: r2-sheen 2.8s linear infinite;
}
@keyframes r2-sheen { from { background-position: 160% 0; } to { background-position: -60% 0; } }
.r2-meter-flame {
  --m: 0.5;
  position: absolute; top: 50%; left: calc((1 - var(--m)) * 100%);
  transform: translate(-50%, -58%);
  width: 26px; height: 36px; z-index: 2;
  transition: left .6s cubic-bezier(.3, 1.3, .4, 1), transform .25s ease;
  background: radial-gradient(60% 55% at 50% 78%, #fff7d6 0%, var(--r2-gold) 42%, var(--r2-accent) 72%, transparent 74%);
  clip-path: polygon(50% 0, 68% 26%, 88% 46%, 82% 84%, 50% 100%, 18% 84%, 12% 46%, 32% 26%);
  filter: drop-shadow(0 0 9px color-mix(in srgb, var(--r2-gold) 85%, transparent));
  animation: r2-flame .5s ease-in-out infinite alternate;
}
@keyframes r2-flame { from { transform: translate(-50%, -58%) scale(1); } to { transform: translate(-50%, -62%) scaleX(.92); } }

/* ---- the court: everything floats over the stage ---- */
.r2-court {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 6px 12px 26px; width: 100%;
}
.r2-turntag {
  font-size: var(--dk-caption, 14px); font-weight: 700; letter-spacing: .04em;
  padding: 3px 12px; border-radius: 999px;
  border: 2px solid var(--r2-cardline);
  background: color-mix(in srgb, var(--r2-card) 88%, transparent); color: var(--r2-cardink);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
}
.r2-turntag-you { border-color: var(--r2-accent); }
.r2-turntag .han { margin-right: 4px; }

/* THE LYRIC IS THE SKY. Giant outlined type splashed over the stage — MVC
   splashes bars across its skyline; this is ours. A soft scrim keeps the
   hanzi at full contrast over lanterns, towers and fighters alike. */
.r2-lyric {
  position: relative; width: min(97%, 900px);
  padding: 12px 52px 10px; text-align: center;
  border-radius: 20px;
  /* the scrim is a POOL, not a panel: it must die out well before its own
     box edge or it reads as a gray card floating over the horizon */
  background: radial-gradient(52% 58% at 50% 48%, color-mix(in srgb, var(--r2-night1) 58%, transparent), color-mix(in srgb, var(--r2-night1) 34%, transparent) 52%, transparent 76%);
}
.r2-lyric .r2-bar .han {
  display: block;
  font-size: clamp(26px, 3.4vw, 44px); font-weight: 900; font-style: italic;
  line-height: 1.25; letter-spacing: .02em;
  color: #fff;
  text-shadow:
    2px 2px 0 var(--r2-ink), -2px 2px 0 var(--r2-ink),
    2px -2px 0 var(--r2-ink), -2px -2px 0 var(--r2-ink),
    0 6px 16px rgba(0, 0, 0, .65);
}
/* alternate line tilt — the couplet lands like a poster, not a paragraph */
.r2-lyric .r2-bar[data-line="a"] { transform: rotate(-1.4deg); }
.r2-lyric .r2-bar[data-line="b"] { transform: rotate(1deg); }
.r2-bar .han { display: block; font-size: clamp(20px, 2.6vw, 30px); font-weight: 700; line-height: 1.3; }
.r2-py { display: block; font-size: var(--dk-caption, 14px); margin: 2px 0 0; }
.r2-lyric .r2-py { color: #ffeccc; opacity: .95; text-shadow: 0 2px 4px rgba(0, 0, 0, .8); }
.r2-gloss { display: block; font-size: var(--dk-caption, 14px); font-style: italic; margin-top: 5px; }
.r2-lyric .r2-gloss { color: #f2e4cc; opacity: .92; text-shadow: 0 2px 4px rgba(0, 0, 0, .8); }
.r2-again {
  position: absolute; top: 8px; right: 10px;
  width: 38px; height: 38px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .65); background: rgba(0, 0, 0, .3); color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.r2-again svg { width: 20px; height: 20px; }
.r2-again:hover:not(:disabled), .r2-again:focus-visible { border-color: var(--r2-gold); color: var(--r2-gold); outline: none; }
.r2-again:disabled { opacity: .5; cursor: default; }

/* comeback cards on the stage apron: lacquer + gold leaf (prom) or night
   glass + neon edge (mvc) — themed set pieces, not web forms */
.r2-choices { display: flex; flex-direction: column; gap: 9px; width: min(100%, 700px); }
.r2-choices[hidden], .r2-say[hidden], .r2-turntag[hidden] { display: none; }
.r2-chip {
  position: relative; text-align: left; width: 100%;
  background: linear-gradient(180deg, var(--r2-cardup), var(--r2-card));
  color: var(--r2-cardink);
  border: 2.5px solid var(--r2-cardline); border-radius: 14px;
  padding: 9px 14px 8px 72px; cursor: pointer; font: inherit;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .45),
              inset 0 1px 0 color-mix(in srgb, var(--r2-gold) 30%, transparent);
  transition: transform .1s ease, border-color .1s ease, box-shadow .1s ease;
}
.rap2[data-look="mvc"] .r2-chip {
  box-shadow: 0 6px 14px rgba(0, 0, 0, .5),
              0 0 12px color-mix(in srgb, var(--r2-cardline) 40%, transparent);
}
/* couch-distance type: cycle-4's ux and fan judges both measured the three
   comebacks as the SMALLEST text on screen — the thing you're being asked to
   read and say. Hanzi up to 23px, pinyin/gloss a step behind. */
.r2-chip .r2-bar .han { font-size: 23px; }
.r2-chip .r2-py { opacity: .7; font-size: 15px; }
.r2-chip .r2-gloss { opacity: .78; font-size: 15px; }
.r2-chip:hover:not(:disabled), .r2-chip:focus-visible {
  outline: none; border-color: var(--r2-gold); transform: translateY(-2px);
  box-shadow: 0 9px 16px rgba(0, 0, 0, .5),
              0 0 16px color-mix(in srgb, var(--r2-gold) 35%, transparent);
}
.r2-chip.is-active {
  border-color: var(--r2-gold);
  background: linear-gradient(180deg, color-mix(in srgb, var(--r2-cardup) 80%, var(--r2-gold)), var(--r2-card));
  box-shadow: 0 6px 14px rgba(0, 0, 0, .45),
              0 0 20px color-mix(in srgb, var(--r2-gold) 45%, transparent);
}
.r2-chip:disabled:not(.is-active) { opacity: .55; }
/* the land beat keeps the picked card LIT — cycle 1 grayed the whole court
   at the exact moment the crowd went up; cycle 4 found the inverse defect,
   three equal-bright cards and no read on which bar was thrown. The other
   two DROP now, the picked one holds the light. */
.rap2-battle[data-phase="land"] .r2-chip:not(.is-active) { opacity: .3; filter: saturate(.55); }
.rap2-battle[data-phase="land"] .r2-chip.is-active { opacity: 1; }
.rap2-battle[data-phase="land"] .r2-say { opacity: 0; transition: opacity .25s ease; }
/* the style badge reads at arm's length: big hanzi, English small but not
   microscopic (cycle-2 ux note) */
.r2-style {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0;
  width: 48px; padding: 5px 2px; border-radius: 10px;
  font-size: 12px; letter-spacing: .04em; line-height: 1.2;
  border: 2px solid var(--r2-ink); color: var(--r2-ink);
}
.r2-style .han { font-size: 22px; font-weight: 800; }
.r2-style-boastful { background: color-mix(in srgb, var(--r2-accent) 30%, var(--r2-paper)); }
.r2-style-cool { background: color-mix(in srgb, #3a7ca5 30%, var(--r2-paper)); }
.r2-style-wordplay { background: color-mix(in srgb, var(--r2-gold) 40%, var(--r2-paper)); }

/* the say bar: mic = hero, hear = secondary, tap-in = tertiary but ALIVE —
   cycle 1 dressed tap-in as a disabled dashed ghost */
.r2-say { display: flex; gap: 8px; width: min(100%, 700px); flex-wrap: wrap; align-items: stretch; }
.r2-say button {
  font: inherit; font-size: var(--dk-label, 16px);
  padding: 12px 14px; border-radius: 999px; cursor: pointer;
  border: 2.5px solid var(--r2-cardline);
}
.r2-say button .han { margin-right: 5px; }
.r2-say button:disabled { opacity: .5; cursor: default; }
.r2-mic {
  flex: 2 1 210px; background: var(--r2-accent); color: #fff; font-weight: 800; position: relative;
  font-size: var(--dk-read, 20px);
  border-color: color-mix(in srgb, var(--r2-accent) 55%, #fff);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .5), 0 0 20px color-mix(in srgb, var(--r2-accent) 45%, transparent);
}
.r2-mic:hover:not(:disabled), .r2-mic:focus-visible {
  outline: none;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .5),
              0 0 30px color-mix(in srgb, var(--r2-accent) 70%, transparent);
}
.r2-mic-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; margin-right: 8px; vertical-align: 1px;
}
.r2-mic.is-live .r2-mic-dot { animation: r2-live .8s ease-in-out infinite; background: #ffe9e0; }
@keyframes r2-live { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.7); opacity: .5; } }
.r2-hear {
  flex: 1 1 110px;
  background: linear-gradient(180deg, var(--r2-cardup), var(--r2-card));
  color: var(--r2-cardink);
}
.r2-skip {
  flex: 0 1 auto; align-self: center;
  padding: 9px 14px;
  background: rgba(0, 0, 0, .28); color: #fff;
  border: 2px solid rgba(255, 255, 255, .5);
}
.r2-skip:hover:not(:disabled), .r2-skip:focus-visible { border-color: #fff; outline: none; }
/* no mic in this browser (#r2Mic hidden): 先听 inherits the hero chair —
   accent fill at mic scale — and 不开麦 stays tertiary. Cycle-4 caught
   hear-it in dark-maroon-on-dark while the quiet escape hatch popped. */
.r2-say:has(.r2-mic[hidden]) .r2-hear {
  flex: 2 1 210px; font-weight: 800; font-size: var(--dk-read, 20px);
  background: var(--r2-accent); color: #fff;
  border-color: color-mix(in srgb, var(--r2-accent) 55%, #fff);
  box-shadow: 0 5px 0 rgba(0, 0, 0, .5), 0 0 20px color-mix(in srgb, var(--r2-accent) 45%, transparent);
}
.r2-say:has(.r2-mic[hidden]) .r2-hear:hover:not(:disabled),
.r2-say:has(.r2-mic[hidden]) .r2-hear:focus-visible {
  outline: none;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .5), 0 0 30px color-mix(in srgb, var(--r2-accent) 70%, transparent);
}

/* ---- end overlay: still the venue, now with a verdict ---- */
/* a vignette, not a blackout — the stage stays alive behind the card */
.r2-end {
  position: absolute; inset: 0; z-index: 45;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px;
  background:
    radial-gradient(120% 110% at 50% 55%, transparent 0 42%, color-mix(in srgb, var(--r2-night1) 60%, transparent) 82%),
    radial-gradient(60% 50% at 50% 38%, color-mix(in srgb, var(--r2-gold) 24%, transparent), transparent 70%),
    color-mix(in srgb, var(--r2-night1) 18%, transparent);
  animation: r2-endin .3s ease-out;
  padding: 20px; text-align: center;
  overflow: hidden;
}
.r2-end-loss {
  background:
    radial-gradient(120% 110% at 50% 55%, transparent 0 42%, color-mix(in srgb, #0c0618 74%, transparent) 82%),
    radial-gradient(60% 50% at 50% 38%, color-mix(in srgb, var(--r2-oppside) 40%, transparent), transparent 70%),
    rgba(10, 6, 20, .3);
}
@keyframes r2-endin { from { opacity: 0; } to { opacity: 1; } }
/* strike the court for the curtain call: the verdict happens on a CLEAN stage
   (marquee, lanterns, crowd), not over the ghost of the last exchange */
.rap2-battle[data-phase="end"] :is(.r2-hud, .r2-court, .r2-fighter, .r2-nameplate, .r2-shout) { opacity: 0; }
/* the room reacts behind the verdict: a win sends the crowd up and the lights
   hot; a loss drains the color out of the stage */
.rap2-battle:has(.r2-end-win) .r2-fan { animation-duration: .5s; }
.rap2-battle:has(.r2-end-win) .r2-fan-armL,
.rap2-battle:has(.r2-end-win) .r2-fan-armR { opacity: 1; animation: r2-wave .5s ease-in-out infinite alternate; }
.rap2-battle:has(.r2-end-win) .r2-fan-halo { opacity: .35; }
.rap2-battle:has(.r2-end-win) .r2-spot { opacity: .85; }
.rap2-battle:has(.r2-end-win) .r2-stage { filter: brightness(1.12) saturate(1.05); }
.rap2-battle:has(.r2-end-loss) .r2-stage { filter: saturate(.45) brightness(.75); }
/* the champ — big figure over a slow gold starburst, floating like they own
   the room. Because they do. */
.r2-end-figure {
  position: relative; height: clamp(220px, 40vh, 400px);
  display: flex; align-items: flex-end; justify-content: center;
}
.r2-end-figure :is(img, svg, .pcard) {
  height: 100%; width: auto; position: relative; z-index: 1;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55));
}
/* bitmap busts melt into the flare on EVERY edge — the radial mask ends the
   art in light, never on the source PNG's cut borders (the "guillotined
   bottoms" and razor sides the cycle-2 forensics judge zoomed into).
   Cycle-4: the radial alone was still ~90% opaque at the img's bottom row,
   so the General ended mid-torso on a straight edge with rounded mask
   corners — a bottom linear now melts the last third into the footlight. */
.r2-end-figure img {
  -webkit-mask-image: radial-gradient(78% 95% at 50% 42%, #000 58%, transparent 97%),
                      linear-gradient(to bottom, #000 62%, transparent 95%);
  -webkit-mask-composite: source-in;
  mask-image: radial-gradient(78% 95% at 50% 42%, #000 58%, transparent 97%),
              linear-gradient(to bottom, #000 62%, transparent 95%);
  mask-composite: intersect;
}
.r2-end-win .r2-end-figure .r2-youart { animation: r2-champ 2.2s ease-in-out infinite alternate; }
@keyframes r2-champ { from { transform: translateY(0); } to { transform: translateY(-8px); } }
/* the loss is a STAGED gloat, not a bust in a void: the winner stands taller
   than the win frame's champ, under their own cone of light, feet melting
   into a footlight pool */
.r2-end-loss .r2-end-figure { height: clamp(240px, 44vh, 430px); }
.r2-end-loss::before {
  content: ""; position: absolute; left: 50%; top: -6%; width: 46%; height: 78%;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, color-mix(in srgb, var(--r2-gold) 30%, transparent), transparent 82%);
  clip-path: polygon(44% 0, 56% 0, 100% 100%, 0 100%);
  mix-blend-mode: screen; pointer-events: none;
}
.r2-end-loss .r2-end-figure::after {
  content: ""; position: absolute; left: 50%; bottom: -5%; width: 130%; height: 24%;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--r2-gold) 30%, transparent), transparent 72%);
}
/* and you, small and slumped at the edge of their spotlight — a loss the
   player's own body language admits to */
.r2-end-loser {
  position: absolute; left: 8%; bottom: 15%; height: clamp(90px, 17vh, 150px);
  opacity: .9; filter: brightness(.45) saturate(.5) drop-shadow(0 6px 10px rgba(0, 0, 0, .6));
  pointer-events: none;
}
.r2-end-loser svg { height: 100%; width: auto; }
.r2-end-flare {
  position: absolute; left: 50%; top: 52%; width: 250%; aspect-ratio: 1;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: repeating-conic-gradient(color-mix(in srgb, var(--r2-gold) 55%, transparent) 0 11deg, transparent 11deg 30deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .7) 45%, transparent 74%);
  mask-image: radial-gradient(closest-side, #000 0%, rgba(0, 0, 0, .7) 45%, transparent 74%);
  animation: r2-spin 14s linear infinite; opacity: .75;
}
/* their night: the winner's spotlight is the one warm thing in a cold room */
.r2-end-loss .r2-end-flare {
  background: radial-gradient(closest-side, color-mix(in srgb, var(--r2-gold) 38%, transparent), transparent 72%);
  -webkit-mask-image: none; mask-image: none;
  animation: none; opacity: .8;
}
.r2-end-figure-opp :is(img, .pcard) { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .55)); }
/* the verdict at slab scale — MVC prints WINNER like a headline, not a label */
.r2-end-zh {
  font-size: clamp(38px, 7.6vw, 66px); font-weight: 900; font-style: italic; color: #fff;
  text-shadow:
    3px 3px 0 var(--r2-ink), -3px 3px 0 var(--r2-ink),
    3px -3px 0 var(--r2-ink), -3px -3px 0 var(--r2-ink),
    0 0 22px color-mix(in srgb, var(--r2-gold) 70%, transparent);
}
.r2-end-loss .r2-end-zh {
  text-shadow:
    3px 3px 0 #000, -3px 3px 0 #000, 3px -3px 0 #000, -3px -3px 0 #000,
    0 0 16px color-mix(in srgb, var(--r2-oppside) 80%, transparent);
}
.r2-end-en { color: #fff; opacity: .9; font-size: var(--dk-label, 16px); text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
/* the neon marquee chrome, recast as the WINNER sign */
.r2-end-neon { padding: 5px 24px 7px; margin: 2px 0; }
.r2-end-neon .han { font-size: clamp(22px, 4vw, 34px); letter-spacing: .18em; text-indent: .18em; }
.r2-end-neon > span { font-size: 12px; letter-spacing: .42em; text-indent: .42em; }
.r2-end-stats { color: var(--r2-gold); font-size: var(--dk-label, 16px); font-weight: 700; margin-bottom: 8px; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
.rap2[data-look="prom"] .r2-end-stats { color: #ffd98a; }
.r2-end-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.r2-end-go, .r2-end-quiet {
  font: inherit; font-size: var(--dk-read, 20px); font-weight: 700;
  padding: 12px 26px; border-radius: 999px; cursor: pointer;
  border: 3px solid var(--r2-ink);
}
.r2-end-go { background: var(--r2-gold); color: var(--r2-ink); box-shadow: 0 5px 0 rgba(0, 0, 0, .55); }
.r2-end-go:hover, .r2-end-go:focus-visible { transform: translateY(-2px); box-shadow: 0 7px 0 rgba(0, 0, 0, .55); outline: none; }
.r2-end-quiet { background: rgba(0, 0, 0, .3); color: #fff; border-color: #fff; opacity: .9; }
.r2-end-quiet:hover, .r2-end-quiet:focus-visible { opacity: 1; outline: none; }
.r2-end-go .han, .r2-end-quiet .han { margin-right: 6px; }
/* the take: notes and gold coming down over a win, MVC money-screen style */
/* z -1: the take falls BEHIND the copy and buttons — positioned boxes paint
   over static content, and a note across 领掌声 read as a typo, not spectacle */
.r2-end-rain { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.r2-end-rain i {
  position: absolute; left: var(--x, 50%); top: -6%;
  width: 15px; height: 9px; border-radius: 2px;
  background: linear-gradient(#8fe0b0, #3ea06e);
  box-shadow: inset 0 0 0 1.5px rgba(9, 60, 38, .55);
  opacity: 0;
  animation: r2-rain var(--du, 3s) linear var(--de, 0s) infinite;
}
.r2-end-rain i:nth-child(3n) {
  width: 10px; height: 10px;
  background: linear-gradient(#ffe9b0, var(--r2-gold));
  box-shadow: inset 0 0 0 1.5px rgba(120, 70, 10, .5);
}
@keyframes r2-rain {
  0% { transform: translateY(0) rotate(0turn); opacity: 0; }
  6% { opacity: 1; }
  100% { transform: translateY(110vh) rotate(.9turn); opacity: 1; }
}

/* --------------------------------------------------------------- phones */
@media (max-width: 720px) {
  /* the scene holds: fighters shrink into the mid-distance flanking the sky
     type, the horizon keeps their feet honest, the crowd keeps the lens */
  .r2-opp { left: -3%; bottom: auto; top: 148px; height: 132px; }
  .r2-you { right: -2%; bottom: auto; top: 166px; height: 114px; }
  .r2-nameplate { font-size: 16px; }
  .r2-nameplate-opp { left: 2%; bottom: auto; top: 132px; }
  .r2-nameplate-you { right: 2%; bottom: auto; top: 150px; }
  .r2-micstand { display: none; }
  /* no square inch of a 390px screen is safely bark-shaped — the tilt/gloat
     bubbles are desktop flavor; the burst pill carries the land beat here */
  .r2-shout { display: none; }
  .r2-neon-stage { top: 10px; padding: 3px 12px; }
  .r2-backline { left: 2%; right: 2%; top: 5%; height: 9%; }
  .r2-backline i { width: 12px; }
  .r2-backline i::before { height: 8px; }
  .rap2[data-look="mvc"] .r2-backline { top: auto; height: 26%; }
  .rap2[data-look="mvc"] .r2-backline i { width: clamp(16px, 7vw, 30px); }
  .r2-sky::before { right: 8%; top: 5%; }
  .r2-hud { margin-top: 52px; }
  .r2-meter { width: calc(100% - 116px); min-width: 230px; }
  .r2-meter-face { width: 38px; height: 38px; }
  .r2-meter-track { height: 24px; }
  /* the slam stays center-stage on phones too — over the fighters' band, a
     950ms camera cut, never over the lyric text below it */
  .rap2 .mg-burst { right: auto; left: 50%; top: 19%; bottom: auto; transform: translate(-50%, -50%); max-width: 94%; }
  .rap2 .mg-burst.streak :is(.han, b) { font-size: 30px; }
  /* the dev pill (试玩, fixed bottom-left) parks over the court's tail —
     leave it a lane so the third comeback never lives under chrome */
  .r2-court { padding-bottom: 96px; }
  /* one-row couplets are Lau's rule — at 390px that means 19px sky type and
     hairline side padding, not a wrap */
  .r2-lyric { padding: 8px 6px; width: 100%; }
  .r2-lyric .r2-bar .han { font-size: clamp(17px, 4.9vw, 24px); letter-spacing: 0; }
  .r2-bar .han { font-size: clamp(17px, 4.6vw, 24px); }
  /* pinyin must not decide the couplet's fate: zero out its preferred width
     so the HANZI set each half's measure and long pinyin wraps beneath —
     this is what keeps the pair on one row at 390px (Lau's rule) */
  .r2-bar .r2-py { width: 0; min-width: 100%; }
  .rap2 .r2-bar[data-line="b"] { margin-left: 5px; padding-left: 8px; }
  .r2-again { width: 30px; height: 30px; top: -34px; right: 4px; }
  /* the style badge steps out of the left band and rides its own top row —
     the freed width is what keeps a full couplet on one line at 390px */
  .r2-chip { padding: 8px 10px; }
  .r2-chip .r2-bar .han { font-size: 18px; }
  .r2-chip :is(.r2-py, .r2-gloss) { font-size: var(--dk-caption, 14px); }
  /* no card column beside Leap on a phone — the desktop shadow cut would eat
     a 99px sprite's whole right arm. Base feather + the ball pocket only. */
  .rap2-battle[data-opp="leap"] .r2-opp img {
    -webkit-mask-image: linear-gradient(to right, #000 86%, transparent 99.5%),
                        linear-gradient(to bottom, #000 90%, transparent 100%),
                        radial-gradient(15% 9% at 67% 2%, transparent 54%, #000 98%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, #000 86%, transparent 99.5%),
                linear-gradient(to bottom, #000 90%, transparent 100%),
                radial-gradient(15% 9% at 67% 2%, transparent 54%, #000 98%);
    mask-composite: intersect;
  }
  .r2-style {
    position: static; transform: none;
    display: flex; width: max-content; flex-direction: row; align-items: baseline; gap: 5px;
    padding: 1px 9px 2px; margin-bottom: 4px;
  }
  .r2-style .han { font-size: 16px; }
  .r2-say button { padding: 11px 10px; }
  /* the splash stays horizontal (it's the MVC read) but everything gives an
     inch — full-size fighters shoved the player half off a 390px screen */
  .r2-vsplash { gap: 4px; }
  .r2-vs-side { margin-bottom: -2vh; }
  /* sized so both FACES stay on a 390px screen with true aspect (the frame
     still crops shoulders — deliberate) */
  .r2-vs-side :is(img, svg, .pcard) { height: clamp(180px, 34vh, 300px); }
  .r2-vs-name { font-size: 24px; }
  .r2-vs-mark b { font-size: 58px; }
  .r2-vs-burst { width: 200px; }
  .r2-vs-burst2 { width: 280px; }
  .r2-end-figure { height: clamp(140px, 24vh, 210px); }
  .r2-end-loss .r2-end-figure { height: clamp(160px, 28vh, 240px); }
  .r2-end-loser { left: 4%; bottom: 18%; height: 80px; }
  /* posters: two sheets a row, crowd shallower */
  .r2-select { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .r2-pick-art { height: clamp(96px, 15vh, 140px); }
  .r2-selscene { padding-bottom: 150px; }
  .r2-selcrowd { height: 84px; }
}
@media (max-width: 430px) {
  .r2-pick { padding: 10px 6px 10px; }
}

/* --------------------------------------------------- reduced motion + misc */
@media (prefers-reduced-motion: reduce) {
  .r2-fan, .r2-crowd-hot .r2-fan-armL, .r2-crowd-hot .r2-fan-armR,
  .rap2-battle:has(.r2-end-win) .r2-fan-armL, .rap2-battle:has(.r2-end-win) .r2-fan-armR,
  .rap2-battle[data-crowd="yours"] .r2-fan-r .r2-fan-armR,
  .rap2-battle[data-crowd="theirs"] .r2-fan-l .r2-fan-armR,
  .rap2 .mg-burst.streak,
  .r2-fan-phone, .r2-fan-halo,
  .r2-spot-l, .r2-spot-r, .r2-neon-stage, .r2-truss i::after,
  .r2-backline i, .rap2[data-look="mvc"] .r2-backline i,
  .r2-meter-flame, .r2-meter-crowdfill::after, .r2-mic.is-live .r2-mic-dot,
  .rap2-battle[data-crowd="yours"] .r2-meter-you,
  .rap2-battle[data-crowd="theirs"] .r2-meter-opp,
  .r2-vs-opp, .r2-vs-you, .r2-vs-mark b, .r2-vs-burst, .r2-vs-bg, .r2-vsplash::after,
  .r2-stage.r2-crowd-hot::after,
  .r2-end-win .r2-end-figure .r2-youart, .r2-end-flare { animation: none; }
  .r2-vs-opp, .r2-vs-you, .r2-vs-mark b, .r2-vs-bg { opacity: 1; transform: none; }
  .r2-end-rain { display: none; }
  .r2-meter-crowdfill, .r2-meter-flame, .r2-crowd, .r2-nameplate { transition: none; }
}

/* ===========================================================================
   v3 FEATURES (Lau's ten, 2026-08-10): painted-player slot, mic count-in,
   cameos, keepsake, the ladder wall (locked boss / beaten stamps / belt),
   and the freestyle finale. Appended as one block so a future builder can
   see the seam; fold into the sections above on the next full pass.
   =========================================================================== */

/* ---- the painted-player slot: img when art/cutout/player*.png exists,
   the SVG the instant it doesn't (onerror flips the class, no flash) ---- */
.r2-youwrap { display: inline-flex; align-items: flex-end; height: 100%; position: relative; }
.r2-youwrap .r2-youimg { height: 100%; width: auto; filter: url(#r2Diecut) drop-shadow(0 10px 12px rgba(0,0,0,.5)); }
.r2-youwrap .r2-youart { display: none; }
.r2-youwrap.r2-you-fallback .r2-youimg { display: none; }
.r2-youwrap.r2-you-fallback .r2-youart { display: block; }

/* ---- mic count-in: the button counts 3-2-1 ON the beat ---- */
.r2-mic[data-count]::after {
  content: attr(data-count);
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 900; color: #fff;
  animation: r2-countpulse .5s ease-out;
}
@keyframes r2-countpulse { from { transform: translateY(-50%) scale(1.7); opacity: .4; } to { transform: translateY(-50%) scale(1); opacity: 1; } }

/* ---- friends in the front row ---- */
.r2-cameos { position: absolute; right: 12%; bottom: 4%; display: flex; gap: 10px; z-index: 6; pointer-events: none; }
.r2-cameo {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  border: 2.5px solid var(--r2-gold); overflow: visible;
  background: var(--r2-night1); /* no crowd fragments through the ring */
  transform: translateY(calc(var(--i) * 3px));
}
.r2-cameo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.r2-cameo.is-cheering { animation: r2-cameo-hop .35s ease-out 2; }
@keyframes r2-cameo-hop { 50% { transform: translateY(-6px); } }
.r2-cameo-bubble {
  position: absolute; bottom: 108%; left: 50%; transform: translateX(-50%);
  background: var(--r2-paper); color: var(--r2-ink);
  border: 2px solid var(--r2-ink); border-radius: 9px;
  padding: 2px 8px; font-size: 13px; font-style: normal; font-weight: 700; white-space: nowrap;
}
@media (max-width: 720px) { .r2-cameos { display: none; } } /* phone stage is too tight for extra heads */

/* ---- the keepsake: tonight's hardest bar, framed on the win card ---- */
.r2-keepsake {
  display: flex; flex-direction: column; gap: 2px; align-items: center;
  margin: 6px 0 2px; padding: 8px 18px; max-width: min(92vw, 560px);
  background: color-mix(in srgb, var(--r2-paper) 92%, var(--r2-gold));
  border: 2.5px solid var(--r2-ink); border-radius: 12px;
  box-shadow: 0 4px 0 color-mix(in srgb, var(--r2-ink) 50%, transparent);
  transform: rotate(-1.2deg);
}
.r2-keepsake-kicker { font-size: 12px; letter-spacing: .06em; color: var(--r2-ink); opacity: .75; }
.r2-keepsake-kicker .han { font-size: 14px; margin-right: 4px; }
.r2-keepsake-bar { font-size: clamp(17px, 2.4vw, 22px); font-weight: 800; color: var(--r2-ink); }
.r2-keepsake-py { font-size: 12px; color: var(--r2-ink); opacity: .65; }

/* ---- the ladder wall ---- */
.r2-belt {
  position: relative; z-index: 3; /* above the absolute wall layer */
  width: max-content; margin: 0 auto 2px; padding: 5px 22px;
  background: linear-gradient(180deg, #ffe9ad, var(--r2-gold));
  color: var(--r2-ink); font-weight: 800; letter-spacing: .04em;
  border: 3px solid var(--r2-ink); border-radius: 999px;
  box-shadow: 0 0 18px color-mix(in srgb, var(--r2-gold) 55%, transparent), 0 4px 0 color-mix(in srgb, var(--r2-ink) 55%, transparent);
}
.r2-belt .han { margin-right: 6px; }
.r2-pick[data-beaten="1"]::after {
  content: "赢"; position: absolute; top: 8px; right: 10px;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 900; color: #fff;
  background: var(--r2-accent); border: 2.5px solid var(--r2-ink); border-radius: 50%;
  transform: rotate(12deg);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--r2-ink) 55%, transparent);
}
.r2-pick-locked { cursor: default; opacity: .88; }
.r2-pick-locked:hover { transform: none; border-color: var(--r2-ink); box-shadow: 0 6px 0 color-mix(in srgb, var(--r2-ink) 55%, transparent); }
.r2-pick-mystery {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  background: radial-gradient(60% 70% at 50% 40%, color-mix(in srgb, var(--r2-ink) 60%, #000), color-mix(in srgb, var(--r2-ink) 88%, #000));
  border-radius: 10px;
}
.r2-pick-mystery b { font-size: 54px; font-weight: 900; color: var(--r2-gold); text-shadow: 0 0 14px color-mix(in srgb, var(--r2-gold) 60%, transparent); }
.r2-pick-boss { border-color: var(--r2-gold); box-shadow: 0 6px 0 color-mix(in srgb, var(--r2-ink) 55%, transparent), 0 0 22px color-mix(in srgb, var(--r2-gold) 40%, transparent); }

/* ---- the freestyle finale ---- */
.r2-finale { display: flex; flex-direction: column; gap: 10px; width: min(100%, 680px); z-index: 5; }
.r2-finale[hidden] { display: none; }
.r2-fin-slots { display: flex; flex-direction: column; gap: 8px; }
.r2-fin-slot {
  min-height: 58px; display: flex; align-items: center; justify-content: center;
  border: 3px dashed color-mix(in srgb, var(--r2-gold) 60%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--r2-ink) 30%, transparent);
}
.r2-fin-slot > i { font-style: normal; font-size: 14px; opacity: .7; letter-spacing: .04em; }
.r2-fin-slot > i .han, .r2-fin-slot .han { font-weight: 800; }
.r2-fin-pool { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.r2-fin-chip {
  font: inherit; text-align: center; cursor: pointer;
  padding: 9px 10px; border-radius: 12px;
  background: var(--r2-card, var(--r2-paper)); color: var(--r2-cardink, var(--r2-ink));
  border: 2.5px solid color-mix(in srgb, var(--r2-gold) 45%, var(--r2-ink));
}
.r2-fin-chip .han { display: block; font-size: clamp(17px, 2.2vw, 21px); font-weight: 800; }
.r2-fin-chip .r2-py { font-size: 12px; opacity: .7; }
.r2-fin-chip:hover:not(:disabled) { border-color: var(--r2-gold); transform: translateY(-2px); }
.r2-fin-chip.in-slot { width: 100%; border-style: solid; border-color: var(--r2-gold); cursor: default; }
.r2-fin-chip.is-hint { animation: r2-hintglow 1.1s ease-in-out infinite alternate; }
@keyframes r2-hintglow { from { box-shadow: none; } to { box-shadow: 0 0 16px color-mix(in srgb, var(--r2-gold) 75%, transparent); border-color: var(--r2-gold); } }
.r2-fin-chip:disabled:not(.in-slot) { opacity: .4; cursor: default; }
.r2-finale.is-built .r2-fin-pool { opacity: .45; }
.r2-fin-host { display: none; }
@media (max-width: 720px) {
  .r2-fin-pool { grid-template-columns: 1fr 1fr; }
  .r2-fin-chip .han { font-size: 16px; }
  .r2-fin-slot { min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .r2-cameo.is-cheering, .r2-fin-chip.is-hint, .r2-mic[data-count]::after { animation: none; }
}

/* five posters on the wall: three-up so the boss row stays above the fold */
.r2-select:has(> :nth-child(5)) {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 116px; /* the crowd band is fixed at 104px — row 2's taunts stay clear of it */
}
.r2-select:has(> :nth-child(5)) .r2-pick-art { height: 148px; }
@media (max-width: 720px) {
  .r2-select:has(> :nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* the land verdict flash reads at couch distance (c6 fan: "small text chips") */
.rap2-battle[data-phase="land"] .r2-turntag { font-size: clamp(17px, 2vw, 22px); padding: 6px 20px; }
/* vs fighters get a ground anchor: a soft pool of shadow under each */
.r2-vs-side::after {
  content: ""; position: absolute; left: 50%; bottom: -2%;
  width: 72%; height: 7%;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, .55), transparent 70%);
  z-index: -1;
}
/* finale legibility (c6 ux): slot labels readable, chips wear their half tag */
.r2-fin-slot > i { font-size: 16px; opacity: .9; color: var(--r2-gold); }
.r2-fin-tag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-right: 6px; border-radius: 6px;
  font-size: 13px; font-weight: 800; font-style: normal;
  background: color-mix(in srgb, var(--r2-gold) 30%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--r2-gold) 60%, var(--r2-ink));
  vertical-align: 2px;
}
.r2-fin-chip .han { display: inline-block; }

@media (max-width: 720px) {
  .rap2-battle .r2-you { height: 38%; bottom: 1%; right: 1.5%; }
}


/* ===========================================================================
   #2 (Lau: keep the lights, drop the crowd pop — the fan bodies are a
   connected silhouette cut off at the waist, and scaling/lifting them tore
   that shape apart. What's left: a light sweep across the crowd and each
   fan's phone-glow flaring, neither of which moves any body geometry, plus
   the venue-heat lighting below.)
   =========================================================================== */
.r2-crest .r2-fan-halo { animation: r2-crestglow .8s ease-out both; }
@keyframes r2-crestglow { 0% { opacity: .3; } 35% { opacity: 1; } 100% { opacity: .5; } }
/* the light sweep: a bright band that travels left-to-right across the
   crowd on every landed bar */
.r2-crest .r2-crowd::after {
  content: ""; position: absolute; inset: 0; z-index: 5; pointer-events: none;
  background: linear-gradient(100deg, transparent 40%, rgba(255, 216, 130, .55) 50%, transparent 60%);
  background-size: 300% 100%;
  animation: r2-sweep 1.05s ease-out both;
}
@keyframes r2-sweep { from { background-position: 130% 0; } to { background-position: -60% 0; } }

/* VENUE HEAT v2: an actual color wash, not just a brightness nudge — a
   warm-gold overlay that grows from nothing (heat 0, cold/empty room) to a
   strong amber blaze (heat 4, packed house), PLUS the sky/spots/lanterns
   still shift so every light in the scene agrees. */
.rap2-battle .r2-sky, .rap2-battle .r2-spot, .rap2-battle .r2-backline i { transition: opacity 1.1s ease, filter 1.1s ease; }
.r2-heatwash {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 105%, rgba(255, 190, 80, var(--heatwash, 0)), transparent 65%);
  transition: opacity 1s ease;
}
.rap2-battle[data-heat="0"] .r2-heatwash { --heatwash: 0; }
.rap2-battle[data-heat="0"] .r2-sky { filter: brightness(.72) saturate(.7) grayscale(.15); }
.rap2-battle[data-heat="0"] .r2-spot { opacity: .25; }
.rap2-battle[data-heat="0"] .r2-backline i { filter: brightness(.55) saturate(.6); }
.rap2-battle[data-heat="1"] .r2-heatwash { --heatwash: .1; }
.rap2-battle[data-heat="1"] .r2-sky { filter: brightness(.88) saturate(.9); }
.rap2-battle[data-heat="1"] .r2-spot { opacity: .48; }
.rap2-battle[data-heat="1"] .r2-backline i { filter: brightness(.8); }
.rap2-battle[data-heat="2"] .r2-heatwash { --heatwash: .22; }
.rap2-battle[data-heat="3"] .r2-heatwash { --heatwash: .38; }
.rap2-battle[data-heat="3"] .r2-sky { filter: brightness(1.14) saturate(1.2) hue-rotate(4deg); }
.rap2-battle[data-heat="3"] .r2-spot { opacity: .82; }
.rap2-battle[data-heat="3"] .r2-backline i { filter: brightness(1.35) saturate(1.15) drop-shadow(0 0 8px rgba(255, 200, 74, .6)); }
.rap2-battle[data-heat="4"] .r2-heatwash { --heatwash: .55; }
.rap2-battle[data-heat="4"] .r2-sky { filter: brightness(1.3) saturate(1.4) hue-rotate(8deg); }
.rap2-battle[data-heat="4"] .r2-spot { opacity: 1; }
.rap2-battle[data-heat="4"] .r2-backline i { filter: brightness(1.7) saturate(1.3) drop-shadow(0 0 14px rgba(255, 200, 74, .9)); }
@media (prefers-reduced-motion: reduce) {
  .r2-crest .r2-fan-halo, .r2-crest .r2-crowd::after { animation: none; }
  .rap2-battle .r2-sky, .rap2-battle .r2-spot, .rap2-battle .r2-backline i, .r2-heatwash { transition: none; }
}

/* the comeback is chosen. Give it the stage while the player performs it. */
.r2-choices:has(.r2-chip.is-active) .r2-chip:not(.is-active) { display: none; }
.r2-lyric { background: #28394b; border: 1px solid #607487; border-radius: 12px; }
.r2-lyric .r2-bar .han { text-shadow: none; }
.r2-lyric .r2-bar[data-line] { transform: none; }
.r2-chip { border-width: 1px; box-shadow: none; }
.r2-turntag { background: var(--r2-card); border-width: 1px; box-shadow: none; font-size: 16px; }
.r2-again { width: 44px; height: 44px; }
@media (max-width: 700px) {
  .r2-lyric { padding-right: 52px; }
  .r2-lyric .r2-bar .han, .r2-chip .r2-bar .han { font-size: 20px; }
}

/* Packet 07: reading help on demand, leaving all three Chinese choices in reach. */
.rap2 .r2-court > * { flex-shrink: 0; }
.rap2 .r2-reading { min-height: 44px; padding: 8px 12px; border-radius: 8px;
  font: inherit; font-size: 1rem; color: var(--prom-ink); background: var(--prom-paper); border: 1px solid var(--prom-ink-muted); }
.rap2 .r2-court:not(.show-reading) :is(.r2-py,.r2-gloss) { display: none; }
.rap2 .r2-lyric { background: var(--prom-paper); color: var(--prom-ink); }
.rap2 .r2-lyric .r2-bar .han { color: var(--prom-ink); }
.rap2 .r2-lyric :is(.r2-py,.r2-gloss) { color: var(--prom-ink-muted); opacity: 1; text-shadow: none; }
.rap2 .r2-chip { background: var(--prom-paper); color: var(--prom-ink); }
.rap2 .r2-chip :is(.r2-py,.r2-gloss) { color: var(--prom-ink-muted); font-size: 1rem; opacity: 1; }
.rap2 .r2-reset-note { margin: 0; padding: 8px 12px; color: var(--prom-ink); background: var(--prom-paper); font-size: 1rem; }
.rap2 .r2-finale.is-built .r2-fin-pool { display: none; }
.rap2 .r2-again { position: static; margin: 4px auto 0; }
.rap2 .r2-say { flex-wrap: wrap; }
.rap2 .r2-say button { min-height: 44px; font-size: 1rem; white-space: normal; }
@media (max-width: 720px) {
  .rap2 .r2-hud { margin-top: 48px; padding: 4px 8px; gap: 4px; }
  .rap2 .r2-goal { max-width: 100%; flex-wrap: wrap; white-space: normal; }
  .rap2 .r2-court { gap: 8px; padding: 4px 8px 72px; }
  .rap2 .r2-lyric { padding: 8px; }
  .rap2 .r2-lyric .r2-bar .han, .rap2 .r2-chip .r2-bar .han { font-size: 1.25rem; }
  .rap2 .r2-style { display: inline-flex; float: none; margin: 0 8px 4px 0; font-size: 1rem; }
  .rap2 .r2-style .han { font-size: 1rem; }
  .rap2 .r2-bar { max-width: 100%; overflow-wrap: anywhere; }
  .rap2 .r2-fin-pool { grid-template-columns: 1fr; }
  .rap2 .r2-fin-chip .han { font-size: 1.25rem; }
  .rap2 .r2-end { overflow-y: auto; justify-content: safe center; padding: 64px 12px 72px; }
}
.rap2 .r2-bar .w.kara-done { color: inherit; }
.rap2 .r2-bar .w.kara { color: var(--dk-gold-deep); text-shadow: none; text-decoration: underline; }

.rap2 .r2-restart { position: relative; z-index: 6; flex: none; align-self: center; margin: 8px; padding: 8px 12px; min-height: 44px; max-width: calc(100% - 16px); border: 1px solid var(--prom-ink-muted); border-radius: 8px; background: var(--prom-paper); color: var(--prom-ink); font: inherit; font-size: 1rem; }
.rap2[data-phase="end"] .r2-restart { display: none; }
