:root {
  --bg:        #FAF8F4;
  --surface:   #FFFFFF;
  --surface-2: #FDF5EC;

  --border:    #EDE4D8;
  --border-2:  #DFD4C5;

  --ink-1:     #18150F;
  --ink-2:     #52493F;
  --ink-3:     #6E645B;

  --gold:      #B8905A;
  --gold-rgb:  184,144,90;
  --gold-lt:   #F0DFBF;
  --gold-dk:   #8A6838;
  --gold-pale: #FBF4E8;

  --green:     #3A6B4E;
  --green-lt:  #D3EAD8;
  --amber:     #B06A08;
  --amber-lt:  #FDE8C0;
  --red:       #A03028;
  --red-lt:    #F5D5D2;

  --dark-bg:   #100D07;
  --dark-mid:  #1E1710;
  --dark-lt:   #2A1D0D;
  --gold-text: #DDB87A;
  --gold-text-rgb: 221,184,122;
  --ghost:     rgba(250,248,244,0.75);

  --serif: 'Playfair Display', Georgia, serif;
  --sans:  'Inter', system-ui, sans-serif;

  --space-1: 4px;   --space-2: 8px;   --space-3: 12px;
  --space-4: 16px;  --space-5: 20px;  --space-6: 24px;
  --space-8: 32px;  --space-10: 40px; --space-12: 48px;

  --r-sm: 6px;
  --r:    12px;
  --r-lg: 20px;
  --r-xl: 28px;

  --s-sm: 0 1px 3px rgba(24,21,15,.06), 0 1px 2px rgba(24,21,15,.04);
  --s:    0 4px 16px rgba(24,21,15,.08), 0 1px 4px rgba(24,21,15,.05);
  --s-lg: 0 12px 40px rgba(24,21,15,.12), 0 4px 12px rgba(24,21,15,.07);

  --ease: 150ms ease;

  /* Local additions layered on top of the design-system tokens above —
     not part of the token contract, just convenience values referenced
     repeatedly below so component rules don't repeat literals. */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --max-width: 1320px;
  --pill: 999px;
  --fill: rgba(24, 21, 15, 0.045);
  --blur-bg: rgba(250, 248, 244, 0.78);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--dark-bg) 0%, var(--gold-dk) 25%, var(--gold-lt) 50%, var(--gold-dk) 75%, var(--dark-bg) 100%);
}

body {
  margin: 0;
  background:
    radial-gradient(80% 50% at 85% 0%, rgba(var(--gold-rgb),0.10) 0%, rgba(var(--gold-rgb),0) 60%),
    radial-gradient(70% 45% at 8% 15%, rgba(var(--gold-rgb),0.06) 0%, rgba(var(--gold-rgb),0) 55%),
    var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold-dk);
  outline-offset: 3px;
}

.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.75rem;
}

.eyebrow--hero {
  color: var(--gold-text);
}

.hero__logo {
  display: block;
  max-height: 64px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 0 1.25rem;
}

/* ---------- Decorative: ambient orbs + particles ---------- */
/* Purely cosmetic additions layered into dark sections — do not affect
   layout of any functional element, sit behind .hero__content etc via
   z-index. */

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.75;
  will-change: transform;
}

.ambient-orb--a {
  width: 420px;
  height: 420px;
  top: -8%;
  left: -6%;
  background: radial-gradient(circle, rgba(var(--gold-rgb),0.35) 0%, rgba(var(--gold-rgb),0) 70%);
  animation: driftA 22s ease-in-out infinite;
}

.ambient-orb--b {
  width: 380px;
  height: 380px;
  bottom: -14%;
  right: -8%;
  background: radial-gradient(circle, rgba(var(--gold-text-rgb),0.25) 0%, rgba(var(--gold-text-rgb),0) 70%);
  animation: driftB 26s ease-in-out infinite;
}

.particle-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

@media (max-width: 480px) {
  .ambient-orb {
    filter: blur(40px);
    opacity: 0.4;
  }
  .ambient-orb--a { width: 260px; height: 260px; }
  .ambient-orb--b { width: 220px; height: 220px; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  background:
    radial-gradient(ellipse at 65% 35%, rgba(var(--gold-rgb),.14) 0%, transparent 55%),
    linear-gradient(155deg, var(--dark-bg) 0%, var(--dark-mid) 35%, var(--dark-lt) 65%, var(--dark-bg) 100%);
  color: var(--ghost);
  padding: calc(3rem + env(safe-area-inset-top)) 1.5rem 3rem;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center 20%;
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 1.1s var(--smooth);
  touch-action: pan-y;
}

.hero__bg.is-active {
  opacity: 1;
}

.hero__dots {
  position: absolute;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--pill);
  background: rgba(16, 13, 7, 0.4);
  backdrop-filter: blur(8px);
}

.hero__dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(250, 248, 244, 0.45);
  cursor: pointer;
  transition: background 0.25s var(--smooth), transform 0.25s var(--spring);
}

.hero__dot.is-active {
  background: var(--gold-text);
  transform: scale(1.3);
}

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(16,13,7,0.5) 0%, rgba(16,13,7,0.32) 35%, rgba(12,10,6,0.94) 100%),
    linear-gradient(100deg, rgba(16,13,7,0.45) 0%, rgba(16,13,7,0.05) 45%, rgba(42,29,13,0.4) 100%),
    radial-gradient(120% 90% at 15% 100%, rgba(var(--gold-rgb),0.18) 0%, rgba(16,13,7,0) 60%),
    radial-gradient(60% 40% at 90% 8%, rgba(var(--gold-text-rgb),0.14) 0%, rgba(var(--gold-text-rgb),0) 65%);
}

/* ---------- Hero entrance animation ---------- */

html.js .hero-anim {
  opacity: 0;
  transform: translateY(18px);
  animation: fadeUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

html.js .hero-anim--1 { animation-delay: 0.1s; }
html.js .hero-anim--2 { animation-delay: 0.2s; }
html.js .hero-anim--3 { animation-delay: 0.32s; }
html.js .hero-anim--4 { animation-delay: 0.44s; }
html.js .hero-anim--5 { animation-delay: 0.56s; }

.hero__content {
  position: relative;
  z-index: 4;
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  padding-bottom: 1rem;
}

.hero__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  line-height: 1.14;
  margin: 0 0 0.75rem;
  color: #FAF8F4;
}

.hero__titles {
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: rgba(250,248,244,0.82);
  margin: 0 0 0.35rem;
}

.hero__dates {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--gold-text);
  margin: 0 0 1.75rem;
}

.hero__scripture {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  max-width: 42em;
  margin: 0 0 2rem;
  padding-left: 1.1rem;
  border-left: 2px solid var(--gold);
  color: #F1E7CC;
}

.hero__scripture cite {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Hero RSVP card ---------- */
/* A compact floating "RSVP to Attend" prompt on the right side of the
   hero carousel — reuses .rsvp-counter's markup/JS (script.js updates
   every .rsvp-counter__number on the page from one fetch) so this stays
   in sync with the full RSVP section further down, without a second
   counter to maintain. Falls back to sitting in normal flow below the
   hero content on narrow screens — a right-floated overlay only works
   once there's enough width for it not to cover the hero text. */
.hero-rsvp-card {
  position: absolute;
  z-index: 5;
  top: 50%;
  /* % of the banner, not vw: 100vw includes a visible scrollbar, which
     would shift the card against the text column. */
  right: max(1.5rem, calc((100% - var(--max-width)) / 2 + 1.5rem));
  transform: translateY(-50%);
  width: min(300px, calc(100vw - 3rem));
  padding: 1.75rem 1.5rem;
  border-radius: var(--r-lg);
  background: rgba(16, 13, 7, 0.55);
  border: 1px solid rgba(250, 248, 244, 0.16);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--s-lg);
  text-align: center;
}

.hero-rsvp-card__heading {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.25;
  margin: 0.4rem 0 1.1rem;
  color: #FAF8F4;
}

.hero-rsvp-card .rsvp-counter {
  margin: 0 0 1.25rem;
}

.hero-rsvp-card .rsvp-counter__number {
  font-size: clamp(2.4rem, 4vw, 3rem);
}

.hero-rsvp-card .rsvp-counter__label {
  color: rgba(250, 248, 244, 0.7);
}

.hero-rsvp-card__btn {
  width: 100%;
  justify-content: center;
}

/* ---------- Guest icon system ---------- */
/* Inline stroke-SVG icons rendered by guest_icon() (api/lib/render_public.php),
   sharing admin_nav_icon()'s exact visual language. These rules just
   place them consistently wherever they land — button labels, form
   labels, meta rows, ticket-style detail lines — never restyle the svg
   itself (stroke-width/linecap stay whatever admin_nav_icon() set). */

.btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn--icon svg {
  flex-shrink: 0;
}

.radio__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  transition: color 0.2s var(--smooth);
}

.radio input:checked ~ .radio__icon--yes { color: var(--green); }
.radio input:checked ~ .radio__icon--maybe { color: var(--amber); }
.radio input:checked ~ .radio__icon--no { color: var(--red); }

.event-card__date,
.event-select-card__date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.event-card__meta dt,
.event-select-card__meta dt {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.confirm-email,
.confirm-phone,
.confirm-seat__label,
.confirm-footer a,
.family-page-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.confirm-footer a svg,
.family-page-back svg {
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  text-decoration: none;
  padding: 13px 26px;
  border: 1.5px solid transparent;
  border-radius: var(--r);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.28s var(--spring), box-shadow 0.2s var(--smooth), background 0.2s var(--smooth), color 0.2s ease, border-color 0.2s ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn--gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dk) 100%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(var(--gold-rgb),.35);
}

.btn--gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 40%, rgba(255,255,255,0.45) 50%, transparent 60%);
  background-size: 300% 100%;
  background-position: -300% center;
  pointer-events: none;
}

.btn--gold:hover {
  background: var(--gold-dk);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(var(--gold-rgb),.4);
}

.btn--gold:hover::after {
  animation: shimmerSweep 1.1s ease;
}

.btn--gold:active {
  transform: scale(0.96);
}

.btn--live {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn--live:hover {
  background: #841F19;
  border-color: #841F19;
  transform: translateY(-1px);
  color: #fff;
}

.btn--live__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #fff;
  animation: btn-live-pulse 1.6s ease-in-out infinite;
}

@keyframes btn-live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .btn--live__dot {
    animation: none;
  }
}

.btn--ghost {
  background: transparent;
  color: rgba(250,248,244,0.8);
  border-color: rgba(250,248,244,0.25);
}

.btn--ghost:hover {
  border-color: rgba(250,248,244,0.5);
  color: #fff;
  transform: translateY(-1px);
}

.btn--ink {
  background: var(--ink-1);
  color: var(--bg);
  border-color: var(--ink-1);
}

.btn--ink:hover {
  background: var(--gold-dk);
  border-color: var(--gold-dk);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -12px rgba(138,104,56,.5);
}

.btn--ink:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* For a genuinely destructive action's own link/button — e.g. platform/
   index.php's "Delete tenant", which leads to a confirm page rather
   than acting immediately. Not used for the milder "Suspend"/"Remove"
   actions elsewhere, which stay .btn--ghost-dark; this is reserved for
   things that cannot be undone at all. */
.btn--danger {
  background: transparent;
  color: var(--red);
  border-color: var(--red-lt);
}

.btn--danger:hover {
  background: var(--red-lt);
  border-color: var(--red);
}

/* Transient "submitted" state applied via JS on RSVP / tribute / photo
   success (script.js) — a quick, tasteful confirmation on the button
   itself rather than relying on the status line alone. Removed again
   when the form/modal resets. */
.btn.is-success {
  background: var(--green) !important;
  border-color: var(--green) !important;
  color: #fff !important;
  box-shadow: 0 8px 22px -8px rgba(58,107,78,.55) !important;
  pointer-events: none;
}

.btn.is-success::before {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: 0.45rem;
  vertical-align: -2px;
  background-color: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: staggerPop 0.4s var(--spring) both;
}

.btn--ghost-dark {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--border-2);
}

.btn--ghost-dark:hover {
  border-color: var(--gold);
  color: var(--gold-dk);
  transform: translateY(-1px);
}

.rsvp-form__actions {
  display: flex;
  gap: 0.75rem;
}

.rsvp-form__actions .btn {
  flex: 1;
}

/* ---------- Sections ---------- */

.section {
  padding: 5rem 1.5rem;
}

.section--panel {
  background:
    radial-gradient(60% 70% at 100% 0%, rgba(var(--gold-rgb),0.06) 0%, rgba(var(--gold-rgb),0) 60%),
    var(--surface-2);
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__inner--narrow {
  max-width: 640px;
}

.section__title {
  position: relative;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  color: var(--ink-1);
  margin: 0 0 2.5rem;
  padding-bottom: 1.1rem;
}

.section__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dk) 0%, var(--gold) 50%, var(--gold-lt) 100%);
}

/* ---------- Card ---------- */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  box-shadow: var(--s);
  transition: box-shadow 0.35s var(--smooth), transform 0.35s var(--spring), border-color 0.35s ease;
}

/* Slim gold accent on the leading edge — the same brand identity the
   bold landing page carries via full gradient cards, toned down to a
   left-edge stripe here since admin screens (RSVP lists, tenant lists)
   often stack many cards at once, where a full gradient fill per card
   would compete with the data instead of framing it. */
.card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: var(--r-lg) 0 0 var(--r-lg);
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dk) 100%);
  opacity: 0.55;
  transition: opacity 0.35s ease;
}

.card:hover::before {
  opacity: 1;
}

.tilt {
  transform-style: preserve-3d;
}

.tilt:hover {
  box-shadow: var(--s-lg);
}

.tilt:active {
  transform: scale(0.98);
}

/* ---------- Scroll reveal ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.frames > .reveal:nth-child(2),
.event-cards > .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.frames > .reveal:nth-child(3) {
  transition-delay: 0.18s;
}

.frames > .reveal:nth-child(4) {
  transition-delay: 0.26s;
}

/* ---------- Life-story frames ---------- */

.frames {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  perspective: 1200px;
}

.frame__no {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--gold-dk);
  margin: 0 0 0.75rem;
}

.frame__title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink-1);
  margin: 0 0 0.9rem;
}

.frame__text {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-2);
}

/* ---------- Custom sections ---------- */

.custom-section__body {
  font-size: 1rem;
  color: var(--ink-2);
}

/* ---------- Livestream ---------- */

.livestream-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--dark-bg);
  box-shadow: var(--s);
}

.livestream-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.livestream-fallback {
  margin: 0.6rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-3);
}

.livestream-fallback a {
  color: var(--gold-dk);
  font-weight: 600;
}

/* ---------- Photo gallery ---------- */

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.photo-gallery__item {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  border-radius: var(--r);
  background: var(--dark-bg);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--s-sm);
  transition: transform 0.3s var(--spring), box-shadow 0.3s var(--smooth);
}

.photo-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--smooth), filter 0.4s ease;
  filter: saturate(0.96);
}

.photo-gallery__item:hover {
  transform: translateY(-3px);
  box-shadow: var(--s-lg);
}

.photo-gallery__item:active {
  transform: scale(0.96);
}

.photo-gallery__item--demo {
  cursor: default;
}

.photo-gallery__item--demo:hover {
  transform: none;
  box-shadow: var(--s-sm);
}

.photo-gallery__item--demo img {
  filter: none;
}

.photo-gallery__item--demo:hover img {
  transform: none;
  filter: none;
}

.hero__bg--demo {
  background-size: cover;
  background-position: center;
}

.photo-gallery__item:hover img {
  transform: scale(1.06);
  filter: saturate(1.05);
}

.gallery-subheading {
  margin: 2rem 0 1rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dk);
}

.gallery-share {
  margin: 1.75rem 0 0;
  text-align: center;
}

/* ---------- Lightbox ---------- */

.lightbox {
  max-width: 900px;
  padding: 1.25rem;
  text-align: center;
}

.lightbox__image {
  display: block;
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--r-sm);
}

.lightbox__caption {
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-1);
}

.lightbox__caption:empty {
  display: none;
}

/* ---------- Family ---------- */

.family-hint {
  margin: -1.5rem 0 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-3);
}

.family-list {
  margin: 0;
  padding-left: 1.4rem;
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink-1);
}

.family-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.family-list li:last-child {
  border-bottom: none;
}

.family-list--links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--ink-1);
  text-decoration: none;
  transition: color 0.2s var(--smooth);
}

.family-list--links a::after {
  content: "→";
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--gold-dk);
  transition: transform 0.2s var(--spring);
}

.family-list--links a:hover {
  color: var(--gold-dk);
}

.family-list--links a:hover::after {
  transform: translateX(4px);
}

/* ---------- Comfort quote ---------- */

.section--dark-accent {
  position: relative;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(var(--gold-rgb),.12) 0%, transparent 55%),
    linear-gradient(155deg, var(--dark-bg) 0%, var(--dark-mid) 45%, var(--dark-lt) 100%);
  color: var(--ghost);
  text-align: center;
  overflow: hidden;
}

.comfort-quote {
  position: relative;
  z-index: 3;
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  line-height: 1.6;
  color: #FAF8F4;
}

.comfort-quote p {
  margin: 0 0 1.25rem;
}

.comfort-quote cite {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.section--dark-accent .section__inner {
  position: relative;
  z-index: 3;
}

/* ---------- Events ---------- */

.event-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  perspective: 1200px;
}

.event-card {
  background: linear-gradient(160deg, var(--dark-lt) 0%, var(--dark-mid) 55%, var(--dark-bg) 100%);
  color: var(--ghost);
  box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 18px 36px -16px rgba(0,0,0,.55);
}

.event-card .eyebrow {
  color: var(--gold-text);
}

.event-card__title {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: #FAF8F4;
}

.event-card__date {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--gold-text);
  margin: 0 0 1.5rem;
}

.event-card__meta {
  margin: 0;
  display: grid;
  gap: 1rem;
}

.event-card__meta dt {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0 0 0.2rem;
}

.event-card__meta dd {
  margin: 0;
  font-size: 1rem;
}

.event-card .placeholder {
  color: rgba(250,248,244,0.65);
}

/* ---------- RSVP event selection cards ---------- */

.event-select-fieldset {
  background: none;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.event-select-card {
  position: relative;
  display: block;
  cursor: pointer;
  padding: 1.25rem 1.4rem;
  border-radius: var(--r);
  background: linear-gradient(160deg, var(--dark-lt) 0%, var(--dark-mid) 55%, var(--dark-bg) 100%);
  color: var(--ghost);
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 12px 28px -16px rgba(0,0,0,.55);
  border: 2px solid transparent;
  transition: border-color 0.2s var(--smooth), opacity 0.2s var(--smooth);
}

.event-select-card:has(input:checked) {
  border-color: var(--gold);
}

.event-select-card:has(input:not(:checked)) {
  opacity: 0.55;
}

.event-select-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.event-select-card .eyebrow {
  color: var(--gold-text);
  margin: 0 0 0.4rem;
}

.event-select-card__check {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 1.5px solid rgba(250,248,244,0.5);
  display: grid;
  place-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s var(--smooth), transform 0.2s var(--spring), background 0.2s var(--smooth);
}

.event-select-card__check svg {
  width: 1rem;
  height: 1rem;
}

.event-select-card input:checked ~ .event-select-card__check {
  opacity: 1;
  transform: scale(1);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dk) 100%);
  border-color: var(--gold);
}

.event-select-card__title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  color: #FAF8F4;
  padding-right: 2rem;
}

.event-select-card__date {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--gold-text);
  margin: 0 0 1rem;
}

.event-select-card__meta {
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.event-select-card__meta dt {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin: 0 0 0.15rem;
}

.event-select-card__meta dd {
  margin: 0;
  font-size: 0.88rem;
  color: rgba(250,248,244,0.9);
}

.placeholder {
  font-style: italic;
  color: var(--ink-3);
}

.events__cta {
  margin-top: 2.5rem;
  text-align: center;
}

/* ---------- RSVP prompt ---------- */

.rsvp-prompt {
  text-align: center;
}

.rsvp-prompt__text {
  margin: 0 0 1.75rem;
  color: var(--ink-2);
}

.rsvp-prompt .section__title::after {
  left: 50%;
  transform: translateX(-50%);
}

.rsvp-counter {
  margin: 0.5rem 0 2rem;
}

.rsvp-counter__number {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(3.2rem, 9vw, 5.5rem);
  line-height: 1;
  background: linear-gradient(135deg, var(--gold-dk) 0%, var(--gold) 45%, var(--gold-lt) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform 0.25s ease;
}

.rsvp-counter__number.is-updating {
  transform: scale(1.08);
}

.rsvp-counter__label {
  margin: 0.35rem 0 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.rsvp-counter__breakdown {
  margin: 0.6rem 0 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-3);
}

.rsvp-counter__breakdown[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .rsvp-counter__number {
    transition: none;
  }
}

/* ---------- Hero countdown timer ---------- */

.hero-countdown {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0 0 1.75rem;
}

.hero-countdown__tile {
  text-align: center;
}

.hero-countdown__num {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  background: linear-gradient(135deg, var(--gold-dk) 0%, var(--gold) 45%, var(--gold-lt) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-countdown__label {
  display: block;
  margin: 0.3rem 0 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 248, 244, 0.7);
}

.hero-countdown__arrived {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--gold-text);
  margin: 0;
}

/* ---------- RSVP attendee showcase ---------- */

.rsvp-attendees {
  margin: 0 0 2rem;
}

.rsvp-attendees[hidden] {
  display: none;
}

.rsvp-attendees__label {
  margin: 0 0 0.85rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-dk);
}

.rsvp-attendees__grid {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  padding: 0.25rem 0.1rem 0.6rem;
  scrollbar-width: none;
}

.rsvp-attendees__grid::-webkit-scrollbar {
  display: none;
}

.rsvp-attendee {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  width: 68px;
  animation: rvSlide 0.4s var(--smooth) both;
}

.rsvp-attendee__photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

.rsvp-attendee__initial {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.25rem;
  color: #fff;
}

.rsvp-attendee__name {
  font-size: 0.72rem;
  text-align: center;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ---------- Google Sign-In ---------- */

.google-signin {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.google-signin__button {
  min-height: 40px;
}

.google-signin__hint {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: var(--ink-3);
}

.google-signin__done {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.google-signin__done[hidden] {
  display: none;
}

.google-signin__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold);
}

.google-signin__done span {
  font-size: 0.9rem;
  color: var(--ink-1);
}

.google-signin__clear {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  text-decoration: underline;
  color: var(--gold-dk);
  cursor: pointer;
}

.google-signin__clear:hover {
  color: var(--ink-1);
}

/* ---------- Family member gallery page ---------- */

.family-page-header {
  padding: calc(3rem + env(safe-area-inset-top)) 1.5rem 2.5rem;
  background:
    radial-gradient(70% 45% at 8% 15%, rgba(var(--gold-rgb),0.08) 0%, rgba(var(--gold-rgb),0) 55%),
    var(--surface-2);
}

.family-page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--gold-dk);
  text-decoration: none;
}

.family-page-back svg {
  width: 1rem;
  height: 1rem;
}

.family-page-back:hover {
  color: var(--ink-1);
}

.family-page-subtitle {
  margin: 0;
  color: var(--ink-2);
}

/* ---------- Confirmation page ---------- */

.confirm-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(80% 50% at 85% 0%, rgba(var(--gold-rgb),0.09) 0%, rgba(var(--gold-rgb),0) 60%),
    var(--bg);
}

.confirm-card {
  width: 100%;
  max-width: 400px;
  text-align: center;
  padding: 2.5rem 2rem;
  animation: fadeUp 0.6s var(--smooth) both;
  /* Ticket-stub notches: two circular bites cut from the left/right edges
     using a radial-gradient mask, echoed by a dashed divider a little
     further down so the card reads as a printed ticket. */
  -webkit-mask-image:
    radial-gradient(circle 10px at 0 96px, transparent 10px, #000 10.5px),
    radial-gradient(circle 10px at 100% 96px, transparent 10px, #000 10.5px);
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-image:
    radial-gradient(circle 10px at 0 96px, transparent 10px, #000 10.5px),
    radial-gradient(circle 10px at 100% 96px, transparent 10px, #000 10.5px);
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}

.confirm-card:has(.confirm-floormap) {
  max-width: 640px;
}

.confirm-check {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: var(--green-lt);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: staggerPop 0.5s var(--spring) both;
}

.confirm-check svg {
  width: 1.75rem;
  height: 1.75rem;
}

.confirm-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  color: var(--ink-1);
  margin: 0.5rem 0 0.4rem;
}

.confirm-email {
  font-size: 1rem;
  color: var(--ink-2);
  margin: 0;
}

.confirm-phone {
  font-size: 0.9rem;
  color: var(--ink-3);
  margin: 0.25rem 0 0;
}

.confirm-seat {
  margin: 1.5rem 0 0;
  padding: 1.1rem 1.4rem;
  border-radius: var(--r);
  background: var(--gold-pale);
  border: 1px dashed var(--border-2);
}

.confirm-seat__label {
  margin: 0 0 0.25rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dk);
}

.confirm-seat__value {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--ink-1);
}

.confirm-floormap {
  margin: 1.5rem 0 0;
  text-align: left;
}

.confirm-floormap__label {
  margin: 0 0 0.6rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dk);
  text-align: center;
}

.confirm-floormap__scroll {
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.confirm-floormap__tables {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem 1.25rem;
  padding: 0.5rem;
}

/* The interactive positioned map: a fixed-size "world" canvas (900x675,
   set inline via data-w/data-h to match api/config.php's
   render_seat_and_map_html()) sitting inside a viewport that's sized to
   the phone rather than the world — JS (render_floormap_zoom_script() in
   api/config.php) scales and pans the world with a CSS transform so
   pinch/wheel-zoom and drag-to-pan both work, and the on-screen spacing
   between chairs never depends on how wide the phone is. */
.confirm-floormap__viewport {
  position: relative;
  width: 100%;
  height: 62vh;
  min-height: 380px;
  max-height: 620px;
  overflow: hidden;
  border-radius: var(--r);
  background-color: var(--surface-2);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.confirm-floormap__tables--positioned {
  position: absolute;
  top: 0;
  left: 0;
  width: 900px;
  height: 675px;
  transform-origin: 0 0;
  will-change: transform;
  /* A rectangular table is the widest thing placed here (11rem, so a
     5.5rem half-width) — this padding must be at least that so a table
     dragged to the very edge (x/y at 0 or 100) doesn't get half-clipped
     by the world's own edge. Round tables (6.5rem, 3.25rem half-width)
     need less, so this is sized for the larger of the two. */
  padding: 5.5rem;
}

.confirm-floormap__tables--positioned .floor-table-wrap {
  position: absolute;
  transform: translate(-50%, -50%);
}

.confirm-floormap__zoom-controls {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;
}

.confirm-floormap__zoom-btn {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: var(--s-sm);
  color: var(--ink-1);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.confirm-floormap__zoom-btn:active {
  transform: scale(0.92);
}

.confirm-floormap__zoom-btn--reset {
  font-size: 0.95rem;
}

.confirm-floormap__hint-gesture {
  display: block;
  width: 100%;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  opacity: 0.75;
}

.floor-table-wrap {
  position: relative;
  width: 6.5rem;
  height: 6.5rem;
  flex-shrink: 0;
}

.floor-table {
  position: absolute;
  inset: 22%;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  box-shadow: var(--s-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.floor-table-wrap--mine .floor-table {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb),0.22);
}

/* Rectangular (banquet) tables get a wider, shorter footprint than the
   round default — chairs (positioned by rect_chair_position() in
   api/config.php) run along the two long edges only. */
.floor-table-wrap--rectangle {
  width: 11rem;
  height: 5.5rem;
}

/* A rotated rectangle table: --table-rotation is set inline by
   render_seat_and_map_html() / render_floor_plan_overview_html() (only
   when non-zero). Its label turns with the table, flipped by --table-flip
   when it would read upside down; the chair numbers turn back to stay
   upright. */
.confirm-floormap__tables--positioned .floor-table-wrap--rectangle {
  transform: translate(-50%, -50%) rotate(var(--table-rotation, 0deg));
}

.floor-table-wrap--rectangle .floor-table__label {
  display: inline-block;
  transform: rotate(var(--table-flip, 0deg));
}

.floor-table-wrap--rectangle .floor-chair {
  transform: translate(-50%, -50%) rotate(calc(-1 * var(--table-rotation, 0deg)));
}

.floor-table-wrap--rectangle .floor-chair--mine {
  transform: translate(-50%, -50%) rotate(calc(-1 * var(--table-rotation, 0deg))) scale(1.3);
}

.floor-table--rectangle {
  inset: 18% 6%;
  border-radius: var(--r-sm);
}

/* A stage/podium marker — decorative only, not a seating table, so it
   declares its own position: absolute directly (rather than depending
   on a parent selector like .floor-table-wrap does) so it works the
   same whether it's placed inside the guest-facing map's
   .confirm-floormap__tables--positioned or the printable chart's
   .print-floormap without needing a matching rule added to both. */
.floor-stage {
  position: absolute;
  /* Centers on its x/y point first, then rotates around that same
     center — --stage-rotation is set inline per-stage (only when
     non-zero) by render_seat_and_map_html() / render_floor_plan_
     overview_html() in api/config.php; it defaults to 0deg here so an
     unrotated stage doesn't need the variable set at all. */
  transform: translate(-50%, -50%) rotate(var(--stage-rotation, 0deg));
  min-width: 8rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--r-sm);
  background: var(--ink-1);
  color: #fff;
  text-align: center;
  box-shadow: var(--s);
}

.floor-stage__label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.floor-table__label {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--ink-1);
  padding: 0 0.2rem;
  line-height: 1.1;
  word-break: break-word;
}

.floor-chair {
  position: absolute;
  width: 1.5rem;
  height: 1.5rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--gold-pale);
  border: 1.5px solid var(--gold-lt);
  color: var(--gold-dk);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.62rem;
  transition: transform 0.2s var(--spring);
}

.floor-chair--mine {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dk) 100%);
  border-color: var(--gold);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb),0.28);
  transform: translate(-50%, -50%) scale(1.3);
  z-index: 1;
}

.confirm-floormap__hint {
  margin: 0.85rem 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--ink-3);
  flex-wrap: wrap;
}

.confirm-floormap__swatch {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 3px;
  background: var(--gold-pale);
  border: 1px solid var(--gold-lt);
  margin-left: 0.6rem;
}

.confirm-floormap__swatch:first-child {
  margin-left: 0;
}

.confirm-floormap__swatch--mine {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dk) 100%);
  border-color: var(--gold);
}

.confirm-footer {
  margin: 1.75rem 0 0;
  font-size: 0.78rem;
  color: var(--gold-dk);
}

.confirm-footer a {
  color: inherit;
}

.find-seat-form {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.find-seat-form input[type="text"] {
  flex: 1;
  min-width: 10rem;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink-1);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--pill);
  padding: 0.85rem 1.25rem;
  transition: border-color 0.2s var(--smooth), box-shadow 0.2s var(--smooth), background 0.2s var(--smooth);
}

.find-seat-form input[type="text"]:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb),.14);
}

.find-seat-matches {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.find-seat-matches__item {
  display: block;
  width: 100%;
  text-align: center;
}

/* ---------- Forms ---------- */

.form { max-width: 100%; }

.rsvp-guest-names:not(:empty) {
  padding: 0.9rem 1rem 0.2rem;
  margin-bottom: 1.4rem;
  background: var(--surface-2);
  border-radius: var(--r);
}

.form__row {
  margin-bottom: 1.4rem;
}

/* Direct-child combinators only — a plain field row's own <label> (and a
   fieldset's own <legend>) should get this uppercase caption treatment,
   but .radio-group / .event-select-fieldset nest their own <label>s two
   levels deeper inside a fieldset that also carries the .form__row
   class, and those must keep their own component styling (.radio,
   .checkbox, .event-select-card each set their own display/flex) rather
   than being caught by a descendant selector and knocked back to
   display:block. */
.form__row > label,
.form__fieldset > legend {
  display: block;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink-1);
  margin-bottom: 0.5rem;
}

.optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-3);
}

.pledge-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.pledge-choice__option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-2);
  cursor: pointer;
}

.pledge-choice__option input {
  accent-color: var(--gold);
}

.form__row input[type="text"],
.form__row input[type="number"],
.form__row input[type="tel"],
.form__row input[type="email"],
.form__row input[type="password"],
.form__row select,
.form__row textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ink-1);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  padding: 11px 15px;
  transition: background 0.2s var(--smooth), border-color 0.2s var(--smooth), box-shadow 0.2s var(--smooth);
}

.form__row input[type="text"]:focus,
.form__row input[type="number"]:focus,
.form__row input[type="tel"]:focus,
.form__row input[type="email"]:focus,
.form__row input[type="password"]:focus,
.form__row select:focus,
.form__row textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(var(--gold-rgb),.11);
}

/* Not folded into the shared input/select/textarea rule above — a
   native file input's padding/border is inconsistent across browsers
   and mostly ignored anyway, so this only gives it enough vertical
   presence that .admin-section__hint's own -1rem top margin (tuned for
   a text input's height) pulls up into empty space below it rather
   than overlapping the control itself, which is what happened without
   this on every existing file field (logo, gallery/hero-slide/family
   photo, hero image) before it was added. */
.form__row input[type="file"] {
  display: block;
  margin-bottom: 0.75rem;
}

/* Same -1rem-overlap problem as above, but for a hint that follows a
   normal text/email/etc. input directly (e.g. the disabled email field
   on admin/profile.php) rather than a file input — nothing here gives
   the input itself extra bottom presence, so the hint's negative
   top margin pulls it up into the input's own border instead of the
   blank space below it. Reset to a small positive gap instead. */
.form__row .admin-section__hint {
  margin-top: 0.4rem;
}

.form__row textarea {
  resize: vertical;
}

.form__fieldset {
  border: none;
  background: var(--surface-2);
  border-radius: var(--r);
  padding: 1rem 1.1rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-1);
  margin: 0.5rem 0;
  cursor: pointer;
}

.checkbox__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.checkbox__venue {
  font-size: 0.78rem;
  font-family: var(--sans);
  color: var(--ink-3);
}

.checkbox input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  border-radius: 7px;
  border: 1.5px solid var(--border-2);
  background: var(--surface);
  display: grid;
  place-content: center;
  transition: background 0.2s var(--smooth), border-color 0.2s var(--smooth), transform 0.2s var(--spring);
}

.checkbox input::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  transform: scale(0);
  transition: transform 0.2s var(--spring);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 45% 68%);
  background: #fff;
}

.checkbox input:checked {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dk) 100%);
  border-color: var(--gold);
}

.checkbox input:checked::before {
  transform: scale(1);
}

.checkbox input:active {
  transform: scale(0.9);
}

.radio-group {
  display: flex;
  flex-direction: column;
}

.radio {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-1);
  margin: 0.5rem 0;
  cursor: pointer;
}

.radio input {
  appearance: none;
  -webkit-appearance: none;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  background: var(--surface);
  display: grid;
  place-content: center;
  transition: background 0.2s var(--smooth), border-color 0.2s var(--smooth), transform 0.2s var(--spring);
}

.radio input::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.2s var(--spring);
  background: #fff;
}

.radio input:checked {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dk) 100%);
  border-color: var(--gold);
}

.radio input:checked::before {
  transform: scale(1);
}

.radio input:active {
  transform: scale(0.9);
}

#rsvp-attending-fields {
  display: grid;
  gap: 1.4rem;
  transition: opacity 0.2s var(--smooth);
}

#rsvp-attending-fields[hidden] {
  display: none;
}

.form__status {
  margin: 1rem 0 0;
  font-family: var(--sans);
  font-size: 0.82rem;
  min-height: 1.2em;
}

.form__status[data-state="success"] { color: var(--green); }
.form__status[data-state="error"] { color: var(--red); }

/* ---------- Tributes ---------- */

.tributes__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.tributes__head .section__title {
  margin-bottom: 0;
}

.tribute-list {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.tribute-list .tribute {
  animation: rvSlide 0.5s var(--smooth) both;
}

.tribute {
  padding: 1.5rem 1.75rem;
  display: block;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  border: none;
  cursor: pointer;
}

.tribute__head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.6rem;
}

.tribute__head-text {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.tribute__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold);
  flex-shrink: 0;
}

.tribute__name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink-1);
}

.tribute__relationship {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--gold-dk);
  text-transform: uppercase;
}

.tribute__time {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--ink-3);
}

.tribute__message {
  margin: 0;
  font-size: 0.98rem;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tribute--dark {
  background: linear-gradient(160deg, var(--dark-lt) 0%, var(--dark-mid) 55%, var(--dark-bg) 100%);
  color: var(--ghost);
  box-shadow: 0 1px 2px rgba(0,0,0,.2), 0 18px 36px -16px rgba(0,0,0,.55);
}

.tribute--dark .tribute__name {
  color: #FAF8F4;
}

.tribute--dark .tribute__relationship {
  color: var(--gold-text);
}

.tribute--dark .tribute__time {
  color: rgba(250,248,244,0.6);
}

.tribute--dark .tribute__message {
  color: rgba(250,248,244,0.9);
}

.tribute--dark .tribute__avatar {
  border-color: var(--gold-text);
}

.tribute--gold {
  background: linear-gradient(150deg, var(--gold-lt) 0%, var(--gold) 55%, var(--gold-dk) 100%);
  color: var(--dark-bg);
  box-shadow: 0 1px 2px rgba(24,21,15,.1), 0 18px 36px -16px rgba(24,21,15,.45);
}

.tribute--gold .tribute__name {
  color: var(--dark-bg);
}

.tribute--gold .tribute__relationship {
  color: #3A2A14;
}

.tribute--gold .tribute__time {
  color: rgba(24,21,15,.65);
}

.tribute--gold .tribute__message {
  color: rgba(24,21,15,.88);
}

.tribute--gold .tribute__avatar {
  border-color: var(--dark-bg);
}

/* ---------- Tribute full-text popup ---------- */

.tribute-view__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.tribute-view__avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold);
  flex-shrink: 0;
}

.tribute-view__avatar[hidden] {
  display: none;
}

.tribute-view__name {
  margin: 0 0 0.15rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink-1);
}

.tribute-view__meta {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--ink-3);
}

.tribute-view__message {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.6;
  white-space: pre-wrap;
  color: var(--ink-2);
}

/* ---------- Biography popup ---------- */

.biography-modal {
  max-width: 640px;
}

.biography-modal__body {
  display: grid;
  gap: 1.75rem;
  margin-top: 1.5rem;
}

.biography-modal__chapter {
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.biography-modal__chapter:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.tribute-empty {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-3);
  text-align: center;
  padding: 2rem 0;
}

/* ---------- Floating modal forms ---------- */

body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: radial-gradient(120% 100% at 50% 0%, rgba(16,13,7,0.55) 0%, rgba(12,10,6,0.85) 100%);
  backdrop-filter: blur(3px);
  animation: modal-fade 0.18s ease;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 2.5rem 2rem 2rem;
  border-radius: var(--r-lg);
  animation: modal-rise 0.32s var(--spring);
}

.modal__close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  font-family: var(--sans);
  color: var(--ink-1);
  background: var(--fill);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s var(--smooth), transform 0.2s var(--spring);
}

.modal__close:hover {
  background: rgba(var(--gold-rgb),0.16);
}

.modal__close:active {
  transform: scale(0.9);
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes sheet-rise {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal {
    animation: none;
  }
}

/* Bottom sheet on mobile — the defining iOS modal pattern */
@media (max-width: 600px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    padding: 1.75rem 1.5rem calc(1.75rem + env(safe-area-inset-bottom));
    animation: sheet-rise 0.36s var(--spring);
  }

  .modal::before {
    content: "";
    position: absolute;
    top: 0.6rem;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 5px;
    border-radius: var(--pill);
    background: var(--border-2);
  }

  .modal__close {
    top: 1.4rem;
    /* 2.2rem (35.2px) is under the ~44px comfortable touch-target
       size — bumped here, mobile-only, rather than changing the
       tighter desktop sizing. */
    width: 44px;
    height: 44px;
  }

  @media (prefers-reduced-motion: reduce) {
    .modal {
      animation: none;
    }
  }
}

/* ---------- Footer ---------- */

.footer {
  position: relative;
  text-align: center;
  padding: 3rem 1.5rem;
  background:
    radial-gradient(60% 100% at 50% 0%, rgba(var(--gold-rgb),.08) 0%, rgba(var(--gold-rgb),0) 60%),
    linear-gradient(155deg, var(--dark-bg) 0%, var(--dark-mid) 60%, var(--dark-lt) 100%);
  color: rgba(250,248,244,0.75);
  overflow: hidden;
}

.footer p {
  position: relative;
  z-index: 3;
  margin: 0.3rem 0;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.footer__dates {
  color: var(--gold-text);
}

/* ---------- iOS bottom tab bar ---------- */

.ios-tabbar {
  display: none;
}

@media (max-width: 760px) {
  .ios-tabbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    justify-content: space-around;
    align-items: center;
    padding: 0.4rem 0.25rem calc(0.4rem + env(safe-area-inset-bottom));
    background: var(--blur-bg);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border-top: 1px solid var(--border);
  }

  .ios-tabbar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-height: 44px;
    font-family: var(--sans);
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--ink-3);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem 0.25rem;
    transition: color 0.2s var(--smooth), transform 0.15s var(--spring);
  }

  .ios-tabbar__item svg {
    width: 24px;
    height: 24px;
  }

  .ios-tabbar__item:active {
    transform: scale(0.88);
  }

  .ios-tabbar__item.is-active {
    color: var(--gold-dk);
  }
}

/* ---------- Animation keyframes ---------- */

@keyframes driftA {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(50px,-35px) scale(1.1); }
  66%     { transform: translate(-25px,25px) scale(.93); }
}
@keyframes driftB {
  0%,100% { transform: translate(0,0) scale(1); }
  40%     { transform: translate(-40px,50px) scale(1.08); }
  70%     { transform: translate(28px,-18px) scale(.96); }
}
@keyframes particleRise {
  0%   { opacity:0; transform:translateY(0) scale(0); }
  8%   { opacity:.8; transform:scale(1); }
  90%  { opacity:.15; }
  100% { opacity:0; transform:translateY(-200px) translateX(var(--drift,10px)) scale(.1); }
}
@keyframes shimmerSweep {
  0%   { background-position: -300% center; }
  100% { background-position:  300% center; }
}
@keyframes cardBreath {
  0%,100% { box-shadow:0 24px 64px rgba(0,0,0,.5), inset 0 1px 0 rgba(var(--gold-text-rgb),.1); border-color:rgba(var(--gold-rgb),.25); }
  50%     { box-shadow:0 32px 80px rgba(0,0,0,.6), 0 0 80px rgba(var(--gold-rgb),.1), inset 0 1px 0 rgba(var(--gold-text-rgb),.3); border-color:rgba(var(--gold-rgb),.55); }
}
@keyframes fadeUp    { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:translateY(0)} }
@keyframes staggerPop{ from{opacity:0;transform:scale(.55)} to{opacity:1;transform:scale(1)} }
@keyframes slideInR  { from{opacity:0;transform:translateX(24px)} to{opacity:1;transform:translateX(0)} }
@keyframes slideInL  { from{opacity:0;transform:translateX(-24px)} to{opacity:1;transform:translateX(0)} }
@keyframes pillPop   { 0%{transform:scale(.8);opacity:0} 70%{transform:scale(1.05)} 100%{transform:scale(1);opacity:1} }
@keyframes rvSlide   { from{opacity:0;transform:translateX(-10px)} to{opacity:1;transform:translateX(0)} }

/* Stagger pop-in for grid layouts of items (gallery tiles, event cards,
   RSVP attendee showcase, life-story frames) — nth-child delays give a
   cheap cascading entrance without any JS. */
html.js .photo-gallery__item,
html.js .event-cards > .event-card,
html.js .frames > .frame {
  animation: staggerPop 0.5s var(--smooth) both;
}

@media (prefers-reduced-motion: reduce) {
  html.js .photo-gallery__item,
  html.js .event-cards > .event-card,
  html.js .frames > .frame,
  .rsvp-attendee,
  .tribute-list .tribute {
    animation: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .section__inner {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .frames,
  .event-cards {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.5rem 1.25rem;
  }

  .hero {
    min-height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    padding: calc(5rem + env(safe-area-inset-top)) 1.25rem 2rem;
  }

  .hero__ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__ctas .btn {
    text-align: center;
  }

  .hero-rsvp-card {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 2rem;
  }

  .tributes__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .tributes__head .btn {
    align-self: stretch;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 1.5rem;
  }

  .modal {
    padding: 2rem 1.25rem 1.25rem;
  }

  /* Break the map out to the phone's full width instead of sitting
     inset inside the card's own padding — negative margins cancel
     .card's 1.5rem side padding exactly, and the taller height gives
     pinch/pan room to actually be useful on a small screen. */
  .confirm-floormap__viewport {
    margin: 0 -1.5rem;
    width: calc(100% + 3rem);
    height: 72vh;
    border-radius: 0;
  }
}

@media (min-width: 1200px) {
  .frames {
    grid-template-columns: repeat(4, 1fr);
  }

  .section {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

@media (min-width: 1600px) {
  :root {
    --max-width: 1440px;
  }

  .section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

@media (hover: none) {
  .tilt:hover {
    box-shadow: 0 12px 32px -20px rgba(24,21,15,.35);
  }
}

/* ---------- Form errors beside the field, RSVP next steps ---------- */
.field-error { margin: 0.35rem 0 0; font-family: var(--sans); font-size: 0.82rem; font-weight: 500; color: var(--red); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(180, 40, 40, 0.12); }
fieldset[aria-invalid="true"] { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 12px; }
.form.is-done > *:not(.rsvp-next):not(.form__status) { display: none !important; }
.rsvp-next { margin: 1.25rem 0 0; padding: 1.1rem 1.2rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.rsvp-next__title { margin: 0 0 0.6rem; font-family: var(--serif); font-size: 1.15rem; color: var(--ink-1); }
.rsvp-next p { margin: 0 0 0.6rem; font-size: 0.9rem; color: var(--ink-2); }
.rsvp-next__links, .rsvp-next__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.4rem 0 0.9rem; }
.rsvp-next__actions { margin-bottom: 0; }

/* ---------- Gallery: soft placeholder while photos load ---------- */
.photo-gallery__item:not(.photo-gallery__item--demo) {
  background: linear-gradient(110deg, #ece4d6 8%, #f6f1e8 18%, #ece4d6 33%);
  background-size: 200% 100%;
  animation: tgpGalleryShimmer 1.5s linear infinite;
}
.js-gallery .photo-gallery__item img { opacity: 0; transition: opacity 0.45s ease, transform 0.5s var(--smooth), filter 0.4s ease; }
.js-gallery .photo-gallery__item img.is-loaded { opacity: 1; }
@keyframes tgpGalleryShimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .photo-gallery__item:not(.photo-gallery__item--demo) { animation: none; }
}

/* ---------- Planner showcase hero ---------- */
/* An Event Planner's own page (content page_style = 'showcase'): a
   business-card layout instead of an event invitation. Left-aligned and
   quieter, with a lighter scrim so the demo or uploaded banner shows,
   and no RSVP card, countdown or date line. */
.hero--planner {
  align-items: center;
  min-height: 82vh;
}

.hero--planner .hero__scrim {
  background:
    linear-gradient(90deg, rgba(16,13,7,0.88) 0%, rgba(16,13,7,0.62) 46%, rgba(16,13,7,0.12) 100%),
    linear-gradient(180deg, rgba(16,13,7,0.15) 0%, rgba(12,10,6,0.7) 100%);
}

.hero--planner .hero__content {
  max-width: var(--max-width);
  text-align: left;
  padding-bottom: 0;
}

.hero--planner .hero__content > * {
  max-width: 34rem;
}

.hero--planner .eyebrow--hero {
  display: inline-block;
  padding-bottom: 0.7rem;
  margin-bottom: 1.1rem;
  border-bottom: 2px solid var(--gold);
}

.hero--planner .hero__name {
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 1.06;
}

.hero--planner .hero__titles {
  font-size: 1.1rem;
  line-height: 1.55;
  margin-bottom: 1.8rem;
}

.hero--planner .hero__ctas {
  gap: 0.8rem;
}

@media (max-width: 720px) {
  .hero--planner { min-height: 78vh; align-items: flex-end; }
  .hero--planner .hero__scrim {
    background: linear-gradient(180deg, rgba(16,13,7,0.35) 0%, rgba(12,10,6,0.92) 100%);
  }
}


/* ---------- RSVP form: "why we ask" notes and age-range choices ---------- */
.form__why { margin: .35rem 0 0; font-size: .8125rem; line-height: 1.4; color: var(--ink-3); }
.form__fieldset > .form__why { margin-top: .5rem; }
/* Children per age range: one row per range with − / + steppers. */
.rsvp-age-total { margin-left: .5rem; font-weight: 400; font-size: .875rem; color: var(--ink-3); }
.rsvp-age-ranges { display: grid; gap: .5rem; }
.rsvp-age-range { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.rsvp-age-range label { margin: 0; font-size: .9375rem; font-weight: 400; }
.stepper { display: inline-flex; align-items: center; gap: .35rem; }
.stepper__btn {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1px solid var(--border-2); background: var(--surface); color: var(--ink-1);
  font-size: 1.25rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.stepper__btn:hover { border-color: var(--gold); color: var(--gold-dk); }
.stepper__btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.stepper input[type="number"] {
  width: 3rem; text-align: center; padding-left: .25rem; padding-right: .25rem;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input[type="number"]::-webkit-inner-spin-button,
.stepper input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Compact hero + higher RSVP card (all event pages) ---------- */
/* The hero used to fill the whole first screen, pushing the story and the
   RSVP below the fold on a phone. It is now a banner: roughly half the
   screen on a phone, a little over half on desktop. The RSVP card sits at
   the top of the banner instead of its middle, and on a phone becomes a
   compact two-column strip so it shows without scrolling. */
.hero {
  min-height: clamp(380px, 60vh, 600px);
  padding: calc(2.5rem + env(safe-area-inset-top)) 1.5rem 2rem;
}
.hero--planner { min-height: clamp(380px, 58vh, 600px); }
.hero__name { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 0.5rem; }
.hero__bg { inset: -20px; }
.hero-rsvp-card {
  top: 2rem;
  transform: none;
  width: min(280px, calc(100vw - 3rem));
  padding: 1.25rem 1.25rem;
}
.hero-rsvp-card__heading { font-size: 1.15rem; margin: 0.25rem 0 0.6rem; }
.hero-rsvp-card .rsvp-counter { margin: 0 0 0.9rem; }
.hero-rsvp-card .rsvp-counter__number { font-size: clamp(2rem, 3.4vw, 2.5rem); }

@media (max-width: 760px) {
  .hero {
    min-height: clamp(320px, 46svh, 440px);
    padding: calc(1.5rem + env(safe-area-inset-top)) 1.1rem 1.1rem;
    justify-content: flex-end;
  }
  .hero--planner { min-height: clamp(320px, 46svh, 440px); }
  .hero__name { font-size: clamp(1.7rem, 7.4vw, 2.2rem); line-height: 1.12; }
  .hero__titles { font-size: 0.92rem; }
  .hero__content { padding-bottom: 0.25rem; }
  .hero__scripture { font-size: 0.9rem; margin: 0.6rem 0; }
  .hero__ctas { gap: 0.6rem; }
  .hero__ctas .btn { padding: 0.65rem 1rem; min-height: 44px; }
  .hero-countdown { margin: 0.6rem 0; }

  /* RSVP: a compact strip, heading + count on the left, button on the right. */
  .hero-rsvp-card {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "head btn" "count btn";
    align-items: center;
    column-gap: 0.9rem;
    margin-top: 0.9rem;
    padding: 0.8rem 0.95rem;
    text-align: left;
  }
  .hero-rsvp-card .eyebrow { display: none; }
  .hero-rsvp-card__heading { grid-area: head; font-size: 1.02rem; margin: 0; }
  .hero-rsvp-card .rsvp-counter { grid-area: count; margin: 0.15rem 0 0; display: flex; align-items: baseline; gap: 0.45rem; }
  .hero-rsvp-card .rsvp-counter__number { font-size: 1.35rem; line-height: 1; }
  .hero-rsvp-card .rsvp-counter__label { font-size: 0.7rem; letter-spacing: 0.08em; margin: 0; }
  .hero-rsvp-card__btn { grid-area: btn; width: auto; padding: 0.7rem 1rem; min-height: 44px; white-space: nowrap; }
}

/* Note under the guest photo upload box (assets/js/photo-prep.js). */
.photo-prep__status--error { color: var(--red); }

/* ---------- Hero logo: top-left corner, level with the RSVP card ---------- */
/* Out of the title block and into the banner's top-left corner: its top
   edge lines up with the top of the RSVP card on the right (top: 2rem,
   above), its left edge with the event title. The title block keeps room
   for it, so a long title never runs underneath. */
.hero__logo {
  position: absolute;
  z-index: 5;
  top: 2rem;
  left: max(1.5rem, calc((100% - var(--max-width)) / 2)); /* % of the banner, so a visible scrollbar can't offset it */
  margin: 0;
  max-height: 64px;
  max-width: 220px;
}
.hero--has-logo .hero__content { padding-top: calc(64px + 3rem); }

@media (max-width: 760px) {
  /* Phones: at the top of the banner, with the title kept at the bottom. */
  .hero__logo {
    position: static;
    max-height: 48px;
    max-width: 170px;
    margin: 0 0 auto;
  }
  .hero--has-logo .hero__content { padding-top: 1rem; }
}

/* ---------- Guest pages on phones (2026-11-06) ----------
   Found by checking the event page, its pop-ups, Find Your Seat, the RSVP
   confirmation and family galleries at 375 and 320 px with long real content. */

/* "Add to calendar" on the dark schedule cards: light text that reads, with room above it. */
.event-card .event-card__ics { color: #FAF8F4; border-color: rgba(250, 248, 244, 0.45); margin-top: 1rem; }
.event-card .event-card__ics:hover,
.event-card .event-card__ics:focus-visible { color: #FFFFFF; border-color: rgba(250, 248, 244, 0.85); background: rgba(250, 248, 244, 0.08); }

/* Long email addresses and names wrap instead of widening the page. */
.confirm-email, .confirm-name { overflow-wrap: anywhere; }

@media (max-width: 760px) {
  /* 16 px form text: anything smaller makes iPhones zoom in when a field is tapped. */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
  select,
  textarea,
  .form__row select,
  .form__row textarea,
  .modal select,
  .modal textarea { font-size: 16px; }

  /* Small labels stay readable (12 px at least). */
  .hero__scripture cite,
  .rsvp-counter__label,
  .hero-rsvp-card .rsvp-counter__label,
  .hero-countdown__label,
  .event-card__meta dt,
  .event-select-card__meta dt,
  .tribute__relationship,
  .tribute__time { font-size: 0.75rem; }

  /* Tap targets: each family name is a full-height row, and file pickers are big enough to hit. */
  .family-list--links li { padding: 0; }
  .family-list--links a { min-height: 44px; padding: 0.55rem 0; }
  input[type="file"] { min-height: 44px; padding: 0.5rem 0; max-width: 100%; }
  .event-card .event-card__ics { min-height: 44px; }
  .confirm-footer a { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; padding: 0 0.25rem; }
}

/* ---------- Marketing pages on phones (2026-11-06): Compare, FAQ, Contact,
   Sign-up, Guide, Terms, Privacy. These pages keep their own inline styles,
   which load after this file, so these rules carry a little extra weight. */
@media (max-width: 760px) {
  /* Compare: the table fits the phone (it was up to 63 px wider than the screen). */
  html body table.g-compare-table { table-layout: fixed; font-size: 0.85rem; }
  html body .g-compare-table th, html body .g-compare-table td { padding: 0.7rem 0.45rem; overflow-wrap: anywhere; }
  html body .g-compare-table th:first-child, html body .g-compare-table td:first-child { width: 42%; padding-left: 0; }
  html body .g-compare-table th:nth-child(2), html body .g-compare-table th:nth-child(3),
  html body .g-compare-table td:nth-child(2), html body .g-compare-table td:nth-child(3) { width: 29%; padding-left: 0.25rem; padding-right: 0.25rem; }
  html body .g-compare-table th { font-size: 0.8rem; overflow-wrap: normal; hyphens: none; }

  /* Tap targets: header logo links, FAQ questions, Guide chips and contents. */
  html body .g-hero__brand,
  html body .su-brand { display: inline-flex; align-items: center; min-height: 44px; }
  html body details.g-faq-item summary { min-height: 44px; display: flex; align-items: center; }
  html body .g-chip { min-height: 44px; }
  html body .g-mobile-toc a { display: flex; align-items: center; min-height: 44px; }

  /* Guide: table headings and badges readable (12 px at least). */
  html body table.g-roles th,
  html body .g-badge { font-size: 0.75rem; }
}
