:root {
  --ivory: #fbf6ee;
  --paper: #fffaf2;
  --wine: #701c32;
  --wine-deep: #4e1222;
  --rose: #c78f99;
  --rose-soft: #f1dde0;
  --gold: #b39461;
  --gold-soft: #d9c49a;
  --sage: #89947c;
  --ink: #382c2b;
  --muted: #6b5a57;
  --line: #e6d7c2;
  --error: #a3261f;
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --script: 'Pinyon Script', 'Cormorant Garamond', Georgia, serif;
  --names: 'Alex Brush', 'Great Vibes', 'Pinyon Script', cursive;
  --deva: 'Tiro Devanagari Sanskrit', 'Noto Serif Devanagari', 'Kohinoor Devanagari', serif;
  --pad: 22px;
  --nav-h: 54px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.22, .7, .2, 1);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .24 0 0 0 0 .18 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); scrollbar-gutter: stable; }
body {
  margin: 0; color: var(--ink); font: 400 16px/1.65 var(--sans); overflow-x: hidden;
  background: var(--grain), radial-gradient(ellipse at 50% 0, #fffdf8, transparent 60%), var(--ivory);
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
button, a, label, summary { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
p { margin: 0; }

#petals { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }

/* ============ ENVELOPE ============ */
.intro {
  position: fixed; inset: 0; z-index: 100; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--grain), radial-gradient(ellipse at 50% 42%, #5a1a2a 0, #3a0d18 60%, #24060e 100%);
  transition: opacity .6s ease, visibility .6s;
}
.intro-glow { position: absolute; left: 50%; top: 40%; width: 130vmin; height: 110vmin; transform: translate(-50%, -50%); background: radial-gradient(closest-side, #ffdca066, #ffb8701a 60%, transparent); opacity: 0; transition: opacity 1s ease .6s; pointer-events: none; }
.envelope {
  --w: min(84vw, 380px, calc((100svh - 190px) * .75)); position: relative; width: var(--w); aspect-ratio: 3 / 4; margin-top: 20px;
  perspective: 1600px; filter: drop-shadow(0 22px 26px #12020799) drop-shadow(0 3px 4px #12020766);
  transition: transform .6s var(--ease);
}
.envelope::after { content: ''; position: absolute; inset: 0; background: var(--grain); background-size: 160px; border-radius: 4px; pointer-events: none; z-index: 6; mix-blend-mode: multiply; }
.env-back { position: absolute; inset: 0; border-radius: 4px; background: linear-gradient(180deg, #4e1222, #6a1b2f); }
.env-back::before { content: ''; position: absolute; inset: 0 0 46% 0; background: linear-gradient(180deg, #e2bdbb, #cf9ea2); clip-path: polygon(0 0, 100% 0, 50% 100%); opacity: .95; }
.env-card {
  position: absolute; left: 6%; right: 6%; top: 8%; height: 86%; z-index: 1; border-radius: 2px;
  background: var(--grain), linear-gradient(180deg, #eef0f6, #f1f1f5 70%, #f5f1ee);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 0 5%; gap: 4px; overflow: hidden;
  box-shadow: 0 0 0 1px #e6d7c2, inset 0 0 0 8px #fffaf2, inset 0 0 0 9px var(--gold-soft);
  transition: transform .8s var(--ease) .75s;
}
.env-card-orn { width: 110px; height: 14px; color: var(--gold); }
.hc-mono { position: absolute; z-index: 1; top: 4.5%; left: 50%; transform: translateX(-50%); background: #f1f2f7d9; width: 24%; aspect-ratio: 1; border-radius: 50%; border: 1px solid var(--gold); box-shadow: 0 0 0 3px #fffaf2, 0 0 0 4px var(--gold-soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.hc-mono span { font: italic 500 clamp(22px, 7vw, 30px)/1 var(--serif); color: var(--gold); letter-spacing: 1px; }
.hc-mono i { font-style: normal; color: var(--gold-soft); margin: 0 4px; }
.hc-mono small { font-size: 7px; letter-spacing: 1px; white-space: nowrap; color: var(--muted); }
.hc-art { position: absolute; top: 14%; left: 50%; height: 71%; width: auto; max-width: none; transform: translateX(-50%); }
.hc-names { position: relative; z-index: 1; font: 400 clamp(30px, 9.5vw, 40px)/1.1 var(--names); color: var(--wine); }
.hc-names i { font-style: normal; color: var(--gold); }
.env-front { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; overflow: visible; }
.emb-hi { color: #a54158; opacity: .35; transform: translate(-.6px, -.6px); }
.emb-lo { color: #2e0612; opacity: .45; transform: translate(.6px, .6px); }
.env-flap { position: absolute; left: 0; right: 0; top: 0; height: 55%; z-index: 4; transform-origin: 50% 0; transition: transform .7s cubic-bezier(.45, 0, .25, 1) .2s; }
.flap-face { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: opacity .12s ease .48s; }
.flap-out { filter: drop-shadow(0 5px 6px #2a051077); }
.flap-in { transform: scaleY(-1); opacity: 0; }
.seal-wrap { position: absolute; left: 50%; top: 53%; z-index: 5; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; }
.tap-label { position: absolute; bottom: calc(100% + 2px); white-space: nowrap; font: clamp(30px, 9vw, 38px)/1.3 var(--script); color: #f6dfc7; text-shadow: 0 2px 10px #2a0510; transition: opacity .3s; }
.seal {
  position: relative; width: clamp(86px, 25vw, 108px); aspect-ratio: 1; padding: 0; border: 0; background: none; border-radius: 50%;
  filter: drop-shadow(0 6px 8px #1e030a99) drop-shadow(0 1px 2px #1e030a88);
  transition: transform .45s var(--ease), opacity .4s ease;
}
.seal svg { width: 100%; height: 100%; display: block; }
.seal::before { content: ''; position: absolute; inset: -9px; border-radius: 50%; border: 1px solid #f0d9a488; animation: halo 3.2s ease-out infinite; }
.seal:hover { transform: scale(1.04); }
.seal:active { transform: scale(.97); }
.tap-hint { position: relative; margin-top: 26px; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: #e3bfb6; transition: opacity .3s; }
.skip {
  position: absolute; z-index: 7; top: max(10px, env(safe-area-inset-top)); right: 10px; min-height: 44px; min-width: 44px; padding: 0 14px;
  border: 0; border-radius: 22px; background: transparent; color: #f1d5cc; font-size: 14px; letter-spacing: 1px; transition: opacity .3s;
}
.skip:hover { background: #ffffff14; }
@keyframes halo { 0% { transform: scale(.92); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.18); opacity: 0; } }

.intro.opening .seal { transform: translateY(12px) scale(.86); opacity: 0; }
.intro.opening .seal::before { animation: none; opacity: 0; }
.intro.opening .tap-label, .intro.opening .tap-hint, .intro.opening .skip { opacity: 0; }
.intro.opening .env-flap { transform: scaleY(-1); }
.intro.opening .flap-out { opacity: 0; }
.intro.opening .flap-in { opacity: 1; }
.intro.flap-open .env-flap { z-index: 0; }
.intro.opening .env-card { transform: translateY(-46%); }
.intro.opening .intro-glow { opacity: 1; }
/* The card leaves the envelope and presents itself before the invitation opens. */
.env-front, .env-back { transition: opacity .6s ease; }
.intro.presenting .env-front, .intro.presenting .env-back, .intro.presenting .env-flap { opacity: 0; transition: opacity .6s ease; }
.intro.presenting .env-card { z-index: 8; transform: translateY(-2%) scale(1.1); transition: transform 1s var(--ease); }
.present-hint { position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); margin: 0; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: #e3bfb6; opacity: 0; transition: opacity .5s ease; pointer-events: none; }
.intro.presenting .present-hint { opacity: 1; transition-delay: 1.2s; }
.intro.presenting { cursor: pointer; }
.intro.leaving { opacity: 0; visibility: hidden; }
.intro.leaving .envelope { transform: translateY(4%) scale(.98); }

/* ============ NAV ============ */
.topnav {
  position: sticky; top: 0; z-index: 40; height: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 12px 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #fbf6eef0; border-bottom: 1px solid #e6d7c2aa;
}
.nav-mono { font: italic 500 22px/1 var(--serif); color: var(--wine); text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.nav-mono i { font: 18px var(--script); color: var(--gold); margin: 0 1px; }
.topnav nav { display: flex; gap: 2px; }
.topnav nav a { display: flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 14px; text-decoration: none; color: var(--ink); border-radius: 22px; }
.topnav nav a.nav-rsvp { color: var(--wine); font-weight: 500; }
.topnav nav a:hover { background: #7a23380d; }

/* ============ SHARED ============ */
.section { padding: 56px var(--pad); }
.section-head { text-align: center; margin: 0 auto 30px; max-width: 560px; }
.kicker { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); font-weight: 500; }
.title { font: 500 clamp(38px, 11vw, 56px)/1.08 var(--serif); color: var(--wine); margin: 6px 0 0; letter-spacing: .3px; }
.lede { font: italic 19px/1.5 var(--serif); color: var(--muted); margin-top: 12px; }
.divider { display: block; width: 180px; height: 20px; margin: 22px auto; color: var(--gold); }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--wine); font-size: 15px; font-weight: 500; letter-spacing: .3px; text-decoration: none; text-align: center;
  transition: background .2s, color .2s, transform .2s;
}
.button svg { width: 18px; height: 18px; flex: none; }
.button.primary { background: var(--wine); color: #fff8f0; }
.button.primary:hover { background: #5e1729; }
.button.ghost { background: transparent; color: var(--wine); }
.button.ghost:hover { background: #701c320d; }
.button.light { background: var(--ivory); color: var(--wine); border-color: var(--ivory); }
.button.wide { width: 100%; }
.button:active { transform: scale(.98); }
.link-button { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--wine); font-size: 15px; text-decoration: underline; text-decoration-color: #701c3255; text-underline-offset: 4px; }
.link-button.light { color: #f3d9cf; text-decoration-color: #f3d9cf66; }
.round { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--wine); font-size: 26px; line-height: 1; display: grid; place-items: center; padding: 0 0 3px; }
.round:disabled { opacity: .35; cursor: default; }

html.anim .reveal { opacity: 0; transform: translateY(14px); transition: opacity .8s ease, transform .8s var(--ease); }
html.anim .reveal.in { opacity: 1; transform: none; }

/* ============ HERO ============ */
.hero { position: relative; padding: 14px 12px 8px; text-align: center; }
.hero-spray { display: none; }
.hero-frame { position: relative; padding: 58px 24px 46px; }
.hero-frame::before, .hero-frame::after { content: ''; position: absolute; pointer-events: none; }
.hero-frame::before { inset: 0; border: 1px solid var(--gold); opacity: .7; }
.hero-frame::after { inset: 6px; border: 1px solid var(--gold-soft); opacity: .7; }
.corner { position: absolute; width: 64px; height: 64px; color: var(--gold); }
.corner.tl { top: 0; left: 0; } .corner.tr { top: 0; right: 0; transform: scaleX(-1); }
.corner.bl { bottom: 0; left: 0; transform: scaleY(-1); } .corner.br { bottom: 0; right: 0; transform: scale(-1); }
.ganesh { width: 112px; height: 112px; border-radius: 50%; display: block; margin: 4px auto 18px; box-shadow: 0 0 0 2px var(--gold), 0 0 0 6px var(--paper), 0 0 0 7px var(--gold-soft); }
.shloka { font: 16px/1.95 var(--deva); color: var(--wine); }
.shloka span { display: block; font-size: 15px; color: var(--gold); letter-spacing: .5px; margin-bottom: 2px; }
.hero-intro { font: italic 19px/1.5 var(--serif); color: var(--muted); max-width: 380px; margin: 20px auto 12px; }
.names { margin: 0; font: 400 clamp(66px, 21vw, 96px)/1.05 var(--names); color: var(--wine); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.person { display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 100%; }
.person-name { white-space: nowrap; }
.names .amp { font: 400 clamp(44px, 12vw, 60px)/1 var(--names); color: var(--gold); margin: 0; }
.names:focus { outline: none; }
.person-parents { margin-top: 10px; font: italic 18px/1.35 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.date-line { font: 500 15px/1.4 var(--sans); letter-spacing: 3px; text-transform: uppercase; color: var(--wine); }
.scroll-cue { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 14px; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); text-decoration: none; }

/* ============ SAVE THE DATE ============ */
.save-date { padding-top: 40px; }
.keepsake {
  position: relative; max-width: 520px; margin: 0 auto; padding: 30px 20px 18px; text-align: center;
  background: var(--grain), linear-gradient(180deg, #fffdf8, #fbf1e4); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 1px 0 #fff inset, 0 14px 30px #701c3214;
}
.keepsake::before { content: ''; position: absolute; inset: 7px; border: 1px solid #d9c49a99; border-radius: 2px; pointer-events: none; }
.keepsake-orn { width: 150px; height: 18px; color: var(--gold); display: block; margin: 0 auto 10px; }
.keepsake .title { font-size: clamp(36px, 10vw, 46px); font-style: italic; font-weight: 400; }
.scratch { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; position: relative; margin: 20px auto 0; max-width: 400px; height: 158px; border-radius: 8px; overflow: hidden; background: linear-gradient(180deg, #fffaf2, #f7ead8); box-shadow: inset 0 0 0 1px #e6d7c2; }
.scratch-date { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.scratch-num { font: 600 clamp(36px, 11vw, 46px)/1 var(--serif); color: var(--wine); letter-spacing: 1px; font-variant-numeric: lining-nums; }
.scratch-day { font-size: 13px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--muted); }
#scratch-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; transition: opacity .7s ease; }
.scratch.revealed #scratch-canvas { opacity: 0; pointer-events: none; }
.scratch.revealed .scratch-num { animation: settle .9s var(--ease); }
.scratch.revealed .scratch-day { animation: fade-up .7s .45s var(--ease) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }
@keyframes settle { from { transform: scale(.94); opacity: .4; } }
.scratch-hint { margin-top: 12px; font-size: 14px; color: var(--muted); }
.countdown { max-width: 520px; margin: 18px auto 0; display: flex; justify-content: center; padding: 0 4px; }
.countdown .button { padding: 0 16px; font-size: 14px; }

/* ============ GALLERY ============ */
.carousel { max-width: 1160px; margin: 0 auto; }
.slides {
  list-style: none; margin: 0 calc(var(--pad) * -1); padding: 14px var(--pad) 26px; display: flex; gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); scrollbar-width: none; overscroll-behavior-x: contain;
}
.slides::-webkit-scrollbar { display: none; }
.slides:focus-visible { outline-offset: -4px; }
.slide { flex: 0 0 78%; max-width: 360px; scroll-snap-align: start; }
.polaroid {
  margin: 0; padding: 10px 10px 0; background: #fffdf8; border-radius: 2px; position: relative; cursor: zoom-in;
  box-shadow: 0 1px 1px #382c2b1a, 0 10px 24px #382c2b24; transform: rotate(var(--tilt, 0deg)); transition: transform .4s var(--ease);
}
.polaroid::after { content: ''; position: absolute; inset: 0; background: var(--grain); pointer-events: none; border-radius: 2px; }
.polaroid img { width: 100%; height: auto; aspect-ratio: 600 / 750; object-fit: cover; background: #f1e4d2; }
.polaroid figcaption { font: 26px/1.2 var(--script); color: var(--wine); text-align: center; padding: 12px 6px 16px; }
.slide:nth-child(3n+1) .polaroid { --tilt: -1.6deg; }
.slide:nth-child(3n+2) .polaroid { --tilt: 1.2deg; }
.slide:nth-child(3n) .polaroid { --tilt: -.8deg; }
.carousel-controls { display: flex; align-items: center; justify-content: center; gap: 20px; }
.slide-count { min-width: 52px; text-align: center; font: italic 18px var(--serif); color: var(--muted); }

/* ============ EVENTS ============ */
.events { padding-bottom: 24px; }
.schedule-note { margin-top: 14px; display: inline-block; font-size: 14px; color: var(--muted); padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fffaf2; }
.event-flow { list-style: none; margin: 0 calc(var(--pad) * -1); padding: 0; counter-reset: ev; }
.event { --accent: var(--wine); --tint: #fbf3e6; position: relative; background: var(--grain), var(--tint); padding-bottom: 36px; }
.event + .event { margin-top: 0; }
.event[data-theme=tilak] { --accent: #a32a24; --tint: #fbf1e3; }
.event[data-theme=haldi] { --accent: #8a5d08; --tint: #fcf2d6; }
.event[data-theme=sangeet] { --accent: #e7c77f; --tint: #17214a; color: #f1e9da; }
.event[data-theme=wedding] { --accent: var(--wine); --tint: #f8e7e7; }
.event-art { margin: 0; }
.event-art img { width: 100%; height: auto; aspect-ratio: 800 / 560; background: var(--tint); }
.event-body { padding: 22px var(--pad) 0; max-width: 560px; margin: 0 auto; }
.event-num { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.event-num::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .35; }
.event h3 { font: 500 clamp(36px, 10.5vw, 46px)/1.05 var(--serif); margin: 8px 0 6px; color: var(--accent); }
.event[data-theme=sangeet] h3 { color: #f6dfa4; }
.event .tagline { font: italic 19px/1.45 var(--serif); opacity: .9; }
.event dl { margin: 20px 0 0; display: grid; gap: 14px; }
.event dl div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; align-items: baseline; }
.event dt { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.event dd { margin: 0; font-size: 16px; line-height: 1.5; }
.event dd small { display: block; font-size: 14px; opacity: .75; }
.tba { font-style: italic; opacity: .8; }
.swatches { display: inline-flex; gap: 6px; margin-left: 8px; vertical-align: -3px; }
.swatches i { width: 16px; height: 16px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px #0000001a; }
.event-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.event-actions .button { flex: 1 1 140px; }
.event .button.primary { background: var(--accent); border-color: var(--accent); }
.event .button.ghost { color: var(--accent); border-color: var(--accent); }
.event[data-theme=sangeet] .button.primary { color: #17214a; }
.attend[aria-pressed=true]::before { content: '✓'; }
.attend-note { min-height: 22px; margin-top: 8px; font-size: 14px; opacity: .8; }

/* ============ VENUES ============ */
.venue-list { display: grid; gap: 44px; max-width: 1160px; margin: 0 auto; }
.venue { text-align: center; }
.venue-art { margin: 0 0 18px; padding: 6px; background: var(--paper); border: 1px solid var(--gold-soft); }
.venue-art img { width: 100%; height: auto; aspect-ratio: 800 / 500; }
.venue h3 { font: 500 32px/1.1 var(--serif); color: var(--wine); margin: 6px 0 8px; }
.venue address { font-style: normal; font-size: 16px; line-height: 1.55; color: var(--ink); max-width: 340px; margin: 0 auto 18px; }

/* ============ FAMILIES ============ */
.family-list { display: grid; gap: 0; max-width: 1000px; margin: 0 auto; text-align: center; }
.family { padding: 6px 4px; }
.family-divider { margin: 30px auto; }
.family h3 { font: 500 clamp(30px, 9vw, 36px)/1.15 var(--serif); color: var(--wine); margin: 8px 0 10px; overflow-wrap: break-word; }
.family .parents-line { font: italic 19px/1.45 var(--serif); color: var(--ink); }
.family .grand-line { font: italic 17px/1.45 var(--serif); color: var(--muted); margin-top: 6px; }
.family address { font-style: normal; white-space: pre-line; font-size: 15px; line-height: 1.65; color: var(--muted); margin: 16px auto 0; max-width: 360px; }

/* ============ RSVP ============ */
.rsvp { padding-bottom: 88px; background: var(--grain), linear-gradient(180deg, transparent, #f6ebe2 18%, #f6ebe2 88%, transparent); }
.rsvp-form, .rsvp-ready { max-width: 560px; margin: 0 auto; }
.field { margin: 0 0 22px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend, .extras summary { display: block; font-size: 15px; font-weight: 500; color: var(--ink); margin: 0 0 8px; padding: 0; }
.optional { font-weight: 400; color: var(--muted); font-size: 14px; margin-left: 4px; }
.field input:not([type=radio]):not([type=checkbox]), .field select, .field textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; font-size: 17px; line-height: 1.4;
  background: #fffdf9; border: 1px solid #d8c7b0; border-radius: 10px; scroll-margin: 120px 0 160px;
  transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--wine) 50%), linear-gradient(135deg, var(--wine) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px #701c321f; }
.field input[aria-invalid=true] { border-color: var(--error); }
.field-error { color: var(--error); font-size: 14px; margin-top: 6px; min-height: 0; }
.field-error:empty { display: none; }
.choice { display: grid; gap: 10px; }
.option { position: relative; display: block !important; margin: 0 !important; }
.option input, .check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.option > span { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 0 16px; border: 1px solid #d8c7b0; border-radius: 12px; background: #fffdf9; font-weight: 400; font-size: 16px; transition: border-color .2s, background .2s; }
.option > span::before { content: ''; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #b9a58a; flex: none; transition: box-shadow .2s, border-color .2s; }
.option input:checked + span { border-color: var(--wine); background: #fff; }
.option input:checked + span::before { border-color: var(--wine); box-shadow: inset 0 0 0 5px #fff, inset 0 0 0 10px var(--wine); }
.option input:focus-visible + span, .check input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 52px; height: 52px; flex: none; border-radius: 50%; border: 1px solid var(--wine); background: #fffdf9; color: var(--wine); font-size: 24px; line-height: 1; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper input { text-align: center; max-width: 90px; font: 500 22px var(--serif) !important; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.event-checks { display: grid; gap: 10px; }
.check { position: relative; display: block !important; margin: 0 !important; }
.check > span { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 16px; border: 1px solid #d8c7b0; border-radius: 12px; background: #fffdf9; font-weight: 400; transition: border-color .2s, background .2s, box-shadow .4s; }
.check > span::before { content: ''; width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1.5px solid #b9a58a; display: grid; place-items: center; font-size: 14px; color: #fff; transition: background .2s, border-color .2s; }
.check > span > span { display: block; }
.check b { font: 600 18px/1.2 var(--serif); display: block; }
.check small { display: block; font-size: 13px; color: var(--muted); }
.check input:checked + span { border-color: var(--wine); background: #fff; }
.check input:checked + span::before { content: '✓'; background: var(--wine); border-color: var(--wine); }
.check.flash > span { box-shadow: 0 0 0 4px #b3946166; }
.extras { margin: 4px 0 26px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.extras summary { list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 56px; margin: 0; cursor: pointer; }
.extras summary::-webkit-details-marker { display: none; }
.extras summary::after { content: '+'; font-size: 24px; color: var(--wine); font-weight: 400; transition: transform .25s; }
.extras[open] summary::after { transform: rotate(45deg); }
.extras[open] { padding-bottom: 4px; }
.form-note { margin-top: 12px; font-size: 14px; line-height: 1.55; color: var(--muted); text-align: center; }
.rsvp-ready { margin-top: 28px; padding: 26px 20px 18px; text-align: center; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; outline: none; }
.rsvp-ready .divider { margin: 0 auto 14px; }
.rsvp-ready h3 { font: 500 30px/1.15 var(--serif); color: var(--wine); margin: 0 0 6px; }
.rsvp-ready > p { color: var(--muted); }
.rsvp-ready pre { text-align: left; white-space: pre-wrap; word-break: break-word; font: 14px/1.7 var(--sans); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin: 16px 0 18px; }
.rsvp-ready .button + .button { margin-top: 10px; }
.share-status { min-height: 22px; margin: 10px 0 4px; font-size: 14px; color: var(--muted); }

/* ============ CLOSING ============ */
.closing { position: relative; overflow: hidden; text-align: center; color: #f6e6da; background: var(--grain), radial-gradient(ellipse at 50% 0, #8a2a40, var(--wine) 45%, var(--wine-deep)); padding: 72px var(--pad) calc(96px + var(--safe-b)); }
.close-spray { position: absolute; width: 170px; height: auto; opacity: .55; pointer-events: none; }
.close-spray.l { left: -46px; bottom: -30px; transform: rotate(8deg); }
.close-spray.r { right: -50px; top: -20px; transform: rotate(190deg); }
.closing-inner { position: relative; max-width: 520px; margin: 0 auto; }
.monogram { display: inline-flex; align-items: center; justify-content: center; gap: 2px; width: 84px; height: 84px; border-radius: 50%; border: 1px solid var(--gold-soft); box-shadow: inset 0 0 0 5px var(--wine), inset 0 0 0 6px #d9c49a88; font: italic 500 30px/1 var(--serif); color: #f5e4c0; margin-bottom: 18px; }
.monogram i { font-style: italic; color: var(--gold-soft); }
.closing .kicker { color: var(--gold-soft); }
.closing .title { color: #fff6ea; }
.closing .lede { color: #efc9c1; }
.closing-names { font: italic 500 28px/1.2 var(--serif); color: var(--gold-soft); margin: 26px 0 22px; }
.love-status { min-height: 26px; margin: 12px 0 18px; font: italic 18px var(--serif); color: #f3d4c9; }

/* ============ MUSIC ============ */
.music {
  position: fixed; z-index: 45; right: 14px; bottom: calc(14px + var(--safe-b)); width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: #fffaf2f0; color: var(--wine); display: grid; place-items: center; padding: 0;
  box-shadow: 0 4px 14px #382c2b26; transition: opacity .25s, transform .25s;
}
.music svg { width: 22px; height: 22px; }
.music .on { display: none; }
.music[aria-pressed=true] .on { display: block; }
.music[aria-pressed=true] .off { display: none; }
body.is-locked .music, body.typing .music { opacity: 0; pointer-events: none; transform: translateY(8px); }

/* ============ LIGHTBOX ============ */
.lightbox { border: 0; padding: 12px 12px 4px; background: #fffdf8; max-width: min(520px, 94vw); width: 100%; border-radius: 3px; box-shadow: 0 30px 80px #1e030a66; }
.lightbox::backdrop { background: #2a0a12d0; }
.lightbox img { width: 100%; height: auto; max-height: 72svh; object-fit: contain; }
.lightbox p { font: 28px/1.4 var(--script); color: var(--wine); text-align: center; margin: 6px 0; }
.lightbox-close { position: absolute; top: 6px; right: 6px; z-index: 1; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fffdf8e6; color: var(--wine); font-size: 26px; line-height: 1; }

/* ============ TABLET ============ */
@media (min-width: 720px) {
  :root { --pad: 40px; }
  .section { padding: 72px var(--pad); }
  .venue-list { grid-template-columns: 1fr 1fr; gap: 36px; }
  .family-list { grid-template-columns: 1fr 1fr; gap: 0; }
  .family { padding: 8px 28px; }
  .family + .family { border-left: 1px solid var(--line); }
  .family-divider { display: none; }
  .hero-frame { max-width: 680px; margin: 0 auto; padding: 72px 56px 60px; }
  .corner { width: 84px; height: 84px; }
}

/* ============ DESKTOP ============ */
@media (min-width: 960px) {
  .topnav { padding-left: max(24px, calc((100vw - 1160px) / 2)); padding-right: max(16px, calc((100vw - 1160px) / 2)); }
  .topnav nav a { font-size: 15px; padding: 0 16px; }
  .hero { padding: 30px 40px 20px; }
  .hero-frame { max-width: 820px; }
  .save-date .keepsake { width: 100%; margin: 0; }
  .rsvp { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 560px); justify-content: center; column-gap: 72px; align-items: start; }
  .rsvp .section-head { grid-row: 1 / span 2; text-align: left; position: sticky; top: calc(var(--nav-h) + 40px); margin: 0; }
  .rsvp-form, .rsvp-ready { grid-column: 2; width: 100%; margin: 0; }
  .rsvp-ready { margin-top: 28px; }
  .hero-spray { display: block; position: absolute; width: 260px; height: auto; top: 90px; opacity: .95; pointer-events: none; }
  .hero-spray.l { left: calc(50% - 600px); transform: rotate(-6deg); }
  .hero-spray.r { right: calc(50% - 600px); transform: scaleX(-1) rotate(-6deg); }
  .names { display: grid; grid-template-columns: minmax(0, 1.2fr) auto minmax(0, .8fr); gap: 20px; align-items: start; font-size: clamp(84px, 8vw, 104px); }
  .names .person { width: 100%; }
  .names .amp { font-size: 70px; margin: 14px 0 0; }
  .section { padding: 96px var(--pad); }
  .save-date { display: grid; grid-template-columns: minmax(0, 520px) 280px; justify-content: center; align-items: center; gap: 48px; }
  .countdown { flex-direction: column; align-items: flex-start; margin: 0; gap: 18px; }
  .slides { margin: 0; padding: 20px 0 30px; overflow: visible; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .slide { max-width: none; }
  .slide:nth-child(2) .polaroid { transform: translateY(-18px) rotate(var(--tilt)); }
  .polaroid:hover { transform: rotate(0deg) scale(1.02); }
  .carousel-controls { display: none; }
  .event-flow { margin: 0 auto; max-width: 1160px; display: grid; gap: 36px; }
  .event { display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; border-radius: 6px; overflow: hidden; padding: 0; }
  .event:nth-child(even) .event-art { order: 2; }
  .event-art img { height: 100%; object-fit: cover; }
  .event-body { padding: 36px 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html.anim .reveal { opacity: 1; transform: none; }
}
