/* ═══════════════════════════════════════════════════════════════════════
   graduation-flyer — "Class of 2026" celebration poster
   Navy + gold + cream poster energy · Fraunces + Space Grotesk
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #e9e2d2;              /* warm paper backdrop */
  --paper: #f7f0df;
  --ink: #131f38;             /* deep navy */
  --ink-soft: #2a3a5e;
  --muted: #5c6577;
  --gold: #d9a441;
  --gold-deep: #b07f2a;
  --gold-soft: #f0cd7d;
  --coral: #e76f51;
  --teal: #59a5a3;
  --danger: #b3261e;
  --line: rgba(19, 31, 56, 0.14);
  --shadow: 0 20px 55px rgba(19, 31, 56, 0.28);
  --radius: 20px;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-ui: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

/* ── base ─────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 12%, rgba(217, 164, 65, 0.10), transparent 38%),
    radial-gradient(circle at 88% 88%, rgba(89, 165, 163, 0.12), transparent 40%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }

/* ── single-viewport shell (JS on) ────────────────────────────────────── */
html.js .app {
  height: 100vh;
  height: 100dvh;
  display: grid;
  /* masthead · tabs · panels · foot · powered-by */
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  overflow: hidden;
}

html.js .panel { display: none; }
html.js .panels {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
html.js .panel.is-active {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* hero panels (poster) centre their content when there's room */
html.js .panel.hero-panel.is-active { display: flex; }
html.js .panel.hero-panel.is-active > * { margin: auto; }

/* ── no-JS fallback: everything stacked, page scrolls ─────────────────── */
html:not(.js) .app { display: block; height: auto; }
html:not(.js) .panel { display: block; }
html:not(.js) .tabs { display: none; }
html:not(.js) .panel.is-active { overflow: visible; }

/* ── masthead ─────────────────────────────────────────────────────────── */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(14px, 3vw, 28px);
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid rgba(240, 205, 125, 0.25);
  box-shadow: 0 2px 14px rgba(19, 31, 56, 0.35);
  position: relative;
  z-index: 5;
}

.masthead__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.masthead__mark { display: inline-flex; flex: none; }
.masthead__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.masthead__top { font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-soft); }
.masthead__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.masthead__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(240, 205, 125, 0.4);
  background: rgba(240, 205, 125, 0.08);
  color: var(--paper);
  font: 500 12.5px var(--font-ui);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.chip-btn:hover { background: rgba(240, 205, 125, 0.18); border-color: var(--gold-soft); }
.chip-btn:active { transform: translateY(1px); }
.chip-btn:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
.chip-btn.is-done { border-color: #7fc08a; color: #d8f3dd; }

/* ── tabs ─────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 8px;
  padding: 8px clamp(14px, 3vw, 28px);
  overflow-x: auto;
  scrollbar-width: none;
  background: var(--ink);
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  appearance: none;
  flex: none;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(240, 205, 125, 0.35);
  background: transparent;
  color: rgba(247, 240, 223, 0.72);
  font: 500 13px var(--font-ui);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tab:hover { color: var(--paper); border-color: var(--gold-soft); }
.tab.is-active { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 600; }
.tab:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

/* ── panels & inner ───────────────────────────────────────────────────── */
.panels { min-width: 0; }

.panel-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(20px, 4vh, 40px) clamp(16px, 4vw, 32px) 56px;
}

.section-head { margin-bottom: 24px; }
.kicker {
  margin: 0 0 6px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.section-head h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(26px, 4.4vw, 38px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.lede { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 52ch; }

/* ── the poster ───────────────────────────────────────────────────────── */
.poster {
  position: relative;
  max-width: 680px;
  width: 100%;
  margin: auto;
  padding: clamp(30px, 5.5vh, 54px) clamp(22px, 5vw, 52px) clamp(26px, 4.5vh, 42px);
  background: linear-gradient(178deg, #1a2b4c 0%, #111d36 62%, #0d1730 100%);
  border: 1px solid rgba(217, 164, 65, 0.4);
  border-radius: 26px;
  box-shadow: var(--shadow);
  color: var(--paper);
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.poster::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(217, 164, 65, 0.35);
  border-radius: 18px;
  pointer-events: none;
}
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(240, 205, 125, 0.14), transparent 55%);
  pointer-events: none;
}

/* optional photo backdrop — add .poster--photo-bg to <article class="poster">
   to use assets/img/poster-bg.svg behind the poster text. Tune the overlay
   opacity (first two rgba stops) to balance photo vs readability. */
.poster--photo-bg {
  background-image:
    linear-gradient(rgba(13, 23, 48, 0.55), rgba(13, 23, 48, 0.72)),
    url("../img/poster-bg.svg");
  background-size: cover;
  background-position: center;
}

html.js:not(.no-motion) .poster { animation: poster-rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes poster-rise {
  from { opacity: 0; transform: translateY(18px) scale(0.99); }
  to   { opacity: 1; transform: none; }
}

.poster__confetti { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.poster__confetti i {
  position: absolute;
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0.85;
  animation: confetti-float 7s ease-in-out infinite;
}
@keyframes confetti-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(16px) rotate(140deg); }
}

.poster > * { position: relative; z-index: 2; }

.poster__greeting {
  margin: 0 0 4px;
  padding: 6px 16px;
  border: 1px dashed rgba(240, 205, 125, 0.55);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--gold-soft);
  background: rgba(240, 205, 125, 0.07);
}
.poster__greeting b { font-weight: 600; color: var(--paper); }

/* graduate portrait — gold-ringed circle above the names. Replace the
   image, or delete the .poster__photo <figure> in index.html to hide it.
   Clicking the photo opens it full-size with zoom (main.js). */
.poster__photo {
  margin: 0 0 6px;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--gold-soft), var(--gold-deep));
  box-shadow: 0 12px 32px rgba(19, 31, 56, 0.45);
}
.poster-photo-open {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
}
.poster__photo img {
  display: block;
  width: clamp(104px, 19vw, 136px);
  height: clamp(104px, 19vw, 136px);
  object-fit: cover;
  border-radius: 50%;
  background: var(--ink);
}
@media (max-height: 760px) {
  .poster__photo img { width: 92px; height: 92px; }
}

.poster__eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(247, 240, 223, 0.62);
}

.poster__names {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.005em;
  text-wrap: balance;
  color: var(--paper);
}
/* second honoree (twins, siblings…) gets a gold "&" divider */
.honoree + .honoree::before { content: " & "; color: var(--gold); font-style: italic; font-weight: 600; }

.poster__class {
  margin: 0;
  font-size: clamp(15px, 2.6vw, 19px);
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
}
.poster__year { font-style: italic; letter-spacing: 0.18em; }

.poster__cap { margin: 4px 0 0; opacity: 0.95; }

.poster__degree {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(16px, 2.6vw, 20px);
  font-weight: 600;
  font-style: italic;
  color: var(--paper);
}
.poster__school {
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 240, 223, 0.66);
}

.poster__rule {
  width: 120px;
  height: 1px;
  margin: 6px 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.poster__line { margin: 0; font-size: 14.5px; line-height: 1.6; color: rgba(247, 240, 223, 0.85); max-width: 42ch; }

.poster__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin: 6px 0 0;
}
.poster__fact {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(240, 205, 125, 0.1);
  border: 1px solid rgba(217, 164, 65, 0.35);
  font-size: 13.5px;
}
.poster__fact-key {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-soft);
}

.poster__cta { margin: 8px 0 0; font-size: 12.5px; color: rgba(247, 240, 223, 0.6); }

/* ── countdown tiles (ceremony) ───────────────────────────────────────── */
.countdown-tiles {
  margin: 0 0 28px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #182744, #101b34);
  border: 1px solid rgba(217, 164, 65, 0.35);
  color: var(--paper);
  text-align: center;
}
.countdown-tiles__label {
  margin: 0 0 12px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
.tiles { display: flex; justify-content: center; gap: 10px; }
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 62px;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(247, 240, 223, 0.07);
  border: 1px solid rgba(247, 240, 223, 0.12);
}
.tile-num {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.6vw, 30px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
.tile-cap { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(247, 240, 223, 0.6); }
.countdown-tiles__here { margin: 12px 0 0; font-family: var(--font-display); font-style: italic; color: var(--gold-soft); }

/* ── event cards ──────────────────────────────────────────────────────── */
.block-title {
  margin: 30px 0 12px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
}

.event-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .event-list { grid-template-columns: 1fr; } }

.event-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 6px 22px rgba(19, 31, 56, 0.07);
}
.event-item__chip {
  align-self: flex-start;
  margin-bottom: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--gold-soft);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.event-item__title { margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 900; }
.event-item__when { margin: 2px 0 0; font-size: 13.5px; font-weight: 600; color: var(--gold-deep); }
.event-item__where { margin: 0; font-size: 14px; }
.event-item__addr { margin: 0; font-size: 12.5px; color: var(--muted); }
.event-item__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ── timeline ─────────────────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), rgba(217, 164, 65, 0.25));
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  font-size: 14.5px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 15px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--bg);
}
.timeline-item__time {
  flex: none;
  width: 74px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}
.timeline-item__text { color: var(--ink); }

/* ── notes ────────────────────────────────────────────────────────────── */
.notes {
  margin-top: 26px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(217, 164, 65, 0.1);
  border: 1px dashed rgba(176, 127, 42, 0.4);
}
.note { margin: 0 0 8px; font-size: 13.5px; line-height: 1.6; }
.note:last-child { margin-bottom: 0; }
.note strong { color: var(--gold-deep); }

/* ── free note page (optional "anything else" panel) ────────────────────
   Repeatable .free-block cards: a free title, free text and an OPTIONAL
   photo (the figure is removed by main.js when the image field is empty,
   so a block renders as title + text without it). Clicking the photo
   opens the same full-screen viewer as the gallery (main.js). */
.free-blocks { display: grid; gap: 16px; }
.free-block {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 6px 22px rgba(19, 31, 56, 0.07);
}
.free-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 900;
}
.free-content { font-size: 14.5px; line-height: 1.65; }
.free-content p { margin: 0 0 10px; }
.free-content p:last-child { margin-bottom: 0; }
.free-figure { margin: 16px 0 0; }
.free-figure .gallery-open { border-radius: 14px; overflow: hidden; }
.free-figure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--ink);
}
.free-cap {
  margin: 8px 4px 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
.free-cap::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 7px 2px 0;
  border-radius: 50%;
  background: var(--gold);
}

/* ── gallery (optional photo wall — Panel 3) ──────────────────────────── */
/* CSS-columns masonry: each item keeps its own ratio, so the wall feels
   like a scrapbook. Real photos of any size/ratio fit — nothing is cropped.
   Every photo is wrapped in a .gallery-open <button> — clicking opens the
   full-screen viewer with zoom (main.js); the badge below hints at it. */
.gallery {
  columns: 3 230px;
  column-gap: 14px;
}
.gallery__item {
  break-inside: avoid;
  margin: 0 0 14px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(19, 31, 56, 0.08);
}
.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
}
.gallery__item img { width: 100%; display: block; }
.gallery__item figcaption {
  padding: 9px 12px 11px;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}
.gallery__item figcaption::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 7px 2px 0;
  border-radius: 50%;
  background: var(--gold);
}
html.js:not(.no-motion) .gallery__item img { transition: transform 0.35s ease; }
html.js:not(.no-motion) .gallery__item:hover img { transform: scale(1.03); }

/* small "view full size" badge on hover / keyboard focus — shows a photo
   is clickable. Purely visual; without JS (no viewer) it never appears. */
html.js .gallery-open,
html.js .poster-photo-open { position: relative; cursor: zoom-in; }
html.js .gallery-open::after,
html.js .poster-photo-open::after {
  content: "";
  position: absolute;
  top: 10px; right: 10px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(247, 240, 223, 0.94)
    url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23131f38' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L21 21'/%3E%3C/svg%3E")
    center / 16px no-repeat;
  border: 1px solid rgba(217, 164, 65, 0.65);
  box-shadow: 0 4px 12px rgba(19, 31, 56, 0.28);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}
html.js .gallery-open:hover::after,
html.js .gallery-open:focus-visible::after,
html.js .poster-photo-open:hover::after,
html.js .poster-photo-open:focus-visible::after {
  opacity: 1;
  transform: none;
}

/* ── official flyer / banner (optional, Details panel) ───────────────────
   A wide framed image slot for hosts who already have a designed flyer or
   poster for the event — display it so guests can confirm they're in the
   right place. Clicking it opens the same full-screen viewer as the photos. */
.banner-flyer {
  margin: 0 0 28px;
  padding: 10px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid rgba(217, 164, 65, 0.45);
  box-shadow: 0 10px 30px rgba(19, 31, 56, 0.1);
  text-align: center;
}
.banner-flyer .gallery-open { border-radius: 14px; overflow: hidden; }
.banner-flyer img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 3;
  object-fit: cover;
  background: var(--ink);
}
.banner-flyer figcaption {
  margin: 10px 4px 4px;
  font-size: 12.5px;
  color: var(--muted);
}
.banner-flyer figcaption::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 7px 2px 0;
  border-radius: 50%;
  background: var(--gold);
}

/* ── film feature (optional video embed — Film panel) ────────────────────
   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. */
.film-card { text-align: center; }
.film-frame {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: var(--ink); /* mat behind the poster / while loading */
  border: 1px solid rgba(217, 164, 65, 0.45);
  box-shadow: var(--shadow);
}
.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(--ink);
  background: radial-gradient(circle at 32% 28%, var(--gold-soft), var(--gold) 55%, var(--gold-deep));
  border: 1px solid rgba(247, 240, 223, 0.5);
  box-shadow: 0 12px 28px rgba(19, 31, 56, 0.5);
  animation: film-pulse 2.6s ease-in-out infinite;
  transition: transform 0.25s;
}
.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(--gold-soft); outline-offset: -3px; }
.film-hint {
  position: absolute; left: 50%; bottom: 14px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(13, 23, 48, 0.72);
  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);
}
.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: rgba(247, 240, 223, 0.7);
  font-size: 13.5px; font-style: italic; text-align: center;
  background: var(--ink);
}
.film-external {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(176, 127, 42, 0.5);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.film-external:hover { color: var(--gold); border-color: var(--gold); }
.film-external[hidden] { display: none; }
@keyframes film-pulse {
  0%, 100% { box-shadow: 0 12px 28px rgba(19, 31, 56, 0.5), 0 0 0 0 rgba(217, 164, 65, 0.4); }
  50% { box-shadow: 0 12px 28px rgba(19, 31, 56, 0.5), 0 0 0 14px rgba(217, 164, 65, 0); }
}

/* ── poster backdrop chip (only rendered when .poster--photo-bg is on) ───
   A quiet "view backdrop" pill in the corner of the poster — clicking it
   opens the backdrop photo in the full-screen viewer (main.js). */
.poster-backdrop-open {
  position: absolute;
  right: 14px; bottom: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(240, 205, 125, 0.45);
  background: rgba(13, 23, 48, 0.6);
  color: var(--gold-soft);
  font: 600 11px var(--font-ui);
  letter-spacing: 0.1em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  transition: background 0.2s, border-color 0.2s;
}
.poster-backdrop-open svg { width: 14px; height: 14px; }
.poster-backdrop-open:hover { background: rgba(13, 23, 48, 0.82); border-color: var(--gold-soft); }
.poster-backdrop-open:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; }

/* ── photo viewer (lightbox) — click any photo to view it full-screen ────
   Built by main.js only when a photo feature exists, so removing those
   blocks removes the viewer entirely — nothing orphaned, no platform
   contract. Features: full-size view, click-to-zoom with panning (or the
   zoom button / Z key), prev/next, caption, "Open full size" link. */
.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(13, 23, 48, 0.94);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-width: min(92vw, 880px);
  max-height: 76vh;
  max-height: 76dvh;
  width: auto; height: auto;
  border-radius: 14px;
  border: 1px solid rgba(217, 164, 65, 0.5);
  box-shadow: 0 34px 90px -30px rgba(0, 0, 0, 0.85);
  cursor: zoom-in;
  transition: transform 0.25s;
}
/* 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-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold-soft);
  text-align: center;
}
.lightbox-hint {
  margin: 8px 0 0;
  font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(247, 240, 223, 0.55);
  text-align: center;
}
.lightbox-original {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(217, 164, 65, 0.55); border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-soft); text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.lightbox-original:hover { background: var(--gold); color: var(--ink); }
.lightbox-close,
.lightbox-prev,
.lightbox-next,
.lightbox-zoom {
  position: absolute;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid rgba(217, 164, 65, 0.55); border-radius: 50%;
  background: rgba(19, 31, 56, 0.75);
  color: var(--gold-soft);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover, .lightbox-zoom:hover {
  background: var(--gold); color: var(--ink);
}
.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; }
.lightbox :focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }
@media (max-width: 560px) {
  .lightbox { flex-direction: column; gap: 10px; }
  .lightbox img { max-height: 62vh; max-height: 62dvh; }
  .lightbox-prev, .lightbox-next { position: static; transform: none; }
  .lightbox-prev:hover, .lightbox-next:hover { transform: scale(1.06); }
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; }
  .lightbox-close { top: calc(10px + env(safe-area-inset-top)); right: 10px; }
  .lightbox-zoom { bottom: calc(10px + env(safe-area-inset-bottom)); right: 10px; }
}

/* ── brand footer (placeholder, tucked into the last panel by main.js) ───
   No-JS: a plain closing line at the end of the stacked document. JS shell:
   hidden where it starts (after </main>), then initFooter() moves it into
   the last existing panel so it reads as the invitation's closing line —
   even when RSVP / Guestbook are stripped. */
html:not(.js) .app-footer { display: block; padding: 26px 18px 42px; text-align: center; }
html.js .app-footer { display: none; }
html.js .panel .app-footer {
  display: block;
  margin-top: clamp(30px, 6vmin, 48px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.footer-brand {
  margin: 0;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.25em;
  text-transform: none; letter-spacing: 0.02em;
  color: var(--gold-deep);
}

/* ── forms (RSVP + injected guestbook) ────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 13px; font-weight: 600; }
.form-group label small { font-weight: 400; color: var(--muted); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: 400 15px var(--font-ui);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group textarea { resize: vertical; min-height: 72px; }
.form-group input::placeholder, .form-group textarea::placeholder { color: #9aa3b2; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.22);
}
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235c6577' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-hint { margin: -6px 0 16px; font-size: 12.5px; color: var(--muted); }

.error { display: block; color: var(--danger); font-size: 12.5px; }

/* decline state: hide party-size & meals, show the miss-you note */
.rsvp-extras { transition: opacity 0.25s; }
.rsvp-form.is-declining .rsvp-extras { display: none; }
.declined-note {
  display: none;
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(89, 165, 163, 0.12);
  border: 1px solid rgba(89, 165, 163, 0.4);
  font-size: 13.5px;
  color: #1d5c5a;
}
.rsvp-form.is-declining .declined-note { display: block; }

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 15px var(--font-ui);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.btn--primary { background: var(--gold); color: var(--ink); box-shadow: 0 8px 22px rgba(176, 127, 42, 0.4); }
.btn--primary:hover { background: var(--gold-soft); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-deep); }
.btn--quiet { border-color: transparent; color: var(--muted); padding-left: 10px; padding-right: 10px; }
.btn--quiet:hover { color: var(--gold-deep); border-color: transparent; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: wait; }

/* loading node (driven by the platform script) */
.loading { display: none; text-align: center; color: var(--muted); font-size: 13.5px; padding: 10px 0 0; }

/* RSVP deadline countdown (platform-driven .count-*) */
.rsvp-countdown {
  margin: -6px 0 22px;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(217, 164, 65, 0.1);
  border: 1px dashed rgba(176, 127, 42, 0.45);
  text-align: center;
  font-size: 13.5px;
}
.rsvp-countdown__label { margin: 0 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-deep); }
.rsvp-countdown__nums { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.rsvp-countdown__nums span { color: var(--gold-deep); font-size: 17px; }

/* ── guestbook (Style A: platform injects form + list into .guestbook-body) ── */
.guestbook-section #guestbookForm .form-group { margin-bottom: 14px; }
.guestbook-section #guestbookForm button[type="submit"] {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px auto 0;
  padding: 12px 26px;
  border-radius: 999px;
  border: none;
  background: var(--gold) !important;
  color: var(--ink) !important;
  font: 600 15px var(--font-ui);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(176, 127, 42, 0.35);
}
.guestbook-section #guestbookForm button[type="submit"]:hover { background: var(--gold-soft) !important; }

/* injected message list — neutralise the engine's inline scroll box */
.guestbook-section #comments-container {
  margin-top: 28px !important;
  border-top: 1px solid var(--line) !important;
  max-height: none !important;
  overflow: visible !important;
}
.guestbook-section .guestbook-entry {
  padding: 14px 16px;
  margin-top: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
}
.guestbook-section .guestbook-entry h5 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.guestbook-section .guestbook-entry p { margin: 0 0 4px; font-size: 14px; line-height: 1.55; }
.guestbook-section .guestbook-entry small { color: var(--muted); font-size: 12px; }

.guestbook-section .more-guestbook-wrap { text-align: center; margin-top: 18px; }
.guestbook-section #load-more {
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 600 14px var(--font-ui);
  cursor: pointer;
}
.guestbook-section #load-more:hover { border-color: var(--gold); color: var(--gold-deep); }

/* thank-you / closed states injected by the platform scripts */
.thank-you-message { text-align: center; padding: 26px 12px; }
.thank-you-message h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: 26px; font-weight: 900; }
.thank-you-message p { margin: 4px 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ── foot ─────────────────────────────────────────────────────────────── */
.foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px clamp(14px, 3vw, 28px);
  background: var(--ink);
  color: rgba(247, 240, 223, 0.72);
  border-top: 1px solid rgba(240, 205, 125, 0.25);
  font-size: 12px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.foot::-webkit-scrollbar { display: none; }
.foot__dot { opacity: 0.5; }

/* ── powered-by brand strip (full-width, bottom of the shell) ────────────
   A slim "Powered by Kundangi" line. The literal Kundangi token inside
   .link-footer is swapped for the platform name at render; the cockpit's
   Free Powered By field can override the whole line. */
.powered-by {
  width: 100%;
  text-align: center;
  padding: 9px clamp(14px, 3vw, 28px) calc(9px + env(safe-area-inset-bottom, 0px));
  background: #0d1730;
  color: rgba(247, 240, 223, 0.62);
  border-top: 1px solid rgba(240, 205, 125, 0.25);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.powered-by .link-footer {
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--gold-soft);
}

/* ── focus visibility (global) ────────────────────────────────────────── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ── short screens: reclaim vertical space ────────────────────────────── */
@media (max-height: 620px) {
  .masthead { padding-top: 6px; padding-bottom: 6px; }
  .masthead__top { display: none; }
  .foot { display: none; }
}
@media (max-width: 480px) {
  .chip-btn { padding: 8px 10px; }
  .chip-btn__label { display: none; }
}

/* ── reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
html.no-motion *, html.no-motion *::before, html.no-motion *::after {
  animation: none !important;
  transition: none !important;
}

/* ── print: flatten to readable pages ─────────────────────────────────── */
@media print {
  html.js .app { height: auto; display: block; overflow: visible; }
  html.js .panel { display: block !important; overflow: visible !important; }
  html.js .panel.hero-panel.is-active { display: block !important; }
  .masthead__actions, .tabs, .foot, .powered-by, .no-print { display: none !important; }
  .lightbox, .poster-backdrop-open { display: none !important; }
  body { background: #fff; }
  .panel-inner { max-width: none; padding: 12px; }
  .poster { box-shadow: none; border: 1px solid #131f38; page-break-inside: avoid; }
  .poster__confetti { display: none; }
  .gallery { columns: 2; column-gap: 12px; }
  .gallery__item { break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
