:root {
  --ink: #6d5f6b;
  --ink-soft: #85767f;
  --gold: #b0906a;
  --blush: #d9a7a3;
  --ivory: #fbf6f2;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --script: "Great Vibes", cursive;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  overflow: hidden;
  background: #2b2027;
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  display: grid;
  place-items: center;
  height: 100dvh;
}
body::before {
  content: "";
  position: fixed; inset: -40px;
  background: url(assets/final.webp) center / cover;
  filter: blur(28px) saturate(1.05) brightness(.82);
  transform: scale(1.1);
}
body::after {
  content: "";
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(40, 22, 32, .45));
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { display: block; user-select: none; -webkit-user-drag: none; pointer-events: none; }

/* ---------- Stage ---------- */
.stage {
  position: relative;
  z-index: 1;
  height: min(calc(100dvh - 48px), 920px);
  width: min(100vw, 440px, calc((100dvh - 48px) * .47));
  overflow: hidden;
  container-type: size;
  background: var(--ivory);
  border-radius: 34px;
  box-shadow: 0 40px 90px -20px rgba(30, 10, 20, .55), 0 0 0 1px rgba(255, 255, 255, .12);
  isolation: isolate;
}
@media (max-width: 520px) and (orientation: portrait) {
  .stage { width: 100vw; height: 100dvh; border-radius: 0; box-shadow: none; }
}
@media (max-height: 640px) and (orientation: landscape) {
  .stage { height: 100dvh; width: calc(100dvh * .5); border-radius: 0; }
}

.scene { position: absolute; inset: 0; }
.s-final { z-index: 1; visibility: hidden; }
.s-gate { z-index: 2; perspective: 1300px; perspective-origin: 50% 45%; visibility: hidden; }
.s-env { z-index: 3; perspective: 1500px; perspective-origin: 50% 50%; }
.hit { position: absolute; inset: 0; z-index: 20; width: 100%; height: 100%; }
.hit[disabled] { pointer-events: none; }

/* ---------- Envelope ---------- */
.inside {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 70% at 50% 50%, #fffaf6 0%, #f8eee9 55%, #ead7d1 100%);
  box-shadow: inset 0 0 80px rgba(150, 90, 95, .25);
}
.inside::after { /* faint paper grain */
  content: ""; position: absolute; inset: 0; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .45 0 0 0 0 .45 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.creases { position: absolute; inset: 0; width: 100%; height: 100%; }
.creases path { fill: none; vector-effect: non-scaling-stroke; }
.cr-d path { stroke: rgba(150, 95, 100, .28); stroke-width: 1.2; }
.cr-l path { stroke: rgba(255, 255, 255, .9); stroke-width: 1.2; }
.inside .glow {
  position: absolute; left: 50%; top: 47%; width: 120%; aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.4); opacity: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, .95) 0%, rgba(255, 236, 240, .6) 25%, rgba(240, 200, 220, .0) 60%);
}

.flap {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.flap[data-f="top"] { transform-origin: 50% 0; z-index: 1; }
.flap[data-f="bottom"] { transform-origin: 50% 100%; z-index: 2; }
.flap[data-f="left"] { transform-origin: 0 50%; z-index: 3; }
.flap[data-f="right"] { transform-origin: 100% 50%; z-index: 4; }

.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.face .tex {
  position: absolute; inset: 0;
  clip-path: var(--clip);
  background: url(assets/paper.webp) center / cover;
}
.face.back .tex {
  clip-path: var(--clip-back);
  background:
    radial-gradient(140% 90% at 50% 0%, rgba(255, 255, 255, .5), transparent 60%),
    linear-gradient(160deg, #f4e2de, #e8cdc8);
}
.flap[data-f="left"] .face.back,
.flap[data-f="right"] .face.back { transform: rotateY(180deg); }
.flap[data-f="top"] .face.back,
.flap[data-f="bottom"] .face.back { transform: rotateX(180deg); }

/* light falloff as a flap turns */
.face .lit { position: absolute; inset: 0; pointer-events: none; opacity: 0; clip-path: var(--clip); background: linear-gradient(180deg, rgb(92, 38, 48), rgb(70, 26, 36)); }
.face.back .lit { clip-path: var(--clip-back); background: rgb(96, 50, 58); }

/* soft fold shadows */
.face .sh { position: absolute; inset: 0; filter: blur(5px); opacity: .55; }
.face .sh i { position: absolute; inset: 0; clip-path: var(--clip); background: rgba(95, 40, 48, .55); }
.flap[data-f="left"] .sh { transform: translate(3px, 2px); }
.flap[data-f="right"] .sh { transform: translate(-3px, 2px); }
.flap[data-f="bottom"] .sh { transform: translate(0, -3px); opacity: .35; }
.flap[data-f="top"] .sh { display: none; }

.emboss {
  position: absolute; left: 50%; top: 79%;
  transform: translateX(-50%);
  font: 400 3.2cqw/1 "Gilda Display", var(--serif);
  letter-spacing: .24em; padding-left: .24em;
  white-space: nowrap;
  color: #c98f8a;
  text-shadow: 0 1px 0 rgba(255, 236, 232, .9), 0 -1px 0 rgba(120, 55, 58, .5), 0 0 1px rgba(120, 55, 58, .25);
}

.seal-half {
  position: absolute;
  left: 50%; top: 50%;
  width: 35cqw; height: auto;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 6px 8px rgba(90, 30, 40, .35));
}
.flap[data-f="left"] .seal-half {
  clip-path: polygon(0 0, 50% 0, 54% 13%, 47% 27%, 55% 40%, 45.5% 55%, 53% 69%, 47% 84%, 51% 100%, 0 100%);
}
.flap[data-f="right"] .seal-half {
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 51% 100%, 47% 84%, 53% 69%, 45.5% 55%, 55% 40%, 47% 27%, 54% 13%);
}

/* ---------- Gate ---------- */
.door { position: absolute; top: 0; height: 100%; overflow: hidden; will-change: transform; backface-visibility: hidden; }
.door img { position: absolute; top: 0; width: var(--W); height: var(--H); object-fit: cover; max-width: none; }
.door-l { left: 0; width: var(--split); transform-origin: 0 50%; }
.door-l img { left: 0; }
.door-r { left: var(--split); right: 0; transform-origin: 100% 50%; }
.door-r img { left: calc(var(--split) * -1); }
.door .shade { position: absolute; inset: 0; opacity: 0; }
.door-l .shade { background: linear-gradient(90deg, rgba(60, 25, 35, .1), rgba(60, 25, 35, .55)); }
.door-r .shade { background: linear-gradient(-90deg, rgba(60, 25, 35, .1), rgba(60, 25, 35, .55)); }

.rib-vid { position: absolute; left: 0; top: 0; width: 2px; height: 2px; opacity: 0; pointer-events: none; }
.rib-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; opacity: 0; pointer-events: none; }
.ribbon { position: absolute; z-index: 3; filter: drop-shadow(0 10px 12px rgba(90, 40, 50, .28)); }
.rib { position: absolute; top: 0; height: auto; will-change: transform; }
.rib-l { left: 0; width: 50.87%; transform-origin: 100% 36%; }
.rib-r { left: 50.87%; width: 49.13%; transform-origin: 0 36%; }
.rib-k { left: 45.27%; top: 25.57%; width: 11.2%; }

/* ---------- Butterfly ---------- */
.bf {
  position: absolute; left: 0; top: 0; z-index: 10;
  width: 46cqw; aspect-ratio: 900 / 725;
  pointer-events: none;
  opacity: 0;
  perspective: 700px;
  will-change: transform;
}
.bf.tappable { pointer-events: auto; cursor: pointer; }
.bf-3d { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(18deg); will-change: transform; }
.wing { position: absolute; top: 0; width: 50%; height: 100%; backface-visibility: visible; }
.wl { left: 0; transform-origin: 100% 50%; will-change: transform; }
.wr { right: 0; transform-origin: 0 50%; will-change: transform; }
.body { position: absolute; left: 50%; top: 0; height: 100%; width: auto; translate: -50% 0; transform: translateZ(1px); }

.bf-shadow {
  position: absolute; left: 12%; top: 18%; width: 76%; height: 70%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(80, 40, 70, .35), transparent);
  filter: blur(6px);
  transform: translate(10%, 16%);
  opacity: 0; transition: opacity .8s;
}
.bf.rest .bf-shadow { opacity: .55; }

.fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 9; pointer-events: none; }
.fx-back { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Final card ---------- */
.s-final .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s-final .veil {
  position: absolute; inset: 0;
  background: radial-gradient(70% 42% at 50% 47%, rgba(255, 253, 252, .62), rgba(255, 253, 252, .25) 60%, transparent 85%);
}
.num { font-family: "Gilda Display", var(--serif) !important; font-weight: 400; letter-spacing: .1em; }
.date .side.num { font-size: min(3.5cqw, 1.7cqh); letter-spacing: .16em; }
.countdown .num { font-style: normal; letter-spacing: 0; font-size: .92em; }
.card {
  position: absolute; left: 0; right: 0; top: 14.5cqh; bottom: 21cqh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 0 9cqw;
  gap: 0;
}
.mono { width: 40cqw; height: auto; overflow: visible; margin-bottom: .6cqh; }
.mono-k { font: 400 82px/1 var(--serif); fill: #7a6b77; }
.mono-s { font: 400 70px/1 var(--script); fill: url(#gold); }

.names { font-weight: 400; display: flex; flex-direction: column; align-items: center; line-height: .98; margin-bottom: 2.4cqh; }
.names span { font-family: var(--script); font-size: min(12.4cqw, 6cqh); color: #8b7b86; white-space: nowrap; }
.names .n1 { transform: translateX(-4cqw); }
.names .n2 { transform: translateX(6cqw); }
.names em { font: italic 400 .5em/1 var(--serif); color: var(--gold); margin-right: .18em; vertical-align: .12em; }

.lead {
  font: 500 min(3.7cqw, 1.8cqh)/1.75 var(--serif);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #4f444d;
  max-width: 76cqw;
  margin-bottom: 2.6cqh;
}

.date { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 3.2cqw; width: 70cqw; }
.date .side {
  font: 500 min(3.9cqw, 1.9cqh)/1 var(--serif); letter-spacing: .2em; text-transform: uppercase; color: #4f444d;
  padding: 1.05cqh 0; border-top: 1px solid rgba(110, 95, 105, .55); border-bottom: 1px solid rgba(110, 95, 105, .55);
}
.date .day { font: 400 min(14cqw, 6.8cqh)/.9 "Gilda Display", var(--serif); color: #3f343d; letter-spacing: .02em; }
.dow { font: 500 min(3.8cqw, 1.85cqh)/1 var(--serif); letter-spacing: .26em; text-transform: uppercase; color: #4f444d; margin: .9cqh 0 2.9cqh; }

.venue { font: 400 min(9.4cqw, 4.6cqh)/1.05 var(--script); color: #8b7b86; }
.venue-sub { font: 500 min(3.6cqw, 1.75cqh)/1 var(--serif); letter-spacing: .3em; text-transform: uppercase; color: #4f444d; margin: .7cqh 0 2.2cqh; }
.time {
  font: 600 min(3.8cqw, 1.85cqh)/1 var(--serif); letter-spacing: .26em; text-transform: uppercase; color: #4f444d;
  display: flex; align-items: center; gap: 2.4cqw;
}
.time::before, .time::after { content: ""; width: 7cqw; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.time::after { transform: scaleX(-1); }

.actions {
  position: absolute; left: 0; right: 0; bottom: calc(8.6cqh + env(safe-area-inset-bottom) * .5);
  display: flex; justify-content: center; gap: 3cqw;
}
.pill {
  display: inline-flex; align-items: center; gap: 1.8cqw;
  padding: 1.25cqh 4.6cqw;
  border-radius: 999px;
  font: 600 min(3.3cqw, 1.6cqh)/1 var(--serif); letter-spacing: .18em; text-transform: uppercase;
  color: #4f444d; text-decoration: none;
  background: rgba(255, 252, 250, .62);
  -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
  box-shadow: 0 6px 18px -6px rgba(90, 50, 70, .35), inset 0 0 0 1px rgba(255, 255, 255, .7);
  transition: transform .3s var(--ease), background .3s;
}
.pill:active { transform: scale(.96); background: rgba(255, 252, 250, .85); }
.pill svg { width: 1.35em; height: 1.35em; fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.countdown {
  position: absolute; left: 0; right: 0; bottom: calc(3.4cqh + env(safe-area-inset-bottom) * .5);
  width: max-content; margin-inline: auto;
  padding: .6cqh 3.6cqw;
  border-radius: 999px;
  text-align: center;
  font: italic 500 min(3.7cqw, 1.8cqh)/1.1 var(--serif); letter-spacing: .04em; color: #43363f;
  background: rgba(255, 252, 250, .5);
  -webkit-backdrop-filter: blur(8px) saturate(1.2); backdrop-filter: blur(8px) saturate(1.2);
}

.rv { opacity: 0; }

/* ---------- UI ---------- */
.hint {
  position: absolute; left: 0; right: 0; margin-inline: auto; width: max-content; bottom: 7.5cqh; z-index: 30;
  display: flex; align-items: center; gap: 2.4cqw;
  padding: 1.1cqh 4.6cqw;
  border-radius: 999px;
  white-space: nowrap;
  font: 600 min(3.15cqw, 1.55cqh)/1 var(--serif); letter-spacing: .2em; text-transform: uppercase;
  color: #fffaf7;
  background: rgba(120, 70, 80, .22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  opacity: 0; pointer-events: none;
}

.icon-btn {
  position: absolute; z-index: 30; top: calc(2cqh + env(safe-area-inset-top) * .6);
  width: min(40px, 10.5cqw); height: min(40px, 10.5cqw); border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 252, 250, .55);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 4px 14px -4px rgba(90, 50, 70, .35), inset 0 0 0 1px rgba(255, 255, 255, .7);
  opacity: 0; pointer-events: none; transition: opacity .6s, transform .3s var(--ease);
}
.icon-btn.on { opacity: 1; pointer-events: auto; }
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 47.5%; height: 47.5%; fill: none; stroke: #6d5f6b; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.music { left: 4.5cqw; }
.replay { left: calc(4.5cqw + min(48px, 12cqw)); }
.music.muted .w { opacity: .2; }

.loader {
  position: absolute; inset: 0; z-index: 50;
  display: grid; place-content: center; justify-items: center; gap: 22px;
  background: var(--ivory);
  transition: opacity .9s var(--ease), visibility .9s;
}
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.ld-mono { font: 400 44px/1 var(--script); color: #8b7b86; opacity: 0; transform: translateY(6px); transition: opacity .7s var(--ease), transform .9s var(--ease); }
.fonts-ready .ld-mono { opacity: 1; transform: none; }
.ld-bar { opacity: 0; transition: opacity .6s .2s; }
.fonts-ready .ld-bar { opacity: 1; }
.ld-mono em { font-style: normal; font-size: .6em; color: var(--gold); }
.ld-bar { width: 120px; height: 1px; background: rgba(150, 120, 130, .25); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }

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

/* ---------- Refinements ---------- */
.wreath .stem { fill: none; stroke: url(#gold); stroke-width: .9; stroke-linecap: round; }
.wreath .leaf { fill: rgba(196, 164, 120, .16); stroke: url(#gold); stroke-width: .65; stroke-linejoin: round; }
.wreath .vein { fill: none; stroke: url(#gold); stroke-width: .4; opacity: .8; }
.wreath .berry { fill: url(#gold); }
.mono-letters { opacity: 0; }

.write { clip-path: inset(-30% 104% -30% -6%); }

.seal-shine {
  position: absolute; left: 50%; top: 50%; z-index: 5;
  width: 35cqw; aspect-ratio: 520 / 570;
  transform: translate(-50%, -52%);
  pointer-events: none;
  -webkit-mask: url(assets/seal.webp) center / 100% 100% no-repeat;
  mask: url(assets/seal.webp) center / 100% 100% no-repeat;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 250, 246, .7) 48%, rgba(255, 250, 246, .15) 54%, transparent 62%) 140% 0 / 300% 100% no-repeat;
  mix-blend-mode: soft-light;
  opacity: 0;
  animation: shine 2.6s 1.9s var(--ease) 1 both;
}
@keyframes shine { 0% { background-position: 140% 0; } 100% { background-position: -40% 0; } }

.gate-light {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(60% 46% at 50% 46%, rgba(255, 251, 244, .95), rgba(255, 238, 236, .45) 45%, transparent 75%);
}
.icon-btn[hidden] { display: grid; visibility: hidden; }

.inside-shade { position: absolute; inset: 0; background: radial-gradient(90% 70% at 50% 50%, transparent 25%, rgba(120, 60, 70, .38)); }
.bloom {
  position: absolute; inset: 0; z-index: 8; pointer-events: none; opacity: 0;
  background: radial-gradient(75% 55% at 50% 45%, rgba(255, 253, 250, .98), rgba(255, 240, 242, .7) 45%, rgba(255, 236, 240, .25) 80%);
}

.rotate-note { display: none; }
@media (max-height: 640px) and (orientation: landscape) and (pointer: coarse) {
  .rotate-note {
    display: flex; align-items: center; gap: 10px;
    position: fixed; z-index: 2; left: calc(50% + 25dvh + 24px); top: 50%; transform: translateY(-50%);
    max-width: calc(50vw - 25dvh - 40px);
    font: italic 500 15px/1.4 var(--serif); color: rgba(255, 248, 246, .92);
  }
  .rotate-note svg { flex: none; width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.4; }
}

/* guest name, written on the top flap like an addressed envelope */
.addressee {
  position: absolute; left: 50%; top: 7.2%;
  width: 58%; min-height: 14%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.1cqh;
  padding: 2.6cqh 5cqw 2.4cqh;
  text-align: center;
  color: #4e2a35;
  /* vellum label: translucent frosted paper with a fine gold rule */
  background:
    linear-gradient(180deg, rgba(255, 252, 250, .74), rgba(253, 244, 241, .64));
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .7) inset,
    0 0 0 1px rgba(255, 255, 255, .55),
    0 10px 22px -12px rgba(90, 40, 50, .45),
    0 2px 5px -2px rgba(90, 40, 50, .18);
}
.addressee::before {
  content: ""; position: absolute; inset: 1.1cqh 2.2cqw; pointer-events: none;
  border: 1px solid rgba(176, 144, 106, .55);
  border-radius: 1px;
}
.addressee::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; border-radius: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .6 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
.addressee .to {
  font: 500 min(2.9cqw, 1.4cqh)/1 var(--serif); letter-spacing: .34em; padding-left: .34em; text-transform: uppercase;
  color: #a48460;
}
.addressee .who { font: 400 7.6cqw/1.12 var(--script); white-space: nowrap; color: #4e2a35; }
.addressee .who.two { white-space: normal; line-height: 1.12; text-wrap: balance; }

/* ---------- LCV ---------- */
.rsvp-cta {
  position: absolute; left: 0; right: 0; bottom: calc(2.6cqh + env(safe-area-inset-bottom) * .5);
  width: min(84cqw, 360px); height: min(6.2cqh, 52px); margin-inline: auto;
  display: flex; align-items: center; justify-content: center; gap: 2.2cqw;
  border: 0; border-radius: 999px; cursor: pointer;
  font: 600 min(3.5cqw, 1.7cqh)/1 var(--serif); letter-spacing: .16em; text-transform: uppercase;
  color: #fffaf7;
  background: linear-gradient(135deg, #b98a85, #8f6164);
  box-shadow: 0 12px 26px -10px rgba(110, 55, 60, .65), inset 0 0 0 1px rgba(255, 255, 255, .22);
  transition: transform .25s var(--ease), background .4s;
}
.rsvp-cta[hidden] { display: none; }
.rsvp-cta:active { transform: scale(.97); }
.rsvp-cta .ic-ok { display: none; width: 1.5em; height: 1.5em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rsvp-cta .rsvp-edit-hint { display: none; }
.rsvp-cta.done {
  color: #43363f; letter-spacing: .1em;
  background: rgba(255, 252, 250, .78);
  -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 8px 20px -10px rgba(90, 50, 70, .35), inset 0 0 0 1px rgba(255, 255, 255, .8);
}
.rsvp-cta.done .ic-ok { display: inline; color: #5f8a6c; }
.rsvp-cta.done .rsvp-edit-hint { display: inline; padding-left: 2.2cqw; margin-left: .4cqw; border-left: 1px solid rgba(110, 90, 100, .3); color: #8f6164; text-decoration: underline; text-underline-offset: 3px; letter-spacing: .1em; }
.has-rsvp .countdown { display: none; }
.has-rsvp .actions { bottom: calc(10.2cqh + env(safe-area-inset-bottom) * .5); }

.sheet { position: absolute; inset: 0; z-index: 45; display: flex; align-items: flex-end; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(50, 28, 38, .32); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet-panel {
  position: relative; width: 100%; max-height: 92%; overflow: auto; overscroll-behavior: contain;
  padding: 5cqw 6cqw calc(5cqw + env(safe-area-inset-bottom));
  border-radius: 28px 28px 0 0;
  background: #fbf5f2;
  box-shadow: 0 -20px 50px -20px rgba(60, 30, 40, .45);
}
.sheet-panel::before { content: ""; display: block; width: 40px; height: 4px; margin: -1.5cqw auto 3cqw; border-radius: 4px; background: rgba(120, 90, 100, .22); }
.sheet-x { position: absolute; top: 3.4cqw; right: 3.4cqw; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(120, 90, 100, .08); display: grid; place-items: center; cursor: pointer; }
.sheet-x svg { width: 16px; height: 16px; stroke: #6d5f6b; stroke-width: 1.8; stroke-linecap: round; fill: none; }
.sheet-title { font: 400 min(10cqw, 44px)/1.05 var(--script); color: #7d6772; text-align: center; margin-top: 1cqw; }
.sheet-lead { font: 500 min(4.3cqw, 18px)/1.45 var(--serif); color: #574a54; text-align: center; margin: 2cqw auto 4.5cqw; max-width: 30ch; text-wrap: balance; }
.sheet-lead .nm { font-style: italic; }
.num-i { font-family: "Gilda Display", var(--serif); font-size: .92em; letter-spacing: .02em; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 3cqw; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span {
  display: flex; flex-direction: column; align-items: center; gap: 1.2cqw; text-align: center;
  padding: 4.2cqw 2cqw; border-radius: 18px;
  background: #fff; border: 1px solid rgba(120, 90, 100, .16);
  transition: border-color .25s, box-shadow .25s, background .25s, transform .2s var(--ease);
}
.opt b { font: 600 min(4.3cqw, 18px)/1.1 var(--serif); letter-spacing: .06em; color: #4a3d47; }
.opt small { font: italic 500 min(3.5cqw, 14.5px)/1.2 var(--serif); color: #8a7a83; }
.opt:active span { transform: scale(.98); }
.opt input:checked + span { border-color: rgba(176, 144, 106, .95); background: #fffaf5; box-shadow: 0 0 0 3px rgba(201, 167, 127, .22); }
.opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(150, 110, 120, .35); }
.count { display: flex; align-items: center; justify-content: space-between; gap: 3cqw; margin-top: 4cqw; padding: 3cqw 3.6cqw; border-radius: 18px; background: #fff; border: 1px solid rgba(120, 90, 100, .16); }
.count[hidden] { display: none; }
.count > span { font: 600 min(4cqw, 17px)/1.2 var(--serif); color: #4a3d47; }
.stepper { display: flex; align-items: center; gap: 2.4cqw; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(120, 90, 100, .22); background: #fbf5f2; font: 500 22px/1 var(--serif); color: #5a4c57; cursor: pointer; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper output { min-width: 2ch; text-align: center; font: 400 26px/1 "Gilda Display", var(--serif); color: #3f343d; }
.note-lbl { display: block; margin: 4.2cqw 0 1.6cqw; font: 600 min(3.8cqw, 16px)/1 var(--serif); color: #4a3d47; }
.note-lbl small { font-weight: 500; color: #8a7a83; }
#rsvpWhoRow[hidden] { display: none; }
.rsvp-who, #rsvpNote {
  width: 100%; resize: none; padding: 3cqw 3.6cqw; border-radius: 16px;
  border: 1px solid rgba(120, 90, 100, .18); background: #fff; color: #3f343d;
  font: 500 16px/1.4 var(--serif); outline: none;
}
.rsvp-who:focus, #rsvpNote:focus { border-color: rgba(176, 144, 106, .85); box-shadow: 0 0 0 3px rgba(201, 167, 127, .2); }
.sheet-err { min-height: 1.4em; margin-top: 2cqw; text-align: center; font: italic 500 15px/1.3 var(--serif); color: #9c4f55; }
.sheet-send {
  width: 100%; height: 50px; margin-top: 1cqw; border: 0; border-radius: 999px; cursor: pointer;
  font: 600 14px/1 var(--serif); letter-spacing: .22em; text-transform: uppercase; color: #fffaf7;
  background: linear-gradient(135deg, #b98a85, #8f6164); box-shadow: 0 10px 22px -12px rgba(110, 55, 60, .8);
  transition: transform .2s var(--ease), opacity .2s;
}
.sheet-send:active { transform: scale(.98); }
.sheet-send:disabled { opacity: .6; }
.sheet-send.ghost { color: #4a3d47; background: rgba(120, 90, 100, .1); box-shadow: none; }
.thanks { padding: 2cqw 0 1cqw; }
.thanks[hidden] { display: none; }

.addressee[hidden] { display: none; }

.rsvp-who { height: 48px; }
