@font-face {
  font-family: "Antonio";
  src: url("../fonts/antonio.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --night: #0a1430;
  --night-2: #12224a;
  --night-3: #1b3470;
  --glow: #3f8cff;
  --ice: #d8ebff;
  --text: #f3f7ff;
  --muted: #b9c8e6;
  --line: rgba(214, 230, 255, 0.22);
  --glass: rgba(16, 32, 72, 0.62);
  --glass-strong: rgba(12, 24, 56, 0.86);
  --gold: #f3c35b;
  --gold-2: #e0a63a;
  --gold-ink: #3a2405;
  --paper: #fbf6ea;
  --paper-ink: #1a2547;
  --red: #b3262f;
  --ok: #8fe3b0;
  --err: #ffb3b3;
  --wa: #25d366;

  --font-display: "Antonio", "Arial Narrow", sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 160ms;
  --t-mid: 420ms;
  --t-slow: 900ms;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
img { display: block; max-width: 100%; }
svg { fill: currentColor; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Shared ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 1rem; letter-spacing: 0.01em; text-decoration: none;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-mid) var(--ease-out), filter var(--t-fast);
  user-select: none; -webkit-user-select: none;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }
.btn--gold {
  color: var(--gold-ink);
  background: linear-gradient(180deg, #ffd983 0%, var(--gold) 45%, var(--gold-2) 100%);
  box-shadow: 0 10px 30px -10px rgba(243, 195, 91, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn--gold:disabled { filter: saturate(0.4) brightness(0.8); cursor: progress; }
.btn--wa { color: #062e16; background: var(--wa); box-shadow: 0 10px 30px -12px rgba(37, 211, 102, 0.8); }
.link {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 6px;
  background: none; border: 0;
  color: var(--muted); font-size: 0.95rem; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(185, 200, 230, 0.4);
}
.link svg { width: 18px; height: 18px; }
.link:hover { color: var(--text); }
.eyebrow {
  margin: 0 0 14px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
}

.screen {
  position: fixed; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-slow) var(--ease-in-out), visibility 0s linear var(--t-slow);
}
.screen.is-active { opacity: 1; visibility: visible; transition: opacity var(--t-slow) var(--ease-in-out), visibility 0s; }

.snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; transition: opacity var(--t-slow); }
body.is-playing .snow { opacity: 0; }

/* ---------- Gate ---------- */
.gate { display: grid; place-items: end center; padding: 24px 22px calc(36px + var(--safe-bottom)); }
.gate__backdrop {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 20, 48, 0.15) 0%, rgba(10, 20, 48, 0.55) 45%, var(--night) 88%),
    url("../img/poster-intro.webp") center 30% / cover no-repeat;
  transform: scale(1.06);
  animation: drift 24s var(--ease-in-out) infinite alternate;
}
@keyframes drift { to { transform: scale(1.14) translateY(-2%); } }
.gate__inner { position: relative; z-index: 6; width: 100%; max-width: 520px; text-align: center; }
.gate__title {
  margin: 0 0 18px;
  font-family: var(--font-display); font-weight: 200; text-transform: uppercase;
  font-size: clamp(3.4rem, 17vw, 6.5rem); line-height: 0.92; letter-spacing: 0.01em;
  text-wrap: balance;
}
.gate__text { margin: 0 auto 28px; max-width: 36ch; color: var(--ice); font-size: 1.02rem; }
.gate__ask { margin: 0 auto 16px; max-width: 26ch; font-size: 1.2rem; font-weight: 700; line-height: 1.3; color: #fff; text-wrap: balance; }
.gate__actions { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.btn--hero {
  width: 100%; max-width: 360px; min-height: 68px;
  font-size: 1.2rem;
  animation: rise 1.1s var(--ease-out) both, glow 2.6s 1.4s var(--ease-in-out) infinite;
}
.btn--hero svg { width: 22px; height: 22px; }
@keyframes glow {
  50% { box-shadow: 0 0 0 10px rgba(243, 195, 91, 0.12), 0 0 46px 6px rgba(243, 195, 91, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
}
.gate__note { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--muted); font-size: 0.85rem; }
.gate__note svg { width: 16px; height: 16px; }
.gate__inner > * { animation: rise 1.1s var(--ease-out) both; }
.gate__inner > :nth-child(2) { animation-delay: 120ms; }
.gate__inner > :nth-child(3) { animation-delay: 240ms; }
.gate__inner > :nth-child(4) { animation-delay: 360ms; }
.gate__inner > :nth-child(5) { animation-delay: 480ms; }
.gate__inner > :nth-child(6) { animation-delay: 600ms; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Stage ---------- */
.stage { background: #050a18; }
.stage__bg {
  position: absolute; inset: -40px;
  background-position: center; background-size: cover;
  filter: blur(34px) saturate(1.25) brightness(0.55);
  transform: scale(1.1);
  transition: background-image 1.2s;
}
.stage__video {
  --size: min(100vw, 100dvh);
  position: absolute; left: 50%; top: 50%;
  width: var(--size); aspect-ratio: 1;
  transform: translate(-50%, -50%) translate(var(--sx, 0px), var(--sy, 0px)) scale(var(--ss, 1));
  transition: transform 1s var(--ease-out), width 0s, aspect-ratio 0s;
  border-radius: 0;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
.stage__video.is-wide { width: min(100vw, calc(100dvh * 16 / 9)); aspect-ratio: 16 / 9; }
@media (min-width: 600px) { .stage__video { border-radius: 18px; } .stage__video.is-wide { border-radius: 0; } }
.stage__video video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 600ms var(--ease-in-out), filter 1s var(--ease-out);
}
.stage__video video.is-on { opacity: 1; }
.stage__video::after {
  /* soft scrim under the choice panel, invisible while a video plays */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 10, 24, 0.75) 100%);
  opacity: 0; transition: opacity 1s var(--ease-out);
}
.stage.is-choosing .stage__video::after { opacity: 1; }
.stage.is-choosing .stage__video video.is-on { filter: brightness(0.82) saturate(1.05); }

.stage__loading { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity 300ms; pointer-events: none; }
.stage__loading.is-on { opacity: 1; transition-delay: 500ms; }
.stage__loading span { width: 34px; height: 34px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: var(--gold); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }

.hud {
  position: absolute; left: 0; right: 0; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-top)) 12px 10px;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud__btn {
  min-width: 44px; height: 44px; padding: 0 12px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(8, 16, 40, 0.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--text); font-size: 0.85rem; font-weight: 600;
  transition: opacity var(--t-mid), transform var(--t-fast) var(--ease-out);
}
.hud__btn:active { transform: scale(0.95); }
.hud__btn svg { width: 20px; height: 20px; }
.hud__btn .i-off, .hud__btn[aria-pressed="true"] .i-on { display: none; }
.hud__btn[aria-pressed="true"] .i-off { display: block; }
.hud__skip { opacity: 0; pointer-events: none; }
.hud__skip.is-on { opacity: 1; pointer-events: auto; }

.pieces { width: 64px; height: 44px; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.5)); }
.pieces svg { width: 100%; height: 100%; overflow: visible; }
.pieces__outline { fill: none; stroke: rgba(230, 240, 255, 0.45); stroke-width: 1.5; stroke-dasharray: 3 3; }
.piece { fill: var(--gold); opacity: 0; transform-box: fill-box; transform-origin: center; transition: opacity 500ms, transform 700ms var(--ease-out); transform: scale(0.4); }
.piece.is-on { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 6px rgba(243, 195, 91, 0.9)); }
.pieces.is-pulse { animation: pulse 900ms var(--ease-out); }
@keyframes pulse { 40% { transform: scale(1.25); } }

/* flying fragment */
.fly {
  position: fixed; z-index: 40; width: 46px; height: 32px; left: 0; top: 0;
  background: linear-gradient(135deg, #ffe6a3, var(--gold) 50%, var(--gold-2));
  clip-path: polygon(0 0, 100% 10%, 85% 100%, 8% 80%);
  box-shadow: 0 0 30px rgba(243, 195, 91, 0.9);
  pointer-events: none;
}

/* ---------- Choice ---------- */
.choice {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 18px 16px calc(14px + var(--safe-bottom));
  max-width: 560px; margin: 0 auto;
}
.choice[hidden] { display: block !important; visibility: hidden; }
.choice > * { opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-out); }
.stage.is-choosing .choice > * { opacity: 1; transform: none; }
.stage.is-choosing .choice > :nth-child(2) { transition-delay: 60ms; }
.stage.is-choosing .choice > :nth-child(3) { transition-delay: 140ms; }
.stage.is-choosing .choice > :nth-child(4) { transition-delay: 260ms; }
.choice__head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.choice__avatar { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(243, 195, 91, 0.8); object-fit: cover; flex: none; background: var(--night-2); }
.choice__step { margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.choice__q { margin: 2px 0 0; font-size: 1.2rem; line-height: 1.25; font-weight: 700; text-wrap: balance; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6); }
.choice__feedback { min-height: 0; margin: 4px 0 0; color: var(--gold); font-weight: 600; font-size: 0.95rem; }
.choice__feedback:empty { display: none; }
.choice__cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.card-choice {
  position: relative; display: block; padding: 0;
  border: 1px solid rgba(214, 230, 255, 0.35); border-radius: 18px; overflow: hidden;
  background: var(--glass-strong);
  text-align: left;
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.9);
  transition: transform var(--t-mid) var(--ease-out), border-color var(--t-mid), box-shadow var(--t-mid), opacity var(--t-mid), filter var(--t-mid);
}
.card-choice img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.card-choice span {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 46px; padding: 10px 12px;
  font-weight: 700; font-size: 0.98rem; line-height: 1.2;
}
.card-choice span::after { content: ""; flex: none; width: 8px; height: 8px; border-top: 2px solid var(--gold); border-right: 2px solid var(--gold); transform: rotate(45deg); }
@media (hover: hover) {
  .card-choice:hover { border-color: var(--gold); box-shadow: 0 18px 50px -16px rgba(243, 195, 91, 0.45); }
  .card-choice:hover img { transform: scale(1.05); }
}
.card-choice:active { transform: scale(0.97); }
.card-choice.is-picked { border-color: var(--gold); transform: scale(1.03); box-shadow: 0 0 0 3px rgba(243, 195, 91, 0.5), 0 20px 60px -10px rgba(243, 195, 91, 0.5); }
.card-choice.is-other { opacity: 0; transform: scale(0.94); }
.card-choice.is-tried { filter: grayscale(0.9) brightness(0.6); cursor: not-allowed; }
.card-choice.is-tried span::after { display: none; }
.card-choice .tried {
  position: absolute; top: 10px; left: 10px; right: auto;
  min-height: 0; padding: 4px 10px; border-radius: 999px;
  background: rgba(5, 10, 24, 0.8); font-size: 0.75rem; font-weight: 600; color: var(--muted);
}
.card-choice .tried::after { display: none; }
.choice__hint { display: flex; flex-direction: column; align-items: center; margin-top: 6px; text-align: center; }
.choice__hint-text { margin: 0 0 4px; max-width: 34ch; color: var(--ice); font-style: italic; font-size: 0.98rem; animation: rise 600ms var(--ease-out); }
.choice__hint-text[hidden] { display: none; }

.toast {
  position: absolute; left: 50%; top: calc(70px + var(--safe-top)); z-index: 30;
  transform: translate(-50%, -10px); opacity: 0;
  padding: 10px 18px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid rgba(243, 195, 91, 0.5);
  color: var(--gold); font-weight: 700; white-space: nowrap;
  transition: opacity 400ms, transform 600ms var(--ease-out);
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.flash { position: absolute; inset: 0; z-index: 50; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, #fff6d8 0%, #ffd77a 35%, rgba(10, 20, 48, 0) 80%); }
.flash.is-on { animation: flash 1.6s var(--ease-in-out) forwards; }
@keyframes flash { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: 0; } }

/* Landscape / desktop: video on the left, choice panel on the right */
@media (min-aspect-ratio: 5/4) and (min-width: 760px) {
  .stage__video { --size: min(calc(100dvh - 48px), 78vw); }
  /* left is set by app.js so that video + panel stay centred together */
  .choice {
    right: auto; top: 50%; bottom: auto; margin: 0;
    width: 380px;
    transform: translateY(-50%);
    padding: 0;
  }
}

/* ---------- Finale ---------- */
.finale { background: radial-gradient(ellipse 70% 55% at 50% 58%, #2f73d9 0%, #183a84 38%, var(--night) 78%); overflow: hidden; }
.finale__frame {
  position: absolute; inset: calc(10px + var(--safe-top)) 10px calc(10px + var(--safe-bottom));
  border: 1px solid rgba(214, 230, 255, 0.28); border-radius: 26px;
  overflow: hidden;
}
.finale__title {
  position: absolute; left: 0; right: 0; top: 7%; z-index: 1;
  margin: 0; display: flex; flex-direction: column; align-items: center;
  font-family: var(--font-display); font-weight: 100; text-transform: uppercase;
  font-size: min(37vw, 30dvh); line-height: 0.84; letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 0 40px rgba(120, 180, 255, 0.35);
  pointer-events: none;
}
.finale__line { display: block; opacity: 0; transform: translateY(30px); filter: blur(10px); }
.finale.is-in .finale__line { animation: reveal 1.8s var(--ease-out) forwards; }
.finale.is-in .finale__line + .finale__line { animation-delay: 260ms; }
.finale__title, .globe { transition: opacity 1.2s var(--ease-out), transform 1.6s var(--ease-out); }
.finale.is-in.is-out .finale__title { opacity: 0.35; }
.finale.is-in.is-out .globe { opacity: 0.55; transition-delay: 0ms; }
@keyframes reveal { to { opacity: 1; transform: none; filter: blur(0); } }
@media (min-aspect-ratio: 1/1) {
  .finale__title { flex-direction: row; justify-content: center; gap: 0.18em; font-size: min(17vw, 36dvh); top: 12%; }
}
.finale__title.is-glass {
  /* copy of the title seen through the glass of the globe */
  z-index: 3; opacity: 0.28; mix-blend-mode: screen; filter: blur(1.5px);
  -webkit-mask-image: radial-gradient(circle var(--gr, 0px) at var(--gx, 50%) var(--gy, 50%), #000 92%, transparent 100%);
  mask-image: radial-gradient(circle var(--gr, 0px) at var(--gx, 50%) var(--gy, 50%), #000 92%, transparent 100%);
}

.globe {
  position: absolute; left: 50%; bottom: -3%; z-index: 2;
  width: min(92vw, 62dvh, 640px); aspect-ratio: 900 / 828;
  transform: translate(-50%, 40%); opacity: 0;
  transition: transform 1.6s var(--ease-out), opacity 1.2s var(--ease-out);
}
.finale.is-in .globe { transform: translate(-50%, 0); opacity: 1; transition-delay: 700ms; }
@media (max-aspect-ratio: 1/1) {
  /* portrait: the globe overlaps the bottom of "NOËL" */
  .globe { bottom: auto; top: calc(7% + min(37vw, 30dvh) * 1.25); width: min(84vw, 44dvh); }
  .finale__year { display: none; }
}
/* dim the scene when the envelope comes forward */
.finale__frame::after {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(6, 12, 32, 0.35), rgba(6, 12, 32, 0.8));
  opacity: 0; transition: opacity 1.2s var(--ease-out);
}
.finale.is-envelope .finale__frame::after { opacity: 1; }
.globe__img { width: 100%; height: 100%; }
/* dome of boule.webp: centre (50%, 52.2% of width), radius 46.4% of width */
.globe__glass {
  position: absolute; left: 3.6%; top: 6.36%; width: 92.8%; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.55) 0 3%, rgba(255, 255, 255, 0.12) 9%, transparent 22%),
    radial-gradient(circle at 50% 50%, transparent 62%, rgba(190, 225, 255, 0.28) 70%, rgba(255, 255, 255, 0.5) 71.5%, transparent 73%);
  pointer-events: none;
}
.globe__snow { position: absolute; left: 3.6%; top: 6.36%; width: 92.8%; aspect-ratio: 1; border-radius: 50%; pointer-events: none; }
.envelope__tap {
  position: absolute; left: 50%; top: calc(100% + 22px); z-index: 6;
  display: flex; align-items: center; gap: 8px;
  margin: 0; padding: 10px 18px; border-radius: 999px;
  white-space: nowrap; font-size: 1rem; font-weight: 700; color: #fff;
  background: rgba(10, 20, 48, 0.75); border: 1px solid rgba(243, 195, 91, 0.6);
  transform: translateX(-50%);
  opacity: 0; transition: opacity 600ms;
  pointer-events: none;
}
.envelope__tap svg { width: 22px; height: 22px; fill: var(--gold); flex: none; }
.envelope__tap .tap-click { display: none; }
@media (hover: hover) and (pointer: fine) {
  .envelope__tap .tap-touch { display: none; }
  .envelope__tap .tap-click { display: inline; }
}
.finale.is-envelope:not(.is-open) .envelope__tap { opacity: 1; transition-delay: 1.4s; animation: nudge 1.6s 2s var(--ease-in-out) infinite; }
@keyframes nudge { 50% { transform: translateX(-50%) translateY(-6px); } }
.finale.is-open .envelope__tap { opacity: 0; transition-delay: 0s; }
.envelope { cursor: pointer; }
.finale.is-open .envelope { cursor: default; }
.finale__year {
  position: absolute; left: 22px; bottom: 18px; z-index: 4; margin: 0;
  font-family: var(--font-display); font-weight: 200; font-size: 2.2rem; line-height: 1; letter-spacing: 0.04em;
  opacity: 0; transition: opacity 1.4s 1.6s;
}
.finale.is-in .finale__year { opacity: 0.85; }
.finale__replay { position: absolute; right: 12px; bottom: 6px; z-index: 6; opacity: 0; transition: opacity 1s; }
.finale.is-open .finale__replay { opacity: 1; }

/* Envelope */
.envelope {
  --w: min(90vw, 560px, 100dvh);
  position: absolute; left: 50%; top: 46%; z-index: 5;
  width: var(--w); height: calc(var(--w) * 0.64);
  transform: translate(-50%, 90%) scale(0.35) rotate(-10deg);
  opacity: 0;
  transition: transform 1.6s var(--ease-out), opacity 700ms var(--ease-out);
  perspective: 1200px;
}
.finale.is-envelope .envelope { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
.envelope__back, .envelope__front, .envelope__flap { position: absolute; inset: 0; border-radius: 10px; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.envelope__back { background: linear-gradient(180deg, #c58b26, #e6b04a); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7); }
.envelope__front {
  z-index: 2;
  background: linear-gradient(160deg, #ffd977 0%, #f0b948 55%, #d79a2f 100%);
  clip-path: polygon(0 0, 50% 52%, 100% 0, 100% 100%, 0 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.envelope__flap {
  z-index: 3;
  transform-origin: 50% 0;
  background: linear-gradient(180deg, #ffe39a 0%, #f2bf52 70%);
  clip-path: polygon(0 0, 100% 0, 50% 60%);
  transition: transform 900ms var(--ease-in-out), z-index 0s 450ms, opacity 700ms;
}
.envelope__seal {
  position: absolute; left: 50%; top: 46%; width: 15%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #e0525a, var(--red) 55%, #7d141b);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), inset 0 0 0 3px rgba(0, 0, 0, 0.12);
}
.finale.is-envelope .envelope__seal { animation: seal 1.6s 1.4s var(--ease-in-out) infinite; }
@keyframes seal { 50% { transform: translate(-50%, -50%) scale(1.12); box-shadow: 0 0 22px rgba(255, 120, 120, 0.7); } }
.finale.is-open .envelope__flap { transform: rotateX(180deg); z-index: 0; }
.finale.is-open .envelope__seal { animation: none; opacity: 0; transition: opacity 200ms; }
.finale.is-out .envelope__back, .finale.is-out .envelope__front, .finale.is-out .envelope__flap { opacity: 0; transform: translateY(40px); }

.card {
  position: absolute; left: 5%; right: 5%; bottom: 6%; z-index: 1;
  padding: 30px 22px 24px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(243, 195, 91, 0.18), transparent 60%),
    var(--paper);
  color: var(--paper-ink);
  text-align: center;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
  clip-path: inset(var(--clip, 60%) 0 0 0 round 8px);
  transform: translateY(0);
  transition: transform 1.3s var(--ease-out), clip-path 1.3s var(--ease-out);
}
.finale.is-open .card { clip-path: inset(0 0 0 0 round 8px); transform: translateY(var(--rise, -50%)); }
.finale.is-out .card { transform: translateY(var(--rise-out, -60%)); z-index: 4; }
.card::before {
  content: ""; position: absolute; inset: 8px; border: 1px solid rgba(197, 139, 38, 0.45); border-radius: 4px; pointer-events: none;
}
.card__kicker { margin: 0 0 6px; font-size: 0.9rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: #a8761d; }
.card__title { margin: 0 0 14px; font-family: var(--font-display); font-weight: 300; text-transform: uppercase; font-size: clamp(2.3rem, 10vw, 3.2rem); line-height: 0.98; letter-spacing: 0.02em; text-wrap: balance; }
.card__date { margin: 0; font-size: clamp(1.3rem, 5.6vw, 1.6rem); font-weight: 700; line-height: 1.25; text-wrap: balance; }
.card__date span { display: block; font-weight: 400; }
.card__place { margin: 2px 0 14px; font-size: clamp(1.2rem, 5vw, 1.4rem); }
.card__more { margin: 0 auto 18px; max-width: 30ch; font-size: 1rem; color: #3f4b6e; }
.card__cta { width: 100%; min-height: 58px; font-size: 1.1rem; opacity: 0; transition: opacity 700ms 900ms; }
.rsvp__again { margin: -6px 0 16px; padding: 10px 14px; border-radius: 12px; background: rgba(243, 195, 91, 0.12); color: var(--gold); font-size: 0.92rem; }
.finale.is-out .card__cta { opacity: 1; }

/* ---------- Sheet (RSVP) ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet[hidden] { display: none; }
.sheet__scrim { position: absolute; inset: 0; background: rgba(4, 8, 22, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade 400ms var(--ease-out); }
@keyframes fade { from { opacity: 0; } }
.sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-height: calc(100dvh - 24px - var(--safe-top)); overflow-y: auto; overscroll-behavior: contain;
  padding: 26px 20px calc(24px + var(--safe-bottom));
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #16295a, #0d1a3d);
  border-top: 1px solid rgba(214, 230, 255, 0.25);
  box-shadow: 0 -30px 80px rgba(0, 0, 0, 0.5);
  animation: sheet-in 600ms var(--ease-out);
}
@keyframes sheet-in { from { transform: translateY(100%); } }
@media (min-width: 700px) {
  .sheet__panel { left: 50%; top: 50%; bottom: auto; width: 520px; max-height: calc(100dvh - 48px); border-radius: 24px; border: 1px solid rgba(214, 230, 255, 0.25); transform: translate(-50%, -50%); animation: modal-in 500ms var(--ease-out); }
  @keyframes modal-in { from { opacity: 0; transform: translate(-50%, -46%); } }
}
.sheet__close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.06); }
.sheet__close svg { width: 20px; height: 20px; }

.rsvp__title { margin: 0 44px 18px 0; font-family: var(--font-display); font-weight: 300; text-transform: uppercase; font-size: 2.2rem; line-height: 1; letter-spacing: 0.02em; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 6px; padding: 0; border: 0; }
.seg__opt { position: relative; }
.seg__opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg__opt span {
  display: grid; place-items: center; min-height: 54px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 700; text-align: center;
  transition: background var(--t-mid), border-color var(--t-mid), color var(--t-mid);
}
.seg__opt input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.seg__opt input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }

.field { margin: 18px 0 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend { display: block; margin-bottom: 8px; padding: 0; font-weight: 600; font-size: 0.95rem; }
.opt { color: var(--muted); font-weight: 400; }
.field input[type="text"], .field input[type="tel"], .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(3, 8, 24, 0.45);
  font-size: 16px; /* no iOS zoom */
  transition: border-color var(--t-mid), box-shadow var(--t-mid);
}
.field textarea { resize: vertical; min-height: 64px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(243, 195, 91, 0.25); }
.field input[aria-invalid="true"] { border-color: var(--err); }
.field input::placeholder, .field textarea::placeholder { color: rgba(185, 200, 230, 0.5); }
.field__help { margin: 6px 0 0; color: var(--muted); font-size: 0.85rem; }
.field__err, .rsvp__error { margin: 6px 0 0; color: var(--err); font-size: 0.88rem; font-weight: 600; }
.field__err[hidden], .rsvp__error[hidden] { display: none; }

.people { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.person { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; align-items: center; animation: rise 400ms var(--ease-out); }
.person input[type="text"] { min-height: 48px; }
.person__kind { display: inline-flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.person__kind button { min-height: 48px; padding: 0 11px; border: 0; background: transparent; color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.person__kind button[aria-pressed="true"] { background: rgba(243, 195, 91, 0.18); color: var(--gold); }
.person__del { width: 44px; height: 48px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); }
.person__del svg { width: 18px; height: 18px; }
.people__add { margin-top: 4px; text-decoration: none; color: var(--gold); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.rsvp__submit { width: 100%; margin-top: 24px; }
.only-yes[hidden] { display: none; }

.done { text-align: center; padding-top: 8px; outline: none; }
.done .rsvp__title { margin-right: 0; }
.done__text { margin: 0 auto 22px; max-width: 34ch; color: var(--ice); }
.done .btn--wa { width: 100%; }
.done__auto { min-height: 1.5em; margin: 10px 0 4px; color: var(--muted); font-size: 0.88rem; }
.done[hidden], .rsvp[hidden] { display: none; }

.noscript { position: fixed; inset: auto 16px 16px; padding: 14px; border-radius: 12px; background: var(--glass-strong); }

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