/* ═════════════════════════════════════════════════════════════════════════
   THE BIG NOTE · Greeting-Card Flyer (bulletin-board note poster)
   Mood: a giant handwritten letter pinned to a soft cork board — cream note
   paper, warm ink, terracotta + mustard + sage washi tape, pushpins, and a
   clothesline of little postcards overhead. Deck: 100dvh shell, one active
   panel scrolls, a washi-tape tab bar with text labels navigates, and a
   built-in lightbox opens every photo full-size with zoom.
   ═════════════════════════════════════════════════════════════════════════ */

/* ── 1 · Design tokens ─────────────────────────────────────────────────── */
:root {
  /* the board (warm cork / burlap) */
  --board:        #d9c49b;
  --board-deep:   #c7af83;
  --board-darker: #b69b6d;
  --frame:        #a5825a;
  --frame-deep:   #8d6d48;

  /* note paper & ink */
  --paper:        #fdf8ec;
  --paper-2:      #f7efdc;
  --paper-3:      #ede1c7;
  --ink:          #3a3229;
  --ink-soft:     rgba(58, 50, 41, .78);
  --ink-muted:    rgba(58, 50, 41, .56);
  --ink-faint:    rgba(58, 50, 41, .32);
  --line:         rgba(58, 50, 41, .3);
  --line-soft:    rgba(58, 50, 41, .16);

  /* stationery accents */
  --terra:        #c46a4a;
  --terra-deep:   #a65338;
  --terra-soft:   #d98a6d;
  --mustard:      #d9a441;
  --mustard-deep: #b07f22;
  --sage:         #8aa58a;
  --sage-deep:    #6d8a70;
  --rose:         #c4788a;

  /* tape shades (translucent so the paper shows through) */
  --tape-sage:    rgba(138, 165, 138, .5);
  --tape-mustard: rgba(217, 164, 65, .45);
  --tape-rose:    rgba(196, 120, 138, .42);

  --danger:       #b03a2e;
  --ok:           #5f7f63;

  --font-hand:   "Caveat", "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;
  --font-script: "Great Vibes", "Segoe Script", "Brush Script MT", cursive;
  --font-serif:  "Lora", Georgia, "Times New Roman", serif;
  --font-mono:   "Courier Prime", "Courier New", monospace;

  --radius: 12px;
  --ease-out: cubic-bezier(.22, .8, .24, 1);
  --shadow-note: 0 22px 60px rgba(74, 56, 30, .35), 0 3px 10px rgba(74, 56, 30, .18);
  --shadow-sheet: 0 18px 50px rgba(74, 56, 30, .28), 0 2px 8px rgba(74, 56, 30, .14);
}

/* ── 2 · Reset & base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--ink);
  background: var(--board);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overscroll-behavior: none;
}

h1, h2, h3, p, dl, dd, figure { margin: 0; }

button { font-family: inherit; }

::selection { background: rgba(196, 106, 74, .28); color: var(--ink); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── 3 · Deck shell — 100dvh, only the active panel scrolls ───────────── */
.site {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--board);
}

.deck { position: absolute; inset: 0; }

.panel {
  position: absolute;
  inset: 0;
  overflow: hidden;                    /* inactive panels do not scroll */
  opacity: 0;
  visibility: hidden;
  transform: scale(.99) translateY(12px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out), visibility 0s linear .5s;
  pointer-events: none;
}

.panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
  pointer-events: auto;
  overflow-y: auto;                    /* ← only the active panel scrolls */
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--frame-deep) transparent;
}

.panel.is-active::-webkit-scrollbar { width: 8px; }
.panel.is-active::-webkit-scrollbar-thumb { background: var(--frame-deep); border-radius: 8px; }
.panel.is-active::-webkit-scrollbar-track { background: transparent; }

.panel-scroll {
  max-width: 700px;
  margin: 0 auto;
  /* generous bottom padding so content clears the fixed tab bar + credit line */
  padding: clamp(48px, 9vh, 88px) clamp(18px, 5vw, 36px) clamp(132px, 18vh, 160px);
}

/* ── 4 · Section tabs (a washi-tape bar with text labels + icons) ──────
   Built by main.js from the panels that actually exist — a stripped RSVP /
   guestbook or a deleted media panel disappears from the bar, never a dead
   link. Hidden entirely without JS (no-JS keeps a normal scrolling page).
   The bar lives in a fixed bottom shell with a full-width credit line
   (.powered-by) beneath it, and prev/next arrows overlay the bar when it
   overflows. */
.shell-foot { display: none; }

html.js .shell-foot {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
}

.shell-nav-row { position: relative; display: flex; align-items: center; }

.shell-nav { display: none; }

html.js .shell-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  padding: 10px calc(12px + env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
  background: linear-gradient(180deg, var(--tape-sage) 0%, rgba(138, 165, 138, .86) 100%);
  border-top: 1px solid rgba(255, 255, 255, .4);
  box-shadow: 0 -8px 24px rgba(74, 56, 30, .3);
  /* more tabs than fit: scroll sideways instead of clipping; "safe center"
     keeps the row centered when it fits and left-aligned when it doesn't */
  justify-content: safe center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

html.js .shell-nav::-webkit-scrollbar { display: none; }

/* prev/next arrows: overlay the bar's edges and appear only when it
   overflows (main.js toggles .is-scrollable on .shell-foot); disabled at
   the ends so guests always know which way more sections are */
.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1.5px solid rgba(58, 50, 41, .3);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(74, 56, 30, .3);
  transition: opacity .18s, background .18s, color .18s;
}

.shell-foot.is-scrollable .nav-arrow { display: inline-flex; }

.nav-arrow:hover:not(:disabled) { background: var(--terra); color: #fff8ec; }

.nav-arrow:disabled { opacity: .4; cursor: default; }

.nav-arrow:focus-visible { outline: 3px solid rgba(196, 106, 74, .55); outline-offset: 2px; }

.nav-arrow--prev { left: calc(8px + env(safe-area-inset-left)); }
.nav-arrow--next { right: calc(8px + env(safe-area-inset-right)); }

/* full-width platform credit line (exact class 'powered-by') — the app
   name inside is renamed at render by the engine */
.powered-by {
  width: 100%;
  padding: 5px 14px calc(5px + env(safe-area-inset-bottom));
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .35);
  background: rgba(138, 165, 138, .9);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(58, 50, 41, .58);
}

.powered-by a { color: var(--terra-deep); text-decoration: none; }

.powered-by a:hover { text-decoration: underline; }

/* gentle edge fades hint that more sections are reachable by swiping;
   main.js toggles .is-scrollable only when the bar actually overflows */
html.js .shell-nav.is-scrollable::before,
html.js .shell-nav.is-scrollable::after {
  content: "";
  position: absolute;
  top: 8px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  width: 36px;
  z-index: 2;
  pointer-events: none;
}
html.js .shell-nav.is-scrollable::before {
  left: 0;
  background: linear-gradient(90deg, rgba(138, 165, 138, .95), transparent);
}
html.js .shell-nav.is-scrollable::after {
  right: 0;
  background: linear-gradient(270deg, rgba(138, 165, 138, .95), transparent);
}

/* paper-tag tabs — handwritten labels, thumb-friendly */
.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 14px;
  border: 1.5px solid rgba(58, 50, 41, .3);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: .02em;
  line-height: 1.1;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(74, 56, 30, .22);
  scroll-snap-align: center;
  transition: transform .18s var(--ease-out), background .18s, color .18s, box-shadow .18s;
}

.nav-tab svg { width: 15px; height: 15px; flex: none; color: var(--terra-deep); }

.nav-tab:hover { transform: translateY(-2px) rotate(-.5deg); }

.nav-tab.is-current {
  background: var(--terra);
  border-color: var(--terra-deep);
  color: #fff8ec;
  box-shadow: 0 4px 0 var(--terra-deep), 0 6px 14px rgba(196, 106, 74, .5);
}

.nav-tab.is-current svg { color: #fff8ec; }

.nav-tab:focus-visible {
  outline: 3px solid rgba(196, 106, 74, .55);
  outline-offset: 2px;
}

/* ── 5 · Cover — the bulletin board ───────────────────────────────────── */
.board {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  background:
    radial-gradient(120% 90% at 50% 20%, rgba(255, 255, 255, .14), transparent 60%),
    var(--board);
  overflow: hidden;
}

/* wooden frame ring */
.board-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 16px var(--frame),
    inset 0 0 0 20px var(--frame-deep),
    inset 0 0 0 24px rgba(74, 56, 30, .18),
    inset 0 0 60px rgba(74, 56, 30, .4);
}

/* cork grain */
.board-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .5;
  background:
    repeating-linear-gradient(0deg, rgba(74, 56, 30, .05) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(74, 56, 30, .04) 0 1px, transparent 1px 4px),
    radial-gradient(rgba(74, 56, 30, .07) 1px, transparent 1.5px);
  background-size: auto, auto, 7px 7px;
}

/* clothesline of postcards */
.clothesline {
  position: absolute;
  top: clamp(26px, 5vh, 46px);
  left: 6%;
  right: 6%;
  height: 40px;
  z-index: 1;
  pointer-events: none;
}

.clothesline .line {
  position: absolute;
  top: 6px;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 3px;
  background: rgba(74, 56, 30, .5);
  transform: rotate(-1deg);
}

.pegcard {
  position: absolute;
  top: 4px;
  width: 44px;
  height: 30px;
  border-radius: 2px;
  box-shadow: 0 6px 12px rgba(74, 56, 30, .3);
  transform-origin: 50% 0;
  animation: pegcard-sway 6s var(--ease-out) infinite alternate;
}

.pegcard::before {                    /* clothespin */
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 14px;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(90deg, #b98a5e, #9a6f46);
  box-shadow: 0 2px 3px rgba(74, 56, 30, .35);
}

.pegcard--one { left: 4%; background: linear-gradient(160deg, #e8d9bd, #cdb48c); transform: rotate(-4deg); }
.pegcard--two { left: 46%; width: 38px; background: linear-gradient(160deg, #d9c6e8, #b69ac9); transform: rotate(3deg); animation-delay: -2s; }
.pegcard--three { right: 4%; background: linear-gradient(160deg, #cfe3cf, #a8c4a8); transform: rotate(-2deg); animation-delay: -4s; }

@keyframes pegcard-sway {
  from { rotate: -4deg; }
  to   { rotate: 4deg; }
}

/* centered note + polaroid */
.board-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  place-items: center;
  /* bottom padding clears the fixed tab bar + credit line when the note overflows */
  padding: clamp(70px, 12vh, 120px) clamp(14px, 4vw, 40px) clamp(132px, 18vh, 160px);
}

/* ── 6 · The big note (the letter) ────────────────────────────────────── */
.big-note {
  position: relative;
  width: min(580px, 94vw);
  background:
    repeating-linear-gradient(0deg, rgba(58, 50, 41, .026) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-radius: 4px;
  box-shadow: var(--shadow-note);
  padding: clamp(26px, 4.5vh, 46px) clamp(24px, 5vw, 54px) clamp(22px, 4vh, 38px);
  transform: rotate(-1.2deg);
  color: var(--ink);
}

/* washi tape corners */
.tape {
  position: absolute;
  width: 110px;
  height: 30px;
  border-radius: 2px;
  opacity: .9;
  box-shadow: 0 3px 8px rgba(74, 56, 30, .22);
}

.tape--top-left {
  top: -13px;
  left: 12%;
  background: var(--tape-sage);
  transform: rotate(-7deg);
}

.tape--top-right {
  top: -13px;
  right: 12%;
  background: var(--tape-rose);
  transform: rotate(6deg);
}

.tape--bottom {
  bottom: -13px;
  left: 50%;
  width: 130px;
  transform: translateX(-50%) rotate(1deg);
  background: var(--tape-mustard);
}

/* pushpins */
.pin {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb28a, var(--terra) 45%, var(--terra-deep) 90%);
  box-shadow: 0 3px 4px rgba(74, 56, 30, .45), inset 0 -2px 3px rgba(0, 0, 0, .18);
}

.pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  transform: translateX(-50%);
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: linear-gradient(90deg, #e8d9c0, #bfa484);
  box-shadow: 0 1px 1px rgba(74, 56, 30, .4);
}

.pin--left { top: 22px; left: 16px; }
.pin--right { top: 22px; right: 16px; }

/* letterhead row */
.note-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(58, 50, 41, .16);
  margin-bottom: 18px;
}

.letterhead {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.letterhead-mark { color: var(--terra); font-size: 14px; }

.note-date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-muted);
  text-transform: uppercase;
}

/* the greeting */
.greeting {
  font-family: var(--font-script);
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.15;
  color: var(--terra);
  margin-bottom: 4px;
}

.greeting-name {
  white-space: nowrap;
  overflow-wrap: anywhere;
}

/* the headline — the message IS the design */
.headline {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(44px, 7.5vw, 68px);
  line-height: 1.04;
  letter-spacing: .005em;
  color: var(--ink);
  margin-bottom: 18px;
}

.headline .headline-line { display: block; }
.headline .headline-line:nth-child(even) { color: var(--terra); }

/* body copy */
.message p {
  font-size: clamp(16.5px, 2.2vw, 19px);
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

.message p:last-child { margin-bottom: 0; }

/* details — typed mail label */
.postscript {
  margin: 0 0 18px;
  border: 1.5px dashed rgba(58, 50, 41, .34);
  border-radius: 8px;
  background: rgba(255, 255, 255, .4);
  overflow: hidden;
}

.ps-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(58, 50, 41, .12);
}

.ps-row:last-child { border-bottom: 0; }

.ps-row dt {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terra-deep);
  padding-top: 3px;
}

.ps-row dd {
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
}

.ps-row dd small {
  display: inline;
  color: var(--ink-muted);
  font-size: 13px;
}

.map-link {
  display: inline-block;
  margin-left: 8px;
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--terra-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.map-link:hover { color: var(--ink); }

/* the map link ships hidden and only appears when the host supplies a
   Map URL (main.js un-hides it) — without this rule the author CSS
   display:inline-block would beat the UA's [hidden] and show a dead link */
.map-link[hidden] { display: none; }

/* P.S. line */
.ps-line {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: clamp(19px, 3vw, 23px);
  color: var(--ink-soft);
  margin-bottom: 16px;
}

/* signature */
.note-sign {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.sign-love {
  font-family: var(--font-script);
  font-size: 28px;
  color: var(--terra);
}

.sign-names {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 34px;
  line-height: 1.1;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.honoree-amp {
  font-family: var(--font-script);
  color: var(--terra);
  font-size: .85em;
  padding: 0 2px;
}

/* CTA row */
.note-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ── 7 · Buttons (handwritten paper tags) ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  padding: 10px 24px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .18s var(--ease-out), box-shadow .18s, background .18s, color .18s;
}

.btn:hover { transform: translateY(-2px) rotate(-.5deg); }
.btn:active { transform: translateY(0) rotate(0); }

.btn:focus-visible {
  outline: 3px solid rgba(196, 106, 74, .5);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--terra);
  color: #fff8ec;
  box-shadow: 0 6px 16px rgba(196, 106, 74, .45);
}

.btn--primary:hover { background: var(--terra-deep); box-shadow: 0 8px 20px rgba(196, 106, 74, .55); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
}

.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.btn-arrow { font-size: .9em; }

/* ── 8 · Sheet panels (fine print / rsvp / wishes) ────────────────────── */
.sheet {
  position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(58, 50, 41, .026) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-radius: 4px;
  box-shadow: var(--shadow-sheet);
  padding: clamp(30px, 5vh, 52px) clamp(22px, 4.6vw, 46px);
  color: var(--ink);
}

.sheet-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--terra-deep);
  margin-bottom: 8px;
}

.sheet-title {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(34px, 5.5vw, 46px);
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: 8px;
}

.sheet-sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: clamp(22px, 3.6vh, 34px);
}

/* details list */
.details-list {
  border: 1.5px dashed rgba(58, 50, 41, .34);
  border-radius: 8px;
  background: rgba(255, 255, 255, .4);
  overflow: hidden;
}

.detail-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(58, 50, 41, .12);
}

.detail-row:last-child { border-bottom: 0; }

.detail-row dt {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terra-deep);
  padding-top: 3px;
}

.detail-row dd {
  font-family: var(--font-mono);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink);
}

.detail-row dd small {
  display: block;
  color: var(--ink-muted);
  font-size: 13px;
  margin-top: 2px;
}

/* house rules note */
.house-rules {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding: 15px 18px;
  border-radius: 8px;
  background: rgba(138, 165, 138, .22);
  border: 1px solid rgba(138, 165, 138, .4);
}

.house-rules-icon { font-size: 17px; line-height: 1.5; }

.house-rules p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.house-rules strong { color: var(--sage-deep); font-weight: 600; }

/* sheet foot */
.sheet-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: clamp(24px, 4.4vh, 40px);
}

/* ── 9 · RSVP form (a second, whiter card on the sheet) ───────────────── */
.rsvp-form {
  background: #fffdf7;
  border: 1px solid var(--paper-3);
  border-radius: 8px;
  padding: clamp(20px, 3.4vw, 34px);
  box-shadow: 0 10px 30px rgba(74, 56, 30, .14);
  position: relative;
}

.rsvp-form::before {                     /* washi strip across the top */
  content: "";
  position: absolute;
  top: -11px;
  left: 20%;
  right: 20%;
  height: 22px;
  border-radius: 2px;
  background: var(--tape-sage);
  box-shadow: 0 2px 6px rgba(74, 56, 30, .18);
  transform: rotate(-1deg);
}

.rsvp-form-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group--half { grid-column: span 1; }

.form-group label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--terra-deep);
}

.form-control {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 400;
  color: var(--ink);
  background: rgba(255, 255, 255, .65);
  border: 1.5px solid var(--ink-faint);
  border-radius: 5px;
  padding: 11px 13px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.form-control::placeholder { color: var(--ink-faint); }

.form-control:focus {
  outline: none;
  border-color: var(--terra);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(196, 106, 74, .16);
}

textarea.form-control { resize: vertical; min-height: 62px; }

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--terra-deep) 50%),
    linear-gradient(135deg, var(--terra-deep) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.error {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--danger);
  min-height: 0;
}

.field-hint {
  grid-column: 1 / -1;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.attend-extras {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.attend-extras .form-group:first-child { grid-column: 1 / -1; }

.form-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.loading {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

#rsvp-form.is-declining .attend-extras { display: none; }

/* platform "thank you" / "closed" states */
#rsvp-form .thank-you-message h3 {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 34px;
  color: var(--terra);
}

#rsvp-form .thank-you-message p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

#rsvp-form .thank-you-message small { color: var(--ink-muted); line-height: 1.5; display: block; }

/* RSVP deadline countdown (populated by the platform only when the host sets a deadline) */
.rsvp-countdown {
  display: none;
  text-align: center;
  margin: 0 auto 24px;
  padding: 14px 18px;
  border: 1.5px dashed rgba(58, 50, 41, .34);
  border-radius: 8px;
  background: rgba(217, 164, 65, .1);
}
.rsvp-countdown:has(.count-day:not(:empty)) { display: block; }
.rsvp-countdown-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--mustard-deep);
  margin-bottom: 10px;
}
.rsvp-countdown-units {
  display: flex;
  justify-content: center;
  gap: 18px;
}
.rsvp-unit { display: flex; flex-direction: column; align-items: center; min-width: 54px; }
.rsvp-unit:has(.count-day:empty),
.rsvp-unit:has(.count-hour:empty),
.rsvp-unit:has(.count-minute:empty),
.rsvp-unit:has(.count-second:empty) { display: none; }
.rsvp-unit .count-day,
.rsvp-unit .count-hour,
.rsvp-unit .count-minute,
.rsvp-unit .count-second {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 32px;
  line-height: 1;
  color: var(--terra);
}
.rsvp-unit em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* ── 10 · Guestbook (platform-injected, Style A) ──────────────────────── */
.guestbook-body #guestbookForm {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  background: #fffdf7;
  color: var(--ink);
  border-radius: 8px;
  padding: clamp(20px, 3.4vw, 34px);
  box-shadow: 0 10px 30px rgba(74, 56, 30, .14);
  border: 1px solid var(--paper-3);
}

.guestbook-body #guestbookForm .form-group { display: flex; flex-direction: column; gap: 6px; }
.guestbook-body #guestbookForm .form-group:has(textarea) { grid-column: 1 / -1; }

.guestbook-body #guestbookForm label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--terra-deep);
}

.guestbook-body #guestbookForm .form-control {
  width: 100%;
  font-family: var(--font-serif);
  font-size: 15.5px;
  font-weight: 400;
  color: var(--ink);
  background: rgba(255, 255, 255, .65);
  border: 1.5px solid var(--ink-faint);
  border-radius: 5px;
  padding: 11px 13px;
}

.guestbook-body #guestbookForm .form-control:focus {
  outline: none;
  border-color: var(--terra);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(196, 106, 74, .16);
}

.guestbook-body #guestbookForm .error { font-size: 12.5px; color: var(--danger); }

.guestbook-body #guestbookForm .d-flex,
.guestbook-body #guestbookForm .guestbook-chapta { grid-column: 1 / -1; justify-content: center; }

.guestbook-body #guestbookForm button[type="submit"] {
  grid-column: 1 / -1;
  justify-self: center;
  width: auto;
  background: var(--terra);
  color: #fff8ec;
  border: 0;
  border-radius: 6px;
  padding: 11px 28px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(196, 106, 74, .4);
}

.guestbook-body #guestbookForm button[type="submit"]:hover { background: var(--terra-deep); }

.guestbook-body #guestbookForm .loading-guestbook {
  grid-column: 1 / -1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-muted);
}

.guestbook-wrap {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 46vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.guestbook-entry {
  position: relative;
  border: 1px solid rgba(58, 50, 41, .26);
  border-radius: 6px;
  background: rgba(255, 255, 255, .5);
  padding: 13px 16px;
}

.guestbook-entry::before {              /* little washi strip */
  content: "";
  position: absolute;
  top: -6px;
  left: 16px;
  width: 46px;
  height: 12px;
  border-radius: 2px;
  background: var(--tape-mustard);
  transform: rotate(-3deg);
}

.guestbook-entry h5 {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 21px;
  color: var(--ink);
  margin: 0 0 3px;
}

.guestbook-entry p {
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 0 4px;
}

.guestbook-entry small {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

.more-guestbook-wrap {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

#load-more {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 9px 22px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
}

#load-more:hover { background: var(--ink); color: var(--paper); }

/* ── 11 · Photos — the polaroid on the cover ─────────────────────────── */
.polaroid {
  position: absolute;
  right: clamp(18px, 6vw, 72px);
  top: 18%;
  width: min(190px, 22vw);
  background: #fffdf6;
  padding: 12px 12px 10px;
  box-shadow: 0 16px 40px rgba(74, 56, 30, .4);
  transform: rotate(4.5deg);
  z-index: 3;
  border-radius: 2px;
}

.polaroid::before {                     /* pushpin */
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffb28a, var(--terra) 45%, var(--terra-deep) 90%);
  box-shadow: 0 3px 4px rgba(74, 56, 30, .45);
}

.polaroid-photo {
  position: relative;
  height: min(170px, 20vw);
  border-radius: 2px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(80% 80% at 50% 35%, rgba(196, 106, 74, .16), transparent 70%),
    linear-gradient(160deg, #f0e6d2, #e4d4b6);
  border: 1.5px dashed rgba(58, 50, 41, .26);
}

/* the real photo — covers the ✦ fallback; if the file is missing the
   onerror handler hides the <img> and the ✦ placeholder shows again */
.polaroid-photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  z-index: 1;
}

.polaroid-blank {
  font-family: var(--font-script);
  font-size: 30px;
  color: rgba(58, 50, 41, .28);
}

.polaroid figcaption {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 17px;
  text-align: center;
  color: var(--ink-muted);
  padding-top: 8px;
}

/* host toggle: add the class "no-polaroid" to <body> to hide the slot
   without touching the markup (platform CSS injection friendly) */
body.no-polaroid .polaroid { display: none; }

/* ── 11b · A second polaroid (couple / anniversary notes) ──────────────
   Copy the <figure class="polaroid"> block for a second photo — the extra
   one pins to the other side of the board, mirrored, slightly lower. A
   solo host is unaffected (one polaroid keeps its original spot). */
.board-content .polaroid + .polaroid {
  right: auto;
  left: clamp(18px, 6vw, 72px);
  top: 30%;
  transform: rotate(-4.5deg);
}

/* ── 11c · Clickable photos — tap to open full-size in the lightbox ────
   Every photo feature (polaroid, gallery card, flyer) uses a .gallery-open
   button. On the cover and gallery cards it is a transparent overlay over
   the photo; the little paper "View ↗" chip signals it is clickable and
   stays visible so touch users see the affordance too. */
.gallery-open {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  font: inherit;
  cursor: zoom-in;
}

.gallery-open:focus-visible {
  outline: 3px solid rgba(196, 106, 74, .55);
  outline-offset: 2px;
}

.gallery-open-chip {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(58, 50, 41, .28);
  background: rgba(253, 248, 236, .92);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(74, 56, 30, .25);
  opacity: .92;
  pointer-events: none;
  transition: background .2s, color .2s, opacity .2s;
}

.gallery-open-arrow { font-size: 11px; line-height: 1; }

.gallery-open:hover .gallery-open-chip,
.gallery-open:focus-visible .gallery-open-chip {
  background: var(--terra);
  color: #fff8ec;
  opacity: 1;
}

/* a broken/missing photo hides its open button (set by main.js on error)
   — the styled CSS fallback takes over the slot instead. !important beats
   the later .flyer-figure .gallery-open display rule (equal specificity). */
.gallery-open[hidden] { display: none !important; }

/* ── 12 · Photos — keepsake gallery panel (optional) ────────────────────
   Delete the whole <section class="photos-section"> to disable; the rail
   and deep links adapt automatically (same contract as RSVP/guestbook). */
.panel-scroll--wide { max-width: 880px; }

.photos-head { margin-bottom: clamp(26px, 4vh, 38px); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: clamp(22px, 3.4vw, 34px);
  justify-items: center;
}

.gallery-item {
  position: relative;
  width: 100%;
  max-width: 300px;
  background: #fffdf6;
  padding: 11px 11px 13px;
  border-radius: 2px;
  box-shadow: 0 14px 32px rgba(74, 56, 30, .34);
  transform: rotate(var(--tilt, 0deg));
}

.gallery-item::before {                 /* washi tape strip, as if pinned */
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 84px;
  height: 21px;
  border-radius: 2px;
  transform: translateX(-50%) rotate(-2deg);
  box-shadow: 0 2px 6px rgba(74, 56, 30, .2);
  background: var(--tape-mustard);
}

.gallery-item:nth-child(odd) { --tilt: -1.4deg; }
.gallery-item:nth-child(even) { --tilt: 1.2deg; }
.gallery-item:nth-child(3n)::before { background: var(--tape-sage); transform: translateX(-50%) rotate(2deg); }
.gallery-item:nth-child(4n)::before { background: var(--tape-rose); transform: translateX(-50%) rotate(-1deg); }

.gallery-photo {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  background:                       /* styled fallback if the image is missing */
    radial-gradient(80% 80% at 50% 35%, rgba(196, 106, 74, .16), transparent 70%),
    linear-gradient(160deg, #f0e6d2, #e4d4b6);
  border: 1.5px dashed rgba(58, 50, 41, .26);
}

.gallery-photo::before {            /* 4:3 frame via padding ratio — works everywhere */
  content: "";
  display: block;
  padding-top: 75%;
}

.gallery-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
}

.gallery-caption {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 18px;
  text-align: center;
  color: var(--ink-muted);
  padding-top: 9px;
}

/* ── 12b · Video panel — the "short film" embed ────────────────────────
   OPTIONAL: delete the whole <section class="film-panel"> to disable.
   .film-embed holds a YouTube/Vimeo <iframe> (recommended) or a direct
   <video src="…mp4"> tag; the "Watch the original video" link below is
   derived from it by main.js, so an admin edits ONE url. */
.film-figure { position: relative; margin: 0; }

.film-figure::before {            /* washi strip across the top of the frame */
  content: "";
  position: absolute;
  top: -10px;
  left: 18%;
  right: 18%;
  height: 20px;
  z-index: 3;
  border-radius: 2px;
  background: var(--tape-mustard);
  box-shadow: 0 2px 6px rgba(74, 56, 30, .2);
  transform: rotate(-1deg);
}

.film-embed {
  position: relative;
  padding-top: 56.25%;            /* 16:9 film frame */
  border-radius: 6px;
  overflow: hidden;
  background: #2e2316;            /* dark "screen" behind the player */
  border: 8px solid #fffdf6;      /* paper frame */
  box-shadow: 0 18px 44px rgba(74, 56, 30, .4);
  transform: rotate(-.8deg);
}

.film-embed iframe,
.film-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 2px;
}

.film-cap {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 18px;
  text-align: center;
  color: var(--ink-muted);
  margin-top: 14px;
}

.film-open { text-align: center; margin-top: 14px; }

.film-open a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(74, 56, 30, .22);
  transition: background .18s, color .18s, transform .18s var(--ease-out);
}

.film-open a:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

.film-open a:focus-visible { outline: 3px solid rgba(196, 106, 74, .55); outline-offset: 2px; }

/* ── 12c · Flyer panel — official event art / banner showcase ──────────
   OPTIONAL: delete the whole <section class="flyer-panel"> to disable.
   The button is the paper frame itself; tapping it opens the design
   full-size with zoom in the lightbox. */
.flyer-figure { margin: 0; text-align: center; }

.flyer-figure .gallery-open {
  position: relative;
  inset: auto;
  display: block;
  width: min(340px, 88vw);
  height: auto;
  margin: 0 auto;
  padding: 12px 12px 16px;
  border: 0;
  border-radius: 2px;
  background: #fffdf6;
  box-shadow: 0 18px 44px rgba(74, 56, 30, .4);
  transform: rotate(-1.2deg);
  cursor: zoom-in;
  overflow: visible;               /* the tape strip hangs past the frame */
}

.flyer-figure .gallery-open::before {   /* washi strip, as if pinned */
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 92px;
  height: 22px;
  z-index: 1;
  border-radius: 2px;
  background: var(--tape-rose);
  box-shadow: 0 2px 6px rgba(74, 56, 30, .2);
  transform: translateX(-50%) rotate(-2deg);
}

.flyer-figure .gallery-open img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 2px;
  background:                       /* styled fallback if the file is missing */
    radial-gradient(80% 80% at 50% 35%, rgba(196, 106, 74, .16), transparent 70%),
    linear-gradient(160deg, #f0e6d2, #e4d4b6);
  transition: transform .3s var(--ease-out);
}

.flyer-figure .gallery-open:hover img { transform: scale(1.03); }

.flyer-figure .gallery-open:focus-visible { outline: 3px solid rgba(196, 106, 74, .55); outline-offset: 3px; }

.flyer-cap {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 18px;
  text-align: center;
  color: var(--ink-muted);
  margin-top: 14px;
}

.flyer-cap code {
  font-family: var(--font-mono);
  font-size: .8em;
  background: rgba(58, 50, 41, .07);
  border-radius: 3px;
  padding: 1px 4px;
}

/* ── 12d · Footer brand placeholder (platform swaps text / logo) ─────── */
.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: clamp(26px, 5vh, 42px);
  padding: 10px 16px;
  border: 1px dashed rgba(58, 50, 41, .22);
  border-radius: 6px;
  background: rgba(255, 255, 255, .35);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
}

.footer-brand-mark { color: var(--terra); font-size: 13px; }

/* ── 12e · Free page — your own note (repeatable blocks) ─────────────── */
.free-blocks {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 3vw, 20px);
}

.free-block {
  background:
    repeating-linear-gradient(0deg, rgba(58, 50, 41, .022) 0 1px, transparent 1px 4px),
    linear-gradient(170deg, var(--paper) 0%, var(--paper-2) 100%);
  border: 1.5px dashed rgba(58, 50, 41, .22);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(74, 56, 30, .16);
  padding: clamp(18px, 4vw, 28px);
}

.free-title {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 32px);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.free-content {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.free-content p { margin: 0; }

.free-figure {
  margin: clamp(14px, 3vw, 20px) 0 0;
  max-width: 480px;
}

.free-figure .gallery-open {
  position: relative;          /* undo the generic absolute overlay used by
                                  the cover/gallery photo cards — free-page
                                  photos flow in the block and stack */
  inset: auto;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: zoom-in;
}

.free-figure .gallery-open img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(58, 50, 41, .14);
  box-shadow: 0 4px 14px rgba(74, 56, 30, .2);
  background:                       /* styled fallback if the file is missing */
    radial-gradient(80% 80% at 50% 35%, rgba(217, 164, 65, .14), transparent 70%),
    linear-gradient(160deg, #f0e6d2, #e4d4b6);
  transition: transform .3s var(--ease-out);
}

.free-figure .gallery-open:hover img { transform: scale(1.015); }

.free-figure .gallery-open:focus-visible { outline: 3px solid rgba(196, 106, 74, .55); outline-offset: 3px; }

.free-cap {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 17px;
  text-align: center;
  color: var(--ink-muted);
  margin-top: 8px;
}

.free-powered-by {
  margin: clamp(20px, 4vw, 28px) 0 0;
  text-align: center;
  font-family: var(--font-script);
  font-size: clamp(24px, 4.5vw, 30px);
  line-height: 1.2;
  color: var(--terra);
}

/* ── 13 · Lightbox — full-screen photo viewer (built by main.js) ───────
   Every photo feature (polaroid, gallery, flyer) opens here: full-size
   view, click-to-zoom with panning (or the zoom button / Z key), prev /
   next for galleries, Esc / arrows, and an "Open full size" link to the
   original image. The dialog is built on demand and destroyed on close. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
  background: rgba(46, 35, 22, .95);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.lightbox.is-open { display: flex; }

.lightbox img {
  max-width: min(92vw, 900px);
  max-height: 74vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  border: 2px solid rgba(253, 248, 236, .25);
  box-shadow: 0 34px 90px -30px rgba(0, 0, 0, .85);
  cursor: zoom-in;
  transition: transform .25s var(--ease-out);
}

/* zoom state: the photo scales 2× and the viewer becomes a scrollable
   pane so guests can pan around — click the photo (or the zoom button)
   to toggle, click the dark backdrop to close */
.lightbox.is-zoomed {
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.lightbox.is-zoomed img {
  max-width: none;
  max-height: none;
  transform: scale(2);
  transform-origin: 0 0;
  align-self: flex-start;
  cursor: zoom-out;
}

.lightbox-cap,
.lightbox-hint,
.lightbox-original { align-self: center; }

.lightbox-cap {
  margin: 14px 0 0;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 22px;
  color: var(--paper);
  text-align: center;
}

.lightbox-hint {
  margin: 8px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(253, 248, 236, .6);
  text-align: center;
}

.lightbox-original {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1.5px solid rgba(253, 248, 236, .4);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  transition: background .18s, color .18s;
}

.lightbox-original:hover { background: var(--terra); color: #fff8ec; }

.lightbox-close,
.lightbox-prev,
.lightbox-next,
.lightbox-zoom {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(253, 248, 236, .35);
  border-radius: 50%;
  background: rgba(46, 35, 22, .8);
  color: var(--paper);
  font-size: 18px;
  cursor: pointer;
  transition: background .18s, color .18s;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-zoom:hover {
  background: var(--terra);
  color: #fff8ec;
}

.lightbox-close:focus-visible,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible,
.lightbox-zoom:focus-visible {
  outline: 3px solid rgba(196, 106, 74, .7);
  outline-offset: 2px;
}

.lightbox-close { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-zoom { bottom: calc(14px + env(safe-area-inset-bottom)); right: 14px; }
.lightbox-zoom svg { width: 19px; height: 19px; }
.lightbox-prev.is-hidden,
.lightbox-next.is-hidden { display: none; }

@media (max-width: 560px) {
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
}

/* ── 14 · Responsive ──────────────────────────────────────────────────── */
@media (max-width: 920px) {
  .polaroid { display: none; }
}

@media (max-width: 700px) {
  .clothesline { display: none; }
  .board-content { padding-top: clamp(54px, 12vh, 90px); }
  .detail-row { grid-template-columns: 1fr; gap: 4px; }
  .detail-row dt { padding-top: 0; }
  .rsvp-form-display { grid-template-columns: 1fr; }
  .attend-extras { grid-template-columns: 1fr; }
  .guestbook-body #guestbookForm { grid-template-columns: 1fr; }
  .shell-nav { gap: 5px; padding-top: 8px; }
  .nav-tab { padding: 7px 11px; font-size: 16px; min-height: 38px; }
  .ps-row { grid-template-columns: 1fr; gap: 2px; }
  .ps-row dt { padding-top: 0; }
}

@media (max-width: 460px) {
  .big-note { padding: 24px 20px 22px; transform: rotate(-.6deg); }
  .note-head { flex-direction: column; gap: 2px; align-items: flex-start; }
  .pin { display: none; }
  .tape--bottom { display: none; }
  .board-content { padding-top: 40px; }
}

/* ── 15 · Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .panel { transform: none; }
  .pegcard { animation: none; }
}

/* ── 16 · Print — each panel becomes its own page ─────────────────────── */
@media print {
  html, body { height: auto; background: #fff; }
  .site { position: static; height: auto; overflow: visible; background: var(--board); }
  .deck { position: static; }
  .panel {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 0;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    overflow: visible !important;
    break-after: page;
    page-break-after: always;
  }
  .panel.is-active { overflow: visible !important; }
  .shell-nav, .shell-foot, .powered-by, .sheet-foot, .note-cta, .clothesline, .polaroid, .footer-brand { display: none !important; }
  .gallery-open-chip { display: none !important; }
  .panel-scroll { max-width: none; padding: 24px 10mm; }
  .board { min-height: 96vh; }
  .board-content { padding: 40px 14mm; }
  .board-frame { box-shadow: inset 0 0 0 8px var(--frame); }
  .big-note, .sheet, .postscript, .rsvp-form, .details-list, .film-embed, .flyer-figure .gallery-open {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .gallery-item { break-inside: avoid; page-break-inside: avoid; }
  .gallery-photo, .gallery-photo img, .polaroid-photo-img {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .tape, .pin { display: none; }
  .guestbook-wrap { max-height: none; overflow: visible; }
}
