/* Invitation base styles. Template palettes/fonts arrive as CSS variables (see templates.js themeCss). */
:root { --ease-out: cubic-bezier(.16, 1, .3, 1); --field-line: color-mix(in srgb, var(--muted) 75%, transparent); --danger: #d92d20; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: color-mix(in srgb, var(--muted) 50%, transparent) var(--outer); }
body { margin: 0; background: var(--outer, #ddd); color: var(--ink); font-family: var(--f-body); font-size: var(--fs, 17px); line-height: 1.65; }
body.locked { overflow: hidden; height: 100vh; height: 100dvh; }
:lang(ar) body, body:lang(ar) { font-size: calc(var(--fs, 17px) + 1px); }
html:lang(ur) { --f-body: 'Noto Nastaliq Urdu', var(--f-ar), serif; --f-display: 'Noto Nastaliq Urdu', serif; --f-script: 'Noto Nastaliq Urdu', serif; }
html:lang(ur) body { line-height: 2.1; }
[lang="ur"] { font-family: 'Noto Nastaliq Urdu', var(--f-ar), serif; line-height: 2.1; }
img { max-width: 100%; display: block; }
p { margin: 0 0 .9em; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 500; text-wrap: balance; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--head); }
input, textarea, select { caret-color: var(--accent); }
::placeholder { color: var(--muted); opacity: 1; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.page { position: relative; max-width: 480px; margin-inline: auto; background: var(--bg); min-height: 100vh; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.16); }

/* ---------- cover: the one authored moment ---------- */
.cover { position: fixed; inset: 0; z-index: 50; display: flex; justify-content: center; background: var(--outer); transition: transform 1.2s cubic-bezier(.7,0,.2,1), opacity 1.2s ease; }
.cover.gone { transform: translateY(-104%); opacity: .4; pointer-events: none; }
.cover-frame { position: relative; width: 100%; max-width: 480px; height: 100%; overflow: hidden; background: var(--bg); }
.art, .photo, .photo-veil { position: absolute; inset: 0; width: 100%; height: 100%; }
.photo { background-size: cover; background-position: center; }
.cover .photo { animation: kenburns 24s ease-in-out infinite alternate; }
.photo-veil { background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.08) 40%, rgba(0,0,0,.15) 65%, rgba(0,0,0,.6) 100%); }
.cover-in { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: space-between; text-align: center; padding: 13vh 24px 9vh; padding: 13dvh 24px 9dvh; }
.photo ~ .cover-in, .photo ~ .hero-in { color: #fff; --head: #fff; --muted: rgba(255,255,255,.88); --accent: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.cover-top { animation: rise 1.4s var(--ease-out) both; }
.cover-bottom { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: rise 1.4s .35s var(--ease-out) both; }
.kicker { font-family: var(--f-display); text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--head); margin-bottom: .6em; }
.names { font-family: var(--f-display); font-size: clamp(2.6rem, 12vw, 3.6rem); line-height: 1.04; color: var(--head); display: flex; flex-direction: column; align-items: center; }
.names .amp { font-family: var(--f-script); font-size: .5em; line-height: 1.2; color: var(--accent); }
.dear { font-family: var(--f-body); color: var(--head); line-height: 1.5; }
.dear span { display: block; font-size: .9rem; color: var(--muted); }
.dear strong { display: block; font-family: var(--f-display); font-weight: 500; font-size: 1.05rem; letter-spacing: .06em; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; background: var(--btn); color: var(--btn-ink); border: 1px solid var(--btn); padding: 10px 30px; font-family: var(--f-display); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; border-radius: var(--radius); cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.12); transition: transform .2s var(--ease-out), filter .2s ease, box-shadow .2s ease; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(0,0,0,.14); }
.btn:active { transform: translateY(1px); box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.btn:focus-visible { outline: 2px solid var(--head); outline-offset: 3px; }
.btn:disabled { opacity: .65; cursor: progress; transform: none; }
.btn-sm { min-height: 38px; padding: 7px 16px; font-size: .72rem; box-shadow: none; }
.btn-ghost { background: color-mix(in srgb, var(--paper) 86%, transparent); color: var(--head); border-color: var(--field-line); }
:lang(ar) .btn, :lang(ur) .btn, :lang(ar) .kicker, :lang(ur) .kicker { letter-spacing: 0; text-transform: none; font-size: .95rem; }

/* ---------- hero: comes into focus as the cover lifts ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.hero .art, .hero .photo { transition: transform 1.8s var(--ease-out), filter 1.8s var(--ease-out); }
body.locked .hero .art, body.locked .hero .photo { transform: scale(1.06); filter: blur(5px); }
.hero-in { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: 14vh 24px 0; }
.hero-in > * { transition: opacity 1.3s var(--ease-out) .35s, transform 1.3s var(--ease-out) .35s, letter-spacing 1.6s var(--ease-out) .35s; }
body.locked .hero-in > * { opacity: 0; transform: translateY(10px); }
body.locked .hero-in .names { letter-spacing: .08em; }
.hero-date { margin-top: 1.2em; font-family: var(--f-display); letter-spacing: .08em; color: var(--head); font-size: .95rem; }
.chev { position: absolute; bottom: 5vh; inset-inline-start: 50%; transform: translateX(-50%); color: var(--head); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.chev svg { animation: bob 1.8s ease-in-out infinite; }
[dir="rtl"] .chev { transform: translateX(50%); }

/* ---------- painted scene (templates with real artwork) ----------
   Each layer owns one transform channel: `translate` = scroll depth (invite.js), `rotate` = sway,
   `transform`/`opacity` = entrance. The tiny blurred placeholder paints instantly underneath. */
.scene { position: absolute; inset: 0; overflow: hidden; background-size: cover; background-position: center; }
.scene-img { position: absolute; left: 0; top: -5%; width: 100%; height: 112%; object-fit: cover; }
.scene-mist { position: absolute; inset: -10% -30%; pointer-events: none; filter: blur(8px);
  background:
    radial-gradient(55% 12% at 28% 54%, rgba(255,255,255,.4), transparent 70%),
    radial-gradient(48% 10% at 74% 66%, rgba(255,255,255,.3), transparent 70%),
    radial-gradient(70% 14% at 50% 36%, rgba(255,255,255,.22), transparent 72%);
  animation: drift 40s ease-in-out infinite alternate; }
.scene-wash { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(var(--wash),.94) 0%, rgba(var(--wash),.8) 15%, rgba(var(--wash),.28) 32%, rgba(var(--wash),0) 44%, rgba(var(--wash),0) 54%, rgba(var(--wash),.5) 64%, rgba(var(--wash),.86) 76%, rgba(var(--wash),.95) 100%); }
.fl { position: absolute; bottom: 0; height: auto; pointer-events: none; transform-origin: 50% 100%; rotate: var(--r, 0deg);
  filter: drop-shadow(0 8px 14px rgba(36, 48, 28, .22)); animation: sway 9s ease-in-out infinite alternate; }
.fl-a { --r: 9deg; width: 50%; left: -13%; bottom: -9%; }
.fl-b { --r: -11deg; width: 44%; right: -9%; bottom: -7%; scale: -1 1; animation-duration: 11s; animation-delay: -4s; }
/* Swans ride the painting's depth layer (same data-depth as .scene-img) so they stay on its water; they glide
   and bob on `transform`, with a faint reflection on the water below. */
.swan { position: absolute; height: auto; pointer-events: none; animation: swim 13s ease-in-out infinite alternate;
  filter: brightness(1.14) contrast(1.06) saturate(.8);
  -webkit-box-reflect: below -3px linear-gradient(transparent 30%, rgba(0,0,0,.22)); }
.swan-l { width: 30%; left: 17%; bottom: 17%; }
.swan-r { width: 34%; right: 13%; bottom: 19.5%; animation-duration: 17s; animation-delay: -6s; }
.cover .swan-l { width: 21%; left: 27%; bottom: 3%; }
.cover .swan-r { width: 24%; right: 24%; bottom: 4.5%; }
.cover.gone .swan, .idle .swan { animation-play-state: paused; }
.cover .fl { animation: sway 9s ease-in-out infinite alternate, flrise 1.6s .5s var(--ease-out) both; }
.cover .fl-b { animation: sway 11s -4s ease-in-out infinite alternate, flrise 1.6s .65s var(--ease-out) both; }
.cover.gone .scene *, .idle .scene-mist, .idle .fl { animation-play-state: paused; }
.has-art .cover-in { padding-bottom: 15vh; padding-bottom: 15dvh; }
.has-art .hero .scene-wash { background: linear-gradient(180deg, rgba(var(--wash),.94) 0%, rgba(var(--wash),.7) 22%, rgba(var(--wash),.12) 46%, rgba(var(--wash),0) 60%, rgba(var(--wash),.55) 92%, rgba(var(--wash),.9) 100%); }
body.locked .hero .scene-img { transform: scale(1.06); filter: blur(5px); }
.hero .scene-img { transition: transform 1.8s var(--ease-out), filter 1.8s var(--ease-out); }

.sec-img { position: absolute; left: 0; width: 100%; bottom: -48px; height: calc(72% + 96px); object-fit: cover; opacity: .2; pointer-events: none;
  mix-blend-mode: multiply; -webkit-mask-image: linear-gradient(transparent, #000 45%); mask-image: linear-gradient(transparent, #000 45%); }
.corner-img { position: absolute; z-index: 1; height: auto; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(36, 48, 28, .16)); }
.corner-img.tl { top: -58px; inset-inline-start: -52px; width: 150px; rotate: 142deg; }
.corner-img.br { bottom: -58px; inset-inline-end: -46px; width: 158px; rotate: -36deg; }
[dir="rtl"] .corner-img.tl { rotate: -142deg; scale: -1 1; }
[dir="rtl"] .corner-img.br { rotate: 36deg; scale: -1 1; }

/* ---------- continuous world (scroll-craft brief: scrollcraft/builds/jardin/BRIEF.md) ----------
   One fixed stage behind the whole invitation; invite.js moves the camera (.world-track transform) with scroll.
   Copy rides over it on paper cards with gaps between them: those gaps are authored windows onto the garden. */
.world, .petals { position: fixed; top: 0; bottom: 0; left: 50%; width: min(480px, 100%); translate: -50% 0; overflow: hidden; pointer-events: none; }
.world { z-index: 0; background: var(--bg); }
.petals { z-index: 1; }
.world-track { position: absolute; inset: 0; transform-origin: 50% 0; background-size: cover; background-position: center; will-change: transform; }
.world-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: filter 1.8s var(--ease-out), scale 1.8s var(--ease-out); }
body.locked .world-img { filter: blur(5px); scale: 1.06; }
.world .swan-l { width: 20%; left: 29%; bottom: 16%; }
.world .swan-r { width: 23%; right: 21%; bottom: 18.5%; }
.world .fl-a { width: 40%; left: -12%; bottom: -8%; }
.world .fl-b { width: 34%; right: -8%; bottom: -6%; }
.world-mist { position: absolute; inset: 0 -40%; filter: blur(10px); will-change: translate, opacity;
  background: radial-gradient(38% 15% at 50% 46%, rgba(255,255,255,.72), transparent 70%), radial-gradient(30% 11% at 42% 62%, rgba(255,255,255,.5), transparent 70%); }
.world-mist.m2 { background: radial-gradient(40% 13% at 52% 34%, rgba(255,255,255,.62), transparent 70%), radial-gradient(28% 11% at 60% 70%, rgba(255,255,255,.45), transparent 70%); }
.world-wash { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--wash),.93) 0%, rgba(var(--wash),.7) 17%, rgba(var(--wash),.14) 36%, rgba(var(--wash),0) 48%); }
.world-mode { background: transparent; }
.world-mode main { position: relative; z-index: 2; }
.world-hero { position: relative; height: auto; min-height: 84vh; min-height: 84svh; }
.world-hero .hero-in { height: auto; padding-top: 13vh; padding-top: 13svh; }
.world-mode .sec { background: transparent; padding: 44vh 20px 0; overflow: visible; }
.world-mode .world-hero + .sec { padding-top: 0; }
.world-mode .sec + .sec { border-top: 0; }
.world-mode .sec-in { background: rgba(var(--wash), .92); border-radius: 22px; padding: 42px 22px 36px;
  box-shadow: 0 2px 6px rgba(30, 40, 24, .08), 0 26px 60px rgba(30, 40, 24, .22); }
/* Arrival: the card ends high enough that the lake, its swans and the petal bed stay visible below it. */
.world-mode .sec.s-closing { padding-bottom: 30vh; padding-bottom: 30svh; }
.world-mode .s-closing .sec-in { padding: 48px 24px; }
/* A scrim only where the establishing text sits (harness measured the date at 3.3:1 without it). */
.world-hero .hero-in::before { content: ''; position: absolute; z-index: -1; left: -8%; right: -8%; top: 8vh; height: 40vh; pointer-events: none;
  background: radial-gradient(closest-side, rgba(var(--wash), .84), rgba(var(--wash), .62) 55%, rgba(var(--wash), 0)); }
.world-mode .wm { position: relative; z-index: 2; }

/* Petals: the signature move. Airborne petals are created by invite.js while the guest scrolls; the bed
   at the closing gains one petal per section passed. */
.petal { position: absolute; width: 17px; height: 21px; background: no-repeat center / contain
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 30'%3E%3Cdefs%3E%3CradialGradient id='g' cx='45%25' cy='35%25' r='70%25'%3E%3Cstop offset='0' stop-color='%23fde7ec'/%3E%3Cstop offset='.55' stop-color='%23f2b6c2'/%3E%3Cstop offset='1' stop-color='%23d77c8f'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cpath d='M12 1C19 5 23 13 19 22c-2 5-5 7-7 7s-5-2-7-7C1 13 5 5 12 1z' fill='url(%23g)'/%3E%3Cpath d='M12 5c-1 6-1 13 0 22' stroke='%23c96b80' stroke-opacity='.35' fill='none'/%3E%3C/svg%3E"); }
.petal.deep { filter: saturate(1.3) brightness(.9); }
.petals .petal { left: 0; top: 0; will-change: transform, opacity; }
.petal-bed { position: relative; height: 66px; width: min(260px, 72%); margin: -10px auto 0; z-index: 2; }
.petal-bed .petal { left: calc(50% + var(--x)); top: var(--y); rotate: var(--r); transition: opacity .7s ease, translate 1.3s var(--ease-out); transition-delay: var(--d); }
html.js .petal-bed .petal:not(.in) { opacity: 0; translate: 0 -48px; }

/* Waypoint map: the nav of a continuous world. Hidden until the cover lifts. */
/* Sits in the 20px gutter beside the cards; each target is 24x32 (WCAG 2.2 target size). */
.map { position: fixed; z-index: 45; top: 50%; translate: 0 -50%; inset-inline-end: max(0px, calc(50vw - 240px)); display: flex; flex-direction: column; gap: 2px; transition: opacity .6s ease; }
body.locked .map { opacity: 0; pointer-events: none; }
.map a { position: relative; display: grid; place-items: center; width: 24px; height: 32px; border-radius: 12px; text-decoration: none; }
.map a::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: rgba(var(--wash), .96);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--head) 50%, transparent), 0 2px 6px rgba(0,0,0,.18); transition: scale .35s var(--ease-out), background .35s ease; }
.map a.on::before { background: var(--accent); scale: 1.45; }
.map span { position: absolute; inset-inline-end: 28px; top: 50%; translate: 0 -50%; white-space: nowrap; pointer-events: none;
  font: 600 12px/1 system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--head); background: rgba(var(--wash), .96);
  padding: 6px 10px; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.14); opacity: 0; transition: opacity .3s ease; }
.map a.on.flash span, .map a:hover span, .map a:focus-visible span { opacity: 1; }

/* ---------- sections ---------- */
.sec { position: relative; padding: 80px 30px 72px; text-align: center; background: var(--paper); overflow: hidden; }
.sec + .sec { border-top: 1px solid color-mix(in srgb, var(--line) 50%, transparent); }
.sec-in { position: relative; z-index: 2; }
.sec-bg { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: 70%; opacity: .16; pointer-events: none; }
.sec-bg.stars { height: 100%; opacity: .5; }
.sec-bg.pat { height: 100%; opacity: 1; }
.corner { position: absolute; width: 132px; height: 132px; pointer-events: none; z-index: 1; opacity: .95; }
.corner.tl { top: -6px; inset-inline-start: -6px; }
.corner.br { bottom: -6px; inset-inline-end: -6px; transform: rotate(180deg); }
[dir="rtl"] .corner.tl { transform: scaleX(-1); }
[dir="rtl"] .corner.br { transform: rotate(180deg) scaleX(-1); }
.sec h2 { font-family: var(--f-display); font-size: 1.9rem; color: var(--head); line-height: 1.2; margin-bottom: .45em; }
.h-alt { font-family: var(--f-display); color: var(--muted); font-size: 1.05rem; margin-top: -.3em; }
.divider { color: var(--accent); width: 180px; height: 22px; margin: 24px auto; opacity: .8; }
.div-svg { width: 100%; height: 100%; display: block; }
.script { font-family: var(--f-script); color: var(--accent); font-size: 2.4rem; line-height: 1.25; font-weight: 400; margin: .2em 0; }
:lang(ar) .script, .script:lang(ar) { font-size: 2rem; }
.basmala { font-family: var(--f-ar-display); font-size: 1.7rem; color: var(--head); margin-bottom: .6em; }
.greet { font-family: var(--f-display); letter-spacing: .06em; color: var(--head); }
.invited { color: var(--muted); font-style: italic; }
.verse-ar { font-family: 'Amiri', var(--f-ar), serif; font-size: 1.45rem; line-height: 2.1; color: var(--head); }
.verse-tr { font-size: .95rem; color: var(--muted); }
.verse-ref { font-family: var(--f-display); letter-spacing: .1em; font-size: .8rem; color: var(--accent); }
.msg { font-size: 1.02rem; }
[lang="ar"], [lang="ur"] { font-family: var(--f-ar); }
h1[lang="ar"], .names:lang(ar), .kicker:lang(ar) { font-family: var(--f-ar-display); }
.host { margin: 16px 0; }
.host h3 { margin-bottom: .1em; }
.host .parents { color: var(--muted); font-size: .92rem; }
.host-photo { width: 150px; height: 190px; margin: 0 auto 14px; border-radius: 80px 80px 6px 6px; overflow: hidden; border: 4px solid var(--card); box-shadow: 0 10px 30px rgba(0,0,0,.12); background: var(--line); }
.host-photo img { width: 100%; height: 100%; object-fit: cover; }
.amp-big { font-family: var(--f-script); font-size: 2.6rem; color: var(--accent); line-height: 1; }

.cd { display: flex; gap: 8px; justify-content: center; margin: 22px 0 18px; direction: ltr; }
[dir="rtl"] .cd { flex-direction: row-reverse; }
.cd div { background: var(--tile); color: var(--tile-ink); min-width: 64px; padding: 10px 6px 8px; border-radius: calc(var(--radius) + 3px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.cd b { display: block; font-family: var(--f-display); font-size: 1.6rem; line-height: 1.1; font-weight: 500; font-variant-numeric: tabular-nums; }
.cd small { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; }
:lang(ar) .cd small, :lang(ur) .cd small { font-size: .8rem; letter-spacing: 0; }
.save { font-family: var(--f-display); letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; color: var(--muted); }
.cal { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.celebrated { font-family: var(--f-display); color: var(--head); font-size: 1.15rem; max-width: 28ch; margin: 18px auto 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 26px 20px; margin: 16px 0; }
.event h3 { font-family: var(--f-display); font-size: 1.45rem; color: var(--head); margin-bottom: .4em; }
.ev-date { font-family: var(--f-display); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.ev-hijri { color: var(--muted); font-size: .9rem; margin: 0; }
.ev-time { font-weight: 600; margin: .3em 0; font-variant-numeric: tabular-nums; }
.ev-venue { font-family: var(--f-display); color: var(--head); margin: .5em 0 0; }
.ev-addr { color: var(--muted); font-size: .92rem; }
.dress span { font-family: var(--f-display); color: var(--head); }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 18px; }
.gallery a { display: block; border-radius: var(--radius); overflow: hidden; background: var(--line); }
.gallery a:first-child { grid-column: span 2; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .8s var(--ease-out); }
.gallery a:hover img { transform: scale(1.03); }
.gallery a:first-child img { aspect-ratio: 4 / 3; }

.gift-card .bank { font-family: var(--f-display); color: var(--head); letter-spacing: .06em; margin: 0; }
.gift-card .acct { font-size: 1.25rem; letter-spacing: .08em; font-weight: 600; margin: .2em 0; font-variant-numeric: tabular-nums; }
.gift-card .holder { color: var(--muted); }

/* ---------- RSVP ---------- */
.rsvp-form { text-align: start; }
.deadline { color: var(--muted); font-size: .9rem; }
.replied { background: color-mix(in srgb, var(--btn) 18%, transparent); padding: 8px 12px; border-radius: var(--radius); font-size: .92rem; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: .82rem; color: var(--muted); margin-bottom: 5px; letter-spacing: .03em; }
.field input, .field textarea, .field select { width: 100%; min-height: 46px; padding: 11px 12px; border: 1px solid var(--field-line); background: var(--field); color: var(--ink); font: inherit; font-size: 16px; border-radius: var(--radius); outline: none; transition: border-color .15s, box-shadow .15s; }
.dark .field select option { color: #111; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
[aria-invalid="true"] { border-color: var(--danger) !important; }
.choice { display: grid; gap: 8px; margin-bottom: 14px; }
.choice label { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--field-line); border-radius: var(--radius); background: var(--field); cursor: pointer; transition: border-color .15s, background .15s; }
.choice input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--muted); border-radius: 50%; background: transparent; display: grid; place-content: center; cursor: pointer; }
.choice input::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .25s var(--ease-out); }
.choice input:checked { border-color: var(--accent); }
.choice input:checked::before { transform: scale(1); }
.choice input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.choice label:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--field)); }
.choice input[aria-invalid="true"] { border-color: var(--danger); }
.rsvp-form .btn { width: 100%; }
.form-msg { margin: 10px 0 0; font-size: .92rem; min-height: 1em; text-align: center; }
.form-msg.err { color: var(--ink); background: color-mix(in srgb, var(--danger) 14%, transparent); border-radius: var(--radius); padding: 8px 12px; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }
.thanks { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 0; font-family: var(--f-display); color: var(--head); font-size: 1.1rem; }
.thanks svg { flex: none; color: var(--accent); }

.wishes { max-height: 420px; overflow-y: auto; text-align: start; margin-top: 18px; padding-inline-end: 4px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior: contain; }
.wish { background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 12px 14px; margin-bottom: 8px; }
.wish b { font-family: var(--f-display); color: var(--head); font-weight: 500; }
.wish p { margin: .2em 0 0; font-size: .95rem; overflow-wrap: anywhere; }
.empty { color: var(--muted); text-align: center; font-style: italic; }
.sig { font-size: 2.6rem; }
.sec.last { padding-bottom: 110px; }

.wm { background: #161616; text-align: center; padding: 18px 16px 22px; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; }
.wm a { color: #fff; text-decoration: none; display: flex; flex-direction: column; gap: 2px; font-size: .82rem; }
.wm span { color: #f5c26b; }
.wm a:focus-visible { outline-color: #f5c26b; }

/* ---------- floating controls ---------- */
.music { position: fixed; z-index: 40; bottom: 18px; inset-inline-end: max(16px, calc(50vw - 224px)); width: 44px; height: 44px; border-radius: 50%; border: 0; background: #151515; color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.music.on svg { animation: spin 4s linear infinite; }
.music:not(.on)::after { content: ''; position: absolute; width: 26px; height: 2px; background: #fff; transform: rotate(-45deg); }
.music:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 4px #151515; }
.langs { position: fixed; z-index: 60; top: 12px; inset-inline-end: max(12px, calc(50vw - 228px)); display: flex; gap: 2px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 3px; box-shadow: 0 4px 14px rgba(0,0,0,.12); font-family: system-ui, sans-serif; font-size: 12px; font-weight: 600; }
.langs a { display: inline-grid; place-items: center; min-width: 38px; min-height: 32px; padding: 0 10px; text-decoration: none; border-radius: 999px; color: #333; }
.langs a.on { background: #222; color: #fff; }
.langs a:focus-visible { outline: 2px solid #222; outline-offset: 1px; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; animation: fade .3s ease both; }
.lightbox img { max-height: 100%; border-radius: 4px; animation: zoom .45s var(--ease-out) both; }
.toast { position: fixed; z-index: 120; bottom: 80px; left: 50%; transform: translateX(-50%); background: #222; color: #fff; padding: 9px 16px; border-radius: 999px; font: 14px system-ui, sans-serif; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: rise .3s var(--ease-out) both; }

/* ---------- in-section motion: content is visible by default; headings settle, dividers draw ---------- */
h2.rv, .h-alt.rv, .script.rv { transition: opacity 1s var(--ease-out), filter 1s var(--ease-out), transform 1s var(--ease-out); }
html.js h2.rv:not(.in), html.js .h-alt.rv:not(.in), html.js .script.rv:not(.in) { opacity: .2; filter: blur(5px); transform: translateY(8px); }
.divider.rv { clip-path: inset(0 0 0 0); transition: clip-path 1.4s var(--ease-out) .15s; }
html.js .divider.rv:not(.in) { clip-path: inset(0 50% 0 50%); }
.cd.rv > div { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.cd.rv > div:nth-child(2) { transition-delay: .07s; }
.cd.rv > div:nth-child(3) { transition-delay: .14s; }
.cd.rv > div:nth-child(4) { transition-delay: .21s; }
html.js .cd.rv:not(.in) > div { opacity: .2; transform: translateY(14px); }

.tw { animation: tw 2.6s ease-in-out infinite alternate; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 6px; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes tw { from { opacity: .25; } to { opacity: 1; } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes fade { from { opacity: 0; } }
@keyframes zoom { from { transform: scale(.96); opacity: 0; } }
@keyframes drift { from { transform: translateX(-4%); } to { transform: translateX(4%); } }
@keyframes sway { from { rotate: calc(var(--r, 0deg) - 1.6deg); } to { rotate: calc(var(--r, 0deg) + 1.6deg); } }
@keyframes flrise { from { opacity: 0; transform: translateY(46px); } to { opacity: 1; transform: none; } }
@keyframes swim { 0% { transform: translate(-7px, 0); } 50% { transform: translate(0, -2px); } 100% { transform: translate(7px, 0); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .rv, html.js .rv > div { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
  body.locked .hero .art, body.locked .hero .photo, body.locked .hero .scene-img, body.locked .hero-in > * { transform: none; filter: none; opacity: 1; }
  .fl { rotate: var(--r, 0deg); }
}
