#rsvp-section {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 100dvh;
  /* Zone A: kept close to fixed (small dvh coefficient) so the
     masthead's offset from the top safe inset stays consistent —
     it is allowed to grow only as a last resort, after Zones E and C
     have already absorbed the viewport's surplus height. */
  --rsvp-inset-top: clamp(1rem, 1.75dvh, 1.375rem);
  /* Zone E: bottom gallery margin. Grows with viewport height so
     taller phones gain a more generous grounding margin below the
     terminal, without ever touching Zone D's height. */
  --rsvp-inset-bottom: clamp(1rem, 2.5dvh, 1.75rem);
  --rsvp-inset-x: 1rem;
  /* Zone C: transition field between masthead and card. Kept modest
     so the full form fits the scene without nested scrolling. */
  --rsvp-gap-header-form: clamp(0.875rem, 2.5dvh, 1.75rem);

  /* Editable field typography — iOS Safari auto-zoom guard.
     Computed size must stay ≥ 16px; optical target remains 15px. */
  --rsvp-editable-font-size: 16px;
  --rsvp-editable-optical-size: 15px;
  --rsvp-editable-line-height: calc(
    var(--rsvp-editable-optical-size) / var(--rsvp-editable-font-size) * 1.5
  );
  --rsvp-editable-letter-spacing: calc(
    (var(--rsvp-editable-optical-size) / var(--rsvp-editable-font-size) - 1) * 0.2em
  );
}

#rsvp-section .scene-bg img {
  transform: scale(1.01);
  filter: brightness(0.32) contrast(1.22) saturate(0.85);
}

.rsvp-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,230,180,0.22) 0%, rgba(13,43,29,0.38) 45%, rgba(5,4,3,0.96) 100%);
  mix-blend-mode: screen;
}

.rsvp-bg-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 40%, rgba(0,0,0,0.85) 100%);
}

/* ─────────────────────────────────────────────────────────────
   Editorial composition system — RSVP_PRODUCTION_COMPOSITION_SPECIFICATION.md
   Zone A — top gallery margin      (.rsvp-header padding-top)
   Zone B — masthead                (.rsvp-header content)
   Zone C — transition field        (.rsvp-header padding-bottom
                                      + residual space above the card)
   Zone D — hero form               (.rsvp-form, D1 fields / D2 terminal)
   Zone E — bottom gallery margin   (#rsvp-section-content padding-bottom)

   The form must fit inside the scene. Nested scrolling is forbidden —
   chapter gestures belong to the deck, not an inner card.
   ───────────────────────────────────────────────────────────── */

.rsvp-content,
#rsvp-section-content {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 424px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding:
    0
    max(var(--rsvp-inset-x), 0px)
    max(var(--rsvp-inset-bottom), var(--safe-bottom));
}

.rsvp-header {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  width: 100%;
  text-align: center;
  padding-top: max(var(--rsvp-inset-top), var(--safe-top));
  padding-bottom: var(--rsvp-gap-header-form);
}

/* Zone C (residual) + Zone D. Receives remaining space via flex,
   then anchors the card to its bottom edge so surplus height becomes
   transition space above the card rather than inflating the card. */
.rsvp-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  overflow: hidden;
}

/* YD monogram — an editorial composition decision, not branding.
   Hidden by default so the shortest viewports keep the approved
   masthead → transition → hero-form composition intact. It is
   reinstated only where the frame has genuine vertical breathing
   room (see the composition-height rule below). */
.rsvp-header__logo {
  display: none;
}

.rsvp-header__logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin: 0 auto 0.75rem;
  filter: drop-shadow(0 0 8px rgba(229, 196, 131, 0.25));
  opacity: 0.95;
}

/* Composition-height rule (not device-specific).
   Above this frame height the crest may join the masthead.
   Below it, the compact composition is left pixel-identical.

   When the crest is present the five elements are composed as
   ONE editorial object — not a logo inserted above an existing
   typography stack. Optical rhythm (not equal gaps):
     Crest → generous pause → eyebrow held close to title →
     divider as punctuation → description as soft caption. */
@media (min-height: 800px) {
  .rsvp-header__logo {
    display: block;
  }

  .rsvp-header__logo img {
    /* Crest owns no trailing gap — the pause lives once,
       between crest and wordmark, as a single intentional breath. */
    margin: 0 auto;
  }

  .rsvp-header__copy {
    /* Primary composition pause: crest → wordmark.
       Judged ~0.5× crest height — enough for the emblem to
       read as crest, not so much that the wordmark floats away. */
    margin-top: 1.375rem;
  }

  .rsvp-header__eyebrow {
    /* Eyebrow belongs to the title — held close as one wordmark. */
    margin-bottom: 0.5rem;
  }

  .rsvp-header__title {
    /* Soft settle into the ornamental divider. */
    margin-bottom: 0;
  }

  .rsvp-header__divider {
    /* Punctuation under the title; slightly more air below
       so the description reads as a caption, not a crowded line. */
    margin: 0.5rem 0 0.9375rem;
  }
}

.rsvp-header__eyebrow {
  font-family: var(--font-sans);
  font-size: 8px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-accent-gold-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
  padding-left: 0.25em;
}

.rsvp-header__eyebrow .dot { font-size: 5px; opacity: 0.6; }

.rsvp-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 6vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 0.25rem;
  padding-left: 0.05em;
}

.rsvp-header__title .kindly { color: #fff; }

.rsvp-header__divider {
  display: flex;
  justify-content: center;
  margin: 0.625rem 0 0.875rem;
  opacity: 0.6;
}

.rsvp-header__desc {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 13px;
  color: rgba(245, 242, 235, 0.7);
  max-width: 264px;
  margin: 0 auto;
  line-height: 1.65;
}

.rsvp-form {
  position: relative;
  z-index: 0;
  width: 100%;
  border-radius: 1.5rem;
  padding: 1.25rem 1.25rem 1.375rem;
  background: rgba(11, 9, 7, 0.8);
  backdrop-filter: blur(48px);
  -webkit-backdrop-filter: blur(48px);
  border: 1px solid rgba(229, 196, 131, 0.22);
  box-shadow:
    0 26px 70px rgba(5, 4, 3, 0.88),
    0 2px 10px rgba(5, 4, 3, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.06),
    inset 0 -1px 1.5px rgba(229, 196, 131, 0.05);
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  min-height: 0;
  /* Natural content height only — never an internal scroll region. */
  --rsvp-form-gap: 1rem;
  gap: 0;
}

.rsvp-form-fields {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--rsvp-form-gap);
}

.rsvp-form-terminal {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding-top: var(--rsvp-form-gap);
}

/* Compositional depth: a faint top-lit glow that sits behind the fields,
   suggesting light falling into the card — not a decorative effect. */
.rsvp-form::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(130% 62% at 50% -4%, rgba(229, 196, 131, 0.07) 0%, transparent 62%);
  pointer-events: none;
}

@supports not (backdrop-filter: blur(48px)) {
  .rsvp-form { background: rgba(11, 9, 7, 0.92); }
}

.rsvp-field label,
.rsvp-field .field-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 8.5px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(229, 196, 131, 0.85);
  margin-bottom: 0.625rem;
  padding-left: 0.1em;
}

.rsvp-field .field-label .num { color: rgba(229, 196, 131, 0.5); }
.rsvp-field .field-label .sep { color: rgba(229, 196, 131, 0.3); margin: 0 0.25rem; }

.field-label-hint {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: none;
  color: rgba(245, 242, 235, 0.35);
  margin-left: 0.25rem;
}

.rsvp-input-wrap {
  position: relative;
}

/* Decorative field icons — thin, minimal, aligned to the reserved left inset */
.rsvp-field-icon {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(229, 196, 131, 0.45);
  pointer-events: none;
  z-index: 1;
}

.rsvp-field-icon::after {
  content: '';
  position: absolute;
  right: 0;
  top: 22%;
  bottom: 22%;
  width: 1px;
  background: rgba(229, 196, 131, 0.2);
}

.rsvp-field-icon svg {
  width: 1.0625rem;
  height: 1.0625rem;
}

.rsvp-input-wrap--textarea .rsvp-field-icon {
  align-items: flex-start;
  padding-top: 0.875rem;
  transition: padding-top 700ms var(--ease-out);
}

.rsvp-input-wrap:focus-within .rsvp-field-icon {
  color: rgba(229, 196, 131, 0.6);
}

/* All RSVP editable controls — Safari ≥16px computed size, 15px optical appearance */
#rsvp-section input:not([type="hidden"]),
#rsvp-section textarea,
#rsvp-section select {
  font-size: var(--rsvp-editable-font-size);
  line-height: var(--rsvp-editable-line-height);
  letter-spacing: var(--rsvp-editable-letter-spacing);
}

.rsvp-input-wrap input,
.rsvp-input-wrap textarea {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.8125rem;
  border-radius: 0.875rem;
  border: 1px solid rgba(229, 196, 131, 0.25);
  background: rgba(0, 0, 0, 0.55);
  color: #F5F2EB;
  font-family: var(--font-body);
  box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.03);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, padding 700ms var(--ease-out);
}

.rsvp-input-wrap textarea {
  min-height: 72px;
  resize: none;
  padding-top: 0.875rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, min-height 700ms var(--ease-out), padding 700ms var(--ease-out);
}

.rsvp-input-wrap input::placeholder,
.rsvp-input-wrap textarea::placeholder {
  color: rgba(245, 242, 235, 0.35);
  font-style: italic;
}

.rsvp-input-wrap input:focus,
.rsvp-input-wrap textarea:focus {
  outline: none;
  border-color: rgba(229, 196, 131, 0.7);
  box-shadow: 0 0 15px rgba(229, 196, 131, 0.15), inset 0 1px 1.5px rgba(255, 255, 255, 0.05);
}

.rsvp-input-wrap.is-error input,
.rsvp-input-wrap.is-error textarea {
  border-color: rgba(201, 149, 110, 0.55);
  box-shadow: 0 0 12px rgba(201, 149, 110, 0.12), inset 0 1px 1.5px rgba(255, 255, 255, 0.04);
}

.rsvp-field-error {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 11px;
  color: rgba(201, 149, 110, 0.9);
  margin-top: 0.375rem;
}

.attendance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.attendance-card {
  min-height: 104px;
  padding: 1rem 0.75rem;
  border-radius: 1rem;
  border: 1px solid rgba(229, 196, 131, 0.18);
  background: rgba(0, 0, 0, 0.38);
  box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.025);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 500ms var(--ease-out);
  cursor: pointer;
}

.attendance-card:hover:not(.is-selected) {
  border-color: rgba(229, 196, 131, 0.24);
  background: rgba(0, 0, 0, 0.42);
}

.attendance-card.is-selected {
  background: rgba(0, 0, 0, 0.55);
  border-color: var(--color-accent-gold-light);
  box-shadow: 0 0 18px rgba(229,196,131,0.22), inset 0 1px 1.5px rgba(255,255,255,0.06);
}

.attendance-card__icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-bottom: 0.625rem;
  color: rgba(229, 196, 131, 0.35);
  transition: color 500ms var(--ease-out), filter 500ms var(--ease-out);
}

.attendance-card.is-selected .attendance-card__icon {
  color: var(--color-accent-gold-light);
  filter: drop-shadow(0 0 4px rgba(229,196,131,0.6));
}

.attendance-card__title {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(245, 242, 235, 0.55);
  margin-bottom: 0.3125rem;
  transition: color 500ms var(--ease-out);
}

.attendance-card.is-selected .attendance-card__title { color: #F5F2EB; }

.attendance-card__sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 10.5px;
  line-height: 1.35;
  color: rgba(245, 242, 235, 0.32);
  transition: color 500ms var(--ease-out);
}

.attendance-card.is-selected .attendance-card__sub { color: rgba(229, 196, 131, 0.8); }

/* Guest count stays visible; attendance choice toggles interaction and
   emphasis using the same opacity easing as the original unfold reveal. */
.guest-count-field {
  display: grid;
  grid-template-rows: 1fr;
  margin-top: 0;
  pointer-events: none;
}

.guest-count-field__inner {
  overflow: hidden;
  min-height: 0;
  opacity: 1;
  transform: translateY(0);
}

.guest-count-field.is-enabled {
  pointer-events: auto;
}

.guest-count-field.is-disabled .field-label,
.guest-count-field.is-disabled .field-label-hint {
  opacity: 0.55;
  transition: opacity 520ms var(--ease-out);
}

.guest-count-field.is-disabled .guest-counter {
  opacity: 0.55;
  transition: opacity 520ms var(--ease-out);
}

.guest-count-field.is-enabled .field-label,
.guest-count-field.is-enabled .field-label-hint,
.guest-count-field.is-enabled .guest-counter {
  opacity: 1;
  transition: opacity 520ms var(--ease-out);
}

.guest-count-field.is-disabled .guest-counter__value {
  color: rgba(245, 242, 235, 0.32);
}

@media (prefers-reduced-motion: reduce) {
  .guest-count-field.is-disabled .field-label,
  .guest-count-field.is-disabled .field-label-hint,
  .guest-count-field.is-disabled .guest-counter,
  .guest-count-field.is-enabled .field-label,
  .guest-count-field.is-enabled .field-label-hint,
  .guest-count-field.is-enabled .guest-counter {
    transition: none;
  }
}

/* Luxury guest quantity selector */
.guest-counter {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 48px;
  border-radius: 0.875rem;
  border: 1px solid rgba(229, 196, 131, 0.25);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 1.5px rgba(255, 255, 255, 0.03), 0 8px 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.guest-counter__btn {
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent-gold-light);
  transition: background 300ms ease, color 300ms ease, transform 150ms var(--ease-out);
}

.guest-counter__btn svg {
  width: 14px;
  height: 14px;
}

.guest-counter__btn--minus {
  border-right: 1px solid rgba(229, 196, 131, 0.2);
}

.guest-counter__btn--plus {
  border-left: 1px solid rgba(229, 196, 131, 0.2);
}

.guest-counter__btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.05);
}

.guest-counter__btn:active:not(:disabled) {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.08);
}

.guest-counter__btn:disabled {
  color: rgba(245, 242, 235, 0.15);
  cursor: not-allowed;
}

.guest-counter__display {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.12);
}

.guest-counter__value {
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 500;
  color: #F5F2EB;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  transition: transform 350ms var(--ease-out), opacity 350ms var(--ease-out), color 520ms var(--ease-out);
}

.guest-counter__value.is-rolling {
  animation: guest-count-roll 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

@supports not (backdrop-filter: blur(16px)) {
  .guest-counter { background: rgba(0, 0, 0, 0.75); }
}

.rsvp-submit {
  width: 100%;
  margin-top: 0.375rem;
  padding: 0.375rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(229, 196, 131, 0.3);
  background: linear-gradient(to right, #072417, #041A10);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-gold-light);
  box-shadow: 0 10px 28px rgba(5, 4, 3, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  display: grid;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.15s ease, opacity 0.3s ease;
}

.rsvp-submit__state {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
  width: 100%;
  min-width: 0;
}

.rsvp-submit__state--loading {
  visibility: hidden;
  pointer-events: none;
}

.rsvp-submit.is-loading .rsvp-submit__state--default {
  visibility: hidden;
}

.rsvp-submit.is-loading .rsvp-submit__state--loading {
  visibility: visible;
}

.rsvp-submit__icon {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rsvp-submit__icon--left {
  border-radius: 50%;
  border: 1px solid rgba(229, 196, 131, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: var(--color-accent-gold-light);
}

.rsvp-submit__icon--left svg {
  width: 0.875rem;
  height: 0.875rem;
}

.rsvp-submit__icon--right {
  color: rgba(229, 196, 131, 0.95);
  padding-right: 0.125rem;
}

.rsvp-submit__icon--right svg {
  width: 1.125rem;
  height: 1.125rem;
}

.rsvp-submit__label {
  flex: 1;
  text-align: center;
  padding-left: 0.25rem;
  white-space: nowrap;
}

.rsvp-submit__spinner {
  display: block;
  width: 0.875rem;
  height: 0.875rem;
  border: 1.5px solid rgba(229, 196, 131, 0.22);
  border-top-color: rgba(229, 196, 131, 0.92);
  border-radius: 50%;
  animation: rsvp-submit-spin 0.85s linear infinite;
}

@keyframes rsvp-submit-spin {
  to { transform: rotate(360deg); }
}

.rsvp-submit:hover:not(:disabled) {
  background: linear-gradient(to right, #082a1c, #051f14);
  border-color: rgba(229, 196, 131, 0.6);
  box-shadow: 0 0 22px rgba(229, 196, 131, 0.22), 0 8px 32px rgba(7, 36, 23, 0.3), inset 0 1.5px 1px rgba(255, 255, 255, 0.04);
}

.rsvp-submit:active:not(:disabled) { transform: scale(0.98); }
.rsvp-submit:disabled:not(.is-loading) { opacity: 0.6; cursor: wait; }
.rsvp-submit.is-loading:disabled { opacity: 1; cursor: wait; }

@media (prefers-reduced-motion: reduce) {
  .rsvp-submit__spinner {
    animation: none;
    border-top-color: rgba(229, 196, 131, 0.92);
  }
}

.rsvp-privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.02em;
  color: rgba(245, 242, 235, 0.4);
  text-align: center;
  margin-top: 0.375rem;
}

.rsvp-privacy__icon {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  color: var(--color-accent-gold-light);
}

/* Modals — base */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 450ms cubic-bezier(0.16, 1, 0.3, 1), visibility 450ms ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-overlay:not(.modal-overlay--success) {
  background: rgba(5, 4, 3, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 4, 3, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: none;
  cursor: default;
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  padding: 2rem 1.5rem;
  border-radius: 1.5rem;
  background: rgba(11, 9, 7, 0.95);
  border: 1px solid rgba(229, 196, 131, 0.3);
  box-shadow: 0 24px 64px rgba(0,0,0,0.8);
  text-align: center;
  transform: translateY(16px) scale(0.98);
  transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1), opacity 450ms ease;
}

.modal-overlay.is-open .modal-panel {
  transform: translateY(0) scale(1);
}

/* Success modal — luxury presentation */
.modal-overlay--success .modal-backdrop {
  background: radial-gradient(ellipse at 50% 38%, rgba(229, 196, 131, 0.07) 0%, rgba(5, 4, 3, 0.86) 52%, rgba(5, 4, 3, 0.94) 100%);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.modal-panel--success {
  max-width: 352px;
  padding: 2.5rem 1.75rem 2rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(229, 196, 131, 0.5);
  background: linear-gradient(
    180deg,
    rgba(24, 20, 14, 0.98) 0%,
    rgba(11, 9, 7, 0.98) 46%,
    rgba(8, 7, 5, 0.99) 100%
  );
  box-shadow:
    0 28px 56px rgba(0, 0, 0, 0.72),
    0 10px 24px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(229, 196, 131, 0.14),
    inset 0 1px 0 rgba(255, 236, 200, 0.16),
    inset 0 -1px 0 rgba(184, 142, 75, 0.2);
  overflow: hidden;
  transform: translate3d(0, 0, 0);
}

.modal-overlay.is-open .modal-panel--success {
  animation: modal-success-enter 520ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-overlay.is-closing .modal-panel--success {
  animation: modal-success-exit 380ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal-panel__glow {
  position: absolute;
  top: -32%;
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  height: 58%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(229, 196, 131, 0.2) 0%, rgba(229, 196, 131, 0.05) 42%, transparent 72%);
  pointer-events: none;
}

.modal-panel__rim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 200, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.modal-panel__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid rgba(229, 196, 131, 0.25);
  color: rgba(229, 196, 131, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 300ms ease, border-color 300ms ease, background 300ms ease;
}

.modal-panel__close svg { width: 14px; height: 14px; }

.modal-panel__close:hover {
  color: var(--color-accent-gold-light);
  border-color: rgba(229, 196, 131, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.modal-panel__icon {
  width: 3.375rem;
  height: 3.375rem;
  margin: 0 auto 1.125rem;
  border-radius: 50%;
  border: 1px solid rgba(229, 196, 131, 0.48);
  background: linear-gradient(180deg, rgba(229, 196, 131, 0.1) 0%, rgba(0, 0, 0, 0.45) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 20px rgba(229, 196, 131, 0.16),
    inset 0 1px 0 rgba(255, 236, 200, 0.12);
}

.modal-panel__icon svg {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--color-accent-gold-light);
}

.modal-panel__eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 8.5px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(229, 196, 131, 0.82);
  margin-bottom: 0.625rem;
  padding-left: 0.34em;
}

.modal-panel__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 2.35rem);
  font-weight: 300;
  color: #F5F2EB;
  letter-spacing: 0.04em;
  line-height: 1.12;
  margin: 0 0 0.875rem;
}

.modal-panel__divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: 210px;
  margin: 0 auto 1.125rem;
  opacity: 0.85;
}

.modal-panel__divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(229, 196, 131, 0.35));
}

.modal-panel__divider span:last-child {
  background: linear-gradient(to left, transparent, rgba(229, 196, 131, 0.35));
}

.modal-panel__divider svg {
  width: 2.5rem;
  height: 0.875rem;
  color: rgba(229, 196, 131, 0.7);
  flex-shrink: 0;
}

.modal-panel__lead {
  font-family: var(--font-body);
  font-size: 15px;
  color: rgba(245, 242, 235, 0.85);
  line-height: 1.55;
  margin: 0 0 0.5rem;
}

.modal-panel__note {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 15px;
  color: rgba(229, 196, 131, 0.78);
  line-height: 1.6;
  margin: 0 0 1.625rem;
  max-width: 17rem;
  margin-left: auto;
  margin-right: auto;
}

.modal-panel__sub {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  color: rgba(229, 196, 131, 0.75);
  line-height: 1.65;
  margin: 0 0 1.75rem;
}

.modal-panel__cta {
  width: 100%;
  max-width: 204px;
  padding: 0.8125rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(229, 196, 131, 0.45);
  background: linear-gradient(180deg, rgba(229, 196, 131, 0.15) 0%, rgba(184, 142, 75, 0.1) 100%);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-gold-light);
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.32),
    0 2px 8px rgba(229, 196, 131, 0.08),
    inset 0 1px 0 rgba(255, 236, 200, 0.1);
  transition: background 400ms ease, border-color 400ms ease, box-shadow 400ms ease, transform 150ms ease;
}

.modal-panel__cta:hover {
  background: linear-gradient(180deg, rgba(229, 196, 131, 0.24) 0%, rgba(184, 142, 75, 0.16) 100%);
  border-color: rgba(229, 196, 131, 0.58);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.36),
    0 0 18px rgba(229, 196, 131, 0.14),
    inset 0 1px 0 rgba(255, 236, 200, 0.14);
}

.modal-panel__cta:active { transform: scale(0.98); }

/* Error modal — unchanged minimal styling */
.modal-panel h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  margin: 0.75rem 0 0.5rem;
}

.modal-panel p {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  color: rgba(245, 242, 235, 0.7);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.modal-close {
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(229, 196, 131, 0.35);
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent-gold-light);
}

.modal-icon {
  font-size: 2rem;
  line-height: 1;
}

@media (min-width: 768px) {
  #rsvp-section {
    --rsvp-inset-top: clamp(1.25rem, 2dvh, 1.75rem);
    --rsvp-inset-bottom: clamp(1.25rem, 2.75dvh, 2rem);
    --rsvp-inset-x: 1rem;
    --rsvp-gap-header-form: clamp(1.125rem, 3dvh, 2rem);
  }

  .rsvp-form { padding: 1.625rem 1.875rem 1.75rem; --rsvp-form-gap: 1.125rem; }
  .rsvp-header__eyebrow { font-size: 9.5px; }
  .rsvp-header__desc { font-size: 15.5px; max-width: 28rem; }
  .attendance-card { min-height: 112px; }
  .guest-counter { height: 50px; }
  .guest-counter__btn { flex: 0 0 50px; }
  .modal-panel--success { padding: 2.75rem 2.25rem 2.25rem; }
}

/* Short viewports — compress vertical rhythm so the form still fits */
@media (max-height: 740px) {
  #rsvp-section {
    --rsvp-inset-top: clamp(0.75rem, 1.5dvh, 1.125rem);
    --rsvp-inset-bottom: clamp(0.75rem, 1.75dvh, 1.25rem);
    --rsvp-gap-header-form: clamp(0.625rem, 1.75dvh, 1.125rem);
  }

  .rsvp-form {
    padding: 1.125rem 1.125rem 1.25rem;
    --rsvp-form-gap: 0.875rem;
  }

  .attendance-card {
    min-height: 92px;
    padding: 0.875rem 0.625rem;
  }

  .rsvp-input-wrap textarea {
    min-height: 64px;
  }

  .rsvp-header__eyebrow {
    margin-bottom: 0.5rem;
  }

  .rsvp-header__divider {
    margin: 0.5rem 0 0.625rem;
  }
}

@media (max-height: 680px) {
  #rsvp-section {
    --rsvp-gap-header-form: 0.5rem;
  }

  .rsvp-header__desc {
    display: none;
  }

  .rsvp-form {
    --rsvp-form-gap: 0.75rem;
    padding: 1rem 1rem 1.125rem;
  }

  .attendance-card {
    min-height: 84px;
  }
}
