/* ═══════════════════════════════════════════════════════════════════════
   birthday-milestone-rose-gold-flyer-golden-years — "Golden Years" poster
   Rose-gold foil + blush champagne · Playfair Display + Jost
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #f3ded5;              /* blush champagne backdrop */
  --bg-deep: #ecd2c8;
  --panel: #fbf2ec;           /* paper tone for inner panels */
  --ink: #3b2629;             /* deep warm aubergine-cocoa */
  --ink-soft: #52383c;
  --muted: #96716f;
  --rose: #b76e79;            /* signature rose gold */
  --rose-bright: #cf8f7d;
  --rose-deep: #8c4f58;
  --champagne: #f7e7dc;
  --foil-a: #f8e0d8;
  --foil-b: #eab9a9;
  --foil-c: #cf8f7d;
  --foil-d: #a9676a;
  --line: rgba(59, 38, 41, 0.14);
  --line-rose: rgba(183, 110, 121, 0.45);
  --danger: #a3432f;
  --shadow: 0 24px 60px rgba(140, 79, 88, 0.3);
  --font-display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --font-ui: "Jost", 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(ellipse 110% 70% at 50% -14%, rgba(255, 255, 255, 0.65), transparent 55%),
    radial-gradient(ellipse 90% 65% at 50% 118%, rgba(183, 110, 121, 0.14), transparent 62%);
  -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(--rose); color: #fff; }

/* ── the rose-gold "foil" effect (metallic gradient type) ─────────────── */
.foil, .poster__num, .masthead__top {
  background-image: linear-gradient(105deg,
    var(--foil-a) 0%, var(--foil-b) 16%, var(--foil-c) 30%,
    var(--foil-d) 46%, var(--foil-b) 60%, var(--foil-a) 76%,
    var(--foil-c) 90%, var(--foil-a) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── single-viewport shell (JS on) ────────────────────────────────────── */
html.js .app {
  height: 100vh;
  height: 100dvh;
  display: grid;
  /* minmax(0,1fr): never let a row's content (e.g. the long masthead
     brand line) widen the shell past the viewport — rows shrink and
     clip/scroll inside instead of pushing the action buttons off-screen. */
  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-wrap, 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: rgba(251, 242, 236, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  border-bottom: 1px solid var(--line-rose);
  box-shadow: 0 2px 14px rgba(140, 79, 88, 0.12);
  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;
  background-image: linear-gradient(90deg, var(--rose-deep), var(--rose), var(--rose-deep));
  background-size: 200% 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.masthead__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.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 var(--line-rose);
  background: rgba(183, 110, 121, 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(183, 110, 121, 0.14); border-color: var(--rose); }
.chip-btn:active { transform: translateY(1px); }
.chip-btn:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.chip-btn.is-done { border-color: #7fae8a; color: #2f5c3a; }

/* ── tabs ─────────────────────────────────────────────────────────────── */
.tabs-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px clamp(14px, 3vw, 28px);
  background: rgba(251, 242, 236, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(59, 38, 41, 0.08);
}
.tabs {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
}
.tabs::-webkit-scrollbar { display: none; }

/* prev/next arrows for the tab strip — shown only while the strip
   overflows its container (narrow screens, many tabs), so moving
   between sections never depends on discovering the swipe. */
.tabs-arrow {
  appearance: none;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line-rose);
  background: rgba(183, 110, 121, 0.07);
  color: var(--rose-deep);
  font: 500 18px var(--font-ui);
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.tabs-arrow:hover:not(:disabled) { background: rgba(183, 110, 121, 0.16); }
.tabs-arrow:disabled { opacity: 0.3; cursor: default; }
.tabs-arrow:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }

.tab {
  appearance: none;
  flex: none;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 500 12.5px var(--font-ui);
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tab:hover { color: var(--ink); }
.tab.is-active {
  background: linear-gradient(105deg, var(--rose), var(--rose-deep));
  border-color: transparent;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(140, 79, 88, 0.35);
}
.tab:focus-visible { outline: 2px solid var(--rose); 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: 11px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.section-head h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4.6vw, 40px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: 0.005em;
}
.lede { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 52ch; }
.lede strong { color: var(--rose-deep); font-weight: 500; }

/* ── the milestone poster ─────────────────────────────────────────────── */
.poster {
  position: relative;
  max-width: 640px;
  width: 100%;
  margin: auto;
  padding: clamp(26px, 4.5vh, 44px) clamp(22px, 4.5vw, 48px) clamp(24px, 4vh, 38px);
  background:
    radial-gradient(ellipse 120% 55% at 50% -8%, rgba(255, 255, 255, 0.7), transparent 55%),
    linear-gradient(180deg, #fdf6f1, #f9eae2 60%, #f4ddd2);
  border: 1px solid var(--line-rose);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.8vh, 14px);
  overflow: hidden;
}
/* fine inner hairline — the "foil plate" ring */
.poster::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(183, 110, 121, 0.4);
  pointer-events: none;
}

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

/* corner sparkles (4-point foil stars) */
.poster__spark {
  position: absolute;
  width: 13px;
  height: 13px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.9;
}
.poster__spark::before, .poster__spark::after {
  content: "";
  position: absolute;
  background: linear-gradient(90deg, var(--foil-a), var(--foil-c));
  border-radius: 1px;
}
.poster__spark::before { left: 50%; top: 0; bottom: 0; width: 1.4px; transform: translateX(-50%); }
.poster__spark::after  { top: 50%; left: 0; right: 0; height: 1.4px; transform: translateY(-50%); }
.poster__spark--tl { top: 22px; left: 22px; }
.poster__spark--tr { top: 22px; right: 22px; }
.poster__spark--bl { bottom: 22px; left: 22px; }
.poster__spark--br { bottom: 22px; right: 22px; }
html.js:not(.no-motion) .poster__spark { animation: sparkle 3.2s ease-in-out infinite; }
html.js:not(.no-motion) .poster__spark--tr { animation-delay: 0.8s; }
html.js:not(.no-motion) .poster__spark--bl { animation-delay: 1.6s; }
html.js:not(.no-motion) .poster__spark--br { animation-delay: 2.4s; }
@keyframes sparkle {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50%      { opacity: 1; transform: scale(1.1); }
}

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

/* personalised greeting pill */
.poster__greeting {
  margin: 0 0 2px;
  padding: 6px 16px;
  border: 1px dashed var(--line-rose);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--rose-deep);
  background: rgba(183, 110, 121, 0.07);
}
.poster__greeting b { font-weight: 600; color: var(--ink); }

/* honoree photo medallion (resilient: placeholder until a photo loads) */
.poster__photo { margin: 0; }
/* …and it is clickable: tap to view the portrait larger in the lightbox */
.poster__photo button {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: zoom-in;
}
.poster__photo button:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }
.poster__photo button:hover img { box-shadow: 0 12px 26px rgba(140, 79, 88, 0.42); }
.poster__photo button:active img { transform: scale(0.97); }
.poster__photo img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--rose);
  box-shadow: 0 6px 18px rgba(140, 79, 88, 0.28);
  transition: box-shadow 0.25s ease, transform 0.15s ease;
}

.poster__eyebrow {
  margin: 0;
  font-size: clamp(11px, 1.8vw, 12.5px);
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.poster__names {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6.4vw, 3.1rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0.02em;
  text-wrap: balance;
  color: var(--ink);
}
/* shared-party support: a second honoree gets the " & " separator */
.honoree-name + .honoree-name::before { content: " & "; color: var(--rose); font-style: italic; font-weight: 500; }
/* …and an empty second slot stays invisible (single honoree, no cleanup) */
.honoree-name--second:empty { display: none; }

/* the hero: milestone numeral inside the decade ring */
.poster__hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(190px, 40vw, 248px);
  aspect-ratio: 1;
  margin: clamp(2px, 0.8vh, 8px) 0;
}

.decade-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.decade-ring__base {
  fill: rgba(255, 255, 255, 0.55);
  stroke: var(--line-rose);
  stroke-width: 1.2;
}
.decade-ring__inner {
  fill: none;
  stroke: rgba(183, 110, 121, 0.35);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}
.decade-ring__ticks line {
  stroke: var(--foil-c);
  stroke-width: 2;
  stroke-linecap: round;
}
.decade-ring__ticks line.tick--decade { stroke: var(--rose-deep); stroke-width: 3; }
.decade-ring__ticks circle { fill: rgba(183, 110, 121, 0.55); }

.poster__num {
  font-family: var(--font-display);
  font-size: clamp(5.2rem, 17vw, 8.6rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: 0.02em;
  background-size: 180% 100%;
  filter: drop-shadow(0 3px 10px rgba(140, 79, 88, 0.22));
}
html.js:not(.no-motion) .poster__num { animation: foil-shine 6s ease-in-out infinite; }
@keyframes foil-shine {
  0%, 100% { background-position: 0% 0; }
  50%      { background-position: 100% 0; }
}

.poster__num-cap {
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: var(--rose-deep);
  white-space: nowrap;
}

/* ornamental divider */
.poster__ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(300px, 76%);
  color: var(--rose);
  margin: clamp(2px, 0.8vh, 8px) 0;
}
.poster__ornament span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--rose), transparent); }
.poster__ornament svg { flex: none; }
html.js:not(.no-motion) .poster__ornament svg { animation: twinkle 2.8s ease-in-out infinite; }
@keyframes twinkle {
  0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.8; }
  50%      { transform: rotate(45deg) scale(1.15); opacity: 1; }
}

.poster__tagline {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(14px, 2.4vw, 17px);
  line-height: 1.6;
  color: var(--ink-soft);
}

.poster__facts {
  margin: clamp(2px, 1vh, 8px) 0 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.poster__fact { font-size: clamp(12.5px, 2vw, 14px); letter-spacing: 0.03em; color: var(--ink-soft); }
.poster__fact-key {
  display: inline-block;
  width: 58px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

.poster__cta {
  margin: clamp(2px, 1vh, 8px) 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(13px, 2.1vw, 15px);
  color: var(--muted);
}
.poster__cta strong { color: var(--rose-deep); font-style: normal; font-weight: 600; }

/* ── 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 (party) ──────────────────────────────────────────── */
.countdown-tiles {
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line-rose);
  border-radius: 16px;
  background: rgba(251, 242, 236, 0.8);
  box-shadow: 0 6px 22px rgba(140, 79, 88, 0.1);
  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(--rose-deep);
}
.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;
  border: 1px solid var(--line);
  background: #fffdfb;
}
.tile-num {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.8vw, 32px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--rose-deep);
}
.tile-cap { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.countdown-tiles__here { margin: 12px 0 0; font-family: var(--font-display); font-style: italic; color: var(--rose-deep); }

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

.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--rose), rgba(183, 110, 121, 0.25));
}
.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: -22.5px;
  top: 15px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
  border: 2px solid var(--bg);
}
.timeline-item__time {
  flex: none;
  width: 78px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--rose-deep);
}
.timeline-item__text { color: var(--ink); }

/* ── venue cards ──────────────────────────────────────────────────────── */
.event-list { display: grid; grid-template-columns: 1fr; gap: 14px; }

.event-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fffdfb;
  box-shadow: 0 6px 22px rgba(140, 79, 88, 0.1);
}
.event-item__chip {
  align-self: flex-start;
  margin-bottom: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-rose);
  color: var(--rose-deep);
  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: 600; }
.event-item__when { margin: 2px 0 0; font-size: 13px; font-weight: 500; color: var(--rose-deep); }
.event-item__where { margin: 0; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.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; }

/* ── notes ────────────────────────────────────────────────────────────── */
.notes {
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px dashed var(--line-rose);
  border-radius: 16px;
  background: rgba(183, 110, 121, 0.07);
}
.note { margin: 0 0 8px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.note:last-child { margin-bottom: 0; }
.note strong { color: var(--rose-deep); font-weight: 600; }

/* ── gallery (Photos panel · optional showcase) ───────────────────────── */
/* Every slot ships a themed placeholder in assets/img/gallery/ that
   renders immediately (plain <img src>, no JS). Swap the file or repoint
   the src for a real photo; delete a <figure> to drop a slot; delete the
   whole section to hide the feature (its tab disappears with it). */
.gallery-feature {
  position: relative;
  margin: 0 0 14px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line-rose);
  background: var(--champagne);
  box-shadow: 0 14px 34px rgba(140, 79, 88, 0.18);
  aspect-ratio: 16 / 9;
}
.gallery-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.gallery-open:focus-visible { outline: none; }
.gallery-open:focus-visible img { outline: 3px solid var(--rose); outline-offset: -3px; }
.gallery-feature img,
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-feature:hover img,
.gallery-item:hover img { transform: scale(1.045); }
.gallery-feature__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(59, 38, 41, 0.55));
}
.gallery-feature__cap {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  margin: 0;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 27px);
  font-weight: 600;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 14px rgba(59, 38, 41, 0.5);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.gallery-item {
  position: relative;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fffdfb;
  box-shadow: 0 8px 24px rgba(140, 79, 88, 0.12);
  aspect-ratio: 4 / 3;
}
.gallery-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 26px 12px 9px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #fff;
  text-align: left;
  background: linear-gradient(180deg, transparent, rgba(59, 38, 41, 0.62));
}
@media (max-width: 520px) { .gallery-grid { grid-template-columns: 1fr; } }

/* ── official flyer/banner (Party panel · optional) ──────────────────── */
/* The host's own designed flyer or banner graphic; guests tap it to view
   it larger and confirm they are on the right page. Remove the
   .flyer-banner block (or set showFlyer:false in main.js) to hide it. */
.flyer-banner { margin: 0 0 30px; }
.flyer-banner__card { position: relative; margin: 0; }
.flyer-banner__open {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line-rose);
  border-radius: 18px;
  overflow: hidden;
  background: var(--champagne);
  cursor: zoom-in;
  box-shadow: 0 10px 28px rgba(140, 79, 88, 0.16);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.flyer-banner__open:hover { transform: translateY(-3px); box-shadow: 0 22px 46px rgba(140, 79, 88, 0.26); }
.flyer-banner__open:active { transform: translateY(0); }
.flyer-banner__open img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.flyer-banner__chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(59, 38, 41, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}
.flyer-banner__label {
  margin: 8px 2px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13.5px;
  text-align: center;
  color: var(--muted);
}

/* ── video embed (Photos panel · optional) ───────────────────────────── */
/* A film card that plays the party recap (or any clip) in the lightbox.
   Remove the .video-section block (or set showVideo:false in main.js) to
   hide it. The video URL lives in data-video-embed on .video-open. */
.video-section { margin-top: 30px; }
.video-card { position: relative; max-width: 560px; margin: 0 auto; }
.video-open {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line-rose);
  border-radius: 18px;
  overflow: hidden;
  background: var(--champagne);
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(140, 79, 88, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.video-open:hover { transform: translateY(-3px); box-shadow: 0 24px 50px rgba(140, 79, 88, 0.28); }
.video-open:active { transform: translateY(0); }
.video-open img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(105deg, var(--rose), var(--rose-deep));
  border: 2px solid rgba(248, 224, 216, 0.85);
  color: #fff;
  font-size: 21px;
  padding-left: 5px;
  box-shadow: 0 10px 26px rgba(140, 79, 88, 0.45);
  transition: transform 0.25s ease, background 0.25s ease;
}
.video-open:hover .video-play { transform: translate(-50%, -50%) scale(1.09); filter: brightness(1.06); }
.video-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(59, 38, 41, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}
.video-card__label {
  margin: 8px 0 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 13.5px;
  color: var(--muted);
}

/* ── Free Page (optional panel · repeatable host-written blocks) ───── */
/* Each .free-block is one row of the Free Page group: a title, free
   text and an OPTIONAL photo. The engine clones the blocks from the
   host's entries and removes .free-media when a row has no image, so
   a block always reads cleanly as title + text. Tap a photo to view
   it larger in the lightbox (the same viewer as every other slot). */
.free-blocks {
  display: grid;
  gap: 22px;
  margin-top: 6px;
}
.free-block {
  position: relative;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid var(--line-rose);
  border-radius: 18px;
  background: #fffdfb;
  box-shadow: 0 10px 28px rgba(140, 79, 88, 0.14);
  text-align: center;
}
.free-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 600;
  line-height: 1.15;
  color: var(--rose-deep);
}
.free-media {
  margin: 18px auto 0;
  max-width: 560px;
}
/* no image → no media box: when the row's photo is empty the engine
   strips the img, and this hides the leftover wrapper (and its floating
   chip) instead of an empty frame */
.free-media:not(:has(img)) { display: none; }
.free-open {
  appearance: none;
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--champagne);
  cursor: zoom-in;
  box-shadow: 0 8px 24px rgba(140, 79, 88, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.free-open:hover { transform: translateY(-3px); box-shadow: 0 20px 42px rgba(140, 79, 88, 0.24); }
.free-open:active { transform: translateY(0); }
.free-open img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.free-chip {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(59, 38, 41, 0.62);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  pointer-events: none;
}
.free-content {
  margin: 18px auto 0;
  max-width: 52ch;
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--ink-soft);
  white-space: pre-line;              /* host line breaks are kept */
}

/* lightbox — tap any photo to view it up close (built by main.js).
   Pure enhancement: with JS off the grid still shows every photo. */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 3vw, 28px);
  overflow: hidden;
  background: rgba(38, 22, 24, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.gallery-lightbox__frame {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(960px, 92vw);
  max-height: 88vh;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 80px rgba(20, 8, 10, 0.55);
}
.gallery-lightbox__img {
  display: block;
  width: 100%;
  max-height: 72vh;
  margin: 0 auto;
  background: #fffdfb;
  object-fit: contain;
}
.gallery-lightbox__cap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 14px 44px 16px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-soft);
  text-align: center;
}
.gallery-lightbox__count {
  font: 500 12px var(--font-ui);
  font-style: normal;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.gallery-lightbox__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(59, 38, 41, 0.55);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.gallery-lightbox__close:hover { background: rgba(59, 38, 41, 0.82); }
.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(59, 38, 41, 0.45);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.gallery-lightbox__nav:hover { background: rgba(59, 38, 41, 0.75); }
.gallery-lightbox__nav--prev { left: 10px; }
.gallery-lightbox__nav--next { right: 10px; }

/* video mode — the embedded player (iframe, loaded on demand) */
.gallery-lightbox__video {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(960px, 92vw);
}
.gallery-lightbox__iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  background: #1c1012;
  box-shadow: 0 30px 80px rgba(20, 8, 10, 0.55);
}
.gallery-lightbox__video-cap {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--champagne);
  text-align: center;
}

/* ── 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(--muted); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fffdfb;
  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: #b49a97; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.2);
}
.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='%2396716f' 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;
  border: 1px solid var(--line-rose);
  background: rgba(183, 110, 121, 0.08);
  font-size: 13.5px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--rose-deep);
}
.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: 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(--rose); outline-offset: 2px; }
.btn--primary {
  background: linear-gradient(105deg, var(--rose), var(--rose-deep));
  color: #fff;
  box-shadow: 0 10px 26px rgba(140, 79, 88, 0.4);
}
.btn--primary:hover { filter: brightness(1.06); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--rose); color: var(--rose-deep); }
.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: 13px; padding: 10px 0 0; }

/* RSVP deadline countdown (platform-driven .count-*) */
.rsvp-countdown {
  margin: -6px 0 22px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px dashed var(--line-rose);
  background: rgba(183, 110, 121, 0.07);
  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(--rose-deep); }
.rsvp-countdown__nums { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--muted); }
.rsvp-countdown__nums span { color: var(--rose-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: linear-gradient(105deg, var(--rose), var(--rose-deep)) !important;
  color: #fff !important;
  font: 500 14.5px var(--font-ui);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(140, 79, 88, 0.35);
}
.guestbook-section #guestbookForm button[type="submit"]:hover { filter: brightness(1.06); }

/* 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: #fffdfb;
  box-shadow: 0 4px 16px rgba(140, 79, 88, 0.08);
}
.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; color: var(--muted); }
.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: 500 14px var(--font-ui);
  cursor: pointer;
}
.guestbook-section #load-more:hover { border-color: var(--rose); color: var(--rose-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: 28px; font-weight: 600; }
.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: rgba(251, 242, 236, 0.92);
  color: var(--muted);
  border-top: 1px solid rgba(59, 38, 41, 0.08);
  font-size: 12px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.foot::-webkit-scrollbar { display: none; }
.foot__dot { opacity: 0.5; }
.footer-brand {
  flex: none;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--rose-deep);
}

/* ── full-width powered-by brand strip ──────────────────────────────── */
/* A slim, full-width line under the foot. The engine swaps the literal
   brand token inside .link-footer for the platform name at render; the
   cockpit's Free Powered By field can override the whole line. */
.powered-by {
  flex: 0 0 auto;
  width: 100%;
  text-align: center;
  padding: 7px 14px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(59, 38, 41, 0.08);
  background: rgba(251, 242, 236, 0.92);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.powered-by .link-footer { color: var(--rose-deep); }

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

/* ── short screens: reclaim vertical space ────────────────────────────── */
@media (max-height: 640px) {
  .masthead { padding-top: 6px; padding-bottom: 6px; }
  .masthead__top { display: none; }
  .foot { display: none; }
  .poster { gap: 6px; }
  .poster__photo img { width: 60px; height: 60px; }
  .poster__hero { width: clamp(150px, 32vw, 200px); }
  .poster__facts { display: none; }
  .poster__tagline { 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-wrap, .tabs, .foot, .powered-by, .no-print { display: none !important; }
  body { background: #fff; }
  .panel-inner { max-width: none; padding: 12px; }
  .poster {
    box-shadow: none;
    border: 1px solid #b76e79;
    background: #fff;
    page-break-inside: avoid;
  }
  .poster__spark { display: none; }
  .poster__greeting, .poster__eyebrow, .poster__tagline, .poster__cta { color: #444; }
  .poster__fact-key { color: #8c4f58; }
  .poster__num { -webkit-text-fill-color: #b76e79; color: #b76e79; filter: none; }
  .countdown-tiles, .timeline-item, .event-item, .notes, .gallery-feature, .gallery-item, .free-block, .free-media { page-break-inside: avoid; }
  .flyer-banner__chip, .video-play, .video-chip, .free-chip { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
