:root {
  --gold: #f4d58d;
  --cream: #f7efe3;
  --page-bg: #05030c;
  --heading: #fffaf3;
  --muted: rgba(247, 239, 227, 0.92);
  --card-bg: linear-gradient(165deg, #2c1c38 0%, #16101f 48%, #120c18 100%);
  --card-border: rgba(244, 213, 141, 0.7);
  --card-text: #f7efe3;
  --input-bg: #2a2034;
  --choice-border: rgba(244, 213, 141, 0.45);
  --public-accent: #f4d58d;
  --public-accent-strong: #fff2c9;
  --public-error: #ffc9c9;
  --public-error-bg: rgba(74, 16, 16, 0.58);
  --public-field-bg: rgba(22, 16, 31, 0.78);
  --public-field-border: rgba(244, 213, 141, 0.45);
  --public-panel-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

html[data-sky="day"] {
  --gold: #b07a2a;
  --cream: #3f2c24;
  --page-bg: #d7ecff;
  --heading: #4a2c24;
  --muted: rgba(74, 44, 36, 0.82);
  --card-bg: linear-gradient(165deg, #fffdf8 0%, #f7ead4 52%, #f0dcc0 100%);
  --card-border: rgba(176, 122, 42, 0.7);
  --card-text: #3f2c24;
  --input-bg: #fff8ee;
  --choice-border: rgba(176, 122, 42, 0.5);
  --public-accent: #6b4516;
  --public-accent-strong: #4a2c24;
  --public-error: #7f1d1d;
  --public-error-bg: #fff0f0;
  --public-field-bg: rgba(255, 252, 247, 0.94);
  --public-field-border: rgba(107, 69, 22, 0.38);
  --public-panel-shadow: 0 10px 28px rgba(74, 44, 36, 0.14);
}

html[data-sky="evening"] {
  --gold: #d9c4a0;
  --cream: #ece8e1;
  --page-bg: #5c6370;
  --heading: #f3efe8;
  --muted: rgba(236, 232, 225, 0.88);
  --card-bg: linear-gradient(165deg, #4a5160 0%, #323844 52%, #262b34 100%);
  --card-border: rgba(217, 196, 160, 0.65);
  --card-text: #ece8e1;
  --input-bg: #3a404c;
  --choice-border: rgba(217, 196, 160, 0.45);
  --public-accent: #ead6b0;
  --public-accent-strong: #fff6e8;
  --public-error: #ffd0d0;
  --public-error-bg: rgba(74, 24, 24, 0.52);
  --public-field-bg: rgba(38, 43, 52, 0.82);
  --public-field-border: rgba(217, 196, 160, 0.42);
  --public-panel-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

html[data-sky="night"] {
  --gold: #f4d58d;
  --cream: #f7efe3;
  --page-bg: #05030c;
  --heading: #fffaf3;
  --muted: rgba(247, 239, 227, 0.92);
  --card-bg: linear-gradient(165deg, #2c1c38 0%, #16101f 48%, #120c18 100%);
  --public-accent: #f4d58d;
  --public-accent-strong: #fff2c9;
  --public-error: #ffc9c9;
  --public-error-bg: rgba(74, 16, 16, 0.58);
  --public-field-bg: rgba(22, 16, 31, 0.78);
  --public-field-border: rgba(244, 213, 141, 0.45);
  --public-panel-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  background: var(--page-bg);
  color: var(--cream);
  font-family: "Cormorant Garamond", Georgia, serif;
}

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

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

html[data-sky="day"] .veil {
  background:
    radial-gradient(ellipse 70% 50% at 50% 46%, rgba(255, 255, 255, 0.28) 0%, rgba(215, 236, 255, 0.12) 100%);
}

html[data-sky="evening"] .veil {
  background:
    radial-gradient(ellipse 70% 55% at 50% 48%, rgba(40, 44, 54, 0.28) 0%, rgba(50, 55, 66, 0.42) 100%);
}

html[data-weather="rain"] .veil {
  background:
    radial-gradient(ellipse 70% 55% at 50% 48%, rgba(40, 60, 80, 0.12) 0%, rgba(20, 30, 40, 0.18) 100%);
}

html[data-weather="snow"] .veil {
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
}

html[data-weather="fog"] .veil {
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(255, 240, 220, 0.18) 0%, rgba(40, 30, 20, 0.12) 100%);
}

.content {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(1.5rem, 6vw, 3rem);
}

.hero {
  max-width: 52rem;
  width: 100%;
}

.eyebrow {
  font-size: clamp(0.72rem, 2.2vw, 0.95rem);
  letter-spacing: 0.46em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: clamp(0.85rem, 2.4vw, 1.4rem);
}

h1 {
  font-family: "Great Vibes", "Cormorant Garamond", cursive;
  font-weight: 400;
  font-size: clamp(2.6rem, 11vw, 7.2rem);
  line-height: 1.12;
  color: var(--heading);
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.28);
  margin-bottom: clamp(0.8rem, 2.2vw, 1.3rem);
}

html[data-sky="day"] h1 {
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.65);
}

.rule {
  width: min(11rem, 42vw);
  height: 1px;
  margin: 0 auto clamp(0.9rem, 2.4vw, 1.4rem);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.tagline {
  font-size: clamp(1.05rem, 3.4vw, 1.85rem);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.25);
}

.countdown {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: clamp(0.35rem, 2.4vw, 1.2rem);
  margin-top: clamp(1.35rem, 4vw, 2.4rem);
}

.count-event {
  min-width: 8.5rem;
}

.count-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.15rem;
}

.count-name {
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  font-weight: 400;
  color: var(--heading);
  line-height: 1.1;
}

.count-date {
  font-size: 0.92rem;
  font-style: italic;
  color: var(--muted);
  margin: 0.15rem 0 0.35rem;
}

.count-dial {
  position: relative;
  width: 7.4rem;
  height: 7.4rem;
  margin: 0.2rem auto 0.35rem;
}

.count-dial svg {
  width: 100%;
  height: 100%;
}

.count-track,
.count-progress {
  fill: none;
  stroke-width: 3.2;
}

.count-track {
  stroke: var(--choice-border);
}

.count-progress {
  stroke: var(--gold);
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gold) 55%, transparent));
  transition: stroke-dashoffset 0.8s ease;
}

.count-figure {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.count-days {
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
  color: var(--heading);
}

.count-days.is-pop {
  animation: count-pop 0.45s ease;
}

.count-unit {
  margin-top: 0.12rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.count-remain {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.count-bridge {
  display: flex;
  align-items: center;
  align-self: center;
  justify-content: center;
  width: 0.42rem;
  height: 0.42rem;
  margin-top: 2.4rem;
  color: var(--gold);
  border: 1px solid currentColor;
  transform: rotate(45deg);
  flex-shrink: 0;
}

.count-bridge::before,
.count-bridge::after {
  display: none;
}

.countdown--compact {
  margin-top: 0.55rem;
  gap: 0.2rem;
  flex-shrink: 0;
}

.countdown--compact .count-event {
  min-width: 0;
}

.countdown--compact .count-kicker,
.countdown--compact .count-remain {
  display: none;
}

.countdown--compact .count-name {
  font-size: 1.25rem;
}

.is-invite .count-name {
  color: #b58a3a;
}

.is-invite .count-kicker,
.is-invite .count-unit {
  text-transform: none;
  letter-spacing: 0.04em;
}

.is-invite .countdown--compact .count-name {
  font-size: clamp(1rem, 3.2vw, 1.15rem);
}

.is-invite .countdown--compact .count-dial {
  width: 3.6rem;
  height: 3.6rem;
}

.is-invite .countdown--compact .count-days {
  font-size: 0.92rem;
}

.countdown--compact .count-date {
  font-size: 0.72rem;
}

.countdown--compact .count-dial {
  width: 4.5rem;
  height: 4.5rem;
}

.countdown--compact .count-days {
  font-size: 1.05rem;
}

.countdown--compact .count-unit {
  font-size: 0.52rem;
}

.countdown--compact .count-bridge {
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.countdown--single .count-bridge {
  display: none;
}

.settings-shell {
  position: fixed;
  z-index: 5;
  right: max(0.9rem, env(safe-area-inset-right));
  bottom: max(0.9rem, env(safe-area-inset-bottom));
  pointer-events: auto;
}

.settings-trigger {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-bg) 28%, transparent);
  color: var(--heading);
  opacity: 0.16;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.settings-icon {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

.settings-trigger:hover,
.settings-trigger:focus-visible {
  opacity: 0.48;
  background: color-mix(in srgb, var(--card-bg) 55%, transparent);
}

.settings-shell.is-open .settings-trigger {
  opacity: 0.62;
  transform: rotate(45deg);
}

.sky-dial {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.55rem);
  width: 13.25rem;
  padding: 0.7rem 0.75rem 0.8rem;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--card-text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  text-align: center;
  max-height: calc(100dvh - 5rem);
  overflow: auto;
}

.sky-dial[hidden] {
  display: none;
}

.sky-dial-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.45rem;
}

.sky-dial-row {
  display: grid;
  grid-template-columns: 2rem 1fr 2rem;
  gap: 0.35rem;
  align-items: center;
}

.sky-dial-row button,
.sky-dial-row input {
  font: inherit;
  color: inherit;
  border: 1px solid var(--choice-border);
  background: var(--input-bg);
  border-radius: 0.55rem;
  height: 2.1rem;
}

.sky-dial-row button {
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.sky-dial-row input {
  text-align: center;
  -moz-appearance: textfield;
}

.sky-dial-row input::-webkit-outer-spin-button,
.sky-dial-row input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sky-dial-label--spaced {
  margin-top: 0.85rem;
}

.sky-dial-value {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.1rem;
  font-size: 0.92rem;
  text-transform: capitalize;
}

.sky-dial-action {
  width: 100%;
  margin-top: 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: inherit;
  border: 1px solid var(--choice-border);
  background: var(--input-bg);
  border-radius: 999px;
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}

/* Same pill, rendered as a link rather than a button. */
.sky-dial-link {
  display: block;
  box-sizing: border-box;
  min-height: 2.5rem;
  text-align: center;
  text-decoration: none;
}

.invite-preview {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.65rem;
  text-align: left;
}

.invite-preview[hidden] {
  display: none;
}

.invite-preview a {
  display: block;
  color: inherit;
  text-decoration: none;
  font-size: 0.88rem;
  border: 1px solid var(--choice-border);
  border-radius: 0.6rem;
  padding: 0.45rem 0.55rem;
  background: var(--input-bg);
}

.invite-preview a:hover,
.invite-preview a:focus-visible {
  border-color: var(--gold);
}

.invite-kind,
.invite-id {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.invite-kind {
  color: var(--gold);
  margin-top: 0.12rem;
}

.invite-id {
  opacity: 0.7;
  font-family: ui-monospace, Consolas, monospace;
}

@keyframes count-pop {
  0% { transform: scale(0.72); opacity: 0.4; }
  60% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes heart-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.14); opacity: 1; }
}

@media (max-width: 640px) {
  .content {
    padding-bottom: 7.5rem;
  }
}

.card-scene {
  width: min(28rem, 100%);
  perspective: 1400px;
}

.invite-card {
  position: relative;
  min-height: min(44rem, 92dvh);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

.invite-card.is-flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 1.5rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--card-text);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  padding: 0;
  overflow: hidden;
}

.card-face::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.015) 3px
    );
  opacity: 0.7;
}

.frame-line {
  position: absolute;
  inset: 0.72rem;
  border: 1px solid var(--gold);
  border-radius: 1.05rem;
  opacity: 0.55;
  pointer-events: none;
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--card-bg) 88%, var(--gold) 12%);
}

.corner {
  position: absolute;
  width: 2.1rem;
  height: 2.1rem;
  pointer-events: none;
  border: 2px solid var(--gold);
  opacity: 0.8;
}

.corner-tl {
  top: 0.95rem;
  left: 0.95rem;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 0.35rem;
}

.corner-tr {
  top: 0.95rem;
  right: 0.95rem;
  border-left: 0;
  border-bottom: 0;
  border-top-right-radius: 0.35rem;
}

.corner-bl {
  bottom: 0.95rem;
  left: 0.95rem;
  border-right: 0;
  border-top: 0;
  border-bottom-left-radius: 0.35rem;
}

.corner-br {
  bottom: 0.95rem;
  right: 0.95rem;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 0.35rem;
}

.monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 4.4rem;
  height: 4.4rem;
  margin-bottom: 0.7rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: "Great Vibes", cursive;
  font-size: 1.45rem;
  color: var(--gold);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--card-bg) 80%, transparent), 0 0 0 5px var(--gold);
  background: color-mix(in srgb, var(--card-bg) 92%, var(--gold) 8%);
}

.monogram span {
  font-size: 0.95rem;
  opacity: 0.85;
}

.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0.15rem auto 0.85rem;
  color: var(--gold);
  font-size: 0.7rem;
}

.flourish span {
  width: 3.6rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.flourish i {
  font-style: normal;
}

.card-front {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transform: rotateY(0deg);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.card-front h1 {
  font-size: clamp(2.5rem, 10vw, 4.5rem);
  margin-bottom: 0.35rem;
}

.card-front .tagline {
  font-size: clamp(0.98rem, 3vw, 1.2rem);
}

.rsvp-seal {
  margin-top: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5.4rem;
  height: 5.4rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #fff1c4 0%, #e2c36a 38%, #c49a3a 68%, #8d6a1f 100%);
  color: #3a2408;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 0 0 5px rgba(90, 58, 12, 0.18);
}

html[data-sky="night"] .is-invite,
html[data-sky="day"] .is-invite,
html[data-sky="evening"] .is-invite,
.is-invite {
  --gold: #b58a3a;
  --heading: #b58a3a;
  --card-text: #2f2c28;
  --muted: #5c564e;
  --card-bg: #f4ebd8;
  --card-border: #b58a3a;
  --input-bg: #fbf6ec;
  --choice-border: #c4a15c;
  --gold-ink: #f7f1e4;
}

.is-invite .content {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 1.15rem;
  padding-bottom: 8rem;
  width: 100%;
}

.invite-deck {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.5rem;
  width: min(34rem, 100%);
}

@media (min-width: 60rem) {
  .is-invite .content {
    justify-content: center;
    padding-top: 1rem;
    padding-bottom: 6.5rem;
  }

  .invite-deck--pair {
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    width: min(72rem, calc(100% - 0.5rem));
    gap: 1.25rem;
  }

  .invite-deck--pair .card-scene {
    flex: 1 1 0;
    min-width: 0;
    height: min(48rem, calc(100dvh - 2.2rem));
  }
}

.is-invite .card-scene {
  width: 100%;
  height: min(46rem, calc(100dvh - 2.4rem));
}

.is-invite .invite-card {
  height: 100%;
  min-height: 0;
}

.is-invite .card-face {
  background-color: #f4ebd8;
  background-image: none;
  color: var(--card-text);
  border-radius: 0;
  border: 0;
  box-shadow: none;
  overflow: visible;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.is-invite .card-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #f4ebd8;
  z-index: 0;
  pointer-events: none;
}

.is-invite .card-face::before {
  display: none;
}

.is-invite .card-front {
  justify-content: flex-start;
  padding: 0;
  border: 0;
  background-color: #f4ebd8;
  transform: rotateY(0deg);
  appearance: none;
  -webkit-appearance: none;
}

.is-invite .card-back.classic-invite {
  padding: 0;
  background-color: #f4ebd8;
}

.card-scroll {
  position: absolute;
  z-index: 2;
  inset: 2.2rem 1.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 0.35rem 0.35rem 0.55rem;
  text-align: center;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.when-block {
  width: 100%;
}

.schedule-item {
  margin: 0.45rem 0 0;
}

.schedule-item .venue-line {
  margin-top: 0.1rem;
  font-size: clamp(0.8rem, 2.4vw, 0.88rem);
}

.when-block .countdown--compact {
  margin-top: 0.4rem;
}

.when-block .count-kicker,
.when-block .count-name,
.when-block .count-date,
.when-block .count-remain {
  display: none;
}

.card-footer {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 0.7rem;
  flex-shrink: 0;
}

.card-back .card-scroll {
  align-items: stretch;
  text-align: left;
}

.invite-card.is-flipped .card-front {
  visibility: hidden;
  pointer-events: none;
}

.invite-card:not(.is-flipped) .card-back {
  visibility: hidden;
  pointer-events: none;
}

.classic-invite > *:not(.card-ornament):not(.card-scroll) {
  position: relative;
  z-index: 2;
}

.card-ornament {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  color: #b58a3a;
}

.card-ornament svg {
  shape-rendering: geometricPrecision;
}

.ornament-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.card-frame {
  position: absolute;
  top: 22px;
  right: 22px;
  bottom: 22px;
  left: 22px;
  width: calc(100% - 44px);
  height: calc(100% - 44px);
  display: block;
  overflow: visible;
  color: #b58a3a;
}

.bg-arch {
  position: absolute;
  left: 50%;
  bottom: 11%;
  width: 58%;
  height: auto;
  transform: translateX(-50%);
  opacity: 0.065;
  color: #b58a3a;
}

.bg-botanical {
  position: absolute;
  left: 50%;
  top: 18%;
  width: 42%;
  height: auto;
  transform: translateX(-50%);
  opacity: 0.055;
  color: #b58a3a;
}

.corner-filigree {
  position: absolute;
  width: 16.5%;
  min-width: 5.6rem;
  max-width: 7.4rem;
  height: auto;
  aspect-ratio: 1;
  overflow: visible;
  color: #b58a3a;
}

.corner-tl {
  top: 6px;
  left: 6px;
}

.corner-tr {
  top: 6px;
  right: 6px;
  transform: scaleX(-1);
}

.corner-bl {
  bottom: 6px;
  left: 6px;
  transform: scaleY(-1);
}

.corner-br {
  bottom: 6px;
  right: 6px;
  transform: scale(-1);
}

.bismillah {
  font-family: Amiri, "Times New Roman", serif;
  font-size: clamp(1.05rem, 3.4vw, 1.45rem);
  color: #b58a3a;
  margin: 0.1rem 0 0.7rem;
  line-height: 1.45;
}

.hosts {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(0.88rem, 2.6vw, 1.02rem);
  letter-spacing: 0.02em;
  text-transform: none;
  color: #2f2c28;
  line-height: 1.55;
  margin-bottom: 0.7rem;
}

.event-title {
  font-family: Cinzel, Georgia, serif;
  font-weight: 600;
  font-size: clamp(0.95rem, 3vw, 1.18rem);
  letter-spacing: 0.08em;
  text-transform: none;
  color: #b58a3a;
}

.of-children {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(0.92rem, 2.8vw, 1.05rem);
  color: #2f2c28;
  margin: 0.2rem 0 0.35rem;
}

.classic-invite h1.couple-names,
.classic-invite .couple-names {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: "Great Vibes", cursive;
  font-weight: 400;
  font-size: clamp(1.7rem, 6.4vw, 2.55rem);
  color: #b58a3a;
  text-shadow: none;
  margin: 0.35rem 0 0.7rem;
  line-height: 0.92;
}

.card-front h1.couple-names {
  font-size: clamp(1.7rem, 6.4vw, 2.55rem);
  margin: 0.35rem 0 0.7rem;
}

.couple-names .name-amp {
  font-size: 0.4em;
  display: block;
  padding: 0.12em 0 0.18em;
  line-height: 1;
  opacity: 0.92;
}

.section-label {
  font-family: Cinzel, Georgia, serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: none;
  color: #b58a3a;
  font-size: clamp(0.78rem, 2.4vw, 0.9rem);
  margin: 0.7rem 0 0.15rem;
}

.program-line,
.venue-line {
  font-size: clamp(0.84rem, 2.6vw, 0.95rem);
  color: #2f2c28;
  line-height: 1.45;
}

.timing-note {
  font-size: clamp(0.72rem, 2.2vw, 0.8rem);
  font-style: italic;
  margin-top: 0.3rem;
  color: #5c564e;
}

.rsvp-solid {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.4rem;
  padding: 0.5rem 1.2rem;
  background: transparent;
  color: #b58a3a;
  border: 1px solid #b58a3a;
  font-family: Cinzel, Georgia, serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  box-shadow: none;
  flex-shrink: 0;
}

.is-invite .submit {
  background: #b58a3a;
  color: #f7f1e4;
  box-shadow: none;
  border-radius: 0;
  text-transform: none;
  letter-spacing: 0.04em;
}

.is-invite .choice-option input:checked + span,
.is-invite .choice-option input:focus-visible + span {
  background: #b58a3a;
  color: #f7f1e4;
}

.is-invite .card-back h2 {
  font-family: "Great Vibes", cursive;
  color: #b58a3a;
}

.is-invite .count-progress {
  filter: none;
}

.is-invite .count-days {
  color: #2f2c28;
}

.is-invite .event-rsvp {
  border-radius: 0;
  background: #fbf6ec;
}

.greeting {
  margin-top: 0.7rem;
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: #2f2c28;
  font-style: italic;
}

.is-invite .choice-option span {
  border-radius: 0;
}

.form-intro {
  color: var(--muted);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.invite-copy {
  margin-top: 0.55rem;
  max-width: 22rem;
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  line-height: 1.5;
  color: var(--muted);
}

.hint {
  margin-top: 1.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  overflow: visible;
  background-color: #f4ebd8;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.back-link {
  align-self: flex-start;
  background: none;
  border: 0;
  color: var(--gold);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  margin-bottom: 0.9rem;
}

.card-back h2 {
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.7rem, 6vw, 2.2rem);
  font-weight: 400;
  text-align: center;
  margin-bottom: 0.35rem;
}

.hero--public h1 {
  margin-bottom: clamp(0.8rem, 2.2vw, 1.3rem);
}

.hero--public .verify-form {
  margin-top: 1.5rem;
  margin-left: auto;
  margin-right: auto;
  max-width: 22rem;
  width: min(100%, 22rem);
  padding: 1.15rem 1.1rem 1.25rem;
  text-align: center;
  border-radius: 1rem;
  border: 1px solid var(--public-field-border);
  background: var(--public-field-bg);
  box-shadow: var(--public-panel-shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hero--public .verify-lead {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
  color: var(--heading);
  text-align: center;
}

.hero--public .verify-label {
  display: block;
  margin: 0 auto 0.55rem;
  max-width: 18rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--public-accent-strong);
  text-align: center;
}

html[data-sky="day"] .hero--public .verify-label {
  text-shadow: none;
}

.hero--public .verify-input {
  display: block;
  width: 100%;
  margin: 0 auto;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--public-field-border);
  background: color-mix(in srgb, var(--public-field-bg) 70%, #ffffff 30%);
  color: var(--heading);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.05rem;
  text-align: center;
}

html[data-sky="day"] .hero--public .verify-input {
  background: #fffdf8;
}

.hero--public .verify-input:focus-visible {
  outline: 2px solid var(--public-accent);
  outline-offset: 2px;
}

.hero--public .verify-error {
  margin: 0.75rem auto 0;
  max-width: 18rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--public-error);
  background: var(--public-error-bg);
  text-align: center;
}

.hero--public .verify-submit {
  display: block;
  width: 100%;
  margin: 0.85rem auto 0;
  padding: 0.75rem 1rem;
  border: 2px solid var(--public-accent);
  background: color-mix(in srgb, var(--public-accent) 18%, transparent);
  color: var(--heading);
  font-family: Cinzel, Georgia, serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.hero--public .verify-submit:hover,
.hero--public .verify-submit:focus-visible {
  background: color-mix(in srgb, var(--public-accent) 32%, transparent);
}

.hero--public .open-invite {
  border-color: var(--public-accent);
  color: var(--heading);
  background: color-mix(in srgb, var(--public-accent) 18%, transparent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--public-accent) 16%, transparent);
}

html[data-sky="day"] .hero--public .open-invite {
  background: color-mix(in srgb, var(--public-accent) 12%, #ffffff 88%);
}

.hero--public .open-invite-note,
.hero--public .landing-status-note {
  color: var(--public-accent-strong);
}

html[data-sky="day"] .hero--public .open-invite-note,
html[data-sky="day"] .hero--public .landing-status-note {
  text-shadow: none;
}

.hero--public .not-me {
  color: color-mix(in srgb, var(--heading) 72%, transparent);
}

.hero--public .not-me:hover,
.hero--public .not-me:focus-visible {
  color: var(--public-accent-strong);
}

.event-rsvp {
  border: 1px solid var(--choice-border);
  border-radius: 1rem;
  padding: 0.85rem 0.85rem 0.35rem;
  margin-bottom: 0.9rem;
  background: var(--input-bg);
}

.event-rsvp legend {
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--gold);
  padding: 0 0.35rem;
}

.event-cap {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  margin: 0.2rem 0 0.75rem;
}

.sky-dial-weather {
  margin-top: 0.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.is-public .content {
  pointer-events: none;
}

.is-public .settings-shell,
.is-public .settings-shell *,
.open-invite,
.open-invite-note,
.landing-status,
.verify-form,
.verify-form *,
.not-me-form,
.not-me-form * {
  pointer-events: auto;
}

.open-invite {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 0.95rem 2rem;
  border: 2px solid var(--gold);
  color: var(--heading);
  text-decoration: none;
  font-family: Cinzel, Georgia, serif;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: color-mix(in srgb, var(--gold) 22%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 20%, transparent);
  animation: open-invite-pulse 1.8s ease-in-out infinite;
}

.open-invite:hover,
.open-invite:focus-visible {
  background: color-mix(in srgb, var(--gold) 38%, transparent);
  color: var(--heading);
}

.open-invite-note {
  margin-top: 0.85rem;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--gold);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

.not-me-form {
  margin-top: 0.85rem;
  text-align: center;
}

.not-me {
  border: 0;
  padding: 0.35rem 0.5rem;
  background: transparent;
  color: color-mix(in srgb, var(--heading) 72%, transparent);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 0.95rem;
  font-style: italic;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.not-me:hover,
.not-me:focus-visible {
  color: var(--gold);
}

.invite-actions {
  width: min(34rem, 100%);
  margin-top: 0.35rem;
  pointer-events: auto;
}

.is-invite .not-me {
  color: color-mix(in srgb, var(--gold-ink) 78%, #6b5a40);
}

.is-invite .not-me:hover,
.is-invite .not-me:focus-visible {
  color: #b58a3a;
}

.landing-status {
  margin-top: 1.15rem;
  display: grid;
  gap: 0.25rem;
  font-size: 1.05rem;
  color: var(--heading);
}

.member-access {
  margin-top: 1.6rem;
}

.member-access a {
  font-family: Cinzel, Georgia, serif;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  opacity: 0.75;
  padding: 0.5rem 0.35rem;
  display: inline-block;
}

.member-access a:hover,
.member-access a:focus-visible {
  color: var(--gold);
  opacity: 1;
}

.landing-status-title {
  font-family: Cinzel, Georgia, serif;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.15rem;
}

.landing-status-note {
  margin-top: 0.35rem;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--gold);
}

.reply-status {
  margin-top: 0;
  margin-bottom: 0.35rem;
  font-size: clamp(0.92rem, 2.8vw, 1.05rem);
  color: #b58a3a;
  font-style: italic;
  line-height: 1.35;
}

.reply-status-name {
  font-style: normal;
  font-weight: 600;
}

@keyframes open-invite-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 20%, transparent);
  }
  50% {
    transform: scale(1.045);
    box-shadow: 0 0 0 11px color-mix(in srgb, var(--gold) 12%, transparent);
  }
}

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

.choice {
  border: 0;
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
}

.choice-option {
  display: block;
  cursor: pointer;
}

.choice-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-option span {
  display: block;
  text-align: center;
  padding: 0.75rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--choice-border);
  background: var(--input-bg);
  transition: background 0.2s ease, color 0.2s ease;
}

.choice-option input:checked + span,
.choice-option input:focus-visible + span {
  background: var(--gold);
  color: #2a1608;
}

.count-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.15rem;
  font-size: 1.05rem;
}

.count-field[hidden] {
  display: none;
}

.count-note {
  font-size: 0.92rem;
  opacity: 0.75;
}

.count-field select {
  font: inherit;
  font-size: 1.1rem;
  color: inherit;
  background: var(--input-bg);
  border: 1px solid var(--choice-border);
  border-radius: 0.7rem;
  padding: 0.65rem 0.75rem;
}

.submit {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #3a2408;
  background: linear-gradient(180deg, #f3e0a4 0%, #d4b25a 48%, #b89032 100%);
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.form-status {
  min-height: 2.4rem;
  margin-top: 0.9rem;
  text-align: center;
  font-style: italic;
}

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

html[data-sky="night"] .form-status.is-error,
html[data-sky="evening"] .form-status.is-error {
  color: #ffb4b4;
}

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

@media (prefers-reduced-motion: reduce) {
  canvas {
    display: none;
  }

  html[data-sky="day"] body {
    background: linear-gradient(180deg, #f7e7c8 0%, #cfe8ff 45%, #f3d6c4 100%);
  }

  html[data-sky="evening"] body {
    background: radial-gradient(ellipse at 50% 20%, #7a8290 0%, #4a5160 60%);
  }

  html[data-sky="night"] body {
    background: radial-gradient(ellipse at 50% 20%, #2a1838 0%, #05030c 55%);
  }

  .invite-card,
  .card-back {
    transform: none;
    transition: none;
  }

  .invite-card.is-flipped .card-front {
    display: none;
  }

  .invite-card:not(.is-flipped) .card-back {
    display: none;
  }

  .card-face {
    position: relative;
    min-height: min(44rem, 92dvh);
  }

  .countdown--compact .count-bridge,
  .count-bridge {
    animation: none;
  }

  .count-days.is-pop {
    animation: none;
  }
}

/* Phones: the invitation flows with the page instead of using a nested scroller,
   because a scrollable box inside a preserve-3d/backface-hidden card does not
   reliably receive touch scrolling on iOS or Android. */
@media (max-width: 47.9375rem) {
  .is-invite .content {
    display: block;
    min-height: 0;
    padding:
      max(0.6rem, env(safe-area-inset-top))
      max(0.55rem, env(safe-area-inset-right))
      calc(env(safe-area-inset-bottom) + 5rem)
      max(0.55rem, env(safe-area-inset-left));
  }

  .is-invite .invite-deck,
  .is-invite .invite-actions {
    width: 100%;
    max-width: none;
  }

  .is-invite .invite-deck {
    gap: 1.1rem;
  }

  .is-invite .card-scene,
  .invite-deck--pair .card-scene {
    width: 100%;
    height: auto;
    perspective: none;
  }

  .is-invite .invite-card {
    height: auto;
    min-height: 0;
    transform: none;
    transform-style: flat;
    -webkit-transform-style: flat;
    transition: none;
  }

  .is-invite .card-face {
    position: relative;
    inset: auto;
    min-height: 30rem;
    transform: none;
    -webkit-backface-visibility: visible;
    backface-visibility: visible;
  }

  .is-invite .invite-card:not(.is-flipped) .card-back,
  .is-invite .invite-card.is-flipped .card-front {
    display: none;
  }

  .is-invite .card-scroll {
    position: static;
    inset: auto;
    overflow: visible;
    touch-action: auto;
    padding: 2.5rem 1.6rem 2.1rem;
  }

  .is-invite .card-front {
    cursor: default;
  }

  .is-invite .couple-names {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  .is-invite .card-footer {
    margin-top: 1.1rem;
  }

  /* Comfortable tap targets */
  .rsvp-solid,
  .is-invite .submit,
  .open-invite,
  .verify-submit {
    min-height: 2.9rem;
  }

  .choice-option span {
    min-height: 2.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .count-field select,
  .verify-input {
    min-height: 2.9rem;
    font-size: 1rem;
  }

  .is-invite .countdown--compact .count-dial {
    width: 3.4rem;
    height: 3.4rem;
  }
}

@media print {
  canvas,
  .veil,
  .settings-shell {
    display: none !important;
  }

  .is-invite {
    background: #f4ebd8;
  }

  .is-invite .card-face {
    position: relative;
    overflow: visible;
    box-shadow: none;
  }

  .card-ornament {
    color: #b58a3a;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ---------------------------------------------------------------------------
   Laptop and desktop: fit the whole invitation on screen.

   Phones scroll the page naturally (see the max-width block above). From
   48rem up the card is a fixed-height flip surface, so both the card and its
   contents have to fit the viewport or the reader ends up scrolling inside
   the card to reach the RSVP button. Vertical rhythm and type therefore
   follow viewport height, and the card is sized to leave room for the
   surrounding padding and the "not me" link below it.
   --------------------------------------------------------------------------- */
@media (min-width: 48rem) {
  .is-invite .content {
    justify-content: center;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .invite-deck {
    gap: 0.9rem;
  }

  .invite-actions {
    margin-top: 0.2rem;
  }

  /* Keep the footer link small so the card keeps the height instead. */
  .is-invite .not-me-form {
    margin-top: 0.25rem;
  }

  .is-invite .not-me {
    padding: 0.2rem 0.5rem;
    font-size: 0.9rem;
  }

  /* The cap has to clear the full-size content, or tall screens reintroduce
     the inner scroll that short screens no longer have. */
  .is-invite .card-scene,
  .invite-deck--pair .card-scene {
    height: min(48rem, calc(100dvh - 3.05rem));
  }

  /* The decorative frame sits 0.72rem in, so the text has to stay clear of it
     however short the screen gets. The bismillah's diacritics and the RSVP
     button sit at the two extremes, which is why this needs real room. */
  .is-invite .card-scroll {
    inset: clamp(1.7rem, 3.2vh, 2.5rem) clamp(1.15rem, 2.6vh, 1.85rem);
    padding: 0.15rem 0.3rem 0.3rem;
  }

  /* Share the spare height above and below the text rather than letting the
     footer's auto margin dump all of it between the venue and the RSVP. */
  .is-invite .card-front .card-scroll {
    justify-content: center;
    justify-content: safe center;
  }

  /* The reply form's fieldset and submit button run the full width, so unlike
     the centred front text they have to clear the frame sideways as well. The
     form has spare height for the extra wrapping. */
  .is-invite .card-back .card-scroll {
    left: 1.85rem;
    right: 1.85rem;
    justify-content: center;
    justify-content: safe center;
  }

  /* Opening lines. Amiri's harakat rise well above the baseline, so the
     bismillah needs a roomier line box than the Latin text. */
  .is-invite .bismillah {
    font-size: clamp(0.95rem, 2.9vh, 1.45rem);
    margin: 0 0 clamp(0.3rem, 1.1vh, 0.8rem);
    line-height: 1.55;
  }

  .is-invite .hosts {
    font-size: clamp(0.82rem, 2.3vh, 1.02rem);
    line-height: 1.32;
    margin-bottom: clamp(0.25rem, 0.9vh, 0.7rem);
  }

  .is-invite .event-title {
    font-size: clamp(0.9rem, 2.7vh, 1.18rem);
  }

  .is-invite .of-children {
    font-size: clamp(0.85rem, 2.4vh, 1.05rem);
    margin: clamp(0.08rem, 0.3vh, 0.2rem) 0 clamp(0.12rem, 0.45vh, 0.35rem);
  }

  .is-invite .card-front h1.couple-names {
    font-size: clamp(1.3rem, 4.1vh, 2.55rem);
    margin: clamp(0.1rem, 0.4vh, 0.35rem) 0 clamp(0.25rem, 0.9vh, 0.7rem);
    line-height: 1.08;
  }

  .is-invite .couple-names .name-amp {
    padding: 0.08em 0 0.12em;
  }

  /* Programme */
  .is-invite .section-label {
    font-size: clamp(0.74rem, 2.1vh, 0.9rem);
    margin: clamp(0.25rem, 0.85vh, 0.7rem) 0 0.1rem;
  }

  .is-invite .program-line,
  .is-invite .venue-line {
    font-size: clamp(0.79rem, 2.25vh, 0.95rem);
    line-height: 1.28;
  }

  .is-invite .schedule-item {
    margin: clamp(0.15rem, 0.55vh, 0.45rem) 0 0;
  }

  .is-invite .schedule-item .venue-line {
    font-size: clamp(0.75rem, 2.1vh, 0.88rem);
  }

  .is-invite .countdown--compact,
  .is-invite .when-block .countdown--compact {
    margin-top: clamp(0.15rem, 0.5vh, 0.55rem);
  }

  .is-invite .countdown--compact .count-dial {
    width: clamp(2.3rem, 6.1vh, 3.6rem);
    height: clamp(2.3rem, 6.1vh, 3.6rem);
  }

  .is-invite .countdown--compact .count-name {
    font-size: clamp(0.82rem, 2.4vh, 1.15rem);
  }

  .is-invite .countdown--compact .count-days {
    font-size: clamp(0.76rem, 2.2vh, 0.92rem);
  }

  .is-invite .countdown--compact .count-date {
    font-size: clamp(0.62rem, 1.8vh, 0.72rem);
  }

  .is-invite .count-bridge {
    margin-top: clamp(1rem, 4vh, 2.4rem);
  }

  .is-invite .timing-note {
    font-size: clamp(0.68rem, 1.95vh, 0.8rem);
    margin-top: clamp(0.1rem, 0.4vh, 0.3rem);
  }

  /* Footer with the RSVP button — this is what must never need scrolling */
  .is-invite .card-footer {
    margin-top: 0;
    padding-top: clamp(0.75rem, 2.4vh, 1.6rem);
  }

  .is-invite .reply-status {
    font-size: clamp(0.84rem, 2.4vh, 1.05rem);
    margin-bottom: clamp(0.15rem, 0.5vh, 0.35rem);
  }

  .is-invite .rsvp-solid {
    margin-top: clamp(0.28rem, 0.9vh, 0.75rem);
    padding: clamp(0.3rem, 0.95vh, 0.5rem) 1.2rem;
  }

  /* Reply form on the back face */
  .is-invite .back-link {
    font-size: clamp(0.82rem, 2.3vh, 0.95rem);
    margin-bottom: clamp(0.35rem, 1.3vh, 0.9rem);
  }

  .is-invite .card-back h2 {
    font-size: clamp(1.4rem, 4.4vh, 2.2rem);
    margin-bottom: 0.2rem;
  }

  .is-invite .form-intro {
    font-size: clamp(0.85rem, 2.4vh, 1rem);
    line-height: 1.38;
    margin-bottom: clamp(0.4rem, 1.5vh, 1rem);
  }
}

/* Very short desktop windows (a small laptop with several toolbars open).
   Trim the last few pixels so the RSVP button still clears the fold. */
@media (min-width: 48rem) and (max-height: 36rem) {
  .is-invite .card-scroll {
    inset: 1.15rem 1rem;
  }

  /* The front face centres its text so it keeps clear of the frame on its
     own, but the form starts at the top edge and would sit on the gold line.
     It has spare height below, so it can afford the extra inset. */
  .is-invite .card-back .card-scroll {
    top: 1.8rem;
  }

  .is-invite .bismillah {
    margin-bottom: 0.15rem;
  }

  .is-invite .hosts {
    line-height: 1.25;
  }

  .is-invite .countdown--compact .count-dial {
    width: 2.1rem;
    height: 2.1rem;
  }
}
