@import url('https://fonts.googleapis.com/css2?family=Allura&family=Cormorant+Garamond:wght@400;500;600&family=Montserrat:wght@400;500;600&display=swap');

:root {
  --ink: #6d4f77;
  --muted: #8d6f91;
  --rose: #d65b9f;
  --rose-deep: #bd3e88;
  --lavender: #7d74cc;
  --purple-button: #8073cf;
  --purple-button-deep: #6655b8;
  --gold-button: #d8ad68;
  --gold-button-deep: #b98239;
  --glass: rgba(255, 255, 255, 0.34);
  --glass-border: rgba(255, 255, 255, 0.65);
  --shadow: 0 24px 80px rgba(96, 53, 112, 0.23);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background: #d7c9ef;
  color: var(--ink);
  font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button, a { -webkit-tap-highlight-color: transparent; }

.invitation {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  overflow: hidden;
}

.sky-canvas {
  position: fixed;
  inset: 0;
  z-index: -5;
  width: 100%;
  height: 100%;
  display: block;
}

.sky-glow {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 52%, rgba(255, 237, 190, .40), transparent 18%),
    radial-gradient(circle at 50% 48%, rgba(255, 174, 208, .26), transparent 33%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,182,211,.08));
  mix-blend-mode: screen;
}

.veil {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 44%, rgba(255,255,255,.18), transparent 35%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(240,193,225,.10));
}

.sparkles {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: .48;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 20%, rgba(255,255,255,.95) 0 1px, transparent 1.8px),
    radial-gradient(circle at 82% 24%, rgba(255,255,255,.85) 0 1px, transparent 1.8px),
    radial-gradient(circle at 72% 67%, rgba(255,255,255,.8) 0 1px, transparent 1.8px),
    radial-gradient(circle at 25% 75%, rgba(255,255,255,.9) 0 1px, transparent 1.8px);
  background-size: 230px 230px, 280px 280px, 320px 320px, 370px 370px;
  animation: twinkle 5s ease-in-out infinite alternate;
}

.card {
  width: min(760px, 100%);
  padding: clamp(34px, 5vw, 62px) clamp(22px, 6vw, 76px) clamp(30px, 5vw, 54px);
  text-align: center;
  border: 1px solid var(--glass-border);
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255,255,255,.56), rgba(255,255,255,.25)), var(--glass);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.75);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  animation: card-in 900ms cubic-bezier(.2,.8,.2,1) both;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-style: italic;
  letter-spacing: .08em;
}

.name-wrap {
  position: relative;
  margin: 0 auto 10px;
  width: min(540px, 100%);
  padding-block: .18em .24em;
  overflow: visible;
}

.name-wrap::before {
  content: "";
  position: absolute;
  inset: 18% 8% 7%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.72), rgba(255,255,255,0) 70%);
  filter: blur(12px);
}

.name {
  display: grid;
  margin: 0;
  font-family: "Allura", "Brush Script MT", cursive;
  font-size: clamp(5.4rem, 15vw, 9.4rem);
  font-weight: 400;
  line-height: .68;
  letter-spacing: -.025em;
  transform: rotate(-2deg);
  overflow: visible;
}

.name span {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  padding: .12em .14em .16em;
  color: transparent;
  background: linear-gradient(115deg, #ee8aba 0%, #d64e9b 38%, #9278d4 68%, #e65d9e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 0 rgba(255,255,255,.72)) drop-shadow(0 10px 18px rgba(177,72,145,.22));
}

.name span:nth-child(1) { transform: translateX(-8%); }
.name span:nth-child(2) {
  position: relative;
  z-index: 2;
  transform: translateX(4%);
  /* Allura’s lowercase “y” has a deep descender. Give it its own
     paint area, then reclaim the spacing so the names stay close. */
  padding-bottom: .30em;
  margin-bottom: -.14em;
}
.name span:nth-child(3) { transform: translateX(-1%); }

.occasion {
  margin: 22px 0 28px;
  color: #7c6284;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  letter-spacing: .05em;
}

.details {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 3vw, 24px);
  margin: 0 auto 32px;
  padding: 20px 0;
  border-block: 1px solid rgba(126,94,136,.22);
}

.detail { display: grid; gap: 5px; min-width: 0; }
.detail-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  margin-inline: auto;
  place-items: center;
  color: var(--rose-deep);
  filter: drop-shadow(0 4px 10px rgba(189,62,136,.18));
}
.detail-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.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;
}

.detail strong {
  color: #674d70;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  font-weight: 600;
}

.divider {
  width: 4px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(184,77,139,.55);
  box-shadow: 0 0 0 5px rgba(255,255,255,.24);
}

.actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  min-width: 150px;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 999px;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 12px 28px rgba(111,62,119,.15);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.button:hover, .button:focus-visible { transform: translateY(-3px); box-shadow: 0 18px 32px rgba(111,62,119,.22); }
.button:focus-visible { outline: 3px solid rgba(255,255,255,.9); outline-offset: 3px; }
.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--rose-deep));
}

.button-purple {
  color: white;
  background: linear-gradient(135deg, var(--purple-button), var(--purple-button-deep));
  box-shadow: 0 12px 28px rgba(91, 72, 168, .22);
}

.button-gold {
  color: #fffdf8;
  background: linear-gradient(135deg, var(--gold-button), var(--gold-button-deep));
  box-shadow: 0 12px 28px rgba(161, 106, 40, .22);
}

.button-purple:hover,
.button-purple:focus-visible {
  box-shadow: 0 18px 34px rgba(91, 72, 168, .30);
}

.button-gold:hover,
.button-gold:focus-visible {
  box-shadow: 0 18px 34px rgba(161, 106, 40, .30);
}

.button-secondary { color: #835577; background: rgba(255,255,255,.58); }

.fine-print {
  margin: 18px 0 0;
  color: rgba(103,77,112,.72);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: .95rem;
  font-style: italic;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  z-index: 10;
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  color: #684e70;
  background: rgba(255,255,255,.82);
  box-shadow: 0 14px 34px rgba(80,46,87,.2);
  backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%,16px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%,0); }

@keyframes twinkle { from { opacity: .28; } to { opacity: .62; } }
@keyframes card-in { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 640px) {
  html,
  body {
    min-height: 100%;
  }

  body {
    overflow-y: auto;
  }

  .invitation {
    min-height: 100dvh;
    place-items: start center;
    padding:
      max(16px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
    overflow-x: hidden;
    overflow-y: auto;
  }

  .card {
    width: 100%;
    max-width: 520px;
    margin-block: auto;
    border-radius: 24px;
    padding: clamp(26px, 7vw, 38px) clamp(16px, 5.2vw, 24px) clamp(24px, 6vw, 34px);
  }

  .eyebrow {
    margin-bottom: 7px;
    font-size: clamp(1rem, 4.6vw, 1.2rem);
  }

  .name-wrap {
    width: min(470px, 100%);
    margin-bottom: 2px;
    padding-block: .14em .18em;
  }

  .name {
    font-size: clamp(4.65rem, 24vw, 6.75rem);
    line-height: .65;
  }

  .name span {
    padding: .10em .12em .14em;
  }

  .name span:nth-child(2) {
    padding-bottom: .32em;
    margin-bottom: -.16em;
  }

  .occasion {
    margin: 13px 0 18px;
    font-size: clamp(1.16rem, 5.2vw, 1.45rem);
  }

  .details {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 20px;
    padding: 14px 0;
  }

  .detail {
    gap: 2px;
  }

  .detail-icon {
    width: 26px;
    height: 26px;
  }

  .detail-icon svg {
    width: 21px;
    height: 21px;
  }

  .detail strong {
    font-size: clamp(1.03rem, 4.6vw, 1.18rem);
    line-height: 1.22;
  }

  .divider {
    width: 34px;
    height: 1px;
    border-radius: 0;
    justify-self: center;
    box-shadow: none;
    background: rgba(126,94,136,.2);
  }

  .actions {
    gap: 10px;
  }

  .button {
    flex: 1 1 135px;
    min-width: 0;
    min-height: 48px;
    padding: 13px 20px;
  }

  .fine-print {
    margin-top: 14px;
  }

  .toast {
    bottom: max(16px, env(safe-area-inset-bottom));
    max-width: calc(100% - 24px);
  }
}

@media (max-width: 390px) {
  .card {
    border-radius: 21px;
    padding-inline: 15px;
  }

  .name {
    font-size: clamp(4.35rem, 23.5vw, 5.8rem);
  }

  .button {
    font-size: .78rem;
    letter-spacing: .11em;
  }
}

@media (max-height: 740px) and (max-width: 640px) {
  .card {
    margin-block: 0;
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .eyebrow {
    margin-bottom: 3px;
  }

  .name {
    font-size: clamp(4.1rem, 21vw, 5.7rem);
  }

  .occasion {
    margin-block: 9px 13px;
  }

  .details {
    gap: 6px;
    margin-bottom: 15px;
    padding-block: 10px;
  }

  .detail-icon {
    width: 23px;
    height: 23px;
  }

  .fine-print {
    margin-top: 10px;
  }
}

@media (orientation: landscape) and (max-height: 540px) {
  .invitation {
    place-items: start center;
  }

  .card {
    margin-block: 0;
    max-width: 720px;
  }
}

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


/* RSVP modal */
body.modal-open {
  overflow: hidden;
  touch-action: none;
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding:
    max(20px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  opacity: 0;
  transition: opacity 220ms ease;
}

.modal.is-open {
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(66, 44, 81, .36);
  backdrop-filter: blur(12px) saturate(1.08);
  -webkit-backdrop-filter: blur(12px) saturate(1.08);
}

.modal-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: min(760px, calc(100dvh - 40px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(30px, 6vw, 48px);
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 30px;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.92), rgba(255,255,255,.54) 48%, rgba(247,227,244,.54)),
    rgba(255,255,255,.62);
  box-shadow: 0 30px 90px rgba(65, 39, 78, .34), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(24px) saturate(1.12);
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
  transform: translateY(18px) scale(.975);
  transition: transform 260ms cubic-bezier(.2,.8,.2,1);
}

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

.modal-dialog:focus {
  outline: none;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 50%;
  color: #7d5c80;
  background: rgba(255,255,255,.58);
  box-shadow: 0 8px 20px rgba(89,56,94,.12);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.modal-close:hover,
.modal-close:focus-visible {
  transform: rotate(6deg) scale(1.04);
  background: rgba(255,255,255,.88);
}

.modal-close:focus-visible {
  outline: 3px solid rgba(214,91,159,.28);
  outline-offset: 3px;
}

.modal-close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.modal-heading {
  text-align: center;
  margin-bottom: 26px;
}

.modal-eyebrow {
  margin: 0 36px 3px;
  color: var(--muted);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
  font-style: italic;
  letter-spacing: .035em;
}

.modal-heading h2 {
  margin: 0;
  color: transparent;
  font-family: "Allura", "Brush Script MT", cursive;
  font-size: clamp(4.4rem, 12vw, 6.2rem);
  font-weight: 400;
  line-height: .95;
  background: linear-gradient(115deg, #ee8aba, #d64e9b 42%, #9278d4 74%, #e65d9e);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 0 rgba(255,255,255,.76)) drop-shadow(0 8px 16px rgba(177,72,145,.16));
}

.modal-heading p:last-child {
  margin: 5px 0 0;
  color: rgba(103,77,112,.76);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
}

.rsvp-form {
  display: grid;
  gap: 17px;
}

.form-field {
  display: grid;
  gap: 7px;
  text-align: left;
}

.form-field label,
.attendance-field legend {
  color: #705676;
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.form-field input {
  width: 100%;
  min-height: 52px;
  padding: 12px 15px;
  border: 1px solid rgba(126,94,136,.24);
  border-radius: 15px;
  color: #5f4967;
  background: rgba(255,255,255,.65);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 7px 18px rgba(93,60,99,.06);
  font: 500 1rem/1.25 "Montserrat", system-ui, sans-serif;
  outline: none;
  transition: border-color 170ms ease, box-shadow 170ms ease, background 170ms ease;
}

.form-field input:hover {
  background: rgba(255,255,255,.78);
}

.form-field input:focus {
  border-color: rgba(214,91,159,.65);
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 0 4px rgba(214,91,159,.12), inset 0 1px 0 rgba(255,255,255,.95);
}

.form-field input:user-invalid {
  border-color: rgba(190,65,95,.55);
}

.attendance-field {
  min-width: 0;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  text-align: left;
}

.attendance-field legend {
  margin-bottom: 8px;
}

.radio-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.radio-option {
  position: relative;
  cursor: pointer;
}

.radio-option input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.radio-option span {
  display: grid;
  min-height: 50px;
  place-items: center;
  padding: 12px 10px;
  border: 1px solid rgba(126,94,136,.23);
  border-radius: 15px;
  color: #775b7d;
  background: rgba(255,255,255,.56);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
  font-size: .9rem;
  font-weight: 600;
  transition: transform 170ms ease, border-color 170ms ease, color 170ms ease, background 170ms ease, box-shadow 170ms ease;
}

.radio-option:hover span {
  transform: translateY(-1px);
  background: rgba(255,255,255,.78);
}

.radio-option input:focus-visible + span {
  outline: 3px solid rgba(214,91,159,.2);
  outline-offset: 3px;
}

.radio-option input:checked + span {
  border-color: rgba(214,91,159,.62);
  color: #9d3e79;
  background: linear-gradient(135deg, rgba(255,236,247,.94), rgba(238,226,255,.88));
  box-shadow: 0 0 0 3px rgba(214,91,159,.09), inset 0 1px 0 rgba(255,255,255,.95);
}

.submit-rsvp {
  width: 100%;
  min-height: 54px;
  margin-top: 5px;
  border: 1px solid rgba(255,255,255,.78);
  cursor: pointer;
  font-family: "Montserrat", system-ui, sans-serif;
}

@media (max-width: 640px) {
  .modal {
    place-items: end center;
    padding:
      max(12px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  .modal-dialog {
    width: 100%;
    max-height: calc(100dvh - max(22px, env(safe-area-inset-top)));
    padding: 31px 18px max(22px, env(safe-area-inset-bottom));
    border-radius: 26px 26px 20px 20px;
  }

  .modal-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .modal-heading {
    margin-bottom: 20px;
  }

  .modal-heading h2 {
    font-size: clamp(4.35rem, 23vw, 5.7rem);
  }

  .modal-eyebrow {
    margin-inline: 34px;
    font-size: 1rem;
  }

  .rsvp-form {
    gap: 14px;
  }

  .form-field input {
    min-height: 50px;
    font-size: 16px; /* Prevents iOS Safari from zooming the page on focus. */
  }
  .radio-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .radio-option:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-height: 690px) and (max-width: 640px) {
  .modal-dialog {
    padding-top: 25px;
  }

  .modal-heading {
    margin-bottom: 14px;
  }

  .modal-heading h2 {
    font-size: 4.2rem;
  }

  .modal-heading p:last-child,
  .modal-eyebrow {
    font-size: .95rem;
  }

  .rsvp-form {
    gap: 11px;
  }

  .form-field {
    gap: 5px;
  }

  .form-field input,
  .radio-option span {
    min-height: 46px;
  }

  .submit-rsvp {
    min-height: 49px;
  }
}


/* Google Sheets RSVP submission state */
.form-trap {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

.submit-rsvp[disabled] {
  cursor: wait;
  opacity: .72;
  transform: none;
}

.submit-rsvp[aria-busy="true"] .submit-label::after {
  content: "";
  display: inline-block;
  width: .82em;
  height: .82em;
  margin-left: .7em;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -.08em;
  animation: submit-spin .75s linear infinite;
}

.form-status {
  min-height: 1.35em;
  margin: -3px 2px 0;
  color: #775b7d;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1rem;
  line-height: 1.3;
  text-align: center;
}

.form-status.is-error {
  color: #a43f63;
}

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

/* v18: Keep the RSVP modal at its original size, but make the main invitation
   card slightly more compact so the full landing view fits typical desktop
   browser heights without vertical scrolling. */
@media (min-width: 641px) {
  .invitation {
    padding-block: clamp(18px, 2.5vh, 28px);
  }

  .card {
    width: min(720px, 100%);
    padding: clamp(38px, 4.5vh, 50px) clamp(42px, 5.5vw, 66px) clamp(34px, 4vh, 44px);
  }

  .eyebrow {
    margin-bottom: 8px;
  }

  .name-wrap {
    width: min(510px, 100%);
    margin-bottom: 4px;
  }

  .name {
    font-size: clamp(5.2rem, min(12vw, 13.5vh), 8.6rem);
  }

  .occasion {
    margin: 16px 0 22px;
  }

  .details {
    margin-bottom: 25px;
    padding-block: 15px;
  }

  .invitation .button {
    min-height: 48px;
  }

  .fine-print {
    margin-top: 14px;
  }
}

@media (min-width: 641px) and (max-height: 820px) {
  .invitation {
    padding-block: 14px;
  }

  .card {
    padding: 30px 54px 28px;
  }

  .eyebrow {
    margin-bottom: 4px;
    font-size: 1.08rem;
  }

  .name-wrap {
    margin-bottom: 0;
    padding-block: .12em .18em;
  }

  .name {
    font-size: clamp(5rem, min(11.5vw, 13vh), 7.5rem);
  }

  .occasion {
    margin: 10px 0 15px;
    font-size: 1.35rem;
  }

  .details {
    margin-bottom: 18px;
    padding-block: 11px;
  }

  .detail-icon {
    width: 27px;
    height: 27px;
  }

  .detail-icon svg {
    width: 22px;
    height: 22px;
  }

  .invitation .button {
    min-height: 46px;
    padding-block: 12px;
  }

  .fine-print {
    margin-top: 9px;
  }
}

@media (min-width: 641px) and (max-height: 700px) {
  .card {
    padding: 22px 48px 21px;
  }

  .name {
    font-size: clamp(4.65rem, min(10.5vw, 12vh), 6.35rem);
  }

  .occasion {
    margin-block: 7px 11px;
    font-size: 1.22rem;
  }

  .details {
    margin-bottom: 13px;
    padding-block: 8px;
  }

  .detail {
    gap: 2px;
  }

  .invitation .button {
    min-height: 43px;
  }

  .fine-print {
    margin-top: 6px;
  }
}


/* v22: Display the full name on one uninterrupted line while preserving
   the same Lover-inspired script treatment and responsive scaling. */
.name-wrap {
  width: min(680px, 100%);
  padding-block: .16em .28em;
}

.name {
  display: block;
  font-size: clamp(2.55rem, 8.5vw, 5.5rem);
  line-height: 1;
  white-space: nowrap;
}

.name span,
.name span:nth-child(1),
.name span:nth-child(2),
.name span:nth-child(3) {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: .12em .16em .24em;
  text-align: center;
  transform: none;
}

@media (max-width: 640px) {
  .name-wrap {
    width: 100%;
    margin-bottom: 4px;
    padding-block: .12em .22em;
  }

  .name {
    font-size: clamp(2.45rem, 11vw, 4rem);
    line-height: 1;
  }

  .name span {
    padding: .10em .08em .22em;
  }
}

@media (max-width: 390px) {
  .name {
    font-size: clamp(2.3rem, 10.7vw, 3rem);
  }
}

@media (min-width: 641px) and (max-height: 820px) {
  .name {
    font-size: clamp(3.4rem, min(7.8vw, 10.5vh), 5rem);
  }
}

@media (min-width: 641px) and (max-height: 700px) {
  .name {
    font-size: clamp(3.15rem, min(7.2vw, 9.5vh), 4.55rem);
  }
}

/* v23: Add more breathing room between the introductory line and the name. */
.eyebrow {
  margin-bottom: 25px;
}

@media (max-width: 640px) {
  .eyebrow {
    margin-bottom: 25px;
  }
}

@media (min-width: 641px) and (max-height: 820px) {
  .eyebrow {
    margin-bottom: 25px;
  }
}

/* v24: Keep the calendar, clock, and location icons on the same horizontal
   line even though the address uses two lines of text. */
@media (min-width: 641px) {
  .details {
    align-items: stretch;
  }

  .detail {
    align-self: stretch;
    align-content: start;
    grid-template-rows: 30px auto;
  }

  .detail-icon {
    grid-row: 1;
    align-self: start;
  }

  .detail strong {
    grid-row: 2;
    align-self: start;
    line-height: 1.2;
  }

  .divider {
    align-self: center;
  }
}


/* v27: Larger interactive name glow at half the previous shine opacity. The highlight follows the desktop cursor and,
   after permission is granted, the iPhone's tilt sensors. */
.name span,
.name span:nth-child(1),
.name span:nth-child(2),
.name span:nth-child(3) {
  --shine-x: 50%;
  --shine-y: 42%;
  background-image:
    radial-gradient(
      circle at var(--shine-x) var(--shine-y),
      rgba(255,255,255,.47) 0%,
      rgba(255,248,253,.30) 6%,
      rgba(255,255,255,.09) 14%,
      rgba(255,255,255,0) 28%
    ),
    linear-gradient(
      105deg,
      rgba(255,255,255,0) 36%,
      rgba(255,255,255,.12) 49%,
      rgba(255,255,255,0) 62%
    ),
    linear-gradient(115deg, #ee8aba 0%, #d64e9b 38%, #9278d4 68%, #e65d9e 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%, 220% 100%, 100% 100%;
  background-position: center, var(--shine-x) center, center;
  -webkit-background-clip: text;
  background-clip: text;
  will-change: background-position;
}

.motion-toggle[hidden] {
  display: none;
}

.motion-toggle {
  display: inline-flex;
  min-height: 30px;
  margin: 8px auto 0;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.66);
  border-radius: 999px;
  color: rgba(103,77,112,.78);
  background: rgba(255,255,255,.32);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  font: 600 .68rem/1 "Montserrat", system-ui, sans-serif;
  letter-spacing: .06em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.motion-toggle:hover,
.motion-toggle:focus-visible {
  color: #8e3f76;
  background: rgba(255,255,255,.56);
  transform: translateY(-1px);
}

.motion-toggle:focus-visible {
  outline: 3px solid rgba(214,91,159,.18);
  outline-offset: 2px;
}

.motion-toggle[aria-pressed="true"] {
  color: #8e3f76;
  background: rgba(255,244,251,.58);
}

.motion-toggle svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (hover: hover) and (pointer: fine) {
  .motion-toggle {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .motion-toggle {
    margin-top: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .name span,
  .name span:nth-child(1),
  .name span:nth-child(2),
  .name span:nth-child(3) {
    --shine-x: 50% !important;
    --shine-y: 42% !important;
  }

  .motion-toggle {
    display: none !important;
  }
}

/* v29: Keep the host invitation sentence on one line on desktop without
   changing the more flexible wrapping behavior on phone-sized screens. */
@media (min-width: 641px) {
  .occasion {
    font-size: clamp(1.15rem, 2.2vw, 1.38rem);
    letter-spacing: .035em;
    white-space: nowrap;
  }
}
