/* Hallmark · extends the style.css stamp (playful, kampung sticker, tokens from style.css :root) for the living replay on /lobi and the 20.00 reveal overlay
 * scene colours that have no style.css token live in the one :root block below · motion: transform and opacity only, every loop has a reduced-motion fallback
 */

/* =====================================================================
   Tokens for the drawn scene. Everything else comes from style.css.
   ===================================================================== */
:root {
  --rp-roof: #D9743B;
  --rp-door: #8A5A2B;
  --rp-rope: #C99A5B;
  --rp-rope-hi: #E8C98F;
  --rp-slick: color-mix(in srgb, var(--kid-sky) 55%, transparent);
  --rp-shadow: drop-shadow(2px 2px 0 var(--ink-a-55));
  --rp-shadow-soft: drop-shadow(2px 2px 0 var(--ink-a-35));
  /* the scene's own springy easing: kids overshoot a little when they land */
  --rp-spring: cubic-bezier(.3, 1.35, .5, 1);
}

/* ---------- replay shell: a light "TV" on the paper ---------- */
.stage-prog { background: var(--paper); border: var(--bw-s) solid var(--ink); }
.stage-prog i { width: 100%; background: var(--leaf-d); transform-origin: 0 50%; transform: scaleX(0); transition: transform var(--dur-long) linear; }
html:not(.js) .stage-prog { display: none; }
.ev { background: var(--cream); border: var(--bw-s) solid var(--ink); color: var(--ink); }
.ev-final { background: var(--turmeric); }
.chip { background: var(--paper); }
.feed { max-height: 46vh; max-height: 46dvh; }
.rs-on .feed { max-height: 30vh; max-height: 30dvh; border-top: var(--bw) dashed var(--ink); }
.rs-on .feed-ctl { padding: var(--s-3) var(--s-4) var(--s-1); }
.feed-ctl .btn { flex: 1 1 0; }
.lb-back { display: inline-flex; align-items: center; gap: var(--s-1); margin-bottom: var(--s-2); font-weight: var(--w-label); color: var(--ink); text-underline-offset: 3px; }
.lb-back:hover { color: var(--chili-d); }
.game-pill .ic { margin-right: var(--s-1); }
.stage-bar .ic { color: var(--ink); }

/* ---------- scene frame ---------- */
.rs-wrap { position: relative; background: var(--scene-sky); border-bottom: var(--bw) solid var(--ink); }
.rs-frame { position: relative; width: 100%; max-width: 560px; margin: 0 auto; overflow: hidden; height: 330px; }
.rs-stage { position: absolute; left: 0; top: 0; width: 360px; transform-origin: 0 0; overflow: hidden; background: linear-gradient(var(--scene-sky-2), var(--scene-cloud) 70%, var(--scene-grass) 70%); user-select: none; -webkit-user-select: none; }
.rs-stage > * { position: absolute; left: 0; top: 0; }
.rs-bg { width: 360px; height: 100%; z-index: 0; }
.rs-live .rs-bg .cl { animation: rs-drift 22s ease-in-out infinite alternate; }
.rs-live .rs-bg .cl2 { animation-duration: 30s; animation-delay: -9s; }
.rp-dec { z-index: 1; font-size: 28px; line-height: 1; filter: var(--rp-shadow); }
.rs-live .rp-dec-kite { animation: rs-float 4.6s ease-in-out infinite; }
.rs-live .rp-dec-hen { animation: rs-hen 14s linear infinite alternate; font-size: 24px; }
.rs-cap { margin: 0; padding: var(--s-2) var(--s-4); min-height: 3.4em; background: var(--paper); font-weight: var(--w-display); font-size: var(--t-base); line-height: 1.35; border-top: var(--bw) solid var(--ink); }
.rs-cap.pop { animation: rs-pop var(--dur-short) var(--ease-out); }
.rs-inst, .rs-inst * { transition: none !important; animation: none !important; }

/* backdrop art, drawn inline by replay.js; colours come from tokens, not from the markup */
.bg-cloud { fill: var(--paper); stroke: var(--ink); stroke-width: 2.5; }
.bg-sun { fill: var(--turmeric); stroke: var(--ink); stroke-width: 3; }
.bg-hill { fill: var(--scene-grass); stroke: var(--ink); stroke-width: 3; }
.bg-house { stroke: var(--ink); stroke-width: 2; }
.bg-wall { fill: var(--cream-d); }
.bg-roof { fill: var(--rp-roof); }
.bg-door { fill: var(--rp-door); }

/* movable things share one springy transition; JS sets transform, optionally --d */
.rs-m { transition: transform var(--d, .7s) var(--rp-spring), opacity .35s var(--ease-out); }
.rs-slow { --d: 1.1s; }
.rs-hide { opacity: 0; }

/* ---------- sticker kids ---------- */
.rp-kid { width: 32px; height: 52px; margin: -52px 0 0 -16px; transform-origin: 50% 100%; z-index: 3; pointer-events: none; }
.rp-ks { position: absolute; inset: 0; transform-origin: 50% 100%; transition: transform var(--dur-spring) var(--ease-out); }
.rp-kid-s .rp-ks { transform: scale(.7); }
.rp-kid-xs .rp-ks { transform: scale(.55); }
.rp-kid-l .rp-ks { transform: scale(1.3); }
.rp-ki { position: absolute; inset: 0; transform-origin: 50% 100%; }
.rp-kid::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: -4px; height: 8px; border-radius: 50%; background: var(--ink-a-20); }
.rp-kf { position: absolute; left: 1px; top: 0; width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ink); background: var(--kc, var(--turmeric)); font-size: 17px; line-height: 24px; text-align: center; z-index: 2; font-style: normal; font-weight: 400; }
.rp-kb { position: absolute; left: 6px; top: 28px; width: 20px; height: 22px; border-radius: 9px 9px 5px 5px; border: 3px solid var(--ink); background: var(--kc, var(--turmeric)); z-index: 1; }
.rp-kc-sky { --kc: var(--kid-sky); }
.rp-kc-chili { --kc: var(--kid-chili); }
.rp-kc-leaf { --kc: var(--kid-leaf); }
.rp-kc-turm { --kc: var(--kid-gold); }
.rp-kc-paper { --kc: var(--kid-paper); }
.rp-ktag { position: absolute; left: 50%; top: -20px; transform: translateX(-50%); z-index: 4; text-decoration: none; font-family: var(--font-d); font-weight: var(--w-display); font-size: var(--t-xs); line-height: 1; padding: var(--s-1); background: var(--turmeric); color: var(--ink); border: var(--bw-s) solid var(--ink); border-radius: 6px; white-space: nowrap; }
.rp-kid.me { z-index: 5; }
.rp-kid.me::before { content: ""; position: absolute; left: -2px; right: -2px; top: -2px; height: 36px; border-radius: 50%; border: 3px solid var(--turmeric); animation: rs-ring 1.4s var(--ease-out) 6; z-index: 0; }
.rs-live .rp-kid.walk .rp-ki { animation: rs-walk .28s ease-in-out infinite; }
.rp-kid.cheer .rp-ki { animation: rs-cheer .5s ease-in-out 8; }
.rs-live .rp-kid.wiggle .rp-ki { animation: rs-wiggle .5s ease-in-out infinite; }
.rs-live .rp-kid.breathe .rp-ki { animation: rs-breathe 2.2s ease-in-out infinite; }
.rs-live .rp-kid.lean .rp-ki { animation: rs-strain .45s ease-in-out infinite; }

.rp-bub { z-index: 8; width: 0; height: 0; pointer-events: none; }
.rp-bub span { position: absolute; left: 0; bottom: 8px; transform: translateX(-50%); background: var(--paper); border: var(--bw-s) solid var(--ink); border-radius: 12px; padding: var(--s-1) var(--s-2); font-family: var(--font-d); font-weight: var(--w-display); font-size: var(--t-xs); line-height: 1.2; white-space: nowrap; box-shadow: var(--sh-s); }
.rp-bub span::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -4px; width: 8px; height: 8px; background: var(--paper); border-right: var(--bw-s) solid var(--ink); border-bottom: var(--bw-s) solid var(--ink); transform: rotate(45deg) translate(-2px, -2px); }
.rp-bub.on span { animation: rs-pop var(--dur-short) var(--ease-out); }
.rp-bub:not(.on) { opacity: 0; }
.rp-bub.chili span { background: var(--chili-d); color: var(--on-color); }
.rp-bub.leaf span { background: var(--leaf-soft); }
.rp-bub.chili span::after { background: var(--chili-d); }
.rp-bub.leaf span::after { background: var(--leaf-soft); }

/* ---------- petak umpet ---------- */
.rp-sp-lbl { z-index: 6; width: 88px; margin: -32px 0 0 -44px; text-align: center; font-size: 11px; line-height: 1.1; font-weight: var(--w-display); padding: 2px var(--s-1); background: var(--paper); border: var(--bw-s) solid var(--ink); border-radius: 8px; }
.rp-sp-prop { z-index: 4; width: 48px; height: 48px; margin: -48px 0 0 -24px; text-align: center; font-size: 36px; line-height: 48px; filter: var(--rp-shadow-soft); }
.rp-sp-bush { z-index: 5; width: 56px; height: 16px; margin: -12px 0 0 -28px; background: var(--scene-bush); border: 3px solid var(--ink); border-radius: 50% 50% 4px 4px; }
.rp-sp-n { z-index: 7; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: var(--turmeric); border: var(--bw-s) solid var(--ink); font-family: var(--font-d); font-weight: var(--w-display); font-size: var(--t-xs); line-height: 20px; text-align: center; }
.rp-sp-n.got { background: var(--chili-d); color: var(--on-color); }
.rp-sp-n.on { animation: rs-pop2 var(--dur-short) var(--ease-out); }
.rp-sp-n:not(.on) { opacity: 0; }
.rp-sp-lbl.empty { background: var(--cream-d); border-style: dashed; color: var(--ink-3); }
.rp-sp-lbl.empty::after { content: ", kosong"; font-weight: var(--w-label); }
.rp-kid.hid .rp-ks { transform: scale(.55) translateY(4px); }
.rp-kid.me.hid .rp-ks { transform: scale(.7); }
.rp-kid.found { z-index: 6; }
.rp-kid.out { opacity: .8; z-index: 6; }
.rp-pole { z-index: 2; width: 16px; height: 56px; margin: -56px 0 0 -8px; background: repeating-linear-gradient(var(--chili) 0 9px, var(--paper) 9px 18px); border: var(--bw-s) solid var(--ink); border-radius: 4px; }
.rp-kap { position: absolute; left: 3px; top: -5px; width: 26px; height: 12px; border-radius: 12px 12px 3px 3px; background: var(--turmeric); border: var(--bw-s) solid var(--ink); z-index: 3; }
.rp-kap::after { content: ""; position: absolute; right: -9px; bottom: -2px; width: 12px; height: 4px; border: 2px solid var(--ink); border-radius: 3px; background: var(--turmeric); }
.rp-peci { position: absolute; left: 4px; top: -4px; width: 24px; height: 12px; border-radius: 4px 4px 2px 2px; background: var(--scene-peci); border: var(--bw-s) solid var(--ink); z-index: 3; }

/* ---------- tarik tambang ---------- */
.rp-tt-as { z-index: 2; width: 0; height: 0; }
.rp-tt-as > * { position: absolute; left: 0; top: 0; }
.rp-tt-rope { z-index: 4; left: -80px; top: 0; width: 520px; height: 24px; overflow: visible; }
.rp-rope-edge { stroke: var(--ink); stroke-width: 12; stroke-linecap: round; }
.rp-rope-body { stroke: var(--rp-rope); stroke-width: 6; stroke-linecap: round; }
.rp-rope-hi { stroke: var(--rp-rope-hi); stroke-width: 2; stroke-dasharray: 7 7; }
.rp-tt-flag { z-index: 5; width: 0; height: 0; }
.rp-tt-flag i { position: absolute; left: -13px; top: -4px; width: 26px; height: 16px; border: var(--bw-s) solid var(--ink); background: linear-gradient(var(--chili) 50%, var(--paper) 50%); box-shadow: var(--sh-s); transform-origin: 50% 0; }
.rs-live .rp-tt-flag i { animation: rs-flag 1.4s ease-in-out infinite alternate; }
.rp-tt-sign { z-index: 6; width: 88px; margin: -36px 0 0 -44px; text-align: center; background: var(--paper); border: var(--bw) solid var(--ink); border-radius: 12px; box-shadow: var(--sh-s); padding: var(--s-1); font-family: var(--font-d); line-height: 1.1; }
.rp-tt-sign b { display: block; font-size: var(--t-xs); font-weight: var(--w-display); }
.rp-tt-sign em { display: block; font-style: normal; font-size: var(--t-lg); font-weight: var(--w-display); font-variant-numeric: tabular-nums; }
.rp-tt-sign small { display: block; font-size: var(--t-xs); font-family: var(--font); font-weight: var(--w-display); min-height: 1.1em; }
.rp-tt-sign.kiri { background: var(--scene-tt-left); }
.rp-tt-sign.kanan { background: var(--scene-tt-right); }
.rp-tt-sign:not(.on) { opacity: 0; }
.rp-tt-sign.on { animation: rs-pop2 var(--dur-short) var(--ease-out); }
.rs-live .rp-tt-sign.on.big { animation: rs-boing 1.1s ease-in-out infinite; }
.rp-tt-line { z-index: 1; width: 0; height: 0; }
.rp-tt-line i { position: absolute; top: 0; left: -1px; width: 3px; height: 48px; background: repeating-linear-gradient(var(--paper-a-95) 0 6px, transparent 6px 12px); }
.rp-kid.tumble { z-index: 3; }
.rp-dust { z-index: 7; font-size: 20px; line-height: 1; margin: -12px 0 0 -12px; }
.rp-dust.on { animation: rs-dust 1s ease-out both; }
.rp-dust:not(.on) { opacity: 0; }

/* ---------- kelereng ---------- */
.rp-kl-ring { z-index: 1; left: 130px; top: 6px; width: 100px; height: 56px; }
.rp-ring-el { fill: var(--paper-a-40); stroke: var(--paper); stroke-width: 3; }
.rp-marble { stroke: var(--ink); stroke-width: 2; }
.rp-marble.m1 { fill: var(--kid-sky); }
.rp-marble.m2 { fill: var(--kid-chili); }
.rp-marble.m3 { fill: var(--kid-gold); }
.rp-marble.m4 { fill: var(--kid-leaf); }
.rp-kl-tile { z-index: 2; width: 64px; height: 76px; border-radius: 12px; background: var(--paper-a-70); border: var(--bw-s) dashed var(--ink-a-55); }
.rp-kl-tile.on { background: var(--paper); border: var(--bw-s) solid var(--ink); box-shadow: var(--sh-s); }
.rp-kl-tile.me { background: var(--turmeric-soft); }
.rp-kl-card { position: absolute; top: 8px; width: 24px; height: 36px; perspective: 160px; }
.rp-kl-card.a { left: 4px; }
.rp-kl-card.b { right: 4px; }
.rp-kl-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .6s var(--rp-spring); }
.rp-kl-card.flip .rp-kl-in { transform: rotateY(180deg); }
.rp-kl-f, .rp-kl-b { position: absolute; inset: 0; border: var(--bw-s) solid var(--ink); border-radius: 8px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.rp-kl-b { background: radial-gradient(circle at 35% 30%, var(--paper) 0 7%, transparent 8%), radial-gradient(circle at 50% 50%, var(--kid-sky) 0 45%, var(--sky) 46%); font-size: 11px; }
.rp-kl-f { transform: rotateY(180deg); font-size: 15px; }
.rp-kl-card.j .rp-kl-f { background: var(--leaf-soft); }
.rp-kl-card.c .rp-kl-f { background: var(--chili-soft); }
.rp-kl-vs { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); padding: 0 var(--s-1); text-align: center; font-size: 10px; font-weight: var(--w-display); line-height: 14px; font-family: var(--font-d); color: var(--ink); background: var(--paper); border: var(--bw-s) solid var(--ink); border-radius: var(--r-pill); }
.rp-kl-pt { position: absolute; top: 48px; width: 32px; text-align: center; font-family: var(--font-d); font-weight: var(--w-display); font-size: var(--t-sm); line-height: 1; opacity: 0; color: var(--leaf-d); font-variant-numeric: tabular-nums; }
.rp-kl-pt.a { left: 0; }
.rp-kl-pt.b { right: 0; }
.rp-kl-pt.neg { color: var(--chili-d); }
.rp-kl-pt.on { opacity: 1; animation: rs-rise var(--dur-long) var(--ease-out); }
.rp-kl-pt.hit { color: var(--chili-d); }
.rp-kl-pt.hit.on { animation: rs-hit var(--dur-long) var(--ease-out); }
.rp-kl-tag { position: absolute; left: 4px; bottom: 4px; font-family: var(--font-d); font-weight: var(--w-display); font-size: 11px; background: var(--turmeric); color: var(--ink); border: var(--bw-s) solid var(--ink); border-radius: 6px; padding: 0 var(--s-1); line-height: 1.3; }
.rp-kl-tag.rt { left: auto; right: 4px; }
.rp-kl-card.shake .rp-kl-in { animation: rs-shake .4s ease 2; }
.rp-kl-bar { z-index: 2; width: 150px; height: 16px; margin-left: 0; border: var(--bw-s) solid var(--ink); border-radius: 8px; background: var(--leaf-soft); overflow: hidden; }
.rp-kl-bar i { display: block; height: 100%; background: var(--chili-d); transform-origin: 0 50%; transform: scaleX(0); transition: transform .9s var(--rp-spring); }
.rp-kl-tile:not(.rdy) .rp-kl-card, .rp-kl-tile:not(.rdy) .rp-kl-vs { opacity: 0; }
.rp-kl-tile.rdy .rp-kl-card { animation: rs-pop var(--dur-long) var(--ease-out) both; }
.rp-ek-yard { z-index: 0; width: 192px; height: 280px; background: var(--scene-yard); border: var(--bw) solid var(--ink); border-radius: 16px; }
.rp-kl-more { z-index: 2; width: 152px; margin-left: -76px; text-align: center; font-size: 11px; line-height: 1.2; font-weight: var(--w-display); color: var(--ink-3); }
.rt { z-index: 5; }

/* ---------- engklek ---------- */
.rp-ek-sq { z-index: 1; width: 104px; height: 44px; margin-left: -52px; border: var(--bw) solid var(--paper); background: var(--paper-a-70); border-radius: 4px; font-family: var(--font-d); font-weight: var(--w-display); font-size: var(--t-lg); line-height: 38px; color: var(--ink); text-align: center; }
.rp-ek-sq.slick { background: var(--rp-slick); border-style: dashed; }
.rs-live .rp-ek-sq.slick { animation: rs-slick 1.2s ease-in-out infinite; }
.rp-ek-line { z-index: 1; left: 66px; width: 148px; height: 0; border-top: var(--bw) solid var(--paper-a-95); }
.rp-ek-tal { z-index: 3; width: 128px; margin-left: 0; font-size: 11px; line-height: 1.25; font-weight: var(--w-display); background: var(--paper); border: var(--bw-s) solid var(--ink); border-radius: 8px; padding: 2px var(--s-2); box-shadow: var(--sh-s); }
.rp-ek-tal b { font-family: var(--font-d); }
.rp-ek-tal .ok { color: var(--leaf-d); }
.rp-ek-tal .no { color: var(--chili-d); }
.rp-ek-tal .ic { width: 1em; height: 1em; vertical-align: -.125em; --ic-sw: 3; }
.rp-ek-tal:not(.on) { opacity: 0; }
.rp-ek-tal.on { animation: rs-pop2 var(--dur-short) var(--ease-out); }
.rp-ek-bdg { position: absolute; right: -12px; top: -4px; z-index: 6; display: inline-flex; align-items: center; gap: 1px; min-width: 20px; padding: 0 var(--s-1); height: 18px; border-radius: 9px; border: var(--bw-s) solid var(--ink); background: var(--turmeric); font-family: var(--font-d); font-weight: var(--w-display); font-size: 11px; line-height: 14px; text-align: center; color: var(--ink); }
.rp-ek-bdg .ic { width: 10px; height: 10px; --ic-sw: 3.5; }
.rp-ek-bdg.ok { background: var(--leaf-soft); }
.rp-ek-bdg.no { background: var(--chili-soft); }
.rp-ek-cup { position: absolute; right: -16px; bottom: 2px; font-size: 14px; z-index: 6; }
.rp-spark { z-index: 9; font-size: 18px; margin: -12px 0 0 -12px; }
.rp-spark.on { animation: rs-spark 1.2s ease-out both; }
.rp-spark:not(.on) { opacity: 0; }
.rs-live .rp-kid.slip .rp-ki { animation: rs-slip .5s ease-in-out 3; }

/* ---------- end card ---------- */
.rs-end { padding: var(--s-4); background: var(--cream); border-top: var(--bw) solid var(--ink); text-align: center; animation: rs-rise var(--dur-long) var(--ease-out); }
.rs-end-big { font-family: var(--font-d); font-size: clamp(1.4rem, 7vw, 2rem); line-height: 1.1; margin: 0 0 var(--s-3); font-variant-numeric: tabular-nums; }
.rs-end-big b { color: var(--leaf-d); }
.rs-end-big b:last-child { color: var(--ink); }
.rs-me { margin: var(--s-1) 0 var(--s-3); }
.rs-stamp { display: inline-block; font-family: var(--font-d); font-weight: var(--w-display); font-size: clamp(1.4rem, 7.5vw, 2.1rem); line-height: 1.1; padding: var(--s-2) var(--s-4); border: 4px solid var(--ink); border-radius: var(--r-3); box-shadow: var(--sh); color: var(--on-color); transform: rotate(-4deg); animation: rs-slam var(--dur-long) var(--ease-out) both; }
.rs-stamp.ok { background: var(--leaf-d); }
.rs-stamp.no { background: var(--turmeric); color: var(--ink); }
.rs-me-line { margin: var(--s-3) 0 0; font-weight: var(--w-display); }
.rs-end .row-actions { justify-content: center; margin-top: var(--s-2); }

/* ranking table: highlight me, scroll inside the table on long lobbies */
.rank .row-me { background: var(--turmeric-soft); }
.row-me .r-who a::after { content: "Kamu"; display: inline-block; margin-left: var(--s-2); padding: 0 var(--s-2); font-size: var(--t-xs); font-weight: var(--w-display); line-height: 1.5; color: var(--on-color); background: var(--chili-d); border: var(--bw-s) solid var(--ink); border-radius: var(--r-1); }
.rank .r-who .r-meta { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--s-3); row-gap: 0; }
.rank .r-who .r-meta .ic { margin-right: var(--s-1); }
.js .table-wrap.rs-scroll { max-height: 420px; overflow-y: auto; overscroll-behavior: contain; }

/* ---------- keyframes (transform / opacity only) ---------- */
@keyframes rs-pop { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes rs-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes rs-drift { to { transform: translateX(26px); } }
@keyframes rs-float { 50% { transform: translateY(-9px) rotate(6deg); } }
@keyframes rs-hen { from { transform: translateX(210px); } to { transform: translateX(300px); } }
@keyframes rs-walk { 50% { transform: translateY(-4px) rotate(3deg); } }
@keyframes rs-cheer { 50% { transform: translateY(-12px) scale(1.06, .94); } }
@keyframes rs-wiggle { 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
@keyframes rs-breathe { 50% { transform: scale(1.04, .96); } }
@keyframes rs-strain { 50% { transform: translateX(var(--sx, -2px)) rotate(var(--sr, -3deg)); } }
@keyframes rs-ring { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
@keyframes rs-boing { 50% { scale: 1.08; rotate: -2deg; } }
@keyframes rs-pop2 { from { opacity: 0; scale: .8; translate: 0 8px; } to { opacity: 1; scale: 1; translate: 0 0; } }
@keyframes rs-flag { to { transform: skewY(8deg) scaleX(.92); } }
@keyframes rs-dust { from { opacity: 1; scale: .6; translate: 0 0; } to { opacity: 0; scale: 1.5; translate: 0 -20px; } }
@keyframes rs-shake { 25% { transform: translateX(-2px) rotate(-4deg); } 75% { transform: translateX(2px) rotate(4deg); } }
@keyframes rs-hit { 30% { transform: translateY(6px) scale(1.4); } }
@keyframes rs-slick { 50% { transform: skewX(-4deg); } }
@keyframes rs-slip { 25% { transform: rotate(-18deg); } 75% { transform: rotate(18deg); } }
@keyframes rs-spark { 0% { opacity: 0; scale: .2; } 25% { opacity: 1; scale: 1.3; translate: 0 -6px; } 100% { opacity: 0; scale: .9; translate: 0 -26px; } }
@keyframes rs-slam { 0% { opacity: 0; transform: rotate(-4deg) scale(2); } 100% { opacity: 1; transform: rotate(-4deg) scale(1); } }

/* ============================================================
   Reveal overlay: "Lolos Gak?"
   ============================================================ */
html.rv-lock { overflow: clip; }
.rv { position: fixed; inset: 0; z-index: var(--z-overlay); display: flex; align-items: center; justify-content: center; padding: var(--s-4); overflow-y: auto; overscroll-behavior: contain; background: var(--scrim); animation: rv-fade var(--dur-short) var(--ease-out) both; -webkit-tap-highlight-color: transparent; outline: none; }
.rv-rays { position: fixed; left: 50%; top: 50%; width: 150vmax; height: 150vmax; margin: -75vmax 0 0 -75vmax; background: repeating-conic-gradient(var(--wash-turmeric) 0 10deg, transparent 10deg 20deg); animation: rv-spin 40s linear 1; pointer-events: none; opacity: 0; transition: opacity var(--dur-long) var(--ease-out); }
.rv.is-res .rv-rays { opacity: 1; }
.rv-skip { position: fixed; right: var(--s-3); top: calc(var(--s-3) + env(safe-area-inset-top, 0px)); z-index: 3; }
.rv-skip:focus-visible { outline-color: var(--focus-on-dark); }
.rv-card { position: relative; z-index: 2; width: 100%; max-width: 400px; margin: auto; padding: var(--s-6) var(--s-5) var(--s-5); text-align: center; background: var(--paper); border: 4px solid var(--ink); border-radius: var(--r-4); box-shadow: var(--sh-l); animation: rv-card-in var(--dur-long) var(--ease-out) both; }
.rv.is-drum .rv-card { animation: rv-card-in var(--dur-long) var(--ease-out) both, rv-drum .11s linear .5s infinite alternate; }
.rv.is-slam .rv-card { animation: rv-bump .45s var(--ease-out); }
.rv-q { margin: 0; font-size: clamp(2.2rem, 12vw, 3.2rem); line-height: 1.05; min-height: 1.1em; }
.rv-night { margin: var(--s-1) 0 0; font-size: var(--t-sm); line-height: 1.35; color: var(--muted); }
.rv-night b, .rv-night span { display: block; }
.rv-night b { color: var(--ink-3); }
.rv-typed::after { content: ""; display: inline-block; width: 4px; height: .85em; margin-left: 4px; vertical-align: -.05em; background: var(--chili-d); animation: rv-caret .5s steps(1) infinite; }
.rv.is-res .rv-typed::after { display: none; }
.rv-beat { display: flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 120px; margin-top: var(--s-2); }
.rv-beat .rv-disc { animation: rv-peek 1s ease-in-out infinite; }
.rv-beat i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); animation: rv-dot 1s ease-in-out infinite; }
.rv-beat i:nth-of-type(2) { animation-delay: .15s; }
.rv-beat i:nth-of-type(3) { animation-delay: .3s; }
.rv-disc { position: relative; display: grid; place-items: center; width: 96px; height: 96px; margin: 0 auto; font-size: 54px; line-height: 1; border: 4px solid var(--ink); border-radius: 50%; background: var(--turmeric); box-shadow: var(--sh); }
.rv-disc.ok { background: var(--ok-bright); }
.rv-hand { position: absolute; right: -16px; top: -8px; font-size: 32px; transform-origin: 70% 90%; animation: rv-wave .7s ease-in-out 6 alternate; }
.rv-cup { position: absolute; left: -16px; bottom: -4px; font-size: 32px; }
.rv-res { margin-top: 2px; }
.rv-res:not([hidden]) { animation: rv-fade var(--dur-short) var(--ease-out) both; }
.rv-crown { display: flex; justify-content: center; margin-bottom: -12px; animation: rv-drop var(--dur-long) var(--ease-out) .2s both; }
.rv-crown .ic { width: 64px; height: 64px; }
.rv-stamp { display: inline-block; margin: var(--s-2) 0 var(--s-1); font-family: var(--font-d); font-weight: var(--w-display); font-size: clamp(2rem, 11vw, 2.9rem); line-height: 1.1; padding: var(--s-2) var(--s-4); border: 5px solid var(--ink); border-radius: var(--r-3); box-shadow: var(--sh-l); color: var(--on-color); transform: rotate(-5deg); animation: rv-slam var(--dur-long) var(--ease-out) both; }
.rv-stamp.ok { background: var(--leaf-d); }
.rv-stamp.no { background: var(--turmeric); color: var(--ink); }
.rv-kidwrap { margin: var(--s-4) 0 var(--s-2); }
.rv-line { margin: var(--s-3) 0 var(--s-1); font-weight: var(--w-display); font-size: var(--t-md); }
.rv-rank { margin: 0 0 var(--s-4); font-weight: var(--w-label); color: var(--muted); font-variant-numeric: tabular-nums; }
.rv-rank b { color: var(--ink); font-family: var(--font-d); }
.rv-btns { display: flex; flex-direction: column; gap: var(--s-3); }
.rv-btns .btn { width: 100%; }
.rv-conf { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; }
.rv.is-res .rv-beat, .rv.is-res .rv-skip { display: none; }
.rv.is-res .rv-q { font-size: clamp(1.3rem, 6vw, 1.7rem); }
.rv.is-res .rv-res .rv-btns { animation: rv-fade var(--dur-long) var(--ease-out) .4s both; }
.rv.is-res .rv-rank, .rv.is-res .rv-line { animation: rv-fade var(--dur-long) var(--ease-out) .3s both; }

@keyframes rv-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rv-spin { to { transform: rotate(360deg); } }
@keyframes rv-card-in { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes rv-drum { from { transform: translate(-3px, 1px) rotate(-.8deg); } to { transform: translate(3px, -1px) rotate(.8deg); } }
@keyframes rv-bump { 0% { transform: scale(1); } 25% { transform: translate(-6px, 4px) scale(1.03) rotate(-1deg); } 55% { transform: translate(5px, -3px) rotate(.8deg); } 100% { transform: none; } }
@keyframes rv-caret { 50% { opacity: 0; } }
@keyframes rv-peek { 0%, 100% { transform: translateY(6px) scale(.96); } 50% { transform: translateY(-6px) scale(1.04); } }
@keyframes rv-dot { 0%, 100% { transform: scale(.5); opacity: .4; } 50% { transform: scale(1); opacity: 1; } }
@keyframes rv-wave { from { transform: rotate(-18deg); } to { transform: rotate(24deg); } }
@keyframes rv-drop { from { opacity: 0; transform: translateY(-48px) rotate(-16deg) scale(1.2); } to { opacity: 1; transform: none; } }
@keyframes rv-slam { 0% { opacity: 0; transform: rotate(-5deg) scale(2.4); } 100% { opacity: 1; transform: rotate(-5deg) scale(1); } }

@media (min-width: 640px) {
  .rs-frame { max-width: 600px; }
  .rv-btns { flex-direction: row; flex-wrap: wrap; }
  .rv-btns .btn { flex: 1 1 auto; width: auto; }
}

/* reduced motion: loops stop, entrances collapse to a plain fade, nothing runs longer than 300 ms */
@media (prefers-reduced-motion: reduce) {
  .rs-bg .cl, .rp-dec, .rp-kid *, .rp-kid::before, .rp-tt-flag i, .rp-tt-sign, .rv-rays, .rv-beat *, .rv-hand, .rv-typed::after, .rp-ek-sq, .rp-kl-card, .rp-kl-pt { animation: none !important; }
  .rv, .rv-card, .rv-res:not([hidden]), .rv-stamp, .rv-crown, .rs-end, .rs-stamp, .rs-cap.pop, .rp-bub.on span { animation: rv-fade var(--dur-short) linear both !important; }
  .rs-m, .rp-ks, .rp-kl-in, .rp-kl-bar i, .stage-prog i, .rv-rays { transition: none !important; }
  .rv-rays { display: none; }
  .rv-conf { display: none; }
  .rv.is-drum .rv-card, .rv.is-slam .rv-card { animation: rv-fade var(--dur-short) linear both !important; }
}
