:root {
  --paper: #f7f4ee;
  --powder-blue: #dde8f5;
  --pale-blue: #eef5fb;
  --gold: #b89b5e;
  --gold-light: #d9c797;
  --ink: #2b2b2b;
  --lavender: #b8aedc;
  --night: #10121a;
  --night-blue: #171d2a;
  --wine: #6f2435;
  --shadow: rgba(34, 29, 29, 0.16);
  --serif-display: "Cormorant Garamond", Georgia, serif;
  --serif-text: "Libre Baskerville", Georgia, serif;
  --safe-top: max(16px, env(safe-area-inset-top));
  --safe-bottom: max(16px, env(safe-area-inset-bottom));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--night);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 12%, rgba(221, 232, 245, 0.22), transparent 35%),
    linear-gradient(160deg, var(--night-blue), var(--night));
  font-family: var(--serif-text);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea {
  font: inherit;
}

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

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.noscript {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  color: var(--ink);
  background: var(--paper);
  text-align: center;
}

.ambient {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora {
  position: absolute;
  width: 90vw;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0.22;
  filter: blur(60px);
  animation: breathe 10s ease-in-out infinite alternate;
}

.aurora--one {
  top: -40vw;
  left: -25vw;
  background: var(--lavender);
}

.aurora--two {
  right: -45vw;
  bottom: -25vw;
  background: var(--powder-blue);
  animation-delay: -4s;
}

.ambient__flowers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  mix-blend-mode: screen;
  transition: opacity 1.2s ease;
}

body.is-open .ambient__flowers {
  opacity: 0.11;
}

.dust {
  position: absolute;
  inset: 0;
}

.dust i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 248, 218, 0.68);
  box-shadow: 0 0 8px rgba(255, 248, 218, 0.8);
}

.language-switch {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(184, 155, 94, 0.48);
  border-radius: 999px;
  background: rgba(247, 244, 238, 0.66);
  box-shadow: 0 5px 20px rgba(21, 23, 31, 0.08);
  backdrop-filter: blur(9px);
}

.language-switch button {
  min-width: 44px;
  min-height: 44px;
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  color: rgba(43, 43, 43, 0.62);
  background: transparent;
  cursor: pointer;
  font-family: var(--serif-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.language-switch button[aria-pressed="true"] {
  color: #fffaf0;
  background: #2d3038;
  box-shadow: inset 0 0 0 1px rgba(184, 155, 94, 0.42);
}

.language-switch > span {
  width: 1px;
  height: 18px;
  background: rgba(184, 155, 94, 0.34);
}

.language-switch--opening {
  position: fixed;
  z-index: 45;
  top: var(--safe-top);
  left: 14px;
  color: #f4ecd9;
  background: rgba(16, 18, 26, 0.4);
}

.language-switch--opening button {
  color: rgba(244, 236, 217, 0.65);
}

.language-switch--opening button[aria-pressed="true"] {
  color: var(--night);
  background: var(--gold-light);
}

.sound-toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 12px;
  border: 1px solid rgba(184, 155, 94, 0.5);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(247, 244, 238, 0.68);
  box-shadow: 0 5px 20px rgba(21, 23, 31, 0.08);
  backdrop-filter: blur(9px);
  cursor: pointer;
  font-family: var(--serif-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.sound-toggle:hover,
.sound-toggle:active {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.sound-toggle[aria-pressed="true"] .sound-toggle__icon {
  color: var(--wine);
  animation: musicPulse 1.3s ease-in-out infinite;
}

.prologue {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  min-height: 100dvh;
  padding: calc(var(--safe-top) + 50px) 20px calc(var(--safe-bottom) + 12px);
  overflow: hidden;
  color: #f4ecd9;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(16, 18, 26, 0.18), rgba(9, 10, 15, 0.55)),
    radial-gradient(ellipse at center, rgba(126, 115, 149, 0.2), transparent 60%);
}

.prologue::before,
.prologue::after {
  content: "";
  position: absolute;
  left: 50%;
  width: min(82vw, 390px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 155, 94, 0.65), transparent);
  transform: translateX(-50%);
}

.prologue::before { top: 16%; }
.prologue::after { bottom: 10%; }

.prologue__eyebrow,
.letter-intro__edition,
.completion__eyebrow {
  margin-bottom: 10px;
  color: var(--gold-light);
  font-family: var(--serif-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.prologue__title {
  margin: 0;
  font-family: var(--serif-display);
  font-size: clamp(2.6rem, 13vw, 4.7rem);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.4);
}

.prologue__title::first-line {
  font-style: italic;
}

.prologue__sound-note {
  order: 1;
  max-width: 310px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 19px;
  padding: 8px 13px;
  border: 1px solid rgba(184, 155, 94, 0.28);
  border-radius: 999px;
  color: rgba(244, 236, 217, 0.72);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(6px);
}

.prologue__sound-note span {
  flex: 0 0 auto;
  color: var(--gold-light);
  font-family: var(--serif-display);
  font-size: 1rem;
}

.prologue__sound-note p {
  margin: 0;
  font-family: var(--serif-display);
  font-size: 0.74rem;
  font-style: italic;
  line-height: 1.35;
  text-align: left;
}

.prologue__instruction {
  order: 3;
  margin: 25px 0 0;
  color: rgba(244, 236, 217, 0.76);
  font-family: var(--serif-display);
  font-size: 1rem;
  font-style: italic;
  letter-spacing: 0.03em;
}

.prologue__note {
  position: absolute;
  bottom: calc(var(--safe-bottom) + 12px);
  margin: 0;
  color: rgba(244, 236, 217, 0.45);
  font-size: 0.57rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.envelope {
  position: relative;
  order: 2;
  width: min(82vw, 360px);
  aspect-ratio: 1.55;
  margin-top: clamp(36px, 7vh, 66px);
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  perspective: 1200px;
  cursor: pointer;
  filter: drop-shadow(0 25px 27px rgba(0, 0, 0, 0.42));
  animation: envelopeFloat 4.8s ease-in-out infinite;
}

body.is-open .envelope {
  animation-play-state: paused;
}

.envelope__shadow {
  position: absolute;
  right: 9%;
  bottom: -15%;
  left: 9%;
  height: 18%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.42);
  filter: blur(18px);
}

.envelope__body {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(184, 155, 94, 0.55);
  border-radius: 4px;
  background:
    linear-gradient(rgba(246, 238, 218, 0.88), rgba(233, 222, 198, 0.9)),
    url("assets/paper.jpg") center / cover;
  box-shadow: inset 0 0 45px rgba(108, 91, 57, 0.16);
  transform-style: preserve-3d;
}

.envelope__letter {
  position: absolute;
  z-index: 1;
  right: 5%;
  bottom: 5%;
  left: 5%;
  height: 88%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(184, 155, 94, 0.28);
  color: rgba(43, 43, 43, 0.48);
  background: var(--paper) url("assets/paper2.jpg") center / cover;
  box-shadow: 0 0 14px rgba(40, 32, 24, 0.15);
}

.envelope__letter-mark {
  font-family: var(--serif-display);
  font-size: 2rem;
  letter-spacing: 0.08em;
}

.envelope__letter-rule {
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  margin-top: 23px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.envelope__fold {
  position: absolute;
  z-index: 3;
  bottom: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(150deg, #ede1c7, #f7edd6);
}

.envelope__fold--left {
  left: 0;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.envelope__fold--right {
  right: 0;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.envelope__flap {
  position: absolute;
  z-index: 4;
  top: -1px;
  right: -1px;
  left: -1px;
  height: 66%;
  background:
    linear-gradient(170deg, rgba(255,255,255,0.08), rgba(153, 126, 76, 0.08)),
    #efe4cc;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: 50% 0;
  backface-visibility: hidden;
}

.envelope__seal {
  position: absolute;
  z-index: 7;
  top: 55%;
  left: 50%;
  width: clamp(62px, 18vw, 78px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(-4deg);
  transition: filter 250ms ease;
}

.envelope:hover .envelope__seal,
.envelope:active .envelope__seal {
  filter: brightness(1.1) drop-shadow(0 5px 8px rgba(56, 15, 25, 0.35));
}

.envelope__seal img,
.final-seal img {
  display: block;
  width: 100%;
  height: 100%;
}

.envelope__seal-crack {
  position: absolute;
  z-index: 2;
  top: 48%;
  left: 50%;
  width: 2px;
  height: 0;
  background: rgba(65, 15, 28, 0.9);
  transform-origin: top;
}

.envelope__seal-crack--one { transform: rotate(24deg); }
.envelope__seal-crack--two { transform: rotate(-41deg); }

/* Main letter experience */
.experience {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  min-height: 100dvh;
  padding: var(--safe-top) 12px var(--safe-bottom);
  background:
    radial-gradient(circle at 50% 0%, rgba(221, 232, 245, 0.92), transparent 44%),
    linear-gradient(145deg, #f3f5f3, #e8edf4 52%, #eee8f2);
}

.experience::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.32;
  background: url("assets/paper2.jpg") center / cover;
  mix-blend-mode: multiply;
}

.experience__header {
  width: min(100%, 860px);
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto 10px;
  padding: 0 4px;
}

.experience__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.language-switch--inside {
  min-height: 48px;
  padding: 2px;
}

.language-switch--inside button {
  min-width: 42px;
  min-height: 42px;
  padding-inline: 6px;
}

.edition-mark {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.edition-mark__crest {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--serif-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.edition-mark__text {
  overflow: hidden;
  color: rgba(43, 43, 43, 0.66);
  font-family: var(--serif-display);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-overflow: clip;
  text-transform: uppercase;
  white-space: nowrap;
}

.experience__header .sound-toggle {
  padding-inline: 13px;
}

.experience__header .sound-toggle__label {
  display: none;
}

.ink-progress {
  position: fixed;
  z-index: 15;
  top: calc(var(--safe-top) + 64px);
  right: 1px;
  width: 40px;
  height: 108px;
  pointer-events: none;
}

.ink-progress__count {
  position: absolute;
  top: 46px;
  right: -27px;
  width: 92px;
  color: rgba(43, 43, 43, 0.5);
  font-family: var(--serif-display);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(90deg);
}

.ink-progress__feather {
  position: absolute;
  top: 0;
  right: 6px;
  width: 28px;
  height: 92px;
  transform: rotate(7deg);
}

.ink-progress__base,
.ink-progress__fill {
  position: absolute;
  inset: 0;
  -webkit-mask: url("assets/feather.svg") center / contain no-repeat;
  mask: url("assets/feather.svg") center / contain no-repeat;
}

.ink-progress__base {
  background: rgba(184, 155, 94, 0.28);
}

.ink-progress__fill {
  top: auto;
  height: 8%;
  background: linear-gradient(#4c3d57, #242331);
  transition: height 700ms cubic-bezier(.2,.75,.2,1);
}

.letter {
  position: relative;
  width: min(100%, 820px);
  min-height: calc(100dvh - 128px);
  margin: 0 auto;
  padding: clamp(36px, 8vw, 76px) clamp(25px, 7vw, 82px);
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(184, 155, 94, 0.42);
  border-radius: 2px;
  background:
    linear-gradient(rgba(247, 244, 238, 0.93), rgba(247, 244, 238, 0.95)),
    url("assets/paper.jpg") center / 900px auto;
  box-shadow:
    0 20px 60px rgba(55, 46, 58, 0.18),
    0 2px 7px rgba(55, 46, 58, 0.11),
    inset 0 0 80px rgba(151, 128, 78, 0.08);
  transform-origin: 50% 0;
}

.letter::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8px;
  border: 1px solid rgba(184, 155, 94, 0.28);
  pointer-events: none;
}

.letter__flowers {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.16;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.letter__corner {
  position: absolute;
  z-index: 1;
  width: 21px;
  height: 21px;
  border-color: var(--gold);
  opacity: 0.64;
  pointer-events: none;
}

.letter__corner--tl { top: 14px; left: 14px; border-top: 1px solid; border-left: 1px solid; }
.letter__corner--tr { top: 14px; right: 14px; border-top: 1px solid; border-right: 1px solid; }
.letter__corner--bl { bottom: 14px; left: 14px; border-bottom: 1px solid; border-left: 1px solid; }
.letter__corner--br { right: 14px; bottom: 14px; border-right: 1px solid; border-bottom: 1px solid; }

.letter-intro {
  max-width: 570px;
  margin: 0 auto;
  text-align: center;
}

.letter-intro__edition,
.completion__eyebrow {
  color: #887044;
}

.ornament {
  width: min(100%, 430px);
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 18px auto clamp(36px, 9vh, 72px);
  color: var(--gold);
  background: url("assets/ornaments.svg") center / contain no-repeat;
}

.ornament span {
  width: min(24vw, 100px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.ornament > * {
  visibility: hidden;
}

.ornament span:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.ornament b {
  font-size: 0.65rem;
}

.writing-line {
  position: relative;
  width: 100%;
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.written-greeting {
  display: block;
  width: min(100%, 620px);
  margin: 0 auto;
  color: #282832;
  font-family: var(--serif-display);
  font-size: clamp(3rem, 13.5vw, 5.7rem);
  font-style: italic;
  font-weight: 500;
  line-height: 0.73;
  letter-spacing: -0.045em;
  text-align: center;
  text-shadow: 0 0.35px 0 rgba(21, 20, 28, 0.7);
}

.written-greeting__line {
  display: block;
  white-space: nowrap;
}

.written-greeting__line + .written-greeting__line {
  margin-top: 0.08em;
}

.written-greeting__glyph {
  display: inline-block;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  filter: blur(0.15px);
  will-change: clip-path, opacity;
}

.written-greeting__space {
  display: inline-block;
  width: 0.24em;
}

.writing-feather {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  width: clamp(68px, 20vw, 94px);
  height: clamp(68px, 20vw, 94px);
  object-fit: contain;
  opacity: 0;
  transform: translate(-38%, -96%) rotate(18deg);
  transform-origin: 38% 96%;
  filter: drop-shadow(2px 4px 4px rgba(43, 43, 43, 0.14));
  pointer-events: none;
  will-change: left, top, transform;
}

.letter-intro__copy {
  opacity: 0;
  transform: translateY(10px);
}

.letter-intro__copy p {
  margin: 0 0 1.1em;
  font-size: clamp(0.86rem, 3.6vw, 1.01rem);
}

.letter-intro__copy strong {
  color: #69563b;
  font-weight: 700;
}

.letter-intro__signature {
  margin: 26px 0 0;
  color: rgba(43, 43, 43, 0.52);
  font-family: var(--serif-display);
  font-size: 1rem;
  font-style: italic;
}

.royal-button {
  position: relative;
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 18px;
  padding: 13px 24px;
  overflow: hidden;
  border: 1px solid var(--gold);
  border-radius: 2px;
  color: #fffaf0;
  background: #262a34;
  box-shadow: 0 9px 24px rgba(38, 42, 52, 0.2);
  cursor: pointer;
  font-family: var(--serif-display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.royal-button::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -80%;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-18deg);
  transition: left 650ms ease;
}

.royal-button:hover::before { left: 130%; }
.royal-button:hover,
.royal-button:active {
  background: #313746;
  box-shadow: 0 12px 27px rgba(38, 42, 52, 0.25);
  transform: translateY(-2px);
}

.royal-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.royal-button__arrow {
  font-size: 1.3em;
  font-weight: 400;
}

.royal-button--small {
  min-height: 48px;
  margin-top: 4px;
  padding: 10px 19px;
  font-size: 1rem;
}

/* One-question-at-a-time form */
.rsvp {
  position: relative;
  max-width: 620px;
  min-height: clamp(480px, 68dvh, 640px);
  margin: 0 auto;
}

.rsvp__folio {
  color: rgba(43, 43, 43, 0.44);
  font-family: var(--serif-display);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-align: center;
}

.question-stage {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 0 54px;
}

.question-card {
  width: 100%;
  text-align: center;
}

.question-card__number {
  margin-bottom: 22px;
  color: #8b7448;
  font-family: var(--serif-display);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.question-card__number::before,
.question-card__number::after {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  margin: 0 9px 3px;
  background: var(--gold);
  opacity: 0.65;
}

.question-card h2 {
  max-width: 540px;
  margin: 0 auto 15px;
  font-family: var(--serif-display);
  font-size: clamp(2rem, 9vw, 3.6rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.question-card__hint {
  max-width: 470px;
  margin: 0 auto 30px;
  color: rgba(43, 43, 43, 0.6);
  font-size: 0.76rem;
  font-style: italic;
  line-height: 1.55;
}

.question-card__field {
  max-width: 480px;
  margin: 36px auto 0;
}

.ink-input,
.ink-textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(43, 43, 43, 0.32);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: 0 1px 0 transparent;
  font-family: var(--serif-display);
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  transition: border-color 180ms ease, box-shadow 180ms ease;
  appearance: none;
}

.ink-input {
  min-height: 58px;
  padding: 9px 8px;
}

.ink-input::placeholder,
.ink-textarea::placeholder {
  color: rgba(43, 43, 43, 0.27);
  font-style: italic;
}

.ink-input:focus,
.ink-textarea:focus {
  border-color: var(--gold);
  outline: 0;
  box-shadow: 0 1px 0 var(--gold);
}

.ink-textarea {
  min-height: 126px;
  padding: 10px 6px;
  resize: vertical;
  font-family: var(--serif-text);
  font-size: 1rem;
  line-height: 1.6;
  text-align: left;
}

.field-error {
  min-height: 24px;
  margin: 9px 0 0;
  color: #8a3348;
  font-size: 0.71rem;
}

.question-card__actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 480px;
  margin: 30px auto 0;
}

.choice-button {
  position: relative;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid rgba(184, 155, 94, 0.62);
  border-radius: 2px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 5px 18px rgba(54, 45, 43, 0.06);
  cursor: pointer;
  font-family: var(--serif-display);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.choice-button::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color 180ms ease;
}

.choice-button:hover,
.choice-button:active,
.choice-button.is-selected {
  color: #fffaf0;
  border-color: #2d3038;
  background: #2d3038;
  box-shadow: 0 10px 24px rgba(45, 48, 56, 0.18);
  transform: translateY(-2px);
}

.choice-button:hover::after,
.choice-button:active::after,
.choice-button.is-selected::after {
  border-color: rgba(184, 155, 94, 0.55);
}

.choice-button--quiet {
  min-height: 51px;
  color: rgba(43, 43, 43, 0.7);
  background: transparent;
  font-size: 1.05rem;
}

.question-card__continue {
  width: 100%;
  margin-top: 19px;
}

.allergy-detail {
  margin-top: 24px;
}

.rsvp__navigation {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
}

.text-button {
  min-width: 96px;
  min-height: 44px;
  padding: 7px 11px;
  border: 0;
  color: rgba(43, 43, 43, 0.57);
  background: transparent;
  cursor: pointer;
  font-family: var(--serif-display);
  font-size: 0.95rem;
  font-style: italic;
  transition: color 180ms ease;
}

.text-button:hover,
.text-button:active { color: var(--ink); }

.page-turn {
  position: absolute;
  z-index: 8;
  inset: 0;
  background:
    linear-gradient(96deg, rgba(255,255,255,0.2), rgba(184,155,94,0.11) 48%, rgba(255,255,255,0.45)),
    url("assets/paper2.jpg") center / cover;
  transform-origin: right center;
  pointer-events: none;
}

/* Final signature and stamp */
.completion {
  min-height: clamp(520px, 70dvh, 670px);
  display: grid;
  place-items: center;
  text-align: center;
}

.completion__content {
  width: min(100%, 570px);
}

.completion h2 {
  margin: 0;
  font-family: var(--serif-display);
  font-size: clamp(2.6rem, 12vw, 5rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.completion__message {
  margin: 24px auto 0;
  color: rgba(43, 43, 43, 0.66);
  font-size: 0.84rem;
}

.dispatch-status {
  width: min(100%, 390px);
  margin: 31px auto 0;
  padding: 22px 18px 18px;
  border: 1px solid rgba(184, 155, 94, 0.3);
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 0 0 32px rgba(184, 155, 94, 0.06);
}

.dispatch-status__emblem {
  position: relative;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.dispatch-status__emblem::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(184, 155, 94, 0.35);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(221, 232, 245, 0.6), transparent 68%);
}

.dispatch-status__emblem img {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(2px 4px 4px rgba(43, 43, 43, 0.13));
  animation: dispatchQuill 1.45s ease-in-out infinite;
}

.dispatch-status__orbit {
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-top-color: var(--gold);
  border-right-color: rgba(184, 155, 94, 0.18);
  border-radius: 50%;
  animation: dispatchOrbit 1.8s linear infinite;
}

.dispatch-status__orbit::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(184, 155, 94, 0.65);
}

.dispatch-status__title {
  margin: 0;
  color: #6f5b37;
  font-family: var(--serif-display);
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.dispatch-status__detail {
  min-height: 38px;
  margin: 5px auto 0;
  color: rgba(43, 43, 43, 0.6);
  font-size: 0.7rem;
  line-height: 1.55;
}

.dispatch-status__dots {
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.dispatch-status__dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  animation: dispatchDot 1.05s ease-in-out infinite;
}

.dispatch-status__dots i:nth-child(2) { animation-delay: 140ms; }
.dispatch-status__dots i:nth-child(3) { animation-delay: 280ms; }

.completion__final {
  width: 100%;
}

.signature {
  position: relative;
  width: min(100%, 360px);
  height: 100px;
  margin: 32px auto 2px;
}

.signature__text {
  position: absolute;
  bottom: 26px;
  left: 5px;
  overflow: hidden;
  font-family: var(--serif-display);
  font-size: clamp(2.15rem, 10vw, 3.65rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  clip-path: inset(0 100% 0 0);
}

.signature__line {
  position: absolute;
  right: 12%;
  bottom: 20px;
  left: 12%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
}

.signature__feather {
  position: absolute;
  z-index: 2;
  left: 5%;
  bottom: 6px;
  width: 82px;
  height: 82px;
  object-fit: contain;
  transform: rotate(18deg);
  filter: drop-shadow(2px 4px 4px rgba(43, 43, 43, 0.14));
}

.final-seal {
  width: 88px;
  height: 88px;
  margin: -2px auto 12px;
  opacity: 0;
  filter: drop-shadow(0 8px 8px rgba(70, 20, 30, 0.22));
  transform: scale(1.7) rotate(-18deg);
}

.received-stamp {
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 6px 14px 4px;
  border: 2px solid rgba(111, 36, 53, 0.76);
  color: rgba(111, 36, 53, 0.82);
  font-family: var(--serif-display);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
  opacity: 0;
  transform: rotate(-7deg) scale(1.7);
}

.practical-info {
  position: relative;
  width: min(100%, 500px);
  margin: 34px auto 4px;
  padding: 27px 20px 21px;
  overflow: hidden;
  border: 1px solid rgba(184, 155, 94, 0.58);
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(238, 245, 251, 0.94), rgba(247, 244, 238, 0.92)),
    url("assets/paper2.jpg") center / cover;
  box-shadow:
    0 12px 32px rgba(65, 63, 83, 0.11),
    inset 0 0 34px rgba(184, 174, 220, 0.1);
  text-align: left;
  opacity: 0;
  transform: translateY(14px);
}

.practical-info::before,
.practical-info::after {
  content: "";
  position: absolute;
  width: 48px;
  height: 48px;
  border-color: rgba(184, 155, 94, 0.52);
  pointer-events: none;
}

.practical-info::before {
  top: 7px;
  left: 7px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.practical-info::after {
  right: 7px;
  bottom: 7px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.practical-info__eyebrow {
  margin: 0 0 3px;
  color: #826a3f;
  font-family: var(--serif-display);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-align: center;
  text-transform: uppercase;
}

.practical-info h3 {
  margin: 0 0 18px;
  font-family: var(--serif-display);
  font-size: clamp(1.85rem, 8vw, 2.75rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.025em;
  text-align: center;
}

.practical-info__item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 15px 0;
  border-top: 1px solid rgba(184, 155, 94, 0.27);
}

.practical-info__number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-top: 1px;
  border: 1px solid rgba(184, 155, 94, 0.72);
  border-radius: 50%;
  color: #79643d;
  font-family: var(--serif-display);
  font-size: 0.78rem;
  font-weight: 600;
}

.practical-info h4 {
  margin: 0 0 3px;
  font-family: var(--serif-display);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.15;
}

.practical-info__item p {
  margin: 0;
  color: rgba(43, 43, 43, 0.68);
  font-size: 0.72rem;
  line-height: 1.55;
}

.practical-info__reminder {
  margin: 8px 8px 0;
  color: #6c5a3a;
  font-family: var(--serif-display);
  font-size: 0.89rem;
  font-style: italic;
  line-height: 1.4;
  text-align: center;
}

.submission-error {
  margin: 28px auto 0;
  padding: 16px;
  border: 1px solid rgba(111, 36, 53, 0.3);
  background: rgba(111, 36, 53, 0.05);
}

.submission-error p {
  margin: 0 0 12px;
  color: #6f2435;
  font-size: 0.76rem;
}

.experience__footer {
  width: min(100%, 820px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 13px auto 0;
  color: rgba(43, 43, 43, 0.42);
  font-family: var(--serif-display);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes envelopeFloat {
  0%, 100% { transform: translateY(0) rotate(-0.25deg); }
  50% { transform: translateY(-7px) rotate(0.25deg); }
}

@keyframes breathe {
  from { transform: translate3d(-2%, -2%, 0) scale(0.96); }
  to { transform: translate3d(3%, 2%, 0) scale(1.04); }
}

@keyframes musicPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

@keyframes dispatchOrbit {
  to { transform: rotate(360deg); }
}

@keyframes dispatchQuill {
  0%, 100% { transform: translate3d(-2px, 2px, 0) rotate(8deg); }
  50% { transform: translate3d(3px, -3px, 0) rotate(15deg); }
}

@keyframes dispatchDot {
  0%, 100% { opacity: 0.28; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

@media (min-width: 520px) {
  .experience { padding-inline: 22px; }

  .experience__header .sound-toggle__label { display: inline; }

  .edition-mark__text { max-width: none; }

  .ink-progress {
    right: max(10px, calc((100vw - 900px) / 2));
    width: 48px;
  }

  .ink-progress__feather { width: 34px; height: 108px; }

  .ink-progress__count { top: 55px; }

  .letter { min-height: calc(100dvh - 137px); }

  .question-card__actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-card__actions--single {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 419px) {
  .edition-mark__text { display: none; }
}

@media (min-width: 860px) {
  .experience { padding-top: max(22px, env(safe-area-inset-top)); }

  .experience__header { margin-bottom: 15px; }

  .letter {
    min-height: 720px;
    padding-block: 66px;
  }

  .letter:hover {
    box-shadow:
      0 25px 75px rgba(55, 46, 58, 0.19),
      0 2px 8px rgba(55, 46, 58, 0.1),
      inset 0 0 80px rgba(151, 128, 78, 0.08);
  }
}

@media (max-height: 700px) and (max-width: 519px) {
  .prologue__title { font-size: 2.55rem; }
  .prologue__sound-note { margin-top: 13px; padding-block: 6px; }
  .envelope { width: min(72vw, 320px); margin-top: 24px; }
  .prologue__instruction { margin-top: 16px; }
  .prologue__note { display: none; }

  .letter {
    min-height: calc(100dvh - 116px);
    padding-top: 32px;
    padding-bottom: 32px;
  }

  .ornament { margin-bottom: 24px; }
  .writing-line { min-height: 96px; }
  .letter-intro__copy p { margin-bottom: 0.75em; }
  .letter-intro__signature { display: none; }
  .rsvp { min-height: 430px; }
  .question-stage { min-height: 370px; padding-top: 8px; }
  .question-card__number { margin-bottom: 13px; }
  .question-card__field { margin-top: 22px; }
  .question-card__actions { margin-top: 21px; }
}

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