:root {
  --paper: #f6f0e8;
  --ink: #2c221c;
  --soft: #6e5d55;
  --rose: #c45b78;
  --rose-deep: #8f3456;
  --line: rgba(143, 52, 86, 0.18);
  --card: #fffaf6;
  --serif: "Cormorant Garamond", Palatino, Georgia, serif;
  --script: "Great Vibes", cursive;
  --sans: Outfit, "Segoe UI", sans-serif;
  --hand: Caveat, cursive;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.5;
  background:
    radial-gradient(900px 420px at 0% -10%, #f8e4ec 0%, transparent 55%),
    radial-gradient(700px 380px at 100% 0%, #f3dfd4 0%, transparent 50%),
    var(--paper);
  opacity: 0;
}
body.ready { opacity: 1; transition: opacity 0.35s ease; }
body.locked { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
.btn, .sec, input, textarea, .choice { scroll-margin-top: 88px; scroll-margin-bottom: 96px; }
button { cursor: pointer; }
img { max-width: 100%; }
a { color: var(--rose-deep); }
::selection { background: #f0c3d1; }

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: calc(10px + var(--safe-t)) 14px 10px;
  background: rgba(246, 240, 232, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.langs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}
.langs button, .icon-btn, .choice, .stepper button, .text-btn, .modal-x, .viewer-x {
  border: 0;
  background: transparent;
}
.langs button {
  min-width: 40px;
  min-height: 36px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.06em;
}
.langs button[aria-pressed="true"] { background: var(--rose-deep); color: white; }
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--rose-deep);
  display: grid;
  place-items: center;
}
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.playing { background: var(--rose-deep); color: white; }

.cover {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(78px + var(--safe-t)) 20px calc(28px + var(--safe-b));
}
.cover-inner { width: min(100%, 420px); text-align: center; }
.eyebrow {
  margin: 0 0 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--rose-deep);
}
.hint { color: var(--soft); font-size: 0.92rem; margin: 14px 0 0; }

.envelope {
  width: min(88vw, 320px);
  height: 196px;
  margin: 18px auto 22px;
  position: relative;
  perspective: 900px;
  background:
    linear-gradient(145deg, #fff4cf 0%, #e8c878 22%, #c9a227 48%, #f0d78a 68%, #a67c1a 88%, #d4af37 100%);
  border-radius: 16px;
  box-shadow:
    0 18px 40px rgba(120, 90, 20, 0.28),
    inset 0 1px 0 rgba(255, 245, 200, 0.65),
    inset 0 -2px 8px rgba(90, 60, 10, 0.18);
  border: 1px solid rgba(166, 124, 26, 0.45);
}
.env-card {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 22px;
  height: 132px;
  background: var(--card);
  border-radius: 12px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.9s ease 0.15s;
  color: var(--rose-deep);
}
.envelope.is-open .env-card { transform: translateY(-128px); z-index: 5; }
.env-card b { font-family: var(--script); font-size: 2.15rem; font-weight: 400; line-height: 0.85; }
.env-card em { font-family: var(--script); font-style: normal; font-size: 1.6rem; color: var(--rose); line-height: 1; }
.env-card small { margin-top: 6px; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.68rem; color: var(--soft); }
.env-flap {
  position: absolute;
  inset: 0 0 42% 0;
  background: linear-gradient(180deg, #fff1c2 0%, #e0bd5a 45%, #b8922e 100%);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  transform-origin: top center;
  transition: transform 0.8s ease;
  z-index: 4;
  filter: drop-shadow(0 2px 4px rgba(120, 90, 20, 0.2));
}
.envelope.is-open .env-flap { transform: rotateX(188deg); z-index: 0; }
.env-pocket {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(180deg, #edd078 0%, #c9a227 55%, #9a7218 100%);
  clip-path: polygon(0 48%, 50% 80%, 100% 48%, 100% 100%, 0 100%);
  border-radius: 0 0 16px 16px;
  pointer-events: none;
}
.env-seal {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  border: 0;
  background: radial-gradient(circle at 35% 28%, #c45b78, var(--rose-deep) 58%, #6d2744);
  color: white;
  z-index: 6;
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 16px rgba(80, 20, 40, 0.28);
  transition: opacity 0.35s ease;
}
.envelope.is-open .env-seal { opacity: 0; pointer-events: none; }

.btn, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 0;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.btn { background: var(--rose-deep); color: white; width: min(100%, 280px); }
.stack > .btn, .stack > .btn-secondary, .actions .btn, .actions .btn-secondary { width: 100%; }
.btn-secondary, .text-btn {
  background: white;
  color: var(--rose-deep);
  border: 1px solid var(--line);
}
.btn-row, .center { display: flex; justify-content: center; }
.stack { display: grid; gap: 10px; }

.invite {
  display: none;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: calc(72px + var(--safe-t)) 18px calc(108px + var(--safe-b));
}
body.is-open .cover { display: none; }
body.is-open .invite { display: block; }

.hero { text-align: center; }
.hero > .eyebrow {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  margin-bottom: 10px;
}
.couple {
  margin: 0;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3.15rem, 13vw, 4.8rem);
  line-height: 0.82;
  color: var(--rose-deep);
}
.couple span { display: block; }
.amp { color: var(--rose); font-size: 0.62em; line-height: 0.7; }
.hello { font-family: var(--serif); font-size: 1.55rem; margin: 14px 0 0; }
.passes { margin: 0; color: var(--soft); }
.portrait-pair {
  display: grid;
  grid-template-columns: 1.45fr 0.78fr;
  gap: 10px;
  align-items: end;
  width: min(100%, 420px);
  margin: 16px auto 8px;
}
.hero-photo {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(80, 30, 45, 0.16);
  border: 3px solid white;
}
.hero-photo-side { aspect-ratio: 2 / 3; margin-bottom: 18px; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }
.hero-photo-side img { object-position: center 18%; }
.when { margin: 8px 0 16px; }
.when-day {
  display: block;
  font-family: var(--script);
  font-size: clamp(2.6rem, 10vw, 3.4rem);
  color: var(--rose);
  line-height: 1;
  text-transform: capitalize;
}
.when-md {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
}
.when-md strong {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 12vw, 3.6rem);
  font-weight: 500;
  line-height: 0.9;
}
.when-md b { font-weight: 600; letter-spacing: 0.16em; font-size: 0.92rem; }
.quote, .story-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.28rem;
  line-height: 1.35;
  margin: 12px auto;
  max-width: 22ch;
}
.count {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 14px 0 8px;
}
.count div {
  background: white;
  border-radius: 16px;
  padding: 10px 4px;
  border: 1px solid var(--line);
}
.count strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 6vw, 2rem);
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}
.count span {
  display: block;
  margin-top: 4px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}
.count-note {
  font-family: var(--script);
  font-size: 2.4rem;
  color: var(--rose-deep);
  margin: 10px 0 0;
}

.sec { margin-top: 42px; }
.sec h2 {
  margin: 0 0 8px;
  text-align: center;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 8vw, 2.7rem);
}
.sec h2::before {
  content: "✦";
  display: block;
  color: var(--rose);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  margin-bottom: 4px;
}
.lead { text-align: center; color: var(--soft); margin: 0 auto 16px; max-width: 36ch; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.facts li {
  display: flex;
  gap: 12px;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
}
.ico {
  width: 46px;
  height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rose);
  color: white;
}
.ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.facts small { display: block; color: var(--soft); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.facts strong { font-family: var(--serif); font-size: 1.28rem; font-weight: 600; }
.swatches { display: flex; gap: 6px; margin-top: 6px; }
.swatches i { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.08); }

.timeline { list-style: none; margin: 8px 0 0; padding: 0 0 0 8px; }
.timeline li {
  position: relative;
  padding: 0 0 18px 22px;
  border-left: 2px solid #f0c3d1;
}
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 0 4px #f6d5e0;
}
.timeline .time { color: var(--rose-deep); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; }
.timeline h3 { margin: 0; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; }
.timeline p { margin: 2px 0 0; color: var(--soft); }

.map-frame {
  height: 230px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #efe4dc;
  margin-bottom: 12px;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }
.sec .btn, .sec .btn-secondary { width: 100%; }

.poster {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #2c221c;
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 250, 246, 0.94);
  color: var(--rose-deep);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.stories {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 2px 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stories::-webkit-scrollbar { display: none; }
.story {
  flex: 0 0 70%;
  aspect-ratio: 9 / 15;
  border: 0;
  padding: 0;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  scroll-snap-align: center;
  background: #e7b3c4;
  box-shadow: 0 12px 30px rgba(80, 30, 45, 0.12);
}
.story img { width: 100%; height: 100%; object-fit: cover; }
.story .cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 14px 16px;
  text-align: left;
  color: white;
  font-family: var(--serif);
  font-size: 1.45rem;
  background: linear-gradient(transparent, rgba(40, 16, 24, 0.75));
}

.song-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.song-list li {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
}
.song-list .num {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f4efe4;
  color: #8a6b3d;
  font-family: var(--serif);
  font-weight: 600;
}
.song-list strong { display: block; font-size: 1rem; line-height: 1.25; }
.song-list small { color: var(--soft); }
.song-list a, .song-play {
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: var(--rose-deep);
  cursor: pointer;
  font: inherit;
  padding: 0;
}
.song-list li.is-current {
  border-color: #d4af6a;
  box-shadow: 0 0 0 1px rgba(212, 175, 106, 0.35);
}
.song-list li.is-active .num {
  background: #6d2744;
  color: #fff8f2;
}
.local-player {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: center;
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(145deg, #1a1216, #2b1822 55%, #3a2030);
  color: #f8efe8;
  box-shadow: 0 12px 30px rgba(40, 18, 28, 0.22);
}
.local-player[hidden] { display: none !important; }
.local-player-art {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(212, 175, 106, 0.55), transparent 55%),
    linear-gradient(160deg, #6d2744, #2b1822);
  font-family: var(--script, "Great Vibes", cursive);
  font-size: 1.6rem;
  color: #f6e7c8;
}
.local-player-body { min-width: 0; }
.local-player-kicker {
  margin: 0 0 2px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #d4af6a;
}
.local-player-body strong {
  display: block;
  font-size: 1.02rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.local-player-body small {
  display: block;
  color: rgba(248, 239, 232, 0.72);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.local-player-progress {
  margin-top: 10px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
  cursor: pointer;
}
.local-player-progress i {
  display: block;
  height: 100%;
  width: 0;
  background: #d4af6a;
}
.local-player-times {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 0.72rem;
  color: rgba(248, 239, 232, 0.65);
}
.local-player-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.pl-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
}
.pl-btn.pl-play {
  width: 44px;
  height: 44px;
  background: #d4af6a;
  color: #2b1822;
  font-weight: 700;
}
.linkish { display: inline-block; margin-top: 10px; font-weight: 650; }

.note-card {
  margin: 14px 0 0;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: center;
  line-height: 1.45;
}
.sec-gifts h2 {
  font-family: var(--serif);
  font-size: clamp(2.15rem, 7.2vw, 2.65rem);
  font-weight: 600;
  color: var(--rose-deep);
  letter-spacing: 0.01em;
  line-height: 1.15;
}
.gifts-lead {
  font-size: clamp(1.08rem, 3.8vw, 1.22rem);
  font-weight: 500;
  color: var(--ink);
  line-height: 1.55;
  margin-top: 6px;
}
.chest-card {
  margin: 20px 0 0;
  background: white;
  border: 1.5px solid rgba(143, 52, 86, 0.2);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(109, 39, 68, 0.1);
}
.chest-card img {
  display: block;
  width: 100%;
  height: min(42vw, 220px);
  object-fit: cover;
  object-position: center 55%;
}
.chest-card figcaption {
  display: grid;
  gap: 10px;
  padding: 18px 18px 20px;
  text-align: center;
  background: linear-gradient(180deg, #fff9f6 0%, #fff 70%);
}
.chest-card strong {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 5.5vw, 2.1rem);
  font-weight: 600;
  color: var(--rose-deep);
  line-height: 1.15;
}
.chest-card span {
  line-height: 1.55;
  color: var(--ink);
  font-size: clamp(1.08rem, 3.6vw, 1.2rem);
  font-weight: 500;
}
.bank-list { display: grid; gap: 16px; }
.bank-block .center { margin-top: 12px; }
.bank {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 14px;
}
.bank .bank-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.bank .bank-row:last-child { border-bottom: 0; }
.bank .bank-row span { color: var(--soft); }
.bank .bank-row b {
  text-align: right;
  font-weight: 600;
  word-break: break-word;
}
.bank .bank-row-number b { font-weight: 600; }
.btn-bank-copy { width: min(100%, 280px) !important; }

label { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 600; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
  border-radius: 14px;
  padding: 14px;
  font-size: 16px;
}
textarea { min-height: 96px; resize: vertical; }
.form-error { color: #9d2344; margin: 0 0 8px; font-size: 0.92rem; }
.choices { display: grid; gap: 8px; }
.choice {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: white;
  font-weight: 650;
}
.choice[aria-pressed="true"] { background: var(--rose-deep); color: white; border-color: var(--rose-deep); }
.guest-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px 14px 14px;
  text-align: center;
  display: grid;
  gap: 8px;
  justify-items: center;
}
.guest-card-kicker {
  margin: 0;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--soft);
}
.guest-card > span { font-weight: 650; }
.guest-card > strong {
  font-family: var(--serif);
  font-size: 2.2rem;
  line-height: 1;
}
#rsvp-done .guest-card { margin: 0 0 14px; }

.hero-rsvp-cta {
  margin: 22px 0 8px;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.hero-rsvp-hint {
  margin: 0;
  max-width: 28ch;
  font-size: 0.92rem;
  color: var(--soft);
  line-height: 1.35;
}
.btn-rsvp-cta,
.btn-rsvp-send {
  width: min(100%, 320px) !important;
  min-height: 54px;
  font-size: 1.05rem;
  box-shadow: 0 10px 28px rgba(143, 52, 86, 0.28);
  animation: rsvp-pulse 2.4s ease-in-out infinite;
}
.sec-rsvp-priority {
  margin-top: 8px;
  padding: 22px 16px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff7f4 0%, #fff 55%);
  border: 2px solid rgba(143, 52, 86, 0.22);
  box-shadow: 0 14px 36px rgba(109, 39, 68, 0.1);
}
.sec-rsvp-priority.in { transform: none; }
.rsvp-badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(143, 52, 86, 0.12);
  color: var(--rose-deep);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
body.rsvp-done .hero-rsvp-cta,
body.rsvp-done .rsvp-sticky { display: none !important; }
body.rsvp-closed .hero-rsvp-cta { display: none !important; }

.rsvp-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: none;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: linear-gradient(180deg, rgba(246, 240, 232, 0), rgba(246, 240, 232, 0.96) 28%, #f6f0e8 100%);
  pointer-events: none;
}
.rsvp-sticky:not([hidden]) { display: grid; justify-items: center; }
.rsvp-sticky .btn {
  pointer-events: auto;
  width: min(100%, 420px) !important;
}
body.is-open.rsvp-pending .rsvp-sticky:not([hidden]) { display: grid; }
body.is-open.rsvp-pending .fab { bottom: calc(84px + var(--safe-b)); }
body.is-open.rsvp-pending .invite { padding-bottom: calc(150px + var(--safe-b)); }

@keyframes rsvp-pulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(143, 52, 86, 0.28); transform: translateY(0); }
  50% { box-shadow: 0 14px 34px rgba(143, 52, 86, 0.38); transform: translateY(-1px); }
}
@media (prefers-reduced-motion: reduce) {
  .btn-rsvp-cta, .btn-rsvp-send { animation: none; }
}

.stepper { display: flex; align-items: center; justify-content: center; gap: 14px; }
.stepper button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: white;
  font-size: 1.4rem;
}
.stepper strong { font-family: var(--serif); font-size: 2rem; min-width: 1.4ch; text-align: center; }
.fine { display: block; text-align: center; color: var(--soft); font-size: 0.85rem; }
.success {
  background: white;
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  border: 1px solid var(--line);
}
.success p { font-family: var(--serif); font-size: 1.45rem; margin: 0 0 12px; }

.sec-wishes h2 {
  font-family: var(--serif);
  font-size: clamp(2.05rem, 6.8vw, 2.55rem);
  font-weight: 600;
  color: var(--rose-deep);
  line-height: 1.15;
}
.wish-lead {
  font-size: clamp(1.08rem, 3.8vw, 1.22rem) !important;
  font-weight: 500;
  color: var(--ink) !important;
  line-height: 1.55;
  max-width: 34ch;
}
.sec-wishes .book {
  border: 1.5px solid rgba(143, 52, 86, 0.18);
  box-shadow: 0 14px 34px rgba(80, 30, 45, 0.1), inset 8px 0 0 #e7b3c4;
}

.book {
  background: var(--card);
  border-radius: 18px 22px 22px 18px;
  box-shadow: 0 16px 40px rgba(80, 30, 45, 0.08), inset 8px 0 0 #e7b3c4;
  padding: 18px 16px 18px 20px;
}
.signatures { list-style: none; margin: 16px 0 0; padding: 0; max-height: 420px; overflow: auto; }
.signature { padding: 12px 0; border-bottom: 1px dashed rgba(143, 52, 86, 0.25); }
.signature p { margin: 0; font-family: var(--hand); font-size: 1.55rem; line-height: 1.2; }
.signature span { display: block; margin-top: 2px; font-family: var(--script); font-size: 1.7rem; color: var(--rose-deep); }
.empty { color: var(--soft); padding: 8px 0; }

.qr-box {
  width: 196px;
  height: 196px;
  margin: 0 auto 8px;
  background: white;
  border-radius: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  padding: 10px;
}
.qr-box img, .qr-box canvas { display: block; }
.linkline {
  word-break: break-all;
  text-align: center;
  font-size: 0.82rem;
  color: var(--soft);
  user-select: all;
}
.footer {
  text-align: center;
  font-family: var(--script);
  font-size: 2rem;
  color: var(--rose-deep);
  margin: 36px 0 0;
}

.fab {
  display: none;
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--safe-b));
  z-index: 30;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: white;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(20, 90, 40, 0.28);
}
body.is-open .fab { display: grid; }
.fab svg { width: 30px; height: 30px; fill: currentColor; }

.viewer {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #140d10;
  color: white;
  display: flex;
  flex-direction: column;
  padding: calc(12px + var(--safe-t)) 12px calc(18px + var(--safe-b));
}
.bars { display: flex; gap: 4px; }
.bars i { flex: 1; height: 3px; background: rgba(255, 255, 255, 0.28); border-radius: 99px; overflow: hidden; }
.bars i b { display: block; height: 100%; width: 0; background: white; }
.viewer-x {
  position: absolute;
  top: calc(22px + var(--safe-t));
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: white;
  font-size: 1.4rem;
}
.viewer figure { position: relative; flex: 1; margin: 12px 0; min-height: 0; }
.viewer img, #player-stage video, #player-stage iframe { width: 100%; height: 100%; object-fit: contain; border: 0; background: #140d10; }
.viewer figcaption, #player-stage p {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  margin: 0;
  font-family: var(--serif);
  font-size: 1.7rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.hit { position: absolute; top: 0; bottom: 0; width: 32%; }
.hit-left { left: 0; }
.hit-right { right: 0; }
#player-stage { flex: 1; position: relative; min-height: 0; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(88px + var(--safe-b));
  transform: translateX(-50%) translateY(12px);
  background: #2c221c;
  color: white;
  padding: 12px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  z-index: 90;
  max-width: calc(100% - 32px);
  text-align: center;
  transition: 0.25s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(36, 20, 24, 0.48);
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal-card {
  width: min(100%, 360px);
  background: var(--card);
  border-radius: 22px;
  padding: 22px 16px 16px;
  text-align: center;
  position: relative;
}
.modal-x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; font-size: 1.4rem; }

.admin-app, .gate {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: calc(18px + var(--safe-t)) 16px calc(28px + var(--safe-b));
}
.gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; }
.gate-card, .panel-card {
  width: min(100%, 420px);
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px 18px;
}
.gate h1, .admin-head h1 {
  font-family: var(--script);
  font-weight: 400;
  font-size: 3rem;
  color: var(--rose-deep);
  margin: 0;
  line-height: 0.9;
}
.admin-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; }
.live { display: inline-flex; align-items: center; gap: 6px; color: #1d7a45; font-weight: 700; font-size: 0.85rem; }
.live i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1d7a45;
  animation: pulse 1.6s infinite;
}
.live.off { color: var(--soft); }
.live.off i { background: var(--soft); animation: none; }
.jump { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.jump a, .filters button, .mini {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  color: var(--rose-deep);
  text-decoration: none;
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.86rem;
  font-weight: 650;
}
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.filters button[aria-pressed="true"] { background: var(--rose-deep); color: white; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stat { background: white; border: 1px solid #e7b3c4; border-radius: 18px; padding: 12px; }
.stat b { display: block; font-family: var(--serif); font-size: 2rem; color: var(--rose-deep); line-height: 1; font-variant-numeric: lining-nums; }
.stat span { color: var(--soft); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.meter { margin: 12px 0; color: var(--soft); font-size: 0.92rem; }
.meter i { display: block; height: 8px; border-radius: 99px; background: #f0d5de; margin-top: 6px; overflow: hidden; }
.meter b { display: block; height: 100%; background: var(--rose); border-radius: inherit; }
.actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 12px 0; }
.guest-list, .wish-admin, .review-list { display: grid; gap: 10px; }
.share-card {
  display: block;
  margin: 0 0 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: white;
  box-shadow: 0 10px 24px rgba(80, 30, 45, 0.1);
}
.share-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}
.modal-card .share-card { margin-bottom: 10px; }
.guest-card, .wish-card, .extra-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
}
.guest-top, .wish-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.guest-card h3, .wish-card h3 { margin: 0; font-family: var(--serif); font-size: 1.45rem; }
.pill { border-radius: 999px; padding: 4px 8px; font-size: 0.75rem; font-weight: 700; background: #f3e6dc; }
.pill.yes { background: #e5f6ea; color: #1d7a45; }
.pill.no { background: #fde7ee; color: #9d2344; }
.card-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.guest-edit {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.guest-edit .btn-secondary { width: 100%; }
body.admin:not(.admin-editing) #clear-samples { display: none; }
.setup-box {
  background: #fff8f2;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.08em;
  word-break: break-all;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--rose-deep);
}
.guest-gate, .invite-ended {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 20% 10%, rgba(212, 175, 106, 0.28), transparent 42%),
    linear-gradient(160deg, #f7efe4, #f3e2d6 55%, #efe0d4);
}
.guest-gate[hidden], .invite-ended[hidden] { display: none !important; }
body.guest-locked .topbar,
body.guest-locked .cover,
body.guest-locked .invite,
body.guest-locked .fab,
body.invite-closed .topbar,
body.invite-closed .cover,
body.invite-closed .invite,
body.invite-closed .fab { visibility: hidden; pointer-events: none; }
.deadline-note {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff4e8;
  border: 1px solid #efd0b0;
  color: #7a3b1d;
  font-size: 0.95rem;
  line-height: 1.45;
}
.deadline-box {
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 16px;
  background: #fdecee;
  border: 1px solid #f0c4cd;
  color: #8a2944;
}
.pin-chip {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f3e6dc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.banner {
  background: #fff4e8;
  border: 1px solid #efd0b0;
  border-radius: 16px;
  padding: 12px;
  margin: 12px 0;
}
.bar { margin: 8px 0 12px; }
.bar-top { display: flex; justify-content: space-between; font-size: 0.92rem; }
.bar-track { height: 8px; background: #f3e0e7; border-radius: 99px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--rose-deep); }
.review-note { font-family: var(--serif); font-size: 1.25rem; }
details.fold { background: white; border-radius: 16px; border: 1px solid var(--line); padding: 10px 12px; }
details.fold summary { cursor: pointer; font-weight: 700; }
.event-log { margin: 8px 0 0; padding-left: 18px; color: var(--soft); }
#print-root { display: none; }
.two { display: grid; gap: 10px; }

@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .actions, .two { grid-template-columns: 1fr 1fr; }
  .guest-list { grid-template-columns: 1fr 1fr; }
  .story { flex-basis: 42%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(29, 122, 69, 0.45); }
  100% { box-shadow: 0 0 0 8px rgba(29, 122, 69, 0); }
}
@media print {
  body { opacity: 1; background: white; }
  body.printing .admin-app { display: none !important; }
  body.printing #print-root { display: block; }
  #print-root { color: black; }
  #print-root table { width: 100%; border-collapse: collapse; font-size: 12px; }
  #print-root td, #print-root th { border: 1px solid #ccc; padding: 4px 6px; text-align: left; }
}
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
