:root {
  --pink-50: #fff9fc;
  --pink-100: #ffe9f2;
  --pink-200: #ffd2e3;
  --pink-300: #f7adcc;
  --rose: #c83e72;
  --rose-dark: #7d2349;
  --wine: #4f1937;
  --gold: #d7ad5d;
  --gold-dark: #9c6c22;
  --gold-soft: #fff0bd;
  --cream: #fffaf0;
  --white-glass: rgba(255, 255, 255, .66);
  --shadow: 0 26px 70px rgba(101, 28, 65, .18);
  --shadow-small: 0 14px 34px rgba(101, 28, 65, .13);
  --font-script: 'Great Vibes', cursive;
  --font-title: 'Cinzel', Georgia, serif;
  --font-body: 'Cormorant Garamond', Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  background: var(--pink-100);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--rose-dark);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, .98) 0 5%, transparent 32%),
    radial-gradient(circle at 10% 18%, rgba(255, 255, 255, .84), transparent 24%),
    radial-gradient(circle at 88% 34%, rgba(255, 243, 248, .74), transparent 26%),
    linear-gradient(180deg, #ffe9f2 0%, #f8c4da 54%, #f3a9c9 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked,
body.celebration-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

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

.ambient {
  z-index: 0;
}

.particles {
  z-index: 2;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: .6;
  animation: drift 12s ease-in-out infinite;
}

.orb--one {
  top: 4vh;
  left: -14vw;
  width: min(520px, 48vw);
  aspect-ratio: 1;
  background: radial-gradient(circle, #fff, rgba(255, 255, 255, 0) 68%);
}

.orb--two {
  top: 42vh;
  right: -18vw;
  width: min(600px, 54vw);
  aspect-ratio: 1;
  background: radial-gradient(circle, #ffe4f0, rgba(255, 255, 255, 0) 70%);
  animation-delay: -4s;
}

.orb--three {
  bottom: -20vh;
  left: 28vw;
  width: min(480px, 44vw);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255, 240, 189, .72), rgba(255, 255, 255, 0) 70%);
  animation-delay: -7s;
}

.page-frame {
  position: fixed;
  inset: 12px;
  z-index: 20;
  border: 1px solid rgba(215, 173, 93, .52);
  border-radius: 26px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .36);
  pointer-events: none;
}

.site {
  position: relative;
  z-index: 3;
}

.container {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.section {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(82px, 12vh, 132px) max(24px, env(safe-area-inset-left));
}

.eyebrow {
  margin: 0;
  color: var(--gold-dark);
  font-family: var(--font-title);
  font-size: clamp(.68rem, 1.5vw, .82rem);
  font-weight: 800;
  letter-spacing: .32em;
  line-height: 1.6;
  text-align: center;
  text-transform: uppercase;
}

.eyebrow--left {
  text-align: left;
}

.eyebrow--light {
  color: var(--gold-soft);
}

.script-heading {
  margin: 0;
  color: var(--rose);
  font-family: var(--font-script);
  font-size: clamp(5rem, 12vw, 9.2rem);
  font-weight: 400;
  line-height: .9;
  text-shadow: 0 10px 34px rgba(173, 48, 99, .16);
}

.script-heading--section {
  font-size: clamp(3.8rem, 9vw, 7rem);
  line-height: 1;
}

.script-heading--light {
  color: var(--pink-50);
  text-shadow: 0 10px 28px rgba(0, 0, 0, .2);
}

.lead,
.section-copy {
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-weight: 600;
  line-height: 1.55;
  text-wrap: pretty;
}

.section-copy {
  margin: 18px 0 0;
  color: #71314d;
}

.section-copy--center {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.section-copy--light {
  color: var(--pink-100);
}

.button {
  --button-x: 50%;
  --button-y: 50%;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 15px 25px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: normal;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), box-shadow .28s ease, filter .28s ease;
}

.button::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: -1;
  background: linear-gradient(105deg, transparent 28%, rgba(255, 255, 255, .7) 46%, transparent 64%);
  transform: translateX(-120%) skewX(-14deg);
  transition: transform .7s ease;
}

.button::after {
  content: "";
  position: absolute;
  left: var(--button-x);
  top: var(--button-y);
  z-index: -1;
  width: 0;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, .24);
  transform: translate(-50%, -50%);
  transition: width .45s ease;
}

.button__label {
  position: relative;
  z-index: 1;
}

.button:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.button:hover::before {
  transform: translateX(120%) skewX(-14deg);
}

.button:active::after {
  width: 150%;
}

.button:active {
  transform: translateY(0) scale(.98);
}

.button:focus-visible,
.gift:focus-visible,
.music-toggle:focus-visible,
.scratch-card__reveal:focus-visible,
.promise-celebration__close:focus-visible,
.storybook-character:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.button--gold {
  color: #642241;
  background: linear-gradient(135deg, #fff8d7, #f0cd7c 52%, #c38f34);
  box-shadow: 0 17px 38px rgba(88, 24, 57, .2), inset 0 1px 0 rgba(255, 255, 255, .85);
}

.button--portal {
  min-width: min(290px, 100%);
  letter-spacing: .15em;
  box-shadow: 0 18px 42px rgba(87, 24, 57, .24), inset 0 1px 0 rgba(255, 255, 255, .88);
}

.button--portal:hover {
  box-shadow: 0 24px 52px rgba(87, 24, 57, .3), inset 0 1px 0 rgba(255, 255, 255, .9);
}

.button--rose {
  color: #fff;
  background: linear-gradient(135deg, #9e315e, #d85f91);
  box-shadow: 0 16px 34px rgba(126, 35, 74, .25);
}

.button--soft {
  color: var(--rose-dark);
  border: 1px solid rgba(215, 173, 93, .55);
  background: rgba(255, 255, 255, .66);
  box-shadow: var(--shadow-small);
}

.button--promise {
  width: min(330px, 100%);
  margin-top: 22px;
  color: #6e3153;
  background: linear-gradient(135deg, #d8efff, #e3d4f7 47%, #ffd2e4);
  box-shadow:
    0 16px 34px rgba(89, 45, 91, .16),
    inset 0 1px 0 rgba(255, 255, 255, .88);
}

.button--promise:hover {
  box-shadow:
    0 22px 42px rgba(89, 45, 91, .22),
    inset 0 1px 0 rgba(255, 255, 255, .92);
}

.music-toggle {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid rgba(215, 173, 93, .58);
  border-radius: 999px;
  color: var(--rose-dark);
  background: rgba(255, 255, 255, .76);
  box-shadow: var(--shadow-small);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-family: var(--font-title);
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

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

.music-toggle__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  box-shadow: 0 0 14px rgba(215, 173, 93, .85);
}

.music-toggle.is-muted .music-toggle__dot {
  background: rgba(125, 35, 73, .25);
  box-shadow: none;
}

.portal {
  position: fixed;
  inset: 0;
  z-index: 100;
  /* Flex + margin auto en la tarjeta: se centra cuando cabe y se puede
     desplazar (sin recortarse) en pantallas de poca altura. */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 26px;
  background:
    radial-gradient(circle at 50% 16%, rgba(255, 255, 255, .68) 0 5%, rgba(255, 255, 255, .18) 23%, transparent 48%),
    linear-gradient(150deg, #ffe8f2 0%, #f4a7c9 48%, #cb5c90 100%);
  transition: opacity .8s ease, transform .8s ease;
}

/* Disolución suave + zoom: la portada se aleja y se desvanece. */
.portal.is-opening {
  pointer-events: none;
  /* Durante el zoom de salida no queremos que aparezca la barra de scroll. */
  overflow: hidden;
  animation: portal-dissolve 1.05s cubic-bezier(.4, 0, .2, 1) forwards;
}

.portal.is-opening .portal__card {
  animation: portal-card-dissolve 1s cubic-bezier(.4, 0, .2, 1) forwards;
}

/* La invitación aparece suavemente por detrás mientras la portada se disuelve. */
.site.is-entering {
  animation: site-enter 1.1s cubic-bezier(.2, .7, .2, 1) both;
}

.portal__card {
  z-index: 1;
  position: relative;
  width: min(620px, 100%);
  min-width: 0;
  margin: auto;
  overflow: hidden;
  padding: clamp(34px, 7vw, 58px) clamp(22px, 6vw, 46px);
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 34px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .29), rgba(255, 255, 255, .09));
  box-shadow: 0 36px 100px rgba(91, 21, 57, .27);
  backdrop-filter: blur(9px);
}

.portal__card::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(255, 240, 189, .48);
  border-radius: 24px;
  pointer-events: none;
}

.portal .eyebrow {
  margin-bottom: 12px;
  color: #8a5715;
  text-shadow: 0 1px 5px rgba(255, 255, 255, .55);
}

.portal__world {
  margin: 0;
  color: #fffafd;
  font-family: var(--font-script);
  font-size: clamp(4.1rem, 13vw, 7.2rem);
  font-weight: 400;
  line-height: .92;
  text-shadow: 0 2px 9px rgba(91, 21, 57, .55), 0 10px 34px rgba(91, 21, 57, .42);
}

.portal h1 {
  margin: -18px 0 -12px;
  padding: .22em 0 .32em;
  color: #ffd95e;
  background: linear-gradient(177deg, #fff6d4 0%, #ffe08f 38%, #f7c24f 68%, #dc9a2c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-script);
  font-size: clamp(5.7rem, 17vw, 9.6rem);
  font-weight: 400;
  line-height: .88;
  filter:
    drop-shadow(0 2px 4px rgba(120, 70, 10, .35))
    drop-shadow(0 10px 26px rgba(91, 21, 57, .45));
}

.portal__copy {
  max-width: 390px;
  margin: 0 auto 26px;
  color: #fff8fb;
  font-size: clamp(1.08rem, 3vw, 1.3rem);
  font-weight: 600;
  line-height: 1.42;
  text-shadow: 0 1px 8px rgba(91, 21, 57, .4);
}

.portal__form {
  display: grid;
  justify-items: center;
  width: min(390px, 100%);
  margin: 0 auto;
}

.portal__form label {
  margin-bottom: 9px;
  color: rgba(255, 255, 255, .9);
  font-size: clamp(.96rem, 2.6vw, 1.08rem);
  font-weight: 600;
}

.portal__input-wrap {
  position: relative;
  width: min(330px, 100%);
  margin-bottom: 14px;
}

.portal__input-wrap::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(255, 255, 255, .9), rgba(218, 197, 244, .8), rgba(255, 211, 229, .86));
  pointer-events: none;
}

.portal__input-wrap input {
  position: relative;
  width: 100%;
  min-height: 49px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  color: var(--rose-dark);
  text-align: center;
  background: rgba(255, 250, 253, .9);
  box-shadow: inset 0 5px 18px rgba(123, 50, 86, .07);
  font-family: var(--font-body);
  font-size: 1.12rem;
  font-weight: 700;
}

.portal__input-wrap input::placeholder {
  color: rgba(125, 35, 73, .48);
}

.portal__input-wrap input:focus {
  box-shadow:
    inset 0 5px 18px rgba(123, 50, 86, .06),
    0 0 0 4px rgba(255, 255, 255, .22);
}

.portal__input-wrap input[aria-invalid="true"] {
  background: #fff3f7;
  box-shadow: 0 0 0 3px rgba(170, 48, 93, .2);
}

.portal__error {
  margin: -4px 0 12px;
  color: #fff;
  font-size: .86rem;
  font-weight: 700;
}

.portal__error[hidden] {
  display: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) minmax(360px, 1.1fr);
  align-items: center;
  gap: clamp(42px, 7vw, 88px);
}

.portrait-stage {
  --aurora-x: 0px;
  --aurora-y: 0px;
  --aurora-hue: 0deg;
  position: relative;
  min-height: 650px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.portrait-aurora {
  position: absolute;
  z-index: -1;
  width: min(500px, 96vw);
  height: min(610px, 130vw);
  border-radius: 48% 52% 44% 56% / 42% 46% 54% 58%;
  background:
    radial-gradient(circle at calc(32% + var(--aurora-x)) calc(24% + var(--aurora-y)), rgba(255, 240, 183, .96), transparent 34%),
    radial-gradient(circle at calc(72% - var(--aurora-x)) calc(34% - var(--aurora-y)), rgba(201, 221, 255, .94), transparent 38%),
    radial-gradient(circle at calc(42% - var(--aurora-x)) calc(78% + var(--aurora-y)), rgba(225, 198, 255, .92), transparent 40%),
    radial-gradient(circle at calc(76% + var(--aurora-x)) calc(76% - var(--aurora-y)), rgba(255, 187, 218, .9), transparent 38%),
    linear-gradient(145deg, #ffddea, #fff0c9 42%, #dcd8ff 72%, #cfeeff);
  opacity: .86;
  filter: blur(17px) hue-rotate(var(--aurora-hue));
  transform: translate3d(var(--aurora-x), var(--aurora-y), 0) scale(1.02);
  transition: filter .8s ease, transform .22s ease-out, border-radius 1.2s ease;
  animation: aurora-morph 9s ease-in-out infinite alternate;
}

.portrait-stage.is-magic .portrait-aurora {
  border-radius: 58% 42% 55% 45% / 48% 60% 40% 52%;
  filter: blur(15px) hue-rotate(var(--aurora-hue)) saturate(1.16);
}

.portrait-crown {
  position: absolute;
  top: 1%;
  left: 50%;
  z-index: 7;
  width: 142px;
  pointer-events: none;
  filter: drop-shadow(0 11px 14px rgba(108, 47, 73, .22));
  transform: translate(-50%, -55%) rotate(-2deg);
  transform-origin: center bottom;
  animation: crown-float 4.8s ease-in-out infinite;
}

.portrait {
  position: relative;
  z-index: 2;
  width: min(390px, 82vw);
  height: min(590px, 123vw);
  margin: 0;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, .84);
  border-radius: 46% 46% 36% 36% / 34% 34% 42% 42%;
  background: var(--pink-50);
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 56%, rgba(229, 99, 151, .18));
  pointer-events: none;
}

.storybook-character {
  position: absolute;
  z-index: 6;
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 14px 15px rgba(111, 28, 67, .2));
  transition: filter .25s ease, transform .25s ease;
  animation: character-float 5s ease-in-out infinite;
}

.storybook-character:hover {
  filter: drop-shadow(0 18px 18px rgba(111, 28, 67, .27));
  transform: translateY(-5px) scale(1.04);
}

.storybook-character svg {
  display: block;
  width: 100%;
  overflow: visible;
  transform-origin: center bottom;
}

.storybook-character.is-playing svg {
  animation: character-dance .85s cubic-bezier(.2, .8, .25, 1);
}

.storybook-character--bunny {
  left: 0;
  bottom: 1%;
  width: 126px;
  animation-delay: -1.4s;
}

.storybook-character--bear-one {
  right: -1%;
  bottom: 1%;
  width: 112px;
  animation-delay: -2.7s;
}

.storybook-character--bear-two {
  right: -6%;
  top: 27%;
  width: 94px;
  animation-delay: -.5s;
}

.portrait-spark {
  position: absolute;
  color: var(--gold-soft);
  text-shadow: 0 0 16px rgba(215, 173, 93, .8);
  animation: twinkle 2.2s ease-in-out infinite;
}

.portrait-spark--one {
  top: 13%;
  left: 3%;
  font-size: 2.2rem;
}

.portrait-spark--two {
  top: 25%;
  right: 1%;
  font-size: 3rem;
  animation-delay: -1s;
}

.hero__copy {
  text-align: center;
}

.hero__copy > .script-heading {
  font-size: clamp(6.5rem, 15vw, 10.5rem);
  line-height: .82;
}

.hero__eyebrow {
  margin-bottom: clamp(24px, 4vw, 40px);
}

.hero__subtitle {
  margin: 20px 0 0;
  color: var(--rose-dark);
  font-family: var(--font-body);
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-style: italic;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.2;
}

.age-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 18px 0;
}

.age-lockup strong {
  color: transparent;
  background: linear-gradient(135deg, #fff3bd, #d7ad5d 42%, #95651f 62%, #fff3bd);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 10px 24px rgba(144, 92, 20, .23));
  font-family: var(--font-title);
  font-size: clamp(7.5rem, 20vw, 12rem);
  font-weight: 800;
  line-height: .78;
  animation: shimmer 5s linear infinite;
}

.age-lockup span {
  color: var(--rose);
  font-family: var(--font-script);
  font-size: clamp(3rem, 7vw, 4.8rem);
  line-height: .85;
}

.hero .lead {
  max-width: 640px;
  margin: 0 auto 26px;
}

.event-date {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  margin: 4px 0 0;
  padding: 8px 22px 8px 10px;
  color: var(--rose-dark);
}

.event-date::before,
.event-date::after {
  content: "";
  position: absolute;
  left: 50%;
  width: calc(100% + 34px);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215, 173, 93, .72) 22%, rgba(215, 173, 93, .72) 78%, transparent);
  transform: translateX(-50%);
}

.event-date::before {
  top: -7px;
}

.event-date::after {
  bottom: -7px;
}

.event-date__day {
  min-width: 58px;
  color: var(--gold-dark);
  font-family: var(--font-title);
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
}

.event-date__details {
  position: relative;
  display: grid;
  gap: 2px;
  padding-left: 18px;
  text-align: left;
}

.event-date__details::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 38px;
  background: linear-gradient(transparent, rgba(215, 173, 93, .75), transparent);
  transform: translateY(-50%);
}

.event-date__details strong {
  color: var(--rose-dark);
  font-family: var(--font-title);
  font-size: clamp(.78rem, 1.8vw, .96rem);
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.event-date__details small {
  color: var(--rose);
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.4vw, 1.18rem);
  font-weight: 700;
  letter-spacing: .06em;
}

.scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: fit-content;
  margin: 30px auto 0;
  color: var(--gold-dark);
  font-family: var(--font-title);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-decoration: none;
  text-transform: uppercase;
}

.scroll-hint__arrow {
  width: 18px;
  height: 18px;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg);
  animation: arrow 1.8s ease-in-out infinite;
}

.letter-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .27));
}

.letter-layout {
  display: grid;
  grid-template-columns: minmax(280px, .76fr) minmax(420px, 1.24fr);
  align-items: center;
  gap: clamp(36px, 7vw, 86px);
}

.letter-intro .script-heading {
  margin-top: 12px;
}

.verse-card {
  margin-top: 30px;
  padding: 28px;
  border-radius: 26px;
  color: var(--pink-50);
  background: linear-gradient(155deg, #5b1e45, #8e3a67 72%, #bd6590);
  box-shadow: 0 20px 44px rgba(79, 24, 56, .2);
}

.verse-card blockquote {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.4;
}

.verse-card cite {
  display: block;
  margin-top: 16px;
  color: var(--gold-soft);
  font-family: var(--font-title);
  font-size: .68rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.letter-wrap {
  position: relative;
}

.letter-wrap::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: -1;
  border-radius: 38px;
  background: radial-gradient(circle, rgba(255, 240, 189, .48), transparent 68%);
  filter: blur(8px);
}

.letter {
  position: relative;
  padding: clamp(38px, 6vw, 64px);
  border: 1px solid rgba(215, 173, 93, .52);
  border-radius: 34px;
  color: #68354d;
  background:
    linear-gradient(rgba(255, 250, 240, .95), rgba(255, 247, 235, .94)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(215, 173, 93, .1) 31px 32px);
  box-shadow: var(--shadow);
}

.letter::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(215, 173, 93, .28);
  border-radius: 24px;
  pointer-events: none;
}

.letter p {
  position: relative;
  margin: 0 0 16px;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.7;
}

.letter strong {
  color: var(--rose);
}

.letter__seal {
  position: absolute;
  top: 20px;
  right: 22px;
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff4ca;
  background: linear-gradient(145deg, var(--rose), #85274f);
  box-shadow: 0 8px 18px rgba(101, 28, 65, .2);
  font-family: var(--font-script);
  font-size: 2rem;
}

.letter .letter__lead {
  margin-top: 24px;
  color: var(--rose-dark);
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  font-style: italic;
}

.letter__thanks {
  color: var(--rose-dark);
}

.letter .letter__signature {
  margin: 26px 0 0;
  text-align: right;
}

.letter__signature span {
  display: inline-block;
  margin-top: 4px;
  color: var(--rose);
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 6vw, 4.3rem);
  font-weight: 400;
  line-height: 1;
}

.details {
  position: relative;
  text-align: center;
}

.details .script-heading {
  margin-top: 12px;
}

.details-section {
  overflow: hidden;
}

.details-section::before {
  content: "";
  position: absolute;
  inset: 5% -18%;
  z-index: -1;
  background:
    radial-gradient(circle at 16% 38%, rgba(255, 240, 189, .34), transparent 24%),
    radial-gradient(circle at 84% 56%, rgba(221, 205, 255, .36), transparent 25%),
    radial-gradient(circle at 50% 84%, rgba(255, 218, 234, .5), transparent 31%);
  filter: blur(16px);
  pointer-events: none;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.4vw, 28px);
  margin-top: 52px;
  perspective: 1400px;
}

.detail-card {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --light-x: 50%;
  --light-y: 20%;
  position: relative;
  min-height: 360px;
  border-radius: 34px;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateZ(0);
  transform-style: preserve-3d;
  transition: transform .18s ease-out, filter .35s ease;
  will-change: transform;
}

.detail-card::before {
  content: "";
  position: absolute;
  inset: 12% 10% -7%;
  z-index: -1;
  border-radius: 36px;
  background: rgba(97, 28, 61, .26);
  filter: blur(28px);
  opacity: .42;
  transform: translateZ(-40px);
  transition: opacity .35s ease, transform .35s ease;
}

.detail-card:hover,
.detail-card.is-tilted {
  filter: saturate(1.06);
}

.detail-card:hover::before,
.detail-card.is-tilted::before {
  opacity: .62;
  transform: translateY(8px) translateZ(-46px) scale(.96);
}

.detail-card__surface {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 34px 26px 30px;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: inherit;
  text-align: center;
  background:
    radial-gradient(circle at var(--light-x) var(--light-y), rgba(255, 255, 255, .96), transparent 27%),
    linear-gradient(145deg, rgba(255, 255, 255, .82), rgba(255, 237, 245, .62));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(215, 173, 93, .24),
    0 24px 55px rgba(105, 30, 65, .14);
  backdrop-filter: blur(14px);
  transform: translateZ(18px);
}

.detail-card__surface::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(215, 173, 93, .28);
  border-radius: 25px;
  pointer-events: none;
}

.detail-card__surface::after {
  content: "";
  position: absolute;
  top: -45%;
  left: -70%;
  width: 60%;
  height: 190%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .58), transparent);
  transform: rotate(18deg);
  transition: left .8s ease;
  pointer-events: none;
}

.detail-card:hover .detail-card__surface::after,
.detail-card.is-tilted .detail-card__surface::after {
  left: 125%;
}

.detail-card--date .detail-card__surface {
  background:
    radial-gradient(circle at var(--light-x) var(--light-y), rgba(255, 255, 255, .98), transparent 27%),
    linear-gradient(145deg, rgba(255, 251, 244, .92), rgba(255, 224, 237, .68));
}

.detail-card--time .detail-card__surface {
  background:
    radial-gradient(circle at var(--light-x) var(--light-y), rgba(255, 255, 255, .98), transparent 27%),
    linear-gradient(145deg, rgba(255, 248, 252, .92), rgba(231, 219, 255, .66));
}

.detail-card--home .detail-card__surface {
  background:
    radial-gradient(circle at var(--light-x) var(--light-y), rgba(255, 255, 255, .98), transparent 27%),
    linear-gradient(145deg, rgba(255, 252, 241, .92), rgba(255, 230, 218, .7));
}

.detail-card__number {
  position: absolute;
  top: 24px;
  right: 27px;
  color: rgba(125, 35, 73, .14);
  font-family: var(--font-title);
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -.05em;
  line-height: 1;
  transform: translateZ(30px);
}

.detail-card__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 100px;
  aspect-ratio: 1;
  margin-bottom: 20px;
  border: 1px solid rgba(215, 173, 93, .36);
  border-radius: 31px;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .98), rgba(255, 246, 237, .76) 56%, rgba(239, 199, 218, .46));
  box-shadow:
    inset 0 1px 0 #fff,
    0 15px 32px rgba(102, 31, 63, .14);
  transform: translateZ(45px) rotate(-2deg);
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s ease;
}

.detail-card:hover .detail-card__icon,
.detail-card.is-tilted .detail-card__icon {
  box-shadow:
    inset 0 1px 0 #fff,
    0 22px 38px rgba(102, 31, 63, .19);
  transform: translateZ(62px) translateY(-5px) rotate(3deg) scale(1.04);
}

.detail-card__icon svg {
  width: 72px;
  height: 72px;
  overflow: visible;
  filter: drop-shadow(0 8px 9px rgba(116, 67, 43, .12));
}

.detail-card__kicker {
  margin: 0 0 7px !important;
  color: var(--gold-dark) !important;
  font-family: var(--font-title);
  font-size: .63rem !important;
  font-weight: 800 !important;
  letter-spacing: .24em;
  text-transform: uppercase;
  transform: translateZ(28px);
}

.detail-card h3 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--rose-dark);
  font-family: var(--font-body);
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.08;
  transform: translateZ(35px);
}

.detail-card p {
  position: relative;
  z-index: 1;
  margin: 7px 0 0;
  color: var(--rose);
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 600;
  line-height: 1.35;
  transform: translateZ(30px);
}

.detail-card small {
  position: relative;
  z-index: 1;
  color: #82566a;
  font-size: clamp(.88rem, 1.5vw, 1rem);
  font-weight: 600;
  line-height: 1.3;
  transform: translateZ(26px);
}

.detail-card__line {
  width: 54px;
  height: 1px;
  margin: 18px 0 12px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateZ(32px);
}

.countdown-title {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

.countdown-stage {
  position: relative;
  width: min(930px, 100%);
  margin: 86px auto 0;
  overflow: hidden;
  padding: clamp(42px, 6vw, 64px) clamp(20px, 5vw, 54px) 36px;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 42px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .68), rgba(255, 235, 245, .44)),
    radial-gradient(circle at 50% 0, rgba(255, 240, 189, .34), transparent 45%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 30px 80px rgba(102, 29, 63, .16);
  backdrop-filter: blur(16px);
}

.countdown-stage::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(215, 173, 93, .24);
  border-radius: 31px;
  pointer-events: none;
}

.countdown-stage::after {
  content: "";
  position: absolute;
  top: 0;
  left: 14%;
  right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215, 173, 93, .9), transparent);
}

.countdown-stage__halo {
  position: absolute;
  top: -170px;
  left: 50%;
  width: 430px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 245, 199, .66), rgba(255, 209, 230, .18) 48%, transparent 70%);
  filter: blur(10px);
  transform: translateX(-50%);
  pointer-events: none;
  animation: countdown-halo 5s ease-in-out infinite;
}

.countdown-stage__title {
  position: relative;
  z-index: 1;
  margin: 9px 0 0;
  color: var(--rose);
  font-family: var(--font-script);
  font-size: clamp(2.8rem, 7vw, 4.8rem);
  line-height: 1;
}

.countdown {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2.4vw, 24px);
  margin-top: 35px;
}

.countdown__item {
  --progress: 0deg;
  position: relative;
  display: grid;
  justify-items: center;
  min-width: 0;
}

.countdown__dial {
  position: relative;
  display: grid;
  place-items: center;
  width: min(150px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    linear-gradient(#fff7fb, #fff7fb) padding-box,
    conic-gradient(from -90deg, var(--gold) var(--progress), rgba(215, 173, 93, .16) 0) border-box;
  border: 5px solid transparent;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .9),
    inset 0 11px 28px rgba(255, 255, 255, .82),
    0 18px 34px rgba(104, 30, 64, .13);
}

.countdown__dial::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(200, 62, 114, .13);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, .98), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(255, 229, 240, .62));
}

.countdown__dial::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 9px;
  aspect-ratio: 1;
  border: 3px solid #fff8f0;
  border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 3px 10px rgba(126, 35, 73, .26);
  transform: translateX(-50%);
}

.countdown__item strong {
  position: relative;
  z-index: 1;
  display: block;
  color: transparent;
  background: linear-gradient(145deg, #9b315c, #d75d8e 55%, #a96e26);
  -webkit-background-clip: text;
  background-clip: text;
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 5.2vw, 3.45rem);
  line-height: 1;
  text-shadow: 0 8px 18px rgba(151, 46, 90, .1);
  transition: opacity .18s ease, transform .18s ease;
}

.countdown__item.is-changing strong {
  opacity: .15;
  transform: translateY(-7px) scale(.92);
}

.countdown__item span {
  display: block;
  margin-top: 13px;
  color: var(--gold-dark);
  font-family: var(--font-title);
  font-size: clamp(.55rem, 1.2vw, .67rem);
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.countdown-stage__footer {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 30px auto 0;
  color: #805168;
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-style: italic;
  font-weight: 600;
}

.surprise-section {
  overflow: hidden;
  color: var(--rose-dark);
  background:
    radial-gradient(circle at 18% 18%, rgba(219, 238, 255, .88), transparent 28%),
    radial-gradient(circle at 84% 28%, rgba(226, 211, 250, .84), transparent 30%),
    radial-gradient(circle at 48% 88%, rgba(255, 215, 231, .82), transparent 34%),
    linear-gradient(155deg, #fff5fa 0%, #f7d8e7 48%, #e6dcf5 100%);
}

.surprise-section::before {
  content: "";
  position: absolute;
  inset: -25% -30%;
  background: conic-gradient(from 210deg at 50% 4%, transparent 0deg, rgba(255, 255, 255, .24) 13deg, transparent 28deg, rgba(205, 228, 255, .16) 44deg, transparent 60deg, rgba(255, 211, 231, .2) 82deg, transparent 105deg);
  animation: rays 7s ease-in-out infinite;
  pointer-events: none;
}

.surprise {
  position: relative;
  z-index: 1;
  text-align: center;
}

.surprise .script-heading {
  margin-top: 12px;
}

.gift-stage {
  display: grid;
  justify-items: center;
  width: min(560px, 100%);
  margin: 46px auto 0;
  text-align: center;
}

.gift-frame {
  position: relative;
  display: grid;
  width: 100%;
}

.gift-frame > .gift-panel,
.gift-frame > .scratch-card {
  grid-area: 1 / 1;
}

.gift-panel,
.scratch-card {
  min-height: 470px;
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: 34px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    0 26px 70px rgba(86, 46, 91, .15);
}

/* La caja se aparta cuando se abre, dejando salir la tarjeta. */
.gift-panel {
  transition: opacity .5s ease, transform .6s cubic-bezier(.4, 0, .2, 1), visibility .6s;
}

.gift-stage.is-open .gift-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(.9) translateY(-12px);
  transition-delay: .45s;
}

/* La tarjeta de raspar permanece oculta dentro de la caja hasta abrirla. */
.scratch-card {
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  transform: translateY(22px);
  pointer-events: none;
  transition: opacity .55s ease .4s, transform .55s cubic-bezier(.2, .8, .25, 1) .4s, visibility .55s .4s;
}

.gift-stage.is-open .scratch-card {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.gift-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 255, 255, .92), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, .68), rgba(232, 218, 248, .54));
  backdrop-filter: blur(12px);
}

.gift-panel::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(200, 160, 207, .24);
  border-radius: 25px;
  pointer-events: none;
}

.gift-panel::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 20px;
  width: 72%;
  height: 34px;
  border-radius: 50%;
  background: rgba(120, 61, 98, .16);
  filter: blur(19px);
  transform: translateX(-50%);
  pointer-events: none;
}

.gift {
  display: grid;
  justify-items: center;
  width: min(330px, 100%);
  padding: 0;
  border: 0;
  color: var(--pink-50);
  background: none;
  cursor: pointer;
}

.gift__svg {
  width: min(290px, 86%);
  overflow: visible;
  filter: drop-shadow(0 19px 22px rgba(96, 47, 89, .18));
  transition: transform .3s ease;
}

.gift:hover .gift__svg {
  transform: translateY(-5px);
}

.gift__lid {
  transform-origin: 210px 126px;
  transition: transform .75s cubic-bezier(.2, .9, .25, 1.35);
}

.gift.is-open .gift__lid {
  transform: translateY(-68px) rotate(-9deg);
}

.gift.is-open .gift__svg {
  animation: gift-pop .7s ease;
}

.gift__action {
  position: relative;
  z-index: 1;
  margin-top: 1px;
  padding: 11px 19px;
  border: 1px solid rgba(183, 155, 220, .48);
  border-radius: 999px;
  color: #744064;
  background: rgba(255, 255, 255, .58);
  box-shadow: 0 9px 24px rgba(89, 45, 91, .1);
  font-family: var(--font-title);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.gift-status {
  position: relative;
  z-index: 1;
  margin: 14px 0 0;
  color: #865670;
  font-size: 1.05rem;
  font-style: italic;
}

.scratch-card {
  position: relative;
  overflow: hidden;
  color: var(--rose-dark);
  background:
    radial-gradient(circle at 18% 16%, rgba(220, 242, 255, .74), transparent 30%),
    radial-gradient(circle at 84% 82%, rgba(255, 210, 228, .72), transparent 33%),
    linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(240, 231, 250, .9));
}

.scratch-card__message {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: clamp(30px, 5vw, 48px);
  text-align: center;
}

.promise-card__greeting {
  margin: 0 0 15px !important;
  color: #8b5574 !important;
  font-family: var(--font-title);
  font-size: clamp(.66rem, 1.4vw, .78rem) !important;
  font-weight: 800 !important;
  letter-spacing: .19em;
  line-height: 1.45 !important;
  text-transform: uppercase;
}

.promise-card__verse {
  max-width: 470px;
  margin: 0;
  color: var(--rose);
  font-family: var(--font-body);
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  font-style: italic;
  font-weight: 700;
  line-height: 1.22;
  text-wrap: balance;
}

.promise-card__reference {
  display: block;
  margin-top: 12px;
  color: #8b5574;
  font-family: var(--font-title);
  font-size: .66rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.promise-card__message {
  max-width: 450px !important;
  margin: 22px 0 0 !important;
  color: #6f485d !important;
  font-size: clamp(1.02rem, 2vw, 1.18rem) !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
}

#scratchCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
  transition: opacity .5s ease;
}

.scratch-card.is-revealed #scratchCanvas {
  opacity: 0;
  pointer-events: none;
}

.scratch-card__reveal {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  padding: 9px 13px;
  border: 1px solid rgba(155, 119, 184, .26);
  border-radius: 999px;
  color: var(--rose-dark);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 8px 20px rgba(92, 25, 58, .14);
  cursor: pointer;
  font-family: var(--font-title);
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.final-section {
  min-height: 86svh;
}

.final {
  text-align: center;
}

.final .script-heading {
  margin-top: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.gift-note {
  max-width: 440px;
  margin: 26px auto 0;
  color: #8a5574;
  font-size: clamp(.98rem, 2.4vw, 1.1rem);
  font-style: italic;
  font-weight: 600;
  line-height: 1.5;
}

.final__message {
  margin: 40px auto 0;
  color: var(--rose-dark);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  font-weight: 600;
}

.final__signature {
  margin: 2px 0 22px;
  color: var(--rose);
  font-family: var(--font-script);
  font-size: clamp(4.5rem, 12vw, 7.5rem);
  line-height: 1;
}

.promise-celebration {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 26px;
  opacity: 0;
  visibility: hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(199, 232, 255, .8), transparent 30%),
    radial-gradient(circle at 80% 28%, rgba(221, 204, 249, .78), transparent 34%),
    radial-gradient(circle at 50% 86%, rgba(255, 205, 226, .84), transparent 36%),
    rgba(255, 246, 251, .94);
  backdrop-filter: blur(16px);
  transition: opacity .45s ease, visibility .45s;
}

.promise-celebration[hidden] {
  display: none;
}

.promise-celebration.is-visible {
  visibility: visible;
  opacity: 1;
}

.promise-celebration__aurora {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 32% 34%, rgba(184, 225, 250, .86), transparent 25%),
    radial-gradient(circle at 68% 36%, rgba(220, 195, 249, .88), transparent 27%),
    radial-gradient(circle at 50% 68%, rgba(255, 183, 214, .78), transparent 32%);
  filter: blur(28px) saturate(1.06);
  animation: promise-aurora 3.2s ease-in-out infinite alternate;
}

.promise-celebration__particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.promise-celebration__message {
  position: relative;
  z-index: 2;
  width: min(650px, 100%);
  padding: clamp(34px, 7vw, 62px) clamp(24px, 6vw, 50px);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 40px;
  color: var(--rose-dark);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, .96), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, .78), rgba(243, 225, 248, .66));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .96),
    0 30px 90px rgba(89, 45, 91, .18);
  backdrop-filter: blur(14px);
  transform: translateY(18px) scale(.94);
  transition: transform .65s cubic-bezier(.2, .85, .2, 1);
}

.promise-celebration.is-visible .promise-celebration__message {
  transform: none;
}

.promise-celebration__message p {
  margin: 0 0 12px;
  color: #8d5a78;
  font-family: var(--font-title);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.promise-celebration__message strong {
  display: block;
  color: var(--rose);
  font-family: var(--font-script);
  font-size: clamp(3.8rem, 11vw, 7rem);
  font-weight: 400;
  line-height: .92;
  text-wrap: balance;
}

.promise-celebration__message span {
  display: block;
  margin-top: 20px;
  color: #755069;
  font-size: clamp(1.15rem, 2.7vw, 1.5rem);
  font-style: italic;
  font-weight: 600;
}

.promise-celebration__close {
  position: absolute;
  left: 50%;
  bottom: max(26px, env(safe-area-inset-bottom));
  z-index: 3;
  padding: 10px 22px;
  border: 1px solid rgba(151, 112, 178, .32);
  border-radius: 999px;
  color: #704260;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 12px 30px rgba(89, 45, 91, .12);
  cursor: pointer;
  font-family: var(--font-title);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.promise-particle {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  animation: promise-rise var(--duration) cubic-bezier(.18, .7, .18, 1) var(--delay) forwards;
}

.promise-particle--heart,
.pastel-burst--heart {
  width: 18px;
  height: 16px;
  background: #f6a8c8;
  border-radius: 12px 12px 4px 4px;
  transform: rotate(45deg);
}

.promise-particle--heart::before,
.pastel-burst--heart::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0;
  width: 18px;
  height: 16px;
  border-radius: 12px 12px 4px 4px;
  background: inherit;
}

.promise-particle--butterfly,
.pastel-burst--butterfly {
  width: 24px;
  height: 18px;
}

.promise-particle--butterfly::before,
.promise-particle--butterfly::after,
.pastel-burst--butterfly::before,
.pastel-burst--butterfly::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 14px;
  height: 17px;
  border-radius: 80% 20% 70% 30%;
  background: linear-gradient(145deg, #c6e8fb, #d9c4f4);
  transform-origin: right center;
  animation: butterfly-wing .34s ease-in-out infinite alternate;
}

.promise-particle--butterfly::before,
.pastel-burst--butterfly::before {
  left: 0;
}

.promise-particle--butterfly::after,
.pastel-burst--butterfly::after {
  right: 0;
  background: linear-gradient(145deg, #ffd0e2, #e4d3f7);
  transform: scaleX(-1);
  transform-origin: left center;
}

.promise-particle--petal {
  width: 13px;
  height: 21px;
  border-radius: 0 100% 0 100%;
  background: linear-gradient(145deg, #fff, #f3b5cf);
}

.promise-particle--glow,
.pastel-burst--glow {
  width: 9px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 18px 6px rgba(196, 226, 248, .86);
}

.pastel-burst {
  position: fixed;
  z-index: 145;
  pointer-events: none;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .85s ease, transform .95s cubic-bezier(.18, .72, .18, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal[data-reveal="scale"] {
  transform: translateY(18px) scale(.96);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.particle {
  position: absolute;
  pointer-events: none;
  will-change: transform, opacity;
}

.particle--spark {
  width: var(--size, 4px);
  height: var(--size, 4px);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px 3px rgba(255, 241, 190, .78);
  animation: twinkle var(--duration, 2.5s) ease-in-out var(--delay, 0s) infinite;
}

.particle--petal {
  top: -28px;
  width: var(--size, 14px);
  height: calc(var(--size, 14px) * 1.4);
  border-radius: 0 100% 0 100%;
  background: radial-gradient(circle at 30% 25%, #fff7fa, #f4a5c4 60%, #df6d9b);
  opacity: .78;
  animation: fall var(--duration, 11s) linear var(--delay, 0s) infinite;
}

.burst-heart {
  position: fixed;
  z-index: 140;
  color: var(--color, #f6a7c8);
  pointer-events: none;
  text-shadow: 0 4px 14px rgba(53, 11, 37, .25);
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -24px, 0) scale(1.03); }
}

@keyframes portal-dissolve {
  0% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.08); filter: blur(7px); }
}

@keyframes portal-card-dissolve {
  0% { opacity: 1; transform: scale(1); filter: blur(0); }
  55% { opacity: .5; }
  100% { opacity: 0; transform: scale(1.14); filter: blur(6px); }
}

@keyframes site-enter {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes countdown-halo {
  0%, 100% { opacity: .58; transform: translateX(-50%) scale(.94); }
  50% { opacity: .9; transform: translateX(-50%) scale(1.07); }
}

@keyframes promise-aurora {
  0% { transform: translate3d(-2%, -1%, 0) scale(.96) rotate(-2deg); }
  100% { transform: translate3d(2%, 1%, 0) scale(1.08) rotate(2deg); }
}

@keyframes promise-rise {
  0% { opacity: 0; transform: translate3d(0, 30px, 0) scale(.3) rotate(0deg); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--x-drift), -115vh, 0) scale(var(--scale)) rotate(420deg); }
}

@keyframes butterfly-wing {
  from { transform: rotateY(15deg); }
  to { transform: rotateY(72deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes aurora-morph {
  0% {
    border-radius: 48% 52% 44% 56% / 42% 46% 54% 58%;
    opacity: .78;
  }
  50% {
    border-radius: 57% 43% 53% 47% / 51% 58% 42% 49%;
    opacity: .94;
  }
  100% {
    border-radius: 43% 57% 48% 52% / 58% 44% 56% 42%;
    opacity: .84;
  }
}

@keyframes crown-float {
  0%, 100% { transform: translate(-50%, -55%) rotate(-2deg); }
  50% { transform: translate(-50%, -64%) rotate(2deg); }
}

@keyframes character-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

@keyframes character-dance {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  22% { transform: translateY(-18px) rotate(-8deg) scale(1.05); }
  48% { transform: translateY(-5px) rotate(7deg) scale(.98); }
  72% { transform: translateY(-14px) rotate(-4deg) scale(1.04); }
}

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

@keyframes shimmer {
  to { background-position: 220% center; }
}

@keyframes twinkle {
  0%, 100% { opacity: .22; transform: scale(.6); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes arrow {
  0%, 100% { opacity: .5; transform: rotate(45deg) translate(0, 0); }
  50% { opacity: 1; transform: rotate(45deg) translate(4px, 4px); }
}

@keyframes rays {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}

@keyframes gift-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.08, .93); }
  70% { transform: scale(.98, 1.03); }
  100% { transform: scale(1); }
}

@keyframes fall {
  0% { opacity: 0; transform: translate3d(0, -12vh, 0) rotate(0deg); }
  10%, 86% { opacity: .78; }
  100% { opacity: 0; transform: translate3d(var(--drift, 60px), 115vh, 0) rotate(var(--rotation, 540deg)); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(.94); }
}

@media (max-width: 900px) {
  .hero__grid,
  .letter-layout {
    grid-template-columns: 1fr;
  }

  .hero__copy {
    order: 1;
  }

  .portrait-stage {
    order: 2;
    min-height: 610px;
  }

  .letter-intro,
  .eyebrow--left {
    text-align: center;
  }

  .letter-intro .section-copy {
    max-width: 620px;
    margin-inline: auto;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    width: min(620px, 100%);
    margin-inline: auto;
  }

  .detail-card {
    min-height: 340px;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(480px, 100%);
    margin-inline: auto;
    margin-top: 34px;
  }

  .gift-stage {
    width: min(560px, 100%);
  }

  .gift-panel,
  .scratch-card {
    min-height: 520px;
  }
}

@media (max-width: 560px) {
  .page-frame {
    inset: 8px;
    border-radius: 20px;
  }

  .section {
    min-height: auto;
    padding-top: 88px;
    padding-bottom: 88px;
  }

  .hero {
    min-height: 100svh;
  }

  .portrait-stage {
    min-height: 570px;
  }

  .portrait {
    height: min(560px, 132vw);
  }

  .portrait-crown {
    top: 2%;
    width: 116px;
  }

  .portrait-aurora {
    width: min(420px, 102vw);
    height: min(540px, 138vw);
  }

  .storybook-character--bunny {
    left: -2%;
    bottom: 0;
    width: 91px;
  }

  .storybook-character--bear-one {
    right: -2%;
    bottom: 0;
    width: 82px;
  }

  .storybook-character--bear-two {
    top: 30%;
    right: -4%;
    width: 68px;
  }

  .hero__eyebrow {
    margin-bottom: 29px;
  }

  .event-date {
    gap: 13px;
    padding-right: 12px;
  }

  .event-date::before,
  .event-date::after {
    width: calc(100% + 20px);
  }

  .letter {
    padding: 48px 26px 34px;
  }

  .letter__seal {
    top: 14px;
    right: 16px;
  }

  .countdown-stage {
    margin-top: 68px;
    padding-inline: 18px;
    border-radius: 32px;
  }

  .countdown-stage::before {
    inset: 8px;
    border-radius: 25px;
  }

  .countdown__dial {
    width: min(128px, 100%);
  }

  .detail-card {
    min-height: 330px;
  }

  .detail-card__surface {
    padding: 31px 22px 27px;
  }

  .detail-card__icon {
    width: 88px;
  }

  .detail-card__icon svg {
    width: 63px;
    height: 63px;
  }

  .gift-panel {
    min-height: 340px;
  }

  .scratch-card {
    min-height: 570px;
  }

  .promise-card__verse {
    font-size: clamp(1.5rem, 6.4vw, 1.9rem);
  }

  .promise-card__message {
    font-size: 1rem !important;
  }

  .promise-celebration {
    padding: 18px;
  }

  .promise-celebration__message {
    border-radius: 30px;
  }

  .promise-celebration__close {
    bottom: max(18px, env(safe-area-inset-bottom));
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .portal__card {
    border-radius: 28px;
  }

  .music-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .music-toggle {
    width: 44px;
    padding: 0;
    justify-content: center;
  }
}

/* La portada solo se encoge cuando la ventana es más ancha que alta y
   además baja: monitores de laptop o un celular acostado. El celular en
   vertical nunca entra aquí y conserva sus medidas originales. */
@media (min-aspect-ratio: 1/1) and (max-height: 780px) {
  .portal__card {
    padding: clamp(24px, 5vh, 58px) clamp(22px, 6vw, 46px);
  }

  .portal__world { font-size: min(7.2rem, 13vw, 15vh); }
  .portal h1 { font-size: min(9.6rem, 17vw, 20vh); }

  .portal__copy {
    margin-bottom: min(26px, 2.8vh);
    font-size: clamp(1rem, min(3vw, 2.4vh), 1.3rem);
  }

  .portal__form label { margin-bottom: min(9px, 1.2vh); }
  .portal__input-wrap { margin-bottom: min(14px, 1.8vh); }
}

/* ============================================================
   Ajuste para pantallas de escritorio (901px en adelante).

   En PC la ventana es ancha pero baja (por ejemplo 1366×620).
   Como las medidas base crecen con el ANCHO, en el monitor todo
   salía enorme: cada sección ocupaba dos pantallas y la invitación
   se veía "ampliada", mostrando solo un pedazo a la vez.

   Aquí cada medida se limita también contra la ALTURA disponible
   con min()/clamp(), así la composición entra en pantalla y se lee
   completa. En monitores altos los valores originales siguen
   mandando, y el móvil (900px o menos) no se toca en absoluto.
   ============================================================ */
@media (min-width: 901px) {
  .section {
    padding: clamp(44px, 7vh, 120px) max(24px, env(safe-area-inset-left));
  }

  .script-heading--section {
    font-size: min(7rem, 9vw, 11vh);
  }

  .lead,
  .section-copy {
    font-size: clamp(1.12rem, 2.9vh, 1.65rem);
  }

  /* --- Portada --- */
  .hero__grid {
    gap: clamp(30px, 5vw, 88px);
  }

  /* Todo el retrato (marco, aurora y personajes) se escala desde
     esta única medida, así nunca se deforma. El ancho del escenario
     se ata al retrato para que el conejito y los ositos queden
     siempre pegados al marco y no flotando lejos. */
  .portrait-stage {
    --retrato: min(590px, 64vh);
    width: min(100%, calc(var(--retrato) * .787));
    min-height: calc(var(--retrato) + min(60px, 7vh));
    margin-inline: auto;
  }

  .portrait {
    width: calc(var(--retrato) * .661);
    height: var(--retrato);
  }

  .portrait-aurora {
    width: calc(var(--retrato) * .847);
    height: calc(var(--retrato) * 1.034);
  }

  .portrait-crown { width: min(142px, 15.5vh); }
  .storybook-character--bunny { width: min(126px, 13.5vh); }
  .storybook-character--bear-one { width: min(112px, 12vh); }
  .storybook-character--bear-two { width: min(94px, 10vh); }
  .portrait-spark--one { font-size: min(2.2rem, 3.6vh); }
  .portrait-spark--two { font-size: min(3rem, 5vh); }

  .hero__eyebrow { margin-bottom: min(40px, 3vh); }

  .hero__copy > .script-heading {
    font-size: min(10.5rem, 15vw, 18vh);
  }

  .hero__subtitle {
    margin-top: min(20px, 2vh);
    font-size: min(2.25rem, 3.8vh);
  }

  .age-lockup { margin: min(18px, 1.4vh) 0; }
  .age-lockup strong { font-size: min(12rem, 15.5vh); }
  .age-lockup span { font-size: min(4.8rem, 6.4vh); }

  .hero .lead {
    max-width: 660px;
    margin-bottom: min(26px, 2.2vh);
  }

  .scroll-hint { margin-top: min(30px, 2.2vh); }

  /* --- Carta --- */
  .letter { padding: clamp(30px, 5vh, 64px); }
  .letter p { font-size: clamp(1rem, 2.2vh, 1.2rem); }
  .letter p:not(:last-child) { margin-bottom: min(16px, 1.6vh); }
  .letter .letter__signature { margin-top: min(26px, 2.4vh); }
  .letter__signature span { font-size: min(4.3rem, 6vh); }
  .verse-card { margin-top: min(30px, 3vh); padding: min(28px, 3vh); }

  /* --- Detalles y cuenta regresiva --- */
  .detail-grid { margin-top: min(52px, 4.6vh); }
  .detail-card { min-height: clamp(250px, 33vh, 360px); }
  .detail-card__surface { padding: clamp(20px, 3vh, 34px) 26px; }

  /* El icono y los separadores también encogen, si no el texto de
     abajo ("Un día reservado para celebrar") no cabe en la tarjeta. */
  .detail-card__icon {
    width: min(100px, 11vh);
    margin-bottom: min(20px, 2.2vh);
  }

  .detail-card__line { margin: min(18px, 1.8vh) 0 min(12px, 1.2vh); }

  .countdown-stage {
    margin-top: min(86px, 6.5vh);
    padding: clamp(28px, 4.6vh, 64px) clamp(20px, 5vw, 54px) clamp(22px, 3.4vh, 36px);
  }

  .countdown-stage__title { font-size: min(4.8rem, 7vw, 8vh); }
  .countdown { margin-top: min(35px, 3.2vh); }
  .countdown__dial { width: min(150px, 16.5vh); }
  .countdown__item strong { font-size: min(3.45rem, 5.2vw, 5.6vh); }
  .countdown__item span { margin-top: min(13px, 1.4vh); }
  .countdown-stage__footer { margin-top: min(30px, 2.8vh); }

  /* --- Regalo --- */
  .gift-panel,
  .scratch-card {
    min-height: clamp(330px, 50vh, 470px);
  }

  .gift__svg { width: min(290px, 30vh, 86%); }

  /* --- Cierre --- */
  .final__message { margin-top: min(40px, 3.4vh); font-size: min(1.8rem, 3.2vh); }
  .final__signature { margin-bottom: min(22px, 2.2vh); font-size: min(7.5rem, 10vh); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .15s !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .particles {
    display: none;
  }
}
