/* ==========================================================================
   Blush & Bloom — Baby Shower (Girl) Flyer
   Soft pink poster + RSVP + guestbook, naturally scrolling invitation.

   House UX pattern: every section is a stacked "scene" in normal document
   flow (body scrolling only). Fixed header (--header-h token) with desktop
   pills + mobile burger/sheet, floating quick-nav dock, scroll-spy, one-
   screen cover, zoomable lightbox, Add to Calendar.

   Customize the whole look by editing the palette below — every component
   reads from these variables.
   ========================================================================== */

:root {
  /* Palette — soft pinks, warm ivory, sage leaf, antique gold */
  --blush-50:   #fdf4f7;
  --blush-100:  #fbe7ee;
  --blush-200:  #f7c9d6;
  --blush-300:  #f0a8bd;
  --rose-400:   #e08aa4;
  --rose-500:   #c98a9d;
  --rose-600:   #b06b82;
  --plum-700:   #7c4a5c;
  --ink:        #5a3a44;
  --sage:       #a8b89a;
  --sage-deep:  #8b9d7b;
  --gold:       #c9a227;
  --cream:      #fffaf6;
  --paper:      #fffdfb;
  --error:      #bf4a55;

  /* Type */
  --font-script:  'Great Vibes', cursive;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Jost', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Geometry tokens — single source of truth.
     --header-h is the REAL header height (base + safe-area inset); the
     cover cap, anchor offsets and body padding are all derived from it,
     so the chrome can never drift. */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --header-base-h: 58px;
  --header-h: calc(var(--header-base-h) + var(--safe-t));
  --dock-h: 66px;

  /* Rhythm */
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 24px 60px -30px rgba(176, 107, 130, 0.45);
  --shadow-card: 0 14px 34px -20px rgba(124, 74, 92, 0.35);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Anchor offset — jumps land their target just below the header */
  --anchor-offset: calc(var(--header-h) + 12px);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

/* Everything with the hidden attribute is truly gone — also beats any
display rule that would otherwise override the attribute (e.g. nav pills
whose section was removed, the lightbox, or a disabled feature). */
[hidden] { display: none !important; }

/* Empty-state hiding (§ audit): value emptied → wrapper visually hidden
but still in the DOM; print restores everything. */
.is-empty { display: none !important; }

/* Features switched off via CONFIG (or stripped client-side) — host intent,
so these stay hidden even in print. */
.feature-off { display: none !important; }

/* Cover-fit trims (short viewports): decorative elements yield first,
primary content last. Restored in print. */
.fit-hidden { display: none !important; }

html, body { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  /* Anchor/deep-link landing offset lives on .scene scroll-margin-top
     (single source: --anchor-offset). Do NOT also set scroll-padding-top
     here — the two would stack and land targets twice as far down. */
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(247, 201, 214, 0.55), transparent 34%),
    radial-gradient(circle at 88% 92%, rgba(168, 184, 154, 0.25), transparent 38%),
    linear-gradient(180deg, var(--blush-100), var(--blush-50));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.55;
  /* Clear the fixed header; scenes fill the rest of the viewport exactly */
  padding-top: var(--header-h);
  overflow-x: hidden;
}

body.lightbox-open { overflow: hidden; } /* lock page scroll while viewing */

img, svg { display: inline-block; vertical-align: middle; }

button { font: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--rose-400);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--plum-700);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 12px 0;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   SCENES — every section is a full-viewport "scene" centred in the flow;
   taller content simply grows and the whole page scrolls like a website.
   ========================================================================== */
.scenes { position: relative; }

.scene {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 3.5vw, 30px);
  padding: clamp(16px, 4vw, 44px) clamp(12px, 3vw, 28px)
           calc(var(--dock-h) + 34px + var(--safe-b));
  /* Native anchor jumps stop below the fixed header */
  scroll-margin-top: var(--anchor-offset);
}

/* Gentle entrance for content scrolling into view — gated behind
prefers-reduced-motion (purely decorative; content is never gated). */
@media (prefers-reduced-motion: no-preference) {
  body.js .scene > * { animation: scene-in 0.55s var(--ease) backwards; }
  body.js .scene > :nth-child(2) { animation-delay: 0.06s; }
  body.js .scene > :nth-child(3) { animation-delay: 0.12s; }
}

@keyframes scene-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   COVER — the poster scene is exactly ONE screen tall: never shorter,
   never taller. Content centres inside it; main.js trims decorative
   elements (documented priority order) if a short viewport can't fit
   everything. The .cover-scroll valve is the last-resort internal
   scrollbar for extreme viewports only.
   -------------------------------------------------------------------------- */
.scene--cover {
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow: hidden;
  justify-content: center;
  /* slim padding top; the bottom reserves the floating dock's strip so no
     interactive cover element (calendar, reply CTA) is ever permanently
     covered by it — same guarantee §4 asks for scrolling scenes */
  padding-top: 14px;
  padding-bottom: calc(var(--dock-h) + var(--safe-b) + 18px);
}
.scene--cover.cover-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--blush-300) transparent;
  /* centre only while content fits; scroll from the top when it doesn't */
  justify-content: flex-start;
}
.scene--cover.cover-scroll::-webkit-scrollbar { width: 8px; }
.scene--cover.cover-scroll::-webkit-scrollbar-thumb { background: var(--blush-300); border-radius: 8px; }

/* Squeezed vertical rhythm once trims alone aren't enough */
.scene--cover.cover-squeeze { gap: 8px; }
.scene--cover.cover-squeeze .poster { padding-top: clamp(20px, 4vw, 34px); padding-bottom: clamp(20px, 4vw, 34px); }
.scene--cover.cover-squeeze .poster__details { margin-top: 12px; }
.scene--cover.cover-squeeze .poster__photo { margin-top: 12px; }

/* Two-step photo trim: shrink first, hide only as a last resort.
   Shrink steps apply on top of compression tiers. */
.poster.fit-shrink-photo .poster__photo,
.fit-compress.fit-shrink-photo .poster__photo { width: min(32%, 124px) !important; }
.poster.fit-shrink-photo2 .poster__photo,
.fit-compress.fit-shrink-photo2 .poster__photo { width: min(26%, 100px) !important; }

/* Global compression stage — squeezes type/rhythm/photo BEFORE any primary
   element is sacrificed. Screen-only: print always renders uncompressed. */
@media screen {
  .poster.fit-compress { padding: clamp(18px, 4vw, 36px) clamp(14px, 4vw, 32px); }
  .fit-compress .poster__script { font-size: clamp(1.9rem, min(9vw, 6.6dvh), 3.4rem); }
  .fit-compress .poster__script-amp { font-size: clamp(1.5rem, min(6vw, 4.4dvh), 2.2rem); }
  .fit-compress .poster__main { font-size: clamp(1.3rem, min(5.6vw, 4dvh), 2.1rem); }
  .fit-compress .poster__name { font-size: clamp(1.6rem, min(7.6vw, 5.4dvh), 2.7rem); }
  .fit-compress .poster__tail { font-size: clamp(1.2rem, min(4.8vw, 3.2dvh), 1.6rem); }
  .fit-compress .poster__flourish { width: 58%; margin-top: 6px; }
  .fit-compress .poster__title { margin-top: 6px; }
  .fit-compress .poster__line { margin-top: 8px; }
  .fit-compress .poster__honoree { margin-top: 10px; }
  .fit-compress .poster__photo { width: min(50%, 195px); margin-top: 12px; }
  .fit-compress .poster__photo img { border-width: 3px; }
  .fit-compress .poster__details { margin-top: 12px; padding: 12px 16px; }
  .fit-compress .detail-row { gap: 8px 14px; }
  .fit-compress .detail-row dd { font-size: 0.92rem; }
  .fit-compress .detail-row dt { letter-spacing: 0.2em; }
  .fit-compress .poster__note { margin-top: 8px; }
  .fit-compress .calendar-wrap { margin-top: 10px; }
  .fit-compress .btn-cal { padding: 8px 18px; }

  /* Tier 2 — very tight, keeps every primary element on screen */
  .poster.fit-compress.fit-compress2 { padding: 16px 14px; }
  .fit-compress2 .poster__script { font-size: clamp(1.6rem, min(8vw, 5.6dvh), 2.8rem); }
  .fit-compress2 .poster__script-amp { font-size: clamp(1.2rem, min(5vw, 3.6dvh), 1.8rem); margin-top: 0; }
  .fit-compress2 .poster__main { font-size: clamp(1.05rem, min(4.6vw, 3.2dvh), 1.7rem); margin-top: 4px; letter-spacing: 0.12em; }
  .fit-compress2 .poster__name { font-size: clamp(1.4rem, min(6.4vw, 4.6dvh), 2.2rem); }
  .fit-compress2 .poster__line { display: none; }
  .fit-compress2 .poster__flourish { width: 46%; margin-top: 2px; }
  .fit-compress2 .poster__honoree { margin-top: 6px; }
  .fit-compress2 .poster__photo { width: min(38%, 150px); margin-top: 8px; }
  .fit-compress2 .poster__details { margin-top: 10px; padding: 10px 14px; }
  .fit-compress2 .detail-row { grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .fit-compress2 .detail-row dd { font-size: 0.82rem; }
  .fit-compress2 .detail-row dt { font-size: 0.58rem; }
}
@supports not (font-size: 1dvh) {
  .fit-compress .poster__script { font-size: clamp(1.9rem, min(9vw, 6.6vh), 3.4rem); }
  .fit-compress .poster__script-amp { font-size: clamp(1.5rem, min(6vw, 4.4vh), 2.2rem); }
  .fit-compress .poster__main { font-size: clamp(1.3rem, min(5.6vw, 4vh), 2.1rem); }
  .fit-compress .poster__name { font-size: clamp(1.6rem, min(7.6vw, 5.4vh), 2.7rem); }
  .fit-compress .poster__tail { font-size: clamp(1.2rem, min(4.8vw, 3.2vh), 1.6rem); }
  .fit-compress2 .poster__script { font-size: clamp(1.6rem, min(8vw, 5.6vh), 2.8rem); }
  .fit-compress2 .poster__script-amp { font-size: clamp(1.2rem, min(5vw, 3.6vh), 1.8rem); }
  .fit-compress2 .poster__main { font-size: clamp(1.05rem, min(4.6vw, 3.2vh), 1.7rem); }
  .fit-compress2 .poster__name { font-size: clamp(1.4rem, min(6.4vw, 4.6vh), 2.2rem); }
}

/* ==========================================================================
   FIXED HEADER — brand + desktop section pills + mobile burger, with a
   whisper-thin progress line along its bottom edge. Height IS the
   --header-h token (never drifted).
   ========================================================================== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  padding-top: var(--safe-t);
  z-index: 80;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding-left: clamp(14px, 3vw, 24px);
  padding-right: clamp(14px, 3vw, 24px);
  background: transparent;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease),
              border-color 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}
.app-header.is-scrolled {
  background: rgba(255, 250, 246, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(240, 168, 189, 0.35);
  box-shadow: 0 14px 34px -22px rgba(124, 74, 92, 0.45);
}

.app-header__brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: var(--font-script);
  font-size: 1.4rem;
  color: var(--rose-600);
  white-space: nowrap;
  text-decoration: none;
}
.app-header__mark { flex: 0 0 auto; }

.topnav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
}
.topnav__link {
  appearance: none;
  border: 1px solid rgba(192, 138, 157, 0.4);
  background: rgba(255, 250, 246, 0.65);
  color: var(--rose-600);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 100px;
  white-space: nowrap;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.15s var(--ease);
}
.topnav__link:hover { background: var(--blush-100); }
.topnav__link:active { transform: scale(0.97); }
.topnav__link.is-current {
  background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px -8px rgba(176, 107, 130, 0.7);
}

/* Burger — mobile only (<860px) */
.menu-btn {
  justify-self: end;
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 11px 10px;
  background: rgba(255, 250, 246, 0.75);
  border: 1px solid rgba(192, 138, 157, 0.45);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.menu-btn:hover { border-color: var(--rose-500); background: var(--blush-100); }
.menu-btn__bar {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--rose-600);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.menu-btn[aria-expanded="true"] .menu-btn__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bar:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-btn__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Progress — fills as guests read, along the header's bottom edge */
.app-header__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--gold), var(--rose-400) 60%, var(--rose-600));
  opacity: 0.95;
  pointer-events: none;
}

/* ==========================================================================
   MOBILE MENU — slide-down sheet of labelled rows over a dimmed backdrop.
   Rows are real anchors (they work without JS); main.js adds the
   smooth-scroll, close behaviour and focus management.
   ========================================================================== */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(90, 58, 68, 0.45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.menu-backdrop.is-open { opacity: 1; visibility: visible; }

.menu-sheet {
  position: fixed;
  top: calc(var(--header-h) + 8px);
  left: 50%;
  z-index: 95;
  width: min(340px, calc(100vw - 28px));
  max-height: calc(100dvh - var(--header-h) - 24px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--blush-300) transparent;
  background: var(--paper);
  border: 1px solid var(--blush-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px -24px rgba(124, 74, 92, 0.6);
  padding: 16px 16px calc(16px + var(--safe-b));
  transform: translateX(-50%) translateY(-14px);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.32s var(--ease), opacity 0.32s var(--ease), visibility 0.32s var(--ease);
}
.menu-sheet::-webkit-scrollbar { width: 8px; }
.menu-sheet::-webkit-scrollbar-thumb { background: var(--blush-300); border-radius: 8px; }
.menu-sheet.is-open {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

.menu-sheet__head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 6px 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(201, 162, 39, 0.55);
  font-family: var(--font-script);
  font-size: 1.15rem;
  color: var(--rose-500);
}

.menu-sheet__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }

.menu-sheet__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: background 0.2s var(--ease);
}
.menu-sheet__row:hover { background: var(--blush-100); }
.menu-sheet__row.is-current {
  background: linear-gradient(135deg, var(--blush-100), var(--blush-50));
  color: var(--rose-600);
}
.menu-sheet__row.is-current .menu-sheet__chevron { color: var(--rose-600); }

.menu-sheet__num {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.menu-sheet__label { flex: 1; }
.menu-sheet__chevron { color: var(--blush-300); font-size: 1.2rem; line-height: 1; }

/* ==========================================================================
   DOCK — floating glass pill with icon shortcuts; built by main.js from
   the sections that exist, so deleted sections simply lose their entry.
   Hidden without JS and in print.
   ========================================================================== */
.dock {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  align-items: stretch;
  gap: 2px;
  max-width: calc(100vw - 20px);
  padding: 6px 8px;
  background: rgba(255, 250, 246, 0.88);
  border: 1px solid rgba(240, 168, 189, 0.45);
  border-radius: 20px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 44px -20px rgba(124, 74, 92, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.dock button {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 52px;
  height: 50px;
  padding: 6px 8px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: rgba(124, 74, 92, 0.72);
  transition: color 0.25s var(--ease), background 0.25s var(--ease), transform 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.dock button svg { width: 19px; height: 19px; flex: none; }
.dock button:hover { color: var(--rose-600); background: var(--blush-100); }
.dock button:active { transform: scale(0.94); }
.dock button.is-current {
  color: var(--rose-600);
  background: linear-gradient(135deg, var(--blush-100), var(--blush-200));
}
.dock button.is-current::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(201, 162, 39, 0.8);
}
.dock__label {
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   POSTER ART
   ========================================================================== */
.poster {
  position: relative;
  width: 100%;
  max-width: 580px;
  background: linear-gradient(165deg, var(--paper) 0%, var(--cream) 45%, var(--blush-50) 100%);
  border: 1px solid var(--blush-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(26px, 6vw, 56px) clamp(18px, 5vw, 46px);
  text-align: center;
  overflow: visible; /* must not clip: the ribbon pill straddles the top edge */
}

/* antique-gold dashed inner frame */
.poster::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(201, 162, 39, 0.55);
  border-radius: 20px;
  pointer-events: none;
}

.poster__ribbon {
  position: absolute;
  top: -17px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  max-width: calc(100% - 36px); /* long eyebrows shrink + wrap, never spill past the poster */
}
.poster__ribbon-inner {
  display: inline-block;
  background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding: 11px 28px;
  border-radius: 100px;
  box-shadow: 0 10px 20px -8px rgba(176, 107, 130, 0.75);
  white-space: normal; /* wraps instead of pushing past the card on narrow screens */
  text-align: center;
  overflow-wrap: anywhere;
}

.poster__flourish { margin: clamp(8px, 2vw, 16px) auto 0; max-width: 320px; width: 78%; height: auto; }

.poster__title { margin: clamp(8px, 2vw, 18px) 0 0; }

/* Fluid poster type grows with BOTH viewport axes and stops growing past
~700px-tall viewports (the dvh term saturates), so mid-size phones never
lose content to oversized type. */
.poster__script {
  display: block;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(2.3rem, min(11.5vw, 8.6dvh), 4.5rem);
  line-height: 1.08;
  color: var(--rose-600);
  margin: 0;
}
@supports not (font-size: 1dvh) {
  .poster__script { font-size: clamp(2.3rem, min(11.5vw, 8.6vh), 4.5rem); }
}
.poster__script-amp {
  display: block;
  font-family: var(--font-script);
  font-size: clamp(1.8rem, min(7.5vw, 5.6dvh), 2.9rem);
  color: var(--gold);
  line-height: 0.9;
  margin-top: 2px;
}
@supports not (font-size: 1dvh) {
  .poster__script-amp { font-size: clamp(1.8rem, min(7.5vw, 5.6vh), 2.9rem); }
}
.poster__main {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, min(7vw, 5.1dvh), 2.7rem);
  letter-spacing: 0.16em;
  color: var(--ink);
  margin-top: 8px;
}
@supports not (font-size: 1dvh) {
  .poster__main { font-size: clamp(1.5rem, min(7vw, 5.1vh), 2.7rem); }
}

.poster__line {
  margin: 12px auto 0;
  font-size: clamp(0.82rem, 2.6vw, 0.95rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum-700);
  max-width: 30em;
}

/* corner florals (decorative) */
/* Layered above the ribbon so the flower tips stay visible on narrow
   screens instead of being clipped behind the centered banner. */
.poster__corner { position: absolute; width: clamp(60px, 15vw, 104px); height: auto; opacity: 0.9; z-index: 4; }
.poster__corner--tl { top: 18px; left: 16px; }
.poster__corner--br { bottom: 18px; right: 16px; transform: rotate(180deg); }

.poster__honoree { margin: clamp(12px, 3.5vw, 26px) 0 0; position: relative; z-index: 2; }

.poster__kicker {
  margin: 0 0 2px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
}
.poster__name {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(1.9rem, min(9.5vw, 7dvh), 3.5rem);
  line-height: 1.15;
  color: var(--rose-600);
  overflow-wrap: anywhere; /* long names wrap instead of overflowing */
}
@supports not (font-size: 1dvh) {
  .poster__name { font-size: clamp(1.9rem, min(9.5vw, 7vh), 3.5rem); }
}
.poster__sub {
  margin: 2px 0 0;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum-700);
}

/* details card */
.poster__details {
  position: relative;
  z-index: 2;
  margin: clamp(14px, 3.5vw, 26px) auto 0;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(240, 168, 189, 0.5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 16px 22px;
}

.detail-row { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; text-align: left; }
.detail-row__item { min-width: 0; }
.detail-row__item--full { grid-column: 1 / -1; }

.detail-row dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 2px;
}
.detail-row dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 3vw, 1.08rem);
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: anywhere; /* long venue names wrap safely */
}
.detail-row dd .poster-dateline { margin: 0; }

.poster__note {
  margin: 14px 0 0;
  font-size: 0.82rem;
  color: var(--plum-700);
}
.poster__tail {
  margin: clamp(12px, 3vw, 20px) 0 0;
  font-family: var(--font-script);
  font-size: clamp(1.4rem, min(5.8vw, 4dvh), 2rem);
  color: var(--rose-500);
  position: relative;
  z-index: 2;
}
@supports not (font-size: 1dvh) {
  .poster__tail { font-size: clamp(1.4rem, min(5.8vw, 4vh), 2rem); }
}
@supports not (font-size: 1dvh) {
  .fit-compress .poster__script { font-size: clamp(1.9rem, min(9vw, 6.6vh), 3.4rem); }
  .fit-compress .poster__script-amp { font-size: clamp(1.5rem, min(6vw, 4.4vh), 2.2rem); }
  .fit-compress .poster__main { font-size: clamp(1.3rem, min(5.6vw, 4vh), 2.1rem); }
  .fit-compress .poster__name { font-size: clamp(1.6rem, min(7.6vw, 5.4vh), 2.7rem); }
  .fit-compress .poster__tail { font-size: clamp(1.2rem, min(4.8vw, 3.2vh), 1.6rem); }
}

/* ---------- Add to Calendar + reply CTA ---------- */
.calendar-wrap { margin: 16px 0 0; }
.btn-cal {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border: 1px solid rgba(201, 162, 39, 0.65);
  border-radius: 100px;
  background: rgba(255, 250, 246, 0.85);
  color: var(--plum-700);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 10px 22px -12px rgba(201, 162, 39, 0.55);
  transition: background 0.25s var(--ease), transform 0.15s var(--ease), box-shadow 0.25s var(--ease);
}
.btn-cal:hover { background: #fdf3d3; box-shadow: 0 14px 26px -12px rgba(201, 162, 39, 0.7); }
.btn-cal:active { transform: scale(0.97); }
.btn-cal svg { flex: none; }

.poster__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 0;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose-600);
  text-decoration: none;
  border-bottom: 1px dashed rgba(192, 138, 157, 0.6);
  padding-bottom: 3px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.poster__cta:hover { color: var(--plum-700); border-color: var(--gold); }

/* featured photo — arched portrait between the honoree and the details card.
   The photo sits inside a button so it can open the lightbox. Width is also
   height-aware so the arch never dominates short viewports. */
.poster__photo {
  position: relative;
  z-index: 2;
  margin: clamp(14px, 3.5vw, 26px) auto 0;
  width: min(64%, 260px, 30dvh);
}
@supports not (width: 1dvh) {
  .poster__photo { width: min(64%, 260px, 30vh); }
}
.poster__photo-open {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 140px 140px 16px 16px;
}
.poster__photo-open:focus-visible { outline-offset: 4px; }
.poster__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover; /* any photo ratio crops neatly into the arch */
  border-radius: 140px 140px 16px 16px;
  border: 4px solid #fff;
  background: var(--blush-100);
  box-shadow: var(--shadow-card);
}
.zoom-chip {
  position: absolute;
  z-index: 2;
  display: inline-block;
  white-space: nowrap;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--plum-700);
  background: rgba(255, 250, 246, 0.88);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-radius: 100px;
  padding: 5px 12px;
  pointer-events: none;
  box-shadow: 0 6px 16px -8px rgba(124, 74, 92, 0.5);
}
.poster__photo-chip {
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
}

/* ==========================================================================
   FLYER/BANNER FEATURE (optional)
   ========================================================================== */
.flyer-banner { width: 100%; max-width: 620px; margin: 0 auto; }
.gallery-section .flyer-banner { margin-bottom: clamp(18px, 4vw, 28px); }
.flyer-banner__card { position: relative; }
.flyer-banner__open {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(240, 168, 189, 0.5);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--blush-100);
  cursor: zoom-in;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.flyer-banner__open:hover { transform: translateY(-3px); box-shadow: 0 26px 54px -26px rgba(124, 74, 92, 0.55); }
.flyer-banner__open:active { transform: translateY(0); }
.flyer-banner__open:focus-visible { outline: 3px solid var(--rose-400); outline-offset: 3px; }
.flyer-banner__open img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9; /* banner-shaped: wide flyers and covers fit neatly */
  object-fit: cover;
  background: var(--blush-100);
}
.flyer-banner__chip {
  right: 14px;
  bottom: 14px;
}
.flyer-banner__label {
  margin: 10px 0 0;
  text-align: center;
  font-family: var(--font-script);
  font-size: clamp(1.3rem, 5vw, 1.7rem);
  color: var(--rose-500);
}

/* ==========================================================================
   SECTION HEADS (RSVP + guestbook + free page)
   ========================================================================== */
.panel-head {
  width: 100%;
  max-width: 560px;
  margin: 0 auto clamp(18px, 4vw, 30px);
  text-align: center;
}
.panel-head__script {
  margin: 0;
  font-family: var(--font-script);
  font-size: clamp(2rem, 8vw, 2.8rem);
  color: var(--rose-600);
  line-height: 1.1;
}
.panel-head__title,
.section-title {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  letter-spacing: 0.04em;
  color: var(--ink);
}
.panel-head__intro {
  margin: 8px auto 0;
  max-width: 34em;
  font-size: 0.92rem;
  color: var(--plum-700);
}

/* ==========================================================================
   RSVP FORM
   ========================================================================== */
.rsvp-form {
  width: 100%;
  max-width: 560px;
  background: linear-gradient(170deg, var(--paper), var(--cream));
  border: 1px solid var(--blush-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(18px, 4vw, 34px);
}

.rsvp-fieldset {
  border: 0;
  margin: 0 0 22px;
  padding: 0;
}
.rsvp-fieldset__legend {
  width: 100%;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px dashed rgba(201, 162, 39, 0.6);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}

.form-group { margin-bottom: 14px; }
.form-group:last-child { margin-bottom: 0; }

.form-group label {
  display: block;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.form-group__hint { font-weight: 400; color: var(--plum-700); opacity: 0.85; }

.form-control {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--blush-200);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-control::placeholder { color: rgba(90, 58, 68, 0.45); }
.form-control:hover { border-color: var(--blush-300); }
.form-control:focus {
  outline: none;
  border-color: var(--rose-500);
  box-shadow: 0 0 0 4px rgba(201, 138, 157, 0.25);
}
textarea.form-control { resize: vertical; min-height: 84px; }

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b06b82' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

/* error messages — the platform fills these spans */
.error {
  display: block;
  margin-top: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--error);
  min-height: 0;
}
.error:empty { display: none; }

/* submit */
.btn {
  appearance: none;
  border: 0;
  border-radius: 100px;
  width: 100%;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
  box-shadow: 0 14px 26px -12px rgba(176, 107, 130, 0.8);
  transition: transform 0.15s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
}
.btn:hover { filter: brightness(1.05); box-shadow: 0 16px 30px -12px rgba(176, 107, 130, 0.9); }
.btn:active { transform: scale(0.98); }

/* loading — hidden by default; the platform toggles visibility while submitting */
.loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.86rem;
  color: var(--plum-700);
}
.loading__spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--blush-300);
  border-top-color: var(--rose-600);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- platform thank-you / RSVP-closed state ----------
   rsvp_user.js replaces the form with .thank-you-message when the
   deadline passes or after a successful submit. Style it like the
   form card so the scene never reads as a bare text drop. */
#rsvp-form .thank-you-message {
  width: 100%;
  margin-top: clamp(18px, 4vw, 30px) !important;
  border: 1px solid var(--blush-200);
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, var(--paper), var(--cream));
  box-shadow: var(--shadow-soft);
  padding: clamp(24px, 5vw, 40px) clamp(18px, 4vw, 34px);
  text-align: center;
}
#rsvp-form .thank-you-message h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  color: var(--ink);
}
#rsvp-form .thank-you-message p {
  margin: 6px auto 0;
  max-width: 38em;
  font-size: 0.92rem;
  color: var(--plum-700);
}
#rsvp-form .thank-you-message small {
  display: block;
  margin-top: 14px;
  color: var(--plum-700);
  opacity: 0.85;
}

/* ==========================================================================
   GUESTBOOK
   ========================================================================== */
.guestbook-body {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}

/* ==========================================================================
   GALLERY (PHOTO FEATURE)
   ========================================================================== */
.gallery-section {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: clamp(10px, 3vw, 16px);
}

.photo-card { margin: 0; }

.photo-open {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(240, 168, 189, 0.5);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--blush-100);
  cursor: zoom-in;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.photo-open:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -20px rgba(124, 74, 92, 0.5); }
.photo-open:active { transform: translateY(0); }
.photo-open:focus-visible { outline: 3px solid var(--rose-400); outline-offset: 2px; }

.photo-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3; /* crop any photo into the grid tile */
  object-fit: cover;
}

.photo-card figcaption {
  margin: 8px 2px 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  color: var(--plum-700);
  overflow-wrap: anywhere;
}

.gallery-hint {
  margin: clamp(14px, 3vw, 20px) 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--rose-500);
}

/* ==========================================================================
   VIDEO FEATURE (optional)
   ========================================================================== */
.video-section { margin-top: clamp(22px, 5vw, 30px); width: 100%; }
.video-card { max-width: 520px; margin: 0 auto; }
.video-open {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(240, 168, 189, 0.5);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--blush-100);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.video-open:hover { transform: translateY(-3px); box-shadow: 0 26px 54px -26px rgba(124, 74, 92, 0.55); }
.video-open:active { transform: translateY(0); }
.video-open:focus-visible { outline: 3px solid var(--rose-400); outline-offset: 3px; }
.video-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--blush-100);
}
/* play button — gentle blush disc over the thumbnail */
.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
  text-indent: 3px; /* optically centre the triangle */
  background: linear-gradient(135deg, var(--rose-500), var(--rose-600));
  box-shadow: 0 14px 30px -10px rgba(176, 107, 130, 0.85), 0 0 0 6px rgba(255, 250, 246, 0.55);
  transition: transform 0.2s var(--ease);
}
.video-open:hover .video-play { transform: translate(-50%, -50%) scale(1.08); }
.video-open:active .video-play { transform: translate(-50%, -50%) scale(0.96); }
.video-chip {
  left: 14px;
  bottom: 14px;
}
.video-card__label {
  margin: 10px 0 0;
  text-align: center;
  font-family: var(--font-script);
  font-size: clamp(1.3rem, 5vw, 1.7rem);
  color: var(--rose-500);
  overflow-wrap: anywhere;
}
/* No film yet (the shipped `placeholder.mp4` placeholder URL): the play
button and its chip hide away and a gentle note takes over — never a dead
play button. */
.video-card.is-unconfigured .video-play,
.video-card.is-unconfigured .zoom-chip { display: none !important; }
.video-card.is-unconfigured .video-open { cursor: default; }
.video-card.is-unconfigured .video-open:hover { transform: none; box-shadow: var(--shadow-soft); }
.video-hint {
  margin: 10px auto 0;
  max-width: 34em;
  text-align: center;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--plum-700);
  opacity: 0.9;
}

/* Inline video mode (mediaClickZoom: false with a real film URL):
the player renders in the flow, no click-to-open anywhere. */
.video-inline {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(240, 168, 189, 0.5);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-soft);
}
.video-inline iframe,
.video-inline video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- mediaClickZoom:false normalization ----------
Click-to-open is off: media buttons become plain frames (not clickable,
not focusable, no chips/play badge) so no leftover affordance remains. */
body.media-static .photo-open,
body.media-static .poster__photo-open,
body.media-static .flyer-banner__open,
body.media-static .free-open,
body.media-static .video-open {
  cursor: default;
  transform: none !important;
}
body.media-static .photo-open:hover,
body.media-static .poster__photo-open:hover,
body.media-static .flyer-banner__open:hover,
body.media-static .free-open:hover,
body.media-static .video-open:hover {
  transform: none;
  box-shadow: var(--shadow-card);
}
body.media-static .flyer-banner__open:hover { box-shadow: var(--shadow-soft); }
body.media-static .zoom-chip { display: none !important; }

/* ==========================================================================
   LIGHTBOX (PHOTO + VIDEO VIEWER, with zoom & pan)
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  background: rgba(90, 58, 68, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox-backdrop { position: absolute; inset: 0; }

.lightbox-figure {
  position: relative;
  z-index: 1;
  max-width: min(860px, 94vw);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  max-width: 100%;
}
.lightbox-img {
  display: block;
  width: auto;
  max-width: min(860px, 94vw);
  max-height: 74vh;
  object-fit: contain;
  background: var(--paper);
  border-radius: var(--radius-md);
  border: 4px solid var(--paper);
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.55);
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transition: transform 0.2s var(--ease);
  cursor: zoom-in;
}
.lightbox-frame.is-zoomed .lightbox-img { cursor: grab; }
.lightbox-frame.is-zoomed .lightbox-img:active { cursor: grabbing; }
.lightbox-frame.is-panning .lightbox-img { transition: none; }

.lightbox-cap {
  width: 100%;
  padding: 12px 20px 0;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  text-align: center;
  overflow-wrap: anywhere;
}
.lightbox-count {
  position: absolute;
  top: -14px;
  right: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: #fff;
  background: rgba(90, 58, 68, 0.55);
  padding: 4px 10px;
  border-radius: 100px;
}

/* video mode — embedded player keeps a tidy 16:9 frame on any screen */
.lightbox-video {
  position: relative;
  z-index: 1;
  width: min(900px, 92vw);
  display: none;
}
.lightbox-video.is-active { display: block; }
.lightbox-figure.is-hidden { display: none; }
.lightbox-iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: var(--radius-md);
  background: #000;
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.55);
}
/* direct video files play natively */
.lightbox-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  background: #000;
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.55);
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 3;
  appearance: none;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 250, 246, 0.35);
  cursor: pointer;
  color: #fff;
  background: rgba(255, 250, 246, 0.16);
  font-size: 1.4rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background 0.2s var(--ease), transform 0.15s var(--ease), border-color 0.2s var(--ease);
}
.lightbox-close:hover,
.lightbox-nav:hover:not(:disabled) { background: rgba(255, 250, 246, 0.3); border-color: var(--gold); }
.lightbox-nav:disabled { opacity: 0.35; cursor: default; }
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lightbox-close { top: calc(14px + var(--safe-t)); right: 14px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

/* zoom tools (images) */
.lightbox-tools {
  position: absolute;
  left: 50%;
  bottom: calc(16px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}
.lightbox-tool {
  min-width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 250, 246, 0.35);
  background: rgba(255, 250, 246, 0.16);
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.lightbox-tool:hover { background: rgba(255, 250, 246, 0.3); border-color: var(--gold); }
.lightbox-tool:disabled { opacity: 0.35; cursor: default; }
.lightbox-tool:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.lightbox-tool--readout {
  width: auto;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

/* open-original link */
.lightbox-original {
  position: absolute;
  right: 14px;
  bottom: calc(16px + var(--safe-b));
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 250, 246, 0.35);
  background: rgba(255, 250, 246, 0.16);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.lightbox-original:hover { background: rgba(255, 250, 246, 0.3); border-color: var(--gold); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.app-footer {
  padding: 18px 16px 6px;
  text-align: center;
}
.app-footer p {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-600);
}
/* brand placeholder — the platform can drop its own brand here */
.footer-brand {
  display: inline-block;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--rose-600);
  vertical-align: baseline;
}
.app-footer__heart { color: var(--gold); }

/* ==========================================================================
   FREE PAGE (optional note page)
   ========================================================================== */
.free-page { width: 100%; max-width: 560px; margin: 0 auto; }

/* one card per free block; the editor clones .free-block per row */
.free-blocks {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 4vw, 26px);
}
.free-block {
  background: linear-gradient(170deg, var(--paper), var(--cream));
  border: 1px solid var(--blush-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(20px, 5vw, 34px);
  text-align: center;
}
.free-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  letter-spacing: 0.04em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.free-content {
  margin: 12px auto 0;
  max-width: 34em;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--plum-700);
  overflow-wrap: anywhere;
}
.free-figure { margin: 18px auto 0; max-width: 480px; }
.free-open {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(240, 168, 189, 0.5);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--blush-100);
  cursor: zoom-in;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.free-open:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -20px rgba(124, 74, 92, 0.5); }
.free-open:active { transform: translateY(0); }
.free-open:focus-visible { outline: 3px solid var(--rose-400); outline-offset: 2px; }
.free-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--blush-100);
}
.free-chip {
  right: 14px;
  bottom: 14px;
}
.free-cap {
  margin: 10px 0 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plum-700);
  overflow-wrap: anywhere;
}

/* ==========================================================================
   POWERED-BY (full-width brand line closing the invitation)
   ========================================================================== */
.powered-by {
  width: 100%;
  text-align: center;
  padding: 6px 16px calc(14px + var(--safe-b));
}
.powered-by p {
  margin: 0;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose-500);
}

/* ==========================================================================
   RESPONSIVE — mobile chrome swaps in below 860px
   ========================================================================== */
@media (max-width: 859.98px) {
  .topnav { display: none; }
  .menu-btn { display: inline-flex; }
  .app-header { grid-template-columns: 1fr auto; }
}

/* Landscape phones: reclaim vertical room around the cover */
@media (max-height: 480px) and (orientation: landscape) {
  .scene { padding-top: 10px; padding-bottom: calc(var(--dock-h) + 14px); }
  .flyer-banner { max-width: 420px; }
  .dock button { height: 42px; min-width: 46px; }
}

@media (max-width: 560px) {
  .detail-row { grid-template-columns: 1fr; }
  .photo-grid { gap: 10px; }
  .dock { bottom: calc(10px + var(--safe-b)); padding: 5px 6px; gap: 1px; }
  .dock button { min-width: 48px; height: 48px; padding: 6px 6px; border-radius: 12px; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-tools { bottom: calc(12px + var(--safe-b)); }
  .lightbox-original { right: 10px; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .lightbox-img { transition: none; }
}

/* ==========================================================================
   NO-JS — the page reads perfectly as a plain (still beautiful) document:
   header pills are real anchors that jump natively; the burger, sheet,
   dock and progress bar would do nothing, so they never render.
   ========================================================================== */
.no-js .menu-btn,
.no-js .menu-sheet,
.no-js .menu-backdrop,
.no-js .dock,
.no-js .app-header__progress { display: none !important; }
.no-js .app-header { background: rgba(255, 250, 246, 0.86); border-bottom-color: rgba(240, 168, 189, 0.35); }

/* ==========================================================================
   PRINT — the whole invitation prints as stacked sheets: chrome and
   overlays disappear, everything hidden for fit or by an empty value is
   restored (features switched off on purpose stay hidden).
   ========================================================================== */
@media print {
  body {
    background: #fff;
    padding-top: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .app-header, .menu-sheet, .menu-backdrop, .dock, .skip-link, .lightbox { display: none !important; }
  .fit-hidden, .fit-shrink-photo, .is-empty { display: revert !important; }
  .scene {
    min-height: 0;
    height: auto;
    max-height: none;
    padding: 10mm 0;
    overflow: visible;
    display: block;
  }
  .scene--cover { height: auto; }
  .poster {
    max-width: 100%;
    box-shadow: none;
    border-radius: 0;
    padding: 16mm;
  }
  .poster::before { inset: 5mm; border-radius: 3mm; }
  .poster__ribbon { position: static; transform: none; margin-bottom: 6mm; max-width: none; }
  .rsvp-form, .free-block, .poster__details { box-shadow: none; page-break-inside: avoid; }
}
