/* ════════════════════════════════════════════════════════════════════════
   Blank Canvas — Save the Date Flyer (Minimal) · styles.css
   Kundangan template · category: Save-the-Date (Minimal)

   Design language (shared with the matching card template):
     • warm paper ground, near-black ink, one clay accent
     • refined serif for names, letterspaced sans for labels
     • the date is the hero — everything else stays quiet
   ════════════════════════════════════════════════════════════════════════ */

/* ── tokens ─────────────────────────────────────────────────────────────── */
:root {
  --paper: #f5f2ec;            /* warm paper ground */
  --card:  #fffdf8;            /* lifted surface (cards, menus) */
  --ink:   #211d16;            /* near-black ink */
  --ink-soft: #5f5748;         /* muted ink (labels, notes) — ≥4.5:1 on paper */
  --line:  #e2dbcb;            /* hairline */
  --accent:     #b4532a;       /* clay — the one accent */
  --accent-deep:#8f3e1d;       /* accent for small text — ≥4.5:1 on paper */
  --hero-photo-tint: 0.84;     /* paper wash over the optional hero photo —
                                  lower (e.g. 0.55) to show more of the photo,
                                  raise toward 1 to fade it out */
  --serif: Didot, "Bodoni MT", "Playfair Display", "Cormorant Garamond",
           Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", "Helvetica Neue", Helvetica, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ── reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;                       /* the shell owns scrolling */
}

img, svg { max-width: 100%; display: block; }
[hidden] { display: none !important; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── the shell: one viewport, only the active panel scrolls ─────────────── */
.shell {
  height: 100dvh;
  height: 100vh;                          /* fallback for older engines */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* the panels wrapper — holds the sections between the footer and tabs */
.panels {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ── panels ─────────────────────────────────────────────────────────────── */
.panel {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow-y: auto;                       /* ONLY the active panel scrolls */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.panel:not(.is-active) { display: none; }

.panel.is-active { animation: panel-in 0.55s var(--ease) both; }

@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ── flyer stage (the poster) ───────────────────────────────────────────── */
.stage {
  position: relative;             /* above the optional .hero-photo layer */
  z-index: 1;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(20px, 5vh, 48px) 24px
           calc(96px + env(safe-area-inset-bottom));  /* room above the tabs */
}

/* margin:auto centers vertically AND lets tall content scroll without
   clipping the top — the robust "centered but scrollable" pattern. */
.stage-inner {
  margin: auto;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: clamp(14px, 2.6vh, 26px);
}

/* ── OPTIONAL photo backdrop behind the flyer ─────────────────────────────
   Decorative only (aria-hidden, pointer-events: none). Delete the
   .hero-photo div from index.html to remove the feature entirely; the
   flyer then renders on pure paper as before. The paper wash (its
   strength is --hero-photo-tint) keeps the date fully readable. */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9);
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  opacity: var(--hero-photo-tint, 0.84);
}

.guest-greeting {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(14px, 3.6vw, 18px);
  color: var(--ink-soft);
  margin-bottom: clamp(2px, 1vh, 8px);
}

.eyebrow {
  font-size: clamp(10px, 2.4vw, 12px);
  font-weight: 500;
  letter-spacing: 0.44em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.44em;                   /* optically recenter tracked text */
}

/* THE DATE — the hero of the flyer. Sized in vw so the numerals always
   fit the viewport without horizontal scrolling (the glyph row is ~4.9×
   the font-size), capped at 220px on large screens. */
.date-big {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 20vw, 220px);
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.date-big .sep {
  color: var(--accent);
  padding: 0 clamp(4px, 1.2vw, 12px);
  font-size: 0.62em;
  vertical-align: 0.08em;
}

.date-words {
  font-size: clamp(11px, 2.8vw, 13px);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.28em;
}

/* the couple */
.names {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 6.4vw, 52px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-top: clamp(4px, 1.4vh, 14px);
  text-wrap: balance;
}
.names .amp {
  color: var(--accent);
  font-style: italic;
  padding: 0 0.18em;
}

.note-std {
  font-size: clamp(11px, 2.6vw, 12.5px);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.2em;
}

/* Optional "View the photo" — the cover backdrop's quiet affordance.
   Shown by main.js only while the .hero-photo div exists in the markup;
   opens the cover photo full-screen in the viewer. */
.hero-photo-view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding: 8px 16px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding-left: calc(0.26em + 16px);      /* optically recenter tracked text */
  color: var(--ink-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.hero-photo-view:hover, .hero-photo-view:focus-visible {
  color: var(--ink);
  border-color: var(--line);
}
.hero-photo-view-ico { flex: none; }

/* ── add-to-calendar ────────────────────────────────────────────────────── */
.cal {
  position: relative;
  margin-top: clamp(10px, 2.6vh, 26px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cal-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-left: 0.3em;                    /* optically recenter tracked text */
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 15px 30px;
  background: transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.15s var(--ease);
}
.cal-btn:hover, .cal-btn:focus-visible {
  background: var(--ink);
  color: var(--paper);
}
.cal-btn:active { transform: scale(0.97); }
.cal-btn[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.cal-btn-ico { transition: transform 0.25s var(--ease); }
.cal-btn:hover .cal-btn-ico { transform: rotate(90deg); }

/* the popover opens upward (the button sits low on the poster) */
.cal-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  min-width: 210px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 50px -22px rgba(33, 29, 22, 0.35);
  padding: 8px;
  z-index: 30;
  animation: menu-in 0.22s var(--ease) both;
}
@keyframes menu-in {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to   { opacity: 1; transform: translateX(-50%) none; }
}

.cal-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  text-align: left;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  padding: 11px 14px;
  border-radius: 9px;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}
.cal-opt svg { flex: none; color: var(--accent-deep); }
.cal-opt:hover, .cal-opt:focus-visible { background: var(--paper); }
.cal-opt:hover svg, .cal-opt:focus-visible svg { color: var(--ink); }
.cal-opt--copy { border: 0; }

.cal-note {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
}
.tba-note {
  margin-top: 14px;
  font-size: clamp(12px, 3vw, 13.5px);
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
}
.cal-noscript {
  margin-top: 14px;
  max-width: 300px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.cal-noscript strong { color: var(--ink); }

/* ── section panels (RSVP / guestbook share a quiet column) ─────────────── */
.panel-col {
  margin: 0 auto;
  width: 100%;
  max-width: 600px;
  padding: clamp(28px, 7vh, 64px) 24px
           calc(96px + env(safe-area-inset-bottom));
}

.rsvp-head, .guestbook-head, .gallery-head { text-align: center; margin-bottom: clamp(26px, 5vh, 44px); }

.rsvp-title, .guestbook-title, .gallery-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 6.5vw, 38px);
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.rsvp-description, .guestbook-description, .gallery-description {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.rsvp-due { color: var(--ink); font-weight: 600; }
.rsvp-due-wrap {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}

/* ── RSVP deadline countdown (shown by main.js only when live) ──────────── */
.rsvp-countdown {
  margin-top: 18px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.cd-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.3em;
}
.cd-cells {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  font-variant-numeric: tabular-nums;
}
.cd-cell {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
}
.cd-unit {
  margin-left: 3px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ── RSVP form (built by the template; driven by the platform script) ───── */
#rsvp-form { display: flex; flex-direction: column; gap: 18px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
@media (min-width: 480px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}

.form-group { display: flex; flex-direction: column; gap: 7px; }

.form-group label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.22em;
}

.form-control {
  width: 100%;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 9px 2px;
  transition: border-color 0.2s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.form-control::placeholder { color: #a99e89; }
.form-control:focus {
  outline: none;
  border-bottom-color: var(--accent-deep);
}
/* selects keep a tiny chevron so they still read as menus */
select.form-control {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
                    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
  cursor: pointer;
}
textarea.form-control { resize: vertical; min-height: 44px; border: 1px solid var(--line); padding: 10px 12px; border-radius: 6px; }
textarea.form-control:focus { border-color: var(--accent-deep); }

/* validation feedback — the platform writes into #*-error spans */
.error {
  display: block;
  min-height: 1em;
  font-size: 12px;
  color: #a63a24;
  margin-top: 2px;
}

.form-hint {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-top: -8px;
}

.rsvp-no-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--accent-deep);
}

.rsvp-actions { display: flex; justify-content: center; margin-top: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-left: 0.3em;
  border-radius: 999px;
  padding: 15px 32px;
  transition: background 0.25s var(--ease), color 0.25s var(--ease),
              transform 0.15s var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover, .btn--primary:focus-visible { background: var(--accent-deep); }
.btn:disabled { opacity: 0.55; cursor: default; }

/* shown by the platform's script while submitting */
.loading {
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-soft);
  padding: 6px 0 0;
}

/* thank-you / closed states — markup injected by the platform's script */
.thank-you-message { text-align: center; padding: 10px 0 30px; }
.thank-you-message h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 6vw, 32px);
  margin-bottom: 10px;
}
.thank-you-message p { color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.thank-you-message small { display: block; margin-top: 22px; color: var(--ink-soft); font-size: 12.5px; }

/* ── guestbook (Style A: platform injects form + list into .guestbook-body) */
.guestbook-body { display: flex; flex-direction: column; gap: 26px; }

#guestbookForm { display: flex; flex-direction: column; gap: 16px; }

.guestbook-body .form-control { /* matches the RSVP field language */ }
#guestbookForm textarea.form-control { min-height: 96px; }

.guestbook-chapta { min-height: 70px; display: flex; justify-content: center; }

#guestbookForm button[type="submit"] {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  padding-left: 0.3em;
  border-radius: 999px;
  padding: 14px 30px;
  background: var(--ink);
  color: var(--paper);
  transition: background 0.25s var(--ease), transform 0.15s var(--ease);
}
#guestbookForm button[type="submit"]:hover { background: var(--accent-deep); }
#guestbookForm button[type="submit"]:active { transform: scale(0.97); }

.loading-guestbook {
  text-align: center;
  font-size: 13px;
  font-style: italic;
  color: var(--ink-soft);
}

/* the message list the platform renders */
#comments-container { display: flex; flex-direction: column; }

.guestbook-entry {
  padding: 18px 2px;
  border-bottom: 1px solid var(--line);
}
.guestbook-entry:last-child { border-bottom: 0; }
.guestbook-entry h5 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.01em;
  margin-bottom: 5px;
}
.guestbook-entry p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 6px;
  word-break: break-word;
}
.guestbook-entry small {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.more-guestbook-wrap { text-align: center; padding-top: 6px; }
#load-more {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding-left: 0.26em;
  color: var(--accent-deep);
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: border-color 0.2s var(--ease);
}
#load-more:hover { border-color: var(--accent-deep); }

/* ── photos (optional gallery panel) ──────────────────────────────────────
   Every slot ships with an on-brand placeholder; the photo-frame + cover
   crop keeps any real photo perfectly framed at any aspect ratio. */
.panel-col--gallery { max-width: 780px; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 3vw, 22px);
}
@media (min-width: 540px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

.photo-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--line);       /* shown while a photo loads */
  aspect-ratio: 4 / 5;           /* portrait frames — like a wedding album */
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}
.photo-card:hover .photo-frame img,
.photo-card:focus-within .photo-frame img { transform: scale(1.03); }

.photo-card--wide .photo-frame { aspect-ratio: 16 / 10; }
.photo-card--wide { grid-column: span 2; }  /* full-width on mobile, ⅔ on wider */

.photo-card figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  text-align: center;
}

/* photos open in the full-screen viewer — a zoom-in cue */
.photo-card img, .banner-flyer img { cursor: zoom-in; }

/* ── optional media: label divider ──────────────────────────────────────── */
.media-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 20px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-left: 0.3em;
  text-align: center;
}
.media-divider::before, .media-divider::after {
  content: "";
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ── optional media: official flyer / banner ──────────────────────────────
   A framed slot for hosts who already have a designed flyer or poster for
   the wedding — display it so guests can confirm they're in the right
   place. The full artwork is always shown (object-fit: contain, no forced
   crop), framed like a print on paper. Delete the whole .banner-flyer
   <figure> to hide the feature; clicking it opens the full-screen viewer. */
.media-block { margin-top: 44px; text-align: center; }
.banner-block { max-width: 660px; margin-left: auto; margin-right: auto; }
.banner-flyer { margin: 0; text-align: center; }
.banner-flyer img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: contain;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 24px 50px -28px rgba(33, 29, 22, 0.3);
}
.banner-flyer figcaption {
  margin-top: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

/* ── optional media: film feature (video URL embed) ───────────────────────
   A poster + play button that lazy-loads an <iframe> from the URL in
   data-video-url (YouTube / Vimeo / any embeddable URL). Nothing loads
   until the guest taps play — fast, and consent-friendly. Delete the
   whole .film-card section to hide the feature; leave data-video-url
   empty for a gentle "coming soon" note. */
.film-card { margin-top: 44px; max-width: 640px; margin-left: auto; margin-right: auto; text-align: center; }
.film-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: var(--line);                /* mat behind the poster / while loading */
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -28px rgba(33, 29, 22, 0.3);
}
.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;
}
.film-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(56px, 12vmin, 72px);
  height: clamp(56px, 12vmin, 72px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  background: radial-gradient(circle at 32% 28%, var(--accent) 0%, var(--accent-deep) 100%);
  border: 1px solid rgba(255, 253, 248, 0.7);
  box-shadow: 0 12px 28px rgba(33, 29, 22, 0.35);
  animation: film-pulse 2.6s ease-in-out infinite;
  transition: transform 0.25s var(--ease);
}
.film-play svg { width: 26px; height: 26px; margin-left: 3px; }
.film-open:hover .film-play { transform: translate(-50%, -50%) scale(1.08); }
.film-open:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 3px; }
.film-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(33, 29, 22, 0.62);
  color: var(--paper);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  pointer-events: none;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
@keyframes film-pulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(33, 29, 22, 0.35); }
  50%      { box-shadow: 0 12px 36px rgba(33, 29, 22, 0.55); }
}
.film-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.film-note {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 18px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14.5px;
  text-align: center;
  background: var(--paper);
}
.film-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
  transition: border-color 0.2s var(--ease);
}
.film-external:hover { border-color: var(--accent-deep); }
.film-external[hidden] { display: none; }

/* ── optional free page (host-filled, repeatable blocks) ────────────────
   The Free Page section from the cockpit: repeatable .free-block entries
   (a title, free text and an OPTIONAL photo). The render engine removes
   the whole .panel-free section when the host leaves it empty (or toggles
   it off), so the tab main.js hides with it. An empty .free-media figure
   collapses to nothing (no padding on the figure itself), and main.js
   drops it entirely when the image is absent. */
.panel-col--free { max-width: 720px; }

.free-blocks {
  display: grid;
  gap: clamp(30px, 6vh, 48px);
}

.free-block { margin: 0; text-align: center; }

.free-title {
  margin: 0 0 clamp(12px, 2.6vh, 18px);
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 6vw, 36px);
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.free-title:focus { outline: none; }   /* programmatic focus on panel switch */

.free-media {
  margin: 0 auto clamp(14px, 3vh, 20px);
  max-width: 560px;
}
.free-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  background: var(--line);              /* mat while loading / if missing */
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px -28px rgba(33, 29, 22, 0.3);
  cursor: zoom-in;                      /* opens the full-screen viewer */
}

.free-content {
  margin: 0 auto;
  max-width: 34em;
  text-align: left;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink-soft);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ── full-screen photo viewer (lightbox) ──────────────────────────────────
   Built by main.js for every clickable image (gallery photos, the cover
   photo, the official flyer). Opens at the image's original resolution;
   +/− buttons, double-click or the keyboard zoom in; while zoomed you
   can pan by dragging or scrolling; "Open original" opens the source
   file in a new tab. */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(14px + env(safe-area-inset-top)) calc(14px + env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
  background: rgba(33, 29, 22, 0.93);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.photo-viewer.is-open { display: flex; }
.photo-viewer figure {
  margin: 0;
  width: 100%;
  max-width: min(94vw, 980px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.pv-stage {
  position: relative;
  width: 100%;
  height: min(68dvh, 70vh);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  overscroll-behavior: contain;
}
.pv-stage.is-zoomed { display: block; cursor: grab; }
.pv-stage.is-zoomed.is-dragging { cursor: grabbing; }
.photo-viewer img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border: 6px solid var(--card);
  border-radius: 10px;
  background: var(--line);                /* mat while loading / if missing */
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  user-select: none;
  -webkit-user-drag: none;
}
.photo-viewer .pv-unavailable {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 18px;
  background: var(--line);
  border: 6px solid var(--card);
  border-radius: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  font-style: italic;
}
.photo-viewer figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 4vw, 20px);
  letter-spacing: 0.01em;
  color: var(--paper);
}
.pv-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.pv-zoom {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(245, 242, 236, 0.45);
  background: rgba(245, 242, 236, 0.95);
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.pv-zoom:hover { background: #fff; transform: scale(1.06); }
.pv-zoom:disabled { opacity: 0.45; cursor: default; transform: none; }
.pv-zoom-num {
  min-width: 52px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--paper);
}
.pv-original {
  margin-left: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 242, 236, 0.5);
  padding-bottom: 2px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.pv-original:hover { color: var(--accent); border-color: var(--accent); }
.pv-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(245, 242, 236, 0.45);
  background: rgba(245, 242, 236, 0.95);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.pv-btn:hover { transform: scale(1.06); background: #fff; }
.pv-close { top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); }
.pv-prev  { left: 12px;  top: 50%; transform: translateY(-50%); }
.pv-next  { right: 12px; top: 50%; transform: translateY(-50%); }
.pv-prev:hover, .pv-next:hover { transform: translateY(-50%) scale(1.06); }
.photo-viewer :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── full-width powered-by brand strip (exact class 'powered-by') ────────
   A slim powered-by line pinned above the footer, full width. The engine
   swaps the literal brand token inside .link-footer for the platform name
   at render. This strip is STATIC platform HTML - never bind it to a
   morph or let the host edit it. */
.powered-by {
  flex: none;
  width: 100%;
  text-align: center;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  padding-left: calc(0.26em + 16px);    /* optically recenter tracked text */
}
.powered-by .link-footer { color: var(--accent-deep); }

/* ── foot (brand placeholder) ──────────────────────────────────────────── */
.foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  color: var(--ink-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.foot::-webkit-scrollbar { display: none; }
.foot__dot { opacity: 0.5; }
/* brand footer placeholder (replace the text, or let the platform inject) */
.foot .footer-brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  color: var(--ink);
}

/* ── section nav (the quiet tab bar) ────────────────────────────────────── */
.tabs {
  flex: none;
  display: flex;
  justify-content: center;
  gap: clamp(16px, 6vw, 40px);
  align-items: center;
  padding: 10px 20px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  overflow-x: auto;                       /* safety net on very narrow screens */
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs:empty { display: none; }

.tab {
  position: relative;
  flex: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding-left: 0.28em;
  padding: 12px 4px 14px;                 /* generous touch targets (~44px) */
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}
.tab::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transform: translateX(-50%);
  transition: width 0.25s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); }
.tab.is-active::after { width: 100%; }

.tabs-noscript {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
}

/* ── reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
  .panel.is-active { animation: none; }
}

/* ── small screens & short viewports ────────────────────────────────────── */
@media (max-width: 520px) {
  .photo-viewer { padding: 10px; flex-direction: column; gap: 10px; }
  .photo-viewer figure { max-width: 100%; }
  .pv-stage { height: min(58dvh, 60vh); }
  .photo-viewer img { border-width: 4px; }
  .pv-prev, .pv-next { position: static; transform: none; width: 40px; height: 40px; }
  .pv-prev:hover, .pv-next:hover { transform: scale(1.06); }
  .photo-viewer .pv-close { top: calc(8px + env(safe-area-inset-top)); right: calc(8px + env(safe-area-inset-right)); }
}
@media (max-width: 430px) {
  /* keep all the tabs on one line without a sideways scroll on narrow
     phones — slightly tighter tracking keeps the quiet look */
  .tabs { gap: clamp(8px, 3.4vw, 16px); padding-left: 10px; padding-right: 10px; }
  .tab { font-size: 10.5px; letter-spacing: 0.18em; padding-left: 0.18em; padding: 11px 2px 13px; }
}
@media (max-height: 640px) {
  .foot { display: none; }               /* reclaim vertical space on short screens */
  .powered-by { display: none; }
  .tabs { padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
}

/* ── print: a clean paper save-the-date ─────────────────────────────────── */
@media print {
  @page { margin: 1.2cm; }

  html, body { height: auto; overflow: visible; background: #fff; }

  .shell { height: auto; overflow: visible; display: block; }
  .panels { display: block; }
  .panel { display: none !important; overflow: visible; animation: none !important; }
  .panel.is-active { display: flex !important; }

  .stage { padding: 0; min-height: 0; }
  .stage-inner { margin: 0 auto; gap: 18px; }

  .tabs, .foot, .no-print, .powered-by { display: none !important; }
  .hero-photo { display: none !important; }
  .cal-btn, .cal-menu, .cal-note, .cal-meta, .hero-photo-view { display: none !important; }
  .film-card { display: none !important; }   /* video can't print */
  .guest-greeting, .eyebrow, .date-big, .date-words,
  .names, .note-std { color: #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .date-big .sep, .names .amp { color: var(--accent-deep); }
}
