:root {
  --rose: #ff4d6d;
  --rose-soft: #ff8fa3;
  --blush: #fff0f3;
  --white: #ffffff;
  --pink-mist: #ffd6e0;
  --ink: #fff8fb;
  --muted: #ffd6e0;
  --glass: rgba(255, 255, 255, 0.13);
  --glass-strong: rgba(255, 255, 255, 0.2);
  --shadow: 0 24px 80px rgba(126, 18, 48, 0.22);
  --radius: 8px;
  --script: "Great Vibes", cursive;
  --body: "Poppins", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 77, 109, 0.35), transparent 24%),
    radial-gradient(circle at 75% 10%, rgba(255, 214, 224, 0.2), transparent 28%),
    linear-gradient(135deg, #210815 0%, #471629 48%, #170915 100%);
  overflow-x: hidden;
  transition: background 700ms ease, color 300ms ease;
}

button,
a,
input {
  font: inherit;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

#particlesCanvas,
#effectsCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#particlesCanvas {
  z-index: 0;
}

#effectsCanvas {
  z-index: 20;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 214, 224, 0.25), transparent 34%),
    linear-gradient(135deg, #210815, #471629, #170915);
  transition: opacity 600ms ease, visibility 600ms ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-heart {
  font-size: 58px;
  color: var(--rose);
  animation: heartbeat 1s infinite;
}

.loader-track {
  width: min(280px, 74vw);
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 77, 109, 0.16);
}

.loader-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose), var(--rose-soft), var(--white));
  animation: loadbar 1.9s ease forwards;
}

.topbar {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 30;
  display: flex;
  width: min(1120px, calc(100% - 28px));
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 16px 44px rgba(120, 12, 40, 0.12);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.brand {
  font-family: var(--script);
  font-size: 30px;
  color: var(--rose);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: rgba(255, 255, 255, 0.35);
  color: var(--rose);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.icon-button,
.music-button,
.modal-close,
.lightbox button {
  border: 1px solid rgba(255, 255, 255, 0.52);
  color: var(--rose);
  background: rgba(255, 255, 255, 0.48);
  box-shadow: 0 10px 26px rgba(126, 18, 48, 0.12);
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.menu-toggle {
  display: none;
}

.music-panel {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 35;
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 8px;
  align-items: center;
  width: min(360px, calc(100% - 28px));
  padding: 12px;
}

.music-button {
  min-height: 36px;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.volume-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

#volumeControl {
  grid-column: span 2;
  accent-color: var(--rose);
}

.glass {
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: var(--radius);
  background: var(--glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 112px max(20px, calc((100vw - 1120px) / 2)) 86px;
}

.landing {
  display: grid;
  min-height: 100svh;
  place-items: center;
  overflow: hidden;
  text-align: center;
}

.landing::before,
.ending::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 77, 109, 0.45) 0 1px, transparent 1.5px);
  background-position: 0 0, 42px 24px;
  background-size: 86px 86px, 112px 112px;
  animation: stars 24s linear infinite;
}

.landing-glow {
  position: absolute;
  width: min(620px, 92vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 143, 163, 0.3) 52%, transparent 70%);
  filter: blur(4px);
  animation: float 8s ease-in-out infinite;
}

.hero-copy {
  position: relative;
  max-width: 880px;
  padding: 28px 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1;
}

h1 {
  font-family: var(--script);
  font-size: clamp(76px, 13vw, 170px);
  font-weight: 400;
  color: var(--rose);
  text-shadow: 0 14px 42px rgba(255, 77, 109, 0.2);
}

h1 span {
  display: inline-block;
  animation: heartbeat 1.3s infinite;
}

.hero-copy h2,
.section-heading h2,
.ending-copy h2 {
  font-size: clamp(30px, 5vw, 62px);
  line-height: 1.08;
}

.quote {
  max-width: 680px;
  margin: 28px auto 34px;
  color: var(--muted);
  font-size: clamp(18px, 2.4vw, 26px);
}

.start-button,
.love-button,
.primary-action,
.quiz-grid button {
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--rose), var(--rose-soft));
  box-shadow: 0 18px 46px rgba(255, 77, 109, 0.34);
  font-weight: 800;
  transition: transform 240ms ease, box-shadow 240ms ease, filter 240ms ease;
}

.start-button,
.love-button {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 16px 30px;
  animation: pulseGlow 2s infinite;
}

.start-button:hover,
.love-button:hover,
.primary-action:hover,
.quiz-grid button:hover {
  filter: saturate(1.08);
  box-shadow: 0 24px 60px rgba(255, 77, 109, 0.42);
  transform: translateY(-3px);
}

.scroll-hint {
  position: absolute;
  bottom: 26px;
  font-size: 28px;
  color: var(--rose);
  animation: bounce 1.8s infinite;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-card {
  display: grid;
  min-height: 210px;
  place-items: center;
  padding: 26px;
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  text-align: center;
  transition: transform 260ms ease, background 260ms ease, box-shadow 260ms ease;
}

.feature-card span {
  font-size: 48px;
  filter: drop-shadow(0 12px 20px rgba(255, 77, 109, 0.24));
  transition: transform 260ms ease;
}

.feature-card strong {
  font-size: clamp(18px, 2.3vw, 25px);
}

.feature-card:hover,
.feature-card:focus-visible {
  background: var(--glass-strong);
  box-shadow: 0 34px 90px rgba(255, 77, 109, 0.25);
  transform: translateY(-8px) rotateX(3deg);
}

.feature-card:hover span {
  transform: translateY(-4px) scale(1.13);
}

.meter-card {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 46px);
  text-align: center;
}

.meter,
.gift-progress {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
}

.meter span,
.gift-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose), var(--rose-soft), var(--pink-mist));
  transition: width 500ms ease;
}

.meter-card strong {
  display: block;
  margin: 18px 0;
  color: var(--rose);
  font-size: clamp(38px, 7vw, 86px);
}

.meter-error {
  display: none;
  font-weight: 800;
}

.meter-error.show {
  display: block;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quiz-grid button {
  min-height: 72px;
  padding: 14px;
}

.quiz-result {
  min-height: 34px;
  margin: 24px 0 0;
  color: var(--rose);
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.ending {
  display: grid;
  place-items: center;
  color: white;
  text-align: center;
  background: linear-gradient(180deg, #170915 0%, #3a1025 52%, #0b0710 100%);
}

.ending-copy {
  position: relative;
  z-index: 2;
}

.ending-copy p {
  font-size: clamp(20px, 3vw, 30px);
}

.ending-copy strong {
  display: block;
  margin-bottom: 28px;
  font-family: var(--script);
  font-size: 58px;
  font-weight: 400;
  color: var(--pink-mist);
}

.experience-modal {
  --ink: #3d1720;
  --muted: #7c4451;
  width: min(920px, calc(100% - 28px));
  max-height: min(86vh, 900px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 240, 243, 0.78);
  box-shadow: 0 36px 120px rgba(64, 7, 24, 0.42);
  backdrop-filter: blur(24px);
  overflow: auto;
  overscroll-behavior: contain;
}

.experience-modal::backdrop {
  background: rgba(40, 4, 18, 0.55);
  backdrop-filter: blur(8px);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.lightbox button {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.modal-content {
  display: grid;
  justify-items: center;
  width: 100%;
  min-width: 0;
}

.modal-scene {
  display: grid;
  justify-items: center;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 58px clamp(18px, 5vw, 54px) 50px;
  overflow-x: hidden;
  text-align: center;
}

.modal-scene h2 {
  font-family: var(--script);
  font-size: clamp(48px, 8vw, 86px);
  font-weight: 400;
  color: var(--rose);
}

.modal-scene p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.modal-scene strong {
  color: var(--rose);
  font-size: clamp(22px, 3vw, 34px);
}

.cake {
  position: relative;
  width: 220px;
  height: 210px;
}

.cake-base,
.cake-top,
.plate,
.candle {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.cake-base {
  bottom: 42px;
  width: 190px;
  height: 88px;
  border-radius: 16px 16px 32px 32px;
  background: linear-gradient(180deg, #ff8fa3, #ff4d6d);
  box-shadow: inset 0 -12px 0 rgba(126, 18, 48, 0.12);
}

.cake-top {
  bottom: 116px;
  width: 166px;
  height: 52px;
  border-radius: 24px 24px 14px 14px;
  background: linear-gradient(180deg, #fff, #ffd6e0);
}

.plate {
  bottom: 26px;
  width: 230px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
}

.candle {
  bottom: 166px;
  width: 14px;
  height: 46px;
  border-radius: 8px;
  background: repeating-linear-gradient(45deg, #fff 0 7px, #ff4d6d 7px 14px);
}

.candle span {
  position: absolute;
  top: -27px;
  left: 50%;
  width: 20px;
  height: 28px;
  border-radius: 60% 60% 45% 45%;
  background: #ffd166;
  box-shadow: 0 0 28px #ffd166;
  transform: translateX(-50%);
  animation: flame 900ms infinite alternate;
}

.envelope {
  position: relative;
  width: min(340px, 78vw);
  height: 220px;
  border: 0;
  background: transparent;
}

.envelope::before,
.envelope::after,
.flap,
.paper {
  position: absolute;
  inset: 0;
  content: "";
}

.envelope::before {
  border-radius: 8px;
  background: linear-gradient(135deg, #fff, #ffd6e0);
  box-shadow: var(--shadow);
}

.envelope::after {
  clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%);
  border-radius: 8px;
  background: linear-gradient(135deg, #ff8fa3, #ff4d6d);
}

.flap {
  z-index: 3;
  transform-origin: top;
  clip-path: polygon(0 0, 50% 58%, 100% 0);
  background: #fff0f3;
  transition: transform 600ms ease;
}

.paper {
  inset: auto 22px 24px;
  z-index: 1;
  height: 150px;
  border-radius: 8px;
  background: white;
  transform: translateY(60px);
  transition: transform 700ms ease;
}

.heart-seal {
  position: absolute;
  z-index: 4;
  top: 96px;
  left: 50%;
  color: white;
  font-size: 34px;
  transform: translateX(-50%);
}

.envelope.open .flap {
  transform: rotateX(180deg);
}

.envelope.open .paper {
  transform: translateY(-92px);
}

.typed-letter {
  display: none;
  width: min(680px, 100%);
  min-height: 250px;
  padding: 28px;
  color: var(--ink);
  text-align: left;
  white-space: pre-line;
  line-height: 1.8;
}

.typed-letter.show {
  display: block;
}

.small-note {
  font-size: 14px !important;
}

.gallery-grid {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 18px 46px rgba(126, 18, 48, 0.14);
  cursor: zoom-in;
  transition: transform 220ms ease;
}

.gallery-grid figure:hover {
  transform: translateY(-5px);
}

.gallery-grid img,
.photo-fallback {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.photo-fallback {
  display: grid;
  place-items: center;
  color: white;
  font-family: var(--script);
  font-size: 80px;
  background:
    linear-gradient(135deg, rgba(255, 77, 109, 0.88), rgba(255, 143, 163, 0.72)),
    radial-gradient(circle at 20% 20%, white, transparent 24%);
}

.gallery-grid figcaption {
  padding: 13px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.joke-card {
  width: min(620px, 100%);
  padding: 28px;
}

.beauty-level {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 700;
}

.primary-action {
  min-height: 50px;
  padding: 13px 24px;
}

.gift {
  position: relative;
  width: 210px;
  height: 210px;
  border: 0;
  background: transparent;
}

.gift-box,
.gift-lid {
  position: absolute;
  left: 50%;
  width: 170px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--rose), var(--rose-soft));
  transform: translateX(-50%);
  box-shadow: var(--shadow);
  transition: transform 600ms ease;
}

.gift-box {
  bottom: 20px;
  height: 120px;
}

.gift-lid {
  top: 42px;
  height: 42px;
}

.gift-ribbon {
  position: absolute;
  top: 42px;
  left: 50%;
  z-index: 2;
  width: 34px;
  height: 158px;
  background: white;
  transform: translateX(-50%);
}

.gift.open .gift-lid {
  transform: translate(-50%, -48px) rotate(-9deg);
}

.gift-message {
  display: none;
  width: min(620px, 100%);
}

.gift-message.show {
  display: grid;
  gap: 14px;
}

.timeline {
  position: relative;
  display: grid;
  width: min(680px, 100%);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 3px;
  content: "";
  background: linear-gradient(var(--rose), var(--rose-soft));
}

.timeline li {
  position: relative;
  min-height: 54px;
  padding-left: 70px;
  text-align: left;
  animation: slideIn 700ms ease both;
}

.timeline li::before {
  position: absolute;
  top: 2px;
  left: 8px;
  width: 34px;
  height: 34px;
  border: 4px solid white;
  border-radius: 50%;
  content: "";
  background: var(--rose);
  box-shadow: 0 0 0 7px rgba(255, 77, 109, 0.12);
}

.timeline span {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  font-weight: 800;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 24px;
  color: white;
  background: rgba(25, 3, 12, 0.78);
  backdrop-filter: blur(10px);
}

.lightbox.show {
  display: grid;
}

.lightbox img {
  max-width: min(880px, 92vw);
  max-height: 74vh;
  border-radius: 8px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.34);
}

.lightbox-placeholder {
  display: none;
  width: min(520px, 86vw);
  aspect-ratio: 4 / 3;
  place-items: center;
  border-radius: 8px;
  color: white;
  font-family: var(--script);
  font-size: clamp(58px, 15vw, 120px);
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.92), rgba(255, 143, 163, 0.74));
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.34);
}

.lightbox p {
  max-width: 780px;
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 114px;
  z-index: 90;
  max-width: min(520px, calc(100% - 32px));
  padding: 14px 18px;
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.moon {
  position: fixed;
  top: 96px;
  right: 34px;
  z-index: 4;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #ffe6ad 62%, #f5c461);
  box-shadow: 0 0 34px rgba(255, 230, 173, 0.9);
  cursor: pointer;
}

.secret-input {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  color: rgba(124, 68, 81, 0.62);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.not-found {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}

.not-found-wrap {
  width: min(540px, 100%);
  padding: 42px;
  text-align: center;
}

.not-found-wrap h1 {
  font-size: 110px;
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  30% {
    transform: scale(1.14);
  }
  55% {
    transform: scale(0.95);
  }
}

@keyframes loadbar {
  to {
    width: 100%;
  }
}

@keyframes stars {
  to {
    background-position: 300px 600px, 420px 520px;
  }
}

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

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 18px 46px rgba(255, 77, 109, 0.34);
  }
  50% {
    box-shadow: 0 22px 70px rgba(255, 77, 109, 0.55);
  }
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@keyframes flame {
  from {
    transform: translateX(-50%) rotate(-4deg) scale(1);
  }
  to {
    transform: translateX(-50%) rotate(5deg) scale(1.12);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-22px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 860px) {
  .topbar {
    align-items: center;
    border-radius: 24px;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    display: none;
    margin: 0 10px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(33, 8, 21, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
  }

  .nav-links.open {
    display: grid;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

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

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

  .music-panel {
    left: 14px;
    right: 14px;
    bottom: 12px;
    width: auto;
  }

  .experience-modal {
    width: min(760px, calc(100vw - 22px));
    max-height: calc(100svh - 22px);
    border-radius: 16px;
  }
}

@media (max-width: 560px) {
  .section {
    padding-top: 106px;
    padding-bottom: 104px;
  }

  .hero-copy {
    padding-inline: 0;
  }

  .card-grid,
  .gallery-grid,
  .quiz-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 150px;
  }

  .music-panel {
    grid-template-columns: repeat(3, 1fr);
  }

  .music-button {
    padding: 8px 6px;
  }

  .beauty-level {
    display: grid;
  }

  .moon {
    right: 18px;
    width: 38px;
    height: 38px;
  }

  .brand {
    font-size: 25px;
  }

  .topbar {
    top: 10px;
    width: calc(100% - 20px);
    min-height: 54px;
    padding: 8px 10px 8px 15px;
  }

  .experience-modal {
    width: calc(100vw - 16px);
    max-height: calc(100svh - 16px);
    border-radius: 14px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }

  .modal-scene {
    gap: 16px;
    padding: 54px 12px 32px;
  }

  .modal-scene h2 {
    max-width: calc(100vw - 72px);
    font-size: clamp(38px, 12vw, 58px);
    line-height: 1.02;
  }

  .modal-scene p {
    font-size: 16px;
    line-height: 1.65;
  }
}

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

.site-footer {
  position: relative;
  z-index: 2;
  padding: 18px 20px 120px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.upgraded-wish {
  transition: background 900ms ease, color 900ms ease;
}

.upgraded-wish.room-dark {
  border-radius: 18px;
  background: radial-gradient(circle at 50% 25%, rgba(255, 214, 224, 0.3), rgba(34, 8, 21, 0.9) 74%);
}

.cake-room {
  position: relative;
  display: grid;
  width: min(560px, 92vw);
  min-height: 430px;
  place-items: center;
  perspective: 900px;
}

.premium-cake {
  position: relative;
  --cake-scale: 1;
  width: min(410px, 84vw);
  height: 380px;
  transform: scale(var(--cake-scale)) rotateX(8deg);
  transform-style: preserve-3d;
  animation: cakeFloat 4s ease-in-out infinite;
}

.cake-sign {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 6;
  min-width: 220px;
  padding: 10px 18px;
  border: 1px solid rgba(255, 209, 102, 0.8);
  border-radius: 8px;
  color: #8b4a06;
  background: linear-gradient(135deg, #fff9db, #ffd166);
  box-shadow: 0 16px 36px rgba(139, 74, 6, 0.22);
  font-family: var(--script);
  font-size: 30px;
  line-height: 1;
  transform: translateX(-50%);
}

.cake-sign span {
  font-family: var(--body);
  font-size: 16px;
  font-weight: 800;
}

.candle-row {
  position: absolute;
  top: 95px;
  left: 50%;
  z-index: 8;
  display: flex;
  gap: 22px;
  transform: translateX(-50%);
}

.wish-candle {
  position: relative;
  width: 15px;
  height: 58px;
  border-radius: 999px;
  background: repeating-linear-gradient(45deg, #fff 0 8px, #ff4d6d 8px 16px);
  box-shadow: inset -4px 0 rgba(126, 18, 48, 0.12);
}

.wish-candle span {
  position: absolute;
  top: -28px;
  left: 50%;
  width: 20px;
  height: 30px;
  border-radius: 52% 52% 46% 46%;
  background: radial-gradient(circle at 50% 30%, #fff, #ffd166 44%, #ff8c00 72%);
  box-shadow: 0 0 24px #ffd166, 0 0 42px rgba(255, 77, 109, 0.45);
  transform: translateX(-50%);
  animation: naturalFlame 560ms ease-in-out infinite alternate;
}

.premium-cake.blown .wish-candle span {
  opacity: 0;
  transform: translateX(-50%) translateY(8px) scale(0.25);
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.premium-cake.blown .wish-candle::after {
  position: absolute;
  top: -32px;
  left: 50%;
  width: 18px;
  height: 44px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.72), transparent 68%);
  filter: blur(3px);
  opacity: 0;
  transform: translateX(-50%);
  animation: smokeRise 2.3s ease-out forwards;
}

.cake-layer {
  position: absolute;
  left: 50%;
  overflow: hidden;
  border-radius: 50% / 18%;
  background: linear-gradient(180deg, #fff8fb 0 16%, #ff8fa3 17% 58%, #ff4d6d 59%);
  box-shadow: inset 0 -24px 0 rgba(126, 18, 48, 0.12), 0 22px 52px rgba(126, 18, 48, 0.24);
  transform: translateX(-50%);
  animation: layerGlow 3s ease-in-out infinite alternate;
}

.cake-layer::before {
  position: absolute;
  inset: 0 0 auto;
  height: 32px;
  content: "";
  background:
    radial-gradient(circle at 18% 0, #6f2c20 0 18px, transparent 19px),
    radial-gradient(circle at 38% 0, #6f2c20 0 24px, transparent 25px),
    radial-gradient(circle at 62% 0, #6f2c20 0 18px, transparent 19px),
    radial-gradient(circle at 83% 0, #6f2c20 0 25px, transparent 26px),
    linear-gradient(#7a3023, #4e1d16);
}

.cake-layer::after {
  position: absolute;
  inset: 38px 24px auto;
  height: 10px;
  border-radius: 999px;
  content: "";
  background: linear-gradient(90deg, #ffd166, #fff2b2, #ffd166);
  box-shadow: 0 38px 0 #ffd166;
}

.cake-layer b {
  position: absolute;
  inset: auto 18px 18px;
  height: 18px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 10% 50%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 30% 50%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 56% 50%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 78% 50%, #fff 0 3px, transparent 4px),
    linear-gradient(90deg, #ffcad6, #fff0f3);
}

.layer-top {
  top: 135px;
  width: 250px;
  height: 82px;
  z-index: 5;
}

.layer-mid {
  top: 198px;
  width: 318px;
  height: 100px;
  z-index: 4;
}

.layer-bottom {
  top: 275px;
  width: 390px;
  height: 118px;
  z-index: 3;
}

.cake-flowers {
  position: absolute;
  top: 230px;
  left: 50%;
  z-index: 9;
  display: flex;
  width: min(360px, 76vw);
  justify-content: space-between;
  font-size: 28px;
  filter: drop-shadow(0 8px 10px rgba(126, 18, 48, 0.24));
  transform: translateX(-50%);
}

.cake-plate-gold {
  position: absolute;
  bottom: -24px;
  left: 50%;
  z-index: 1;
  width: min(430px, 88vw);
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(90deg, #c89116, #fff1a6, #c89116);
  box-shadow: 0 22px 42px rgba(126, 18, 48, 0.18);
  transform: translateX(-50%);
}

.wish-message {
  display: none;
  width: min(720px, 100%);
  max-width: 100%;
  min-width: 0;
  padding: clamp(22px, 4vw, 38px);
  overflow: hidden;
  text-align: center;
}

.wish-message.show {
  display: grid;
  gap: 18px;
}

.make-wish {
  color: var(--rose) !important;
  font-size: clamp(24px, 4vw, 38px) !important;
  font-weight: 800;
}

.wish-letter {
  display: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  color: var(--ink);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
  overflow-wrap: break-word;
  white-space: normal;
}

.wish-letter.show {
  display: block;
  animation: fadeUp 900ms ease both;
}

.roast-corner {
  --roast-bg: rgba(255, 240, 243, 0.64);
  border-radius: 18px;
  background: var(--roast-bg);
  transition: background 320ms ease;
}

.speech-stage {
  display: grid;
  width: min(680px, 100%);
  justify-items: center;
  gap: 16px;
  padding: 14px 0;
}

.emoji-reaction {
  min-height: 72px;
  font-size: clamp(44px, 8vw, 72px);
  filter: drop-shadow(0 12px 18px rgba(255, 77, 109, 0.22));
}

.emoji-reaction.pop {
  animation: emojiPop 420ms ease both;
}

.speech-bubble {
  position: relative;
  width: min(640px, 100%);
  min-height: 150px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 28px 28px 28px 8px;
  color: #3d1720;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 26px 70px rgba(126, 18, 48, 0.18);
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 800;
  line-height: 1.5;
}

.speech-bubble::after {
  position: absolute;
  bottom: -20px;
  left: 38px;
  width: 36px;
  height: 36px;
  content: "";
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.speech-bubble.bounce {
  animation: bubbleBounce 460ms cubic-bezier(.2, 1.35, .4, 1) both;
}

.roast-love-check {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 10px;
}

.roast-love-check p {
  color: var(--ink);
  font-weight: 800;
}

.roast-love-check strong {
  min-height: 42px;
}

.floating-love-note {
  position: fixed;
  z-index: 45;
  display: none;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  font-size: 26px;
  cursor: pointer;
  animation: noteFloat 2s ease-in-out infinite;
}

.floating-love-note.show {
  display: grid;
}

.final-epilogue {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 26px;
  color: white;
  background: #000;
  text-align: center;
}

.final-epilogue.show {
  display: grid;
  animation: fadeUp 1.4s ease both;
}

.epilogue-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.95) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,214,224,.8) 0 1px, transparent 1.5px);
  background-size: 80px 80px, 126px 126px;
  animation: stars 26s linear infinite;
}

#epilogueText {
  position: relative;
  z-index: 2;
  max-width: 820px;
  min-height: 360px;
  white-space: pre-line;
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1.65;
}

.forever-heart {
  position: absolute;
  z-index: 3;
  bottom: 10vh;
  display: none;
  font-size: clamp(70px, 18vw, 150px);
  text-shadow: 0 0 34px rgba(255, 77, 109, 0.9);
  animation: heartbeat 1.2s infinite;
}

.forever-heart.show {
  display: block;
}

@keyframes naturalFlame {
  0% {
    transform: translateX(-50%) rotate(-7deg) scale(1, 1.05);
  }
  50% {
    transform: translateX(-50%) rotate(3deg) scale(.92, 1.18);
  }
  100% {
    transform: translateX(-50%) rotate(8deg) scale(1.08, .94);
  }
}

@keyframes smokeRise {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(14px) scale(.5);
  }
  22% {
    opacity: .85;
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-58px) scale(1.8);
  }
}

@keyframes cakeFloat {
  0%,
  100% {
    transform: scale(var(--cake-scale, 1)) rotateX(8deg) translateY(0);
  }
  50% {
    transform: scale(var(--cake-scale, 1)) rotateX(8deg) translateY(-10px);
  }
}

@keyframes layerGlow {
  from {
    filter: brightness(1);
  }
  to {
    filter: brightness(1.08);
  }
}

@keyframes bubbleBounce {
  0% {
    opacity: .2;
    transform: translateY(18px) scale(.92) rotate(-1deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes emojiPop {
  0% {
    transform: scale(.3) rotate(-18deg);
  }
  70% {
    transform: scale(1.18) rotate(8deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

@keyframes noteFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-9px) scale(1.05);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 560px) {
  .cake-room {
    width: min(100%, 410px);
    min-height: 286px;
    max-width: calc(100vw - 56px);
    overflow: hidden;
    place-items: start center;
  }

  .premium-cake {
    --cake-scale: .66;
    width: 410px;
    height: 380px;
    transform-origin: center top;
  }

  .premium-cake.blown {
    --cake-scale: .66;
  }

  .cake-sign {
    min-width: 204px;
    font-size: 27px;
  }

  .wish-message {
    width: min(100%, calc(100vw - 48px));
    padding: 20px 12px;
    justify-self: center;
  }

  .make-wish {
    font-size: clamp(24px, 8vw, 34px) !important;
    line-height: 1.25 !important;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .wish-letter {
    width: 100%;
    max-width: 100%;
    font-size: 16px;
    line-height: 1.7;
    overflow-wrap: break-word;
    word-break: normal;
    text-align: center;
  }

  .speech-bubble {
    min-height: 180px;
  }

  .site-footer {
    padding-bottom: 140px;
  }
}
