:root {
  --bg-1: #250712;
  --bg-2: #5e0d25;
  --bg-3: #ffc7d9;
  --pink-soft: #ffd7e5;
  --pink-rose: #ff8fb1;
  --red-deep: #a10f33;
  --lavender: #d8c2ff;
  --rose-gold: #f5c3ad;
  --gold-glow: #ffd98c;
  --white-soft: rgba(255, 255, 255, 0.92);
  --glass-bg: rgba(255, 255, 255, 0.14);
  --glass-stroke: rgba(255, 255, 255, 0.24);
  --shadow-soft: 0 24px 80px rgba(18, 4, 16, 0.32);
  --shadow-glow: 0 0 60px rgba(255, 182, 201, 0.32);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Manrope", sans-serif;
  color: var(--white-soft);
  background:
    radial-gradient(circle at top left, rgba(255, 178, 212, 0.14), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 217, 140, 0.1), transparent 24%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2) 42%, #3f0c28 78%, #12020d 100%);
  cursor: default;
}

body.is-mobile {
  -webkit-tap-highlight-color: transparent;
}

body.is-loading {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 199, 217, 0.08), transparent 30%),
    linear-gradient(315deg, rgba(216, 194, 255, 0.08), transparent 30%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: -1;
}

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

button {
  font: inherit;
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  background:
    radial-gradient(circle at center, rgba(255, 196, 214, 0.12), transparent 30%),
    linear-gradient(135deg, rgba(31, 4, 17, 0.98), rgba(73, 12, 34, 0.96));
  transition:
    opacity 0.9s var(--ease-soft),
    visibility 0.9s var(--ease-soft);
}

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

.loading-heart-wrap {
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 215, 229, 0.26), transparent 65%);
  box-shadow: 0 0 70px rgba(255, 146, 176, 0.24);
}

.loading-heart {
  position: relative;
  width: 72px;
  height: 72px;
  background: linear-gradient(180deg, #ff7aa3, #f02b66);
  transform: rotate(-45deg);
  animation: heartbeat 1.4s infinite;
  box-shadow:
    0 0 28px rgba(255, 119, 165, 0.6),
    0 0 60px rgba(255, 119, 165, 0.3);
}

.loading-heart::before,
.loading-heart::after {
  content: "";
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: inherit;
}

.loading-heart::before {
  top: -36px;
  left: 0;
}

.loading-heart::after {
  left: 36px;
  top: 0;
}

.loading-title,
.loading-subtitle {
  margin: 0;
  text-align: center;
}

.loading-title {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.04em;
}

.loading-subtitle {
  color: rgba(255, 236, 242, 0.72);
  font-size: 1rem;
}

.background-shell,
.ambient-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.background-shell {
  overflow: hidden;
  z-index: -2;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.48;
  animation: drift 18s ease-in-out infinite alternate;
}

.orb-one {
  top: -8%;
  left: -8%;
  width: 34vw;
  height: 34vw;
  min-width: 280px;
  min-height: 280px;
  background: radial-gradient(circle, rgba(255, 143, 177, 0.56), transparent 70%);
}

.orb-two {
  right: -6%;
  top: 18%;
  width: 28vw;
  height: 28vw;
  min-width: 260px;
  min-height: 260px;
  background: radial-gradient(circle, rgba(216, 194, 255, 0.54), transparent 70%);
  animation-delay: -8s;
}

.orb-three {
  bottom: -14%;
  left: 18%;
  width: 36vw;
  height: 36vw;
  min-width: 300px;
  min-height: 300px;
  background: radial-gradient(circle, rgba(255, 217, 140, 0.34), transparent 72%);
  animation-delay: -4s;
}

.page-shell {
  position: relative;
  z-index: 1;
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-section {
  min-height: 100svh;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 96px 0 72px;
  position: relative;
}

.hero-glow {
  position: absolute;
  width: min(680px, 88vw);
  height: min(680px, 88vw);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 173, 201, 0.12), transparent 62%);
  filter: blur(10px);
  z-index: -1;
}

.hero-heart {
  width: clamp(120px, 16vw, 172px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  margin-bottom: 22px;
  font-size: clamp(4rem, 8vw, 6rem);
  color: #ffd9e7;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.28), transparent 48%),
    linear-gradient(135deg, rgba(255, 147, 181, 0.18), rgba(245, 195, 173, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 70px rgba(255, 128, 168, 0.34);
  animation: floatingPulse 4.2s ease-in-out infinite;
}

.eyebrow,
.section-kicker,
.section-note {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: rgba(255, 229, 237, 0.74);
  font-size: 0.79rem;
  font-weight: 700;
}

.hero-section h1,
.story-section h2,
.ending-section h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.01em;
}

.hero-section h1 {
  max-width: 10ch;
  font-size: clamp(3.7rem, 10vw, 7.2rem);
  text-shadow: 0 10px 40px rgba(255, 151, 184, 0.25);
}

.typing-line {
  min-height: 1.8em;
  margin: 20px auto 0;
  max-width: 580px;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  color: rgba(255, 241, 245, 0.86);
}

.typing-line::after,
.typed-message.typing::after,
.letter-content.typing::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.1em;
  margin-left: 8px;
  vertical-align: -2px;
  background: rgba(255, 246, 248, 0.9);
  animation: blink 0.9s steps(1) infinite;
}

.primary-button,
.secondary-button,
.music-toggle {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff8fb;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, rgba(255, 126, 166, 0.46), rgba(245, 195, 173, 0.24));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 18px 36px rgba(18, 4, 16, 0.2),
    0 0 34px rgba(255, 160, 188, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    transform 0.35s var(--ease-soft),
    box-shadow 0.35s var(--ease-soft),
    border-color 0.35s var(--ease-soft);
  cursor: pointer;
}

.primary-button::before,
.secondary-button::before,
.music-toggle::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.18), transparent 48%, rgba(255, 217, 140, 0.14));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.primary-button:hover,
.secondary-button:hover,
.music-toggle:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 22px 50px rgba(18, 4, 16, 0.26),
    0 0 42px rgba(255, 171, 198, 0.28);
}

.primary-button:hover::before,
.secondary-button:hover::before,
.music-toggle:hover::before {
  opacity: 1;
}

.primary-button:active,
.secondary-button:active,
.music-toggle:active {
  transform: translateY(-1px) scale(0.99);
}

.primary-button,
.secondary-button {
  min-height: 58px;
  padding: 16px 28px;
  font-weight: 700;
  font-size: 1rem;
}

.secondary-button {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.07)),
    linear-gradient(135deg, rgba(255, 137, 176, 0.28), rgba(216, 194, 255, 0.18));
}

.highlight-button {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 18px 36px rgba(18, 4, 16, 0.22),
    0 0 48px rgba(255, 211, 153, 0.26);
}

.music-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 18px;
  font-weight: 700;
}

.glass-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 36px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08)),
    var(--glass-bg);
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 42%);
  pointer-events: none;
}

.story-section {
  padding: 44px 0;
}

.story-step.is-locked {
  display: none;
}

.story-step.is-unlocked {
  display: block;
}

.intro-card,
.message-card,
.gallery-card,
.letter-section,
.question-card {
  max-width: 920px;
  margin: 0 auto;
}

.name-line,
.story-section h2,
.ending-section h2 {
  font-size: clamp(2.3rem, 6vw, 4.4rem);
}

.section-note {
  margin: 16px 0 0;
  text-transform: none;
  letter-spacing: 0.01em;
  color: rgba(255, 240, 245, 0.8);
  font-size: 1rem;
}

.typed-message,
.letter-content {
  white-space: pre-line;
  font-size: 1.12rem;
  line-height: 1.9;
  color: rgba(255, 246, 248, 0.88);
}

.split-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.quote-card blockquote {
  min-height: 160px;
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  color: #fff5f8;
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.quote-card blockquote.is-fading {
  opacity: 0;
  transform: translateY(14px);
}

.meter-card {
  display: grid;
  place-items: center;
  gap: 18px;
}

.meter-ring {
  position: relative;
  width: 210px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.12), transparent 58%),
    conic-gradient(from 0deg, rgba(255, 143, 177, 0.95), rgba(245, 195, 173, 0.78), rgba(216, 194, 255, 0.9), rgba(255, 143, 177, 0.95));
  box-shadow: 0 0 52px rgba(255, 165, 193, 0.18);
}

.meter-ring::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(42, 8, 20, 0.84), rgba(25, 4, 14, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.meter-glow {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(255, 176, 202, 0.28);
}

.meter-value {
  position: relative;
  z-index: 1;
  text-align: center;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.meter-bar {
  width: min(100%, 320px);
  height: 14px;
  border-radius: 999px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.14);
}

.meter-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7da5, #ffd98c);
  box-shadow: 0 0 26px rgba(255, 176, 202, 0.3);
  transition: width 0.8s var(--ease-soft);
}

.playful-buttons,
.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.step-button {
  margin-top: 28px;
}

.step-action {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.runaway-button.is-running {
  position: relative;
  transition: transform 0.2s ease;
}

.result-message,
.final-response {
  min-height: 1.6em;
  margin: 24px 0 0;
  text-align: center;
  font-size: 1.06rem;
  color: rgba(255, 239, 245, 0.84);
}

.letter-trigger {
  display: inline-flex;
  margin-bottom: 28px;
}

.envelope-shell {
  display: none;
  perspective: 1200px;
  margin-top: 8px;
}

.envelope-shell.is-open {
  display: block;
}

.envelope {
  position: relative;
  width: min(100%, 620px);
  height: 420px;
  margin: 0 auto;
}

.envelope-back,
.envelope-flap {
  position: absolute;
  inset: auto 0 0;
  height: 260px;
  border-radius: 0 0 28px 28px;
  background: linear-gradient(160deg, rgba(255, 230, 237, 0.84), rgba(245, 195, 173, 0.7));
  box-shadow: 0 22px 40px rgba(16, 3, 12, 0.18);
}

.envelope-back::before,
.envelope-back::after {
  content: "";
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(160deg, rgba(255, 216, 228, 0.84), rgba(247, 208, 187, 0.62));
}

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

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

.envelope-flap {
  inset: auto 0 160px;
  height: 160px;
  transform-origin: top center;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transition: transform 0.9s var(--ease-soft);
  background: linear-gradient(160deg, rgba(255, 204, 221, 0.92), rgba(255, 236, 242, 0.84));
  z-index: 3;
}

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

.envelope-letter {
  position: absolute;
  left: 50%;
  bottom: 76px;
  width: min(92%, 540px);
  min-height: 330px;
  padding: 34px;
  border-radius: 24px;
  transform: translateX(-50%) translateY(110px);
  background: linear-gradient(180deg, rgba(255, 250, 252, 0.98), rgba(255, 238, 243, 0.94));
  color: #521124;
  box-shadow: 0 20px 40px rgba(16, 3, 12, 0.2);
  transition: transform 1.1s var(--ease-soft);
  z-index: 2;
}

.envelope-shell.is-open .envelope-letter {
  transform: translateX(-50%) translateY(-12px);
}

.letter-content {
  color: #5d1730;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.gallery-item {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition:
    transform 0.35s var(--ease-soft),
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

.gallery-item:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 18px 40px rgba(15, 4, 12, 0.18);
}

.gallery-placeholder {
  min-height: 240px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    radial-gradient(circle at top, rgba(255, 211, 153, 0.16), transparent 54%);
  border: 1px dashed rgba(255, 255, 255, 0.24);
}

.gallery-placeholder i {
  font-size: 2.2rem;
  color: rgba(255, 240, 245, 0.72);
}

.gallery-placeholder span,
.gallery-item h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
}

.gallery-item h3 {
  margin: 16px 4px 4px;
}

.action-card {
  text-align: center;
}

.ending-section {
  min-height: 100svh;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 72px 0 100px;
}

.ending-heart {
  font-size: clamp(4.8rem, 8vw, 7rem);
  color: #ffdbe8;
  animation: heartbeat 1.6s ease-in-out infinite;
  text-shadow: 0 0 42px rgba(255, 156, 188, 0.34);
}

.ending-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 18px 0 24px;
}

.ending-word {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 236, 242, 0.72);
  transition:
    transform 0.4s var(--ease-soft),
    background 0.4s ease,
    color 0.4s ease;
}

.ending-word.is-active {
  transform: translateY(-4px) scale(1.05);
  background: rgba(255, 194, 214, 0.18);
  color: #fff8fb;
}

.ending-copy {
  font-size: 1.12rem;
  line-height: 1.8;
}

.signature {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

.overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(8, 1, 5, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.overlay-panel,
.modal-card {
  position: relative;
  z-index: 1;
}

.modal-card {
  width: min(100%, 640px);
  text-align: center;
}

.modal-card h3 {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
}

.modal-card p {
  margin: 10px 0;
  line-height: 1.8;
}

.modal-close {
  margin-top: 18px;
}

.surprise-overlay .overlay-panel {
  width: min(100%, 760px);
  text-align: center;
  padding-top: 72px;
}

.overlay-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff6fa;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
  font-size: 1.3rem;
  line-height: 1;
}

.surprise-heart {
  font-size: clamp(7rem, 16vw, 12rem);
  color: #ffd7e7;
  animation:
    heartbeat 1.45s ease-in-out infinite,
    glowPulse 3.2s ease-in-out infinite;
}

.surprise-text {
  margin: 12px 0 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.25;
}

.reveal {
  opacity: 0;
  transform: translateY(48px);
  transition:
    opacity 1s ease,
    transform 1s var(--ease-soft);
}

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

.float-heart,
.sparkle,
.particle,
.petal,
.balloon,
.firefly,
.cursor-heart,
.burst-heart,
.confetti-piece,
.rain-heart {
  position: absolute;
  user-select: none;
  pointer-events: none;
}

.float-heart,
.cursor-heart,
.burst-heart,
.rain-heart {
  color: rgba(255, 221, 233, 0.85);
  text-shadow: 0 0 18px rgba(255, 173, 201, 0.32);
}

.float-heart {
  animation: floatUp linear forwards;
}

.sparkle {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 244, 248, 1), rgba(255, 217, 140, 0.2));
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.3);
  animation: twinkle ease-in-out infinite;
}

.particle {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 232, 238, 0.4);
  animation: driftParticle linear infinite;
}

.petal {
  width: 18px;
  height: 24px;
  border-radius: 60% 10% 60% 10%;
  background: linear-gradient(180deg, rgba(255, 184, 207, 0.9), rgba(255, 102, 145, 0.6));
  box-shadow: 0 8px 18px rgba(82, 15, 36, 0.2);
  animation: petalFall linear forwards;
}

.balloon {
  width: 36px;
  height: 48px;
  border-radius: 50% 50% 44% 44%;
  background: linear-gradient(180deg, rgba(255, 170, 197, 0.76), rgba(216, 194, 255, 0.56));
  box-shadow: inset -8px -8px 12px rgba(255, 255, 255, 0.12);
  animation: balloonFloat linear infinite;
}

.balloon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 54px;
  background: rgba(255, 236, 242, 0.36);
}

.firefly {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 245, 200, 1), rgba(255, 217, 140, 0.2));
  box-shadow: 0 0 16px rgba(255, 217, 140, 0.5);
  animation: fireflyMove ease-in-out infinite;
}

.cursor-heart {
  animation: cursorFade 0.9s ease forwards;
}

.burst-heart {
  font-size: 1.2rem;
  animation: burstFly 0.95s ease forwards;
}

.confetti-piece {
  width: 10px;
  height: 16px;
  background: linear-gradient(180deg, #ffd98c, #ff7da5);
  animation: confettiFall linear forwards;
}

.rain-heart {
  animation: heartRain 3.2s linear forwards;
}

.music-toggle.is-playing i {
  animation: musicPulse 1.8s ease-in-out infinite;
}

.music-toggle.is-playing {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 18px 36px rgba(18, 4, 16, 0.22),
    0 0 50px rgba(255, 213, 140, 0.18);
}

@keyframes heartbeat {
  0%,
  100% {
    transform: rotate(-45deg) scale(1);
  }
  20% {
    transform: rotate(-45deg) scale(1.08);
  }
  40% {
    transform: rotate(-45deg) scale(0.98);
  }
  60% {
    transform: rotate(-45deg) scale(1.12);
  }
}

@keyframes floatingPulse {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-12px) scale(1.03);
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(22px, -28px, 0) scale(1.08);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@keyframes floatUp {
  from {
    transform: translateY(0) scale(0.85);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  to {
    transform: translateY(-120vh) scale(1.2);
    opacity: 0;
  }
}

@keyframes twinkle {
  0%,
  100% {
    transform: scale(0.7);
    opacity: 0.35;
  }
  50% {
    transform: scale(1.4);
    opacity: 1;
  }
}

@keyframes driftParticle {
  from {
    transform: translate3d(0, 0, 0);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  to {
    transform: translate3d(0, -120vh, 0);
    opacity: 0;
  }
}

@keyframes petalFall {
  from {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: 0.9;
  }
  to {
    transform: translate3d(120px, 120vh, 0) rotate(420deg);
    opacity: 0;
  }
}

@keyframes balloonFloat {
  0% {
    transform: translate3d(0, 10vh, 0);
  }
  50% {
    transform: translate3d(-16px, -46vh, 0);
  }
  100% {
    transform: translate3d(18px, -100vh, 0);
  }
}

@keyframes fireflyMove {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(0.7);
    opacity: 0.18;
  }
  50% {
    transform: translate3d(18px, -22px, 0) scale(1.3);
    opacity: 1;
  }
}

@keyframes cursorFade {
  from {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  to {
    transform: translate(-50%, -90px) scale(1.2);
    opacity: 0;
  }
}

@keyframes burstFly {
  from {
    transform: translate3d(0, 0, 0) scale(0.8);
    opacity: 1;
  }
  to {
    transform: translate3d(var(--x), var(--y), 0) scale(1.4);
    opacity: 0;
  }
}

@keyframes confettiFall {
  from {
    transform: translate3d(0, -8vh, 0) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translate3d(var(--drift), 110vh, 0) rotate(760deg);
    opacity: 0;
  }
}

@keyframes heartRain {
  from {
    transform: translate3d(0, -6vh, 0) rotate(0deg);
    opacity: 1;
  }
  to {
    transform: translate3d(var(--drift), 110vh, 0) rotate(260deg);
    opacity: 0;
  }
}

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

@keyframes glowPulse {
  0%,
  100% {
    text-shadow: 0 0 24px rgba(255, 164, 196, 0.26);
  }
  50% {
    text-shadow:
      0 0 42px rgba(255, 164, 196, 0.52),
      0 0 80px rgba(255, 217, 140, 0.26);
  }
}

@media (max-width: 900px) {
  .section {
    width: min(100% - 24px, 1120px);
  }

  .music-toggle {
    top: max(12px, env(safe-area-inset-top, 0px));
    right: 12px;
    max-width: calc(100% - 28px);
    min-height: 48px;
    padding: 10px 12px;
    font-size: 0.92rem;
  }

  .hero-section {
    min-height: auto;
    padding: 128px 0 56px;
  }

  .glass-card {
    padding: 26px;
    border-radius: 26px;
  }

  .split-layout,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .quote-card blockquote {
    min-height: 120px;
  }

  .meter-ring {
    width: 180px;
  }

  .gallery-placeholder {
    min-height: 190px;
  }

  .envelope {
    height: 460px;
  }
}

@media (max-width: 640px) {
  .hero-section {
    min-height: auto;
    padding-top: 112px;
    padding-bottom: 36px;
  }

  .hero-section h1 {
    max-width: 9ch;
    font-size: clamp(2.9rem, 14vw, 4.4rem);
  }

  .hero-heart {
    width: 108px;
    margin-bottom: 18px;
    font-size: 3.5rem;
  }

  .typing-line {
    font-size: 1rem;
    max-width: 100%;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
    min-height: 54px;
    padding: 14px 18px;
  }

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

  .playful-buttons {
    min-height: 190px;
    position: relative;
  }

  .playful-buttons .runaway-button.is-running {
    position: absolute;
    left: 0;
    top: 0;
  }

  .story-section {
    padding: 18px 0 22px;
  }

  .section-kicker,
  .eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.06em;
  }

  .name-line,
  .story-section h2,
  .ending-section h2 {
    font-size: clamp(2rem, 10vw, 3rem);
    line-height: 1;
  }

  .typed-message,
  .letter-content,
  .result-message {
    font-size: 1rem;
    line-height: 1.7;
  }

  .section-note,
  .ending-copy {
    font-size: 0.98rem;
    line-height: 1.7;
  }

  .modal-card,
  .surprise-overlay .overlay-panel {
    padding: 28px 20px;
  }

  .surprise-overlay {
    align-items: start;
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px 12px;
  }

  .surprise-overlay .overlay-panel {
    width: 100%;
    max-height: calc(100svh - 24px);
    overflow: auto;
    padding-top: 72px;
  }

  .overlay-close {
    top: 12px;
    right: 12px;
  }

  .envelope {
    height: 470px;
  }

  .envelope-letter {
    width: min(94%, 540px);
    min-height: 320px;
    padding: 22px 18px;
    bottom: 54px;
  }

  .envelope-flap {
    inset: auto 0 146px;
    height: 140px;
  }

  .gallery-placeholder {
    min-height: 160px;
    padding: 18px;
  }

  .gallery-placeholder span,
  .gallery-item h3 {
    font-size: 1.45rem;
  }

  .meter-ring {
    width: 156px;
  }

  .meter-value {
    font-size: 2rem;
  }

  .surprise-text {
    font-size: clamp(1.7rem, 8vw, 2.4rem);
  }

  .ending-section {
    min-height: auto;
    padding: 40px 0 72px;
  }

  .signature {
    font-size: 1.75rem;
  }
}
