/* ═══════════════════════════════════════════════════════════════════════
   wedding-floral-watercolor-flyer-sage-and-blush — styles.css
   "Sage & Blush" — a romantic botanical wedding poster.

   Palette (soft watercolor florals, delicate feminine):
     ivory paper  #FBF7F0 · blush #F2D8CF · dusty rose #D9968B / #C98A7F
     sage #A9BA9B / #7C8F74 · mauve #C4AEC6 · warm taupe ink #5B4E49

   Layout: one 100dvh shell — masthead / tabs / active panel / foot.
   Only the active panel scrolls (html.js gates this; without JS the page
   reads as a normal scrolling document).
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  /* palette */
  --paper: #FBF7F0;
  --paper-deep: #F4EDE0;
  --card: #FFFDF8;
  --blush: #F2D8CF;
  --rose: #D9968B;
  --rose-deep: #C07B72;
  --rose-ink: #A96A60;
  --mauve: #C4AEC6;
  --sage: #A9BA9B;
  --sage-deep: #7C8F74;
  --green-ink: #46604B;
  --ink: #5B4E49;
  --muted: #8D7E78;
  --line: rgba(91, 78, 73, 0.16);

  /* type */
  --font-script: "Great Vibes", "Brush Script MT", cursive;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-ui: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  /* shape */
  --radius: 18px;
  --shadow-soft: 0 14px 40px rgba(120, 92, 78, 0.16);
  --shadow-card: 0 24px 70px rgba(120, 92, 78, 0.2);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { height: 100%; }

body {
  height: 100%;
  background:
    radial-gradient(120% 90% at 50% 0%, #FFFDF8 0%, var(--paper) 55%, #F3EBDD 100%);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint paper grain so the washes feel like real paper */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

/* ── the shell ─────────────────────────────────────────────────────────── */
/* JS mode: one 100dvh app with a fixed chrome and a single scrolling
   panel. Without JS this collapses to a normal scrolling document and
   every panel reads in order (progressive enhancement). */
html.js .app {
  height: 100vh;
  height: 100dvh;
  display: grid;
  /* One column that never outgrows the viewport. Without this the implicit
     auto track sizes to the widest grid item's max-content (e.g. the
     nowrap masthead name with long host-entered names), blowing the whole
     shell out to 500px+ and clipping the poster's right edge on phones. */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

html:not(.js) .app { height: auto; overflow: visible; display: block; }
html:not(.js) .panels { height: auto; overflow: visible; }
html:not(.js) .panel { display: block; position: static; overflow: visible; }
html:not(.js) .tabs { display: none; }

/* ── masthead ─────────────────────────────────────────────────────────── */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px clamp(14px, 3vw, 28px);
  padding-top: calc(10px + env(safe-area-inset-top));
  background: rgba(251, 247, 240, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(91, 78, 73, 0.08);
}

.masthead__brand { display: flex; align-items: center; gap: 11px; min-width: 0; }

.masthead__mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #FFF6F1, var(--blush));
  box-shadow: inset 0 0 0 1px rgba(201, 138, 127, 0.35), 0 4px 12px rgba(201, 138, 127, 0.25);
}

.masthead__text { min-width: 0; line-height: 1.25; }
.masthead__top {
  display: block;
  font: 500 9.5px var(--font-ui);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.masthead__name {
  display: block;
  font-family: var(--font-script);
  font-size: 21px;
  color: var(--rose-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.masthead__name i { font-style: normal; color: var(--sage-deep); padding: 0 2px; }

.masthead__actions { display: flex; gap: 8px; }

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.85);
  color: var(--ink);
  font: 500 13px var(--font-ui);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.15s;
}
.chip-btn:hover { border-color: var(--rose); color: var(--rose-deep); }
.chip-btn:active { transform: translateY(1px); }
.chip-btn.is-done { border-color: var(--sage-deep); color: var(--sage-deep); }

/* ── tabs ──────────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  padding: 6px clamp(10px, 2.5vw, 24px) 8px;
  background: rgba(251, 247, 240, 0.75);
  border-bottom: 1px solid rgba(91, 78, 73, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

/* Edge-fade hint: when more tabs exist than fit, the bar scrolls sideways
   and the faded ends signal that there is more to reach. */
.tabs.is-scrollable {
  mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}

.tab {
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font: 500 12px var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}
.tab:hover { color: var(--rose-deep); }
.tab[aria-selected="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  box-shadow: 0 6px 16px rgba(201, 138, 127, 0.4);
}

/* ── panels ────────────────────────────────────────────────────────────── */
.panels {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

html.js .panel {
  display: none;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
html.js .panel.is-active { display: block; }
.panel > * { scroll-margin-top: 18px; }

/* content column for tab panels (the poster uses the full panel) */
.panel-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 44px) clamp(16px, 4vw, 28px) clamp(36px, 6vw, 64px);
}

/* ── hero poster ───────────────────────────────────────────────────────── */
.hero-panel {
  position: relative;
  background:
    radial-gradient(90% 70% at 50% 42%, rgba(255, 253, 248, 0.9) 0%, rgba(255, 253, 248, 0.55) 45%, transparent 78%),
    radial-gradient(120% 90% at 50% 0%, #FFFDF8 0%, var(--paper) 55%, #F3EBDD 100%);
}

.florals {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}
.florals--tl { top: 0; left: 0; width: clamp(150px, 30vw, 250px); height: auto; }
.florals--tr { top: 0; right: 0; width: clamp(150px, 30vw, 250px); height: auto; }
.florals--bl { bottom: 0; left: 0; width: clamp(150px, 30vw, 250px); height: auto; }
.florals--br { bottom: 0; right: 0; width: clamp(150px, 30vw, 250px); height: auto; }
.florals--top {
  top: 2px; left: 50%;
  width: min(420px, 70vw); height: auto;
  transform: translateX(-50%);
}
.florals--bottom {
  bottom: 4px; left: 50%;
  width: min(300px, 60vw); height: auto;
  transform: translateX(-50%);
}

/* the poster sheet itself */
.poster {
  position: relative;
  z-index: 2;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(96px, 14vh, 130px) clamp(20px, 6vw, 60px) clamp(88px, 12vh, 120px);
}

.poster__greeting {
  margin: 0 0 18px;
  font: 500 13.5px var(--font-ui);
  letter-spacing: 0.04em;
  color: var(--rose-deep);
  background: rgba(255, 253, 248, 0.75);
  border: 1px solid rgba(201, 138, 127, 0.35);
  border-radius: 999px;
  padding: 7px 16px;
}
.poster__greeting b { font-weight: 600; }

.poster__kicker {
  margin: 0 0 6px;
  font: 500 12px var(--font-ui);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.poster__names {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(58px, 12vw, 108px);
  line-height: 1.04;
  color: var(--rose-deep);
  text-wrap: balance;
}
.poster__amp {
  font-style: normal;
  color: var(--sage-deep);
  padding: 0 0.14em;
  font-size: 0.72em;
  vertical-align: 0.08em;
}

.poster__line {
  margin: 4px 0 0;
  font: italic 500 clamp(19px, 3.4vw, 26px) var(--font-display);
  color: var(--ink);
  letter-spacing: 0.01em;
}

.poster__divider { margin: 18px 0 14px; }

.poster__date {
  margin: 0;
  font: 500 clamp(19px, 3.6vw, 25px) var(--font-display);
  color: var(--green-ink);
  line-height: 1.35;
}

.poster__place {
  margin: 14px 0 0;
  font-size: clamp(15.5px, 2.6vw, 18.5px);
  color: var(--ink);
  line-height: 1.55;
}
.poster__venue {
  display: block;
  font-weight: 600;
  color: var(--rose-ink);
  overflow-wrap: break-word;
}

.poster__dress {
  margin: 16px 0 0;
  font: 500 12px var(--font-ui);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.poster__hashtag {
  margin: 14px 0 0;
  font: 600 12.5px var(--font-ui);
  letter-spacing: 0.14em;
  color: var(--sage-deep);
}

.poster__follow {
  margin: 18px 0 0;
  max-width: 34em;
  font: italic 500 15px var(--font-display);
  color: var(--muted);
}

/* cameo portrait (OPTIONAL — delete the .poster__photo figure to hide).
   The portrait is a button: clicking it opens the full-size image in the
   lightbox (zoom + "Open full size"). A quiet magnifier badge appears on
   hover / keyboard focus so it reads as tappable without shouting. */
.poster__photo { margin: 22px 0 0; }
.poster__photo-btn {
  position: relative;
  display: block;
  margin: 0 auto;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: zoom-in;
}
.poster__photo-btn img {
  display: block;
  width: 118px;
  height: 118px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--card);
  /* soft rose ring + floating shadow, like a painted cameo */
  box-shadow: 0 0 0 1px rgba(201, 138, 127, 0.45), 0 12px 28px rgba(120, 92, 78, 0.22);
  /* watercolor wash: shows while the photo loads and if it ever fails */
  background: linear-gradient(160deg, var(--blush), var(--mauve));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.poster__photo-btn:hover img,
.poster__photo-btn:focus-visible img {
  transform: scale(1.04);
  box-shadow: 0 0 0 3px rgba(201, 138, 127, 0.65), 0 14px 32px rgba(120, 92, 78, 0.28);
}
.poster__photo-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(201, 138, 127, 0.45);
  transition: transform 0.2s ease;
}
.poster__photo-btn:hover .poster__photo-badge,
.poster__photo-btn:focus-visible .poster__photo-badge { transform: scale(1.1); }
.poster__photo-badge svg { width: 15px; height: 15px; }
.poster__photo-cap {
  margin: 9px 0 0;
  font: italic 500 13px var(--font-display);
  color: var(--muted);
}

/* footer brand placeholder — the platform swaps in its own branding. A
   quiet, printed-flyer style line at the foot of the poster. */
.footer-brand {
  margin-top: 26px;
  width: min(320px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px dashed rgba(124, 143, 116, 0.55);
  font: 500 10px var(--font-ui);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer-brand-mark { color: var(--rose-deep); font-size: 12px; }

/* ── section head ──────────────────────────────────────────────────────── */
.section-head { text-align: center; margin-bottom: 30px; }
.section-head .kicker {
  margin: 0 0 8px;
  font: 500 11.5px var(--font-ui);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 52px);
  line-height: 1.1;
  color: var(--rose-deep);
  text-wrap: balance;
}
.section-head .lede {
  margin: 12px auto 0;
  max-width: 46em;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
}
.section-head .lede strong { color: var(--rose-ink); font-weight: 600; }

/* ── countdown tiles (self-driven; never .count-*) ────────────────────── */
.countdown-tiles { text-align: center; margin-bottom: 34px; }
.countdown-tiles__label {
  margin: 0 0 12px;
  font: 500 11px var(--font-ui);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.tiles {
  display: flex;
  justify-content: center;
  gap: clamp(8px, 2vw, 14px);
}
.tile {
  min-width: clamp(58px, 14vw, 76px);
  padding: 12px 6px 10px;
  border-radius: 14px;
  border: 1px solid rgba(201, 138, 127, 0.35);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.9), rgba(242, 216, 207, 0.45));
  box-shadow: 0 8px 22px rgba(120, 92, 78, 0.1);
}
.tile-num {
  display: block;
  font: 600 clamp(22px, 4.6vw, 30px) var(--font-display);
  font-variant-numeric: tabular-nums;
  color: var(--rose-ink);
}
.tile-cap {
  display: block;
  font: 500 9.5px var(--font-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}
.countdown-tiles__here {
  margin: 14px 0 0;
  font: italic 500 17px var(--font-display);
  color: var(--rose-ink);
}

/* ── block titles / timeline ───────────────────────────────────────────── */
.block-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font: 500 12px var(--font-ui);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.block-title::before,
.block-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 143, 116, 0.5), transparent);
}

.timeline { list-style: none; margin: 0 0 34px; padding: 0; }
.timeline-item {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 13px 4px 13px 0;
  border-bottom: 1px dashed rgba(124, 143, 116, 0.35);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item__time {
  flex: none;
  width: 82px;
  font: 600 15.5px var(--font-display);
  font-variant-numeric: tabular-nums;
  color: var(--rose-ink);
}
.timeline-item__text { font-size: 17px; color: var(--ink); }

/* ── venues ────────────────────────────────────────────────────────────── */
.event-list { display: grid; gap: 14px; margin-bottom: 30px; }
.event-item {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 138, 127, 0.2);
  /* watercolor paper: paint blooming into the corners (wet-on-wet) instead
     of a rigid accent bar — a rose kiss top-right, blush wash top-left,
     sage pooling at the foot. All in the background, so copy stays on top. */
  background:
    radial-gradient(circle 86px at 100% 0%, rgba(217, 150, 139, 0.40) 0%, rgba(196, 174, 198, 0.12) 55%, transparent 75%),
    radial-gradient(120% 120% at 0% 0%, rgba(242, 216, 207, 0.60) 0%, rgba(242, 216, 207, 0) 46%),
    radial-gradient(120% 120% at 100% 100%, rgba(169, 186, 155, 0.22) 0%, rgba(169, 186, 155, 0) 44%),
    var(--card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
.event-item__chip {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--blush);
  color: var(--rose-ink);
  font: 600 10.5px var(--font-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.event-item__title { margin: 10px 0 4px; font: 600 22px var(--font-display); color: var(--green-ink); }
.event-item__when { margin: 0; font: 500 13px var(--font-ui); color: var(--rose-deep); }
.event-item__addr { margin: 6px 0 0; font-size: 15.5px; color: var(--muted); line-height: 1.5; }
.event-item__actions { margin-top: 12px; }

/* ── notes ─────────────────────────────────────────────────────────────── */
.notes {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px dashed rgba(124, 143, 116, 0.55);
  background: rgba(169, 186, 155, 0.12);
}
.note { margin: 0; font-size: 15.5px; color: var(--ink); line-height: 1.55; }
.note strong { color: var(--sage-deep); font-weight: 600; }

/* ── buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 500 14px 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(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(201, 138, 127, 0.42);
}
.btn--primary:hover { filter: brightness(1.04); }
.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 rgba(201, 138, 127, 0.6);
  background: rgba(242, 216, 207, 0.35);
  text-align: center;
  font-size: 13.5px;
}
.rsvp-countdown__label { margin: 0 0 4px; font: 500 10.5px var(--font-ui); 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-ink); font-size: 17px; }

/* ── forms (RSVP + injected guestbook) ─────────────────────────────────── */
.rsvp-form { display: grid; gap: 16px; }

.form-group { display: grid; gap: 6px; }
.form-group label {
  font: 500 12px var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.form-group label small {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  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: var(--card);
  color: var(--ink);
  font: 400 15.5px var(--font-display);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group textarea { resize: vertical; min-height: 76px; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: #B7A79F; }
.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(217, 150, 139, 0.22);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  /* Keep each field at its natural height: without this, grid stretch makes
     a select grow to match a taller neighbour (e.g. the textarea next to
     "Meal preference"), leaving the two fields misaligned. */
  align-items: start;
}

.form-hint { margin: -8px 0 0; font-size: 13.5px; font-style: italic; color: var(--muted); }

.error { min-height: 16px; font: 500 12.5px var(--font-ui); color: #B4544A; }
.error:empty { display: none; }

.rsvp-extras {
  display: grid;
  gap: 16px;
  padding: 16px 16px 2px;
  border-radius: 14px;
  border: 1px dashed rgba(124, 143, 116, 0.5);
  background: rgba(169, 186, 155, 0.1);
  transition: opacity 0.3s, filter 0.3s;
}

/* decline state: dim party-size + meal fields (visual only — fields stay
   enabled and submission is never intercepted; the platform owns the form) */
form.is-declining .rsvp-extras { opacity: 0.45; filter: grayscale(0.5); }

.declined-note {
  display: none;
  margin: -4px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--blush);
  color: var(--rose-ink);
  font: italic 500 15px var(--font-display);
  text-align: center;
}
form.is-declining .declined-note { display: block; }

/* ── 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(135deg, var(--rose) 0%, var(--rose-deep) 100%) !important;
  color: #fff !important;
  font: 500 14px var(--font-ui);
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(201, 138, 127, 0.4);
}
.guestbook-section #guestbookForm button[type="submit"]:hover { filter: brightness(1.04); }

/* 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: 12px;
  border: 1px solid rgba(201, 138, 127, 0.3);
  background: var(--card);
  box-shadow: 0 4px 16px rgba(120, 92, 78, 0.08);
  word-break: break-word;
}
.guestbook-section .guestbook-entry h5 { margin: 0 0 4px; font: 600 15px var(--font-display); color: var(--rose-ink); }
.guestbook-section .guestbook-entry p { margin: 0 0 4px; font-size: 15px; line-height: 1.55; color: var(--ink); }
.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-script); font-weight: 400; font-size: 34px; color: var(--rose-deep); }
.thank-you-message p { margin: 4px 0; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ── photo gallery (Photos panel; OPTIONAL — remove the section to hide) ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery__item { margin: 0; }
.gallery__btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 5;             /* classic wedding portrait */
  box-shadow: var(--shadow-soft);
  /* watercolor wash: paints the frame while a photo loads and if it fails,
     so a slot never looks broken */
  background:
    radial-gradient(90% 90% at 85% 10%, rgba(217, 150, 139, 0.65) 0%, transparent 60%),
    radial-gradient(120% 120% at 0% 100%, rgba(169, 186, 155, 0.8) 0%, transparent 55%),
    linear-gradient(160deg, var(--blush), var(--mauve) 60%, #E4D5C8);
}
.gallery__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery__btn:hover .gallery__img,
.gallery__btn:focus-visible .gallery__img { transform: scale(1.045); }
.gallery__cap {
  margin: 8px 2px 0;
  font: italic 500 14.5px var(--font-display);
  color: var(--muted);
  text-align: center;
}

/* ── flyer showcase (The Flyer panel; OPTIONAL — delete the figure to hide) ──
   Reuses the gallery frame + caption; centered and capped in width so an
   already-designed flyer reads like a flyer. */
.flyer-figure {
  max-width: 420px;
  margin: 0 auto;
}

/* ── film: optional video embed (Film panel; OPTIONAL — delete the section) ── */
.film-figure { margin: 0; }
.film-embed {
  position: relative;
  width: 100%;
  /* Cap by height so a tall phone screen never inflates the video; the
     16/9 ratio is preserved (width caps first on phones). */
  max-width: min(100%, calc(56vh * 16 / 9));
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(201, 138, 127, 0.35);
  box-shadow: var(--shadow-card);
  /* watercolor wash: paints the frame while the embed loads — nothing ever
     looks broken */
  background:
    radial-gradient(90% 90% at 80% 15%, rgba(217, 150, 139, 0.55) 0%, transparent 60%),
    radial-gradient(120% 120% at 10% 100%, rgba(169, 186, 155, 0.5) 0%, transparent 55%),
    linear-gradient(160deg, var(--blush), var(--mauve) 60%, #E4D5C8);
}
.film-embed iframe,
.film-embed video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}
.film-cap {
  margin: 12px 0 0;
  text-align: center;
  font: italic 500 16px var(--font-display);
  color: var(--muted);
}
.film-open {
  margin: 16px 0 0;
  text-align: center;
}
.film-open a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: 500 13px var(--font-ui);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.film-open a:hover {
  border-color: var(--rose);
  color: var(--rose-deep);
  background: rgba(242, 216, 207, 0.35);
}

/* ── free page (FREE PAGE FEATURE; optional — leave the title blank in the
      editor to hide the whole page and its tab) ──────────────────────── */
.free-blocks {
  display: grid;
  gap: 14px;
  margin-bottom: 30px;
}
.free-block {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: var(--radius);
  border: 1px solid rgba(201, 138, 127, 0.2);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  /* a quiet watercolor bloom in the corner, like the venue cards */
  background:
    radial-gradient(circle 70px at 100% 0%, rgba(217, 150, 139, 0.30) 0%, rgba(196, 174, 198, 0.10) 55%, transparent 75%),
    var(--card);
}
.free-block__title {
  margin: 0 0 8px;
  font-family: var(--font-script);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
  color: var(--rose-ink);
}
.free-block__content { margin: 0; font-size: 15.5px; color: var(--ink); line-height: 1.6; }
.free-block__media { margin: 14px 0 0; }
/* Free Image left empty -> the engine removes the <img>; hide the whole
   figure so a block degrades to text-only with no empty button/caption. */
.free-block__media:not(:has(.free-block__img)) { display: none; }
.free-block__btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  border-radius: 14px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: var(--shadow-soft);
  /* watercolor wash: paints the frame while a photo loads and if it fails */
  background:
    radial-gradient(90% 90% at 85% 10%, rgba(217, 150, 139, 0.55) 0%, transparent 60%),
    linear-gradient(160deg, var(--blush), var(--mauve) 60%, #E4D5C8);
}
.free-block__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.free-block__btn:hover .free-block__img,
.free-block__btn:focus-visible .free-block__img { transform: scale(1.045); }
.free-block__cap {
  margin: 8px 2px 0;
  font: italic 500 14.5px var(--font-display);
  color: var(--muted);
  text-align: center;
}
.free-powered-by {
  margin: 26px 0 0;
  text-align: center;
  font: 500 12px var(--font-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── powered by Kundangi (full-width brand line at the foot of the app) ── */
.powered-by {
  padding: 6px clamp(14px, 3vw, 28px) calc(8px + env(safe-area-inset-bottom));
  text-align: center;
  font: 500 10px var(--font-ui);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.8;
  background: rgba(251, 247, 240, 0.9);
  border-top: 1px solid rgba(91, 78, 73, 0.08);
}

/* ── photo lightbox (driven by main.js; optional) ─────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(46, 38, 34, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }
.lightbox__figure { margin: 0; max-width: min(920px, 94vw); }
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
  transition: transform 0.25s ease;
}
/* zoomed: the photo scales 2× and the viewer becomes a scrollable pane so
   guests can pan around — click the photo (or the zoom button / Z key) to
   toggle, click the dark backdrop to close. */
.lightbox.is-zoomed {
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.lightbox.is-zoomed .lightbox__img {
  max-width: none;
  max-height: none;
  transform: scale(2);
  transform-origin: 0 0;
  cursor: zoom-out;
}
.lightbox__cap {
  margin: 14px 0 0;
  text-align: center;
  font: italic 500 17px var(--font-display);
  color: #F6EDE3;
}
.lightbox__hint {
  margin: 8px 0 0;
  text-align: center;
  font: 500 11px var(--font-ui);
  letter-spacing: 0.08em;
  color: rgba(246, 237, 227, 0.6);
}
.lightbox__original {
  margin: 12px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(46, 38, 34, 0.55);
  color: #F6EDE3;
  font: 500 12px var(--font-ui);
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 0.2s;
}
.lightbox__original:hover { background: rgba(46, 38, 34, 0.85); }
.lightbox__close,
.lightbox__prev,
.lightbox__next,
.lightbox__zoom {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(46, 38, 34, 0.55);
  color: #F6EDE3;
  cursor: pointer;
  transition: background 0.2s;
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover,
.lightbox__zoom:hover { background: rgba(46, 38, 34, 0.85); }
.lightbox__close { top: calc(14px + env(safe-area-inset-top)); right: 14px; font-size: 22px; line-height: 1; }
.lightbox__prev { left: 14px; top: 50%; transform: translateY(-50%); font-size: 30px; line-height: 1; }
.lightbox__next { right: 14px; top: 50%; transform: translateY(-50%); font-size: 30px; line-height: 1; }
.lightbox__zoom { bottom: calc(14px + env(safe-area-inset-bottom)); right: 14px; }
.lightbox__zoom svg { width: 19px; height: 19px; }
.lightbox__prev.is-hidden,
.lightbox__next.is-hidden { display: none; }
@media (max-width: 560px) {
  .lightbox__prev { left: 6px; }
  .lightbox__next { right: 6px; }
}

/* ── foot ─────────────────────────────────────────────────────────────── */
.foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px clamp(14px, 3vw, 28px);
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  background: rgba(251, 247, 240, 0.9);
  color: var(--muted);
  border-top: 1px solid rgba(91, 78, 73, 0.08);
  font-size: 12.5px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.foot::-webkit-scrollbar { display: none; }
.foot__dot { opacity: 0.5; }

/* ── global photo off-switch (data-photos="off" on <html>) ──────────────
   JS removes the cameo + Photos panel nodes entirely (so the tab rebuilds);
   these rules cover no-JS visitors. */
html[data-photos="off"] .poster__photo { display: none; }
html[data-photos="off"] #panel-photos { display: none; }

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

/* ── reveal-on-scroll (JS adds .is-visible; reduced-motion skips it) ──── */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ── small screens: reclaim vertical space ────────────────────────────── */
@media (max-height: 640px) {
  .masthead { padding-top: 6px; padding-bottom: 6px; }
  .masthead__top { display: none; }
  .foot { display: none; }
}
@media (max-width: 520px) {
  .chip-btn { padding: 8px 10px; }
  .chip-btn__label { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .poster { padding-left: clamp(14px, 5vw, 26px); padding-right: clamp(14px, 5vw, 26px); }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery__cap { font-size: 13px; }
}

/* Very small phones: let long host-entered couple names wrap without
   overflowing the poster sheet (the script face is wide at 58px+). */
@media (max-width: 380px) {
  .poster__names { font-size: clamp(42px, 13.5vw, 58px); }
  .poster__line { font-size: clamp(17px, 4.6vw, 22px); }
  .poster__date { font-size: clamp(17px, 4.6vw, 22px); }
}

/* ── 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;
}
html.no-motion [data-reveal] { opacity: 1; transform: none; }

/* ── 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; position: static; }
  html.js .panel.hero-panel.is-active { display: block !important; }
  .masthead__actions, .tabs, .foot, .powered-by, .no-print { display: none !important; }
  body { background: #fff; }
  .panel-inner { max-width: none; padding: 12px; }
  .hero-panel { background: #fff; }
  .poster { padding: 20px; page-break-inside: avoid; }
  .countdown-tiles, .timeline-item, .event-item, .notes, .gallery__item, .poster__photo { page-break-inside: avoid; }
  .lightbox { display: none !important; }
  /* a video can't print — show the "Watch the original" link instead */
  .film-embed { display: none; }
  /* never let unrevealed sections stay invisible on paper */
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
