/* ═══════════════════════════════════════════════════════════════════════════
   bazaar-market-day-flyer-sunny-stalls — "Market Day · Sunny Stalls" (Bazaar · Flyer)
   Retro sun-drenched market fair · cream + terracotta + mustard + teal + navy.

   House UX: natural scrolling. Sections are full-viewport "scenes" stacked in
   normal document flow — no app shell, no wheel/touch hijacking. The poster
   rhythm comes from full-colour scene blocks (cream · blush · navy · mustard
   · sun · cream · teal) butting against each other with zero gaps. A fixed
   header (desktop section pills · mobile burger sheet), a floating dock and
   a scroll-spy are added by main.js; all of that chrome is sized from the
   --header-h / --dock-h tokens so nothing ever drifts.
   ────────────────────────────────────────────────────────────────────────────
   Conventions:
     · Geometry flows from tokens: --header-h locks the header height; the
       cover cap and every anchor offset derive from it.
     · Without JS the document reads as a plain stacked page; the dock,
       burger, pills and progress bar simply don't appear.
     · prefers-reduced-motion and @media print are supported. Print restores
       everything the empty-state audit visually hid (.is-empty) and every
       cover-fit trim (.fit-hidden).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
  --paper:        #fdf1dd;   /* cream market paper */
  --paper-deep:   #f7e3bd;
  --card-white:   #fffdf6;
  --ink:          #43302b;   /* warm brown text */
  --ink-soft:     #7a6157;
  --terra:        #e76f51;   /* terracotta */
  --terra-deep:   #c85237;
  --mustard:      #f4a259;
  --sun:          #ffd166;
  --teal:         #2a9d8f;
  --teal-deep:    #1e7a6f;
  --navy:         #264653;
  --navy-soft:    #33586b;
  --blush:        #fbe0cf;
  --danger:       #b5342a;
  --line-dark:    rgba(67, 48, 43, .18);
  --line-light:   rgba(253, 241, 221, .22);
  --radius:       18px;
  --font-display: "Fugaz One", "Arial Black", Impact, sans-serif;
  --font-hand:    "Caveat", "Segoe Script", cursive;
  --font-body:    "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Geometry tokens — the header height is LOCKED here and enforced on the
     real header below; the cover cap and anchor offsets derive from it. */
  --header-h: calc(56px + env(safe-area-inset-top, 0px));
  --dock-h: 62px;

  /* Cover sizing unit: fluid with the viewport's smaller edge but FROZEN
     once that edge passes ~700px, so mid-size phones stop scaling and never
     lose cover content. */
  --csu: min(1vmin, 7px);

  --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);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth; /* anchor jumps glide; reduced-motion turns it off */
  /* Anchor/deep-link jumps land their target just below the fixed header. */
  scroll-padding-top: calc(var(--header-h) + 10px);
}

body {
  margin: 0;
  padding-top: var(--header-h); /* clear the fixed header */
  font: 16px/1.65 var(--font-body);
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; vertical-align: middle; }
button { font: inherit; }

/* The hidden attribute must always win over author display rules (e.g. the
   .btn / .film-external / anything hidden via the attribute). */
[hidden] { display: none !important; }

/* Empty-state audit utility: visually hidden only — kept in the DOM and
   restored in print (see the @media print block at the end). */
.is-empty { display: none !important; }

/* Cover-fit trim utility: decorations hidden by initCoverFit() so the cover
   always fits one screen. Nothing is removed from the DOM; print restores. */
.fit-hidden { display: none !important; }

/* Last-resort squeeze when even the trimmed cover spills a few pixels:
   shave breathing room instead of letting content clip. */
.cover-squeeze .cover-inner { padding-top: 10px; padding-bottom: 10px; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
::selection { background: rgba(255, 209, 102, .5); }

.skip-link {
  position: fixed;
  top: calc(-60px + var(--safe-t));
  left: 12px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--terra);
  color: var(--paper);
  font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: var(--safe-t); }

/* Custom scrollbars wherever a region may internally scroll — on-palette:
   a slim terracotta-on-cream bar. (Firefox uses scrollbar-color.) */
.mobile-menu__scroller, .panel-cover, .topnav {
  scrollbar-width: thin;
  scrollbar-color: var(--mustard) transparent;
}
.mobile-menu__scroller::-webkit-scrollbar,
.panel-cover::-webkit-scrollbar,
.topnav::-webkit-scrollbar { width: 8px; height: 6px; }
.mobile-menu__scroller::-webkit-scrollbar-track,
.panel-cover::-webkit-scrollbar-track,
.topnav::-webkit-scrollbar-track { background: transparent; }
.mobile-menu__scroller::-webkit-scrollbar-thumb,
.panel-cover::-webkit-scrollbar-thumb,
.topnav::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--mustard), var(--terra));
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* ═════════════════════════════════════════════════════════════════════════
   SCENES — every section is its own full-viewport "scene" in normal flow.
   Tall content simply grows; the whole page scrolls natively. Scenes butt
   against each other with zero gaps (the colour blocking IS the design).
   ═════════════════════════════════════════════════════════════════════════ */
.panel {
  position: relative;
  /* Every section is a full-viewport "scene": taller ones simply grow;
     shorter ones breathe across the whole viewport, and late sections can
     always scroll far enough to land exactly below the header. */
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  flex-direction: column;
}

.panel-inner {
  width: 100%;
  max-width: 720px;
  margin: auto; /* vertical centre when slack */
  padding: clamp(40px, calc(var(--csu) * 8), 64px) clamp(20px, 4vw, 32px) clamp(48px, calc(var(--csu) * 9), 72px);
}
.panel-inner--wide { max-width: 960px; }

/* ── Scene themes (alternating for poster rhythm) ──────────────────────── */
.panel-cover   { background: var(--paper); }
.panel-stalls  { background: var(--blush); }
.panel-details { background: var(--navy); color: var(--paper); }
.panel-free    { background: var(--mustard); }
.panel-moments { background: var(--sun); }
.panel-rsvp    { background: var(--paper); }
.panel-guest   { background: var(--teal-deep); color: var(--paper); }

/* ═══════════════════════════ COVER — exactly one screen ═══════════════════
   Capped below the header, vertically centred, fully visible at load.
   Internal scroll is a last-resort valve for extreme viewports only. */
.panel-cover {
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;   /* safety valve for extreme viewports / huge type */
  overflow-x: hidden;
}

.cover-inner {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: auto; /* keeps the composition centred when the valve scrolls */
  padding: calc(30px + var(--safe-t)) 24px 44px;
  text-align: center;
}

/* Striped stall awnings pinned to the scene edges — decorative, so they
   never eat into the one-screen cap. */
.awning {
  position: absolute;
  left: 0; right: 0;
  height: 26px;
  z-index: 2;
  pointer-events: none;
}
.awning-top { top: 0; }
.awning-bottom { bottom: 0; }
.awning-terra { background: repeating-linear-gradient(90deg, var(--terra) 0 26px, var(--paper) 26px 52px); }
.awning-teal  { background: repeating-linear-gradient(90deg, var(--teal) 0 26px, var(--paper) 26px 52px); }

/* Hanging scalloped edge under the awning (paper semicircles over the colour) */
.awning-scallop {
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 13px;
  background-size: 26px 13px;
  background-repeat: repeat-x;
}
.scallop-terra {
  background-color: var(--terra);
  background-image: radial-gradient(circle at 13px 0, var(--paper) 0 13px, transparent 13.5px);
}
.scallop-teal {
  background-color: var(--teal);
  background-image: radial-gradient(circle at 13px 0, var(--paper) 0 13px, transparent 13.5px);
}

/* Pennant bunting (SVG in the markup) */
.bunting {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 0 auto;
  overflow: visible;
}
.bunting-string { stroke: rgba(67, 48, 43, .55); stroke-width: 1.6; }

/* Sunburst medallion behind the headline */
.sunburst {
  position: absolute;
  left: 50%;
  top: clamp(90px, 22%, 170px);
  width: min(64vw, calc(var(--csu) * 48));
  height: min(64vw, calc(var(--csu) * 48));
  transform: translateX(-50%);
  background: repeating-conic-gradient(from 0deg, var(--sun) 0deg 9deg, transparent 9deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 26%, transparent 66%);
  mask: radial-gradient(circle, #000 26%, transparent 66%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  /* Slow sun-shine: the rays drift around the medallion. The keyframes keep
     the translateX(-50%) centering from the base rule. */
  animation: sun-shine 48s linear infinite;
}
@keyframes sun-shine { to { transform: translateX(-50%) rotate(360deg); } }

/* ── Motifs: badges, ticket, ledger, stamp, bunting dots ───────────────── */

/* Sticker badges */
.badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 16px 0 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--paper);
  box-shadow: 0 3px 0 rgba(67, 48, 43, .18);
}
.badge::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  opacity: .9;
  box-shadow: inset 0 0 0 2px currentColor;
}
.badge-mustard { background: var(--mustard); color: var(--ink); }
.badge-teal    { background: var(--teal); }
.badge-navy    { background: var(--navy); }

/* Ticket-stub date band */
.ticket {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(100%, 460px);
  margin: 20px auto 0;
  padding: 13px 26px;
  background: var(--card-white);
  border: 2px dashed var(--ink-soft);
  border-radius: 14px;
  color: var(--teal-deep);
}
.ticket p {
  margin: 0;
  min-width: 0;
  text-align: left;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.ticket strong { color: var(--ink); }
.ticket-place { color: var(--ink-soft); font-size: 14px; }
/* punch-hole notches so it reads as a stub */
.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper);
  transform: translateY(-50%);
}
.ticket::before { left: -12px; }
.ticket::after  { right: -12px; }

/* Ledger rows (details) */
.ledger { margin: 28px 0 0; }
.ledger-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 2px;
  border-bottom: 2px dashed rgba(253, 241, 221, .24);
}
.ledger-row-last { border-bottom: 0; }
.ledger-row dt {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 118px;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--sun);
}
.ledger-row dt svg { color: var(--mustard); flex: 0 0 auto; }
.ledger-row dd { margin: 0; color: var(--paper); font-size: 15.5px; }
.dd-sub { color: rgba(253, 241, 221, .68); font-size: 14px; }

/* "Rain or shine" stamp */
.stamp-wrap { display: flex; justify-content: flex-end; margin-top: 8px; }
.stamp {
  width: 96px;
  height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-align: center;
  border: 3px solid var(--sun);
  border-radius: 50%;
  color: var(--sun);
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: .82;
  transform: rotate(9deg);
  overflow-wrap: anywhere;
}
.stamp span { max-width: 100%; }

/* Bunting-dot footer ornament */
.bunting-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sun);
  border: 2px solid var(--paper);
}

/* ── Typography ────────────────────────────────────────────────────────── */
.kicker {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.kicker-dark { color: var(--terra-deep); }
.kicker-deep { color: #a05a2c; }
.panel-cover .kicker { color: var(--teal-deep); }
.panel-details .kicker, .panel-guest .kicker { color: var(--sun); }
.panel-moments .kicker, .panel-free .kicker { color: var(--terra-deep); }

.cover-title {
  position: relative;
  z-index: 1;
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(54px, calc(var(--csu) * 15), 110px);
  line-height: .94;
  letter-spacing: .005em;
  color: var(--terra);
  text-shadow: 0 3px 0 rgba(67, 48, 43, .14), 0 7px 0 var(--paper-deep);
  overflow-wrap: anywhere;
}
.title-accent { color: var(--navy); }

.cover-hand {
  position: relative;
  z-index: 1;
  margin: 4px 0 0;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(26px, calc(var(--csu) * 4.8), 38px);
  color: var(--teal-deep);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, calc(var(--csu) * 6.4), 48px);
  line-height: 1.02;
  overflow-wrap: anywhere;
}
.panel-stalls .panel-title  { color: var(--terra-deep); }
.panel-details .panel-title { color: var(--paper); }
.panel-moments .panel-title { color: var(--ink); }
.panel-free .panel-title    { color: var(--ink); }
.panel-rsvp .panel-title    { color: var(--navy); }
.panel-guest .panel-title   { color: var(--paper); }

.panel-lead {
  margin: 12px 0 0;
  font-size: 16px;
  color: var(--ink-soft);
}
.panel-stalls .panel-lead { color: #8a5a4a; }
.panel-details .panel-lead { color: rgba(253, 241, 221, .78); }
.panel-moments .panel-lead { color: rgba(67, 48, 43, .75); }
.panel-free .panel-lead    { color: rgba(67, 48, 43, .8); }
.panel-guest .panel-lead   { color: rgba(253, 241, 221, .8); }

.hosted-by {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.org-name { color: var(--ink); font-weight: 800; }

.cover-footnote {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.cover-footnote::before { content: "☂ "; }

/* ── Personalized guest greeting (platform `name` global) ──────────────── */
.guest-greeting {
  position: relative;
  z-index: 1;
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: var(--terra-deep);
  letter-spacing: .02em;
}
.guest-greeting::before { content: "☀ "; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 800 15px/1 var(--font-body);
  letter-spacing: .04em;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.btn:active { transform: translateY(2px); }

.btn-primary {
  background: var(--terra);
  color: var(--paper);
  box-shadow: 0 5px 0 var(--terra-deep);
}
.btn-primary:hover { background: #f07b5e; }

.btn-ghost {
  background: var(--paper);
  color: var(--navy);
  border: 2px solid var(--navy);
}
.btn-ghost:hover { background: var(--blush); }

.btn-block { width: 100%; }

.cover-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.panel-foot { margin-top: 30px; text-align: center; }
.foot-hint { margin: 14px 0 0; font-size: 14px; }
.panel-moments .foot-hint { color: rgba(67, 48, 43, .65); }
.panel-details .foot-hint { color: rgba(253, 241, 221, .7); }
.panel-details .foot-hint strong { color: var(--sun); }

/* ── Add to Calendar (.ics export lives in main.js) ────────────────────── */
.calendar-cta {
  margin: clamp(18px, calc(var(--csu) * 3.4), 28px) auto 0;
  text-align: center;
}
.cal-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px;
  font: 800 13px/1 var(--font-body);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--navy);
  background: var(--sun);
  border: 2px solid var(--sun);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .28);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.cal-btn svg { width: 17px; height: 17px; }
.cal-btn:hover { background: #ffdd85; transform: translateY(-2px); }
.cal-btn:active { transform: translateY(0); }
.cal-btn:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
.cal-hint {
  margin: 10px 0 0;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: rgba(253, 241, 221, .68);
}

/* ── Stalls grid ───────────────────────────────────────────────────────── */
.stall-grid {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
@media (min-width: 560px) {
  .stall-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .stall-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.stall {
  background: var(--card-white);
  border: 2px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 4px 0 rgba(67, 48, 43, .08);
  transition: transform .15s ease;
}
.stall:hover { transform: translateY(-2px) rotate(-.4deg); }

.stall-emoji {
  display: inline-grid;
  place-items: center;
  /* The chip stays 46×46 for a real emoji, but grows (and wraps) when the
     editor value is text or a long string, so the card never clips it. */
  min-width: 46px;
  min-height: 46px;
  width: max-content;
  max-width: 100%;
  padding: 0 10px;
  font-size: 24px;
  border-radius: 14px;
  background: var(--blush);
  margin-bottom: 10px;
  overflow-wrap: anywhere;
  text-align: center;
}
.stall:nth-child(3n+2) .stall-emoji { background: #fdeecb; }
.stall:nth-child(3n+3) .stall-emoji { background: #d8efe8; }

.stall-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 900;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.stall-desc {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.bring-along {
  margin-top: 24px;
  background: var(--mustard);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 5px 0 rgba(67, 48, 43, .16);
}
.bring-along-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 19px;
  color: var(--ink);
}
.bring-along-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.bring-along-list li {
  position: relative;
  padding: 4px 0 4px 28px;
  font-size: 15px;
  color: var(--ink);
}
.bring-along-list li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  top: 4px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  color: var(--mustard);
  background: var(--ink);
  border-radius: 50%;
}

.note {
  margin: 20px 0 0;
  text-align: center;
  font-size: 14px;
  font-style: italic;
  color: #8a5a4a;
}
.note-deep { color: rgba(67, 48, 43, .62); }

/* ── Moments photo gallery ─────────────────────────────────────────────── */
.moments-grid {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
@media (min-width: 560px) {
  .moments-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .moments-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.moment { margin: 0; }
.moment figure { margin: 0; }

/* Each photo is a real button: tap to open the ORIGINAL image full-size in
   the lightbox (with zoom + pan). The chip hints at zoom; html.lb-off
   (MEDIA_LIGHTBOX = false) removes every trace of it. */
.moment-open {
  appearance: none;
  display: block;
  position: relative;
  width: 100%;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: zoom-in;
}
.moment-open:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.moment-photo {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--paper-deep); /* soft fallback if a photo is missing */
  border: 2px solid rgba(67, 48, 43, .18);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 rgba(67, 48, 43, .14);
}
.moment-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.moment:hover .moment-photo img { transform: scale(1.04); }

.moment-caption {
  margin: 10px 4px 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
}

/* Unified "view larger" chip — used by moments photos, the official flyer
   and free-page photos. Only rendered as an affordance while the lightbox
   feature is ON (html.lb-off hides it together with the zoom cursors). */
.media-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(253, 241, 221, .92);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 6px 12px;
  pointer-events: none;
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .4);
  transition: opacity .15s ease, transform .15s ease;
  opacity: 0;
  transform: translateY(4px);
}
@media (hover: hover) {
  .moment-open:hover .media-chip,
  .flyer-banner__open:hover .media-chip,
  .free-open:hover .media-chip { opacity: 1; transform: translateY(0); }
}
@media (hover: none) {
  .media-chip { opacity: 1; transform: none; }
}

/* ── Free page (optional "Note" scene; repeatable) ─────────────────────── */
.free-blocks {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 4vw, 26px);
  margin-top: 26px;
}
.free-block {
  background: var(--card-white);
  border: 2px solid rgba(67, 48, 43, .18);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 rgba(67, 48, 43, .16);
  padding: clamp(20px, 5vw, 32px);
  text-align: center;
}
.free-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(21px, 5vw, 27px);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.free-content {
  margin: 12px auto 0;
  max-width: 34em;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
  white-space: pre-line;
  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: 2px solid rgba(67, 48, 43, .18);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-deep);
  cursor: zoom-in;
  box-shadow: 0 5px 0 rgba(67, 48, 43, .14);
  transition: transform .15s ease, box-shadow .15s ease;
}
.free-open:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .5); }
.free-open:active { transform: translateY(0); }
.free-open:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.free-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-deep);
}
.free-cap {
  margin: 10px 0 0;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(18px, 4.5vw, 22px);
  color: var(--teal-deep);
  overflow-wrap: anywhere;
}

/* ── Optional official flyer / banner (Details scene) ──────────────────── */
.flyer-banner { margin: 30px 0 0; }
.flyer-banner__card { position: relative; margin: 0; }
.flyer-banner__open {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 2px solid rgba(253, 241, 221, .3);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-deep);
  cursor: zoom-in;
  box-shadow: 0 5px 0 rgba(0, 0, 0, .22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.flyer-banner__open:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .55); }
.flyer-banner__open:active { transform: translateY(0); }
.flyer-banner__open:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.flyer-banner__open img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9; /* banner-shaped: wide flyers and covers fit neatly */
  object-fit: cover;
  background: var(--paper-deep);
}
.flyer-banner__label {
  margin: 10px 0 0;
  text-align: center;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(20px, 5vw, 26px);
  color: var(--sun);
}

/* ── Optional video (Moments scene) — click to play, loads only then ───── */
.film-card { margin: 34px 0 0; text-align: center; }
.film-label {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(20px, 5vw, 24px);
  color: var(--ink);
}
.film-frame {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 14px auto 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-deep); /* mat behind the poster / while loading */
  border: 2px solid rgba(67, 48, 43, .18);
  box-shadow: 0 5px 0 rgba(67, 48, 43, .14);
}
.film-open {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  padding: 0; border: 0; background: none;
  cursor: pointer;
}
.film-open img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.film-open:hover img { transform: scale(1.04); }
.film-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(56px, 12vmin, 72px); height: clamp(56px, 12vmin, 72px);
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 209, 102, .95);
  color: var(--ink);
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5), 0 0 0 6px rgba(255, 209, 102, .35);
  animation: play-pulse 2.2s ease-in-out infinite;
}
.film-play svg { width: 30px; height: 30px; margin-left: 3px; }
@keyframes play-pulse {
  0%, 100% { box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5), 0 0 0 0 rgba(255, 209, 102, .45); }
  50% { box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5), 0 0 0 12px rgba(255, 209, 102, 0); }
}
.film-hint {
  position: absolute; left: 50%; bottom: 12px;
  transform: translateX(-50%);
  font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--paper);
  background: rgba(38, 70, 83, .7);
  padding: 6px 12px; border-radius: 999px;
  white-space: nowrap;
}
.film-external {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px; font-weight: 800;
  color: var(--teal-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.film-external:hover { color: var(--terra-deep); }
.film-note {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  margin: 0; padding: 20px;
  text-align: center;
  font-size: 14px; font-style: italic;
  color: var(--ink-soft);
}

/* ── Forms (RSVP) ──────────────────────────────────────────────────────── */
.rsvp-head, .guestbook-head { margin-bottom: 26px; }

.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 7px;
  letter-spacing: .02em;
}
.form-control {
  width: 100%;
  padding: 12px 14px;
  /* 16px so iOS Safari never auto-zooms the page while a field is focused */
  font: 600 16px/1.4 var(--font-body);
  color: var(--ink);
  background: var(--card-white);
  border: 2px solid #e0cba6;
  border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, .25);
}
select.form-control {
  appearance: none;
  -webkit-appearance: none;
  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='%2343302b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
  padding-right: 42px;
}
textarea.form-control { resize: vertical; }

.field-hint { display: block; margin-top: 6px; font-size: 13px; color: var(--ink-soft); }

.error {
  display: block;
  min-height: 1.2em;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 800;
  color: var(--danger);
}

.form-actions { margin-top: 24px; }

.loading {
  display: none;
  text-align: center;
  margin-top: 14px;
  font-size: 14px;
  color: var(--terra-deep);
  font-weight: 800;
}
.loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid rgba(232, 111, 81, .3);
  border-top-color: var(--terra);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* RSVP deadline countdown (platform fills the numbers when a deadline is set) */
.rsvp-countdown { margin: 0 0 28px; text-align: center; }
.countdown-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terra-deep);
}
.countdown-boxes { display: flex; justify-content: center; gap: 10px; }
.count-box {
  flex: 0 0 68px;
  background: var(--navy);
  color: var(--paper);
  border-radius: 12px;
  padding: 10px 4px;
}
.count-box span {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
}
.count-box small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(253, 241, 221, .72);
}

/* "Thank you" / "RSVP closed" state — the platform swaps this into #rsvp-form */
.thank-you-message h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 26px;
  color: var(--terra-deep);
}
.thank-you-message p { margin: 4px 0; color: var(--ink-soft); }
.thank-you-message small { color: var(--ink-soft); }

/* ── Guestbook (platform injects the markup into .guestbook-body) ──────── */
.guestbook-body form,
.guestbook-body #guestbookForm {
  background: rgba(253, 241, 221, .08);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 22px;
}
.guestbook-body label { color: var(--paper); font-weight: 800; font-size: 14px; }
.guestbook-body .form-control {
  background: var(--paper);
  border-color: transparent;
  color: var(--ink);
}
.guestbook-body .form-control:focus { border-color: var(--sun); box-shadow: 0 0 0 3px rgba(255, 209, 102, .3); }
.guestbook-body .error { color: #ffd6cf; }
.guestbook-body button[type="submit"] {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 800 15px/1 var(--font-body);
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--sun);
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .18);
}
.guestbook-body button[type="submit"]:hover { background: #ffdd85; }

.guestbook-chapta { margin: 12px 0; }

.guestbook-wrap {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}
.guestbook-entry {
  background: rgba(253, 241, 221, .08);
  border: 1px solid var(--line-light);
  border-radius: 14px;
  padding: 14px 16px;
}
.guestbook-entry h5 { margin: 0 0 3px; font-size: 15px; color: var(--sun); }
.guestbook-entry p { margin: 0 0 3px; font-size: 15px; color: var(--paper); }
.guestbook-entry small { font-size: 12px; color: rgba(253, 241, 221, .6); }

.loading-guestbook {
  text-align: center;
  margin: 14px 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--sun);
}

.more-guestbook-wrap { text-align: center; margin-top: 16px; }
.more-guestbook-wrap #load-more {
  font: 800 14px/1 var(--font-body);
  color: var(--paper);
  background: transparent;
  border: 2px solid var(--sun);
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
}
.more-guestbook-wrap #load-more:hover { background: rgba(255, 209, 102, .15); }

/* Injected guestbook submit buttons sometimes arrive with platform utility
   classes this template doesn't ship — restyle them to the sun pill. */
#guestbookForm .d-flex { display: flex; justify-content: center; }
#guestbookForm .btn {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 8px;
  padding: 12px 26px;
  font: 800 14px/1 var(--font-body);
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink);
  background: var(--sun);
  border: 0; border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .18);
}
#guestbookForm .btn:hover { background: #ffdd85; }
#guestbookForm .btn .ph { font-size: 16px; }

/* ── Footer + powered-by (end of document, plain flow) ─────────────────── */
.site-foot {
  background: var(--paper);
  border-top: 2px dashed rgba(67, 48, 43, .12);
  padding: 26px 18px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.site-foot p { margin: 0; }
.footer-brand { margin: 0; font-weight: 800; }

.powered-by {
  background: var(--paper);
  text-align: center;
  padding: 10px 16px calc(14px + var(--safe-b));
}
.powered-by p {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.powered-by span { color: var(--teal-deep); }
/* Reserve room for the floating dock, so end-of-page content is never
   covered by fixed chrome. */
body.has-dock .powered-by { padding-bottom: calc(var(--dock-h) + 26px + var(--safe-b)); }

/* ═════════════════════════════════════════════════════════════════════════
   FIXED HEADER — brand · desktop section pills · print · burger.
   Height is LOCKED to --header-h (token above); the cover cap and every
   anchor offset derive from it. Chrome appears only with JS (html.js).
   ═════════════════════════════════════════════════════════════════════════ */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--header-h);            /* LOCKED to the token … */
  padding: var(--safe-t) clamp(14px, 3vw, 28px) 0; /* … safe area included */
  border-bottom: 1px solid transparent;
  transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.app-header.is-scrolled {
  background: rgba(253, 241, 221, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line-dark);
  box-shadow: 0 12px 30px -22px rgba(67, 48, 43, .55);
}

.head-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
/* Tiny striped awning chip as the brand mark */
.head-mark {
  flex: 0 0 auto;
  width: 26px; height: 20px;
  border-radius: 4px 4px 8px 8px;
  background:
    radial-gradient(circle at 6.5px 100%, var(--paper) 0 5.5px, transparent 6px),
    repeating-linear-gradient(90deg, var(--terra) 0 6.5px, var(--paper) 6.5px 13px);
  background-color: var(--terra);
  box-shadow: inset 0 -3px 0 rgba(67, 48, 43, .18);
}
.head-title {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: .02em;
  color: var(--terra-deep);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Desktop section pills — built by main.js from the live DOM */
.topnav { display: none; }

.head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.head-btn {
  display: none;
  align-items: center; gap: 6px;
  border: 2px solid var(--line-dark); border-radius: 999px;
  background: var(--card-white); color: var(--navy);
  font-size: 12px; font-weight: 800; letter-spacing: .06em;
  padding: 7px 14px; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
html.js .head-btn { display: inline-flex; }
.head-btn svg { width: 15px; height: 15px; }
.head-btn:hover { background: var(--navy); border-color: var(--navy); color: var(--paper); }

/* Burger — mobile JS chrome only (hidden without JS, hidden on desktop) */
.nav-burger { display: none; }
.nav-burger {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  width: 42px; height: 40px;
  padding: 9px 10px;
  border: 2px solid var(--line-dark);
  border-radius: 10px;
  background: var(--card-white);
  color: var(--navy);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.burger-bar {
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .3s ease, opacity .3s ease;
}
html.js .nav-burger { display: inline-flex; }
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] .burger-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.nav-burger:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* Scroll progress — a whisper-thin terracotta line filling along the
   header's bottom edge as guests read. JS chrome: never shown without JS. */
.scroll-progress {
  display: none;
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 3px;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--terra), var(--mustard) 55%, var(--sun));
  pointer-events: none;
}
html.js .scroll-progress { display: block; }

/* Desktop nav pills (≥960px): labelled buttons, active follows the spy */
@media (min-width: 960px) {
  .topnav {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .nav-burger, html.js .nav-burger { display: none; }
}
.nav-pill {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font: 800 11.5px/1 var(--font-body);
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.nav-pill svg { width: 14px; height: 14px; flex: none; }
.nav-pill:hover { color: var(--terra-deep); background: rgba(231, 111, 81, .12); }
.nav-pill.is-active {
  background: var(--terra);
  color: var(--paper);
  box-shadow: 0 3px 0 var(--terra-deep);
}
.nav-pill:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
@media (max-width: 1120px) {
  .nav-pill svg { display: none; } /* text-only pills on narrower desktops */
}

/* ── Mobile menu: slide-down sheet over a dimmed backdrop (<960px) ─────── */
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(38, 70, 83, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.menu-backdrop.is-open { opacity: 1; pointer-events: auto; }

.mobile-menu {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  z-index: 96;
  background: var(--paper);
  border-bottom: 2px dashed var(--line-dark);
  box-shadow: 0 30px 50px -28px rgba(67, 48, 43, .55);
  transform: translateY(-12px);
  opacity: 0;
  transition: transform .28s ease, opacity .28s ease;
}
.mobile-menu.is-open { transform: translateY(0); opacity: 1; }
.mobile-menu__scroller {
  max-height: min(62vh, 440px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px clamp(14px, 4vw, 24px) calc(14px + var(--safe-b));
}
.mobile-menu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: 800 14px/1.2 var(--font-body);
  letter-spacing: .04em;
  text-align: left;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.menu-row svg { width: 18px; height: 18px; flex: none; color: var(--terra); }
.menu-row .menu-num {
  margin-left: auto;
  font-size: 10px; font-weight: 800; letter-spacing: .18em;
  color: var(--ink-soft);
}
.menu-row:hover { background: var(--blush); border-color: var(--line-dark); }
.menu-row.is-current {
  background: var(--terra);
  border-color: var(--terra-deep);
  color: var(--paper);
  box-shadow: 0 3px 0 var(--terra-deep);
}
.menu-row.is-current svg { color: var(--sun); }
.menu-row.is-current .menu-num { color: rgba(253, 241, 221, .8); }
.menu-row:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

/* ═════════════════════════════════════════════════════════════════════════
   DOCK — floating market-stall pill with icon shortcuts; built by main.js
   from the sections that exist, so deleted sections lose their entry.
   Horizontally scrollable (hidden scrollbar) if there are many pages.
   Sized so seven entries fit a 390px viewport.
   ═════════════════════════════════════════════════════════════════════════ */
.dock {
  position: fixed;
  left: 50%;
  bottom: calc(12px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 85;
  display: flex;
  align-items: stretch;
  gap: 1px;
  max-width: calc(100vw - 20px);
  padding: 5px 6px;
  background: rgba(255, 253, 246, .94);
  border: 2px solid var(--line-dark);
  border-radius: 18px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow:
    0 22px 44px -22px rgba(67, 48, 43, .55),
    inset 0 1px 0 rgba(255, 255, 255, .65);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.dock::-webkit-scrollbar { display: none; }
body:not(.has-dock) .dock { display: none; }
.dock button {
  appearance: none;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 47px;
  height: 48px;
  padding: 5px 5px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color .22s ease, background-color .22s ease, transform .22s ease;
  -webkit-tap-highlight-color: transparent;
}
.dock button svg { width: 19px; height: 19px; flex: none; }
.dock button:hover { color: var(--terra-deep); background: var(--blush); }
.dock button:active { transform: scale(.94); }
.dock button:focus-visible { outline: 3px solid var(--teal); outline-offset: -1px; }
.dock button.is-current {
  color: var(--paper);
  background: var(--terra);
  box-shadow: 0 3px 0 var(--terra-deep);
}
.dock__label {
  font-family: var(--font-body);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ═════════════════════════════════════════════════════════════════════════
   TOAST — quiet confirmations (Add to Calendar, …)
   ═════════════════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-b));
  transform: translateX(-50%) translateY(14px);
  z-index: 150;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--navy);
  color: var(--paper);
  font-size: 12px; font-weight: 800; letter-spacing: .08em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═════════════════════════════════════════════════════════════════════════
   LIGHTBOX — click-to-open originals with zoom & pan.
   Every content photo AND the film open here: images zoom (wheel, pinch,
   double-tap, ±) and pan while zoomed; videos play as an embed or native
   player with an "open original" link. Closes via Escape / backdrop / ×.
   Markup is built by main.js only when clickable media exists.
   ═════════════════════════════════════════════════════════════════════════ */

/* With the feature OFF (window.MEDIA_LIGHTBOX = false → html.lb-off) media
   renders inline only: no zoom cursors, no chips, no click affordances. */
html.lb-off .moment-open,
html.lb-off .flyer-banner__open,
html.lb-off .free-open { cursor: default; }
html.lb-off .media-chip { display: none; }

.lightbox {
  position: fixed; inset: 0;
  z-index: 200;
  display: flex;
  align-items: center; justify-content: center;
  padding: calc(16px + var(--safe-t)) 16px calc(16px + var(--safe-b));
  background: rgba(38, 70, 83, .93);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: lightbox-in .18s ease;
}
.lightbox[hidden] { display: none; }
body.lb-open { overflow: hidden; } /* lock the document behind the open viewer */
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox-stage {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: lb-zoom-in .28s ease;
}
@keyframes lb-zoom-in {
  from { transform: scale(.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lightbox-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  touch-action: none;
  overflow: hidden;
  border-radius: var(--radius);
}
.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 72vh; max-height: 72dvh;
  width: auto; height: auto;
  border: 6px solid var(--card-white);
  border-radius: 12px;
  background: var(--paper-deep); /* mat while loading / if the file is missing */
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .75);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform;
  transition: transform .18s ease;
}
.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-video {
  width: min(880px, 92vw);
  aspect-ratio: 16 / 9;
  max-height: 72vh; max-height: 72dvh;
}
.lightbox-video iframe,
.lightbox-video video {
  width: 100%; height: 100%;
  border: 0;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .85);
}
.lightbox-caption {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #f7ead9;
  text-align: center;
  overflow-wrap: anywhere;
}
.lightbox-counter {
  position: absolute;
  top: calc(12px + var(--safe-t));
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 12px; font-weight: 800;
  color: var(--paper);
  background: rgba(38, 70, 83, .65);
  padding: 4px 10px;
  border-radius: 999px;
}
.lb-btn {
  position: absolute;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(253, 241, 221, .5);
  background: rgba(255, 253, 246, .94);
  color: var(--terra-deep);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6);
  transition: transform .2s ease, background-color .2s ease;
}
.lb-btn svg { width: 20px; height: 20px; }
.lb-btn:hover { transform: scale(1.06); background: #fff; }
.lb-close { top: calc(12px + var(--safe-t)); right: calc(12px + var(--safe-r)); }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-prev:hover, .lb-next:hover { transform: translateY(-50%) scale(1.06); }

/* Zoom tools + "open original" link (images) */
.lightbox-tools {
  position: absolute;
  left: calc(12px + var(--safe-l));
  bottom: calc(12px + var(--safe-b));
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lightbox-tools[hidden] { display: none; }
.lb-tool {
  min-width: 42px; height: 42px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(253, 241, 221, .5);
  background: rgba(255, 253, 246, .94);
  color: var(--terra-deep);
  font: 800 12px/1 var(--font-body);
  letter-spacing: .04em;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  transition: transform .2s ease, background-color .2s ease;
}
.lb-tool svg { width: 17px; height: 17px; }
.lb-tool:hover { transform: scale(1.05); background: #fff; }
.lb-tool[disabled] { opacity: .4; cursor: default; }
.lb-original {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(253, 241, 221, .5);
  background: rgba(255, 253, 246, .94);
  color: var(--terra-deep);
  font: 800 11px/1 var(--font-body);
  letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none;
}
.lb-original:hover { background: #fff; }
.lightbox-original-row {
  position: absolute;
  right: calc(12px + var(--safe-r));
  bottom: calc(12px + var(--safe-b));
  z-index: 3;
}
.lightbox-original-row[hidden] { display: none; }

.lightbox :focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* Narrow screens: prev/next drop below the photo so they never cover it. */
@media (max-width: 520px) {
  .lightbox { padding-left: 10px; padding-right: 10px; }
  .lightbox-img { max-height: 58vh; max-height: 58dvh; }
  .lightbox-video { width: 94vw; max-height: 58vh; max-height: 58dvh; }
  .lb-prev, .lb-next { position: static; transform: none; width: 42px; height: 42px; }
  .lb-prev:hover, .lb-next:hover { transform: scale(1.06); }
  .lightbox-stage { gap: 10px; justify-content: center; }
  .lightbox-tools { left: 8px; bottom: calc(8px + var(--safe-b)); }
  .lightbox-original-row { right: 8px; bottom: calc(8px + var(--safe-b)); }
  .lightbox-counter { top: calc(8px + var(--safe-t)); }
}

/* ── Motion preferences ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
  .loading::before { animation: none; }
  .stall:hover { transform: none; }
  .moment:hover .moment-photo img, .film-open:hover img { transform: none; }
  .film-play { animation: none; }
  .sunburst { animation: none; }
}

/* ── Print: the full stacked invitation, everything restored ───────────── */
@media print {
  @page { margin: 12mm; }
  body { padding-top: 0; background: #fff; color: #222; }
  .app-header, .dock, .mobile-menu, .menu-backdrop, .scroll-progress,
  .head-actions, .skip-link, .toast, .powered-by, .lightbox,
  .cover-actions, .panel-foot, .calendar-cta { display: none !important; }
  .panel { display: block !important; min-height: 0 !important; max-height: none !important;
           overflow: visible !important; break-before: page; padding: 0 0 24px; }
  .panel-cover { break-before: auto; }
  .awning { position: static; margin: 0 0 10px; }
  .panel-inner { max-width: none; margin: 0; padding: 0; }
  .site-foot { border-top: 0; }
  /* The empty-state audit and the cover-fit trim only ever VISUALLY hid
     things: print restores everything. */
  .is-empty, .fit-hidden, .guest-greeting[hidden] { display: revert !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a[href]::after { content: ""; }
}

/* ── Small screens ─────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .head-btn span { display: none; } /* icon-only print button on phones */
  .ticket { padding: 12px 18px; gap: 10px; }
  .ledger-row dt { min-width: 96px; }
  .cover-inner { padding-left: 18px; padding-right: 18px; }
}
