:root {
  color-scheme: dark;
  --ink: #101827;
  --ink-soft: #172234;
  --cream: #fff3dc;
  --paper: #fff8ed;
  --coral: #ff7868;
  --rose: #f3a6a3;
  --teal: #6bd7d1;
  --gold: #ffc65c;
  --muted: rgba(255, 243, 220, 0.72);
  --shadow: 0 22px 70px rgba(5, 9, 18, 0.38);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: #0a101b;
  color: var(--cream);
  overflow: hidden;
}

button {
  border: 0;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  z-index: 8;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.phone-frame {
  position: relative;
  width: min(100vw, 430px);
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow);
}

.top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 14px) 18px 8px;
  pointer-events: none;
}

.mini-brand {
  flex: 1;
  min-width: 0;
  max-width: none;
  margin: 0;
  color: rgba(255, 248, 237, 0.84);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 248, 237, 0.26);
  border-radius: 50%;
  background: rgba(16, 24, 39, 0.56);
  color: var(--cream);
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(14px);
}

.icon-button.is-on {
  background: var(--cream);
  color: var(--ink);
}

.floating-control {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 12px);
  right: 14px;
  z-index: 9999;
  background: rgba(255, 243, 220, 0.94);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(5, 9, 18, 0.24);
}

.story {
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

.story.is-sequence-locked {
  overflow: hidden;
  scroll-behavior: auto;
  scroll-snap-type: none;
}

.scene {
  position: relative;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top) + 78px) 22px calc(env(safe-area-inset-bottom) + 86px);
  scroll-snap-align: start;
}

.scene-hero {
  display: block;
  height: 100dvh;
  min-height: 100dvh;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 198, 92, 0.24), transparent 24%),
    radial-gradient(circle at 86% 28%, rgba(107, 215, 209, 0.18), transparent 28%),
    linear-gradient(180deg, #171018 0%, #08080d 100%);
}

.hero-image,
.hero-photo-glow,
.hero-blur-fill,
.hero-scrim,
.hero-sparkles {
  position: absolute;
  inset: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(18px) brightness(0.58) saturate(0.9);
  opacity: 0.92;
  transform: scale(1.08);
  transition:
    filter 3600ms cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 2400ms ease,
    transform 3600ms cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 2;
}

.scene-hero.is-papering .hero-image,
.scene-hero.is-clearing .hero-image,
.scene-hero.is-message .hero-image {
  filter: blur(0) brightness(0.96) saturate(1);
  opacity: 1;
  transform: scale(1.01);
  animation: heroPhotoFloat 7s ease-in-out infinite alternate;
}

.hero-photo-glow {
  z-index: 1;
  background:
    radial-gradient(circle at 52% 44%, rgba(255, 248, 237, 0.22), transparent 32%),
    radial-gradient(circle at 22% 78%, rgba(255, 120, 104, 0.16), transparent 30%);
  opacity: 0.5;
  transition: opacity 700ms ease;
  animation: glowBreath 4.8s ease-in-out infinite alternate;
}

.scene-hero.is-papering .hero-photo-glow,
.scene-hero.is-clearing .hero-photo-glow,
.scene-hero.is-message .hero-photo-glow {
  opacity: 1;
}

.hero-blur-fill {
  background:
    linear-gradient(180deg, rgba(8, 8, 13, 0.24), rgba(8, 8, 13, 0.78)),
    url("./assets/cumple-1.jpeg") center / cover no-repeat;
  filter: blur(24px);
  opacity: 0.88;
  transform: scale(1.12);
  transition: opacity 3200ms ease;
  z-index: 0;
}

.scene-hero.is-papering .hero-blur-fill,
.scene-hero.is-clearing .hero-blur-fill,
.scene-hero.is-message .hero-blur-fill {
  opacity: 0.24;
}

.hero-scrim {
  background:
    linear-gradient(180deg, rgba(8, 8, 13, 0.2) 0%, rgba(8, 8, 13, 0.04) 28%, rgba(8, 8, 13, 0.78) 100%),
    linear-gradient(90deg, rgba(8, 8, 13, 0.76) 0%, rgba(8, 8, 13, 0.12) 58%, rgba(8, 8, 13, 0.54) 100%);
  z-index: 3;
  pointer-events: none;
}

.hero-content {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 158px);
  left: 18px;
  z-index: 5;
  width: min(336px, calc(100% - 36px));
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
  transform: translateX(-12px) translateY(-8px);
  transition: opacity 420ms ease, transform 580ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scene-hero.is-message .hero-content {
  opacity: 1;
  transform: translateX(0) translateY(0);
}

.birthday-intro {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: min(286px, calc(100% - 64px));
  padding: 22px 20px 24px;
  border: 1px solid rgba(255, 248, 237, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 248, 237, 0.18), rgba(255, 248, 237, 0.06)),
    rgba(9, 10, 17, 0.74);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  text-align: left;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(22px);
  transition: opacity 520ms ease, transform 640ms ease;
  animation: introCardFloat 2.4s ease-in-out infinite alternate;
}

.scene-hero.is-clearing .birthday-intro,
.scene-hero.is-message .birthday-intro {
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, calc(-50% - 20px)) scale(0.96);
  animation: none;
  pointer-events: none;
}

.scene-hero.is-papering .birthday-intro {
  opacity: 0;
  transform: translate(-50%, calc(-50% - 18px)) scale(0.96);
  animation: none;
  pointer-events: none;
}

.birthday-intro h1 {
  max-width: 12ch;
  font-size: 2.24rem;
  line-height: 1.03;
}

.intro-action {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 72px);
  left: 50%;
  z-index: 7;
  width: min(336px, calc(100% - 56px));
  min-height: 54px;
  margin: 0;
  overflow: visible;
  transform-origin: 50% 50%;
  transform: translateX(-50%);
  transition:
    opacity 360ms ease,
    filter 360ms ease,
    transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.intro-action .intro-button-label {
  position: relative;
  z-index: 2;
  display: block;
}

.scene-hero.is-message .intro-action,
.intro-action.is-finished {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.intro-action.is-transforming {
  color: transparent;
  pointer-events: none;
  animation: paperHeartFlight 760ms cubic-bezier(0.2, 0.86, 0.18, 1) forwards;
  will-change: transform, opacity, border-radius;
}

.intro-action.is-transforming .intro-button-label {
  animation: buttonLabelVanish 220ms ease forwards;
}

.intro-action.is-transforming::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  opacity: 0;
  box-shadow: 0 0 0 0 rgba(255, 243, 220, 0.34);
  animation: heartPulseRing 760ms ease forwards;
}

.intro-heart-pop {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 11;
  display: grid;
  width: 116px;
  height: 116px;
  place-items: center;
  font-size: 5.8rem;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.2);
  filter: drop-shadow(0 20px 30px rgba(89, 0, 36, 0.42));
  will-change: transform, opacity;
}

.intro-heart-pop.is-visible {
  animation: introHeartPop 1120ms cubic-bezier(0.18, 0.86, 0.2, 1) forwards;
}

.intro-flower-burst {
  position: absolute;
  inset: 0;
  z-index: 12;
  overflow: hidden;
  pointer-events: none;
}

.burst-flower {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
  opacity: 0;
  font-size: var(--size);
  line-height: 1;
  transform: translate(-50%, -50%) scale(0.1);
  animation: flowerBlast 6200ms cubic-bezier(0.13, 0.76, 0.16, 1) forwards;
  animation-delay: var(--delay);
  will-change: transform, opacity;
}

.hero-sparkles {
  z-index: 4;
  overflow: hidden;
  pointer-events: none;
}

.hero-sparkles span {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 248, 237, 0.92);
  box-shadow: 0 0 22px rgba(255, 248, 237, 0.82);
  opacity: 0.72;
  animation: sparkleDrift 5.4s ease-in-out infinite;
}

.hero-sparkles span:nth-child(1) {
  top: 16%;
  left: 18%;
}

.hero-sparkles span:nth-child(2) {
  top: 28%;
  right: 16%;
  animation-delay: -1.1s;
}

.hero-sparkles span:nth-child(3) {
  top: 64%;
  left: 12%;
  animation-delay: -2.3s;
}

.hero-sparkles span:nth-child(4) {
  right: 22%;
  bottom: 20%;
  animation-delay: -3.2s;
}

.hero-sparkles span:nth-child(5) {
  top: 46%;
  right: 34%;
  width: 4px;
  height: 4px;
  animation-delay: -4.1s;
}

.hero-sparkles span:nth-child(6) {
  bottom: 12%;
  left: 44%;
  width: 4px;
  height: 4px;
  animation-delay: -0.7s;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  max-width: 12ch;
  color: var(--cream);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 0.95;
}

h1 {
  font-size: 2.42rem;
  line-height: 1.02;
}

h2 {
  font-size: 2.7rem;
}

h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1.45rem;
  letter-spacing: 0;
  line-height: 1.04;
}

.hero-copy,
.scene-copy {
  max-width: 31ch;
  margin: 18px 0 0;
  color: rgba(255, 248, 237, 0.86);
  font-size: 1.03rem;
  font-weight: 560;
  line-height: 1.5;
}

.scene-hero .hero-copy {
  max-width: 23ch;
  margin: 0;
  color: rgba(255, 248, 237, 0.92);
  font-size: 1.12rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.18;
  overflow-wrap: normal;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.72);
  word-break: normal;
}

.scene-hero .primary-action {
  margin-top: 16px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.scene-hero .intro-action {
  margin-top: 0;
}

.hero-copy .hero-word {
  display: inline-block;
  white-space: nowrap;
}

.hero-copy .hero-letter {
  display: inline-block;
  opacity: 0;
  transform: translate3d(var(--dx), var(--dy), 0) rotate(var(--rot)) scale(1.5);
  animation: letterLand 760ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  animation-delay: var(--delay);
}

.hero-continue {
  position: absolute;
  right: 24px;
  bottom: calc(env(safe-area-inset-bottom) + 70px);
  left: 24px;
  z-index: 6;
  visibility: hidden;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition:
    opacity 480ms ease 1550ms,
    transform 620ms cubic-bezier(0.2, 0.8, 0.2, 1) 1550ms,
    border-radius 320ms ease,
    width 320ms ease,
    height 320ms ease;
}

.scene-hero.is-message .hero-continue {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-continue.is-heart-flight {
  left: 50%;
  width: 72px;
  height: 72px;
  min-height: 72px;
  padding: 0;
  overflow: visible;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  color: transparent;
  transform: translateX(-50%);
  animation: heartFly 1080ms cubic-bezier(0.24, 0.86, 0.38, 1) forwards;
}

.hero-continue.is-heart-flight::before {
  content: "❤️";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 4.2rem;
  line-height: 1;
  filter: drop-shadow(0 16px 24px rgba(89, 0, 36, 0.38));
}

.scene-photo-carousel {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  padding: 0;
  background: #08080d;
}

.carousel-shell {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #08080d;
}

.carousel-image,
.carousel-scrim {
  position: absolute;
  inset: 0;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.08);
  transition: opacity 500ms ease;
}

.carousel-image.is-blurred {
  filter: blur(16px) brightness(0.62) saturate(0.92);
  transform: scale(1.1);
}

.carousel-image.is-clear {
  filter: blur(0) brightness(0.95);
  transform: scale(1.02);
}

.carousel-image.is-revealing {
  animation: carouselImageReveal var(--reveal-duration, var(--phase-duration, 5000ms)) linear forwards;
}

.carousel-scrim {
  background:
    linear-gradient(180deg, rgba(5, 6, 12, 0.16) 0%, rgba(5, 6, 12, 0.3) 38%, rgba(5, 6, 12, 0.74) 100%),
    radial-gradient(circle at 50% 18%, rgba(255, 198, 92, 0.18), transparent 28%);
  transition: opacity 680ms ease;
}

.carousel-shell.is-clear-phase .carousel-scrim {
  opacity: 0.46;
}

.carousel-shell.is-message-phase .carousel-scrim {
  opacity: 0.94;
}

.carousel-shell.is-final-phase .carousel-image {
  filter: blur(18px) brightness(0.56) saturate(0.9);
  transform: scale(1.1);
  transition:
    filter 1400ms ease,
    transform 1400ms ease;
}

.carousel-shell.is-final-phase .carousel-scrim {
  opacity: 0.98;
}

.carousel-message {
  position: absolute;
  right: 18px;
  top: 50%;
  bottom: auto;
  left: 18px;
  z-index: 2;
  max-height: 68dvh;
  overflow: hidden;
  padding: 30px 22px 32px;
  border: 1px solid rgba(255, 248, 237, 0.34);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 198, 92, 0.2), transparent 38%),
    linear-gradient(145deg, rgba(255, 248, 237, 0.2), rgba(255, 248, 237, 0.07)),
    rgba(8, 10, 17, 0.66);
  box-shadow:
    0 22px 66px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 248, 237, 0.18);
  text-align: center;
  transform: translateY(-50%);
  backdrop-filter: blur(18px);
  transition: opacity 420ms ease, transform 420ms ease, filter 420ms ease;
}

.carousel-message::before {
  content: "";
  display: block;
  width: 58px;
  height: 3px;
  margin: 0 auto 15px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--rose), var(--teal));
}

.carousel-message::after {
  content: "♡";
  position: absolute;
  right: 18px;
  bottom: 10px;
  color: rgba(255, 248, 237, 0.2);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
}

.carousel-message.is-hidden {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(calc(-50% + 18px)) scale(0.96);
  pointer-events: none;
}

.carousel-message.is-fading {
  animation: carouselMessageFade var(--message-duration, var(--phase-duration, 5000ms)) ease-in forwards;
}

.carousel-message h2 {
  display: none;
}

.carousel-message .eyebrow {
  display: none;
}

.carousel-message p:last-child {
  margin: 0;
  color: #fff8ed;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.5;
  text-wrap: balance;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.42);
}

.carousel-final {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 34px 24px;
  text-align: center;
  pointer-events: none;
}

.carousel-final.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.carousel-final p {
  max-width: 12ch;
  margin: 0 0 24px;
  color: #fff8ed;
  font-size: 2.32rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.02;
  text-shadow: 0 14px 42px rgba(0, 0, 0, 0.62);
  opacity: 0;
  transform: translateY(18px) scale(0.96);
}

.carousel-final button {
  width: min(320px, calc(100vw - 72px));
  margin: 0;
  opacity: 0;
  pointer-events: auto;
  transform: translateY(-56vh) rotate(-3deg);
}

.carousel-final.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.carousel-final.is-visible p {
  animation: finalMessageIn 820ms cubic-bezier(0.2, 0.8, 0.2, 1) 280ms forwards;
}

.carousel-final.is-visible button {
  animation: finalButtonDrop 1050ms cubic-bezier(0.2, 1.25, 0.34, 1) 650ms forwards;
}

.carousel-progress {
  position: absolute;
  right: 18px;
  bottom: calc(env(safe-area-inset-bottom) + 56px);
  left: 18px;
  z-index: 2;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.22);
  transition: opacity 360ms ease;
}

.carousel-shell.is-final-phase .carousel-progress {
  opacity: 0;
}

.carousel-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--cream), var(--teal));
}

.scene-us-video {
  display: block;
  min-height: 100dvh;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 198, 92, 0.22), transparent 24%),
    radial-gradient(circle at 82% 24%, rgba(243, 166, 163, 0.24), transparent 26%),
    linear-gradient(180deg, #120914 0%, #4d163e 48%, #120815 100%);
}

.video-copy {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 92px);
  left: 24px;
  right: 24px;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
}

.video-copy h2 {
  max-width: 11ch;
  color: #fff8ed;
  font-size: 2.58rem;
  line-height: 0.96;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.46);
}

.video-shell {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #06080d;
  box-shadow: none;
}

.video-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(5, 6, 12, 0.2), rgba(5, 6, 12, 0.1) 42%, rgba(5, 6, 12, 0.68)),
    radial-gradient(circle at 28% 18%, rgba(255, 198, 92, 0.18), transparent 28%);
  pointer-events: none;
}

.us-video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100dvh;
  background: #06080d;
  object-fit: cover;
  transform: scale(1.02);
}

.scene-us-video.is-intro .us-video {
  animation: videoBlurLift 4000ms linear forwards;
}

.scene-us-video.is-intro .video-copy {
  animation: videoTitleFloat 4000ms ease forwards;
}

.video-hearts {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  pointer-events: none;
}

.video-hearts span {
  position: absolute;
  left: -14%;
  top: var(--top);
  color: rgba(255, 248, 237, var(--alpha));
  font-size: var(--size);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 18px rgba(255, 248, 237, 0.18);
  transform: translateX(-20vw) rotate(var(--rot));
  animation: videoHeartWind var(--speed) linear infinite;
  animation-delay: var(--delay);
}

.video-hearts span::before {
  content: "♡";
}

.video-hearts span:nth-child(1) {
  --top: 14%;
  --size: 1.4rem;
  --alpha: 0.2;
  --speed: 8.8s;
  --delay: -1.1s;
  --rot: -12deg;
}

.video-hearts span:nth-child(2) {
  --top: 24%;
  --size: 1.05rem;
  --alpha: 0.16;
  --speed: 10.2s;
  --delay: -4.8s;
  --rot: 8deg;
}

.video-hearts span:nth-child(3) {
  --top: 33%;
  --size: 1.32rem;
  --alpha: 0.18;
  --speed: 9.6s;
  --delay: -7s;
  --rot: 18deg;
}

.video-hearts span:nth-child(4) {
  --top: 43%;
  --size: 0.98rem;
  --alpha: 0.15;
  --speed: 11.4s;
  --delay: -2.2s;
  --rot: -24deg;
}

.video-hearts span:nth-child(5) {
  --top: 52%;
  --size: 1.22rem;
  --alpha: 0.18;
  --speed: 8.6s;
  --delay: -5.2s;
  --rot: 10deg;
}

.video-hearts span:nth-child(6) {
  --top: 61%;
  --size: 0.96rem;
  --alpha: 0.14;
  --speed: 10.8s;
  --delay: -8.2s;
  --rot: -8deg;
}

.video-hearts span:nth-child(7) {
  --top: 69%;
  --size: 1.34rem;
  --alpha: 0.17;
  --speed: 9.2s;
  --delay: -3.7s;
  --rot: 20deg;
}

.video-hearts span:nth-child(8) {
  --top: 78%;
  --size: 1rem;
  --alpha: 0.15;
  --speed: 12s;
  --delay: -6.4s;
  --rot: -16deg;
}

.video-hearts span:nth-child(9) {
  --top: 18%;
  --size: 0.92rem;
  --alpha: 0.13;
  --speed: 13.2s;
  --delay: -9.7s;
  --rot: 6deg;
}

.video-hearts span:nth-child(10) {
  --top: 86%;
  --size: 1.18rem;
  --alpha: 0.16;
  --speed: 9.9s;
  --delay: -0.6s;
  --rot: 14deg;
}

.scene-flower-love {
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 198, 92, 0.3), transparent 22%),
    linear-gradient(180deg, #411c37 0%, #8c1e63 45%, #180915 100%);
}

.flower-letter {
  position: relative;
  display: grid;
  min-height: calc(100dvh - 154px);
  overflow: hidden;
  grid-template-rows: auto minmax(158px, 1fr) auto;
  border-radius: 8px;
  background: #fff2df;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(12, 4, 14, 0.42);
}

.flower-letter::before,
.flower-letter::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 128, 174, 0.26);
  border-radius: 999px 999px 0 999px;
  opacity: 0.64;
  transform: rotate(45deg);
}

.flower-letter::before {
  top: 18px;
  right: 34px;
  width: 44px;
  height: 44px;
}

.flower-letter::after {
  bottom: 72px;
  left: 28px;
  width: 26px;
  height: 26px;
}

.flower-copy,
.love-clock {
  position: relative;
  z-index: 1;
}

.flower-copy {
  padding: 28px 22px 0;
}

.flower-copy .eyebrow {
  color: #b26300;
}

.flower-copy h2 {
  max-width: 14ch;
  color: #2c1d18;
  font-size: 1.92rem;
}

.flower-copy p {
  max-width: 31ch;
  margin: 16px 0 0;
  color: #4b3b35;
  font-size: 0.93rem;
  font-weight: 650;
  line-height: 1.34;
}

.flower-copy .signature {
  max-width: none;
  margin-top: 18px;
  color: #2c1d18;
  font-size: 1.22rem;
  font-weight: 900;
  text-align: center;
}

.flower-stage {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 158px;
  margin: -4px 0 0;
}

.love-question {
  position: relative;
  z-index: 2;
  padding: 0 22px 24px;
  text-align: center;
}

.love-question p {
  margin: 0 0 12px;
  color: #2c1d18;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.48rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.love-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.love-choice {
  min-height: 48px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(135deg, #ffc65c, #ff7868 55%, #f3a6a3);
  color: #2c1d18;
  box-shadow: 0 12px 28px rgba(117, 63, 15, 0.18);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.love-choice:active {
  filter: brightness(0.98);
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 8px 18px rgba(117, 63, 15, 0.18);
}

.known-counter {
  max-width: 100%;
  margin-top: 16px;
  padding: 12px 10px 11px;
  border: 1px solid rgba(44, 29, 24, 0.16);
  border-radius: 8px;
  background:
    radial-gradient(circle at 12% 12%, rgba(255, 198, 92, 0.32), transparent 34%),
    rgba(255, 248, 237, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.known-counter > span {
  display: block;
  margin-bottom: 10px;
  color: #7b4b20;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.known-counter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.known-counter-item {
  display: grid;
  min-width: 0;
  min-height: 50px;
  align-content: center;
  padding: 7px 2px;
  border-radius: 8px;
  background: rgba(44, 29, 24, 0.08);
  text-align: center;
}

.known-counter-item strong {
  display: block;
  color: #2c1d18;
  font-size: 0.98rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
}

.known-counter-item small {
  display: block;
  margin-top: 5px;
  color: #6f5548;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

#flowerCanvas,
#heartCanvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.love-clock {
  margin: 0 22px 22px;
  padding-top: 14px;
  border-top: 2px solid rgba(44, 29, 24, 0.86);
}

.love-clock span,
.love-clock strong {
  display: block;
}

.love-clock span {
  color: #5b453a;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.3;
}

.love-clock strong {
  margin-top: 6px;
  color: #2c1d18;
  font-size: 1.26rem;
  letter-spacing: 0;
  line-height: 1.12;
}

.scene-particle-heart {
  display: flex;
  min-height: 100dvh;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 46%, rgba(255, 86, 159, 0.18), transparent 38%),
    linear-gradient(180deg, #05070c 0%, #0e121d 46%, #08070d 100%);
}

.heart-stage {
  position: relative;
  height: min(56dvh, 520px);
  min-height: 360px;
  margin: -28px -22px 0;
}

.heart-stage::after {
  content: "";
  position: absolute;
  inset: auto 14% 7% 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 248, 237, 0.26), transparent);
}

.heart-caption {
  position: relative;
  z-index: 1;
}

.heart-caption h2 {
  max-width: 11ch;
  font-size: 2.34rem;
}

.primary-action,
.secondary-action {
  min-height: 50px;
  margin-top: 24px;
  padding: 0 19px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
  line-height: 1;
}

.primary-action {
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.primary-action.compact {
  margin-top: 0;
}

.secondary-action {
  border: 1px solid rgba(255, 248, 237, 0.22);
  background: rgba(255, 248, 237, 0.1);
  color: var(--cream);
}

.secondary-action.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.96);
}

.primary-action:active:not(.is-transforming):not(.is-heart-flight),
.secondary-action:active,
.round-action:active,
.icon-button:active {
  transform: translateY(1px);
}

.section-head {
  margin-bottom: 28px;
}

.scene-wish {
  background:
    linear-gradient(180deg, #172234 0%, #101827 58%, #321e2f 100%);
}

.cake-stage {
  position: relative;
  display: grid;
  min-height: 246px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 64%, rgba(255, 198, 92, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(107, 215, 209, 0.16), rgba(255, 120, 104, 0.22));
}

.string-lights {
  position: absolute;
  top: 22px;
  display: flex;
  width: 230px;
  justify-content: space-between;
}

.string-lights span {
  width: 8px;
  height: 16px;
  border-radius: 8px;
  background: var(--gold);
  box-shadow: 0 0 20px rgba(255, 198, 92, 0.95);
}

.string-lights span:nth-child(2n) {
  background: var(--teal);
  box-shadow: 0 0 20px rgba(107, 215, 209, 0.9);
}

.cake {
  position: relative;
  width: 190px;
  height: 160px;
  margin-top: 34px;
}

.candles {
  position: absolute;
  top: 0;
  left: 50%;
  display: flex;
  width: 104px;
  justify-content: space-between;
  transform: translateX(-50%);
}

.candles i {
  position: relative;
  width: 12px;
  height: 54px;
  border-radius: 6px 6px 2px 2px;
  background: repeating-linear-gradient(
    135deg,
    #fff8ed 0 7px,
    var(--coral) 7px 13px
  );
}

.candles i::before {
  content: "";
  position: absolute;
  top: -22px;
  left: 50%;
  width: 17px;
  height: 24px;
  border-radius: 50% 50% 46% 46%;
  background: var(--gold);
  box-shadow: 0 0 24px rgba(255, 198, 92, 0.9);
  transform: translateX(-50%);
  transform-origin: 50% 90%;
  animation: flame 1.2s ease-in-out infinite alternate;
}

.cake.is-wished .candles i::before {
  opacity: 0;
  transform: translateX(-50%) translateY(8px) scale(0.6);
  transition: opacity 240ms ease, transform 240ms ease;
  animation: none;
}

.cake-top {
  position: absolute;
  top: 52px;
  left: 12px;
  width: 166px;
  height: 44px;
  border-radius: 50%;
  background: #fff8ed;
  box-shadow: inset 0 -13px 0 rgba(255, 120, 104, 0.7);
}

.cake-body {
  position: absolute;
  top: 73px;
  left: 18px;
  width: 154px;
  height: 72px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, #ff9c88, #ff7868);
}

.plate {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 248, 237, 0.88);
}

.scene-reasons {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(5, 7, 14, 0.36), rgba(8, 10, 22, 0.78) 56%, rgba(3, 4, 10, 0.92)),
    url("./assets/galaxy-m51.jpg") center / cover no-repeat;
}

.scene-reasons::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 198, 92, 0.18), transparent 26%),
    radial-gradient(circle at 78% 72%, rgba(107, 215, 209, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(5, 7, 14, 0.06), rgba(5, 7, 14, 0.58));
  pointer-events: none;
}

.scene-reasons::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    radial-gradient(circle, rgba(255, 248, 237, 0.9) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(255, 248, 237, 0.54) 0 0.8px, transparent 1.4px);
  background-position:
    14px 22px,
    56px 88px;
  background-size:
    116px 146px,
    162px 118px;
  opacity: 0.34;
  pointer-events: none;
}

.scene-reasons .section-head,
.scene-reasons .reason-stage,
.scene-reasons .secondary-action {
  position: relative;
  z-index: 1;
}

.scene-reasons .section-head {
  margin-bottom: 20px;
}

.scene-reasons .section-head .eyebrow {
  color: rgba(255, 248, 237, 0.74);
}

.scene-reasons .section-head h2 {
  max-width: 10ch;
  color: #fff8ed;
  text-shadow: 0 14px 38px rgba(0, 0, 0, 0.54);
}

.reason-stage {
  position: relative;
  display: grid;
  min-height: min(52dvh, 480px);
  align-items: stretch;
}

.reason-stage.is-waiting {
  display: none;
}

.reason-end-actions {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
  padding-bottom: calc(env(safe-area-inset-bottom) + 76px);
  animation: reasonActionsIn 680ms cubic-bezier(0.2, 0.86, 0.24, 1) both;
}

.reason-end-actions.is-hidden {
  display: none;
}

.reason-end-actions::before,
.reason-end-actions::after {
  content: "\2661";
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 86px);
  z-index: -1;
  color: rgba(255, 248, 237, 0.68);
  font-size: 1.2rem;
  line-height: 1;
  pointer-events: none;
  text-shadow:
    -132px -36px 0 rgba(255, 198, 92, 0.46),
    -92px -82px 0 rgba(243, 166, 163, 0.54),
    -46px -54px 0 rgba(255, 248, 237, 0.62),
    42px -86px 0 rgba(255, 120, 104, 0.5),
    88px -44px 0 rgba(255, 248, 237, 0.56),
    126px -92px 0 rgba(107, 215, 209, 0.38);
  transform: translateX(-50%);
  animation: reasonHeartsFloat 3.8s ease-in-out infinite;
}

.reason-end-actions::after {
  bottom: calc(env(safe-area-inset-bottom) + 104px);
  font-size: 0.92rem;
  opacity: 0.78;
  text-shadow:
    -118px -68px 0 rgba(255, 248, 237, 0.44),
    -66px -104px 0 rgba(255, 120, 104, 0.42),
    -12px -80px 0 rgba(255, 198, 92, 0.4),
    54px -118px 0 rgba(255, 248, 237, 0.5),
    104px -74px 0 rgba(243, 166, 163, 0.46),
    138px -122px 0 rgba(107, 215, 209, 0.32);
  animation-delay: -1.4s;
}

.reason-end-actions .secondary-action {
  position: relative;
  min-height: 58px;
  overflow: hidden;
  margin-top: 0;
  border: 1px solid rgba(255, 248, 237, 0.52);
  border-radius: 999px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.92), transparent 22%),
    radial-gradient(circle at 86% 76%, rgba(107, 215, 209, 0.44), transparent 34%),
    linear-gradient(135deg, rgba(255, 198, 92, 0.98), rgba(255, 120, 104, 0.96) 52%, rgba(243, 166, 163, 0.98));
  color: #101827;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 18px 40px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(255, 120, 104, 0.28);
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.reason-end-actions .secondary-action::before {
  content: "";
  position: absolute;
  inset: -40% -80%;
  background: linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, 0.72), transparent 64%);
  transform: translateX(-42%) rotate(8deg);
  animation: reasonButtonShine 2.6s ease-in-out infinite;
  pointer-events: none;
}

.reason-end-actions .secondary-action:active {
  filter: brightness(1.02);
  transform: translateY(2px) scale(0.98);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.28),
    0 0 22px rgba(255, 120, 104, 0.2);
}

.reason-media {
  display: block;
  width: 100%;
  height: min(52dvh, 480px);
  min-height: 348px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 237, 0.26);
  border-radius: 8px;
  background: rgba(5, 7, 14, 0.62);
  box-shadow: 0 22px 56px rgba(2, 4, 12, 0.54);
  object-fit: cover;
}

.reason-media.is-hidden,
.reason-card.is-hidden {
  display: none;
}

.reason-card.is-entering,
.reason-media.is-entering {
  animation: reasonCosmicIn 680ms cubic-bezier(0.2, 0.82, 0.24, 1) both;
}

.reason-card,
.memory-card,
.letter-paper {
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 42px rgba(5, 9, 18, 0.26);
}

.reason-card {
  display: grid;
  min-height: 258px;
  align-content: center;
  padding: 25px 22px;
  border: 1px solid rgba(255, 248, 237, 0.3);
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 198, 92, 0.2), transparent 34%),
    rgba(255, 248, 237, 0.9);
  backdrop-filter: blur(18px);
}

.reason-number {
  display: inline-grid;
  min-width: 48px;
  min-height: 34px;
  margin-bottom: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.85rem;
  font-weight: 900;
}

.reason-card p {
  margin: 0;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.12;
}

.scene-memories {
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(64, 92, 160, 0.16), transparent 30%),
    radial-gradient(circle at 12% 76%, rgba(255, 120, 104, 0.08), transparent 32%),
    linear-gradient(180deg, #02030a 0%, #050613 48%, #010207 100%);
}

.scene-memories::before,
.scene-memories::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.scene-memories::before {
  z-index: 0;
  background:
    radial-gradient(circle, rgba(255, 248, 237, 0.92) 0 1px, transparent 1.35px),
    radial-gradient(circle, rgba(107, 215, 209, 0.48) 0 1px, transparent 1.45px),
    radial-gradient(circle, rgba(255, 198, 92, 0.5) 0 0.8px, transparent 1.2px);
  background-position: 0 0, 34px 26px, 18px 54px;
  background-size: 76px 76px, 118px 118px, 154px 154px;
  opacity: 0.74;
  animation: memoryStarField 28s linear infinite;
}

.scene-memories::after {
  z-index: 2;
  background:
    linear-gradient(180deg, rgba(1, 2, 7, 0.08), rgba(1, 2, 7, 0.54)),
    radial-gradient(circle at 50% 52%, transparent 0 34%, rgba(1, 2, 7, 0.36) 76%);
}

.memory-space {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.memory-planet {
  position: absolute;
  z-index: 1;
  display: block;
  border-radius: 50%;
  opacity: 0.92;
  filter: saturate(1.12);
}

.memory-planet::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 148%;
  height: 42%;
  border: 1px solid rgba(255, 248, 237, 0.2);
  border-right-color: rgba(255, 248, 237, 0.06);
  border-left-color: rgba(107, 215, 209, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
}

.memory-planet-one {
  top: 10%;
  right: -38px;
  width: 118px;
  height: 118px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 248, 237, 0.82), transparent 0 14%),
    radial-gradient(circle at 36% 32%, #ffc65c 0 12%, transparent 13%),
    linear-gradient(135deg, #805fca 0%, #36458e 48%, #17234f 100%);
  box-shadow:
    inset -24px -18px 38px rgba(0, 0, 0, 0.38),
    0 0 48px rgba(128, 95, 202, 0.35);
}

.memory-planet-two {
  left: -34px;
  bottom: 12%;
  width: 92px;
  height: 92px;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 248, 237, 0.72), transparent 0 13%),
    linear-gradient(145deg, #6bd7d1 0%, #246577 52%, #102b40 100%);
  box-shadow:
    inset -18px -14px 28px rgba(0, 0, 0, 0.36),
    0 0 38px rgba(107, 215, 209, 0.3);
}

.memory-planet-three {
  left: 13%;
  top: 44%;
  width: 42px;
  height: 42px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 248, 237, 0.72), transparent 0 16%),
    linear-gradient(145deg, #ff7868 0%, #7b335b 58%, #21132d 100%);
  box-shadow:
    inset -9px -8px 16px rgba(0, 0, 0, 0.34),
    0 0 26px rgba(255, 120, 104, 0.28);
}

.shooting-heart {
  position: absolute;
  top: var(--top);
  left: -56vw;
  z-index: 2;
  display: block;
  width: 220px;
  height: 32px;
  opacity: 0;
  transform: rotate(var(--angle));
  animation: memoryShootingHeart var(--dur) linear infinite;
  animation-delay: var(--delay);
  will-change: transform, opacity;
}

.shooting-heart::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 14px;
  width: 196px;
  height: 2px;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 248, 237, 0.06) 16%, rgba(255, 198, 92, 0.5) 58%, rgba(255, 248, 237, 0.82) 100%);
  filter: blur(1.1px);
  transform: translateY(-50%);
}

.shooting-heart::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 42px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 248, 237, 0.8);
  box-shadow:
    -26px -5px 0 rgba(255, 198, 92, 0.42),
    -48px 4px 0 rgba(255, 248, 237, 0.38),
    -76px -2px 0 rgba(243, 166, 163, 0.34),
    -108px 6px 0 rgba(255, 248, 237, 0.28),
    -142px -4px 0 rgba(107, 215, 209, 0.24);
  transform: translateY(-50%);
}

.shooting-heart i {
  position: absolute;
  top: 50%;
  right: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 2px;
  background: #ffd9ec;
  box-shadow:
    0 0 12px rgba(255, 217, 236, 0.88),
    0 0 26px rgba(255, 120, 104, 0.38);
  transform: translateY(-50%) rotate(-45deg);
}

.shooting-heart i::before,
.shooting-heart i::after {
  content: "";
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: inherit;
}

.shooting-heart i::before {
  top: calc(var(--size) * -0.5);
  left: 0;
}

.shooting-heart i::after {
  top: 0;
  left: calc(var(--size) * 0.5);
}

.scene-memories .section-head {
  position: relative;
  z-index: 3;
  margin-bottom: 24px;
}

.scene-memories .eyebrow {
  color: rgba(255, 198, 92, 0.9);
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
}

.scene-memories .section-head h2 {
  max-width: 11ch;
  color: #fff8ed;
  text-shadow:
    0 1px 0 rgba(255, 248, 237, 0.28),
    0 18px 42px rgba(0, 0, 0, 0.46);
}

.memory-card {
  position: relative;
  z-index: 3;
  min-height: 306px;
  overflow: hidden;
  padding: 28px 24px 26px;
  border: 1px solid rgba(255, 248, 237, 0.52);
  background:
    linear-gradient(145deg, rgba(255, 248, 237, 0.98), rgba(255, 238, 210, 0.9)),
    var(--paper);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    0 24px 58px rgba(4, 7, 16, 0.38);
}

.memory-card.is-hidden {
  display: none;
}

.memory-card.is-entering,
.memory-media-shell.is-entering {
  animation: memoryItemIn 620ms cubic-bezier(0.2, 0.82, 0.24, 1) both;
}

.memory-card::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(176, 82, 88, 0.18);
  border-radius: 7px;
  pointer-events: none;
}

.memory-card::after {
  content: "\2661";
  position: absolute;
  right: 20px;
  bottom: 16px;
  color: rgba(176, 82, 88, 0.14);
  font-size: 4.4rem;
  line-height: 1;
  pointer-events: none;
}

.memory-date {
  position: relative;
  margin: 0 0 22px;
  color: #9a414c;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-transform: uppercase;
}

.memory-card h3 {
  position: relative;
  max-width: 10ch;
  margin-bottom: 18px;
  color: #171d2b;
  font-size: 2rem;
  font-weight: 950;
  line-height: 0.98;
  text-wrap: balance;
}

.memory-card p:last-child {
  position: relative;
  max-width: 28ch;
  margin: 0;
  color: #263143;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.58;
}

.memory-media-shell {
  position: relative;
  z-index: 3;
  height: min(48dvh, 430px);
  min-height: 320px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 237, 0.44);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 15%, rgba(255, 248, 237, 0.12), transparent 30%),
    rgba(5, 7, 14, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 24px 60px rgba(0, 0, 0, 0.42);
}

.memory-media-shell::before {
  content: "";
  position: absolute;
  inset: 12px;
  z-index: 2;
  border: 1px solid rgba(255, 248, 237, 0.2);
  border-radius: 7px;
  pointer-events: none;
}

.memory-media-shell::after {
  content: "\2665";
  position: absolute;
  right: 18px;
  bottom: 14px;
  z-index: 3;
  color: rgba(255, 248, 237, 0.38);
  font-size: 1.1rem;
  text-shadow:
    -72px -226px 0 rgba(255, 198, 92, 0.22),
    -134px -118px 0 rgba(243, 166, 163, 0.24),
    -32px -164px 0 rgba(107, 215, 209, 0.18);
  pointer-events: none;
  animation: memoryHeartDrift 5.8s ease-in-out infinite alternate;
}

.memory-media-shell.is-hidden,
.memory-media.is-hidden {
  display: none;
}

.memory-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-media-shell.is-complete {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 24px 60px rgba(0, 0, 0, 0.42),
    0 0 38px rgba(255, 198, 92, 0.24);
}

.memory-controls {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.memory-controls.is-hidden {
  display: none;
}

.round-action {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(255, 248, 237, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.7), transparent 28%),
    linear-gradient(145deg, rgba(255, 198, 92, 0.95), rgba(255, 120, 104, 0.88));
  color: #101827;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 16px 34px rgba(0, 0, 0, 0.3);
  transition:
    opacity 180ms ease,
    filter 180ms ease,
    transform 180ms ease;
}

.round-action:disabled {
  opacity: 0.38;
  filter: saturate(0.5);
  pointer-events: none;
}

.memory-count {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 248, 237, 0.2);
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.1);
  color: rgba(255, 248, 237, 0.84);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
  backdrop-filter: blur(14px);
}

.memory-love-final {
  position: relative;
  z-index: 3;
  display: grid;
  margin-top: 16px;
  place-items: center;
}

.memory-love-final.is-hidden {
  display: none;
}

.memory-love-button {
  position: relative;
  min-width: 170px;
  min-height: 58px;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 237, 0.58);
  border-radius: 999px;
  background:
    radial-gradient(circle at 26% 22%, rgba(255, 255, 255, 0.9), transparent 22%),
    linear-gradient(135deg, #ffc65c, #ff7868 48%, #f3a6a3);
  color: #101827;
  cursor: pointer;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(255, 120, 104, 0.34);
  animation: memoryLovePulse 1.7s ease-in-out infinite;
}

.memory-love-button::before,
.memory-love-button::after {
  content: "\2665";
  position: absolute;
  top: 50%;
  color: rgba(255, 248, 237, 0.84);
  font-size: 0.72rem;
  pointer-events: none;
}

.memory-love-button::before {
  left: 18px;
  transform: translateY(-50%) rotate(-12deg);
}

.memory-love-button::after {
  right: 18px;
  transform: translateY(-50%) rotate(12deg);
}

.memory-yo-mas {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 198, 92, 0.18), transparent 34%),
    rgba(9, 8, 14, 0.58);
  color: #fff8ed;
  font-size: clamp(3.4rem, 18vw, 5.4rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.9;
  text-align: center;
  text-shadow:
    0 2px 0 rgba(255, 120, 104, 0.55),
    0 22px 56px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
  animation: memoryYoMasIn 1500ms cubic-bezier(0.2, 0.82, 0.24, 1) both;
}

.memory-yo-mas.is-hidden {
  display: none;
}

.scene-letter {
  isolation: isolate;
  overflow: hidden;
  background:
    #02030a;
}

.scene-letter::before,
.scene-letter::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-letter::before {
  z-index: -2;
  background:
    url("./assets/cumple-12.jpeg") center center / cover no-repeat,
    radial-gradient(circle at 50% 22%, rgba(17, 54, 255, 0.34), transparent 44%),
    #02030a;
}

.scene-letter::after {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(2, 3, 10, 0.08), rgba(2, 3, 10, 0.24) 40%, rgba(2, 3, 10, 0.68)),
    linear-gradient(90deg, rgba(2, 3, 10, 0.46), rgba(2, 3, 10, 0.08) 48%, rgba(2, 3, 10, 0.5));
}

.letter-paper {
  position: relative;
  z-index: 1;
  min-height: 334px;
  padding: 18px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.letter-paper p {
  min-height: 260px;
  margin: 0;
  color: rgba(255, 248, 237, 0.96);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.58;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.82),
    0 12px 28px rgba(0, 0, 0, 0.68);
}

.final-actions {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 18px;
  place-items: center;
}

.restart-action {
  min-width: min(100%, 260px);
  border: 1px solid rgba(255, 248, 237, 0.48);
  border-radius: 999px;
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.86), transparent 24%),
    linear-gradient(135deg, rgba(107, 215, 209, 0.94), rgba(255, 198, 92, 0.96) 44%, rgba(255, 120, 104, 0.94));
  color: #101827;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    0 18px 42px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(17, 54, 255, 0.24);
  animation: restartGlow 2.2s ease-in-out infinite;
}

.finish-action {
  min-width: min(100%, 210px);
  min-height: 48px;
  border: 1px solid rgba(255, 248, 237, 0.36);
  border-radius: 999px;
  background: rgba(2, 3, 10, 0.44);
  color: rgba(255, 248, 237, 0.94);
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 14px 32px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(12px);
}

.scene-dots {
  position: absolute;
  right: 15px;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  left: 15px;
  z-index: 5;
  display: flex;
  height: 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}

.scene-dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 248, 237, 0.34);
  cursor: pointer;
  pointer-events: auto;
  transition: width 180ms ease, background-color 180ms ease;
}

.scene-dots button.is-active {
  width: 26px;
  background: var(--cream);
}

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

@keyframes buttonLabelVanish {
  to {
    opacity: 0;
    transform: scale(0.72);
    filter: blur(4px);
  }
}

@keyframes heartLobes {
  0%,
  48% {
    opacity: 0;
    transform: scale(0.2);
  }
  56%,
  86% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.06);
  }
}

@keyframes paperHeartFlight {
  0% {
    border-radius: 8px;
    background: var(--cream);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    opacity: 1;
    transform: translateX(-50%) rotate(0deg) scale(1);
  }
  24% {
    border-radius: 28px;
    background:
      linear-gradient(42deg, rgba(82, 55, 30, 0.18) 0 2px, transparent 2px 10px),
      radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.82), transparent 20%),
      #fff7e8;
    transform: translateX(-50%) translateY(-8px) rotate(5deg) scale(0.58, 0.86);
  }
  48% {
    border-radius: 56% 43% 48% 52%;
    background:
      linear-gradient(118deg, rgba(85, 58, 34, 0.16) 0 2px, transparent 2px 11px),
      radial-gradient(circle at 64% 35%, rgba(255, 255, 255, 0.92), transparent 17%),
      #fff4df;
    box-shadow:
      inset 8px 5px 12px rgba(255, 255, 255, 0.55),
      inset -10px -12px 16px rgba(116, 78, 38, 0.18),
      0 18px 42px rgba(0, 0, 0, 0.3);
    transform: translateX(-50%) translateY(-22px) rotate(-11deg) scale(0.17, 0.86);
  }
  68% {
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    transform: translateX(-50%) translateY(-148px) rotate(0deg) scale(0.075);
  }
  88% {
    opacity: 1;
    transform: translateX(-50%) translateY(-285px) rotate(-6deg) scale(0.075);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-316px) rotate(8deg) scale(0.075);
  }
}

@keyframes introHeartPop {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.22) rotate(-10deg);
  }
  16% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08) rotate(4deg);
  }
  42% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.94) rotate(-2deg);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.18) rotate(2deg);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.68) rotate(9deg);
  }
}

@keyframes heartPulseRing {
  42% {
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(255, 243, 220, 0.34);
  }
  64% {
    opacity: 0.72;
    box-shadow: 0 0 0 14px rgba(255, 243, 220, 0.18);
  }
  100% {
    opacity: 0;
    box-shadow: 0 0 0 44px rgba(255, 243, 220, 0);
  }
}

@keyframes flowerBlast {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.1) rotate(0deg);
  }
  8% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.42) rotate(calc(var(--spin) * 0.04));
  }
  74% {
    opacity: 0.94;
  }
  100% {
    opacity: 0;
    transform:
      translate(-50%, -50%)
      translate(var(--tx), var(--ty))
      scale(var(--scale))
      rotate(var(--spin));
  }
}

@keyframes videoBlurLift {
  0% {
    filter: blur(24px) brightness(0.5) saturate(0.9);
    transform: scale(1.12);
  }
  100% {
    filter: blur(0) brightness(0.96) saturate(1);
    transform: scale(1.02);
  }
}

@keyframes videoTitleFloat {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(18px) scale(0.96);
  }
  18%,
  42% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
  72% {
    opacity: 0.42;
    filter: blur(4px);
    transform: translateY(-10px) scale(0.99);
  }
  100% {
    opacity: 0;
    filter: blur(9px);
    transform: translateY(-24px) scale(0.96);
  }
}

@keyframes videoHeartWind {
  0% {
    opacity: 0;
    transform: translateX(-18vw) translateY(0) rotate(var(--rot)) scale(0.86);
  }
  10%,
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(124vw) translateY(-18px) rotate(calc(var(--rot) + 28deg)) scale(1.04);
  }
}

@keyframes reasonCosmicIn {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(18px) scale(0.96);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes memoryBackdropShift {
  0% {
    background-position:
      0% 0%,
      100% 0%,
      70% 100%,
      0 0,
      0 0;
  }
  100% {
    background-position:
      24% 18%,
      78% 28%,
      44% 86%,
      0 0,
      0 0;
  }
}

@keyframes memoryTextureFloat {
  0% {
    background-position: 0 0, 24px 18px, 0 0, 0 0;
  }
  100% {
    background-position: 148px 104px, -88px 132px, 72px 108px, 72px 108px;
  }
}

@keyframes memoryHeartsWind {
  0% {
    opacity: 0;
    transform: translateX(-58%) translateY(28px) rotate(-8deg);
  }
  10%,
  82% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-34%) translateY(-52px) rotate(12deg);
  }
}

@keyframes memoryShootingHeart {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(var(--angle)) scale(0.78);
  }
  8%,
  76% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(156vw + 260px), var(--fall), 0) rotate(var(--angle)) scale(1.04);
  }
}

@keyframes memoryGridDrift {
  0% {
    background-position: 0 0, 0 0;
  }
  100% {
    background-position: 72px 108px, 72px 108px;
  }
}

@keyframes memoryGlowDrift {
  0% {
    opacity: 0.86;
    transform: translate3d(-10px, -12px, 0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate3d(12px, 10px, 0) scale(1.04);
  }
}

@keyframes memoryItemIn {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(22px) scale(0.96);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

@keyframes memoryHeartDrift {
  0% {
    opacity: 0.54;
    transform: translate3d(-8px, 8px, 0) rotate(-8deg);
  }
  100% {
    opacity: 0.86;
    transform: translate3d(10px, -12px, 0) rotate(10deg);
  }
}

@keyframes memoryLovePulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.035);
  }
}

@keyframes memoryYoMasIn {
  0% {
    opacity: 0;
    filter: blur(14px);
    transform: scale(0.74);
  }
  24%,
  76% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
  100% {
    opacity: 0;
    filter: blur(10px);
    transform: scale(1.18);
  }
}

@keyframes restartGlow {
  0%,
  100% {
    filter: brightness(1);
    transform: translateY(0) scale(1);
  }
  50% {
    filter: brightness(1.08);
    transform: translateY(-3px) scale(1.025);
  }
}

@keyframes reasonActionsIn {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(28px) scale(0.94);
  }
  66% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(-12px) scale(1.02);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(-8px) scale(1);
  }
}

@keyframes reasonHeartsFloat {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(18px) scale(0.84) rotate(-8deg);
  }
  18%,
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-34px) scale(1.14) rotate(12deg);
  }
}

@keyframes reasonButtonShine {
  0%,
  36% {
    opacity: 0;
    transform: translateX(-62%) rotate(8deg);
  }
  48% {
    opacity: 0.9;
  }
  70%,
  100% {
    opacity: 0;
    transform: translateX(62%) rotate(8deg);
  }
}

@keyframes carouselImageReveal {
  0% {
    opacity: 0.18;
    filter: blur(22px) brightness(0.38) saturate(0.82);
    transform: scale(1.14);
  }
  40% {
    opacity: 0.22;
    filter: blur(22px) brightness(0.4) saturate(0.82);
    transform: scale(1.14);
  }
  68% {
    opacity: 0.78;
    filter: blur(7px) brightness(0.78) saturate(0.94);
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    filter: blur(0) brightness(0.96) saturate(1);
    transform: scale(1.02);
  }
}

@keyframes carouselMessageFade {
  0%,
  40% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(-50%) scale(1);
  }
  62% {
    opacity: 0.72;
    filter: blur(0.8px);
    transform: translateY(-50%) scale(0.99);
  }
  84% {
    opacity: 0.24;
    filter: blur(3px);
    transform: translateY(calc(-50% - 14px)) scale(0.97);
  }
  100% {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(calc(-50% - 28px)) scale(0.94);
  }
}

@keyframes finalMessageIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes finalButtonDrop {
  0% {
    opacity: 0;
    transform: translateY(-56vh) rotate(-3deg);
  }
  68% {
    opacity: 1;
    transform: translateY(10px) rotate(1deg);
  }
  84% {
    opacity: 1;
    transform: translateY(-7px) rotate(-0.5deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

@keyframes flame {
  from {
    transform: translateX(-50%) rotate(-3deg) scale(0.92);
  }
  to {
    transform: translateX(-50%) rotate(4deg) scale(1.04);
  }
}

@keyframes introCardFloat {
  from {
    transform: translate(-50%, -50%);
  }
  to {
    transform: translate(-50%, calc(-50% - 8px));
  }
}

@keyframes heroPhotoFloat {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-8px) scale(1.018);
  }
}

@keyframes glowBreath {
  from {
    transform: scale(0.96);
    opacity: 0.54;
  }
  to {
    transform: scale(1.08);
    opacity: 0.96;
  }
}

@keyframes sparkleDrift {
  0%,
  100% {
    opacity: 0.26;
    transform: translate3d(0, 0, 0) scale(0.78);
  }
  45% {
    opacity: 0.92;
    transform: translate3d(12px, -18px, 0) scale(1.22);
  }
}

@keyframes letterLand {
  0% {
    opacity: 0;
    transform: translate3d(var(--dx), var(--dy), 0) rotate(var(--rot)) scale(1.5);
    filter: blur(4px);
  }
  72% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1.04);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg) scale(1);
    filter: blur(0);
  }
}

@keyframes heartFly {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) rotate(0deg) scale(1);
  }
  45% {
    opacity: 1;
    transform: translateX(-50%) translateY(-94px) rotate(-10deg) scale(1.16);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-560px) rotate(18deg) scale(0.72);
  }
}

@media (max-width: 360px) {
  .scene {
    padding-right: 18px;
    padding-left: 18px;
  }

  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 2.35rem;
  }

  .reason-card p {
    font-size: 1.38rem;
  }
}

@media (max-width: 430px) {
  .icon-button {
    width: 38px;
    height: 38px;
  }

  .mini-brand {
    max-width: none;
    font-size: 0.72rem;
  }

  h1 {
    font-size: 2.42rem;
    line-height: 1.02;
  }
}

@media (max-width: 360px) {
  h1 {
    font-size: 2.3rem;
  }
}

@media (min-width: 760px) {
  body {
    display: grid;
    min-height: 100dvh;
    place-items: center;
    background:
      linear-gradient(135deg, rgba(107, 215, 209, 0.12), transparent 36%),
      linear-gradient(225deg, rgba(255, 120, 104, 0.16), transparent 42%),
      #0a101b;
  }

  .phone-frame {
    height: min(100dvh, 900px);
    max-height: 900px;
    border: 1px solid rgba(255, 248, 237, 0.1);
    border-radius: 8px;
  }
}

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