/* ═══════════════════════════════════════════════════════════════════════
   wedding-black-tie-flyer-obsidian-gala — "Obsidian Gala" statement poster
   Monochrome night + gold foil · Cormorant Garamond + Jost
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0b0b0e;              /* obsidian backdrop */
  --bg-deep: #070709;
  --panel: #101014;           /* poster card */
  --panel-raised: #16161c;    /* raised surfaces (forms, cards) */
  --ink: #f3ede1;             /* ivory ink on dark */
  --ink-dim: rgba(243, 237, 225, 0.62);
  --ink-faint: rgba(243, 237, 225, 0.4);
  --gold: #c8a35f;            /* foil gold */
  --gold-bright: #e6c889;
  --gold-deep: #8f6c33;
  --line: rgba(200, 163, 95, 0.3);
  --line-soft: rgba(243, 237, 225, 0.12);
  --danger: #e07b6b;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-ui: "Jost", ui-sans-serif, system-ui, sans-serif;
}

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

/* Visually hidden but announced by screen readers — used by the copy-link
   live region (#copy-status). Same pattern as the browser default. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 120% 70% at 50% -12%, rgba(200, 163, 95, 0.08), transparent 55%),
    radial-gradient(ellipse 90% 60% at 50% 115%, rgba(200, 163, 95, 0.05), transparent 60%);
  -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; }

::selection { background: var(--gold); color: var(--bg); }

/* ── single-viewport shell (JS on) ────────────────────────────────────── */
html.js .app {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  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 (the 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: calc(10px + env(safe-area-inset-top)) clamp(14px, 3vw, 28px) 10px;
  background: var(--bg-deep);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 5;
}

.masthead__brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.masthead__mark { display: inline-flex; flex: none; opacity: 0.95; }
.masthead__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.masthead__top { font-size: 10.5px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); }
.masthead__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.masthead__name i { color: var(--gold-bright); font-style: italic; padding: 0 2px; }

.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: 2px;
  border: 1px solid var(--line);
  background: rgba(200, 163, 95, 0.06);
  color: var(--ink);
  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(200, 163, 95, 0.16); border-color: var(--gold); }
.chip-btn:active { transform: translateY(1px); }
.chip-btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
.chip-btn.is-done { border-color: #8fbf9a; color: #cfe9d6; }

/* ── tabs ─────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 6px;
  padding: 8px clamp(14px, 3vw, 28px);
  padding-left: max(clamp(14px, 3vw, 28px), env(safe-area-inset-left));
  padding-right: max(clamp(14px, 3vw, 28px), env(safe-area-inset-right));
  overflow-x: auto;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  background: var(--bg-deep);
  border-bottom: 1px solid rgba(243, 237, 225, 0.07);
}
.tabs::-webkit-scrollbar { display: none; }

/* scroll-hint fades on the tab bar — JS toggles .is-fade-* on .tabs-wrap
   only while the bar actually overflows (many tabs on a phone) */
.tabs-wrap { position: relative; }
.tabs-wrap::before,
.tabs-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36px;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.tabs-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg-deep) 30%, transparent); }
.tabs-wrap::after  { right: 0; background: linear-gradient(270deg, var(--bg-deep) 30%, transparent); }
.tabs-wrap.is-fade-left::before,
.tabs-wrap.is-fade-right::after { opacity: 1; }

/* prev/next icon buttons for the tab bar — shown on mobile, where the bar
   scrolls sideways. They sit at the bar's edges (over the fade hints, so
   they read as arrows) and step through the sections like a carousel
   (wired in main.js initTabs). Hidden without JS and on desktop. */
.tab-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 44px;
  padding: 0;
  border: 0;
  background: var(--bg-deep);
  color: var(--gold-bright);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.tab-arrow:hover { color: var(--ink); background: #101016; }
.tab-arrow:active { transform: translateY(-50%) translateY(1px); }
.tab-arrow:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: -2px; }
.tab-arrow--prev { left: 0; }
.tab-arrow--next { right: 0; }
@media (max-width: 640px) {
  .tab-arrow { display: flex; }
}
html:not(.js) .tab-arrow { display: none !important; }

.tab {
  appearance: none;
  flex: none;
  padding: 8px 16px;
  border-radius: 2px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-dim);
  font: 500 12.5px var(--font-ui);
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tab:hover { color: var(--ink); }
.tab.is-active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  font-weight: 600;
}
.tab:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 2px; }
/* roomier touch targets on phones */
@media (max-width: 560px) {
  .tab { padding: 11px 15px; font-size: 13px; min-height: 40px; }
  .tabs { padding-top: 6px; padding-bottom: 6px; }
}

/* ── hero stack: optional invitation flyer + the statement poster ─────── */
.hero-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 4vh, 34px);
  width: 100%;
  max-width: 760px;
  margin: auto;
  padding: clamp(20px, 4vh, 40px) clamp(16px, 4vw, 32px) 48px;
}

/* ── optional official invitation flyer / banner ──────────────────────── */
.flyer-card {
  margin: 0;
  width: 100%;
  max-width: 430px;
  text-align: center;
}
.flyer-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--panel-raised);
  box-shadow: var(--shadow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.flyer-open img, .flyer-open picture {
  display: block;
  width: 100%;
  height: auto;
}
html.js .flyer-open { cursor: zoom-in; }
.flyer-open:hover,
.flyer-open:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(200, 163, 95, 0.35);
  transform: translateY(-2px);
}
.flyer-card figcaption {
  margin-top: 10px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-dim);
}
.flyer-card__hint { color: var(--ink-faint); font-size: 12.5px; }

/* ── 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: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.section-head h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.6vw, 40px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: 0.005em;
}
.lede { margin: 0; color: var(--ink-dim); font-size: 15px; line-height: 1.65; max-width: 52ch; }
.lede strong { color: var(--gold-bright); font-weight: 500; }

/* ── the poster ───────────────────────────────────────────────────────── */
.poster {
  position: relative;
  max-width: 700px;
  width: 100%;
  margin: auto;
  padding: clamp(30px, 5.5vh, 54px) clamp(22px, 5vw, 52px) clamp(26px, 4.5vh, 42px);
  background:
    radial-gradient(ellipse 90% 45% at 50% -8%, rgba(200, 163, 95, 0.12), transparent 60%),
    linear-gradient(178deg, #17171d 0%, #101014 58%, #0c0c10 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2.2vh, 20px);
}
/* inner hairline frame (the "engraved plate" ring) */
.poster::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(200, 163, 95, 0.32);
  pointer-events: none;
}
/* bottom fade so the plate sits on the night */
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

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

/* gold corner diamonds */
.poster__corner {
  position: absolute;
  width: 13px;
  height: 13px;
  border: 1px solid var(--gold-bright);
  transform: rotate(45deg);
  opacity: 0.85;
  z-index: 2;
  pointer-events: none;
}
.poster__corner--tl { top: 18px; left: 18px; }
.poster__corner--tr { top: 18px; right: 18px; }
.poster__corner--bl { bottom: 18px; left: 18px; }
.poster__corner--br { bottom: 18px; right: 18px; }

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

/* optional backdrop photo behind the plate — delete the .poster__backdrop
   element in index.html (or display:none it) to return to the pure plate.
   It is a real <button>: click it (in the plate's empty areas) to open the
   photo full-screen in the viewer. */
.poster > .poster__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
}
.poster__backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}
.poster__backdrop:hover img { opacity: 0.66; }
.poster__backdrop:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--gold-bright);
}
/* heavy obsidian scrim keeps the ivory/gold text fully legible over any photo */
.poster__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 130% 80% at 50% 6%, rgba(11, 11, 14, 0.6), transparent 62%),
    linear-gradient(180deg, rgba(11, 11, 14, 0.8), rgba(11, 11, 14, 0.55) 42%, rgba(11, 11, 14, 0.78) 80%, rgba(11, 11, 14, 0.9));
}

.poster__greeting {
  margin: 0 0 2px;
  padding: 6px 16px;
  border: 1px dashed rgba(230, 200, 137, 0.6);
  border-radius: 2px;
  font-size: 12.5px;
  color: var(--gold-bright);
  background: rgba(200, 163, 95, 0.07);
}
.poster__greeting b { font-weight: 500; color: var(--ink); }

.poster__monogram { margin: 2px 0 0; opacity: 0.95; }

.poster__eyebrow {
  margin: 0;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.poster__names {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.08em;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 9vw, 4.6rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--ink);
}
/* hosts who add a second honoree on one side get an automatic gold "&" */
.honoree + .honoree::before { content: " & "; color: var(--gold-bright); font-style: italic; letter-spacing: 0.05em; }

.poster__amp {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  padding: 0 0.55em;
  color: var(--gold-bright);
}
.poster__amp span {
  font-style: italic;
  font-weight: 500;
  font-size: 0.62em;
  line-height: 1;
}
.poster__amp::before, .poster__amp::after {
  content: "";
  width: 0.6em;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.poster__ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(340px, 80%);
  color: var(--gold);
}
.poster__ornament span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.poster__ornament i { font-style: normal; font-size: 9px; letter-spacing: 0; }

.poster__request {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(15px, 2.5vw, 18.5px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-dim);
}

.poster__date {
  margin: 0;
  font-size: clamp(13px, 2.2vw, 16px);
  line-height: 1.7;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.poster__date em {
  display: block;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

.poster__dress {
  margin: 0;
  padding: 7px 22px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  text-indent: 0.5em; /* optically re-centre the tracked caps */
  color: var(--gold-bright);
  background: rgba(200, 163, 95, 0.07);
}

.poster__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 14px;
  margin: 2px 0 0;
}
.poster__fact {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(243, 237, 225, 0.03);
  font-size: 13px;
  color: var(--ink-dim);
}
.poster__fact-key {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}

.poster__cta { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.poster__cta strong { color: var(--gold-bright); font-weight: 500; }

/* ── reveal-on-scroll (gated: html.no-motion / reduced-motion disable) ── */
[data-reveal] { opacity: 0; transform: translateY(10px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .panel.is-active [data-reveal].is-visible,
html.no-motion [data-reveal],
html:not(.js) [data-reveal] { opacity: 1; transform: none; }

/* ── countdown tiles (ceremony) ───────────────────────────────────────── */
.countdown-tiles {
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: linear-gradient(135deg, #181820, #0e0e13);
  color: var(--ink);
  text-align: center;
}
.countdown-tiles__label {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.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: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(243, 237, 225, 0.04);
}
.tile-num {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.8vw, 32px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--gold-bright);
}
.tile-cap { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint); }
.countdown-tiles__here { margin: 12px 0 0; font-family: var(--font-display); font-style: italic; color: var(--gold-bright); }

/* ── event cards ──────────────────────────────────────────────────────── */
.block-title {
  margin: 30px 0 12px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.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: 1px solid var(--line-soft);
  border-radius: 2px;
  background: var(--panel-raised);
}
.event-item__chip {
  align-self: flex-start;
  margin-bottom: 6px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  color: var(--gold-bright);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.event-item__title { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 500; }
.event-item__when { margin: 2px 0 0; font-size: 13px; font-weight: 500; color: var(--gold); }
.event-item__where { margin: 0; font-size: 14px; color: var(--ink); }
.event-item__addr { margin: 0; font-size: 12.5px; color: var(--ink-faint); }
.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: 1px;
  background: linear-gradient(180deg, var(--gold), rgba(200, 163, 95, 0.2));
}
.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: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: var(--gold);
  border: 1px solid var(--bg);
}
.timeline-item__time {
  flex: none;
  width: 78px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--gold-bright);
}
.timeline-item__text { color: var(--ink); }

/* ── notes ────────────────────────────────────────────────────────────── */
.notes {
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px dashed rgba(200, 163, 95, 0.45);
  border-radius: 2px;
  background: rgba(200, 163, 95, 0.06);
}
.note { margin: 0 0 8px; font-size: 13.5px; line-height: 1.6; color: var(--ink-dim); }
.note:last-child { margin-bottom: 0; }
.note strong { color: var(--gold-bright); font-weight: 500; }

/* ── gallery (photo showcase — optional panel) ────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.gallery-item { margin: 0; }
.gallery-item--wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .gallery-grid { grid-template-columns: 1fr; } }

.gallery-item img {
  display: block;
  width: 100%; height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: var(--panel-raised);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.gallery-item--wide img { aspect-ratio: 21 / 9; }
html.js .gallery-item img { cursor: zoom-in; }
.gallery-item img:hover,
.gallery-item img:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(200, 163, 95, 0.35);
}
.gallery-item figcaption {
  margin-top: 8px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-dim);
}

/* ── free page (optional repeatable free blocks — see README “Free page”) ── */
.free-blocks {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.free-block {
  padding: 20px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: var(--panel-raised);
}
.free-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.free-content {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--ink-dim);
}
.free-content p { margin: 0; }
.free-figure { margin: 14px 0 0; }
.free-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: var(--panel-raised);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.free-open img, .free-open picture {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
}
html.js .free-open { cursor: zoom-in; }
.free-open:hover,
.free-open:focus-visible {
  border-color: var(--gold);
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(200, 163, 95, 0.35);
}

/* ── full-screen photo viewer (built by main.js; pure enhancement) ────── */
.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  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(7, 7, 9, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overscroll-behavior: contain;
}
.photo-viewer.is-open { display: flex; }
.photo-viewer figure {
  margin: 0;
  max-width: min(92vw, 980px);
  max-height: 82dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.photo-viewer img {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  max-height: 74dvh;
  width: auto;
  height: auto;
  border: 1px solid var(--gold);
  background: var(--bg-deep);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.85);
  transform-origin: 50% 50%;
  transition: transform 0.2s ease;
  cursor: zoom-in;
}
.photo-viewer img.is-zoomed { cursor: zoom-out; }

/* zoom controls + position counter (built by main.js) */
.pv-counter {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: var(--ink-faint);
  font-size: 12px;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}
.pv-zoom {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.pv-zbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(22, 22, 28, 0.92);
  color: var(--gold-bright);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.pv-zbtn:hover { transform: scale(1.06); border-color: var(--gold); background: rgba(200, 163, 95, 0.16); }
.pv-zbtn.is-dimmed { opacity: 0.4; }
.pv-zbtn svg { width: 18px; height: 18px; }
.photo-viewer .pv-btn[hidden] { display: none; }
.photo-viewer figcaption {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  color: var(--gold-bright);
}
/* on-palette note shown in place of a broken/missing photo file */
.photo-viewer .pv-unavailable {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(72vw, 520px);
  height: min(46vh, 340px);
  border: 1px dashed var(--line);
  border-radius: 2px;
  background: var(--panel);
  color: var(--ink-dim);
  font-size: 14px;
  font-style: italic;
}

.pv-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(22, 22, 28, 0.92);
  color: var(--gold-bright);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.pv-btn:hover { transform: scale(1.06); border-color: var(--gold); background: rgba(200, 163, 95, 0.16); }
.pv-close { top: calc(14px + env(safe-area-inset-top)); right: calc(14px + 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(--gold-bright); outline-offset: 3px; }

/* Narrow screens: nav/zoom drop below the photo so they never cover it. */
@media (max-width: 520px) {
  .photo-viewer { flex-direction: row; flex-wrap: wrap; align-content: center; gap: 10px; }
  .photo-viewer img { max-height: 58vh; max-height: 58dvh; }
  .photo-viewer figure { flex: 1 1 100%; justify-content: center; }
  .pv-prev, .pv-next { position: static; transform: none; width: 40px; height: 40px; }
  .pv-prev:hover, .pv-next:hover { transform: scale(1.06); }
  .pv-counter { position: static; transform: none; width: 100%; text-align: center; }
  .pv-zoom { position: static; transform: none; }
  .photo-viewer .pv-close { top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right)); }
}

/* ── film (optional video embed — see README “Media features”) ────────── */
.film-wrap { max-width: 640px; margin: 0 auto; }
.film-card { text-align: center; }
.film-label {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
}
.film-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: #0d0d11;
  box-shadow: var(--shadow);
}
.film-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.film-open img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: linear-gradient(160deg, #1d1d25, #0a0a0e);
}
.film-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(56px, 12vmin, 74px);
  height: clamp(56px, 12vmin, 74px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg);
  background: radial-gradient(circle at 32% 28%, var(--gold-bright), var(--gold) 58%, var(--gold-deep));
  border: 1px solid rgba(243, 237, 225, 0.35);
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.7);
  animation: film-pulse 2.6s ease-in-out infinite;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.film-play svg { width: 26px; height: 26px; margin-left: 3px; }
.film-open:hover .film-play,
.film-open:focus-visible .film-play { transform: translate(-50%, -50%) scale(1.08); }
.film-open:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.film-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(200, 163, 95, 0.35);
  background: rgba(11, 11, 14, 0.66);
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 500;
  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: var(--ink-dim);
  font-size: 13.5px;
  font-style: italic;
  text-align: center;
  background: var(--panel);
}
.film-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-bright);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.film-external:hover { color: var(--ink); border-color: var(--gold); }
.film-external[hidden] { display: none; }
@keyframes film-pulse {
  0%, 100% { box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.7), 0 0 0 0 rgba(200, 163, 95, 0.45); }
  50% { box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.7), 0 0 0 14px rgba(200, 163, 95, 0); }
}

/* ── forms (RSVP + injected guestbook) ────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-group label { font-size: 12.5px; font-weight: 500; letter-spacing: 0.03em; }
.form-group label small { font-weight: 400; color: var(--ink-faint); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 2px;
  border: 1px solid var(--line-soft);
  background: #0d0d11;
  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: var(--ink-faint); }
.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(200, 163, 95, 0.18);
}
.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='%23c8a35f' 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(--ink-faint); }

.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: 1px solid rgba(230, 200, 137, 0.4);
  border-radius: 2px;
  background: rgba(200, 163, 95, 0.08);
  font-size: 13.5px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-bright);
}
.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: 2px;
  border: 1px solid transparent;
  font: 500 14.5px 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-bright); outline-offset: 2px; }
.btn--primary { background: var(--gold); color: var(--bg); box-shadow: 0 10px 26px rgba(143, 108, 51, 0.35); }
.btn--primary:hover { background: var(--gold-bright); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); }
.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(--ink-faint); font-size: 13px; padding: 10px 0 0; }

/* RSVP deadline countdown (platform-driven .count-*) */
.rsvp-countdown {
  margin: -6px 0 22px;
  padding: 12px 18px;
  border: 1px dashed rgba(200, 163, 95, 0.5);
  border-radius: 2px;
  background: rgba(200, 163, 95, 0.06);
  text-align: center;
  font-size: 13.5px;
}
.rsvp-countdown__label { margin: 0 0 4px; font-size: 10.5px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); }
.rsvp-countdown__nums { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink-dim); }
.rsvp-countdown__nums span { color: var(--gold-bright); font-size: 17px; }

/* ── guestbook (Style A: platform injects form + list into .guestbook-body) ── */
.guestbook-section #guestbookForm .form-group { margin-bottom: 14px; }
.guestbook-section .guestbook-chapta { margin: 4px 0 12px; }
.guestbook-section .guestbook-chapta > div { margin-inline: auto; }
.guestbook-section #guestbookForm button[type="submit"] {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px auto 0;
  padding: 12px 26px;
  border-radius: 2px;
  border: none;
  background: var(--gold) !important;
  color: var(--bg) !important;
  font: 500 14.5px var(--font-ui);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(143, 108, 51, 0.3);
}
.guestbook-section #guestbookForm button[type="submit"]:hover { background: var(--gold-bright) !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: 1px solid var(--line-soft);
  border-radius: 2px;
  background: var(--panel-raised);
}
.guestbook-section .guestbook-entry h5 { margin: 0 0 4px; font-size: 15px; font-weight: 500; }
.guestbook-section .guestbook-entry p { margin: 0 0 4px; font-size: 14px; line-height: 1.55; color: var(--ink-dim); }
.guestbook-section .guestbook-entry small { color: var(--ink-faint); font-size: 12px; }

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

/* 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: 28px; font-weight: 500; }
.thank-you-message p { margin: 4px 0; color: var(--ink-dim); font-size: 14px; line-height: 1.6; }

/* ── foot ─────────────────────────────────────────────────────────────── */
.foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px clamp(14px, 3vw, 28px) 8px;
  background: var(--bg-deep);
  color: var(--ink-faint);
  border-top: 1px solid rgba(243, 237, 225, 0.07);
  font-size: 12px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.foot::-webkit-scrollbar { display: none; }
.foot__dot { opacity: 0.5; }
/* brand placeholder — the platform may inject its own brand here */
.footer-brand {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
  white-space: nowrap;
}
.foot__fact {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.foot__fact-key {
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.foot__fact-value {
  min-width: 0;
}

/* roomier foot on phones: wrap instead of forcing a sideways scroll */
@media (max-width: 560px) {
  .foot {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    white-space: normal;
    overflow-x: visible;
    row-gap: 4px;
  }
  .foot__fact-value {
    white-space: normal;
  }
}

/* ── full-width powered-by brand strip (see README “Powered by Kundangi”) ── */
.powered-by {
  width: 100%;
  text-align: center;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: var(--bg-deep);
  border-top: 1px solid rgba(243, 237, 225, 0.07);
  color: var(--ink-faint);
  font-size: 10.5px;
  font-weight: 600;
  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-bright);
}

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

/* ── short screens: reclaim vertical space ────────────────────────────── */
@media (max-height: 620px) {
  .masthead { padding-top: 6px; padding-bottom: 6px; }
  .masthead__top { display: none; }
  .foot, .powered-by { 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, .no-print { display: none !important; }
  body { background: #fff; }
  .panel-inner { max-width: none; padding: 12px; }
  .poster {
    box-shadow: none;
    border: 1px solid #c8a35f;
    background: #fff;
    color: #1a1a1a;
    page-break-inside: avoid;
  }
  .poster::after, .poster__corner { display: none; }
  .poster__backdrop, .photo-viewer { display: none !important; }
  .film-frame iframe, .film-note { display: none !important; }
  .poster .poster__eyebrow { color: #666; }
  .poster .poster__request { color: #444; }
  .poster .poster__date, .poster .poster__dress { color: #8f6c33; }
  .poster .poster__facts { color: #444; }
  .poster .poster__cta { color: #666; }
  .poster .poster__name { color: #111; }
  .countdown-tiles, .event-item, .timeline-item, .notes { page-break-inside: avoid; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
