/* ═══════════════════════════════════════════════════════════
   THE ARORA FAM · anniversary treasure hunt
   Midnight Vegas, love-letter edition
   ═══════════════════════════════════════════════════════════ */

:root {
  --night:      #0b0910;
  --night-soft: #17121f;
  --gold:       #f5c56b;
  --gold-hot:   #ffdf9e;
  --gold-deep:  #b8862f;
  --rose:       #e88fa4;
  --rose-deep:  #b04a63;
  --cream:      #f7efe2;
  --ink-dim:    #9c92ab;
  --red-neon:   #ff4d6d;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Jost", "Avenir Next", sans-serif;
  --neon:  "Monoton", cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: radial-gradient(120% 90% at 50% 0%, #1a1226 0%, var(--night) 55%, #060409 100%);
  color: var(--cream);
  font-family: var(--sans);
  overflow-x: hidden;
  min-height: 100svh;
}

/* ── ambient layers ─────────────────────────────── */

.stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 12%, rgba(255,255,255,.4) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 35%, rgba(245,197,107,.5) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 68%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 55%, rgba(232,143,164,.45) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 42% 88%, rgba(255,255,255,.3) 50%, transparent 51%),
    radial-gradient(1px 1px at 65% 72%, rgba(245,197,107,.4) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 85%, rgba(255,255,255,.3) 50%, transparent 51%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .5; } to { opacity: 1; } }

.grain {
  position: fixed; inset: -50%; z-index: 40; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  animation: grain-shift 1.2s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0,0); } 25% { transform: translate(-2%,3%); }
  50% { transform: translate(3%,-2%); } 75% { transform: translate(-3%,-3%); }
  100% { transform: translate(2%,2%); }
}

/* ── karaoke lyrics layer ───────────────────────── */

.lyrics-layer {
  position: fixed; inset: 0; z-index: 3;
  padding: 2vh 2vw;
  overflow: hidden;
  pointer-events: none;
  text-align: center;
  opacity: 0; transition: opacity 1.2s ease;
}
.lyrics-layer.on { opacity: 1; }

/* the line fills the ENTIRE viewport — words distributed edge to edge */
.lyrics-line {
  width: 100%; height: 100%;
  display: flex; flex-wrap: wrap;
  align-content: space-evenly; justify-content: center;
  column-gap: .3em;
  font-family: "Anton", Impact, "Arial Black", sans-serif;
  font-weight: 400; text-transform: uppercase;
  font-size: clamp(2.5rem, 10vw, 8.5rem);
  line-height: 1; letter-spacing: .015em;
  animation: lyric-line-in .7s ease both;
}
@keyframes lyric-line-in {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: none; }
}

.lyrics-line .w {
  color: rgba(247,239,226,.13);
  -webkit-text-stroke: 1px rgba(247,239,226,.08);
  transition: color .22s ease, text-shadow .22s ease;
}
.lyrics-line .w.sung {
  color: rgba(245,197,107,.5);
  -webkit-text-stroke: 1px rgba(245,197,107,.2);
  text-shadow: 0 0 34px rgba(245,197,107,.3);
}

/* ── background media ───────────────────────────── */

.photo-bg, .video-bg {
  position: fixed; inset: 0; z-index: 1;
  opacity: 0; transition: opacity 1.6s ease;
  pointer-events: none;
}
.photo-bg.show, .video-bg.show { opacity: 1; }

.photo-bg img, .video-bg video {
  width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
}
.photo-bg img {
  filter: blur(22px) brightness(.5) saturate(.85);
  transform: scale(1.12);
  transition: filter 3.2s ease, transform 3.2s ease;
}
.photo-bg.clear img {
  filter: blur(0) brightness(.72) saturate(1);
  transform: scale(1.02);
}
.photo-veil {
  position: absolute; inset: 0;
  background: radial-gradient(90% 90% at 50% 45%, transparent 30%, rgba(6,4,9,.82) 100%);
}
body.no-photo .photo-bg {
  background: radial-gradient(80% 70% at 50% 40%, #3d2340 0%, #17121f 60%, #060409 100%);
}
body.no-photo .photo-bg img { display: none; }

.video-veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,4,9,.72) 0%, rgba(6,4,9,.35) 40%, rgba(6,4,9,.8) 100%);
}

/* ── stages ─────────────────────────────────────── */

#app { position: relative; z-index: 5; }

.stage {
  position: relative; z-index: 5;
  min-height: 100svh;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6vh 20px;
}
.stage.active { display: flex; animation: stage-in .9s ease both; }
@keyframes stage-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.stage.leaving { animation: stage-out .5s ease both; }
@keyframes stage-out { to { opacity: 0; transform: translateY(-14px); } }

.hidden { display: none !important; }

/* ── shared ui ──────────────────────────────────── */

.btn-gold {
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: #2a1c05;
  background: linear-gradient(180deg, var(--gold-hot), var(--gold) 55%, var(--gold-deep));
  border: none; border-radius: 999px;
  padding: .85em 2.4em; cursor: pointer;
  box-shadow: 0 0 22px rgba(245,197,107,.35), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(245,197,107,.55), inset 0 1px 0 rgba(255,255,255,.6); }
.btn-gold:active { transform: translateY(0); }

.btn-ghost {
  font-family: var(--sans); font-size: .85rem; letter-spacing: .06em;
  color: var(--ink-dim); background: transparent;
  border: 1px solid rgba(156,146,171,.35); border-radius: 999px;
  padding: .6em 1.6em; cursor: pointer; margin-top: 14px;
  transition: color .2s, border-color .2s;
}
.btn-ghost:hover { color: var(--gold); border-color: var(--gold); }

input[type="text"] {
  font-family: var(--sans); font-size: 1.05rem; letter-spacing: .2em;
  color: var(--cream); text-align: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(245,197,107,.35);
  border-radius: 12px;
  padding: .8em 1em; outline: none; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
input[type="text"]:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(245,197,107,.15);
}
input::placeholder { color: rgba(247,239,226,.28); letter-spacing: .2em; }

.feedback {
  min-height: 1.4em; margin-top: 14px;
  font-size: .9rem; letter-spacing: .04em; color: var(--rose);
  font-weight: 500;
}
.feedback.good { color: #9be8b0; }

.shake { animation: shake .45s ease; }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-9px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); } 80% { transform: translateX(4px); }
}

/* ── stage 1 · gate ─────────────────────────────── */

.gate-card {
  width: min(480px, 94vw);
  text-align: center;
  background: linear-gradient(165deg, rgba(30,22,42,.88), rgba(14,10,20,.92));
  border: 1px solid rgba(245,197,107,.22);
  border-radius: 26px;
  padding: clamp(30px, 6vh, 54px) clamp(22px, 5vw, 46px);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(232,143,164,.06);
  backdrop-filter: blur(6px);
}

.lock-heart { color: var(--rose); margin-bottom: 14px; filter: drop-shadow(0 0 12px rgba(232,143,164,.6)); }

.neon-title {
  font-family: var(--neon); font-weight: 400;
  font-size: clamp(1.9rem, 6.5vw, 2.9rem);
  color: var(--gold-hot);
  text-shadow:
    0 0 6px rgba(255,223,158,.9), 0 0 18px rgba(245,197,107,.75),
    0 0 42px rgba(245,197,107,.5), 0 0 80px rgba(232,143,164,.35);
  animation: neon-flicker 7s linear infinite;
}
@keyframes neon-flicker {
  0%, 6.5%, 7.5%, 44%, 45.5%, 100% { opacity: 1; }
  7%, 44.8% { opacity: .55; }
}

.gate-sub {
  margin: 10px 0 26px;
  font-size: .78rem; letter-spacing: .32em; text-transform: uppercase;
  color: var(--ink-dim);
}

.gate-clue {
  position: relative;
  border: 1px dashed rgba(232,143,164,.4);
  border-radius: 16px;
  padding: 20px 18px 16px;
  margin-bottom: 26px;
}
.clue-tag {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--night-soft); color: var(--rose);
  font-size: .68rem; letter-spacing: .3em; text-transform: uppercase;
  padding: 2px 14px; border-radius: 999px; border: 1px solid rgba(232,143,164,.4);
}
.gate-clue p {
  font-family: var(--serif); font-size: 1.18rem; line-height: 1.55;
  color: var(--cream); font-style: italic;
}
.gate-clue em { font-style: normal; font-family: var(--sans); font-size: .8rem; letter-spacing: .18em; color: var(--ink-dim); }

#gateForm { display: flex; flex-direction: column; gap: 16px; align-items: center; }
#gateInput { max-width: 260px; font-size: 1.4rem; }

/* ── stage 2 · seed phrase ──────────────────────── */

.seed-card {
  width: min(680px, 94vw);
  text-align: center;
  background: linear-gradient(170deg, rgba(16,12,24,.96), rgba(10,7,15,.97));
  border: 1px solid rgba(245,197,107,.2);
  border-radius: 26px;
  padding: clamp(28px, 5vh, 48px) clamp(20px, 4vw, 44px);
  box-shadow: 0 30px 80px rgba(0,0,0,.65);
  backdrop-filter: blur(9px);
  transition: opacity .8s ease, transform .8s ease;
}
.seed-card.dissolve { opacity: 0; transform: scale(.97); pointer-events: none; }

.seed-title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  letter-spacing: .04em; color: var(--gold-hot);
  text-shadow: 0 0 30px rgba(245,197,107,.35);
}
.seed-sub {
  margin: 12px auto 28px; max-width: 46ch;
  color: var(--ink-dim); font-weight: 300; font-size: .98rem; line-height: 1.65;
}
.seed-sub strong { color: var(--cream); font-weight: 500; }

.seed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 560px) { .seed-grid { grid-template-columns: repeat(2, 1fr); } }

.seed-slot { position: relative; }
.seed-slot .num {
  position: absolute; top: 50%; left: 12px; transform: translateY(-50%);
  font-size: .7rem; color: rgba(156,146,171,.6); pointer-events: none;
}
.seed-slot input {
  font-size: .92rem; letter-spacing: .06em; text-transform: lowercase;
  padding: .75em .6em .75em 1.9em; text-align: left;
}
.seed-slot input.ok   { border-color: #67c987; box-shadow: 0 0 0 3px rgba(103,201,135,.14); }
.seed-slot input.bad  { border-color: var(--rose-deep); box-shadow: 0 0 0 3px rgba(176,74,99,.16); }

/* ── stage 3 · poem ─────────────────────────────── */

.poem-wrap {
  width: min(640px, 94vw);
  text-align: center;
  background: linear-gradient(180deg, rgba(8,6,12,.78), rgba(8,6,12,.86));
  border: 1px solid rgba(245,197,107,.16);
  border-radius: 26px;
  padding: clamp(28px, 5vh, 52px) clamp(20px, 4vw, 50px);
  backdrop-filter: blur(3px);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}

.poem-line {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 3.4vw, 1.5rem);
  line-height: 1.75; font-weight: 500;
  color: var(--cream);
  opacity: 0; transform: translateY(14px);
}
.poem-line.reveal { animation: line-in 1.1s cubic-bezier(.22,.8,.3,1) both; }
@keyframes line-in {
  from { opacity: 0; transform: translateY(14px); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
.poem-gap { margin-top: 1.1em; }

.glow {
  color: #ff5f84; font-weight: 700;
  text-shadow: 0 0 8px rgba(255,95,132,.95), 0 0 20px rgba(255,77,109,.8), 0 0 38px rgba(255,77,109,.5);
  animation: letter-glow 2.4s ease-in-out infinite alternate;
}
@keyframes letter-glow {
  from { text-shadow: 0 0 6px rgba(255,95,132,.8), 0 0 16px rgba(255,77,109,.6), 0 0 30px rgba(255,77,109,.35); }
  to   { text-shadow: 0 0 12px rgba(255,143,165,1), 0 0 28px rgba(255,77,109,.95), 0 0 54px rgba(255,77,109,.7); }
}

.final-pass { margin-top: 34px; animation: stage-in .9s ease both; }
#finalForm { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
#finalInput { max-width: 300px; letter-spacing: .12em; }
.attempts { margin-top: 12px; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-dim); }
.helpers { display: flex; flex-direction: column; align-items: center; }
.clue-reveal {
  margin-top: 16px; font-family: var(--neon); font-size: 1.5rem;
  color: var(--red-neon);
  text-shadow: 0 0 8px rgba(255,77,109,.9), 0 0 24px rgba(255,77,109,.6), 0 0 48px rgba(255,77,109,.4);
  animation: stage-in .8s ease both;
}

/* ── stage 5 · jackpot ──────────────────────────── */

#stage-jackpot { gap: 4vh; }

.grow-old {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.6rem, 5vw, 2.7rem);
  line-height: 1.4; text-align: center;
  color: var(--cream);
  text-shadow: 0 2px 30px rgba(0,0,0,.8);
  opacity: 0; animation: quote-in 2.2s ease .4s both;
}
.grow-old span { color: var(--gold-hot); text-shadow: 0 0 30px rgba(245,197,107,.5), 0 2px 30px rgba(0,0,0,.8); }
@keyframes quote-in {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

/* slot machine */

.slot {
  position: relative;
  background:
    linear-gradient(160deg, #3a1220 0%, #1e0a14 45%, #12060c 100%);
  border: 3px solid var(--gold-deep);
  border-radius: 30px;
  padding: 54px 46px 44px;
  box-shadow:
    0 0 0 6px #1a0b12, 0 0 0 8px rgba(245,197,107,.35),
    0 34px 90px rgba(0,0,0,.75), 0 0 70px rgba(245,197,107,.12);
  animation: quote-in 1.6s ease 1.1s both;
}

.slot-top {
  position: absolute; top: 16px; left: 0; right: 0;
  text-align: center;
  font-size: .72rem; letter-spacing: .42em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
}

.slot-lights { position: absolute; inset: -14px; pointer-events: none; }
.bulb {
  position: absolute; width: 11px; height: 11px; border-radius: 50%;
  background: #52434f;
  box-shadow: inset 0 -2px 3px rgba(0,0,0,.5);
  transition: background .12s, box-shadow .12s;
}
.bulb.lit {
  background: radial-gradient(circle at 35% 30%, #fff8e0, var(--gold-hot) 45%, var(--gold-deep));
  box-shadow: 0 0 10px rgba(255,223,158,.95), 0 0 22px rgba(245,197,107,.65);
}
.slot.jackpot .bulb.lit { box-shadow: 0 0 14px rgba(255,223,158,1), 0 0 34px rgba(245,197,107,.9); }

.slot-window {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(180deg, #0c0810, #201626 18%, #241a2c 50%, #201626 82%, #0c0810);
  border: 2px solid rgba(245,197,107,.5);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: inset 0 8px 24px rgba(0,0,0,.8), inset 0 -8px 24px rgba(0,0,0,.8);
}

.reel {
  width: clamp(64px, 16vw, 92px); height: clamp(64px, 16vw, 92px);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #d8cfe0 0%, #fdfaf3 30%, #fdfaf3 70%, #c8bed2 100%);
  border-radius: 10px;
  box-shadow: inset 0 4px 10px rgba(0,0,0,.35), inset 0 -4px 10px rgba(0,0,0,.3);
  overflow: hidden;
}
.reel-face {
  font-family: var(--sans); font-weight: 600;
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  color: #241430; letter-spacing: .02em;
}
.reel.spinning .reel-face { animation: reel-blur .09s linear infinite; }
@keyframes reel-blur {
  0%   { transform: translateY(-45%); filter: blur(3px); opacity: .55; }
  100% { transform: translateY(45%);  filter: blur(3px); opacity: .55; }
}
.reel.landed .reel-face { animation: reel-land .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes reel-land {
  from { transform: translateY(-60%); }
  to   { transform: none; }
}
.reel.landed { box-shadow: inset 0 4px 10px rgba(0,0,0,.35), inset 0 -4px 10px rgba(0,0,0,.3), 0 0 18px rgba(245,197,107,.55); }

.reel-sep { font-size: 2rem; color: var(--gold); font-weight: 300; }

.jackpot-banner {
  position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%) scale(0);
  font-family: var(--neon); font-size: clamp(1.6rem, 6vw, 2.4rem);
  color: var(--red-neon);
  background: #12060c;
  border: 2px solid var(--red-neon); border-radius: 14px;
  padding: 6px 26px;
  text-shadow: 0 0 8px rgba(255,77,109,.95), 0 0 26px rgba(255,77,109,.7);
  box-shadow: 0 0 30px rgba(255,77,109,.45);
  white-space: nowrap;
}
.slot.jackpot .jackpot-banner { animation: banner-pop .7s cubic-bezier(.2,1.8,.4,1) both, banner-throb 1s ease-in-out .7s infinite alternate; }
@keyframes banner-pop { to { transform: translateX(-50%) scale(1); } }
@keyframes banner-throb {
  from { box-shadow: 0 0 24px rgba(255,77,109,.4); }
  to   { box-shadow: 0 0 60px rgba(255,77,109,.85); }
}
.slot.jackpot { animation: slot-rumble .5s ease 2; }
@keyframes slot-rumble {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-3px,2px) rotate(-.4deg); }
  40% { transform: translate(3px,-2px) rotate(.4deg); }
  60% { transform: translate(-2px,-2px); }
  80% { transform: translate(2px,2px); }
}

/* lever */

.lever {
  position: absolute; top: 50%; right: -58px; transform: translateY(-50%);
  width: 54px; height: 150px; cursor: pointer; outline: none;
}
.lever:focus-visible .lever-knob { box-shadow: 0 0 0 4px rgba(245,197,107,.5), 0 0 18px rgba(255,77,109,.8); }
.lever-slot {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 16px; height: 96px;
  background: linear-gradient(180deg, #12060c, #2b1220);
  border: 2px solid var(--gold-deep); border-radius: 10px;
}
.lever-arm {
  position: absolute; left: 8px; top: 50%;
  width: 12px; height: 64px;
  background: linear-gradient(90deg, #8f8f9c, #e8e8f0 45%, #7c7c8a);
  border-radius: 8px;
  transform-origin: 6px 60px;
  transform: translateY(-62px);
  transition: transform .28s cubic-bezier(.4,0,.6,1);
}
.lever-knob {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ff8fa5, var(--red-neon) 55%, #8f1f38);
  box-shadow: 0 0 16px rgba(255,77,109,.65), inset 0 -4px 8px rgba(0,0,0,.4);
}
.lever.pulled .lever-arm { transform: translateY(-62px) rotate(160deg); }
.lever.disabled { pointer-events: none; opacity: .75; }

.slot-hint {
  position: absolute; right: -64px; top: calc(50% + 88px);
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); white-space: nowrap; transform: rotate(90deg);
  animation: hint-bob 1.6s ease-in-out infinite alternate;
}
@keyframes hint-bob { from { opacity: .5; } to { opacity: 1; } }

@media (max-width: 620px) {
  .slot { padding: 42px 14px 34px; margin-right: 44px; margin-left: 4px; }
  .slot-window { padding: 12px 10px; gap: 6px; }
  .reel { width: clamp(48px, 15vw, 92px); height: clamp(48px, 15vw, 92px); }
  .reel-face { font-size: clamp(1.5rem, 6.5vw, 2.8rem); }
  .reel-sep { font-size: 1.4rem; }
  .lever { right: -46px; }
  .slot-hint { right: -54px; font-size: .62rem; }
}

.btn-collect {
  font-family: var(--sans); font-weight: 600; font-size: 1.05rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: #2a1c05;
  background: linear-gradient(180deg, var(--gold-hot), var(--gold) 55%, var(--gold-deep));
  border: none; border-radius: 999px;
  padding: 1em 2.6em; cursor: pointer;
  box-shadow: 0 0 30px rgba(245,197,107,.5);
  animation: collect-in .7s cubic-bezier(.2,1.6,.4,1) both, collect-throb 1.2s ease-in-out .7s infinite alternate;
}
@keyframes collect-in { from { opacity: 0; transform: scale(.6) translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes collect-throb {
  from { box-shadow: 0 0 22px rgba(245,197,107,.4); transform: scale(1); }
  to   { box-shadow: 0 0 54px rgba(245,197,107,.85); transform: scale(1.04); }
}

/* ── casino rain ────────────────────────────────── */

.casino-rain {
  position: fixed; inset: 0; z-index: 4;
  overflow: hidden; pointer-events: none;
}
.casino-piece {
  position: absolute; top: -14vh; left: var(--x);
  font-size: var(--size);
  will-change: transform;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.45));
}

/* poker chip */
.chip-piece {
  width: var(--size); height: var(--size); border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255,255,255,.35), transparent 45%),
    repeating-conic-gradient(var(--chip) 0 30deg, #f7efe2 30deg 60deg);
  border: calc(var(--size) * .09) solid var(--chip);
  box-shadow: inset 0 0 0 calc(var(--size) * .14) var(--chip), inset 0 0 0 calc(var(--size) * .17) #f7efe2;
}

/* mini playing card */
.card-piece {
  width: calc(var(--size) * .72); height: var(--size);
  background: linear-gradient(160deg, #fdfaf3, #e9e2d4);
  border-radius: calc(var(--size) * .1);
  border: 1px solid rgba(0,0,0,.18);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 600;
  font-size: calc(var(--size) * .52);
  color: var(--card-color);
}
.card-piece.back {
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.16) 0 4px, transparent 4px 8px),
    linear-gradient(160deg, #7d1f35, #4a0f1e);
  color: transparent;
}

/* ── heart speaker toggle ───────────────────────── */

.sound-toggle {
  position: fixed; top: 16px; right: 16px; z-index: 45;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12,8,18,.72);
  border: 1px solid rgba(245,197,107,.35);
  border-radius: 50%;
  color: var(--rose);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color .2s, transform .2s;
}
.sound-toggle:hover { border-color: var(--gold); transform: scale(1.08); }
.sound-toggle svg { width: 26px; height: 26px; overflow: visible; }
.sound-toggle .heart { fill: currentColor; }
.sound-toggle .waves {
  stroke: var(--gold); stroke-width: 1.8; fill: none; stroke-linecap: round;
}
.sound-toggle.playing .heart { animation: heart-beat 1.05s ease-in-out infinite; transform-origin: 40% 50%; }
.sound-toggle.playing .waves { animation: wave-pulse 1.05s ease-in-out infinite; }
@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  18% { transform: scale(1.14); }
  36% { transform: scale(1); }
  50% { transform: scale(1.1); }
}
@keyframes wave-pulse {
  0%, 100% { opacity: .5; }
  30% { opacity: 1; }
}
.sound-toggle.muted { color: rgba(156,146,171,.8); }
.sound-toggle.muted .waves { display: none; }
.sound-toggle .slash {
  stroke: var(--rose-deep); stroke-width: 2.2; stroke-linecap: round; display: none;
}
.sound-toggle.muted .slash { display: block; }

/* ── final modal ────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,2,8,.78);
  backdrop-filter: blur(8px);
  animation: stage-in .6s ease both;
  padding: 20px;
}

.modal-card {
  position: relative; z-index: 2;
  width: min(560px, 94vw);
  text-align: center;
  background: linear-gradient(165deg, #241428, #120a16);
  border: 2px solid var(--gold);
  border-radius: 30px;
  padding: clamp(36px, 7vh, 60px) clamp(24px, 5vw, 52px);
  box-shadow: 0 0 0 8px rgba(245,197,107,.12), 0 40px 110px rgba(0,0,0,.8), 0 0 90px rgba(245,197,107,.25);
  animation: modal-pop .8s cubic-bezier(.2,1.5,.4,1) both;
}
@keyframes modal-pop { from { opacity: 0; transform: scale(.7) translateY(30px); } to { opacity: 1; transform: none; } }

.modal-tickets { font-size: 2.6rem; margin-bottom: 6px; }

.modal-title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  color: var(--cream); line-height: 1.45;
}
.modal-neon {
  display: inline-block; margin-top: 10px;
  font-family: var(--neon); font-weight: 400;
  font-size: clamp(1.7rem, 6vw, 2.6rem);
  line-height: 1.35;
  color: var(--red-neon);
  text-shadow: 0 0 8px rgba(255,77,109,.9), 0 0 26px rgba(255,77,109,.65), 0 0 60px rgba(255,77,109,.4);
}

.modal-sub {
  margin-top: 22px;
  font-family: var(--serif); font-style: italic; font-weight: 600;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  color: var(--gold-hot);
  text-shadow: 0 0 26px rgba(245,197,107,.5);
}
.modal-detail {
  margin-top: 14px;
  font-size: .8rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--ink-dim);
}
.modal-heart {
  margin-top: 24px;
  font-family: var(--serif); font-style: italic;
  font-size: 1.15rem; color: var(--rose);
}

/* confetti */
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i {
  position: absolute; top: -4vh;
  width: 9px; height: 15px; display: block;
  animation: confetti-fall linear both infinite;
}
@keyframes confetti-fall {
  0%   { transform: translateY(-6vh) rotate(0) rotateY(0); }
  100% { transform: translateY(110vh) rotate(720deg) rotateY(540deg); }
}
