/* Not My Event: the look of "Santa Left the Group Chat" (public/templates/santa-left-the-chat.html), a neon Christmas Eve invitation that starts as a group chat Santa just left.
   Five scenes on one fixed stage: the chat (the phone flips over into the workshop door), a 3D carousel of holiday liabilities, a conveyor belt of presents, a fridge full of snacks, the party.
   The stage is only paint; every word and button is real page text. Only transform and opacity are animated, and nothing flashes. */
:root {
  --plum: #241532; --lime: #D8FF75; --pink: #FF70A6; --red: #ED3449; --mint: #55E5BA; --white: #FFF6ED; --lav: #B58CFF; --gold: #FFD66D;
  --ink: #FFF6ED; --muted: #D6C8EE; --edge: rgba(255, 246, 237, .26);
  --sky1: #1A0F2A; --sky2: #3A1F5C; --sky3: #241532;
  --disp: 'Lilita One', 'Arial Rounded MT Bold', 'Arial Black', sans-serif;
  --body: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --top: calc(86px + env(safe-area-inset-top, 0px));
}
body[data-theme="candy"] { --sky1: #35142E; --sky2: #8A2A6B; --sky3: #3B1A44; --lime: #FFF08A; }
body[data-theme="frost"] { --sky1: #0D1B33; --sky2: #1F4E7A; --sky3: #14263F; --pink: #8FD3FF; --lime: #C8FFE9; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.rm { scroll-behavior: auto; }
body { margin: 0; min-height: 100vh; background: var(--sky1); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.5; overflow-x: hidden; }
body.modal { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 12px; background: var(--lime); color: var(--plum); font-weight: 800; text-decoration: none; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }

/* ---------- The stage ---------- */
#world { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--sky1); }
.sky { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.sky.s1 { background: radial-gradient(110% 80% at 50% 105%, #5B2A7A 0%, var(--sky1) 62%); }
.sky.s2 { background: radial-gradient(60% 90% at 50% -10%, rgba(216, 255, 117, .35) 0%, transparent 60%), radial-gradient(120% 80% at 50% 110%, #E04C8F 0%, var(--sky2) 50%, var(--sky3) 100%); }
.sky.s3 { background: radial-gradient(100% 70% at 50% 100%, #ED3449 0%, #7A2457 45%, var(--sky3) 100%); }
.sky.s4 { background: radial-gradient(90% 70% at 50% 60%, #55E5BA 0%, #2A7C86 42%, var(--sky3) 100%); }
.sky.s5 { background: radial-gradient(110% 70% at 50% 15%, #7A3FC9 0%, var(--sky3) 62%, #130A26 100%); }
body[data-scene="chat"] .sky.s1, body[data-scene="cast"] .sky.s2, body[data-scene="gifts"] .sky.s3, body[data-scene="snacks"] .sky.s4, body[data-scene="party"] .sky.s5 { opacity: 1; }
.snow { position: absolute; inset: 0; pointer-events: none; }
.snow i { position: absolute; top: -10px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: #fff; opacity: .7; animation: snowfall var(--t) linear var(--d) infinite; }
@keyframes snowfall { from { transform: translate3d(0, -4vh, 0); } to { transform: translate3d(var(--w), 108vh, 0); } }
.beams { position: absolute; left: 50%; top: -30%; width: 220vmax; height: 220vmax; margin-left: -110vmax; opacity: 0; transition: opacity 1.2s ease; background: conic-gradient(from 0deg, transparent 0 8%, rgba(255, 112, 166, .22) 10% 14%, transparent 16% 30%, rgba(216, 255, 117, .16) 32% 36%, transparent 38% 55%, rgba(181, 140, 255, .26) 57% 62%, transparent 64% 80%, rgba(85, 229, 186, .2) 82% 86%, transparent 88%); animation: beams 60s linear infinite; }
body[data-scene="party"] .beams { opacity: 1; }
@keyframes beams { to { transform: rotate(360deg); } }
#cut { position: fixed; inset: 0; z-index: 40; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, transparent 0 30%, var(--cutc, #FF70A6) 62%, transparent 63%); clip-path: circle(0% at 50% 50%); }
#cut.go { animation: iris .8s ease-out; }
@keyframes iris { 0% { clip-path: circle(0% at 50% 50%); opacity: 0; } 35% { opacity: .55; } 100% { clip-path: circle(90% at 50% 50%); opacity: 0; } }

/* ---------- The always-there bits ---------- */
.hud { position: fixed; z-index: 50; left: 0; right: 0; top: 0; padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px)); display: grid; gap: 7px; background: linear-gradient(rgba(20, 10, 40, .8), rgba(20, 10, 40, 0)); }
.hud-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand { font-family: var(--disp); font-size: 15px; letter-spacing: .02em; text-transform: uppercase; color: var(--lime); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hbtn { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--edge); background: rgba(36, 21, 50, .75); color: var(--white); font-size: 14px; font-weight: 700; }
.prog { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.prog button { flex: 1; height: 26px; padding: 0; border: 0; background: none; position: relative; }
.prog button i { position: absolute; left: 0; right: 0; top: 11px; height: 5px; border-radius: 4px; background: rgba(255, 246, 237, .26); transition: background .3s; }
.prog button[aria-current="true"] i { background: var(--lime); box-shadow: 0 0 10px rgba(216, 255, 117, .7); }
.prog button.done i { background: var(--pink); }
.prog button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.jump { flex: none; color: var(--white); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 6px 2px; }
#cap { position: fixed; z-index: 55; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; width: min(560px, calc(100vw - 24px)); padding: 12px 16px; border-radius: 18px; background: rgba(20, 10, 40, .95); border: 1.5px solid var(--edge); box-shadow: 0 14px 34px rgba(0, 0, 0, .5); font-size: 16px; }
#cap b { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
#cap.in { animation: capin .35s ease-out; }
@keyframes capin { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Shared pieces ---------- */
#story { position: relative; z-index: 2; }
.scene { position: relative; }
.wrap { width: min(1080px, 100%); margin: 0 auto; padding: calc(var(--top) + 26px) max(18px, env(safe-area-inset-right, 0px)) 72px max(18px, env(safe-area-inset-left, 0px)); display: grid; gap: 18px; min-height: 100svh; align-content: start; }
.kick { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--lime); }
h2 { font-family: var(--disp); font-weight: 400; font-size: clamp(30px, 7vw, 58px); line-height: 1.02; text-transform: uppercase; text-shadow: 0 3px 0 var(--plum), 0 0 24px rgba(255, 112, 166, .45); }
.lead { font-size: clamp(17px, 2.4vw, 20px); max-width: 40em; text-shadow: 0 1px 0 rgba(36, 21, 50, .6); }
.note { font-size: 14px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 26px; border: 0; border-radius: 999px; background: linear-gradient(rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 55%), var(--lime); color: var(--plum); font-family: var(--disp); font-size: 17px; letter-spacing: .03em; text-transform: uppercase; text-decoration: none; box-shadow: inset 0 -4px 0 rgba(36, 21, 50, .22), 0 6px 0 var(--plum), 0 12px 26px rgba(0, 0, 0, .35); transition: transform .12s; }
.btn:active { transform: translateY(4px); box-shadow: inset 0 -3px 0 rgba(36, 21, 50, .22), 0 2px 0 var(--plum); }
.btn.hot { background: linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 55%), var(--pink); }
.btn.red { background: linear-gradient(rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 55%), var(--red); color: #fff; }
.btn.big { min-height: 62px; padding: 0 32px; font-size: clamp(16px, 4.4vw, 21px); }
.btn.ghost { background: rgba(36, 21, 50, .65); color: var(--white); box-shadow: inset 0 0 0 2px var(--edge); }
.btn[disabled] { opacity: .55; cursor: default; }
.linkish { padding: 8px 4px; border: 0; background: none; color: var(--white); font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.glass { border-radius: 26px; border: 2px solid var(--edge); background: linear-gradient(160deg, rgba(255, 246, 237, .16), rgba(255, 246, 237, .05)); box-shadow: 0 18px 40px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .25); }
.field { display: grid; gap: 6px; }
.field label, .flabel, legend { font-size: 14px; font-weight: 800; padding: 0; }
.field input[type="text"], .field select, .field textarea { width: 100%; min-height: 52px; padding: 10px 14px; border-radius: 14px; border: 2px solid var(--edge); background: rgba(20, 10, 40, .72); color: var(--white); font-size: 16px; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--lime); outline: none; }
.err { padding: 10px 14px; border-radius: 14px; background: rgba(237, 52, 73, .25); border: 1.5px solid var(--red); font-weight: 700; }
.react { min-height: 28px; font-family: var(--disp); font-size: clamp(18px, 3.4vw, 26px); color: var(--lime); text-transform: uppercase; text-shadow: 0 2px 0 var(--plum); }
.scene [data-a] { opacity: 0; transform: translateY(26px) scale(.96); transition: opacity .6s ease, transform .7s cubic-bezier(.16, 1, .3, 1); transition-delay: var(--d, 0ms); }
.scene.seen [data-a], .scene.always [data-a] { opacity: 1; transform: none; }

/* ---------- Scene 1: the group chat, the flip and the workshop door ---------- */
.s-chat { min-height: 100svh; }
.s-chat .wrap { align-content: center; justify-items: center; min-height: 100svh; padding-bottom: 28px; gap: 12px; }
.stage3 { perspective: 1400px; width: 100%; display: grid; place-items: center; }
.flipper { position: relative; width: min(90vw, 380px); height: min(64svh, 560px); transform-style: preserve-3d; transition: transform .8s cubic-bezier(.5, 0, .2, 1); }
.flipper.flipped { transform: rotateY(180deg); }
.face-f, .face-b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 36px; overflow: hidden; }
.face-f { display: flex; flex-direction: column; background: #12081E; border: 7px solid #3A2656; box-shadow: 0 0 0 2px #000, 0 28px 60px rgba(0, 0, 0, .55), 0 0 60px rgba(255, 112, 166, .4); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
.face-b { transform: rotateY(180deg); background: #0B0514; display: grid; place-items: center; box-shadow: 0 28px 60px rgba(0, 0, 0, .55); }
/* The back of the phone is the North Pole workshop door (SNT.workshop() in santa-art.js). Once the phone has flipped the two doors swing open on a warm light, the light spills onto the snow,
   and a flash of it fills the phone as the next scene comes in. */
.ws { width: 100%; height: 100%; display: grid; place-items: center; padding: 14px 12px 12px; }
.ws .ws-svg { width: 100%; height: 100%; display: block; }
.ws-leaf { transform-box: fill-box; }
.ws-l { transform-origin: left center; }
.ws-r { transform-origin: right center; }
.flipper.flipped .ws-l { animation: wsl .9s cubic-bezier(.5, 0, .2, 1) .95s forwards; }
.flipper.flipped .ws-r { animation: wsr .9s cubic-bezier(.5, 0, .2, 1) .95s forwards; }
@keyframes wsl { to { transform: scaleX(.1); } }
@keyframes wsr { to { transform: scaleX(.1); } }
.ws-spill { opacity: 0; }
.flipper.flipped .ws-spill { animation: wsspill .6s ease-out 1.3s forwards; }
@keyframes wsspill { to { opacity: 1; } }
.ws-b { animation: wstw 1.1s steps(1) infinite; }
@keyframes wstw { 50% { opacity: .35; } }
.ws-flash { position: absolute; left: 50%; top: 54%; width: 34%; aspect-ratio: 1; border-radius: 50%; translate: -50% -50%; background: radial-gradient(circle, #FFFBEA 0 28%, #FFD66D 52%, rgba(255, 214, 109, 0) 72%); opacity: 0; transform: scale(.5); pointer-events: none; }
.flipper.flipped .ws-flash { animation: wsflash .9s ease-in 1.45s forwards; }
@keyframes wsflash { to { opacity: 1; transform: scale(10); } }
.ph-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: #1B0F2B; border-bottom: 1px solid #3A2656; }
.ph-name { flex: 1; min-width: 0; font-size: 16px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-count { font-size: 12px; color: #A89BC9; }
.ph-feed { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; padding: 12px; overflow: hidden; position: relative; }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 92%; animation: bub .35s cubic-bezier(.2, 1.4, .4, 1); }
.msg.you { align-self: flex-end; flex-direction: row-reverse; }
@keyframes bub { from { transform: translateY(14px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.msg .face { flex: none; width: 32px; height: 32px; }
.bub { padding: 8px 13px 9px; border-radius: 18px 18px 18px 6px; background: #31204A; color: #fff; font-size: 16px; line-height: 1.3; }
.bub small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; color: var(--c, #A89BC9); margin-bottom: 1px; }
.msg.you .bub { background: var(--pink); color: var(--plum); border-radius: 18px 18px 6px 18px; font-weight: 700; }
.sys { align-self: center; padding: 6px 14px; border-radius: 999px; background: rgba(237, 52, 73, .22); border: 1px solid var(--red); color: #FFB3BB; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-align: center; animation: bub .35s ease-out; }
.sys.ok { background: rgba(85, 229, 186, .16); border-color: var(--mint); color: var(--mint); }
.bub .fd { width: 56px; display: block; margin-top: 4px; }
.ph-type { display: flex; gap: 4px; padding: 0 16px 8px; }
.ph-type i { width: 8px; height: 8px; border-radius: 50%; background: #9A8CC0; animation: dot 1s ease-in-out infinite; }
.ph-type i:nth-child(2) { animation-delay: .15s; } .ph-type i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { transform: none; opacity: .5; } 50% { transform: translateY(-4px); opacity: 1; } }
.qr { display: grid; gap: 8px; padding: 6px 12px 14px; }
.qr button { min-height: 46px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--lime); background: rgba(216, 255, 117, .12); color: var(--lime); font-weight: 800; font-size: 15px; text-align: center; }
.qr button:active { transform: scale(.97); }
.qr p { font-size: 12px; color: #A89BC9; text-align: center; }
.effect { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.effect .rain { position: absolute; top: -50px; left: var(--x); width: 44px; animation: snowfall 2.4s ease-in var(--d) 1 forwards; --w: 0px; }
.effect .puff { position: absolute; bottom: 10px; left: var(--x); width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .5), rgba(120, 120, 140, .25)); animation: puff 2.6s ease-out var(--d) 1 forwards; opacity: 0; }
@keyframes puff { 0% { transform: translateY(0) scale(.4); opacity: 0; } 25% { opacity: .9; } 100% { transform: translateY(-300px) scale(2.2); opacity: 0; } }
.effect .pop { position: absolute; left: 50%; top: 40%; width: 16px; height: 16px; margin: -8px; border-radius: 50%; background: var(--c); animation: confetti 1s ease-out forwards; }
@keyframes confetti { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }
.chat-ctl { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.hero1 { text-align: center; max-width: 30em; }

/* ---------- Scene 2: the carousel of liabilities and the ID ---------- */
.ring-wrap { perspective: 1200px; padding: 8px 0 4px; overflow: hidden; touch-action: pan-y; }
.ring { position: relative; width: var(--cw, 230px); height: var(--ch, 340px); margin: 14px auto; transform-style: preserve-3d; transform: translateZ(calc(var(--R) * -1)) rotateY(calc(var(--k, 0) * var(--step) * -1)); transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.rc { position: absolute; inset: 0; transform: rotateY(calc(var(--i) * var(--step))) translateZ(var(--R)); border-radius: 26px; border: 3px solid var(--ac, var(--lime)); background: linear-gradient(170deg, color-mix(in srgb, var(--ac, #D8FF75) 42%, #2a1a40), #2a1a40 72%); box-shadow: 0 0 0 4px var(--plum), 0 18px 34px rgba(0, 0, 0, .45); display: grid; grid-template-rows: auto auto 1fr; justify-items: center; gap: 4px; padding: 12px 12px 14px; text-align: center; color: var(--white); opacity: .5; transition: opacity .5s; }
.rc.front { opacity: 1; box-shadow: 0 0 0 4px var(--plum), 0 0 34px color-mix(in srgb, var(--ac, #D8FF75) 60%, transparent), 0 18px 34px rgba(0, 0, 0, .45); }
.rc .elf, .rc .pic { width: 100%; max-width: 150px; display: block; }
.rc h3 { font-family: var(--disp); font-weight: 400; font-size: 20px; line-height: 1.05; text-transform: uppercase; text-shadow: 0 2px 0 var(--plum); }
.rc .p { font-size: 14px; font-weight: 600; line-height: 1.25; }
.rc .stats { width: 100%; display: grid; gap: 4px; margin: 4px 0 0; align-self: end; }
.rc .stats div { display: flex; justify-content: space-between; gap: 6px; font-size: 11.5px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, .3); }
.rc .stats dt { font-weight: 700; } .rc .stats dd { margin: 0; font-weight: 900; color: var(--ac, var(--lime)); }
.rc.chosen::after { content: "YOU"; position: absolute; top: -10px; right: -8px; padding: 2px 12px; border-radius: 999px; background: var(--lime); color: var(--plum); font-family: var(--disp); font-size: 14px; transform: rotate(8deg); }
.ring-ctl { display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; }
.arrow { width: 56px; height: 56px; border-radius: 50%; border: 2.5px solid var(--edge); background: rgba(36, 21, 50, .7); font-size: 26px; line-height: 1; }
.cast-grid { display: grid; gap: 20px; }
.rsvp-grid { display: grid; gap: 22px; }
.idbox { display: grid; gap: 14px; justify-items: center; }
.idcard { position: relative; width: min(100%, 340px); aspect-ratio: 9 / 14; display: grid; grid-template-rows: auto auto auto auto 1fr auto; gap: 7px; justify-items: center; align-content: start; text-align: center; padding: 16px 16px 14px; border-radius: 26px; border: 4px solid var(--plum); background: linear-gradient(170deg, color-mix(in srgb, var(--ac, #D8FF75) 55%, #7A3FC9), #2a1a40 62%, #1a0f2a); box-shadow: 0 0 0 4px var(--ac, var(--lime)), 0 0 40px color-mix(in srgb, var(--ac, #D8FF75) 50%, transparent), 0 20px 44px rgba(0, 0, 0, .45); overflow: hidden; }
.id-top { width: 100%; display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.id-av { width: 56%; } .id-av .elf { width: 100%; display: block; }
.id-name { font-family: var(--disp); font-size: clamp(20px, 5.6vw, 26px); line-height: 1; text-transform: uppercase; text-shadow: 0 2px 0 var(--plum); overflow-wrap: anywhere; }
.id-role { font-weight: 800; color: var(--ac, var(--lime)); font-size: 14.5px; }
.id-punch { font-size: 12.5px; opacity: .92; }
.id-stats { width: 100%; display: grid; gap: 4px; margin: 0; align-self: start; }
.id-stats div { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 4px 9px; border-radius: 9px; background: rgba(0, 0, 0, .32); }
.id-stats dt { font-weight: 700; } .id-stats dd { margin: 0; font-weight: 900; color: var(--ac, var(--lime)); }
.id-foot { width: 100%; display: grid; gap: 2px; font-size: 12px; }
.id-status { display: inline-block; justify-self: center; padding: 3px 12px; border-radius: 999px; background: var(--ac, var(--lime)); color: var(--plum); font-weight: 900; letter-spacing: .05em; text-transform: uppercase; font-size: 12px; }

/* ---------- Scene 3: the conveyor belt of presents ---------- */
.belt { position: relative; overflow: hidden; border-radius: 22px; padding: 26px 0 38px; background: linear-gradient(rgba(0, 0, 0, .15), rgba(0, 0, 0, .35)); border: 2px solid var(--edge); }
.belt::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: repeating-linear-gradient(90deg, #3a2a4a 0 22px, #2a1a3a 22px 44px); border-top: 3px solid var(--plum); }
.belt-track { display: flex; gap: 22px; width: max-content; padding-left: 22px; animation: belt 46s linear infinite; }
.belt:hover .belt-track, .belt:focus-within .belt-track, .belt.hold .belt-track { animation-play-state: paused; }
@keyframes belt { to { transform: translateX(-50%); } }
.present { flex: none; width: 112px; padding: 4px; border: 0; background: none; text-align: center; color: var(--white); font-size: 13px; font-weight: 700; }
.present .gf { width: 100%; display: block; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .3)); }
.present.shake .gf { animation: shake .6s linear; }
.present.open .gf { animation: hop .6s cubic-bezier(.3, 1.6, .5, 1) forwards; opacity: .55; filter: grayscale(.5); }
@keyframes shake { 0%, 100% { transform: none; } 15% { transform: translateX(-7px) rotate(-6deg); } 30% { transform: translateX(7px) rotate(6deg); } 45% { transform: translateX(-6px) rotate(-5deg); } 60% { transform: translateX(6px) rotate(5deg); } 80% { transform: translateX(-2px); } }
@keyframes hop { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-22px) scale(1.15); } 100% { transform: none; } }
.fortune { min-height: 120px; padding: 18px; display: grid; gap: 8px; justify-items: center; text-align: center; }
.fortune .gf { width: 70px; }
.fortune p { font-size: clamp(18px, 3.4vw, 24px); font-weight: 700; max-width: 28em; }
.xchg { padding: 20px; display: grid; gap: 12px; }
.xchg h3 { font-family: var(--disp); font-weight: 400; font-size: clamp(22px, 5vw, 30px); text-transform: uppercase; text-shadow: 0 2px 0 var(--plum); }
.xchg .pair { font-family: var(--disp); font-size: clamp(30px, 8vw, 48px); color: var(--lime); text-transform: uppercase; text-shadow: 0 3px 0 var(--plum); overflow-wrap: anywhere; }
.xrow { display: grid; gap: 10px; }

/* ---------- Scene 4: the fridge ---------- */
.fridge { position: relative; width: min(100%, 560px); margin: 0 auto; padding: 12px; border-radius: 30px; background: linear-gradient(#EAF6F6, #BFD9DD); border: 4px solid var(--plum); box-shadow: 0 0 0 4px #9FC4CB, 0 24px 50px rgba(0, 0, 0, .45); perspective: 1400px; }
.fridge-in { position: relative; border-radius: 20px; background: radial-gradient(90% 90% at 50% 20%, #FFFBE6, #CFF3EE 70%, #A5E0D8); border: 3px solid var(--plum); padding: 6px 0 4px; overflow: hidden; }
.door { position: absolute; inset: 0; z-index: 3; border-radius: 20px; background: linear-gradient(110deg, #F4FBFB, #CFE3E6 60%, #BBD3D8); border: 3px solid var(--plum); transform-origin: left center; transition: transform 1.1s cubic-bezier(.5, 0, .2, 1); display: grid; place-items: center; }
/* The door handle is a real button on the frame: it opens the door, and it closes it again (the label beside it says which). While the door is shut the snacks behind it can not be tapped or tabbed to. */
.fridge:not(.open) .fridge-in { visibility: hidden; transition: visibility 0s linear 1.1s; }
.handle { position: absolute; z-index: 4; right: 12px; top: 22%; bottom: 22%; width: 54px; padding: 0; border: 0; background: none; display: flex; justify-content: flex-end; align-items: stretch; cursor: pointer; font-family: inherit; -webkit-tap-highlight-color: transparent; }
.handle::before { content: "open"; align-self: center; margin-right: 8px; writing-mode: vertical-rl; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--plum); }
.fridge.open .handle::before { content: "close"; }
.handle i { display: block; width: 14px; border-radius: 7px; background: #8CA9AE; border: 2px solid var(--plum); transform-origin: 100% 50%; transition: background .3s, transform .2s; }
.fridge:not(.open) .handle i { animation: handleglow 1.8s ease-in-out infinite; }
.fridge.open .handle i { background: var(--pink); }
.handle:hover i { transform: scaleX(1.3); }
.handle:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 10px; }
@keyframes handleglow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 112, 166, 0); } 50% { box-shadow: 0 0 0 7px rgba(255, 112, 166, .5); } }
.door .magnet { font-family: var(--disp); font-size: 22px; color: var(--plum); text-align: center; text-transform: uppercase; transform: rotate(-3deg); max-width: 8em; }
.door { pointer-events: none; }
.fridge.open .door { transform: rotateY(-112deg); }
.snack-ctl { display: grid; gap: 12px; justify-items: center; text-align: center; padding: 6px 14px 14px; color: var(--plum); }
.snack-ctl .st { font-weight: 800; }
.snack-ctl .joke { font-family: var(--disp); font-size: clamp(18px, 4vw, 24px); text-transform: uppercase; color: var(--plum); }
.rc.snack { color: var(--plum); border-color: var(--plum); background: linear-gradient(170deg, #fff, #E8F8F4); }
.rc.snack h3 { text-shadow: none; font-size: 18px; }
.rc.snack .cat { font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: #2A7C86; }
.rc.snack .stt { font-size: 13px; font-weight: 700; }
.rc.snack.sold { opacity: .6; }
.rc.snack.mine { box-shadow: 0 0 0 4px var(--plum), 0 0 0 8px var(--pink); }
.counter { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; min-height: 90px; align-items: flex-start; }
.counter p { color: var(--muted); align-self: center; }
.ct { display: grid; justify-items: center; gap: 2px; width: 74px; font-size: 12px; text-align: center; line-height: 1.15; }
.ct .fd { width: 52px; } .ct.me { color: var(--lime); font-weight: 800; }

/* ---------- Scene 5: the party ---------- */
.party-top { display: grid; gap: 14px; justify-items: center; }
.set { position: relative; width: 100%; max-width: 640px; display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; align-items: end; margin: 0 auto; }
.tree { width: 100%; display: block; } .bulb { animation: twinkle 2.6s ease-in-out infinite alternate; } .bulb:nth-child(odd) { animation-delay: .9s; }
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
.tv { position: relative; border-radius: 18px; border: 5px solid #0B0514; background: #1D1030; box-shadow: 0 0 0 3px var(--pink), 0 18px 34px rgba(0, 0, 0, .45); padding: 8px 8px 12px; text-align: center; }
.tv .santa-big { width: 62%; margin: 0 auto; display: block; }
.tv.talk .mouth { animation: yap .22s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
@keyframes yap { from { transform: scaleY(.5); } to { transform: scaleY(1.5); } }
.tv .live { position: absolute; top: 8px; left: 10px; padding: 1px 8px; border-radius: 6px; background: var(--red); font-size: 10.5px; font-weight: 900; letter-spacing: .12em; }
.tv .capt { margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, .55); font-size: 14px; font-weight: 600; line-height: 1.3; }
.disco-box { height: clamp(100px, 20vw, 150px); display: flex; justify-content: center; pointer-events: none; margin: -8px 0 -20px; }
.disco-box .disco-svg { width: clamp(100px, 20vw, 150px); height: auto; transform-origin: 50% 0; animation: sway 6s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
.facts { padding: 18px; display: grid; gap: 8px; }
.f-rows { display: grid; gap: 8px; margin: 0; }
.f-rows div { display: grid; grid-template-columns: 6.6em 1fr; gap: 10px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 246, 237, .08); }
.f-rows dt { font-weight: 800; color: var(--lime); font-size: 14px; } .f-rows dd { margin: 0; overflow-wrap: anywhere; }
.f-rows a { color: var(--lime); font-weight: 700; }
.f-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.f-actions .btn { min-height: 46px; padding: 0 18px; font-size: 14px; }
.paper { padding: 20px 18px; display: grid; gap: 14px; }
.paper .form { display: grid; gap: 14px; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span { display: grid; place-items: center; min-height: 56px; padding: 8px 12px; border-radius: 16px; border: 2.5px solid var(--edge); background: rgba(20, 10, 40, .6); font-weight: 800; text-align: center; }
.choice input:checked + span { border-color: var(--lime); background: rgba(216, 255, 117, .22); box-shadow: 0 0 0 3px var(--lime); }
.choice input:focus-visible + span { outline: 3px solid var(--lime); outline-offset: 3px; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.stepper { display: inline-flex; align-items: center; gap: 14px; }
.stepper button { width: 52px; height: 52px; border-radius: 50%; border: 2.5px solid var(--edge); background: rgba(20, 10, 40, .6); font-size: 26px; font-weight: 800; line-height: 1; }
.stepper output { min-width: 34px; text-align: center; font-family: var(--disp); font-size: 26px; }
.consent { font-size: 13px; color: var(--muted); }
.result { display: grid; gap: 10px; justify-items: center; text-align: center; }
.result h3 { font-family: var(--disp); font-weight: 400; font-size: clamp(22px, 5vw, 34px); text-transform: uppercase; text-shadow: 0 2px 0 var(--plum); }
.finale { display: grid; gap: 14px; justify-items: center; }
.share-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: end center; background: rgba(10, 4, 24, .72); }
.sheet { position: relative; width: min(560px, 100%); max-height: 90vh; max-height: 90dvh; overflow: auto; display: grid; gap: 14px; padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px)); border-radius: 28px 28px 0 0; background: #2B1844; border: 2px solid var(--edge); border-bottom: 0; }
.sheet h2 { font-size: clamp(24px, 6vw, 32px); }
.sheet .x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--edge); background: none; font-size: 24px; line-height: 1; }
@media (min-width: 700px) { .overlay { place-items: center; } .sheet { border-radius: 28px; border-bottom: 2px solid var(--edge); } .xrow { grid-template-columns: 1fr auto; align-items: end; } }
@media (min-width: 1000px) { .cast-grid { grid-template-columns: 1.4fr minmax(300px, 360px); align-items: start; } .rsvp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 22px; align-items: start; } }

/* ---------- Calmer ---------- */
.rm *, .rm *::before, .rm *::after, .lite *, .lite *::before, .lite *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
.rm .snow, .rm .beams, .lite .snow, .lite .beams { display: none; }
.rm .belt, .lite .belt { overflow-x: auto; }
.rm .belt-track, .lite .belt-track { animation: none; }
