/* ═══════════════════════════════════════════════════════════════════════
   birthday-milestone-rose-gold-card-champagne-toast — "Champagne Toast"
   Rose-gold stationery · ivory-champagne sheet on a deep blush desk tone
   Playfair Display + Jost
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #e8cfc4;              /* deep blush desk tone */
  --bg-deep: #ddc0b4;
  --card: #fdf6f1;            /* ivory-champagne paper */
  --card-edge: #f7e7dc;
  --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.32);
  --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.5), transparent 55%),
    radial-gradient(ellipse 90% 65% at 50% 118%, rgba(183, 110, 121, 0.16), 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, .card__medallion-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;
  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 card) 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: rgba(253, 246, 241, 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%;
}
.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 {
  display: flex;
  gap: 6px;
  padding: 8px clamp(14px, 3vw, 28px);
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(253, 246, 241, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(59, 38, 41, 0.08);
}
.tabs::-webkit-scrollbar { display: none; }

.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; }
.rsvp-reply-by { margin: 8px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.rsvp-reply-by .rsvp-date { color: var(--rose-deep); font-weight: 500; }

/* ── the invitation card ──────────────────────────────────────────────── */
.card {
  position: relative;
  max-width: 620px;
  width: 100%;
  margin: auto;
  padding: clamp(28px, 5.5vh, 52px) clamp(24px, 5vw, 52px) clamp(24px, 4.5vh, 40px);
  background:
    radial-gradient(ellipse 120% 55% at 50% -8%, rgba(255, 255, 255, 0.75), transparent 55%),
    repeating-linear-gradient(0deg, rgba(140, 79, 88, 0.012) 0 1px, transparent 1px 3px),
    var(--card);
  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(9px, 1.9vh, 15px);
}
/* fine inner hairline — the "foil plate" ring */
.card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(183, 110, 121, 0.4);
  pointer-events: none;
}

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

/* corner flourishes (fine "foil" brackets) */
.card__corner {
  position: absolute;
  width: 15px;
  height: 15px;
  z-index: 2;
  pointer-events: none;
  opacity: 0.9;
}
.card__corner::before, .card__corner::after {
  content: "";
  position: absolute;
  background: linear-gradient(90deg, var(--foil-a), var(--foil-c));
}
.card__corner::before { width: 15px; height: 1.3px; }
.card__corner::after  { width: 1.3px; height: 15px; }
.card__corner--tl { top: 20px; left: 20px; }
.card__corner--tr { top: 20px; right: 20px; }
.card__corner--bl { bottom: 20px; left: 20px; }
.card__corner--br { bottom: 20px; right: 20px; }
.card__corner--tl::before, .card__corner--tl::after { left: 0; top: 0; }
.card__corner--tr::before, .card__corner--tr::after { right: 0; top: 0; }
.card__corner--bl::before, .card__corner--bl::after { left: 0; bottom: 0; }
.card__corner--br::before, .card__corner--br::after { right: 0; bottom: 0; }

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

/* personalised greeting pill */
.card__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);
}
.card__greeting b { font-weight: 600; color: var(--ink); }

/* the foil medallion: milestone numeral ringed by one-tick-per-year marks */
.card__medallion {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2px 0 0;
}
.card__medallion-ticks line {
  stroke: var(--foil-c);
  stroke-width: 2;
  stroke-linecap: round;
}
.card__medallion-ticks line.tick--decade { stroke: var(--rose-deep); stroke-width: 3; }
.card__medallion-num {
  position: absolute;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  background-size: 180% 100%;
}
html.js:not(.no-motion) .card__medallion-num { animation: foil-shine 6s ease-in-out infinite; }
@keyframes foil-shine {
  0%, 100% { background-position: 0% 0; }
  50%      { background-position: 100% 0; }
}

.card__hosts {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(15px, 2.6vw, 19px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.card__request {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(14px, 2.4vw, 17px);
  line-height: 1.55;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.card__honoree {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 2.9rem);
  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; }

.card__ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(280px, 74%);
  color: var(--rose);
}
.card__ornament span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--rose), transparent); }
.card__ornament i { font-style: normal; font-size: 10px; }

.card__promise {
  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);
}

.card__date {
  margin: 0;
  font-size: clamp(13px, 2.3vw, 16px);
  line-height: 1.7;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
/* Empty-value degradation: when the render engine removes one of the two
   spans the bare <br> or the empty <em> would leave a stray gap — hide
   them. :has() ignores the whitespace text nodes the engine leaves behind,
   so plain :first-child would never match. */
.card__date:not(:has(.card__date-line1)) br,
.card__place:not(:has(.card__place-main)) br { display: none; }
.card__date em:not(:has(span)) { display: none; }
.card__date em {
  display: block;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.card__place {
  margin: 0;
  font-size: clamp(12.5px, 2.1vw, 14.5px);
  line-height: 1.65;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.card__place .card__place-sub { color: var(--muted); }

.card__dress {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(280px, 76%);
  margin: 2px 0;
}
.card__dress span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--rose), transparent); }
.card__dress p {
  margin: 0;
  padding: 6px 18px;
  border: 1px solid var(--line-rose);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-indent: 0.34em; /* optically re-centre the tracked caps */
  text-transform: uppercase;
  color: var(--rose-deep);
  background: rgba(183, 110, 121, 0.06);
  white-space: nowrap;
}

.card__reply {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(13px, 2.2vw, 15.5px);
  line-height: 1.6;
  color: var(--muted);
}

/* optional honoree portrait(s) on the card (delete the .card__photo-list in
   index.html to hide — the card stays purely typographic, as before).
   One portrait for one honoree; add a second <figure class="card__photo">
   for a shared party and the two sit side by side. Clicking a portrait
   opens it full-size in the lightbox (main.js). */
.card__photo-list { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 2px 0 0; }
.card__photo { margin: 0; }
.card__photo img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--rose);
  outline: 1px solid var(--line-rose);
  outline-offset: 4px;
  box-shadow: 0 8px 22px rgba(140, 79, 88, 0.28);
  cursor: zoom-in;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card__photo + .card__photo img { width: 88px; height: 88px; } /* two honorees: portrait pair, slightly smaller */
.card__photo:hover img, .card__photo img:focus-visible { transform: scale(1.06); }
.card__photo img:focus-visible { outline-offset: 4px; }

/* ── 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; }

/* ── official flyer / banner (OPTIONAL — in the Celebration panel) ───────
   A framed image slot for hosts who already have a designed flyer or
   poster for the party — display it so guests can confirm they're in the
   right place. Any ratio works (kept intact, never cropped); clicking it
   opens the same full-size lightbox as the photos. Delete the whole
   .banner-flyer block in index.html to hide the feature. */
.banner-flyer {
  margin: 0 0 28px;
  text-align: center;
}
.banner-flyer img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: contain;
  cursor: zoom-in;
  border-radius: 14px;
  border: 1px solid var(--line-rose);
  background: var(--card);
  box-shadow: 0 12px 30px rgba(140, 79, 88, 0.18);
  transition: transform 0.3s ease;
}
.banner-flyer:hover img { transform: scale(1.012); }
.banner-flyer img:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.banner-flyer figcaption {
  margin-top: 8px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14.5px;
  color: var(--rose-deep);
}

/* ── optional film feature (video URL embed — in the Photos 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. Delete the whole
   .film-card block in index.html to hide the feature. */
.film-card {
  margin-top: clamp(28px, 5.5vmin, 44px);
  text-align: center;
}
.film-card__title { margin-top: 0; }
.film-frame {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: clamp(14px, 3.2vmin, 20px) auto 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: var(--card-edge); /* mat behind the poster / while loading */
  border: 1px solid var(--line-rose);
  box-shadow: 0 12px 30px rgba(140, 79, 88, 0.18);
}
.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(--rose-deep);
  background: radial-gradient(circle at 32% 28%, #fff, var(--champagne) 60%, var(--foil-b));
  border: 1px solid var(--line-rose);
  box-shadow: 0 12px 28px -12px rgba(140, 79, 88, 0.65);
  animation: film-pulse 2.6s ease-in-out infinite;
  transition: transform 0.25s ease;
}
.film-play svg { width: 26px; height: 26px; margin-left: 3px; }
.film-open:hover .film-play { transform: translate(-50%, -50%) scale(1.08); }
.film-open:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.film-hint {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(59, 38, 41, 0.62);
  color: var(--champagne);
  font-size: 10px;
  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-frame.is-playing .film-open { display: none; }
.film-note {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 18px;
  color: var(--muted);
  font-size: 13.5px;
  font-style: italic;
  text-align: center;
  background: var(--card-edge);
}
.film-external {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--line-rose);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.film-external:hover { color: var(--rose-bright); border-color: var(--rose-bright); }
.film-external[hidden] { display: none; }
@keyframes film-pulse {
  0%, 100% { box-shadow: 0 12px 28px -12px rgba(140, 79, 88, 0.65), 0 0 0 0 rgba(183, 110, 121, 0.35); }
  50% { box-shadow: 0 12px 28px -12px rgba(140, 79, 88, 0.65), 0 0 0 14px rgba(183, 110, 121, 0); }
}

/* ── countdown tiles (celebration) ────────────────────────────────────── */
.countdown-tiles {
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line-rose);
  border-radius: 16px;
  background: rgba(253, 246, 241, 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: #fff;
}
.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; }
/* Empty-value degradation: an agenda row whose time AND text are both
   empty (host left the row blank) must not render as a bare numbered
   item; and the whole list hides when no row has any content. */
.timeline li:not(:has(span)) { display: none; }
.timeline:not(:has(li span)) { display: none; }
.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: #fff;
  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; }

/* photo gallery (OPTIONAL: delete the whole #panel-photos <section> in
   index.html to hide it — its tab disappears automatically). Each img is
   itself the clickable (role="button" via markup; main.js opens the
   lightbox on click / Enter / Space). */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2.4vw, 18px);
}
@media (max-width: 640px) { .photo-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 340px) { .photo-gallery { grid-template-columns: 1fr; } }

.gallery-item { margin: 0; }
/* Empty-value degradation: a gallery row saved without a photo (the
   repeatance child hides the <img>) must not leave a bare caption tile. */
.gallery-item:not(:has(img.gallery-img)) { display: none; }
.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  cursor: zoom-in;
  border-radius: 14px;
  border: 1px solid var(--line-rose);
  box-shadow: 0 6px 22px rgba(140, 79, 88, 0.14);
  transition: transform 0.5s ease;
}
.gallery-item:hover img,
.gallery-item img:focus-visible { transform: scale(1.045); }
.gallery-item img:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.gallery-item__cap {
  margin: 8px 2px 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 14.5px;
  color: var(--rose-deep);
}

/* ── 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: #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: #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: #fff;
  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; }

/* photo lightbox (built by main.js from every [data-lightbox] img: the card
   portrait, the official flyer and the gallery — so removing those blocks
   removes the lightbox too). Opens the original image; click the picture
   (or the zoom button) to view it at actual size and pan around. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 4vw, 24px);
  background: rgba(59, 38, 41, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lightbox-fade 0.25s ease both;
}
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox__stage {
  position: relative;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: min(880px, 94vw);
}
.lightbox__img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
.lightbox__img-wrap img {
  display: block;
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 12px;
  border: 3px solid var(--champagne);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  background: var(--card);
  cursor: zoom-in;
  transition: border-radius 0.2s ease;
}
/* zoomed: the original image at actual size, pannable inside the frame */
.lightbox.is-zoomed .lightbox__img-wrap {
  display: block;
  width: 92vw;
  height: 72vh;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.lightbox.is-zoomed .lightbox__img-wrap img {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  margin: 0 auto; /* keep a small image centred inside the pan frame */
  cursor: zoom-out;
  border-radius: 6px;
}

.lightbox__caption {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 16px;
  color: var(--champagne);
}
.lightbox__counter {
  position: absolute;
  left: 0; right: 0; bottom: 20px;
  margin: 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: rgba(247, 231, 220, 0.7);
}
.lightbox__btn {
  position: absolute;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(247, 231, 220, 0.4);
  background: rgba(253, 246, 241, 0.1);
  color: var(--champagne);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox__btn:hover { background: rgba(253, 246, 241, 0.22); }
.lightbox__btn:focus-visible { outline: 2px solid var(--rose-bright); outline-offset: 2px; }
.lightbox__btn[aria-pressed="true"] { background: rgba(183, 110, 121, 0.5); border-color: var(--champagne); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__zoom {
  top: 16px;
  left: 16px;
  font-size: 0;
}
.lightbox__zoom svg { width: 18px; height: 18px; }
.lightbox__prev, .lightbox__next { top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: clamp(8px, 2vw, 20px); }
.lightbox__next { right: clamp(8px, 2vw, 20px); }

.lightbox__note {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13.5px;
  font-style: italic;
  background: var(--card);
  border-radius: 12px;
}
.lightbox__note.is-show { display: flex; }

/* ── free page (OPTIONAL "In Our Words" panel) ─────────────────────────
   Repeatable free blocks: each block = title + free text + optional photo.
   The platform clones .free-block per host entry; when the host has added
   no blocks (or toggles the Free Page section off) the whole .panel-free
   section is removed and its tab disappears with it. The .free-media
   figure collapses via :empty when a block has no photo, so a text-only
   block reads cleanly. */
.free-blocks {
  display: grid;
  gap: clamp(30px, 6vmin, 48px);
  margin-top: 4px;
}
.free-block { margin: 0; text-align: center; }
.free-title {
  margin: 0 0 clamp(12px, 2.6vmin, 18px);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 4.6vw, 30px);
  line-height: 1.2;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.free-title:focus { outline: none; }
.free-media {
  margin: 0 auto clamp(14px, 3vmin, 20px);
  max-width: 560px;
}
/* Text-only block: the engine leaves the figure with whitespace when it
   removes the <img>, so plain :empty never matches — use :has(img). */
.free-media:empty,
.free-media:not(:has(img)) { display: none; }
.free-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  padding: 5px;
  background: var(--card);
  border: 1px solid var(--line-rose);
  border-radius: 12px;
  box-shadow: 0 12px 26px -20px rgba(140, 79, 88, 0.45);
  cursor: zoom-in;
}
.free-content {
  margin: 0 auto;
  max-width: 34em;
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(14px, 3.3vmin, 16.5px);
  line-height: 1.75;
  color: var(--ink-soft);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ── full-width powered-by brand strip (above the foot bar) ─────────────
   A slim, full-width brand line. The engine swaps the literal "Kundangi"
   token inside .link-footer for the platform name at render; the cockpit's
   Free Powered By field can override the whole line. It is not part of the
   free page and stays visible even when the free page is hidden. */
html:not(.js) .powered-by {
  width: 100%;
  text-align: center;
  padding: 14px 16px 22px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
html.js .powered-by {
  width: 100%;
  text-align: center;
  padding: 5px 14px;
  border-top: 1px solid rgba(59, 38, 41, 0.08);
  background: rgba(253, 246, 241, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.powered-by .link-footer { color: var(--rose-deep); }

/* ── foot ─────────────────────────────────────────────────────────────── */
.foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px clamp(14px, 3vw, 28px);
  background: rgba(253, 246, 241, 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; }
/* Empty-value degradation: when the engine removes a foot item, the
   separator around it would dangle — hide the dot that becomes the first
   span (no hashtag) or the last span (no place). :first-of-type /
   :last-of-type ignore the whitespace text nodes between the spans. */
.foot:not(:has(.foot-hashtag)) .foot__dot:first-of-type,
.foot:not(:has(.foot-place)) .foot__dot:last-of-type { display: none; }

/* ── brand footer (placeholder) — tucked into the last panel by main.js ── */
.app-footer { display: none; }
html:not(.js) .app-footer { display: block; padding: 18px 16px 34px; text-align: center; }
html.js .panel .app-footer {
  display: block;
  margin-top: clamp(28px, 5vmin, 40px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.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.3em;
  text-transform: none;
  letter-spacing: 0.02em;
  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: 620px) {
  .masthead { padding-top: 6px; padding-bottom: 6px; }
  .masthead__top { display: none; }
  .foot { display: none; }
  .card__medallion { display: none; }
  .card__photo-list { display: none; }
  .card__promise { display: none; }
  .card__reply { 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, .powered-by { display: none !important; }
  body { background: #fff; }
  .panel-inner { max-width: none; padding: 12px; }
  .card {
    box-shadow: none;
    border: 1px solid #b76e79;
    background: #fff;
    page-break-inside: avoid;
  }
  .card__corner { display: none; }
  .card__request, .card__reply, .card__promise { color: #444; }
  .card__date { color: #333; }
  .card__date em, .card__place span { color: #555; }
  .card__medallion-num { -webkit-text-fill-color: #b76e79; color: #b76e79; filter: none; }
  .countdown-tiles, .timeline-item, .event-item, .notes, .gallery-item, .banner-flyer, .film-card, .free-block { page-break-inside: avoid; }
  .film-frame iframe { display: none; } /* a playing video can't print — the poster prints instead */
  .lightbox { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
