/* ==========================================================================
   Mommy's Birthday Carnival — core styles
   Night fair palette: deep plum sky, string-light gold, candy cherry & cream
   ========================================================================== */

:root {
  /* palette */
  --night: #120d26;
  --night-2: #1d1236;
  --plum: #34174a;
  --wine: #5a1d47;
  --cherry: #e2344f;
  --rose: #ff7a98;
  --gold: #ffcf6b;
  --gold-hi: #fff2c4;
  --gold-deep: #d9932c;
  --cream: #fff3dc;
  --cream-dim: #e9d9bd;
  --mint: #7fdcc6;
  --ink: #241427;
  --muted: rgba(255, 243, 220, .62);

  /* type */
  --f-script: "Pinyon Script", cursive;
  --f-sign: "Bagel Fat One", system-ui, sans-serif;
  --f-serif: "Fraunces", Georgia, serif;
  --f-hand: "Caveat", cursive;
  --f-mono: "Space Mono", ui-monospace, monospace;

  /* scale */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);
  --glow: 0 0 18px rgba(255, 207, 107, .55), 0 0 48px rgba(255, 207, 107, .25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--night);
  color: var(--cream);
  font-family: var(--f-serif);
  font-variation-settings: "SOFT" 50;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button {
  font: inherit; color: inherit; background: none; border: 0; cursor: pointer;
  touch-action: manipulation;          /* no double-tap zoom, no tap delay */
  -webkit-touch-callout: none;
  -webkit-user-select: none; user-select: none;
}
canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px dashed var(--gold); outline-offset: 4px; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

#sky, #fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#sky { z-index: 0; }
#fx { z-index: 90; }

.screen { position: relative; z-index: 1; min-height: 100svh; display: none; }
.screen.is-active { display: block; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .85;
}

/* ---------- the marquee title (layered: script / bulbs / serif) -------- */
.marquee-title {
  display: grid;
  justify-items: center;
  line-height: .82;
  margin-top: var(--s-4);
  font-weight: 400;
}
.t-script {
  font-family: var(--f-script);
  font-size: clamp(3.4rem, 15vw, 6.5rem);
  color: var(--cream);
  transform: rotate(-7deg) translate(-18%, 18%);
  justify-self: center;
  z-index: 2;
  text-shadow: 0 0 22px rgba(255, 207, 107, .6), 0 2px 0 var(--wine);
}
.t-bulbs {
  position: relative;
  font-family: var(--f-sign);
  font-size: clamp(3.1rem, 15.5vw, 7.6rem);
  letter-spacing: .01em;
  color: var(--cherry);
  -webkit-text-stroke: 2px var(--gold);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 #7a1630, 0 10px 30px rgba(226, 52, 79, .45);
}
.t-bulbs::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  -webkit-text-stroke: 0;
  text-shadow: none;
  color: transparent;
  background-image: radial-gradient(circle, var(--gold-hi) 0 24%, rgba(255, 207, 107, .9) 30%, transparent 46%);
  background-size: .15em .15em;
  -webkit-background-clip: text;
  background-clip: text;
  animation: bulbs 1.6s steps(2) infinite;
}
@keyframes bulbs {
  0% { background-position: 0 0; opacity: 1; }
  100% { background-position: .075em .075em; opacity: .8; }
}
.t-serif {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-size: clamp(2.5rem, 11vw, 5.2rem);
  letter-spacing: -.03em;
  color: var(--gold-hi);
  transform: translate(22%, -8%);
}
.marquee-title.small .t-script { font-size: clamp(2.8rem, 12vw, 5rem); }
.marquee-title.small .t-bulbs { font-size: clamp(2.6rem, 12.5vw, 5.8rem); }
.marquee-title.small .t-serif { font-size: clamp(2.1rem, 9vw, 4rem); }

/* ---------- buttons ----------------------------------------------------- */
.btn {
  --notch: 9px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 52px;
  padding: 0 var(--s-6);
  font-family: var(--f-sign);
  font-size: 18px;
  letter-spacing: .02em;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-deep));
  border-radius: 8px;
  -webkit-mask: radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle var(--notch) at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle var(--notch) at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18);
  transition: transform .25s var(--ease-back), filter .2s;
}
.btn:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.06); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.ghost {
  background: transparent;
  color: var(--cream);
  -webkit-mask: none; mask: none;
  border: 1.5px dashed rgba(255, 243, 220, .45);
  box-shadow: none;
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .08em;
  min-height: 44px;
}
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ==========================================================================
   GATE
   ========================================================================== */
#gate { padding: var(--s-7) var(--s-4) var(--s-8); text-align: center; overflow: hidden; }
.gate-head { margin-bottom: var(--s-5); }

.gate-frame { position: relative; width: min(340px, 86vw); margin: 0 auto; }
.gate-arch {
  height: 74px;
  border: 6px solid var(--gold-deep);
  border-bottom: 0;
  border-radius: 170px 170px 0 0;
  display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 120%, rgba(255, 207, 107, .18), transparent 70%);
  position: relative;
}
.gate-arch::before {   /* bulbs on the arch */
  content: "";
  position: absolute; inset: -10px -10px 0;
  border-radius: 180px 180px 0 0;
  background: radial-gradient(circle, var(--gold-hi) 0 2.5px, transparent 3.5px) 0 0 / 18px 18px;
  -webkit-mask: radial-gradient(farthest-side at 50% 100%, #0000 calc(100% - 9px), #000 calc(100% - 8px));
          mask: radial-gradient(farthest-side at 50% 100%, #0000 calc(100% - 9px), #000 calc(100% - 8px));
  animation: twinkle 1.2s steps(2) infinite;
}
.arch-word { font-family: var(--f-mono); font-weight: 700; letter-spacing: .4em; font-size: 12px; color: var(--gold); padding-top: var(--s-4); }

.gate-doors {
  position: relative;
  height: 250px;
  perspective: 900px;
  border-left: 6px solid var(--gold-deep);
  border-right: 6px solid var(--gold-deep);
}
.door {
  position: absolute; top: 0; bottom: 0; width: 50%;
  background:
    radial-gradient(circle at 50% 22px, var(--gold) 0 5px, transparent 6px) 0 0 / 28px 100% repeat-x,
    repeating-linear-gradient(90deg, transparent 0 11px, #b67a2a 11px 15px, transparent 15px 28px),
    linear-gradient(180deg, transparent 0 48%, #b67a2a 48% 52%, transparent 52%);
  transition: transform 1.4s var(--ease);
}
.door-l { left: 0; transform-origin: left center; border-right: 2px solid #b67a2a; }
.door-r { right: 0; transform-origin: right center; border-left: 2px solid #b67a2a; }
#gate.open .door-l { transform: rotateY(-100deg); }
#gate.open .door-r { transform: rotateY(100deg); }

.padlock {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -40%);
  width: 172px;
  transition: transform .9s var(--ease), opacity .6s;
  z-index: 2;
}
.shackle {
  width: 96px; height: 70px;
  margin: 0 auto -18px;
  border: 14px solid #c9cbd3;
  border-bottom: 0;
  border-radius: 60px 60px 0 0;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .6);
  transition: transform .5s var(--ease-back);
}
.lock-body {
  height: 104px;
  border-radius: 18px;
  background: linear-gradient(160deg, var(--gold-hi), var(--gold) 35%, var(--gold-deep));
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), 0 14px 30px rgba(0, 0, 0, .4);
  display: grid; place-items: center;
}
.code-slots { display: flex; gap: 8px; }
.code-slots span {
  width: 30px; height: 44px;
  display: grid; place-items: center;
  font-family: var(--f-mono); font-weight: 700; font-size: 24px;
  color: var(--cream);
  background: var(--ink);
  border-radius: 6px;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, .6);
}
.code-slots span.filled { animation: pop .25s var(--ease-back); }
.padlock.shake { animation: shake .45s; }
.padlock.unlocked .shackle { transform: translateY(-22px); }
#gate.open .padlock { transform: translate(-50%, 160%) rotate(18deg); opacity: 0; transition-delay: .3s; }

.gate-hint {
  font-family: var(--f-hand);
  font-size: 24px;
  color: var(--cream-dim);
  margin: var(--s-5) auto var(--s-4);
  max-width: 30ch;
  min-height: 2.4em;
  text-wrap: balance;
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 64px);
  gap: var(--s-3);
  justify-content: center;
}
.key {
  width: 64px; height: 64px;
  border-radius: 50%;
  font-family: var(--f-mono); font-weight: 700; font-size: 22px;
  color: var(--ink);
  background: radial-gradient(circle at 35% 30%, var(--gold-hi), var(--gold) 40%, var(--gold-deep) 100%);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .2), 0 0 0 4px rgba(255, 207, 107, .15);
  transition: transform .15s var(--ease-back);
}
.key:active { transform: scale(.9); }
.key.alt { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 2px rgba(255, 207, 107, .4); font-size: 18px; }
#gate.open .keypad, #gate.open .gate-hint { opacity: 0; transition: opacity .4s; }

/* phones: everything on one screen, keypad in thumb reach */
@media (max-height: 900px) and (max-width: 600px) {
  #gate { padding: var(--s-5) var(--s-4) var(--s-5); min-height: 100svh; display: none; flex-direction: column; justify-content: space-between; }
  #gate.is-active { display: flex; }
  .gate-head { margin-bottom: var(--s-3); }
  .gate-head .marquee-title { margin-top: var(--s-2); }
  .gate-head .t-script { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .gate-head .t-bulbs { font-size: clamp(2.5rem, 13vw, 3.6rem); }
  .gate-head .t-serif { font-size: clamp(2rem, 9vw, 2.6rem); }
  .gate-frame { width: min(250px, 70vw); }
  .gate-arch { height: 48px; border-width: 5px; }
  .arch-word { padding-top: var(--s-3); font-size: 10px; }
  .gate-doors { height: clamp(120px, 22svh, 190px); border-width: 5px; }
  .padlock { width: 150px; transform: translate(-50%, -42%) scale(.85); }
  .code-slots { gap: 5px; }
  .code-slots span { width: 27px; height: 40px; font-size: 21px; }
  .gate-hint { font-size: 21px; margin: var(--s-3) auto var(--s-3); min-height: 2.2em; }
  .keypad { grid-template-columns: repeat(3, 56px); gap: var(--s-2) var(--s-4); }
  .key { width: 56px; height: 56px; font-size: 20px; }
}
@media (max-height: 700px) and (max-width: 600px) {
  .gate-doors { height: 108px; }
  .padlock { transform: translate(-50%, -46%) scale(.72); }
  .gate-head .t-script { font-size: 2.4rem; }
  .gate-head .t-bulbs { font-size: 2.4rem; }
  .gate-head .t-serif { font-size: 1.9rem; }
  .key { width: 52px; height: 52px; }
  .keypad { grid-template-columns: repeat(3, 52px); }
}

/* ==========================================================================
   MAP
   ========================================================================== */
#map { padding-bottom: var(--s-8); }

.hud {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  background: linear-gradient(180deg, rgba(18, 13, 38, .95), rgba(18, 13, 38, .75) 70%, transparent);
}
.hud-label { font-family: var(--f-mono); font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.hud-slots { display: flex; gap: 6px; }
.hud-slot {
  width: 30px; height: 20px;
  border-radius: 3px;
  border: 1.5px dashed rgba(255, 207, 107, .4);
  transition: all .5s var(--ease-back);
}
.hud-slot.on {
  border: 0;
  background: linear-gradient(135deg, var(--gold-hi), var(--gold) 50%, var(--gold-deep));
  box-shadow: var(--glow);
  -webkit-mask: radial-gradient(circle 4px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 4px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 4px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 4px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
}
.hud-slot.on.fresh { animation: pop .6s var(--ease-back); }

.map-head { position: relative; text-align: center; padding: var(--s-5) var(--s-4) var(--s-7); overflow: hidden; }
.garland { position: absolute; left: 0; top: 0; width: 100%; height: 70px; pointer-events: none; }
.garland svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.garland path { fill: none; stroke: rgba(255, 243, 220, .35); stroke-width: 1.2; }
.garland .bulb {
  position: absolute;
  width: 9px; height: 13px;
  margin: -2px 0 0 -4.5px;
  border-radius: 50% 50% 45% 45%;
  background: var(--c);
  box-shadow: 0 0 8px var(--c), 0 0 22px var(--c);
  animation: twinkle 1.4s ease-in-out infinite alternate;
}
.garland .bulb::before { content: ""; position: absolute; left: 2px; top: -4px; width: 5px; height: 5px; background: #4a3a4e; border-radius: 1px; }
.ferris {
  position: absolute;
  right: -70px; top: 30px;
  width: 260px; height: auto;
  opacity: .35;
  z-index: -1;
}
.ferris .wheel { animation: spin 60s linear infinite; transform-origin: 0 0; }
.ferris .gondola { animation: counter 60s linear infinite; transform-box: fill-box; transform-origin: 50% 0; }
.map-head .eyebrow { margin-top: var(--s-6); }
.map-lede {
  margin: var(--s-5) auto 0;
  max-width: 34ch;
  font-size: 17px;
  line-height: 1.6;
  color: var(--cream-dim);
  font-variation-settings: "opsz" 14, "SOFT" 100;
  text-wrap: balance;
}
.map-lede em { font-style: italic; color: var(--gold); }

.midway { position: relative; max-width: 640px; margin: 0 auto; }
.path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.path .trail { fill: none; stroke: rgba(255, 207, 107, .22); stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; }
.path .trail-lit { fill: none; stroke: var(--gold); stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; filter: drop-shadow(0 0 6px var(--gold)); animation: march 1.2s linear infinite; }

.stop {
  position: absolute;
  width: 168px;
  display: grid; justify-items: center;
  text-align: center;
  transform: translateX(-50%);
  transition: filter .4s, opacity .4s, transform .3s var(--ease-back);
}
.stop .tent { width: 150px; height: auto; overflow: visible; }
.stop .tent .flag { animation: flag 1.6s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 0 100%; }
.stop.big { width: 240px; }
.stop.big .tent { width: 230px; }
@media (min-width: 800px) {
  .stop { width: 210px; }
  .stop .tent { width: 196px; }
  .stop.big { width: 300px; }
  .stop.big .tent { width: 290px; }
}
.sign {
  margin-top: -6px;
  padding: var(--s-2) var(--s-3) var(--s-2);
  background: var(--cream);
  color: var(--ink);
  border-radius: 6px;
  box-shadow: 0 4px 0 var(--cream-dim), 0 10px 24px rgba(0, 0, 0, .35);
  min-width: 140px;
  transform: rotate(var(--tilt, -2deg));
}
.sign-no { display: block; font-family: var(--f-mono); font-size: 10px; letter-spacing: .24em; color: var(--wine); }
.sign-name { display: block; font-family: var(--f-sign); font-size: 19px; line-height: 1.05; margin-top: 2px; }
.sign-state { display: block; font-family: var(--f-hand); font-size: 18px; color: var(--cherry); margin-top: 2px; }

.stop.locked { filter: grayscale(.85) brightness(.55); cursor: not-allowed; }
.stop.locked .sign-state { color: #6d5a6e; }
.stop.open { animation: bob 2.2s ease-in-out infinite; }
.stop.open .tent { filter: drop-shadow(0 0 22px rgba(255, 207, 107, .55)); }
.stop.open:hover { transform: translateX(-50%) scale(1.04); }
.stop.done .sign::after {
  content: "WON";
  position: absolute; right: -14px; top: -14px;
  font-family: var(--f-mono); font-weight: 700; font-size: 11px; letter-spacing: .14em;
  color: var(--ink);
  background: var(--gold);
  padding: 6px 7px;
  border-radius: 50%;
  transform: rotate(14deg);
  box-shadow: var(--glow);
}
.stop.done .sign { position: relative; }

.map-foot {
  text-align: center;
  font-family: var(--f-hand);
  font-size: 22px;
  color: var(--muted);
  padding: var(--s-6) var(--s-4) 0;
}

/* ==========================================================================
   BOOTH OVERLAY
   ========================================================================== */
.booth {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column;
  background:
    radial-gradient(ellipse 120% 60% at 50% 0%, rgba(90, 29, 71, .9), transparent 70%),
    radial-gradient(ellipse 90% 50% at 50% 110%, rgba(255, 207, 107, .12), transparent 70%),
    var(--night);
  animation: boothIn .55s var(--ease);
}
.booth.leaving { animation: boothOut .4s var(--ease) forwards; }
.awning {
  height: 40px; flex: none;
  background: repeating-linear-gradient(90deg, var(--cherry) 0 36px, var(--cream) 36px 72px);
  -webkit-mask: radial-gradient(circle 18px at 18px 22px, #000 98%, #0000) 0 100% / 36px 40px repeat-x,
                linear-gradient(#000 0 0) 0 0 / 100% 22px no-repeat;
          mask: radial-gradient(circle 18px at 18px 22px, #000 98%, #0000) 0 100% / 36px 40px repeat-x,
                linear-gradient(#000 0 0) 0 0 / 100% 22px no-repeat;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .25));
}
.booth-head {
  position: relative;
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-3) var(--s-4) var(--s-2);
}
.back {
  flex: none;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em;
  padding: var(--s-2) var(--s-3);
  border: 1.5px solid rgba(255, 243, 220, .3);
  border-radius: 6px;
  color: var(--cream-dim);
  transition: border-color .2s, color .2s;
}
.back:hover { border-color: var(--gold); color: var(--gold); }
.booth-titles { flex: 1; text-align: center; padding-right: 48px; }
@media (max-width: 480px) {
  .booth-head { flex-direction: column; align-items: center; padding-top: var(--s-2); }
  .back { position: absolute; left: var(--s-4); top: var(--s-2); }
  .booth-titles { padding: 0 52px; }
  .booth-head h2 { font-size: clamp(19px, 5.6vw, 28px); white-space: nowrap; }
  .btn { padding: 0 var(--s-5); font-size: 16px; white-space: nowrap; }
  .btn.ghost { padding: 0 var(--s-3); font-size: 12px; }
  .booth-foot { gap: var(--s-2); flex-wrap: wrap; }
  .booth-sub { font-size: 18px; margin: 4px -36px 0; }
}
.booth-num { font-family: var(--f-mono); font-size: 10px; letter-spacing: .3em; color: var(--gold); }
.booth-head h2 { font-family: var(--f-sign); font-weight: 400; font-size: clamp(26px, 7vw, 40px); line-height: 1; margin-top: 4px; text-wrap: balance; }
.booth-sub { font-family: var(--f-hand); font-size: 20px; color: var(--cream-dim); margin-top: 4px; text-wrap: balance; }

.booth-stage {
  flex: 1;
  position: relative;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;        /* no accidental pull-to-refresh mid-game */
  -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: var(--s-3) var(--s-4) var(--s-4);
}
.booth-foot { flex: none; display: flex; justify-content: center; gap: var(--s-3); padding: 0 var(--s-4) calc(var(--s-5) + env(safe-area-inset-bottom)); min-height: var(--s-4); }
.booth-foot:empty { padding: 0; }
.booth-foot .btn { animation: rise .6s var(--ease-back); }

/* ---------- shared reveal pieces --------------------------------------- */
.note {
  position: relative;
  max-width: 340px;
  padding: var(--s-5) var(--s-5) var(--s-4);
  background:
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(90, 29, 71, .12) 31px 32px),
    var(--cream);
  color: var(--ink);
  border-radius: 3px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
  transform: rotate(var(--tilt, -1.5deg));
  animation: noteIn .7s var(--ease-back);
}
.note::before {   /* tape */
  content: "";
  position: absolute; top: -12px; left: 50%;
  width: 96px; height: 24px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 207, 107, .7);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
}
.note h3 { font-family: var(--f-serif); font-style: italic; font-weight: 600; font-size: 22px; font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1; color: var(--wine); }
.note p { font-family: var(--f-hand); font-size: 23px; line-height: 1.38; margin-top: var(--s-2); }
.note .from { display: block; text-align: right; font-family: var(--f-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--wine); margin-top: var(--s-3); }

.polaroid {
  background: #fffaf0;
  padding: 10px 10px 34px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .45);
  transform: rotate(var(--tilt, 2deg));
  position: relative;
}
.polaroid .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #ddd; }
.polaroid figcaption { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-family: var(--f-hand); font-size: 19px; color: var(--ink); }
.ph-fallback {
  width: 100%; aspect-ratio: 4 / 3;
  display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 207, 107, .5), transparent 60%),
    repeating-linear-gradient(45deg, #f4d6dd 0 10px, #f9e6ea 10px 20px);
  color: var(--wine);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  padding: var(--s-3);
}
.ph-fallback b { display: block; font-family: var(--f-script); font-size: 34px; letter-spacing: 0; text-transform: none; font-weight: 400; }

.toast {
  position: absolute; left: 50%; top: 40%;
  transform: translate(-50%, -50%);
  font-family: var(--f-sign); font-size: 34px;
  color: var(--gold);
  text-shadow: 0 4px 0 var(--wine), var(--glow);
  pointer-events: none;
  animation: toast 1.1s var(--ease) forwards;
  white-space: nowrap;
  z-index: 5;
}

/* ==========================================================================
   GOLDEN TICKET
   ========================================================================== */
.ticket-pop {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background: rgba(18, 13, 38, .7);
  animation: fade .3s;
}
.gticket {
  width: min(320px, 82vw);
  height: 140px;
  display: flex;
  color: #5b3a07;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0) 0 18px, rgba(255, 255, 255, .25) 18px 22px),
    linear-gradient(135deg, var(--gold-hi), var(--gold) 40%, var(--gold-deep) 75%, var(--gold) 100%);
  border-radius: 10px;
  -webkit-mask: radial-gradient(circle 12px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 12px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 12px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat,
                radial-gradient(circle 12px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
  filter: drop-shadow(0 0 30px rgba(255, 207, 107, .6));
  animation: ticketIn .8s var(--ease-back);
}
.gticket.fly { animation: ticketFly .8s var(--ease) forwards; }
.gt-left { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 var(--s-5); border-right: 2px dashed rgba(91, 58, 7, .4); }
.gt-admit { font-family: var(--f-mono); font-weight: 700; font-size: 11px; letter-spacing: .4em; }
.gt-name { font-family: var(--f-script); font-size: 44px; line-height: 1; margin: 2px 0; }
.gt-booth { font-family: var(--f-sign); font-size: 15px; }
.gt-right { width: 56px; display: grid; place-items: center; }
.gt-no { writing-mode: vertical-rl; font-family: var(--f-mono); font-size: 12px; letter-spacing: .2em; }

/* ---------- jukebox (music + sound toggle) ------------------------------ */
.jukebox {
  position: fixed; right: var(--s-4); bottom: calc(var(--s-4) + env(safe-area-inset-bottom)); z-index: 95;
  width: 56px; height: 56px;
  transition: width .3s var(--ease), height .3s var(--ease);
}
.jb-disc {
  position: absolute; inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle, var(--gold) 0 14%, #111 15% 17%, transparent 18%),
    repeating-radial-gradient(circle, #1b1b1f 0 2px, #26262c 2px 4px);
  box-shadow: 0 0 0 3px var(--gold), var(--glow);
  transition: filter .3s;
}
.jb-disc iframe { position: absolute; left: 50%; top: 50%; width: 112px; height: 63px; transform: translate(-50%, -50%); border: 0; pointer-events: none; opacity: .9; }
.jb-disc::after {   /* record grooves over the video */
  content: "";
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle, #111 0 9%, var(--gold) 10% 13%, transparent 14%),
    repeating-radial-gradient(circle, transparent 0 3px, rgba(0, 0, 0, .18) 3px 4px);
  pointer-events: none;
}
.jukebox.playing .jb-disc { animation: spin 6s linear infinite; }
.jukebox.muted .jb-disc { filter: grayscale(1) brightness(.45); animation-play-state: paused; }
.jb-btn { position: absolute; inset: 0; border-radius: 50%; }
.jb-btn span {
  position: absolute; right: -5px; top: -5px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; color: var(--ink);
  background: var(--gold);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.jukebox.muted .jb-btn span { background: var(--cream-dim); text-decoration: line-through; }
.jb-btn:hover + .jb-disc, .jukebox:hover .jb-disc { box-shadow: 0 0 0 3px var(--gold-hi), var(--glow); }
.jb-now {
  position: absolute; right: calc(100% + 10px); top: 50%;
  white-space: nowrap;
  font-family: var(--f-hand); font-size: 19px;
  color: var(--ink);
  background: var(--cream);
  padding: 4px 12px;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
  opacity: 0;
  transform: translate(12px, -50%);
  transition: opacity .4s, transform .5s var(--ease);
  pointer-events: none;
}
.jukebox.show-now .jb-now { opacity: 1; transform: translate(0, -50%); }
.jukebox.no-video .jb-disc iframe { visibility: hidden; }
.jukebox.tap-to-play .jb-disc { z-index: 2; animation: pulse 1.2s ease-in-out infinite; }
.jukebox.tap-to-play .jb-disc iframe { pointer-events: auto; width: 140px; height: 80px; opacity: 1; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(255, 207, 107, .45), var(--glow); } }
.booth:not([hidden]) ~ .jukebox { bottom: auto; top: calc(var(--s-3) + 40px); width: 44px; height: 44px; }
.booth:not([hidden]) ~ .jukebox .jb-now { right: 0; top: calc(100% + 10px); transform: translateY(-6px); font-size: 17px; }
.booth:not([hidden]) ~ .jukebox.show-now .jb-now { transform: none; }

/* ---------- keyframes --------------------------------------------------- */
@keyframes twinkle { from { opacity: .45; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes counter { to { transform: rotate(-360deg); } }
@keyframes march { to { stroke-dashoffset: -28; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes flag { from { transform: skewY(-6deg); } to { transform: skewY(8deg) scaleX(.9); } }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes shake { 20%, 60% { translate: -10px 0; } 40%, 80% { translate: 10px 0; } }
@keyframes boothIn { from { transform: translateY(100%); } }
@keyframes boothOut { to { transform: translateY(100%); } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes noteIn { from { opacity: 0; transform: translateY(30px) rotate(-8deg) scale(.9); } }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.6); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -90%) scale(1); } }
@keyframes ticketIn { from { transform: scale(.2) rotate(-30deg); opacity: 0; } }
@keyframes ticketFly { to { transform: translate(var(--fx, 40vw), var(--fy, -45vh)) scale(.1) rotate(20deg); opacity: .2; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
