/* ═══════════════════════════════════════════════════════════════════════
   YEARS OF US — Milestone Anniversary Flyer · styles.css
   A celebration-poster invitation. Deep plum + warm gold palette.

   House UX: NATURAL SCROLLING
     · Sections stack in normal document flow; each is a full-viewport
       "scene" that centers its content (gated behind html.js).
     · Fixed chrome derives its geometry from tokens: --header-h locks the
       sticky header, the cover cap and every anchor offset derive from it,
       --dock-h reserves room for the floating dock.
     · prefers-reduced-motion and @media print are supported; without JS the
       page is a plain stacked document (chrome hidden).
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
  --plum-950: #1a101f;
  --plum-900: #211426;
  --plum-800: #2b1a31;
  --plum-700: #3a2540;
  --cream: #f6ecd9;
  --cream-dim: rgba(246, 236, 217, 0.62);
  --gold: #e6c069;
  --gold-soft: rgba(230, 192, 105, 0.55);
  --gold-line: rgba(230, 192, 105, 0.32);
  --rose: #e7a3a3;
  --danger: #ffb4b4;

  --font-display: 'Butler', Georgia, 'Times New Roman', serif;
  --font-script: 'Astagina', 'Snell Roundhand', 'Segoe Script', 'Brush Script MT', cursive;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --radius: 18px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  /* Geometry tokens — real chrome must never drift from these. */
  --header-h: 56px;                                  /* enforced on .site-head (content box) */
  --anchor-gap: 10px;                                /* breathing room under the header */
  --head-chrome: calc(var(--header-h) + var(--safe-t));   /* real header footprint */
  --header-offset: calc(var(--head-chrome) + var(--anchor-gap));
  --dock-space: 96px;                                /* body padding reserved for the floating dock */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

/* Shared platform fonts (serve when hosted in template/creative/shared/;
   every stack below has a full system fallback, so nothing breaks if these
   are absent in a standalone copy). */
@font-face {
  font-family: 'Astagina';
  src: url('../../../../shared/fonts/AstaginaSignature.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Butler';
  src: url('../../../../shared/fonts/Butler_Black.otf') format('opentype');
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../../../../shared/fonts/montserrat-latin/montserrat-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('../../../../shared/fonts/montserrat-latin/montserrat-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* ── Base / reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--cream);
  /* One continuous plum stage behind every scene — no seams between sections. */
  background:
    radial-gradient(130% 60% at 50% 0%, var(--plum-700) 0%, var(--plum-800) 46%, var(--plum-950) 100%);
  background-color: var(--plum-950);
  overflow-x: clip;
}
img, svg { max-width: 100%; vertical-align: middle; }
button { font: inherit; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
::selection { background: rgba(230, 192, 105, 0.35); }

/* ── Scrollbars styled to the palette (page, menu sheet, zoom panes) ───── */
* { scrollbar-width: thin; scrollbar-color: rgba(230, 192, 105, 0.45) rgba(26, 16, 31, 0.65); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(26, 16, 31, 0.65); }
::-webkit-scrollbar-thumb {
  border-radius: 999px;
  border: 2px solid rgba(26, 16, 31, 0.85);
  background: linear-gradient(180deg, #f2d692, var(--gold) 60%, #d9a94e);
}
::-webkit-scrollbar-corner { background: transparent; }

/* ── Smooth anchor gliding (JS jumps set behavior explicitly too) ──────── */
@media (prefers-reduced-motion: no-preference) {
  html.js { scroll-behavior: smooth; }
}
/* Native anchor/deep-link jumps stop just below the fixed header.
   (Sections carry the matching scroll-margin-top; no scroll-padding here —
   the two would stack.) */
.js .panel, .js .rsvp-wrap, .js .guestbook-section {
  scroll-margin-top: var(--header-offset);
}

/* ── Reserve room for the floating dock so end-of-page content and the
      powered-by strip never sit beneath it ─────────────────────────────── */
.js body { padding-bottom: calc(var(--dock-space) + var(--safe-b)); }

/* ════════════════════════════════════════════════════════════════════════
   NATURAL-SCROLL SHELL
   Every section stacks in flow. The .js class turns sections into
   full-viewport scenes and adds the fixed chrome; without JS the page is a
   plain, fully readable stacked document.
   ════════════════════════════════════════════════════════════════════════ */
.app { position: relative; }

.js .scene {
  min-height: calc(100vh - var(--head-chrome));
  min-height: calc(100dvh - var(--head-chrome));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.scene > .panel-inner { width: 100%; }

.panel { padding: 24px 18px 48px; }
.panel-inner { max-width: 720px; margin: 0 auto; padding: clamp(26px, 5vmin, 52px) clamp(18px, 4vmin, 32px) clamp(34px, 6vmin, 60px); }

/* ── Sticky site header ────────────────────────────────────────────────── */
.site-head {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--head-chrome);   /* locked — cover cap and anchor offsets derive from it */
  padding: var(--safe-t) clamp(12px, 3vw, 24px) 0;
  border-bottom: 1px solid var(--gold-line);
  background: rgba(20, 12, 24, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.site-head.is-scrolled {
  background: rgba(16, 9, 19, 0.88);
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.8);
}
/* Progress hairline along the header's bottom edge */
.head-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, #f2d692, var(--gold) 55%, var(--rose));
  pointer-events: none;
}

.head-brand { display: inline-flex; align-items: center; text-decoration: none; }
.head-monogram {
  font-family: var(--font-script);
  font-size: 21px;
  color: var(--gold);
  line-height: 1;
}
.head-amp { font-family: var(--font-sans); font-style: italic; font-size: 12px; color: var(--rose); padding: 0 2px; }
.head-title {
  flex: 1 1 auto; min-width: 0;
  font-size: 11px; font-weight: 700; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--cream-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Desktop pill nav — built by main.js from the DOM sections */
.head-nav { display: none; }
@media (min-width: 1200px) {
  html.js .head-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  html.js .head-nav::-webkit-scrollbar { display: none; }
  html.js .head-burger { display: none; }
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--cream-dim);
  font: 700 11.5px/1 var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.tab-btn span { overflow: hidden; text-overflow: ellipsis; }
.tab-btn:hover { color: var(--cream); border-color: var(--gold-line); }
.tab-btn[aria-current="page"], .tab-btn.is-current {
  color: var(--plum-950);
  background: linear-gradient(135deg, #f2d692, var(--gold));
}
.tab-btn:focus-visible { outline-offset: 1px; }

/* Print + burger buttons */
.head-print {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--gold-line); border-radius: 999px;
  background: transparent; color: var(--gold);
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  padding: 6px 12px; cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.head-print svg { width: 15px; height: 15px; }
.head-print:hover { background: var(--gold); color: var(--plum-950); }
@media (max-width: 560px) {
  .head-print { padding: 6px 9px; }
  .head-print-label { display: none; }
}

.head-burger {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  flex: 0 0 auto;
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.head-burger:hover { background: rgba(230, 192, 105, 0.14); border-color: var(--gold); }
.head-burger svg { width: 20px; height: 20px; }
.head-burger .icon-close { display: none; }
.head-burger[aria-expanded="true"] .icon-open { display: none; }
.head-burger[aria-expanded="true"] .icon-close { display: block; }

/* Without JS the burger would do nothing — the page reads as a document. */
html:not(.js) .head-burger,
html:not(.js) .head-nav,
html:not(.js) .head-progress,
html:not(.js) .dock { display: none !important; }

/* ── Mobile slide-down section sheet ───────────────────────────────────── */
.menu-backdrop {
  position: fixed;
  inset: var(--head-chrome) 0 0 0;
  z-index: 70;
  background: rgba(10, 5, 13, 0.6);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease);
}
.menu-backdrop.is-open { opacity: 1; pointer-events: auto; }

.menu-sheet {
  position: fixed;
  top: var(--head-chrome);
  left: 0; right: 0;
  z-index: 71;
  max-height: calc(100dvh - var(--head-chrome));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px clamp(14px, 4vw, 26px) calc(16px + var(--safe-b));
  background: linear-gradient(180deg, rgba(30, 18, 35, 0.985), rgba(22, 13, 27, 0.985));
  border-bottom: 1px solid var(--gold-line);
  box-shadow: 0 30px 50px -28px rgba(0, 0, 0, 0.85);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s linear 0.22s;
}
.menu-sheet.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
}
.menu-sheet-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 12px 6px;
  border: 0;
  border-bottom: 1px solid rgba(230, 192, 105, 0.14);
  background: transparent;
  color: var(--cream);
  font: 700 13px/1.25 var(--font-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}
.menu-item:last-child { border-bottom: 0; }
.menu-item svg { width: 18px; height: 18px; flex: none; color: var(--gold); }
.menu-item .menu-num {
  margin-left: auto;
  font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
  color: var(--cream-dim);
  font-variant-numeric: tabular-nums;
}
.menu-item:hover, .menu-item:focus-visible { background: rgba(230, 192, 105, 0.09); }
.menu-item.is-current { color: var(--gold); }
.menu-item.is-current .menu-num { color: var(--rose); }
.menu-sheet:focus { outline: none; }

/* ── Floating icon dock (mobile / tablet; desktop uses the header pills) ── */
.dock {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: stretch;
  gap: 2px;
  max-width: calc(100vw - 20px);
  padding: 7px 8px;
  background: rgba(22, 13, 27, 0.82);
  border: 1px solid rgba(246, 236, 217, 0.16);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 26px 52px -22px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(246, 236, 217, 0.08);
}
.dock button {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 1 auto;
  min-width: 28px;
  width: 34px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--cream-dim);
  cursor: pointer;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.dock button svg { width: 17px; height: 17px; }
.dock button:hover { color: var(--cream); background: rgba(246, 236, 217, 0.08); }
.dock button:active { transform: scale(0.92); }
.dock button.is-current {
  color: var(--plum-950);
  background: linear-gradient(135deg, #f2d692, var(--gold));
  box-shadow: 0 4px 14px -4px rgba(230, 192, 105, 0.55);
}
@media (min-width: 1200px) {
  html.js .dock { display: none; }   /* the header pills carry navigation */
}

/* ── Empty-state audit + cover-fit trimming ──────────────────────────────
   Hidden = visually hidden only: present in DOM, restored in print. */
.is-empty, .fit-hidden { display: none !important; }

/* Sections receive programmatic focus after nav jumps (tabindex="-1") —
   never show a focus ring on them. */
.js [data-panel]:focus, .js [data-panel]:focus-visible { outline: none; }

/* ── Photo off-switch: <html data-photos="off"> hides every photo feature.
   In main.js the Story/Memories panels are removed BEFORE the navigations
   are built (so no orphan entries); these rules cover the no-JS fallback
   and act as a belt-and-braces guard. */
html[data-photos="off"] .poster-photo,
html[data-photos="off"] .poster-photo-open,
html[data-photos="off"] .panel-story,
html[data-photos="off"] .panel-memories {
  display: none !important;
}

/* ── Click-to-open switch: <html data-media-lightbox="off"> renders media
   INLINE ONLY — no lightbox triggers, no leftover click affordances. */
html[data-media-lightbox="off"] .gallery-open { pointer-events: none; cursor: default; }
html[data-media-lightbox="off"] .gallery-open img,
html[data-media-lightbox="off"] .free-open img,
html[data-media-lightbox="off"] .story-open img { transform: none !important; }
html[data-media-lightbox="off"] .gallery-item:focus-within { outline: none; }
html[data-media-lightbox="off"] .poster-photo-open,
html[data-media-lightbox="off"] .film-theater { display: none !important; }
/* Trigger buttons disabled by main.js render exactly like plain figures. */
.gallery-open[disabled] { pointer-events: none; cursor: default; }
.gallery-open[disabled] img { transform: none; }
.gallery-open[disabled]:focus-visible { outline: none; }

/* ═══════════════════════════ COVER — THE POSTER ═══════════════════════════
   Exactly one screen: capped at 100dvh minus the header token, vertically
   centered, fully visible at load. Fluid type stops growing on short
   viewports (≤700px tiers below); main.js trims decorative elements first
   if content still overflows; the inner scroll area is the last-resort
   safety valve for extreme viewports only. */
.js .panel-cover {
  height: calc(100vh - var(--head-chrome));
  height: calc(100dvh - var(--head-chrome));
  padding: 0 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* Cover-fit last stage before the safety valve: shave breathing room. */
.js .panel-cover.cover-squeeze .poster-inner {
  padding-top: clamp(10px, 2vmin, 18px);
  padding-bottom: clamp(10px, 2vmin, 18px);
  gap: clamp(6px, 1.4vmin, 12px);
}
.panel-cover .poster {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  overflow: hidden;
  isolation: isolate;
}
.footer-brand { flex: 0 0 auto; }

/* OPTIONAL cover photo: warm placeholder behind the poster, with a dark
   plum overlay so the gold/cream text stays readable. Delete .poster-photo
   from index.html to restore the pure CSS-art poster. */
.poster-photo {
  position: absolute; inset: 0;
  z-index: -3;
}.poster-photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.poster-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(27, 16, 31, 0.66) 0%,
    rgba(27, 16, 31, 0.72) 46%,
    rgba(18, 10, 22, 0.9) 100%);
}
.poster-rays {
  position: absolute; inset: -12%;
  z-index: -2;
  background: repeating-conic-gradient(
    from 0deg at 50% 44%,
    rgba(230, 192, 105, 0.13) 0deg 1.6deg,
    transparent 1.6deg 12deg
  );
  -webkit-mask-image: radial-gradient(circle at 50% 44%, #000 0%, transparent 64%);
  mask-image: radial-gradient(circle at 50% 44%, #000 0%, transparent 64%);
  animation: rays-spin 80s linear infinite;
}
@keyframes rays-spin { to { transform: rotate(360deg); } }

.sparkles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.spark {
  --s: 15px;
  position: absolute;
  left: var(--x); top: var(--y);
  width: var(--s); height: var(--s);
  background: conic-gradient(
    from 45deg,
    transparent 0deg 28%,
    #ffe9b8 28% 34%,
    transparent 34% 78%,
    #ffe9b8 78% 84%,
    transparent 84%
  );
  filter: drop-shadow(0 0 6px rgba(255, 233, 184, 0.55));
  animation: twinkle 4.5s ease-in-out var(--d, 0s) infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.7); }
  50% { opacity: 1; transform: scale(1.05); }
}

.poster-inner {
  position: relative; z-index: 1;
  width: 100%;
  margin: auto;
  padding: clamp(28px, 6vmin, 64px) clamp(20px, 6vmin, 72px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: clamp(10px, 2.4vmin, 22px);
  text-align: center;
  /* Last-resort safety valve for extreme viewports (see README §5):
     normally nothing scrolls here — trimming keeps the poster whole. */
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.poster-kicker {
  margin: 0;
  font-size: clamp(10px, 2.4vmin, 14px);
  font-weight: 700; letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--gold);
}
.poster-kicker span[aria-hidden="true"] { opacity: 0.75; margin: 0 0.4em; }

.poster-title {
  margin: 0;
  max-width: 100%;
  display: flex; flex-direction: row; flex-wrap: wrap;
  align-items: baseline; justify-content: center;
  gap: clamp(6px, 1.6vmin, 16px);
}
.poster-year {
  flex: 0 0 auto;
  width: clamp(170px, 34vmin, 320px);
  height: clamp(150px, 46vmin, 320px);
  display: flex; align-items: center; justify-content: center;
}
.year-num {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(120px, 40vmin, 300px);
  line-height: 0.9;
  letter-spacing: -0.01em;
  color: var(--gold);
  text-shadow:
    0 0 34px rgba(230, 192, 105, 0.35),
    0 2px 0 rgba(255, 255, 255, 0.06) inset;
  white-space: nowrap;
}
.poster-word {
  margin: 0;
  flex: 0 0 auto;
  font-size: clamp(24px, 6vmin, 44px);
  line-height: 1.1;
  color: var(--rose);
  font-weight: 400;
  white-space: nowrap;
  /* Optical nudge: baseline alignment lands the script line a hair low
     against the giant numeral, so lift it back onto the numeral's baseline. */
  transform: translateY(-0.15em);
}
.script { font-family: var(--font-script); }

/* fit-text scales the whole row against .poster-inner's width, so no
   max-width here — a cap would shrink the box under the text and clip it. */
.poster-names {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(6px, 1.6vmin, 14px);
  height: clamp(46px, 12vmin, 84px);
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(22px, 7.4vmin, 44px);
  line-height: 1;
  color: var(--cream);
  white-space: nowrap;
}
.name { line-height: 1; }
.poster-names .amp {
  font-family: var(--font-script); font-weight: 400;
  color: var(--gold); font-size: 0.82em; line-height: 1;
}

.poster-tag {
  margin: clamp(2px, 1vmin, 8px) 0 0;
  max-width: 34em;
  font-size: clamp(13px, 3.1vmin, 17px);
  line-height: 1.5;
  color: var(--cream-dim);
}
.poster-meta {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: clamp(6px, 1.6vmin, 14px);
  font-size: clamp(11px, 2.6vmin, 14px);
  font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold);
}
.poster-meta-sep { opacity: 0.55; }

/* Cover photo chip — opens the backdrop photo full-size in the lightbox.
   Gentle gold pill that sits under the poster meta without stealing focus
   from the numeral. Hidden by JS when no backdrop photo exists. */
.poster-photo-open {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px;
  margin-top: clamp(6px, 1.6vmin, 12px);
  padding: 8px 16px;
  border: 1px solid var(--gold-line); border-radius: 999px;
  background: rgba(27, 16, 31, 0.5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  color: var(--gold);
  font: 700 11px/1 var(--font-sans);
  letter-spacing: 0.18em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.poster-photo-open svg { width: 15px; height: 15px; flex: none; }
.poster-photo-open:hover { background: var(--gold); color: var(--plum-950); }

/* Short viewports: fluid sizing stops growing (~700px tier) so mid-size
   phones and landscape screens never lose content to the cap. */
@media (max-height: 700px) {
  .poster-inner { gap: clamp(8px, 1.8vmin, 14px); padding: clamp(16px, 4vmin, 30px) clamp(16px, 5vmin, 44px); }
  .poster-year { width: clamp(130px, 26vmin, 230px); height: clamp(110px, 34vmin, 230px); }
  .year-num { font-size: clamp(88px, 31vmin, 210px); }
  .poster-word { font-size: clamp(20px, 5vmin, 34px); }
  .poster-names { height: clamp(38px, 9vmin, 62px); font-size: clamp(19px, 5.6vmin, 34px); }
  .poster-tag { font-size: clamp(12.5px, 2.7vmin, 15px); }
}
@media (max-height: 560px) {
  .poster-inner { gap: 7px; }
  .poster-tag, .poster-photo-open { display: none; }   /* trimmed by design tiers too */
}

/* ── Footer brand placeholder ──────────────────────────────────────────── */
.footer-brand {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px calc(10px + var(--safe-b));
  font-size: 10px; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--cream-dim); text-align: center;
  border-top: 1px solid rgba(230, 192, 105, 0.18);
}
.footer-brand-mark { color: var(--gold); font-size: 12px; }

/* ── Powered by: full-width platform credit strip ──────────────────────── */
.powered-by {
  display: flex; align-items: center; justify-content: center;
  padding: 7px calc(14px + var(--safe-r)) calc(9px + var(--safe-b)) calc(14px + var(--safe-l));
  border-top: 1px solid rgba(230, 192, 105, 0.16);
  background: rgba(20, 12, 24, 0.6);
  font-size: 10px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase;
  color: rgba(246, 236, 217, 0.5);
  text-align: center;
}
.powered-by a {
  color: var(--gold);
  text-decoration: none;
}
.powered-by a:hover { text-decoration: underline; }

/* ── Shared panel typography ───────────────────────────────────────────── */
.panel-head { text-align: center; margin-bottom: clamp(22px, 4vmin, 34px); }
.eyebrow {
  margin: 0 0 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.4em; text-transform: uppercase;
  color: var(--gold);
}
.panel-title {
  margin: 0;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(30px, 7.4vmin, 46px);
  line-height: 1.08;
  color: var(--cream);
}
.rule {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin: clamp(14px, 3vmin, 22px) auto;
  color: var(--gold); font-size: 13px;
}
.rule::before, .rule::after {
  content: "";
  height: 1px; width: min(120px, 22vw);
  background: linear-gradient(90deg, transparent, var(--gold-line));
}
.rule::after { background: linear-gradient(90deg, var(--gold-line), transparent); }
.lede {
  margin: 0 auto; max-width: 34em;
  font-size: clamp(14px, 3.3vmin, 16.5px);
  line-height: 1.7;
  color: var(--cream-dim);
}

/* ── Details: info grid ────────────────────────────────────────────────── */
.info-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(10px, 2.4vmin, 16px);
  margin: 0; padding: 0;
}
.info-tile {
  list-style: none;
  padding: clamp(14px, 3vmin, 22px);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  background: rgba(246, 236, 217, 0.045);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}
.info-tile:hover { transform: translateY(-2px); background: rgba(246, 236, 217, 0.075); }
.info-tile dt {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold);
}
.info-tile dt svg { width: 18px; height: 18px; flex: none; }
.info-tile dd {
  margin: 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(14px, 3.2vmin, 17px);
  line-height: 1.45;
  color: var(--cream);
  overflow-wrap: anywhere;
}

/* ── Add to Calendar ───────────────────────────────────────────────────── */
.cal-row {
  margin: clamp(18px, 4vmin, 26px) 0 0;
  text-align: center;
}
.cal-btn {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid var(--gold-line); border-radius: 999px;
  background: rgba(230, 192, 105, 0.1);
  color: var(--gold);
  font: 700 12px/1 var(--font-sans);
  letter-spacing: 0.16em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.cal-btn svg { width: 17px; height: 17px; flex: none; }
.cal-btn:hover { background: var(--gold); color: var(--plum-950); transform: translateY(-1px); }

/* ── Details: RSVP countdown (revealed by JS only when a deadline exists) ─ */
.rsvp-countdown {
  margin: clamp(20px, 4vmin, 30px) auto 0;
  text-align: center;
}
.countdown-label {
  margin: 0 0 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold);
}
.countdown-blocks { display: flex; justify-content: center; gap: clamp(8px, 2vmin, 14px); }
.count-block {
  min-width: clamp(56px, 14vmin, 76px);
  padding: 10px 6px;
  border: 1px solid var(--gold-line); border-radius: 12px;
  background: rgba(246, 236, 217, 0.05);
}
.count-block div {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(20px, 5vmin, 28px);
  color: var(--gold); line-height: 1.1;
}
.count-block span {
  display: block; margin-top: 2px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cream-dim);
}

/* ── Details: note card ────────────────────────────────────────────────── */
.note-card {
  margin: clamp(18px, 4vmin, 28px) auto 0;
  max-width: 30em;
  padding: clamp(16px, 3.4vmin, 24px);
  text-align: center;
  border: 1px dashed var(--gold-soft);
  border-radius: var(--radius);
  background: rgba(230, 192, 105, 0.07);
}
.note-label {
  margin: 0 0 6px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--rose);
}
.note-text { margin: 0; font-size: clamp(13.5px, 3.1vmin, 15.5px); line-height: 1.65; color: var(--cream-dim); }

/* ── Memories: photo gallery ───────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(10px, 2.4vmin, 18px);
}
.gallery-item {
  position: relative;
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gold-line);
  /* Warm fallback underneath each photo so a slot never looks broken while
     the (placeholder) image loads — or if it ever fails. */
  background:
    radial-gradient(circle at 50% 38%, rgba(230, 192, 105, 0.22), transparent 62%),
    linear-gradient(165deg, #4a2f52 0%, #2b1a31 62%, #1a101f 100%);
}
.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}
.gallery-open img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}
.gallery-item:hover .gallery-open img { transform: scale(1.06); }
.gallery-item:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.gallery-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 30px 12px 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  text-align: center;
  color: var(--cream);
  background: linear-gradient(180deg, transparent, rgba(18, 10, 22, 0.82));
  pointer-events: none;
  overflow-wrap: anywhere;
}

/* ── Story: "Through the Years" milestone timeline ────────────────────── */
.story-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: clamp(16px, 3.4vmin, 24px);
}
.story-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(12px, 2.6vmin, 18px);
  padding: clamp(12px, 2.6vmin, 18px);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  background: rgba(246, 236, 217, 0.045);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}
.story-item:hover { transform: translateY(-2px); background: rgba(246, 236, 217, 0.075); }
.story-figure {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--gold-line);
  background:
    radial-gradient(circle at 50% 38%, rgba(230, 192, 105, 0.22), transparent 62%),
    linear-gradient(165deg, #4a2f52 0%, #2b1a31 62%, #1a101f 100%);
}
.story-figure .gallery-open { aspect-ratio: 3 / 2; cursor: zoom-in; }
.story-item:hover .gallery-open img { transform: scale(1.06); }
.story-item:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.story-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 26px 12px 9px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  text-align: center;
  color: var(--gold);
  background: linear-gradient(180deg, transparent, rgba(18, 10, 22, 0.82));
  pointer-events: none;
  overflow-wrap: anywhere;
}
.story-body {
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 2px 4px;
}
.story-year {
  margin: 0;
  font-size: 11px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--rose);
}
.story-heading {
  margin: 0;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(17px, 4vmin, 22px);
  line-height: 1.15;
  color: var(--cream);
}
.story-text {
  margin: 0;
  font-size: clamp(13px, 3.1vmin, 14.5px);
  line-height: 1.6;
  color: var(--cream-dim);
  overflow-wrap: anywhere;
}
@media (min-width: 640px) {
  .story-item {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: clamp(18px, 3.2vmin, 30px);
    padding: clamp(16px, 3vmin, 22px);
  }
  /* Alternate: even chapters put the photo on the right. */
  .story-item:nth-child(even) .story-figure { order: 2; }
}

/* ── Film: optional video embed ────────────────────────────────────────── */
.film-figure {
  position: relative;
  max-width: min(calc(56vh * 16 / 9), 100%);
  margin: 0 auto;
}
.film-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gold-line);
  box-shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.7);
  /* Warm fallback while the embed loads — nothing ever looks broken. */
  background:
    radial-gradient(circle at 50% 40%, rgba(230, 192, 105, 0.18), transparent 60%),
    linear-gradient(165deg, #4a2f52 0%, #2b1a31 62%, #1a101f 100%);
}
.film-embed iframe,
.film-embed video {
  display: block;
  width: 100%; height: 100%;
  border: 0;
  object-fit: cover;
  background: transparent;
}
.film-theater {
  position: absolute;
  top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid var(--gold-line); border-radius: 999px;
  background: rgba(27, 16, 31, 0.66);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--gold);
  font: 700 10.5px/1 var(--font-sans);
  letter-spacing: 0.16em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.film-theater svg { width: 14px; height: 14px; }
.film-theater:hover { background: var(--gold); color: var(--plum-950); }
.film-cap {
  margin: 12px 0 0;
  text-align: center;
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cream-dim);
}
.film-open {
  margin: 14px 0 0;
  text-align: center;
}
.film-open a {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid var(--gold-line); border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.film-open a:hover { background: var(--gold); color: var(--plum-950); }

/* ── The Flyer: optional flyer/banner showcase ─────────────────────────── */
.flyer-figure {
  max-width: 400px;
  margin: 0 auto;
}

/* ── Free Page: optional repeatable blocks (title + text + optional photo) ─ */
.free-blocks {
  display: flex; flex-direction: column;
  gap: clamp(16px, 3.4vmin, 24px);
}
.free-block {
  padding: clamp(14px, 3vmin, 22px);
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  background: rgba(246, 236, 217, 0.045);
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}
.free-block:hover { transform: translateY(-2px); background: rgba(246, 236, 217, 0.075); }
.free-title {
  margin: 0 0 8px;
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(18px, 4.2vmin, 23px);
  line-height: 1.15;
  color: var(--cream);
}
.free-content { margin: 0 0 14px; }
.free-content p {
  margin: 0;
  font-size: clamp(13.5px, 3.2vmin, 15px);
  line-height: 1.65;
  color: var(--cream-dim);
  overflow-wrap: anywhere;
}
.free-block .free-content:last-child { margin-bottom: 0; }
/* Optional photo — main.js hides the whole figure when a block has no
   image, so a photo-less block renders as title + text only. */
.free-figure {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--gold-line);
  background:
    radial-gradient(circle at 50% 38%, rgba(230, 192, 105, 0.22), transparent 62%),
    linear-gradient(165deg, #4a2f52 0%, #2b1a31 62%, #1a101f 100%);
}
.free-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.free-open img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}
.free-block:hover .free-open img { transform: scale(1.06); }
.free-block:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.free-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0;
  padding: 26px 12px 9px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  text-align: center;
  color: var(--gold);
  background: linear-gradient(180deg, transparent, rgba(18, 10, 22, 0.82));
  pointer-events: none;
  overflow-wrap: anywhere;
}

/* ── Lightbox: full-screen media viewer (built by main.js) ────────────────
   Photos: wheel / pinch / double-tap zoom with pan while zoomed, prev/next,
   caption and an "Open full size" link. Videos play as an embed or native
   player with an "Open original" link. Built/destroyed on demand. */
.lightbox {
  position: fixed; inset: 0;
  z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  background: rgba(14, 8, 17, 0.94);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lightbox.is-open { display: flex; }
html.lb-open, html.lb-open body { overflow: hidden; }   /* lock the page while open */
.lightbox-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: min(92vw, 980px);
  max-height: 76vh;
  touch-action: none;
}
.lightbox img,
.lightbox video,
.lightbox iframe {
  display: block;
  max-width: min(92vw, 980px);
  max-height: 76vh;
  width: auto; height: auto;
  border-radius: 14px;
  border: 1px solid var(--gold-line);
  box-shadow: 0 34px 90px -30px rgba(0, 0, 0, 0.85);
  background: rgba(26, 16, 31, 0.6);
}
.lightbox img { cursor: zoom-in; touch-action: none; user-select: none; -webkit-user-select: none; }
.lightbox.is-zoomed .lightbox-media { overflow: visible; }
.lightbox img { transition: transform 0.2s var(--ease); }
.lightbox.is-panning img { transition: none; cursor: grabbing; }
.lightbox iframe { width: min(92vw, 960px); height: min(51.75vw, 540px); }
.lightbox-cap,
.lightbox-hint,
.lightbox-original { align-self: center; }
.lightbox-cap {
  margin: 14px 0 0;
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  text-align: center;
}
.lightbox-hint {
  margin: 8px 0 0;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(246, 236, 217, 0.55);
  text-align: center;
}
.lightbox-original {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--gold-line); border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lightbox-original:hover { background: var(--gold); color: var(--plum-950); }
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid var(--gold-line); border-radius: 50%;
  background: rgba(27, 16, 31, 0.75);
  color: var(--gold);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: var(--gold); color: var(--plum-950);
}
.lightbox-close { top: calc(14px + var(--safe-t)); right: 14px; }
.lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-prev.is-hidden, .lightbox-next.is-hidden { display: none; }
@media (max-width: 560px) {
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox { padding: 12px; }
}

/* ── Forms (RSVP + injected guestbook share .form-control) ─────────────── */
form, .form-group { margin: 0; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  font: 500 15px/1.4 var(--font-sans);
  color: var(--cream);
  background: rgba(246, 236, 217, 0.07);
  border: 1px solid var(--gold-line);
  border-radius: 12px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.form-control::placeholder { color: rgba(246, 236, 217, 0.4); }
.form-control:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(246, 236, 217, 0.1);
  box-shadow: 0 0 0 3px rgba(230, 192, 105, 0.18);
}
textarea.form-control { resize: vertical; min-height: 64px; }
select.form-control {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e6c069' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}
select.form-control option { color: #2b1a31; background: #f6ecd9; }

.error {
  display: block;
  min-height: 1.1em;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--danger);
}

/* Attending = "No": gently dim the guest count (visual UX only — the
   platform still owns validation + submission). */
.form-group.is-dimmed {
  opacity: 0.45;
  filter: grayscale(0.5);
  transition: opacity 0.25s var(--ease), filter 0.25s var(--ease);
}

#submit-button {
  display: block; width: 100%;
  margin-top: 6px;
  padding: 14px 22px;
  font: 700 14px/1 var(--font-sans);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--plum-950);
  background: linear-gradient(135deg, #f2d692 0%, var(--gold) 55%, #d9a94e 100%);
  border: 0; border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 26px -12px rgba(230, 192, 105, 0.65);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}
#submit-button:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(230, 192, 105, 0.7); }
#submit-button:disabled { filter: grayscale(0.6) brightness(0.85); cursor: default; transform: none; }
.loading {
  text-align: center;
  margin-top: 12px;
  font-size: 13px; letter-spacing: 0.08em;
  color: var(--gold);
}
.rsvp-hint {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px; line-height: 1.55;
  color: var(--cream-dim);
}

/* ── Guestbook: injected platform markup (style via its own selectors) ─── */
#guestbookForm { margin-bottom: 8px; }
.guestbook-body { padding-bottom: 4px; }
#guestbookForm .form-group { margin-bottom: 14px; }
#guestbookForm .form-control { margin-bottom: 0; }
.guestbook-chapta { margin: 4px 0 12px; }
.guestbook-chapta > div { margin-inline: auto; }

#comments-container.guestbook-wrap {
  margin-top: 26px;
  border-top: 1px solid var(--gold-line);
  padding-top: 8px;
}
.guestbook-entry {
  padding: 16px 2px;
  border-bottom: 1px solid rgba(230, 192, 105, 0.16);
}
.guestbook-entry:last-child { border-bottom: 0; }
.guestbook-entry h5 {
  margin: 0 0 4px;
  font-family: var(--font-display); font-weight: 900;
  font-size: 16px; color: var(--gold);
}
.guestbook-entry p { margin: 0 0 4px; font-size: 14.5px; line-height: 1.6; color: var(--cream); overflow-wrap: anywhere; }
.guestbook-entry small { font-size: 11px; letter-spacing: 0.08em; color: var(--cream-dim); }

.more-guestbook-wrap { text-align: center; margin-top: 16px; }
#load-more {
  padding: 10px 24px;
  font: 700 12px/1 var(--font-sans); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold);
  background: transparent;
  border: 1px solid var(--gold-line); border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
#load-more:hover { background: var(--gold); color: var(--plum-950); }
.loading-guestbook {
  text-align: center; margin: 10px 0;
  font-size: 13px; color: var(--gold);
}

/* Injected guestbook "Send message" button. The platform's markup uses
   Bootstrap-ish utility classes (.btn .badge-pill .bg-kundangan .d-flex
   .mx-auto) that this template does not ship, so without these scoped rules
   the submit button would render as a bare inline element. Restyle it to the
   template's gold pill so the injected form matches the RSVP design. */
#guestbookForm .d-flex { display: flex; justify-content: center; }
#guestbookForm .btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 6px;
  padding: 13px 30px;
  font: 700 13px/1 var(--font-sans); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--plum-950);
  background: linear-gradient(135deg, #f2d692 0%, var(--gold) 55%, #d9a94e 100%);
  border: 0; border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 26px -12px rgba(230, 192, 105, 0.65);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), filter 0.2s var(--ease);
}
#guestbookForm .btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -12px rgba(230, 192, 105, 0.7); }
#guestbookForm .btn:disabled { filter: grayscale(0.6) brightness(0.85); cursor: default; transform: none; }
#guestbookForm .btn .ph { font-size: 16px; }

/* ── Motion preferences ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .poster-rays { animation: none; opacity: 0.5; }
  .spark { animation: none; opacity: 0.7; transform: scale(0.9); }
  .info-tile:hover, #submit-button:hover, .head-print:hover, .cal-btn:hover { transform: none; }
  .lightbox img { transition: none; }
}

/* ── Print: full stacked flyer ─────────────────────────────────────────── */
@media print {
  @page { margin: 12mm; }
  html.js body { padding-bottom: 0; }
  .app { background: none; }
  .site-head, .dock, .menu-sheet, .menu-backdrop, .head-progress,
  .js-print, .lightbox, .film-theater, .poster-photo-open, .cal-row { display: none !important; }
  /* Empty-state hiding and cover-fit trimming are visual only — print
     restores everything (§ empty-state audit). */
  .is-empty, .fit-hidden { display: revert !important; }
  .powered-by { background: none; border-color: #ddd; color: #666; }
  .powered-by a { color: #2b1a31; }
  .js .panel-cover { height: auto; min-height: 0; padding: 0; }
  .js .scene { min-height: 0; display: block; }
  .poster { min-height: 88vh; border: 1px solid rgba(230, 192, 105, 0.4); border-radius: var(--radius); }
  .poster-inner { overflow: visible; max-height: none; }
  .js .panel, .rsvp-wrap, .guestbook-section { break-before: page; }
  .panel-cover { break-before: auto; }
  .panel[data-panel="cover"] { break-before: auto; }
  .story-item, .gallery-item, .free-block, .info-tile { break-inside: avoid; }
  .story-item { grid-template-columns: 1fr; }
  .story-item:nth-child(even) .story-figure { order: 0; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .panel-inner { max-width: none; }
  .form-control, #submit-button { border-width: 1px; }
  body { background: #fff; color: #222; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; }
}

/* ── Small screens: compact chrome ─────────────────────────────────────── */
@media (max-width: 380px) {
  .dock { padding: 5px 6px; gap: 1px; bottom: calc(8px + var(--safe-b)); }
  .dock button { min-width: 26px; width: 30px; height: 34px; }
  .dock button svg { width: 15px; height: 15px; }
  .info-grid { gap: 8px; }
  .info-tile { padding: 12px; }
  .gallery-grid { gap: 8px; }
  .gallery-cap { font-size: 10px; letter-spacing: 0.12em; }
  .menu-item { letter-spacing: 0.1em; }
}

/* Wider screens: denser 3-up gallery (photos still open full-screen). */
@media (min-width: 720px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
