/* ==========================================================================
   Samiksha & Arihant — #SamAriOfLove
   Design system drawn from the invitation: watercolour sky, sandstone palace,
   gold monogram, lilies, coral script and olive type.
   ========================================================================== */

:root {
  --sky-1: #bcdcf6;
  --sky-2: #dcedfa;
  --sky-3: #f2f8fd;
  --cream: #fef4d9;
  --paper: #fffaf1;
  --sand: #ecd3ad;
  --sandstone: #d9a66e;
  --gold: #b88a4e;
  --gold-2: #e5c48a;
  --gold-3: #f6e6c4;
  --coral: #c23a48;
  --coral-2: #e0606c;
  --blush: #f7d6dc;
  --olive: #56662b;
  --olive-2: #7d8f45;
  --leaf: #3e6b35;
  --ink: #2d2a24;
  --ink-2: #5d574c;
  --night: #0c1230;
  --night-2: #18245a;
  --line: rgba(184, 138, 78, 0.35);

  --script: "Great Vibes", "WeddingScript", cursive;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 22px;
  --shadow-soft: 0 18px 50px -24px rgba(77, 52, 18, 0.35);
  --shadow-card: 0 30px 80px -40px rgba(54, 34, 8, 0.55), 0 2px 6px rgba(54, 34, 8, 0.06);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dock-h: 0px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.locked { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- type ---------- */
.script { font-family: var(--script); font-weight: 400; line-height: 1.05; letter-spacing: 0; }
.serif { font-family: var(--serif); }
.eyebrow {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--olive); margin: 0 0 14px;
}
.title {
  font-family: var(--serif); font-weight: 500; font-size: clamp(2.3rem, 7vw, 4.2rem);
  line-height: 1.02; letter-spacing: -0.01em; margin: 0; color: var(--ink);
}
.title .script { display: block; color: var(--coral); font-size: 1.3em; margin-top: 0.08em; }
.lede { font-size: 1.02rem; color: var(--ink-2); max-width: 36ch; margin: 18px auto 0; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ornament */
.ornament { display: flex; align-items: center; gap: 14px; justify-content: center; color: var(--gold); margin: 22px auto; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: min(90px, 18vw); background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament::after { transform: scaleX(-1); }
.ornament svg { width: 26px; height: 26px; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--coral);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: 999px; border: 0;
  background: var(--bg); color: #fff; font-weight: 500; font-size: 0.92rem; letter-spacing: 0.04em;
  text-decoration: none; overflow: hidden; isolation: isolate;
  box-shadow: 0 14px 30px -14px rgba(194, 58, 72, 0.7);
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s ease;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.45) 45%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.8s var(--ease-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: scale(0.97); }
.btn.gold { --bg: linear-gradient(135deg, #c9995a, #e8c88d 45%, #b4874a); color: #3a2a10; box-shadow: 0 14px 30px -14px rgba(150, 105, 40, 0.8); }
.btn.ghost { background: rgba(255, 255, 255, 0.55); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 0.82rem; }
.btn svg { width: 18px; height: 18px; }
.link-btn { background: none; border: 0; padding: 6px 2px; color: var(--coral); font-weight: 500; font-size: 0.88rem; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(194, 58, 72, 0.35); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 0.74rem; font-weight: 500; letter-spacing: 0.06em; background: rgba(255, 255, 255, 0.7); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-2); }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal="left"] { transform: translate3d(-34px, 0, 0); }
[data-reveal="right"] { transform: translate3d(34px, 0, 0); }
[data-reveal="zoom"] { transform: scale(0.92); }
[data-reveal].in { opacity: 1; transform: none; }

/* ==========================================================================
   Intro — palace doors with a wax seal
   ========================================================================== */
.intro {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  perspective: 1600px; pointer-events: auto;
}
.intro .door {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.5), transparent 55%),
    repeating-linear-gradient(45deg, rgba(184, 138, 78, 0.16) 0 2px, transparent 2px 22px),
    repeating-linear-gradient(-45deg, rgba(184, 138, 78, 0.16) 0 2px, transparent 2px 22px),
    linear-gradient(180deg, #fbe9cf, #f2d3a7);
  transition: transform 1.5s var(--ease-out), opacity 0.6s ease 1s;
  backface-visibility: hidden;
}
.intro .door::before {
  content: ""; position: absolute; inset: 28px 22px; border: 1.5px solid rgba(184, 138, 78, 0.65);
  border-radius: 46% 46% 10px 10px / 18% 18% 10px 10px;
  box-shadow: inset 0 0 0 7px rgba(255, 250, 240, 0.45), inset 0 0 0 8.5px rgba(184, 138, 78, 0.35);
}
.intro .door.left { left: 0; transform-origin: left center; box-shadow: inset -10px 0 30px -12px rgba(120, 80, 30, 0.45); }
.intro .door.right { right: 0; transform-origin: right center; box-shadow: inset 10px 0 30px -12px rgba(120, 80, 30, 0.45); }
.intro .door .knob { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3d6, #b98a4c 60%, #7c5726); box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.intro .door.left .knob { right: 22px; }
.intro .door.right .knob { left: 22px; }
.intro-center { position: relative; z-index: 2; text-align: center; padding: 24px; transition: opacity 0.5s ease, transform 0.8s var(--ease-out); }
.intro-center .eyebrow { color: #7a5a2c; }
.intro-names { font-family: var(--script); color: var(--coral); font-size: clamp(2.6rem, 11vw, 4.4rem); margin: 6px 0 26px; line-height: 1; }
.seal {
  position: relative; width: 118px; height: 118px; border-radius: 50%; border: 0; margin: 0 auto; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #e86b76, #b0283a 55%, #7d1424);
  box-shadow: 0 12px 30px -8px rgba(125, 20, 36, 0.7), inset 0 -6px 14px rgba(0,0,0,0.25), inset 0 4px 10px rgba(255,255,255,0.25);
  animation: seal-breathe 2.4s ease-in-out infinite;
}
.seal::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 1.5px dashed rgba(255, 220, 200, 0.55); }
.seal span { font-family: var(--script); color: #ffe7da; font-size: 2.6rem; text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.seal-hint { margin-top: 16px; font-size: 0.8rem; letter-spacing: 0.24em; text-transform: uppercase; color: #8a6a3a; }
.intro-progress { width: 140px; height: 2px; margin: 18px auto 0; background: rgba(184, 138, 78, 0.25); border-radius: 2px; overflow: hidden; }
.intro-progress i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.4s ease; }
@keyframes seal-breathe { 50% { transform: scale(1.06); } }
.intro.open .door.left { transform: rotateY(-108deg); }
.intro.open .door.right { transform: rotateY(108deg); }
.intro.open .intro-center { opacity: 0; transform: scale(1.25); }
.intro.open { pointer-events: none; }
.intro.gone { display: none; }

/* ==========================================================================
   Top bar, journey progress, mobile dock
   ========================================================================== */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(16px, env(safe-area-inset-left)); transition: background 0.4s ease, box-shadow 0.4s ease, transform 0.5s var(--ease-out);
}
.topbar.scrolled { background: rgba(255, 250, 241, 0.78); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); box-shadow: 0 1px 0 var(--line); }
.topbar.hide { transform: translateY(-100%); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 42px; width: auto; filter: drop-shadow(0 2px 4px rgba(120,80,30,.2)); }
.brand span { font-family: var(--script); font-size: 1.55rem; color: var(--coral); line-height: 1; }
.nav { display: none; gap: 26px; }
.nav a { text-decoration: none; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--coral); transform: scaleX(0); transition: transform 0.4s var(--ease-out); }
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.flightline { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 61; pointer-events: none; }
.flightline::before { content: ""; position: absolute; inset: 1px 0 auto; height: 1px; background-image: linear-gradient(90deg, var(--gold) 50%, transparent 50%); background-size: 10px 1px; opacity: 0.35; }
.flightline i { position: absolute; left: 0; top: 1px; height: 1px; width: 0; background: var(--gold); }
.flightline svg { position: absolute; top: -6px; width: 18px; height: 18px; color: var(--gold); transform: translateX(-9px) rotate(90deg); }

.dock {
  position: fixed; z-index: 70; left: 50%; bottom: calc(12px + var(--safe-b)); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 6px; border-radius: 999px;
  background: rgba(255, 250, 241, 0.82); backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 18px 40px -18px rgba(60, 40, 10, 0.5), inset 0 0 0 1px rgba(184, 138, 78, 0.28);
  transition: transform 0.5s var(--ease-out), opacity 0.4s ease;
}
.dock.away { transform: translate(-50%, 140%); opacity: 0; }
.dock a { display: grid; justify-items: center; gap: 1px; min-width: 58px; padding: 6px 6px 4px; border-radius: 999px; text-decoration: none; font-size: 0.6rem; letter-spacing: 0.06em; color: var(--ink-2); transition: background 0.3s ease, color 0.3s ease; }
.dock a svg { width: 21px; height: 21px; }
.dock a.active { color: var(--coral); background: rgba(194, 58, 72, 0.09); }
.dock a.rsvp-dot { background: var(--coral); color: #fff; }
.dock a.rsvp-dot.active { background: #a82c3a; color: #fff; }
body { --dock-h: calc(84px + var(--safe-b)); }

/* ==========================================================================
   Hero — the sky, monogram and flight path in 3D
   ========================================================================== */
.hero {
  position: relative; min-height: 100svh; overflow: hidden; isolation: isolate;
  background: linear-gradient(180deg, #b6d8f4 0%, #cfe6f8 34%, #e9f4fc 62%, #fff8ee 100%);
  display: grid; align-content: center; padding: 84px 20px calc(var(--dock-h) + 22px);
}
.hero canvas.hero-3d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 140px; background: linear-gradient(transparent, var(--paper)); z-index: 1; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; width: min(1180px, 100%); margin: 0 auto; display: grid; gap: 8px; justify-items: center; text-align: center; }
.logo-slot { position: relative; width: min(84vw, 430px); aspect-ratio: 2052 / 1677; }
.logo-slot img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 30px rgba(90, 60, 20, 0.22)); transition: opacity 0.6s ease; }
.hero.gl-ready .logo-slot img { opacity: 0; }
.hero-copy { display: grid; justify-items: center; gap: 4px; }
.greeting { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--olive); margin: 0; }
.hero .together { margin: 6px 0 0; font-size: 0.7rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--olive); }
.hero h1 { margin: 0; font-family: var(--script); font-weight: 400; color: var(--coral); font-size: clamp(3.2rem, 13vw, 6.6rem); line-height: 1.04; text-shadow: 0 2px 18px rgba(255, 255, 255, 0.7); }
.hero h1 .amp { display: inline-block; font-size: 0.66em; color: var(--gold); margin: 0 0.12em; transform: translateY(-0.08em); }
.hero h1 .name { display: inline-block; }
.hero .hashtag { margin: 0; font-weight: 500; color: var(--olive); letter-spacing: 0.06em; }
.hero .dates { margin: 6px 0 0; font-family: var(--serif); font-size: 1.32rem; color: var(--ink); }
.hero .place { margin: 0; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.countdown { display: flex; gap: 10px; justify-content: center; margin: 18px 0 6px; }
.countdown div { min-width: 66px; padding: 10px 6px 8px; border-radius: 18px; background: rgba(255, 255, 255, 0.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.8), 0 10px 26px -18px rgba(40, 60, 90, 0.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.countdown b { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.9rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.countdown small { font-size: 0.58rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-2); }
.countdown.done { font-family: var(--script); font-size: 2rem; color: var(--coral); }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: calc(var(--dock-h) + 2px); transform: translateX(-50%); width: 24px; height: 38px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px rgba(86, 102, 43, 0.5); display: none; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--olive); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* hero load-in choreography */
.hero [data-in] { opacity: 0; transform: translateY(18px); transition: opacity 1.2s var(--ease-out), transform 1.2s var(--ease-out); transition-delay: var(--d, 0s); }
.hero.ready [data-in] { opacity: 1; transform: none; }
.hero h1 .name { clip-path: inset(0 100% 0 0); transition: clip-path 1.8s var(--ease-out); transition-delay: var(--d, 0s); }
.hero.ready h1 .name { clip-path: inset(0 -10% 0 0); }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { position: relative; padding: clamp(80px, 13vw, 150px) 20px; }
.wrap { width: min(1180px, 100%); margin: 0 auto; position: relative; z-index: 2; }
.narrow { width: min(760px, 100%); margin: 0 auto; }

/* journey line drawn down the whole page */
.journey { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; z-index: 3; overflow: visible; }
.journey path.track { fill: none; stroke: var(--gold); stroke-opacity: 0.22; stroke-width: 1.4; stroke-dasharray: 5 9; }
.journey path.drawn { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-dasharray: 5 9; stroke-linecap: round; }
.journey .plane { color: var(--gold); }

/* ---------- welcome arch ---------- */
.welcome { background: linear-gradient(180deg, var(--paper), #fdf2e0 70%, var(--paper)); }
.arch-card {
  position: relative; width: min(560px, 100%); margin: 0 auto; background: var(--cream);
  border-radius: 50% 50% 0 0 / 26% 26% 0 0; padding: clamp(84px, 16vw, 120px) clamp(22px, 7vw, 56px) 0;
  text-align: center; box-shadow: var(--shadow-card);
}
.arch-card::before { content: ""; position: absolute; inset: 12px 12px 0; border: 1.5px solid rgba(201, 160, 98, 0.7); border-bottom: 0; border-radius: inherit; pointer-events: none; }
.arch-card .script { font-size: clamp(3.4rem, 13vw, 4.8rem); color: var(--leaf); margin: 0 0 18px; }
.poem { margin: 0; font-family: var(--serif); font-size: clamp(1.18rem, 4.4vw, 1.4rem); line-height: 1.6; color: #5f6b36; }
.poem span { display: block; opacity: 0; transform: translateY(14px); filter: blur(4px); transition: opacity 0.9s ease, transform 0.9s var(--ease-out), filter 0.9s ease; transition-delay: calc(var(--i) * 0.28s + 0.2s); }
.in .poem span, .poem.in span { opacity: 1; transform: none; filter: none; }
.wave { display: inline-block; transform-origin: 70% 80%; }
.in .wave { animation: wave 1.6s ease-in-out 1s 2; }
@keyframes wave { 15%, 45% { transform: rotate(18deg); } 30%, 60% { transform: rotate(-8deg); } 75% { transform: none; } }
.signoff { margin: 22px 0 0; font-family: var(--serif); color: #5f6b36; font-size: 1.15rem; }
.signoff b { display: block; color: var(--leaf); font-weight: 700; font-size: 1.25rem; }
.arch-garden { position: relative; margin: 10px calc(-1 * clamp(22px, 7vw, 56px)) 0; }
.arch-garden img { width: 100%; height: auto; }
.arch-garden canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- story (pinned scrollytelling) ---------- */
.story { background: linear-gradient(180deg, var(--paper), #f4ead8); padding-bottom: 0; }
.story-scroller { position: relative; height: 520vh; margin-top: 40px; }
.story-stage { position: sticky; top: 0; height: 100svh; display: grid; place-items: center; padding: 70px 16px calc(var(--dock-h) + 8px); }
.story-grid { width: min(1080px, 100%); height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 14px; align-items: center; justify-items: center; }
.story-frame { position: relative; height: 100%; max-height: 74svh; aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,.6) inset; background: #e8dcc8; transform: translateZ(0); }
.story-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 0.9s ease, transform 6s ease-out; }
.story-frame img.on { opacity: 1; transform: scale(1); }
.chat { position: absolute; inset: auto 6% 5% 6%; display: grid; gap: 8px; z-index: 2; }
.bubble { max-width: 78%; padding: 9px 14px; border-radius: 18px; font-size: 0.86rem; font-weight: 400; line-height: 1.35; box-shadow: 0 8px 20px -12px rgba(0,0,0,.6); opacity: 0; transform: translateY(10px) scale(0.92); transition: opacity 0.4s ease, transform 0.5s var(--ease-spring); }
.bubble.him { justify-self: start; background: #fff; color: var(--ink); border-bottom-left-radius: 5px; }
.bubble.her { justify-self: end; background: linear-gradient(135deg, #3c7df6, #2a62d8); color: #fff; border-bottom-right-radius: 5px; }
.bubble.show { opacity: 1; transform: none; }
.bubble.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.bubble.typing i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; animation: dot 1s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .15s; } .bubble.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-4px); opacity: 1; } }
.story-text { text-align: center; max-width: 520px; min-height: 120px; }
.story-text .eyebrow { margin-bottom: 4px; }
.story-text h3 { margin: 0; font-family: var(--script); font-weight: 400; font-size: clamp(2rem, 7.4vw, 3.2rem); color: var(--coral); line-height: 1.1; }
.story-text p { margin: 6px 0 0; color: var(--ink-2); font-size: 0.95rem; }
.story-text > * { transition: opacity 0.5s ease, transform 0.6s var(--ease-out); }
.story-text.swap > * { opacity: 0; transform: translateY(8px); }
.story-dots { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.story-dots i { width: 22px; height: 3px; border-radius: 3px; background: rgba(184, 138, 78, 0.3); overflow: hidden; position: relative; }
.story-dots i b { position: absolute; inset: 0; background: var(--coral); transform-origin: left; transform: scaleX(0); }
.story-intro { text-align: center; }

/* ---------- invitation (blessings) ---------- */
.invitation { overflow: hidden; background: linear-gradient(180deg, #f4ead8 0%, #cfe6f8 22%, #e3f0fa 60%, #dbeaf5 100%); padding-bottom: 0; }
.blessing { text-align: center; color: var(--olive); font-size: clamp(0.92rem, 3.4vw, 1.05rem); }
.blessing p { margin: 0 auto; max-width: 46ch; }
.blessing .who { font-family: var(--script); color: var(--coral); font-size: clamp(3.4rem, 14vw, 5.4rem); line-height: 1.05; margin: 12px 0 2px; display: inline-block; position: relative; }
.blessing .parents { font-size: 0.9rem; color: var(--olive); line-height: 1.55; }
.blessing .with { margin: 16px 0 0; font-family: var(--serif); font-style: italic; font-size: 1.3rem; }
.invite-art { position: relative; margin: 26px -20px 0; height: clamp(360px, 70vw, 720px); overflow: hidden; }
.invite-art img { position: absolute; left: 50%; bottom: 0; width: max(100%, 760px); max-width: none; transform: translateX(-50%); will-change: transform; }
.birds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.birds svg { position: absolute; width: 22px; height: 12px; color: #3d4a2a; opacity: 0.7; offset-rotate: 0deg; animation: fly var(--t, 18s) linear infinite; animation-delay: var(--delay, 0s); }
.birds path { animation: flap 0.5s ease-in-out infinite alternate; transform-origin: center; }
@keyframes flap { to { transform: scaleY(0.35); } }
@keyframes fly { from { transform: translate(-10vw, var(--y0, 20vh)); } to { transform: translate(110vw, var(--y1, 8vh)); } }

/* ---------- celebrations ---------- */
.celebrations { background: radial-gradient(1200px 600px at 50% -10%, #fff 0%, transparent 60%), linear-gradient(180deg, #dbeaf5, var(--paper) 22%); }
.day-tabs { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), var(--shadow-soft); margin: 30px auto 0; }
.day-tabs button { position: relative; z-index: 1; border: 0; background: none; padding: 10px 20px; border-radius: 999px; font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em; color: var(--ink-2); transition: color 0.3s ease; white-space: nowrap; }
.day-tabs button[aria-selected="true"] { color: #fff; }
.day-tabs .pill { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px; background: var(--coral); transition: transform 0.5s var(--ease-spring); }
.day-tabs[data-day="3"] .pill { transform: translateX(100%); }
.events { display: grid; gap: 22px; margin-top: 34px; }
.event-card {
  position: relative; display: grid; grid-template-columns: 1fr; border: 0; padding: 0; text-align: left; border-radius: var(--radius); overflow: hidden;
  background: #fff; box-shadow: var(--shadow-card); transform-style: preserve-3d; transition: transform 0.6s var(--ease-out), box-shadow 0.6s ease;
}
.event-card:hover { transform: translateY(-6px); }
.event-card .scene { position: relative; aspect-ratio: 9 / 8; overflow: hidden; }
.event-card .scene img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease-out); }
.event-card:hover .scene img { transform: scale(1.06); }
.event-card .scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(20, 12, 4, 0.55)); }
.event-card .meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 18px 20px; color: #fff; display: grid; gap: 2px; }
.event-card .meta .script { font-size: 2.2rem; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.event-card .meta .kind { font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.95; }
.event-card .time { position: absolute; top: 14px; left: 14px; z-index: 2; }
.event-card .time .chip { background: rgba(255,255,255,.88); color: var(--ink); }
.event-card .play-hint { position: absolute; top: 14px; right: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.85); color: var(--coral); box-shadow: 0 6px 16px -8px rgba(0,0,0,.6); }
.event-card .play-hint svg { width: 16px; height: 16px; margin-left: 2px; }
.event-card .play-hint::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.8); animation: ping 2.2s ease-out infinite; }
@keyframes ping { from { transform: scale(0.9); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }
.events-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.timeline-note { margin-top: 18px; font-size: 0.84rem; color: var(--ink-2); }

/* ---------- story viewer (dialog) ---------- */
.viewer { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #000; color: #fff; overflow: hidden; }
.viewer::backdrop { background: rgba(0, 0, 0, 0.85); }
.viewer[open] { display: grid; place-items: center; animation: viewer-in 0.45s var(--ease-out); }
@keyframes viewer-in { from { opacity: 0; transform: scale(0.96); } }
.viewer .backdrop-img { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(30px) brightness(0.6) saturate(1.2); transform: scale(1.1); transition: background-image 0.4s ease; }
.viewer .phone { position: relative; height: 100%; max-height: 100svh; aspect-ratio: 9 / 16; max-width: 100vw; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.viewer .phone > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s ease; }
.viewer .phone > img.fading { opacity: 0.2; }
.viewer canvas.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.viewer .bars { position: absolute; z-index: 4; top: calc(10px + env(safe-area-inset-top, 0px)); left: 10px; right: 10px; display: flex; gap: 4px; }
.viewer .bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); overflow: hidden; }
.viewer .bars i b { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
.viewer .bars i.done b { transform: scaleX(1); }
.viewer .vtop { position: absolute; z-index: 4; top: calc(22px + env(safe-area-inset-top, 0px)); left: 12px; right: 8px; display: flex; align-items: center; gap: 10px; }
.viewer .vtop img { width: 34px; height: 34px; border-radius: 50%; background: #fff; object-fit: contain; padding: 2px; }
.viewer .vtop .who { font-size: 0.82rem; font-weight: 500; line-height: 1.2; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.viewer .vtop .who small { display: block; opacity: 0.85; font-weight: 300; }
.viewer .vclose { margin-left: auto; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(0,0,0,.25); color: #fff; display: grid; place-items: center; }
.viewer .vclose svg { width: 20px; height: 20px; }
.viewer .tap { position: absolute; z-index: 3; top: 70px; bottom: 150px; width: 34%; background: none; border: 0; }
.viewer .tap.prev { left: 0; } .viewer .tap.next { right: 0; width: 66%; }
.viewer .vsheet { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; padding: 40px 14px calc(14px + var(--safe-b)); background: linear-gradient(transparent, rgba(0,0,0,.72) 40%); display: grid; gap: 10px; }
.viewer .vplace { font-size: 0.8rem; line-height: 1.45; text-shadow: 0 1px 4px rgba(0,0,0,.6); margin: 0 4px; }
.viewer .vplace b { font-weight: 500; }
.viewer .vactions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.viewer .vactions button, .viewer .vactions a { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border-radius: 16px; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 0.68rem; letter-spacing: 0.03em; text-decoration: none; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.viewer .vactions svg { width: 20px; height: 20px; }
.viewer .vactions .hot { background: var(--coral); }
.viewer .vtoast { position: absolute; z-index: 5; left: 50%; top: 45%; transform: translate(-50%, -50%) scale(0.9); background: rgba(0,0,0,.6); padding: 10px 16px; border-radius: 14px; font-size: 0.85rem; opacity: 0; transition: opacity .3s, transform .3s var(--ease-spring); pointer-events: none; }
.viewer .vtoast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.viewer iframe { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ---------- venue ---------- */
.venue { background: linear-gradient(180deg, var(--paper), #eef5ea 55%, var(--paper)); }
.venue-art { position: relative; margin: 34px auto 0; width: min(980px, 100%); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-card); }
.venue-art img { width: 100%; height: auto; }
.venue-art canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.venue-cards { display: grid; gap: 18px; margin-top: 26px; }
.venue-card { position: relative; padding: 24px 22px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--line); }
.venue-card h3 { margin: 6px 0 4px; font-family: var(--serif); font-weight: 600; font-size: 1.6rem; line-height: 1.15; }
.venue-card p { margin: 0 0 14px; color: var(--ink-2); font-size: 0.92rem; }
.venue-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.route { position: relative; margin-top: 26px; border-radius: var(--radius); padding: 22px 16px 18px; background: linear-gradient(160deg, #fff8ea, #fde9d2); box-shadow: inset 0 0 0 1px var(--line); text-align: center; overflow: hidden; }
.route h3 { margin: 0; font-family: var(--script); font-weight: 400; color: var(--coral); font-size: 2.3rem; }
.route p { margin: 0; font-size: 0.82rem; color: var(--ink-2); }
.route svg { display: block; width: 100%; max-width: 560px; height: auto; margin: 6px auto 0; overflow: visible; }
.route .road { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-dasharray: 6 8; }
.route .road-glow { fill: none; stroke: var(--coral); stroke-width: 3; stroke-linecap: round; }
.route .pin text { font-family: var(--sans); font-size: 12px; font-weight: 500; fill: var(--ink); }
.route .pin small { font-size: 10px; }
.route .note { position: absolute; font-size: 14px; color: var(--coral); opacity: 0; }
.route-caption { font-size: 0.72rem !important; opacity: 0.75; margin-top: 4px !important; }

/* ---------- boarding pass ---------- */
.passport { background: linear-gradient(180deg, var(--paper), #fbe8e6 50%, var(--paper)); }
.pass {
  position: relative; width: min(560px, 100%); margin: 34px auto 0; border-radius: 26px; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #5b2a86 0%, #b23a62 55%, #e2765a 100%); box-shadow: var(--shadow-card);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.4s ease;
}
.pass::before, .pass::after { content: ""; position: absolute; top: 62%; width: 30px; height: 30px; border-radius: 50%; background: #fcefe9; transform: translateY(-50%); }
.pass::before { left: -15px; } .pass::after { right: -15px; }
.pass-top { padding: 22px 24px 18px; display: grid; gap: 14px; }
.pass-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.7rem; letter-spacing: 0.24em; text-transform: uppercase; opacity: 0.9; }
.pass-route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.pass-route b { font-family: var(--serif); font-size: 3.2rem; font-weight: 600; line-height: 1; letter-spacing: 0.02em; }
.pass-route small { display: block; font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; opacity: .85; }
.pass-route .flight { position: relative; height: 2px; background-image: linear-gradient(90deg, rgba(255,255,255,.7) 50%, transparent 50%); background-size: 10px 2px; }
.pass-route .flight svg { position: absolute; top: -10px; left: 0; width: 22px; height: 22px; animation: pass-fly 3.6s ease-in-out infinite; }
@keyframes pass-fly { 0% { left: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: calc(100% - 22px); opacity: 0; } }
.pass-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; }
.pass-grid b { display: block; font-size: 0.95rem; letter-spacing: 0.02em; text-transform: none; font-weight: 500; }
.pass-bottom { position: relative; border-top: 2px dashed rgba(255,255,255,.4); padding: 20px 24px 22px; min-height: 150px; display: grid; place-items: center; text-align: center; }
.pass-bottom .reveal-text { display: grid; gap: 4px; }
.pass-bottom .reveal-text .script { font-size: 2.6rem; }
.pass-bottom .stamp { position: absolute; right: 16px; top: 14px; padding: 6px 10px; border: 2px solid #fff; border-radius: 8px; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; transform: rotate(-12deg) scale(2); opacity: 0; transition: transform 0.5s var(--ease-spring), opacity 0.3s; }
.pass.revealed .stamp { opacity: 0.95; transform: rotate(-12deg) scale(1); }
.pass-bottom canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity 0.8s ease; }
.pass.revealed canvas { opacity: 0; pointer-events: none; }
.pass-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------- play ---------- */
.play { background: radial-gradient(900px 500px at 50% 0%, #1d2a6b 0%, transparent 70%), linear-gradient(180deg, #0c1230, #141c48); color: #f4ecff; }
.play .eyebrow { color: #c9b8ff; }
.play .title { color: #fff; }
.play .title .script { color: #ff7fb0; }
.play .lede { color: rgba(244, 236, 255, 0.8); }
.bowl-card { position: relative; margin: 34px auto 0; width: min(920px, 100%); border-radius: 26px; overflow: hidden; background: #070a1e; box-shadow: 0 40px 90px -40px rgba(120, 80, 255, 0.6), inset 0 0 0 1px rgba(160, 140, 255, 0.25); }
.bowl-card canvas { display: block; width: 100%; aspect-ratio: 4 / 5; touch-action: none; }
.bowl-hud { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.bowl-hud .score { font-family: var(--serif); font-size: 1.1rem; background: rgba(10, 12, 40, .6); padding: 6px 12px; border-radius: 12px; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.bowl-hud .score b { font-size: 1.6rem; }
.bowl-msg { position: absolute; left: 0; right: 0; top: 36%; text-align: center; font-family: var(--script); font-size: clamp(2.6rem, 11vw, 4.4rem); color: #ff8fc0; text-shadow: 0 0 18px rgba(255, 80, 160, .9), 0 0 40px rgba(160, 80, 255, .7); pointer-events: none; opacity: 0; transform: scale(.6); transition: opacity .3s, transform .6s var(--ease-spring); }
.bowl-msg.show { opacity: 1; transform: none; }
.bowl-controls { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 16px 16px; background: rgba(12, 16, 50, .9); }
.bowl-controls label { font-size: 0.72rem; letter-spacing: .16em; text-transform: uppercase; color: #c9b8ff; display: grid; gap: 4px; }
.bowl-controls input[type=range] { width: 100%; accent-color: #ff6fae; }
.bowl-tip { font-size: 0.78rem; color: rgba(244,236,255,.7); text-align: center; margin: 10px 0 0; }
.bowl-fallback { padding: 40px 20px; text-align: center; }
.play-grid { display: grid; gap: 18px; margin-top: 22px; }
.glass { border-radius: var(--radius); padding: 24px 22px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(200, 180, 255, .18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.glass h3 { margin: 0 0 4px; font-family: var(--serif); font-weight: 600; font-size: 1.55rem; color: #fff; }
.glass p { margin: 0; color: rgba(244,236,255,.78); font-size: .9rem; }
.quiz-q { font-family: var(--serif); font-size: 1.35rem !important; color: #fff !important; margin: 10px 0 14px !important; }
.quiz-options { display: grid; gap: 8px; }
.quiz-options button { text-align: left; padding: 12px 16px; border-radius: 14px; border: 0; background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(200,180,255,.2); transition: background .3s, transform .3s var(--ease-spring); }
.quiz-options button:hover:not(:disabled) { background: rgba(255,255,255,.16); transform: translateX(4px); }
.quiz-options button.right { background: #2fae7a; }
.quiz-options button.wrong { background: #c8445a; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.quiz-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; min-height: 40px; }
.quiz-foot .why { font-size: .85rem; color: rgba(244,236,255,.85); }
.quiz-progress { font-size: .72rem; letter-spacing: .18em; color: #c9b8ff; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.teams button { padding: 18px 10px; border-radius: 18px; border: 0; color: #fff; font-weight: 500; display: grid; justify-items: center; gap: 6px; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(200,180,255,.2); transition: transform .4s var(--ease-spring), background .3s; }
.teams button span { font-family: var(--script); font-size: 2rem; line-height: 1; }
.teams button[aria-pressed="true"] { background: linear-gradient(135deg, #ff6fae, #9b5de5); transform: scale(1.03); }
.team-note { margin-top: 10px !important; min-height: 1.4em; }

/* ---------- music ---------- */
.music { background: linear-gradient(180deg, #141c48, #0c1230 30%, #0c1230); color: #fff; overflow: hidden; }
.music .eyebrow { color: var(--gold-2); }
.music .title { color: #fff; }
.music .title .script { color: var(--gold-2); }
.music .lede { color: rgba(255,255,255,.75); }
.music canvas.stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.moods { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 26px 0 18px; }
.moods button { border: 0; padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; font-size: .8rem; box-shadow: inset 0 0 0 1px rgba(229,196,138,.3); }
.moods button[aria-pressed="true"] { background: var(--gold-2); color: #2b1f08; }
.tracks { display: grid; gap: 10px; }
.track { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 18px; border: 0; text-align: left; color: #fff; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(229,196,138,.16); transition: background .3s, transform .4s var(--ease-spring); }
.track:hover { background: rgba(255,255,255,.1); transform: translateX(4px); }
.track .disc { width: 52px; height: 52px; border-radius: 50%; background: repeating-radial-gradient(circle, #111 0 2px, #222 2px 4px); display: grid; place-items: center; position: relative; }
.track .disc::after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--disc, var(--coral)); }
.track.playing .disc { animation: spin 2.4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.track b { display: block; font-weight: 500; }
.track small { color: rgba(255,255,255,.65); font-size: .78rem; }
.track .eq { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.track .eq i { width: 3px; background: var(--gold-2); height: 4px; border-radius: 2px; }
.track.playing .eq i { animation: eq .9s ease-in-out infinite alternate; }
.track.playing .eq i:nth-child(2) { animation-delay: .2s; } .track.playing .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { to { height: 18px; } }
.song-ask { margin-top: 24px; display: grid; gap: 10px; }
.song-ask .row { display: flex; gap: 8px; }
.song-ask input { flex: 1; min-width: 0; min-height: 50px; padding: 0 18px; border-radius: 999px; border: 0; background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(229,196,138,.3); }
.song-ask input::placeholder { color: rgba(255,255,255,.5); }
.player { position: fixed; z-index: 65; left: 50%; bottom: calc(var(--dock-h) + 8px); transform: translateX(-50%); width: min(420px, calc(100% - 24px)); display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px 8px 8px; border-radius: 18px; background: rgba(12, 18, 48, .92); color: #fff; box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: rise .5s var(--ease-spring); }
@keyframes rise { from { transform: translate(-50%, 30px); opacity: 0; } }
.player .disc { width: 44px; height: 44px; border-radius: 50%; background: repeating-radial-gradient(circle, #111 0 2px, #2a2a2a 2px 4px); animation: spin 2.4s linear infinite; }
.player b { display: block; font-size: .85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player small { font-size: .7rem; opacity: .7; }
.player button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; }
.player iframe { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: 0; top: 0; }
.player .yt { font-size: .7rem; color: var(--gold-2); }

/* ---------- RSVP ---------- */
.rsvp { background: radial-gradient(900px 500px at 50% 0%, #fde6e8, transparent 70%), var(--paper); }
.rsvp-card { position: relative; width: min(680px, 100%); margin: 34px auto 0; padding: clamp(24px, 6vw, 44px); border-radius: 28px; background: #fff; box-shadow: var(--shadow-card), inset 0 0 0 1px var(--line); }
.rsvp-card::before { content: ""; position: absolute; inset: 10px; border-radius: 20px; border: 1px solid rgba(184, 138, 78, .25); pointer-events: none; }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span, .legend { font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--olive); }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 0; background: #faf6ee; box-shadow: inset 0 0 0 1px rgba(184,138,78,.28); transition: box-shadow .3s, background .3s; font-weight: 400; }
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--gold); }
.two { display: grid; gap: 0 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.attend { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.attend label { position: relative; cursor: pointer; }
.attend input { position: absolute; opacity: 0; }
.attend span { display: grid; justify-items: center; gap: 4px; padding: 16px 10px; border-radius: 18px; text-align: center; font-size: .86rem; font-weight: 500; background: #faf6ee; box-shadow: inset 0 0 0 1px rgba(184,138,78,.28); transition: all .35s var(--ease-spring); }
.attend span em { font-style: normal; font-size: 1.6rem; }
.attend input:checked + span { background: #fff1f2; box-shadow: inset 0 0 0 2px var(--coral); transform: scale(1.03); color: var(--coral); }
.attend input:focus-visible + span { outline: 2px solid var(--coral); outline-offset: 2px; }
.event-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.event-checks label { position: relative; cursor: pointer; }
.event-checks input { position: absolute; opacity: 0; }
.event-checks span { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; font-size: .82rem; background: #faf6ee; box-shadow: inset 0 0 0 1px rgba(184,138,78,.3); transition: all .3s ease; }
.event-checks input:checked + span { background: var(--olive); color: #fff; box-shadow: none; }
.event-checks input:checked + span::before { content: "✓"; }
.event-checks input:focus-visible + span { outline: 2px solid var(--coral); outline-offset: 2px; }
.honeypot { position: absolute; left: -9999px; }
.form-foot { display: grid; gap: 10px; justify-items: center; text-align: center; margin-top: 8px; }
.form-foot .fine { font-size: .78rem; color: var(--ink-2); margin: 0; }
#form-status { min-height: 1.4em; font-size: .9rem; color: var(--coral); margin: 0; }
.thanks { text-align: center; padding: 20px 0; }
.thanks .script { font-size: 3.4rem; color: var(--coral); }
.thanks img { width: 160px; margin: 0 auto 10px; }

/* ---------- FAQ ---------- */
.faq { background: var(--paper); }
.faq-list { margin-top: 30px; display: grid; gap: 10px; }
.faq details { border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 54px 18px 20px; position: relative; font-family: var(--serif); font-weight: 600; font-size: 1.2rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-weight: 300; font-size: 1.6rem; color: var(--gold); transition: transform .4s var(--ease-spring); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--ink-2); font-size: .94rem; }

/* ---------- footer ---------- */
.footer { position: relative; text-align: center; padding: 90px 20px calc(var(--dock-h) + 40px); background: linear-gradient(180deg, var(--paper), #dceefb 55%, #bcdcf6); overflow: hidden; }
.footer img.logo { width: min(320px, 70vw); margin: 0 auto; filter: drop-shadow(0 16px 30px rgba(90,60,20,.25)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
.footer h2 { font-family: var(--script); font-weight: 400; color: var(--coral); font-size: clamp(2.8rem, 10vw, 4.6rem); margin: 18px 0 0; line-height: 1.05; }
.footer p { color: var(--ink-2); margin: 6px 0; }
.footer .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 22px 0; }
.footer .tiny { font-size: .74rem; opacity: .75; margin-top: 26px; }
.toast { position: fixed; z-index: 300; left: 50%; bottom: calc(var(--dock-h) + 20px); transform: translate(-50%, 20px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-size: .86rem; opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease-spring); max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

canvas.fx-global { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 250; }
main { position: relative; }

/* story extras */
.story-frame img { clip-path: inset(0 0 0 0); }
.story-frame img:not(.on) { clip-path: inset(0 0 0 100%); transition: opacity 0.9s ease, transform 6s ease-out, clip-path 0s linear 0.9s; }
.story-frame img.on { transition: opacity 0.9s ease, transform 6s ease-out, clip-path 1.1s var(--ease-out); }
.story-glow { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px rgba(255, 236, 200, 0.35); border-radius: inherit; }
.story-nav { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.story-nav button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--coral); font-size: 1.4rem; line-height: 1; box-shadow: var(--shadow-soft), inset 0 0 0 1px var(--line); }
@media (min-width: 1000px) { .story-nav { justify-content: flex-start; } }

/* calendar chooser */
.cal-menu { border: 0; border-radius: 24px; padding: 24px 22px 14px; width: min(360px, calc(100% - 32px)); background: var(--paper); box-shadow: var(--shadow-card); text-align: center; }
.cal-menu[open] { display: grid; gap: 10px; animation: viewer-in .35s var(--ease-out); }
.cal-menu::backdrop { background: rgba(30, 20, 10, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.cal-menu .eyebrow { margin: 0 0 4px; }
.cal-menu .cal-list { display: grid; gap: 6px; text-align: left; margin-top: 4px; }
.cal-menu .cal-list a { display: flex; justify-content: space-between; gap: 8px; padding: 10px 14px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; font-size: .86rem; }
.cal-menu .cal-list a small { color: var(--ink-2); }

/* streaming */
.streams { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 22px; }
.stream { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; text-decoration: none; font-size: .82rem; font-weight: 500; color: #fff; border: 0; }
.stream svg { width: 18px; height: 18px; }
.stream.spotify { background: #1db954; color: #04130a; }
.stream.ytm { background: #ff0033; }
.stream.apple { background: linear-gradient(135deg, #fa5b75, #fb2c48); }
.stream.yt { background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(229,196,138,.35); }
.stream.mix { background: var(--gold-2); color: #2b1f08; }
.spotify-embed { width: 100%; height: 352px; border: 0; border-radius: 16px; margin-top: 18px; }
.track { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; padding: 0 10px 0 0; }
.track-main { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 10px; border: 0; background: none; color: inherit; text-align: left; border-radius: 18px; min-width: 0; }
.track-main > span { min-width: 0; }
.track-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track .apps { display: flex; gap: 2px; }
.track .apps a { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: rgba(255,255,255,.7); transition: color .2s, background .2s; }
.track .apps a:hover { background: rgba(255,255,255,.1); color: #fff; }
.track .apps a.sp:hover { color: #1db954; } .track .apps a.ym:hover { color: #ff3355; } .track .apps a.am:hover { color: #fa5b75; }
.track .apps svg { width: 17px; height: 17px; }

/* visible players (YouTube requires the player to be visible) */
.player { grid-template-columns: 44px 1fr auto; }
.player iframe { position: static; grid-column: 1 / -1; width: 100%; aspect-ratio: 16 / 9; height: auto; opacity: 1; pointer-events: auto; border: 0; border-radius: 12px; }
.player .pmeta { min-width: 0; }
.viewer .vplayer { position: absolute; z-index: 5; left: 12px; right: 12px; bottom: 150px; border-radius: 14px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,.6); }
.viewer .vplayer iframe { position: static; width: 100%; aspect-ratio: 16 / 9; height: auto; opacity: 1; pointer-events: auto; border: 0; display: block; }

/* ==========================================================================
   Larger screens
   ========================================================================== */
@media (min-width: 720px) {
  .two { grid-template-columns: 1fr 1fr; }
  .events { grid-template-columns: repeat(2, 1fr); }
  .venue-cards { grid-template-columns: 1fr 1fr; }
  .play-grid { grid-template-columns: 1fr 1fr; }
  .bowl-card canvas { aspect-ratio: 16 / 10; }
}
@media (min-width: 1000px) {
  body { --dock-h: 0px; }
  .dock { display: none; }
  .nav { display: flex; }
  .hero { padding-bottom: 60px; }
  .hero-inner { grid-template-columns: 1.05fr 1fr; align-items: center; text-align: left; justify-items: start; gap: 40px; }
  .logo-slot { width: min(46vw, 560px); justify-self: center; }
  .hero-copy { justify-items: start; }
  .countdown, .hero-ctas { justify-content: flex-start; }
  .scroll-cue { display: block; }
  .events { grid-template-columns: repeat(3, 1fr); }
  .story-grid { grid-template-columns: auto 1fr; grid-template-rows: 1fr; gap: 64px; }
  .story-frame { max-height: 80svh; }
  .story-text { text-align: left; min-height: 0; }
  .story-text h3 { font-size: 3.6rem; }
  .story-dots { justify-content: flex-start; }
  .viewer .phone { height: 92svh; border-radius: 24px; box-shadow: 0 40px 120px rgba(0,0,0,.7); }
  .player { bottom: 18px; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  [data-reveal], .hero [data-in], .poem span { opacity: 1 !important; transform: none !important; filter: none !important; }
  .hero h1 .name { clip-path: none !important; }
  .story-scroller { height: auto; }
  .story-stage { position: relative; height: auto; }
}

/* pass stamp sits clear of the centred departure text */
.pass-bottom .stamp { right: auto; left: 12px; top: 10px; }

/* track rows: let long titles wrap, show the equaliser only while playing */
.track-main { grid-template-columns: 46px 1fr auto; gap: 12px; }
.track-main b { white-space: normal; overflow: visible; line-height: 1.25; }
.track .disc { width: 46px; height: 46px; }
.track .eq { display: none; }
.track.playing .eq { display: flex; }
@media (max-width: 400px) { .track .apps a { width: 29px; height: 29px; } .track { padding-right: 6px; } }

/* ==========================================================================
   v2 — bowling opening, names, music toggle, welcome tag, polaroids,
   composed event cards, Baraat procession
   ========================================================================== */

/* opening: a bowling lane framed like a palace window */
.intro-names { margin: 4px 0 14px; }
.intro-names i { font-style: normal; color: var(--gold); font-size: .7em; }
.intro-lane { position: relative; width: min(80vw, 340px); height: min(46svh, 410px); margin: 0 auto; border-radius: 50% 50% 22px 22px / 22% 22% 22px 22px; overflow: hidden; background: #0c1230; box-shadow: 0 0 0 6px rgba(255, 250, 240, .75), 0 0 0 7.5px rgba(184, 138, 78, .7), 0 30px 60px -24px rgba(40, 10, 60, .65); cursor: pointer; }
.intro-lane canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.strike-text { position: absolute; left: 0; right: 0; top: 30%; margin: 0; text-align: center; font-family: var(--script); font-size: clamp(3rem, 15vw, 4.6rem); color: #ffd1e6; text-shadow: 0 0 14px #ff4fa3, 0 0 34px #b14cff; opacity: 0; transform: scale(.4) rotate(-8deg); pointer-events: none; }
.strike-text.show { animation: strike-pop 1.1s var(--ease-spring) forwards; }
@keyframes strike-pop { 0% { opacity: 0; transform: scale(.4) rotate(-8deg); } 35% { opacity: 1; transform: scale(1.12) rotate(-4deg); } 100% { opacity: 1; transform: scale(1) rotate(-4deg); } }
.bowl-start { margin: 18px auto 0; display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #d23a4c, #8d1a2c); color: #fff; font-weight: 500; letter-spacing: .04em; box-shadow: 0 14px 30px -12px rgba(141, 26, 44, .7); animation: seal-breathe 2.4s ease-in-out infinite; }
.bowl-start:disabled { opacity: .6; animation: none; }
.ball-dot { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff9aa5, #c23a48 55%, #5d0d1b); box-shadow: inset 0 -2px 3px rgba(0,0,0,.3); }

/* hero names: stacked, nothing clipped */
.hero h1 { display: grid; justify-items: center; line-height: 1.02; }
.hero h1 .name { padding: .14em .18em 0; margin: -.14em -.18em 0; }
.hero h1 .name { clip-path: inset(-50% 100% -50% -20%); }
.hero.ready h1 .name { clip-path: inset(-50% -20% -50% -20%); }
.hero h1 .amp { font-size: .5em; margin: -.12em 0 -.06em; transform: none; }
@media (min-width: 1000px) {
  .hero h1 { justify-items: start; }
  .hero h1 .amp { margin-left: 1.6em; }
  .hero h1 .name:last-child { margin-left: .7em; }
}

/* background music toggle */
.bgm { width: 40px; height: 40px; margin-left: auto; margin-right: 8px; border-radius: 50%; border: 0; display: inline-flex; align-items: flex-end; justify-content: center; gap: 2.5px; padding: 0 0 13px; background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px var(--line); }
.bgm i { width: 3px; height: 5px; border-radius: 2px; background: var(--coral); opacity: .55; }
.bgm.on i { opacity: 1; animation: eq .8s ease-in-out infinite alternate; }
.bgm.on i:nth-child(2) { animation-delay: .2s; } .bgm.on i:nth-child(3) { animation-delay: .4s; } .bgm.on i:nth-child(4) { animation-delay: .1s; }
.bgm.on i { animation-name: bgm-eq; }
@keyframes bgm-eq { to { height: 15px; } }
@media (min-width: 1000px) { .bgm { margin-left: 0; } }

/* compact player (background music and Vibe) */
.player.compact { grid-template-columns: 120px 1fr auto; width: min(360px, calc(100% - 24px)); padding: 6px 8px 6px 6px; }
.player.compact iframe { grid-column: 1; grid-row: 1; width: 120px; border-radius: 10px; }
.player.compact .disc { display: none; }
.player.audio-only { grid-template-columns: 44px 1fr auto; }
.player.audio-only iframe { display: none; }
.player.audio-only .disc { display: block; }

/* welcome: luggage tag beside the peacock garden */
.welcome { background: linear-gradient(180deg, var(--paper), #eaf4fb 40%, #f3f7ea 100%); overflow: hidden; }
.welcome-grid { position: relative; width: min(1080px, 100%); margin: 0 auto; display: grid; justify-items: center; }
.welcome-scene { position: relative; width: min(560px, 100%); border-radius: 46% 46% 28px 28px / 18% 18% 28px 28px; overflow: hidden; box-shadow: var(--shadow-card); }
.welcome-scene img { width: 100%; height: auto; display: block; animation: slow-zoom 18s ease-in-out infinite alternate; }
.welcome-scene canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@keyframes slow-zoom { to { transform: scale(1.06); } }
.tag-wrap { position: relative; z-index: 2; margin-top: -90px; width: min(400px, 92%); }
.tag-wrap::before { content: ""; position: absolute; left: 50%; top: -60px; width: 2px; height: 74px; background: linear-gradient(#b88a4e, #e5c48a); transform: rotate(8deg); transform-origin: bottom; }
.luggage-tag { position: relative; padding: 46px 26px 22px; border-radius: 22px 22px 18px 18px; text-align: center; background: linear-gradient(160deg, #fffaf1, #f8ead0); box-shadow: 0 30px 60px -30px rgba(77, 52, 18, .55), inset 0 0 0 1.5px rgba(184,138,78,.45), inset 0 0 0 7px #fffaf1, inset 0 0 0 8px rgba(184,138,78,.3); transform-origin: 50% 0; }
.luggage-tag.in { animation: tag-swing 5s ease-in-out .9s infinite; }
@keyframes tag-swing { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
.tag-hole { position: absolute; top: 14px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: #eaf2f0; box-shadow: inset 0 2px 4px rgba(0,0,0,.25), 0 0 0 3px #e5c48a; }
.tag-head, .tag-foot { display: flex; justify-content: space-between; font-size: .62rem; letter-spacing: .22em; text-transform: uppercase; color: var(--olive); margin: 0; }
.tag-foot { margin-top: 16px; padding-top: 12px; border-top: 1.5px dashed rgba(184,138,78,.5); color: var(--coral); }
.luggage-tag .script { margin: 8px 0 6px; font-size: clamp(3.2rem, 13vw, 4.4rem); color: var(--leaf); }
.luggage-tag .poem { font-size: clamp(1.08rem, 4.2vw, 1.28rem); }
.luggage-tag .signoff { margin-top: 14px; font-size: 1.05rem; }
@media (min-width: 1000px) {
  .welcome-grid { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .tag-wrap { margin: 0 0 0 -70px; }
  .tag-wrap::before { left: -40px; top: 40px; width: 60px; height: 2px; transform: rotate(-10deg); transform-origin: right; }
}

/* story: a stack of polaroids */
.story-frame { aspect-ratio: 0.7; max-height: 64svh; border-radius: 0; overflow: visible; background: none; box-shadow: none; }
.story-frame figure.polaroid { position: absolute; inset: 0; margin: 0; padding: 4% 4% 0; background: #fffdf8; border-radius: 6px; box-shadow: 0 34px 60px -30px rgba(60, 40, 10, .6), 0 2px 6px rgba(0,0,0,.08); opacity: 0; transform: translate3d(30px, 60px, 0) rotate(calc(var(--r) * 3)) scale(.94); transition: transform 1s var(--ease-out), opacity .6s ease, filter .6s ease; }
.story-frame figure.polaroid::before { content: ""; position: absolute; z-index: 2; top: -13px; left: 50%; width: 96px; height: 28px; transform: translateX(-50%) rotate(-4deg); background: rgba(229, 196, 138, .6); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.story-frame figure.polaroid img { position: static; display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; opacity: 1; transform: none; clip-path: none; transition: none; border-radius: 2px; }
.story-frame figure.polaroid figcaption { display: grid; place-items: center; height: 16%; min-height: 44px; font-family: var(--script); color: var(--coral); font-size: clamp(1.35rem, 5.6vw, 2rem); line-height: 1; padding-bottom: 2%; }
.story-frame figure.polaroid.on { opacity: 1; z-index: 3; transform: rotate(var(--r)); }
.story-frame figure.polaroid.past { opacity: 1; z-index: 1; transform: translate3d(calc(var(--r) * -6), 8px, 0) rotate(calc(var(--r) * -1.6)) scale(.95); filter: brightness(.94) saturate(.9); }

/* composed event card */
.viewer .vcard { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; background: linear-gradient(180deg, var(--top, #fffaf1), var(--bot, #fffaf1)); color: #2d2a24; transition: opacity .35s ease; overflow: hidden; }
.viewer .vcard.fading { opacity: .25; }
.viewer .vcard.dark { color: #fff7e6; }
.viewer .vdecor { width: 100%; height: auto; aspect-ratio: 900 / 272; object-fit: cover; transform-origin: 50% 0; animation: decor-sway 4.5s ease-in-out infinite alternate; }
@keyframes decor-sway { from { transform: rotate(-.6deg) translateY(-2px); } to { transform: rotate(.6deg) translateY(1px); } }
.viewer .vtext { align-self: center; text-align: center; padding: 6px 26px 0; }
.viewer .vtext > * { opacity: 0; transform: translateY(14px); }
.viewer .vtext.enter > * { animation: vtext-in .9s var(--ease-out) forwards; }
.viewer .vtext.enter > :nth-child(2) { animation-delay: .12s; } .viewer .vtext.enter > :nth-child(3) { animation-delay: .24s; }
@keyframes vtext-in { to { opacity: 1; transform: none; } }
.viewer .vkind { margin: 0; font-size: .7rem; letter-spacing: .34em; text-transform: uppercase; opacity: .8; }
.viewer .vtitle { margin: 2px 0 10px; font-family: var(--script); font-weight: 400; font-size: clamp(2.3rem, 10vw, 3.2rem); line-height: 1.05; color: var(--accent, #c23a48); }
.viewer .vwhen { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.viewer .vchip { padding: 5px 12px; border-radius: 999px; font-size: .74rem; background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px rgba(184,138,78,.4); }
.viewer .vcard.dark .vchip { background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(229,196,138,.45); }
.viewer .vscene { width: 100%; height: auto; aspect-ratio: 9 / 8; object-fit: cover; -webkit-mask-image: linear-gradient(transparent, #000 16%); mask-image: linear-gradient(transparent, #000 16%); animation: slow-zoom 9s ease-out forwards; transform-origin: 50% 100%; }

/* Vibe: a small now-playing chip instead of a big video panel */
.viewer .vplayer { position: absolute; z-index: 6; top: calc(70px + env(safe-area-inset-top, 0px)); right: 10px; left: auto; bottom: auto; display: flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 14px; background: rgba(0,0,0,.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 24px rgba(0,0,0,.35); overflow: visible; }
.viewer .vplayer iframe { position: static; width: 112px; height: 63px; aspect-ratio: auto; opacity: 1; pointer-events: auto; border: 0; border-radius: 9px; }
.viewer .vplayer span { font-size: .72rem; line-height: 1.25; max-width: 110px; }

/* Baraat procession */
.route .lbl { font-family: var(--sans); font-size: 11px; font-weight: 500; fill: var(--ink); }
.route .arrive { fill: var(--coral); opacity: 0; transition: opacity .6s ease; }
.route .arrive.show { opacity: 1; }
#route-svg .leg { transform-box: fill-box; transform-origin: 50% 0; animation: trot .46s ease-in-out infinite alternate; }
#route-svg .l2, #route-svg .l3 { animation-delay: -.23s; }
@keyframes trot { from { transform: rotate(24deg); } to { transform: rotate(-24deg); } }
#route-svg .rider-horse { animation: gallop .46s ease-in-out infinite alternate; }
@keyframes gallop { to { transform: translateY(-1.8px); } }
#route-svg .tail { transform-box: fill-box; transform-origin: 100% 0; animation: swish 1s ease-in-out infinite alternate; }
@keyframes swish { from { transform: rotate(-12deg); } to { transform: rotate(14deg); } }
#route-svg .dancer { animation: hop .42s ease-in-out infinite alternate; }
#route-svg .dancer.d2 { animation-delay: -.2s; }
#route-svg .arms { transform-box: fill-box; transform-origin: 50% 100%; animation: bhangra .42s ease-in-out infinite alternate; }
@keyframes hop { to { transform: translateY(-3px); } }
@keyframes bhangra { from { transform: rotate(-10deg); } to { transform: rotate(10deg); } }
#route-svg .stick { transform-box: fill-box; transform-origin: 0 100%; animation: drum .2s ease-in-out infinite alternate; }
@keyframes drum { to { transform: rotate(-28deg); } }
#route-svg .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker .3s ease-in-out infinite alternate; }
@keyframes flicker { to { transform: scale(.82, 1.18); } }

/* ===== v3: music without a floating frame ===== */
.music .player { position: relative; left: auto; bottom: auto; transform: none; width: 100%; margin: 4px 0 18px; z-index: 1; animation: none; background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); backdrop-filter: none; -webkit-backdrop-filter: none; }
.music .player.audio-only { grid-template-columns: 44px 1fr auto; }
.viewer #v-song.on { background: var(--accent, #d6336c); color: #fff; }
.viewer #v-song.on svg { animation: spin 2.4s linear infinite; }

/* ===== v3: the palace illustration (js/palace.js) ===== */
.palace { display: block; width: 100%; height: 100%; }
.palace .sky, .palace .shade, .palace .sun, .palace .moon, .palace .stars, .palace .glow, .palace .lampglow, .palace .bulbs, .palace .doorglow, .palace .rays { transition: opacity 1.4s ease; }
.palace .sky.golden, .palace .sky.night, .palace .shade, .palace .sun, .palace .moon, .palace .stars, .palace .glow, .palace .lampglow, .palace .bulbs, .palace .rays, .palace .doorglow { opacity: 0; }
.palace .shade { mix-blend-mode: multiply; }
.palace[data-time=golden] .sky.golden { opacity: 1; }
.palace[data-time=golden] .sun { opacity: .85; }
.palace[data-time=golden] .shade.golden { opacity: .2; }
.palace[data-time=golden] .lampglow { opacity: .45; }
.palace[data-time=night] .sky.night { opacity: 1; }
.palace[data-time=night] .shade.night { opacity: .46; }
.palace[data-time=night] .stars, .palace[data-time=night] .moon, .palace[data-time=night] .lampglow, .palace[data-time=night] .bulbs { opacity: 1; }
.palace[data-time=night] .glow { opacity: .95; transition-delay: var(--d, 0s); }
.palace[data-time=night] .stars circle { fill: #fff; animation: pal-twinkle 2.4s ease-in-out infinite alternate; animation-delay: var(--d); }
.palace[data-time=night] .bulbs circle { animation: pal-twinkle 1.6s ease-in-out infinite alternate; animation-delay: var(--d); }
.palace .stars circle { fill: #fff; }
.palace .bulbs circle { fill: #ffe39a; }
.palace .jet path { fill: none; stroke: #fff; stroke-linecap: round; stroke-dasharray: 5 7; opacity: .85; animation: pal-flow .7s linear infinite; animation-delay: var(--d); }
.palace .jet .core { stroke-dasharray: none; opacity: .45; animation: none; }
.palace .jet .splash { fill: #fff; opacity: .45; transform-box: fill-box; transform-origin: center; animation: pal-splash 1.1s ease-in-out infinite alternate; }
.palace .falls path { fill: none; stroke: #fff; stroke-linecap: round; stroke-dasharray: 4 6; opacity: .8; animation: pal-flow .6s linear infinite; }
.palace .leaf { transform-box: fill-box; transition: transform 1.3s cubic-bezier(.3, .7, .2, 1); }
.palace .leaf.l { transform-origin: left center; }
.palace .leaf.r { transform-origin: right center; }
.palace.open .leaf.l { transform: scaleX(.14) skewY(-9deg); }
.palace.open .leaf.r { transform: scaleX(.14) skewY(9deg); }
.palace.open .doorglow { opacity: 1; }
.palace.open .rays { opacity: .5; }
.palace.paused * { animation-play-state: paused !important; }
@keyframes pal-flow { to { stroke-dashoffset: -24; } }
@keyframes pal-splash { from { transform: scaleX(.8); opacity: .3; } to { transform: scaleX(1.15); opacity: .6; } }
@keyframes pal-twinkle { from { opacity: .35; } to { opacity: 1; } }

/* ===== v3: the opening film ===== */
.intro { display: block; background: #2a2150; overflow: hidden; perspective: none; transition: opacity .7s ease, visibility 0s linear .7s; }
.intro.open { opacity: 0; visibility: hidden; }
.ci-stage { position: absolute; inset: 0; transition: transform 1.05s cubic-bezier(.55, 0, .75, .2), filter 1s ease; will-change: transform; }
.intro.play .ci-stage { animation: ci-in 1.6s cubic-bezier(.2, .7, .2, 1) both; }
.intro.push .ci-stage { animation: none; transform: scale(4.2); }
.ci-scene, #ci-fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ci-text { position: absolute; left: 0; right: 0; top: max(7svh, calc(env(safe-area-inset-top, 0px) + 28px)); text-align: center; padding: 0 20px; pointer-events: none; color: #fff; transition: opacity .5s ease, transform .9s ease; }
.ci-text .eyebrow { color: #fff7ea; text-shadow: 0 1px 12px rgba(60, 20, 80, .55); margin: 0; opacity: 0; animation: ci-up .8s ease .35s forwards; }
.ci-names { font-family: var(--script); font-size: clamp(3rem, 13vw, 5.4rem); line-height: 1.05; margin: 6px 0 0; color: #fff4e0; text-shadow: 0 0 18px rgba(255, 200, 120, .55), 0 2px 24px rgba(40, 10, 60, .6); opacity: 0; transform: translateY(14px) scale(.96); filter: blur(6px); transition: opacity .9s ease, transform 1.1s cubic-bezier(.2, .8, .2, 1), filter .9s ease; }
.ci-names i { font-style: normal; color: var(--gold-2, #f0d08c); font-size: .62em; }
.ci-line { margin: 10px 0 0; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: #ffeccc; text-shadow: 0 1px 10px rgba(40, 10, 60, .7); opacity: 0; transform: translateY(10px); transition: opacity .8s ease, transform .8s ease; }
.ci-line b { display: inline-block; margin-top: 6px; font-weight: 500; letter-spacing: .3em; color: #fff; }
.intro.named .ci-names { opacity: 1; transform: none; filter: none; }
.intro.lined .ci-line { opacity: 1; transform: none; }
.intro.push .ci-text { opacity: 0; transform: translateY(-20px) scale(1.06); }
.ci-flash { position: absolute; inset: 0; background: radial-gradient(circle at 50% 62%, #fffdf6, #fff3dc 60%, #ffe7c4); opacity: 0; pointer-events: none; transition: opacity .8s ease .3s; }
.intro.push .ci-flash { opacity: 1; }
.ci-skip { position: absolute; right: 16px; bottom: max(18px, env(safe-area-inset-bottom, 0px)); z-index: 3; border: 0; border-radius: 999px; padding: 9px 16px; font: 500 .78rem var(--sans, system-ui); letter-spacing: .08em; color: #fff; background: rgba(20, 10, 40, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); cursor: pointer; }
.intro.push .ci-skip { opacity: 0; transition: opacity .3s; }
@keyframes ci-in { from { opacity: 0; transform: scale(1.08); } to { opacity: 1; transform: scale(1); } }
@keyframes ci-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) { .ci-text { top: 4.5svh; } .ci-names { font-size: clamp(3.4rem, 5.6vw, 5.2rem); } }

/* ===== v3: where the palace art sits ===== */
.welcome-scene .art { aspect-ratio: 4 / 5; animation: slow-zoom 18s ease-in-out infinite alternate; }
.invite-art { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%); mask-image: linear-gradient(180deg, transparent 0, #000 22%); }
.invite-art .art { position: absolute; left: 50%; bottom: 0; width: 100%; height: 125%; transform: translateX(-50%); will-change: transform; }
.venue-art .art { aspect-ratio: 1 / 1; }
@media (min-width: 700px) { .venue-art .art { aspect-ratio: 16 / 10; } }

/* ===== v3: story route plane, lighter polaroids, transform-only progress line ===== */
.story-route { display: block; width: min(300px, 86%); height: auto; margin: 8px auto 0; overflow: visible; }
.story-route .rt-track { fill: none; stroke: var(--gold); stroke-opacity: .5; stroke-width: 1.4; stroke-dasharray: 4 6; }
.story-route .rt-done { fill: none; stroke: var(--coral); stroke-width: 1.8; stroke-linecap: round; }
.story-route circle { fill: #fffaf1; stroke: var(--gold); stroke-width: 1.4; transition: fill .3s ease, stroke .3s ease; transform-box: fill-box; transform-origin: center; }
.story-route circle.hit { fill: var(--coral); stroke: var(--coral); animation: stop-pop .5s var(--ease-spring, ease-out); }
.story-route .rt-plane { color: var(--coral); }
@keyframes stop-pop { 40% { transform: scale(1.7); } }
@media (min-width: 1000px) { .story-route { margin-left: 0; } }
.journey .plane { transition: opacity .45s ease; }
.story-frame figure.polaroid { will-change: transform, opacity; transition: transform 1s var(--ease-out), opacity .6s ease; }
.story-frame figure.polaroid.past { filter: none; }
.story-frame figure.polaroid::after { content: ""; position: absolute; inset: 0; border-radius: 6px; background: rgba(60, 40, 10, .08); opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.story-frame figure.polaroid.past::after { opacity: 1; }
.flightline i { width: 100%; transform: scaleX(0); transform-origin: left center; }
.flightline svg { left: 0; will-change: transform; }

/* Reduce Motion: the opening still plays, with soft fades instead of the zoom through the doors */
@media (prefers-reduced-motion: reduce) {
  .intro, .ci-text, .ci-names, .ci-line, .ci-flash { transition-property: opacity, visibility !important; transition-duration: .8s !important; }
  .ci-names, .ci-line { transform: none !important; filter: none !important; }
  .intro.play .ci-stage, .intro.push .ci-stage { animation: none; transform: none; }
}
