/* Anne & Ryan wedding site
   Desktop sizes come straight from the 1920px Figma frames ("final pages", AC row, starred, Nov 15).
   --u = 1 design px, scaled to the viewport (1px at 1920, never below .5px). */

:root {
  --u: clamp(0.5px, 0.0520833vw, 1px);
  /* Nov 15 palette (design "AC", Anne's pick): burgundy, dark olive, cream */
  --bg: #f3efe8;        /* page */
  --bg-2: #f1eee7;      /* alternate sections, card, light text */
  --cream: #f1eee7;
  --polaroid: #fbf9f5;
  --burg: #4e0b12;      /* headings, buttons */
  --nav: #390007;
  --foot: #40050c;
  --olive: #202700;     /* dark olive (Anne: "2"): countdown, buttons */
  --olive-2: #2c330a;   /* When / Where band (Figma 216:27) */
  --black: #3a2a26;     /* body text */
  --ink: #2e2622;
  --field: #e7e2d8;
  --rose: #915354;      /* RSVP buttons */
  --wine: #360000;      /* The Wedding Day card text */
  --card: #f1eee7;
  --white: #fff;
  --muted: #7d7d7d;
  --lav: #ddbdc0;      /* Part III: envelope is dusty rose now (was lavender #c7b8d4) */
  --lav-dark: #b8878d; /* was #9a80b0 */
  --serif: "Cormorant Garamond", Georgia, serif;
  --serif-sc: "Cormorant SC", Georgia, serif;
  --sans: "Cormorant Garamond", Georgia, serif;
  --script: "Pinyon Script", "Brush Script MT", cursive;
  --letter-sans: "Afacad", "Futura", sans-serif;   /* only the "Modern" choice in the letter font picker */

  /* Type scale. Change a size here and every page follows. Mobile values are in the ≤760px block. */
  --fs-title: calc(110 * var(--u));  /* section headings (Pinyon) */
  --fs-head:  calc(100 * var(--u));
  --fs-val:   calc(40 * var(--u));
  --fs-input: calc(32 * var(--u));
  --fs-body:  calc(32 * var(--u));
  --fs-label: calc(20 * var(--u));   /* small caps labels */
  --fs-btn:   calc(28 * var(--u));
  --btn-track: .2em;
  --fs-nav:   calc(20 * var(--u));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overscroll-behavior: none; } /* no rubber-band overscroll */
body { overscroll-behavior: none; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--black);
  font-family: var(--sans);
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: normal;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; font-weight: 500; }
h1, h2 { font-family: var(--script); font-weight: 400; color: var(--burg); }
button { font: inherit; color: inherit; cursor: pointer; }

.serif { font-family: var(--serif); }
.sc { font-family: var(--serif-sc); }
.script { font-family: var(--script); }
.lab-sc { font-family: var(--serif-sc); font-size: var(--fs-label); letter-spacing: .22em; text-transform: uppercase; color: var(--burg); }

/* ---------- nav: dark burgundy bar, links either side of the AR monogram ---------- */
.nav {
  position: sticky; top: 0; z-index: 20; /* Nov 19 (designer): hides while scrolling down, comes back on scroll up (common.js) */
  transition: transform .35s ease;
  height: calc(110 * var(--u)); min-height: 56px;
  padding: 0 calc(60 * var(--u)); /* Figma 216:3: monogram left, links right (Nov 16) */
  display: flex; align-items: center; justify-content: flex-start;
  gap: calc(64 * var(--u));
  background: var(--nav); color: var(--cream);
  border-bottom: 1px solid rgba(78,11,18,.2);
  font-family: var(--serif-sc); font-size: var(--fs-nav); letter-spacing: .18em;
}
.nav.nav--hidden { transform: translateY(-100%); }
.nav a { white-space: nowrap; transition: opacity .2s; }
.nav a:hover { opacity: .7; }
.nav .brand { display: flex; align-items: center; margin-right: auto; }
.nav .brand img { width: calc(45 * var(--u)); height: calc(64 * var(--u)); min-width: 22px; min-height: 32px; }
.burger { display: none; }

.menu {
  position: fixed; inset: 0; z-index: 50;
  background: var(--nav); color: var(--cream); /* Nov 16: solid, 100% */
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  font-family: var(--serif-sc); letter-spacing: .18em;
  font-size: 22px; opacity: 0; pointer-events: none; transition: opacity .3s;
}
.menu.open { opacity: 1; pointer-events: auto; }
.menu a { opacity: 1; } /* Nov 16: every menu link at 100% */
.menu a[aria-current="page"] { opacity: 1; }
.menu .brand img { width: 40px; height: 57px; }
.menu-close { position: absolute; top: 18px; right: 18px; background: none; border: 0; font-size: 34px; color: var(--cream); line-height: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--burg); color: var(--cream);
  border: 1px solid transparent;
  font-family: var(--sans); font-weight: 500;
  font-size: var(--fs-btn);
  letter-spacing: var(--btn-track);
  padding: calc(20 * var(--u)) calc(60 * var(--u));
  transition: opacity .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--outline { background: transparent; border-color: var(--cream); }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn--gray { background: var(--olive); }
.btn--wide { align-self: center; }
.btn--pill-olive { background: var(--olive); border-radius: 999px; } /* Part III: "Write a Message" like the RSVP card buttons */
/* rounded rose button (RSVP card) */
.pill-btn {
  display: inline-flex; align-items: center; justify-content: center; align-self: center;
  background: var(--rose); color: var(--cream); border: 0; border-radius: 999px;
  font-family: var(--sans); font-size: calc(32 * var(--u)); letter-spacing: .2em;
  padding: calc(20 * var(--u)) calc(60 * var(--u));
  transition: opacity .2s, transform .2s;
}
.pill-btn:hover { transform: translateY(-1px); }
.pill-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.pill-btn--olive { background: var(--olive); } /* designer, Nov 15: buttons inside the RSVP card are olive */

/* ---------- footer (every page) ---------- */
.footer {
  background: var(--foot); color: var(--cream);
  padding: calc(140 * var(--u)) calc(200 * var(--u)) calc(80 * var(--u));
  display: flex; flex-direction: column; align-items: center; gap: calc(62 * var(--u));
  text-align: center;
}
.footer__head { display: flex; flex-direction: column; align-items: center; }
.footer .t1 { font-family: var(--sans); font-size: calc(112 * var(--u)); letter-spacing: .04em; text-transform: uppercase; line-height: 1.2; } /* Anne: Cormorant caps, not Pinyon */
.footer .t2 { font-size: var(--fs-body); opacity: .6; }
.footer__bar { width: 100%; border-top: 1px solid rgba(241,238,231,.25); padding-top: calc(30 * var(--u)); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.footer__bar .sig { font-family: var(--script); font-size: calc(40 * var(--u)); }
.footer__bar .sm { font-family: var(--serif-sc); font-size: calc(18 * var(--u)); letter-spacing: .2em; opacity: .8; }

/* ---------- fade-in ---------- */
[data-fade] { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
[data-fade].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-fade] { opacity: 1; transform: none; transition: none; }
}

/* ---------- polaroid (Our Story, Details, FAQ) ---------- */
.polaroid { flex: none; background: var(--polaroid); padding: calc(18 * var(--u)) calc(18 * var(--u)) calc(var(--pb, 90) * var(--u)); box-shadow: 0 calc(12 * var(--u)) calc(30 * var(--u)) rgba(46,38,34,.18); rotate: var(--rot, 2deg); }
.polaroid img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   LANDING
   ========================================================= */
.hero {
  position: relative; overflow: hidden; background: #000; color: var(--cream);
  height: calc(1180 * var(--u)); min-height: 560px;
  display: flex; align-items: center; justify-content: center;
}
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; opacity: .54; } /* Part II: photo #59 (flower garden); black 46% on top */
.hero__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: calc(28 * var(--u)); text-align: center; }
.hero__inner .btn { margin-top: calc(20 * var(--u)); }
html { scroll-behavior: smooth; }
/* Anne's AR in the old pill frame (Nov 15) */
.monogram { width: calc(94 * var(--u)); height: calc(155 * var(--u)); min-width: 48px; min-height: 80px; } /* Part II: capsule frame from the Canva pubmats */
.monogram img { width: 100%; height: 100%; }
.hero h1 { color: var(--cream); font-size: calc(220 * var(--u)); line-height: 1.05; white-space: nowrap; }
.hero .hero-date { font-family: var(--serif-sc); font-size: calc(26 * var(--u)); letter-spacing: .3em; text-transform: uppercase; }

.couple-msg {
  display: flex; align-items: center; gap: calc(120 * var(--u));
  padding: calc(120 * var(--u)) calc(80 * var(--u)) calc(120 * var(--u)) calc(200 * var(--u));
}
.couple-msg__text { width: calc(820 * var(--u)); flex: none; display: flex; flex-direction: column; gap: calc(28 * var(--u)); }
.couple-msg__text .lab-sc { font-size: calc(22 * var(--u)); letter-spacing: .25em; }
.couple-msg__text h2 { font-size: calc(100 * var(--u)); line-height: 1.1; }
.couple-msg__text .body { font-size: calc(34 * var(--u)); line-height: 1.5; }
.couple-msg__text .with { font-size: calc(34 * var(--u)); margin-top: calc(28 * var(--u)); } /* Part II: plain Cormorant, no italics */
.couple-msg__text .sig { font-family: var(--script); color: var(--burg); font-size: calc(72 * var(--u)); }
.arch-photo { width: calc(700 * var(--u)); aspect-ratio: 700 / 960; object-fit: cover; border-radius: 999px 999px 0 0; flex: none; }

/* When / Where (lighter olive) + countdown (dark olive), Figma 216:27 / 216:46 */
.ww { background: var(--olive); /* Anne (Nov 20): back to the dark olive, same as the countdown (round 28's lighter olive reverted) */ color: var(--cream); padding: calc(170 * var(--u)) calc(200 * var(--u)) calc(110 * var(--u)); display: flex; justify-content: center; text-align: center; }
.ww__row { display: flex; align-items: flex-start; gap: calc(100 * var(--u)); } /* Part II: "Where" lines up with "When" */
.ww__col { display: flex; flex-direction: column; align-items: center; gap: calc(20 * var(--u)); }
.ww__col--when { width: calc(447 * var(--u)); }
.ww__col--where { width: calc(840 * var(--u)); }
.ww__rule { width: 1px; align-self: stretch; background: rgba(243,239,232,.35); }
.ww h2 { color: var(--cream); opacity: .5; font-size: var(--fs-title); line-height: 1.25; }
.ww .big { font-size: var(--fs-val); }
.ww__lines p:not(.big) { font-size: calc(28 * var(--u)); } /* Part II: same size as the cities */
.ww__lines { display: flex; flex-direction: column; gap: calc(20 * var(--u)); font-size: var(--fs-body); }
.ww__places { display: flex; gap: calc(80 * var(--u)); }
.ww__place { width: calc(380 * var(--u)); display: flex; flex-direction: column; align-items: center; gap: calc(6 * var(--u)); }
.ww .lab { font-family: var(--serif-sc); font-size: var(--fs-label); letter-spacing: .25em; text-transform: uppercase; opacity: .8; }
.ww .name { font-size: calc(38 * var(--u)); line-height: 1.15; }
.ww .city { font-size: calc(30 * var(--u)); opacity: .85; } /* Figma 216:41 / 216:45 */

.countdown { background: var(--olive); color: var(--cream); padding: calc(120 * var(--u)); display: flex; flex-direction: column; align-items: center; } /* Nov 19: numbers centred, 120 above / below (Figma 227:205) */
.countdown__rule { display: none; } /* Figma: no line between When / Where and the countdown */
.countdown__nums { display: flex; justify-content: center; gap: calc(110 * var(--u)); text-align: center; }
.countdown__nums > div { display: flex; flex-direction: column; align-items: center; gap: calc(6 * var(--u)); }
.countdown .n { font-size: calc(88 * var(--u)); line-height: 1; font-variant-numeric: lining-nums; }
.countdown .l { font-family: var(--serif-sc); font-size: calc(18 * var(--u)); letter-spacing: .25em; text-transform: uppercase; opacity: .85; }

/* =========================================================
   OUR STORY
   ========================================================= */
.story-top { display: flex; align-items: center; gap: calc(140 * var(--u)); padding: calc(180 * var(--u)) calc(200 * var(--u)) calc(160 * var(--u)); }
.story-top__text { width: calc(860 * var(--u)); flex: none; display: flex; flex-direction: column; gap: calc(32 * var(--u)); }
.story-top h1 { font-size: calc(120 * var(--u)); }
.story-text { font-size: var(--fs-body); line-height: 1.55; color: var(--black); display: flex; flex-direction: column; gap: calc(32 * var(--u)); }
.story-top .polaroid { width: calc(676 * var(--u)); height: calc(868 * var(--u)); --rot: 2deg; }
/* Part II: four photos paired with the story (2 x 2 small polaroids, alternating tilt) */
.story-pics { width: calc(676 * var(--u)); flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: calc(44 * var(--u)) calc(40 * var(--u)); }
.story-pics .polaroid { width: auto; height: auto; margin: 0; --pb: 56; }
.story-pics .polaroid img { aspect-ratio: 1; height: auto; display: block; }
.story-pics .polaroid:nth-child(1) { --rot: -2deg; }
.story-pics .polaroid:nth-child(2) { --rot: 2deg; }
.story-pics .polaroid:nth-child(3) { --rot: 1.5deg; }
.story-pics .polaroid:nth-child(4) { --rot: -1.5deg; }

/* five photos at uneven heights */
/* Our Story photos: one revolving strip (Nov 17). moments.js repeats the set once and moves scrollLeft; the margin on
   every photo (not flex gap) makes the two halves exactly equal, so the jump back by one set is invisible */
.moments { background: var(--bg-2); padding: calc(40 * var(--u)) 0 calc(180 * var(--u)); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; }
.moments::-webkit-scrollbar { display: none; }
.moments__track { display: flex; align-items: flex-start; width: max-content; padding-left: calc(120 * var(--u)); }
.moments img { border-radius: calc(14 * var(--u)); object-fit: cover; flex: none; margin-right: calc(36 * var(--u)); -webkit-user-drag: none; user-select: none; }
.moments.is-dragging { cursor: grabbing; }
.moments .m1 { width: calc(300 * var(--u)); height: calc(440 * var(--u)); }
.moments .m2 { width: calc(260 * var(--u)); height: calc(360 * var(--u)); margin-top: calc(140 * var(--u)); }
.moments .m3 { width: calc(320 * var(--u)); height: calc(480 * var(--u)); margin-top: calc(40 * var(--u)); }
.moments .m4 { width: calc(260 * var(--u)); height: calc(340 * var(--u)); margin-top: calc(180 * var(--u)); }
.moments .m5 { width: calc(300 * var(--u)); height: calc(420 * var(--u)); margin-top: calc(60 * var(--u)); }

/* =========================================================
   THE DETAILS
   ========================================================= */
.d-head { background: var(--bg-2); padding: calc(160 * var(--u)) 0 calc(100 * var(--u)); display: flex; flex-direction: column; align-items: center; gap: calc(16 * var(--u)); text-align: center; }
.d-head h1 { font-size: calc(140 * var(--u)); line-height: 1.25; }
.d-head p { font-family: var(--serif-sc); font-size: calc(26 * var(--u)); letter-spacing: .25em; color: var(--ink); }
.d-facts { display: flex; justify-content: center; align-items: center; padding: calc(60 * var(--u)) calc(200 * var(--u)) calc(160 * var(--u)); }
.d-facts > div { width: calc(500 * var(--u)); padding: 0 calc(30 * var(--u)); display: flex; flex-direction: column; align-items: center; gap: calc(12 * var(--u)); text-align: center; }
[hidden] { display: none !important; }
.d-facts .rule { width: 1px; height: calc(160 * var(--u)); padding: 0; background: rgba(78,11,18,.25); }
.d-facts .lab { font-family: var(--serif-sc); font-size: calc(22 * var(--u)); letter-spacing: .25em; text-transform: uppercase; color: var(--burg); }
.d-facts .val { font-size: var(--fs-val); line-height: 1.2; }
.d-facts .city { font-size: calc(28 * var(--u)); opacity: .8; } /* Part 4: city under ceremony / reception, like the landing */

.d-day { background: var(--bg-2); padding: calc(100 * var(--u)) calc(120 * var(--u)) 0; }
.d-day__card { background: var(--olive); /* Anne (Nov 20): dark olive card + cream text again (round 28's pink reverted) */ border-radius: calc(28 * var(--u)); padding: calc(130 * var(--u)) 0 calc(140 * var(--u)); display: flex; flex-direction: column; align-items: center; gap: calc(56 * var(--u)); color: var(--cream); }
.d-day h2 { color: var(--cream); opacity: .6; font-size: var(--fs-title); line-height: 1.25; }
.schedule { list-style: none; margin: 0; padding: 0; width: calc(636 * var(--u)); position: relative; }
/* Nov 19: one line through every dot, first to last (Figma Rectangle 3119, 1 x 372) */
.schedule::before { content: ""; position: absolute; left: calc(267.5 * var(--u)); top: calc(56 * var(--u)); bottom: calc(52 * var(--u)); width: 1px; background: rgba(241,238,231,.45); } /* cream at 45%, as the line pieces were on the olive card */
.schedule li { display: grid; grid-template-columns: calc(220 * var(--u)) calc(16 * var(--u)) 1fr; column-gap: calc(40 * var(--u)); align-items: center; height: calc(120 * var(--u)); position: relative; }
.schedule .tt { font-size: calc(48 * var(--u)); text-align: right; }
.schedule .dot { justify-self: center; width: calc(14 * var(--u)); height: calc(14 * var(--u)); min-width: 7px; min-height: 7px; border-radius: 50%; background: currentColor; position: relative; }
/* Figma 216:137: a 40px line above and below each dot (45% opacity), touching the dot, with a gap between rows */
.schedule .tl { font-family: var(--serif-sc); font-size: calc(24 * var(--u)); letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; }

.d-dress { display: flex; align-items: center; gap: calc(160 * var(--u)); padding: calc(170 * var(--u)) calc(200 * var(--u)) calc(190 * var(--u)); }
.d-dress__text { width: calc(880 * var(--u)); flex: none; display: flex; flex-direction: column; gap: calc(30 * var(--u)); }
.d-dress h2 { font-size: var(--fs-title); line-height: 1.25; }
.d-dress .lab-sc { font-size: calc(24 * var(--u)); letter-spacing: .25em; }
.d-dress p.txt { font-size: var(--fs-body); line-height: 1.5; }
.swatches { display: flex; flex-wrap: wrap; gap: calc(16 * var(--u)); }
.swatches span { width: calc(72 * var(--u)); height: calc(72 * var(--u)); min-width: 32px; min-height: 32px; border-radius: 50%; border: calc(6 * var(--u)) solid #fff; background-size: cover !important; background-position: center !important; }
.d-dress .dress-arch { width: calc(536 * var(--u)); aspect-ratio: 536 / 740; object-fit: cover; border-radius: 999px 999px 0 0; flex: none; } /* Part II: photo #76 in an arch, no polaroid */

/* =========================================================
   FAQ
   ========================================================= */
.photo-head { position: relative; overflow: hidden; height: calc(560 * var(--u)); min-height: 260px; display: flex; align-items: center; justify-content: center; }
.photo-head img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-head--faq img { object-position: 50% 71.6%; } /* Figma 216:200: image top -255% = the couple walking */
.photo-head::after { content: ""; position: absolute; inset: 0; background: rgba(32,39,0,.4); }
.photo-head h1 { position: relative; z-index: 1; color: var(--cream); font-size: calc(130 * var(--u)); text-align: center; line-height: 1.25; padding: 0 20px; }
.faq { display: flex; justify-content: center; align-items: flex-start; gap: calc(120 * var(--u)); padding: calc(80 * var(--u)) calc(200 * var(--u)) calc(180 * var(--u)); }
.faq__list { width: calc(1100 * var(--u)); flex: none; text-align: center; /* Part II: no photo, text centred */ display: flex; flex-direction: column; gap: calc(40 * var(--u)); }
.faq__item { display: flex; flex-direction: column; gap: calc(10 * var(--u)); }
.faq__item h2 { font-family: var(--serif); font-weight: 500; font-size: calc(40 * var(--u)); line-height: 1.3; } /* Part II: Cormorant, easier to read than script */
.faq__item p { font-size: calc(28 * var(--u)); line-height: 1.5; }
.faq__item a { text-decoration: underline; text-underline-offset: .15em; }
/* Part 4: bank QR codes under the gift answer, small; tap opens the full image */
.faq__qr { display: flex; justify-content: center; gap: calc(30 * var(--u)); margin-top: calc(20 * var(--u)); }
.faq__qr a { display: block; line-height: 0; }
.faq__qr img { height: calc(260 * var(--u)); width: auto; border-radius: calc(12 * var(--u)); }
/* Figma 287:13: chevron + link under the gift answer, 28 / 50%, underlined. Since Nov 19 it opens the codes in a popup */
.qr-toggle { align-self: center; display: flex; flex-direction: column; align-items: center; gap: calc(10 * var(--u)); margin-top: calc(18 * var(--u)); background: none; border: 0; padding: 0; color: var(--black); opacity: .5; font-size: calc(28 * var(--u)); line-height: 1.5; text-decoration: underline; text-underline-offset: .15em; transition: opacity .2s; }
.qr-toggle:hover { opacity: .8; }
.qr-toggle svg { width: calc(15 * var(--u)); min-width: 10px; height: auto; transform: rotate(180deg); }
/* bank QR popup: black overlay, the two codes, X top right; tap the overlay, X or Esc to close */
.qr-pop { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.82); display: flex; align-items: center; justify-content: center; padding: 80px 40px; overflow-y: auto; opacity: 0; transition: opacity .25s; }
.qr-pop.open { opacity: 1; }
.qr-pop[hidden] { display: none; }
.qr-pop__codes { display: flex; align-items: center; justify-content: center; gap: calc(48 * var(--u)); margin: auto; }
.qr-pop__codes img { height: min(70vh, calc(640 * var(--u))); min-height: 300px; width: auto; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.35); }
.qr-pop__x { position: fixed; top: 20px; right: 24px; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: var(--cream); font-size: 44px; line-height: 1; padding: 0; z-index: 1; }
.qr-pop__x:hover { opacity: .75; }
.faq .rule { height: 1px; border: 0; margin: 0; background: rgba(78,11,18,.2); }
.faq .polaroid { width: calc(456 * var(--u)); height: calc(678 * var(--u)); margin: calc(48 * var(--u)) 0 0 calc(12 * var(--u)); --pb: 80; --rot: -2deg; } /* Figma 216:233: position + -2deg tilt matched to the frame */

/* =========================================================
   INVITE CODE (invite.html, Figma "invite code" / wrong / forgot / sent)
   ========================================================= */
.nav + .gate { min-height: calc(100svh - max(56px, calc(110 * var(--u)))); } /* code page sits under the nav (Nov 16) */
.gate { position: relative; overflow: hidden; min-height: 100svh; display: flex; align-items: center; justify-content: center; background: #000; color: var(--cream); padding: 60px 20px; }
.gate__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.gate__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: calc(36 * var(--u)); text-align: center; width: calc(760 * var(--u)); min-width: min(100%, 420px); }
.gate__top { display: flex; flex-direction: column; align-items: center; gap: calc(22 * var(--u)); }
.gate h1 { color: var(--cream); font-size: calc(150 * var(--u)); line-height: 1.1; white-space: nowrap; }
.gate__msg { font-size: calc(34 * var(--u)); line-height: 1.45; }
.gate__form { display: flex; flex-direction: column; align-items: center; gap: calc(36 * var(--u)); width: 100%; }
.gate__field { width: calc(640 * var(--u)); min-width: min(100%, 360px); border-radius: calc(14 * var(--u)); border: 1px solid rgba(241,238,231,.5); background: rgba(241,238,231,.12); color: var(--cream); font-family: var(--sans); font-size: calc(32 * var(--u)); text-align: center; padding: calc(20 * var(--u)) calc(24 * var(--u)); outline: 0; letter-spacing: .12em; }
.gate__field::placeholder { color: rgba(241,238,231,.6); letter-spacing: 0; }
.gate__field:focus { border-color: var(--cream); }
.gate__field.is-error { border: 2px solid #d9a1a2; }
.gate__err { color: #e8b9ba; font-size: calc(26 * var(--u)); width: calc(640 * var(--u)); min-width: min(100%, 360px); margin-top: calc(-16 * var(--u)); }
.gate .link-btn { color: var(--cream); }
.gate .step { display: none; }
.gate .step.is-active { display: contents; }
.d-facts:has([data-table]:not([hidden])) > div:not(.rule) { width: calc(380 * var(--u)); }

/* =========================================================
   RSVP (guest list: find your invitation by last name, answer for each guest)
   ========================================================= */
.rsvp { position: relative; overflow: hidden; padding: calc(160 * var(--u)) 20px calc(180 * var(--u)); display: flex; justify-content: center; }
.rsvp__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; } /* Part II: photo #96, couple just under the card */
/* Part II: the big "RSVP" in Cormorant caps like the footer (the thank-you title stays script) */
.rsvp__card:not(:has(.rsvp-done.is-active)) h1 { font-family: var(--sans); text-transform: uppercase; letter-spacing: .04em; font-size: calc(112 * var(--u)); line-height: 1.2; }
.rsvp::before { content: ""; position: absolute; inset: 0; background: rgba(32,39,0,.55); z-index: 1; }
.rsvp__card { position: relative; z-index: 2; width: calc(1060 * var(--u)); min-width: min(100%, 560px); background: var(--bg-2); border-radius: calc(28 * var(--u)); padding: calc(110 * var(--u)) calc(120 * var(--u)) calc(120 * var(--u)); display: flex; flex-direction: column; gap: calc(44 * var(--u)); color: var(--ink); }
.rsvp__card h1 { font-size: calc(140 * var(--u)); line-height: 1; text-align: center; } /* every RSVP step centred (designer, Nov 17) */
.rsvp__intro { font-size: calc(30 * var(--u)); line-height: 1.5; }
.rstep { display: none; flex-direction: column; gap: calc(44 * var(--u)); }
.rstep.is-active { display: flex; animation: stepIn .5s ease; }
.rform { display: flex; flex-direction: column; gap: calc(44 * var(--u)); }
.rfield { display: flex; flex-direction: column; gap: calc(12 * var(--u)); }
.rfield label, .rfield .lab { font-family: var(--serif-sc); font-size: var(--fs-label); letter-spacing: .22em; text-transform: uppercase; color: var(--burg); }
.rinput { width: 100%; border: 0; outline: 0; border-radius: calc(14 * var(--u)); background: var(--field); color: var(--ink); font-family: var(--sans); font-size: var(--fs-input); padding: calc(18 * var(--u)) calc(24 * var(--u)); }
.rinput::placeholder { color: rgba(46,38,34,.45); }
.rinput:focus { box-shadow: 0 0 0 1.5px var(--olive); }
.rinput.is-error { box-shadow: 0 0 0 1.5px var(--rose); }
.rinput:disabled { opacity: .45; }
.rhint { font-size: calc(24 * var(--u)); opacity: .7; margin-top: calc(-24 * var(--u)); }
.rhint.is-error { color: var(--rose); opacity: 1; }
.party-title { font-family: var(--script); color: var(--burg); font-size: calc(64 * var(--u)); line-height: 1.2; margin-top: calc(-30 * var(--u)); text-align: center; }
.rsvp__sub { font-size: calc(28 * var(--u)); opacity: .8; margin-top: calc(-20 * var(--u)); }
.rrule { height: 1px; background: rgba(78,11,18,.2); border: 0; margin: 0; }
.guest { display: flex; flex-direction: column; gap: calc(20 * var(--u)); }
.guest__name { font-size: calc(40 * var(--u)); color: var(--burg); padding: 0; margin-bottom: calc(20 * var(--u)); }
.pills { display: flex; flex-wrap: wrap; gap: calc(24 * var(--u)); border: 0; padding: 0; margin: 0; }
.pill { position: relative; display: inline-flex; align-items: center; border: 1.5px solid var(--rose); border-radius: 999px; padding: calc(14 * var(--u)) calc(30 * var(--u)); font-size: calc(30 * var(--u)); cursor: pointer; transition: background .2s, color .2s; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill:has(input:checked) { background: var(--rose); border-color: var(--rose); color: var(--cream); } /* designer, Nov 15: rose answers */
.pill:has(input:focus-visible) { outline: 2px solid var(--rose); outline-offset: 3px; }
.link-btn { align-self: center; background: none; border: 0; padding: 0; font-family: var(--serif-sc); font-size: var(--fs-label); letter-spacing: .22em; text-transform: uppercase; color: var(--burg); text-decoration: underline; text-underline-offset: 4px; }
.choices { display: flex; flex-direction: column; gap: calc(16 * var(--u)); }
.choices button { text-align: left; background: var(--field); border: 0; border-radius: calc(14 * var(--u)); padding: calc(18 * var(--u)) calc(24 * var(--u)); font-size: calc(32 * var(--u)); color: var(--burg); }
.form-msg:empty { display: none; }
.form-msg { text-align: center; color: var(--rose); font-size: calc(26 * var(--u)); }
.rsvp-done { align-items: center; text-align: center; }
.rsvp-done p { font-size: calc(34 * var(--u)); }
/* RSVP sent on desktop (designer's Figma "RSVP sent logged in" 227:411, Nov 17): taller photo with the card in the
   middle (524 above and below), title centred, 30 px text, button 40 below the text, 120 side padding */
@media (min-width: 761px) {
  .rsvp:has(.rsvp-done.is-active) { padding-top: calc(524 * var(--u)); padding-bottom: calc(524 * var(--u)); }
  .rsvp-done p { font-size: calc(30 * var(--u)); line-height: 1.5; }
  .rsvp-done .pill-btn { margin: calc(40 * var(--u)) 0 calc(20 * var(--u)); padding: calc(20 * var(--u)) calc(120 * var(--u)); }
}

/* shared bits used by Leave a Message (write form, inbox arrows) */
.field { display: flex; flex-direction: column; gap: calc(20 * var(--u)); }
.field label, .field .lab { font-family: var(--serif-sc); font-size: var(--fs-label); letter-spacing: .22em; text-transform: uppercase; }
.page-pad .d-head { background: none; padding: 0; gap: calc(12 * var(--u)); }
.page-pad .d-head h2 { font-size: var(--fs-title); line-height: 1.25; }
.page-pad .d-head p { font-family: var(--sans); font-size: var(--fs-body); letter-spacing: 0; color: var(--black); }
.arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: calc(106 * var(--u)); height: calc(106 * var(--u)); min-width: 40px; min-height: 40px;
  border: 0; border-radius: 999px; background: var(--field);
  display: flex; align-items: center; justify-content: center; transition: background .2s, opacity .2s;
}
.arrow:hover { background: #ddd6c9; }
.arrow img { width: 55%; height: 55%; }
.arrow--next img { transform: scaleX(-1); }
.arrow[disabled] { opacity: .35; cursor: default; }

/* =========================================================
   LEAVE A MESSAGE
   ========================================================= */
.lam { position: relative; overflow: hidden; min-height: calc(1606 * var(--u)); }
.step { display: none; }
.step.is-active { display: block; animation: stepIn .6s ease; }
@keyframes stepIn { from { opacity: 0; } to { opacity: 1; } }

.stage-wrap { position: relative; height: calc(1606 * var(--u)); }
.stage { position: absolute; left: 0; top: calc(41.27 * var(--u)); width: 100%; aspect-ratio: 1920 / 1652; }
.stage > .arch { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; }
/* Part II: photo #51 instead of the flower frame, olive veil so the copy and letters read on it */
.stage > .arch--photo { object-fit: cover; }
.stage:has(.arch--photo)::after { content: ""; position: absolute; inset: 0; background: rgba(32,39,0,.45); z-index: 1; pointer-events: none; }
/* Part III: the photo stage sits in the flow, so the section is exactly as tall as the photo (no cream strip under it
   when the scrollbar or a wide screen makes 100% width differ from 1920 units) */
.stage-wrap:has(.arch--photo) { height: auto; }
.stage-wrap:has(.arch--photo) .stage { position: relative; top: 0; }
.stage-wrap:has(.arch--photo) .stage-copy h1, .stage-wrap:has(.arch--photo) .stage-copy h2, .stage-wrap:has(.arch--photo) .stage-copy p { color: var(--cream); }
.stage-copy {
  position: absolute; left: 0; right: 0; top: calc(600 * var(--u));
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: calc(100 * var(--u)); z-index: 3;
  pointer-events: none; /* taps go through to the photo (place a letter there); the button stays clickable */
}
.stage-copy .btn { pointer-events: auto; }
.stage-copy .hd { display: flex; flex-direction: column; gap: calc(12 * var(--u)); align-items: center; }
.stage-copy h1, .stage-copy h2 { font-size: var(--fs-title); user-select: none; pointer-events: auto; }
.stage-copy p { font-family: var(--serif); font-size: var(--fs-body); width: calc(603 * var(--u)); }
/* Nov 19 (Figma 216:302 / 287:16): photo stage 1920 x 1800, copy block 640 from its top, 36 between heading, text and button;
   letters go anywhere on the photo except over that block (message.js) */
.stage-wrap:has(.arch--photo) .stage { aspect-ratio: 1920 / 1800; }
.stage-wrap:has(.arch--photo) .stage-copy { top: calc(640 * var(--u)); gap: calc(36 * var(--u)); }
.stage-wrap:has(.arch--photo) .stage-copy .hd { gap: calc(36 * var(--u)); }
.stage-wrap:has(.arch--photo) .stage-copy p { width: calc(620 * var(--u)); line-height: 1.45; }
.stage-wrap:has(.arch--photo) .stage > .arch--photo { object-position: 50% 50%; } /* Figma crop: centred */
#stagePlace { cursor: copy; }
.pin.is-bad { opacity: .45; }

/* note (envelope + bouquet). Box is 1000 x 900 design units; everything inside is % based */
.note { position: absolute; width: var(--w, 300px); aspect-ratio: 1000 / 900; pointer-events: none; }
.note .fl { position: absolute; transform-origin: 50% 100%; translate: -50% -100%; pointer-events: none; user-select: none; }
.note .fl img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.note .env { position: absolute; left: 27.43%; top: 33.33%; width: 45.13%; height: 33.33%; z-index: 5; }
.note .env img { position: absolute; left: 0; width: 100%; pointer-events: none; user-select: none; }
.note .env .body { top: 1.1%; height: 98.9%; }
.note .env .flap { top: 0; height: 69%; }
.note .env .from {
  position: absolute; left: 0; right: 0; bottom: 3%; text-align: center;
  font-family: var(--script); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6%;
  font-size: calc(var(--w, 300px) * .06); line-height: 1.15;
}

/* notes pinned on the arch */
.pin { position: absolute; z-index: 2; translate: -50% -50%; pointer-events: auto; transition: left .45s ease, top .45s ease; }
.pin .note { position: relative; }
.pin.is-mine { z-index: 6; cursor: grab; touch-action: none; }
.pin.is-mine.dragging { cursor: grabbing; transition: none; }
.pin.is-mine::after {
  content: ""; position: absolute; left: 22%; right: 22%; top: 30%; bottom: 28%; border: 1px dashed #5fd9e0; rotate: inherit; pointer-events: none;
}
.pin.is-new { animation: pinIn .9s ease; }
@keyframes pinIn { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }

/* write */
.page-pad { padding: calc(260 * var(--u)) calc(200 * var(--u)) calc(500 * var(--u)); display: flex; flex-direction: column; align-items: center; }
.page-pad .d-head { margin-bottom: calc(60 * var(--u)); }
#writeNext { margin-top: calc(14 * var(--u)); } /* 160 from the message box, as in Figma */
.wform .btn { align-self: center; }
.page-pad .d-head p { width: calc(1000 * var(--u)); max-width: 100%; }
.wform { width: calc(1000 * var(--u)); max-width: 100%; display: flex; flex-direction: column; gap: calc(55 * var(--u)); }
.wform .field label, .wform .field .lab { opacity: .5; color: var(--black); }
.winput, .wtext {
  width: 100%; border: 0; outline: 0; border-radius: 0; background: var(--field); color: var(--black);
  font-family: var(--serif); font-size: var(--fs-input); padding: calc(12 * var(--u)) calc(20 * var(--u));
}
.wtext { height: calc(545 * var(--u)); min-height: 240px; padding: calc(36 * var(--u)); resize: vertical; overflow-y: auto; line-height: 1.33; }
.winput:focus, .wtext:focus { box-shadow: 0 0 0 1px #9a9a9a; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.toolbar select, .toolbar button {
  background: var(--field); border: 1px solid #cbbfa6; color: var(--black); font-family: var(--sans);
  font-size: max(14px, calc(26 * var(--u))); padding: 4px 12px; border-radius: 0; height: max(34px, calc(52 * var(--u)));
}
.toolbar button[aria-pressed="true"] { background: var(--burg); color: var(--cream); }
.emoji-pop { display: none; flex-wrap: wrap; gap: 4px; padding: 8px; background: #fff; border: 1px solid #c9c9c9; max-width: 420px; }
.emoji-pop.open { display: flex; }
.emoji-pop button { border: 0; background: none; font-size: 24px; height: auto; padding: 2px 4px; }
.err { color: #a12a2a; font-family: var(--serif); font-size: max(14px, calc(28 * var(--u))); min-height: 1.3em; text-align: center; }
.count { font-size: max(12px, calc(24 * var(--u))); opacity: .5; text-align: right; margin-top: -8px; }

/* arrange */
.palette { display: flex; border: 1px solid #333; margin: calc(60 * var(--u)) 0 0; }
.palette .slot {
  width: calc(129 * var(--u)); height: calc(230 * var(--u)); min-width: 72px; min-height: 128px;
  border: 0; border-right: 1px solid #333; background: transparent; padding: 8px;
  display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none;
}
.palette .slot:last-child { border-right: 0; }
.palette .slot img { max-height: 100%; pointer-events: none; user-select: none; }
.palette.is-full .slot { opacity: .35; cursor: not-allowed; }
.arrange-hint { font-size: max(13px, calc(24 * var(--u))); opacity: .55; margin-top: 10px; text-align: center; min-height: 1.3em; }
.bouquet { position: relative; width: calc(1000 * var(--u)); max-width: 100%; aspect-ratio: 1000 / 900; margin-top: calc(60 * var(--u)); }
.bouquet .note { width: 100%; pointer-events: auto; }
.bouquet .note .fl { pointer-events: auto; cursor: grab; touch-action: none; }
.bouquet .note .fl.ghost { opacity: .28; filter: grayscale(1); pointer-events: none; }
.bouquet .note .fl .x {
  position: absolute; top: 4%; right: -10%; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: var(--burg); color: var(--cream); font-size: 16px; line-height: 28px; text-align: center; padding: 0;
  opacity: 0; transition: opacity .2s; rotate: calc(var(--r, 0deg) * -1);
}
.bouquet .note .fl:hover .x, .bouquet .note .fl.sel .x { opacity: 1; }
.bouquet.drop-ok { outline: 1px dashed var(--lav-dark); outline-offset: 6px; }
.drag-ghost { position: fixed; z-index: 100; pointer-events: none; translate: -50% -50%; opacity: .9; }
.drag-ghost img { width: 100%; }
.arrange-next { margin-top: calc(60 * var(--u)); }

/* inbox (secret) */
.inbox { position: fixed; inset: 0; z-index: 40; display: none; overflow-y: auto; }
.inbox.open { display: block; }
.inbox__blur { position: fixed; inset: 0; background: rgba(238,230,211,.6); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.inbox__inner { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: max(24px, 6vh) calc(200 * var(--u)); gap: min(calc(40 * var(--u)), 3vh); }
.viewer { position: relative; width: calc(1136 * var(--u)); max-width: 100%; height: min(calc(900 * var(--u)), 50vh); min-height: 300px; display: flex; align-items: center; justify-content: center; }
.viewer .note { --w: min(calc(1000 * var(--u)), 50vh * 1.111); position: relative; cursor: pointer; pointer-events: auto; transition: opacity .6s, filter .6s, scale .6s; }
.viewer .note:hover { scale: 1.02; }
.letter {
  position: absolute; inset: 0; background: #f7f2e7; box-shadow: 0 calc(20 * var(--u)) calc(60 * var(--u)) rgba(0,0,0,.12);
  padding: calc(40 * var(--u)) calc(50 * var(--u)); overflow-y: auto; white-space: pre-wrap; word-break: break-word;
  font-family: var(--serif); font-size: var(--fs-body); line-height: 1.35;
  opacity: 0; filter: blur(8px); pointer-events: none; transition: opacity .7s, filter .7s;
}
.viewer.is-open .note { opacity: 0; filter: blur(10px); pointer-events: none; }
.viewer.is-open .letter { opacity: 1; filter: none; pointer-events: auto; }
.letter .sig { margin-top: 1.2em; }
.counter { font-family: var(--script); font-size: min(var(--fs-title), 8vh); line-height: 1.2; }
.inbox__btns { display: flex; justify-content: center; gap: calc(43 * var(--u)); max-width: 100%; }
.inbox__links { display: flex; gap: calc(86 * var(--u)); font-size: min(var(--fs-btn), 5vh); }
.inbox__links button { background: none; border: 0; text-decoration: underline; text-underline-offset: 6px; padding: 0; }
.inbox .arrow--prev { left: calc(58 * var(--u)); position: fixed; }
.inbox .arrow--next { right: calc(58 * var(--u)); position: fixed; }
.inbox__empty { font-family: var(--script); font-size: calc(64 * var(--u)); text-align: center; }

/* password modal */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal__box { background: var(--bg); width: min(520px, 100%); padding: 32px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.modal__box h2 { font-size: 34px; }
.modal__box input { background: var(--field); border: 0; font-family: var(--serif); font-size: 28px; padding: 10px 14px; text-align: center; letter-spacing: 6px; outline: 0; }
.modal__box .row { display: flex; justify-content: center; gap: 10px; }
.modal__text { font-family: var(--serif); font-size: 18px; line-height: 1.4; }

/* delete button on letters sent from this browser (not in Figma) */
.shake { animation: shake .35s; }
@keyframes shake { 25% { translate: -8px 0; } 75% { translate: 8px 0; } }

.toast { position: fixed; left: 50%; bottom: 28px; translate: -50% 0; z-index: 70; background: var(--burg); color: var(--cream); padding: 12px 22px; font-size: 16px; opacity: 0; transition: opacity .3s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; }
.demo-badge { position: fixed; left: 12px; bottom: 12px; z-index: 30; background: #fff3c4; color: #5c4a00; font-size: 12px; padding: 4px 8px; border: 1px solid #e6d27a; }

/* pdf render surface */
.pdf-sheet { position: fixed; left: -10000px; top: 0; width: 794px; padding: 70px; background: #fff; color: #000; font-family: var(--serif); font-size: 18px; line-height: 1.5; white-space: pre-wrap; }
.pdf-sheet .pdf-note { --w: 300px; position: relative; margin: 0 auto 30px; }
.pdf-sheet .pdf-head { font-family: var(--script); font-size: 40px; text-align: center; margin-bottom: 10px; }

/* =========================================================
   MOBILE (≤760px). The AC design has desktop frames only; phones stack the same sections.
   ========================================================= */
@media (max-width: 760px) {
  :root {
    --u: 0.5px;
    --fs-title: 56px; --fs-head: 48px; --fs-val: 24px;
    --fs-body: 20px; --fs-label: 14px; --fs-btn: 18px; --fs-input: 20px;
  }

  .nav { height: 64px; padding: 0 16px; justify-content: flex-start; }
  .nav a { display: none; }
  .nav .brand { display: flex; }
  .nav .brand img { width: 26px; height: 37px; }
  .burger { position: absolute; right: 16px; top: 50%; translate: 0 -50%; display: flex; flex-direction: column; justify-content: space-between; width: 30px; height: 11px; background: none; border: 0; padding: 0; color: var(--cream); }
  .burger span { display: block; height: 1.5px; background: currentColor; }

  .btn { padding: 14px 32px; }
  .footer { padding: 64px 24px 36px; gap: 32px; }
  .footer .t1 { font-size: 52px; }
  .footer .t2 { font-size: 18px; max-width: 300px; }
  .footer .btn { font-size: 16px; padding: 14px 28px; white-space: nowrap; }
  .footer__bar { flex-direction: column; gap: 8px; }
  .footer__bar .sig { font-size: 30px; }
  .footer__bar .sm { font-size: 12px; }

  .polaroid { padding: 10px 10px calc(var(--pb, 90) * .5px); }

  .hero { height: 100svh; min-height: 600px; max-height: 820px; }
  .hero__inner { gap: 18px; padding: 0 16px; }
  .monogram { width: 54px; height: 89px; min-width: 0; min-height: 0; }
  .hero h1 { font-size: 54px; }
  .hero .hero-date { font-size: 14px; }

  .couple-msg { flex-direction: column; align-items: stretch; gap: 40px; padding: 64px 24px; }
  .couple-msg__text { width: auto; gap: 16px; }
  .couple-msg__text .lab-sc { font-size: 13px; }
  .couple-msg__text h2 { font-size: 48px; }
  .couple-msg__text .body, .couple-msg__text .with { font-size: 20px; }
  .couple-msg__text .with { margin-top: 12px; }
  .couple-msg__text .sig { font-size: 40px; }
  .arch-photo { width: 100%; max-width: 360px; align-self: center; }

  .ww { padding: 72px 20px 40px; }
  .ww__row { flex-direction: column; gap: 40px; }
  .ww__col--when, .ww__col--where { width: 100%; }
  .ww__rule { width: 120px; height: 1px; align-self: center; }
  .ww__lines { gap: 6px; }
  .ww__places { flex-direction: column; gap: 28px; }
  .ww__place { width: 300px; max-width: 100%; }
  .ww .name { font-size: 22px; }
  .ww .city { font-size: 18px; }
  .ww__lines p:not(.big) { font-size: 18px; }

  .countdown { padding: 52px 20px; } /* Nov 19 (Figma welcome phone 244:440): 164 tall, numbers centred */
  .countdown__nums { gap: 21px; padding-top: 0; }
  .countdown__nums > div { gap: 7px; }
  .countdown .n { font-size: 40px; }
  .countdown .l { font-size: 11px; }

  .story-top { flex-direction: column; align-items: stretch; gap: 0; padding: 64px 24px 56px; }
  .story-top__text { display: contents; } /* Nov 19 (Figma 244:140): title, then the 4 photos, then the text */
  .story-top h1 { order: 0; margin-bottom: 23px; }
  .story-pics { order: 1; margin-bottom: 40px; }
  .story-text { order: 2; }
  .story-top h1 { font-size: 64px; }
  .story-text { gap: 18px; line-height: 1.5; }
  .story-top .polaroid { width: 280px; height: 360px; }
  .story-pics { width: 100%; max-width: 360px; align-self: center; gap: 22px 18px; }
  .story-pics .polaroid { width: auto; height: auto; padding: 7px 7px 26px; }
  .moments { padding: 24px 0 64px; }
  .moments__track { padding-left: 24px; }
  .moments img { border-radius: 8px; margin-right: 14px; }

  .d-head { padding: 72px 20px 40px; }
  .d-head h1 { font-size: 72px; }
  .d-head p { font-size: 14px; }
  .d-facts { flex-direction: column; gap: 24px; padding: 24px 24px 64px; }
  .d-facts > div { width: 100%; max-width: 340px; }
  .d-facts .rule { width: 120px; height: 1px; }
  .d-facts .lab { font-size: 13px; }
  .d-day { padding: 0 16px; }
  .d-day__card { border-radius: 16px; padding: 56px 16px 64px; gap: 28px; }
  .d-day h2 { font-size: 52px; text-align: center; }
  .schedule { width: 100%; max-width: 330px; }
  .schedule li { grid-template-columns: 92px 12px 1fr; column-gap: 14px; height: 60px; }
  .schedule::before { left: 112px; top: 26px; bottom: 26px; }
  .schedule .tt { font-size: 24px; }
  .schedule .tl { font-size: 12px; letter-spacing: .14em; }
  .d-dress { flex-direction: column; gap: 48px; padding: 72px 24px 80px; }
  .d-dress__text { width: auto; gap: 16px; }
  .d-dress .lab-sc { font-size: 13px; }
  .swatches { gap: 8px; }
  .swatches span { width: 44px; height: 44px; min-width: 0; min-height: 0; border-width: 3px; }
  .d-dress .dress-arch { width: 100%; max-width: 320px; align-self: center; }

  .photo-head { height: 300px; min-height: 0; }
  .photo-head h1 { font-size: 52px; }
  .faq { flex-direction: column; align-items: center; gap: 48px; padding: 48px 24px 80px; }
  .faq__list { width: 100%; gap: 24px; }
  .faq__item h2 { font-size: 24px; }
  .faq__item p { font-size: 18px; }
  .faq__qr { gap: 14px; margin-top: 12px; }
  .faq__qr img { height: 170px; border-radius: 8px; }
  .qr-toggle { font-size: 18px; gap: 6px; margin-top: 10px; }
  .qr-pop { align-items: flex-start; padding: 72px 16px 40px; }
  .qr-pop__codes { flex-direction: column; gap: 24px; }
  .qr-pop__codes img { width: min(80vw, 320px); height: auto; min-height: 0; }
  .qr-pop__x { top: 12px; right: 12px; }
  .d-facts .city { font-size: 16px; }
  .faq .polaroid { width: 240px; height: 357px; margin: 0; }

  .gate h1 { font-size: 64px; }
  .nav + .gate { min-height: calc(100svh - 64px); }
  .gate__msg { font-size: 19px; }
  .gate__field { font-size: 20px; padding: 12px 14px; border-radius: 8px; }
  .gate__err { font-size: 15px; }
  .gate .monogram { width: 58px; height: 89px; }
  .rsvp { padding: 48px 12px 64px; align-items: flex-start; min-height: calc(100vh - 64px); } /* Nov 19: at least one screen tall, footer below the fold */
  .rsvp__card { width: 100%; min-width: 0; border-radius: 16px; padding: 40px 22px 44px; gap: 24px; }
  .rsvp__card h1 { font-size: 72px; }
  .rsvp__card:not(:has(.rsvp-done.is-active)) h1 { font-size: 52px; }
  .rsvp__intro { font-size: 18px; }
  .rstep, .rform { gap: 24px; }
  .rinput { border-radius: 8px; padding: 12px 14px; }
  .rhint { font-size: 15px; margin-top: -12px; }
  .party-title { font-size: 40px; margin-top: -14px; }
  .rsvp__sub { font-size: 17px; margin-top: -10px; }
  .guest { gap: 12px; }
  .guest__name { font-size: 24px; }
  .pills { gap: 10px; }
  .pill { font-size: 17px; padding: 8px 16px; }
  .pill-btn { font-size: 18px; padding: 14px 34px; }
  .choices button { font-size: 20px; padding: 12px 14px; border-radius: 8px; }
  .form-msg { font-size: 16px; }
  .rsvp-done p { font-size: 20px; }
  /* RSVP sent on phones (designer, Nov 16): card lower so the couple shows above it, even padding, one-line button */
  .rsvp:has(.rsvp-done.is-active) { padding-top: 220px; }
  .rsvp:has(.rsvp-done.is-active) .rsvp__card { padding-bottom: 40px; }
  .rsvp-done .pill-btn { font-size: 16px; letter-spacing: 2.5px; padding: 14px 24px; white-space: nowrap; }

  .lam { min-height: 0; }
  /* Nov 19 (Figma 244:266): the photo fills the whole section (390 x 730), copy on top of it in cream, 308 from the top */
  .stage-wrap { height: auto; display: block; padding-top: 0; }
  .stage { position: relative; top: 0; margin-top: 0; overflow: hidden; }
  .stage-wrap:has(.arch--photo) .stage { aspect-ratio: 390 / 730; min-height: calc(100vh - 64px); } /* Nov 19: fills the screen */
  .stage-wrap:has(.arch--photo) .stage > .arch--photo { width: 217.4%; left: 50%; translate: -50% 0; max-width: none; } /* Figma: image 848 wide, centred */
  .stage-wrap:has(.arch--photo) .stage-copy { position: absolute; top: calc(308 / 390 * 100vw); padding: 0 6px; gap: 23px; }
  .stage-wrap:has(.arch--photo) .stage-copy .hd { gap: 23px; }
  .stage-wrap:has(.arch--photo) .stage-copy p { width: auto; max-width: 361px; line-height: 1.2; }
  .stage-wrap:has(.arch--photo) .stage-copy .btn { font-size: 18px; padding: 15px 30px; }

  .page-pad { padding: 110px 8px 60px; }
  .page-pad .d-head { gap: 12px; padding: 0; }
  .page-pad .d-head p { text-align: center; }
  .page-pad .d-head p { width: auto; padding: 0 8px; }
  .page-pad .d-head, .wform { width: 100%; }
  .wform { gap: 24px; }
  .winput, .wtext { padding: 8px 12px; }
  .wtext { height: 420px; }
  .bouquet { width: 100%; }
  .bouquet .note .fl .x { width: 24px; height: 24px; line-height: 24px; font-size: 13px; }

  .inbox__inner { padding: 80px 16px 40px; gap: 20px; justify-content: flex-start; }
  .viewer { height: 340px; }
  .viewer .note { --w: min(92vw, 380px); }
  .letter { inset: 0; padding: 18px; font-size: 24px; }
  .counter { font-size: 40px; }
  .inbox__btns { gap: 4px; }
  .inbox__btns .btn { font-size: 18px; padding: 14px 20px; }
  .footer .btn { font-size: 18px; padding: 16px 32px; white-space: nowrap; } /* "Complete RSVP Form" fits the phone footer */
  .inbox__links { font-size: 18px; gap: 22px; flex-wrap: wrap; justify-content: center; }
  .inbox .arrow { position: absolute; top: 462px; translate: 0 -50%; transform: none; }
}

/* RSVP (Nov 16): card stays invisible until rsvp.js has filled in the party; screen-reader-only label */
.rsvp__card[data-wait] { visibility: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
