:root {
  --cream: #fff8f0;
  --white: #ffffff;
  --blush: #ffd8e4;
  --rose: #d96c92;
  --gold: #d6ae62;
  --blue: #cbdfff;
  --ink: #33262b;
  --muted: #7a6870;
  --night: #101425;
  --glass: rgba(255, 255, 255, 0.42);
  --glass-strong: rgba(255, 255, 255, 0.68);
  --shadow: 0 24px 70px rgba(99, 52, 73, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 216, 228, 0.65), transparent 34rem),
    radial-gradient(circle at 100% 12%, rgba(203, 223, 255, 0.72), transparent 30rem),
    radial-gradient(circle at 50% 38%, rgba(214, 174, 98, 0.12), transparent 28rem),
    linear-gradient(140deg, var(--cream), #fff, #fff5f9);
  overflow-x: hidden;
}

body.surprise-open .hero {
  min-height: 76vh;
}

body.final-mode {
  overflow-x: hidden;
}

button {
  font: inherit;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, #fff, #fff1f7 48%, #101425);
  transition: opacity 0.8s ease, visibility 0.8s ease;
  animation: loaderFallback 0.8s ease 1.4s forwards;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  display: none;
}

.loader-heart {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, var(--rose), var(--gold));
  transform: rotate(45deg);
  animation: heartbeat 1.1s ease-in-out infinite;
  box-shadow: 0 0 44px rgba(217, 108, 146, 0.45);
}

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

.loader-heart::before {
  left: -27px;
}

.loader-heart::after {
  top: -27px;
}

#fxCanvas,
.cursor-sparkle-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#fxCanvas {
  z-index: 1;
}

.cursor-sparkle-layer {
  z-index: 50;
}

.music-player {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  color: var(--ink);
}

.music-player.playing .music-icon {
  animation: spinNote 2.4s linear infinite;
}

.music-player.disabled {
  display: none;
}

.music-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 4px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.glass {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.26));
  border: 1px solid rgba(255, 255, 255, 0.54);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(22px);
}

.section {
  position: relative;
  min-height: 100vh;
  padding: 84px 18px;
  overflow: hidden;
}

.section > :not(.night-sky) {
  position: relative;
  z-index: 2;
}

.hero {
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
}

.night {
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 216, 228, 0.24), transparent 22rem),
    radial-gradient(circle at 80% 20%, rgba(203, 223, 255, 0.2), transparent 22rem),
    linear-gradient(180deg, #0d1020, #151a31 58%, #2d2434);
}

.night-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.moon {
  position: absolute;
  top: 9%;
  right: 12%;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #ffecc3 62%, #d6ae62);
  box-shadow: 0 0 48px rgba(255, 236, 195, 0.58);
}

.star {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 16px #fff;
  animation: twinkle 2.6s ease-in-out infinite;
}

.s1 { top: 14%; left: 18%; }
.s2 { top: 28%; left: 68%; animation-delay: 0.5s; }
.s3 { top: 46%; left: 27%; animation-delay: 1s; }
.s4 { top: 68%; left: 78%; animation-delay: 1.4s; }
.s5 { top: 20%; left: 48%; animation-delay: 1.8s; }

.hero-content {
  position: relative;
  z-index: 2;
  width: min(680px, 100%);
  padding: 0 10px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", "Didot", "Bodoni 72", Georgia, serif;
  font-weight: 700;
  line-height: 0.95;
}

h1 {
  font-size: clamp(2.65rem, 14vw, 7.4rem);
  text-shadow: 0 14px 54px rgba(0, 0, 0, 0.32);
}

.magic-name {
  display: block;
  margin-top: 8px;
  color: #fff7d6;
  font-size: clamp(2.05rem, 10vw, 5.4rem);
  overflow-wrap: anywhere;
  text-shadow: 0 0 26px rgba(214, 174, 98, 0.34), 0 18px 56px rgba(0, 0, 0, 0.38);
}

h2 {
  color: var(--ink);
  font-size: clamp(2.7rem, 13vw, 5.7rem);
}

h3 {
  font-size: 2.4rem;
}

.hero p:not(.eyebrow),
.section-heading p:not(.eyebrow) {
  max-width: 650px;
  margin: 18px auto 0;
  color: inherit;
  font-size: clamp(1rem, 4vw, 1.25rem);
  line-height: 1.7;
}

.section-heading {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.primary-button {
  position: relative;
  min-height: 58px;
  margin-top: 34px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  color: #4a2a31;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #fff, #ffe2ec 44%, #f7d990);
  box-shadow: 0 18px 50px rgba(214, 174, 98, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.62) inset;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 24px 70px rgba(214, 174, 98, 0.42), 0 0 32px rgba(255, 216, 228, 0.62);
}

.love-question-section {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 216, 228, 0.74), transparent 24rem),
    radial-gradient(circle at 88% 12%, rgba(203, 223, 255, 0.68), transparent 26rem),
    radial-gradient(circle at 50% 100%, rgba(214, 174, 98, 0.24), transparent 26rem),
    linear-gradient(180deg, #fffaf4, #fff, #fff0f6);
}

.love-question-card {
  position: relative;
  width: min(720px, 100%);
  padding: clamp(28px, 8vw, 58px) 18px;
  border-radius: 8px;
  text-align: center;
  overflow: hidden;
}

.love-question-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(214, 174, 98, 0.32);
  border-radius: 8px;
  pointer-events: none;
}

.love-question-card h2 {
  color: #4a2a31;
  text-shadow: 0 16px 48px rgba(217, 108, 146, 0.16);
}

.love-question-card p:not(.eyebrow) {
  max-width: 520px;
  margin: 18px auto 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.yes-button {
  margin-top: 0;
}

.no-button {
  position: relative;
  min-width: 116px;
  min-height: 58px;
  border: 1px solid rgba(214, 174, 98, 0.24);
  border-radius: 999px;
  color: #7a6870;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 16px 42px rgba(99, 52, 73, 0.11);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.no-button:hover {
  transform: translateY(-3px) rotate(-1deg);
}

.no-button.is-trapped {
  color: transparent;
  transform: scale(1.04);
}

.surprise-yes {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: inherit;
  color: #4a2a31;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #ffe2ec 42%, #f7d990);
  box-shadow: 0 18px 46px rgba(217, 108, 146, 0.24);
  cursor: pointer;
  animation: popYes 0.42s cubic-bezier(.18,.9,.25,1.35);
}

.love-answer {
  min-height: 32px;
  font-weight: 700;
}

.gift-box,
.dream-card,
.photo-card {
  transition: transform 0.32s ease, box-shadow 0.32s ease, opacity 0.6s ease;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
}

.asset-warning {
  grid-column: 1 / -1;
  margin: 0;
  padding: 26px;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.62);
}

.gallery-section,
.gifts-section,
.countdown-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(255, 248, 240, 0.72)),
    radial-gradient(circle at 12% 18%, rgba(255, 216, 228, 0.35), transparent 22rem);
}

.jar-section,
.letter-section,
.dreams-section {
  background:
    radial-gradient(circle at 88% 16%, rgba(203, 223, 255, 0.38), transparent 22rem),
    radial-gradient(circle at 16% 82%, rgba(214, 174, 98, 0.16), transparent 24rem);
}

.eyes-section {
  display: grid;
  place-items: center;
  color: #fff;
  background:
    radial-gradient(ellipse at center, rgba(255, 241, 169, 0.16), transparent 22rem),
    radial-gradient(circle at 18% 18%, rgba(255, 216, 228, 0.22), transparent 20rem),
    radial-gradient(circle at 84% 72%, rgba(203, 223, 255, 0.16), transparent 22rem),
    linear-gradient(180deg, #111426, #21192a 58%, #3d2c3a);
}

.eye-glow {
  position: absolute;
  width: min(680px, 92vw);
  height: min(340px, 48vw);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.34), transparent 12%),
    radial-gradient(ellipse at center, rgba(214, 174, 98, 0.42), rgba(255, 216, 228, 0.18) 38%, transparent 66%);
  filter: blur(2px);
  opacity: 0.72;
  animation: eyeFloat 7s ease-in-out infinite;
}

.eye-glow::before,
.eye-glow::after {
  content: "";
  position: absolute;
  inset: 18% 2%;
  border-top: 1px solid rgba(255, 255, 255, 0.34);
  border-bottom: 1px solid rgba(214, 174, 98, 0.28);
  border-radius: 50%;
}

.eyes-content {
  width: min(860px, 100%);
  padding: 18px 0;
  text-align: center;
}

.eyes-content h2 {
  color: #fff;
  text-shadow: 0 0 44px rgba(214, 174, 98, 0.34), 0 18px 70px rgba(0, 0, 0, 0.35);
}

.eyes-copy {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin: 32px auto 0;
}

.eyes-copy p {
  margin: 0;
  padding: 18px clamp(16px, 5vw, 30px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.16), inset 0 1px rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  font-family: "Cormorant Garamond", "Didot", Georgia, serif;
  font-size: clamp(1.28rem, 4.7vw, 2rem);
  line-height: 1.45;
}

.photo-card {
  position: relative;
  min-height: 356px;
  padding: 10px 10px 48px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(79, 46, 58, 0.16);
  cursor: pointer;
  transform: rotate(var(--tilt));
}

.photo-card:nth-child(n + 25) {
  content-visibility: auto;
  contain-intrinsic-size: 356px;
}

.photo-card:hover {
  transform: rotate(0deg) translateY(-10px);
  box-shadow: 0 24px 70px rgba(217, 108, 146, 0.24), 0 0 30px rgba(214, 174, 98, 0.18);
}

.photo-card img {
  width: 100%;
  height: clamp(260px, 25vw, 320px);
  display: block;
  border-radius: 4px;
  object-fit: cover;
  object-position: center;
  background: #f9eef3;
}

.photo-card span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 15px;
  color: #776169;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.45rem;
  text-align: center;
}

.jar-wrap {
  display: grid;
  gap: 22px;
  place-items: center;
}

.jar {
  position: relative;
  width: min(310px, 86vw);
  height: 390px;
  border-radius: 42px 42px 76px 76px;
  overflow: hidden;
}

.jar::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  width: 58%;
  height: 38px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  transform: translateX(-50%);
}

.paper-fold {
  position: absolute;
  width: 72px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(135deg, #fff, var(--blush));
  box-shadow: 0 10px 28px rgba(80, 38, 58, 0.12);
  cursor: pointer;
  transform: rotate(var(--paper-rot));
}

.paper-fold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(214, 174, 98, 0.24) 50%);
  border-radius: inherit;
}

.memory-note {
  width: min(620px, 100%);
  min-height: 112px;
  padding: 24px;
  border-radius: 8px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  text-align: center;
}

.meter-card {
  display: grid;
  place-items: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 30px 20px;
  border-radius: 8px;
  text-align: center;
}

.big-heart {
  position: relative;
  display: grid;
  place-items: center;
  width: min(240px, 68vw);
  height: min(240px, 68vw);
  color: #fff;
  font-size: 2.4rem;
  font-weight: 900;
  filter: drop-shadow(0 20px 50px rgba(217, 108, 146, 0.28));
}

.big-heart::before {
  content: "";
  position: absolute;
  inset: 17%;
  background: linear-gradient(to top, #d96c92 var(--fill), rgba(255, 216, 228, 0.5) var(--fill));
  clip-path: path("M 50 91 C 18 62 5 45 5 25 C 5 10 17 2 30 2 C 39 2 46 7 50 15 C 54 7 61 2 70 2 C 83 2 95 10 95 25 C 95 45 82 62 50 91 Z");
  transform: scale(2.25);
  transition: background 0.4s ease;
}

.big-heart span {
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 14px rgba(103, 35, 58, 0.45);
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  max-width: 900px;
  margin: 0 auto;
}

.gift-box {
  position: relative;
  min-height: 155px;
  border: 0;
  border-radius: 8px;
  color: #4a2a31;
  background: linear-gradient(145deg, #fff, #ffe5ef 48%, #f9dda0);
  box-shadow: 0 20px 55px rgba(159, 92, 111, 0.18);
  cursor: pointer;
  overflow: hidden;
}

.gift-box::after {
  content: "";
  position: absolute;
  inset: -60% -30%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.64) 50%, transparent 62%);
  transform: translateX(-70%) rotate(8deg);
  transition: transform 0.7s ease;
}

.gift-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 43%, rgba(214, 174, 98, 0.72) 43% 57%, transparent 57%),
    linear-gradient(0deg, transparent 42%, rgba(214, 174, 98, 0.72) 42% 58%, transparent 58%);
}

.gift-box:hover::after {
  transform: translateX(70%) rotate(8deg);
}

.gift-box span {
  position: relative;
  z-index: 1;
  display: block;
  padding-top: 52px;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.gift-box.opened {
  transform: translateY(-10px) rotate(-1deg);
}

.envelope-stage {
  display: grid;
  gap: 26px;
  place-items: center;
}

.envelope {
  position: relative;
  width: min(340px, 86vw);
  height: 220px;
  border: 0;
  background: linear-gradient(145deg, #fff, #ffdce8);
  box-shadow: 0 25px 70px rgba(99, 52, 73, 0.18);
  cursor: pointer;
  perspective: 800px;
}

.envelope::before,
.envelope::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 49.5%, rgba(214, 174, 98, 0.34) 50%, transparent 50.5%);
}

.flap {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 56%;
  background: linear-gradient(160deg, #fff9fb, #ffcfe0);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.8s ease;
  z-index: 3;
}

.paper {
  position: absolute;
  left: 7%;
  right: 7%;
  bottom: 8%;
  height: 72%;
  border-radius: 6px;
  background: #fffdf9;
  transition: transform 0.8s ease;
  z-index: 1;
}

.seal {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  transform: translate(-50%, -50%);
}

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

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

.love-letter {
  display: none;
  width: min(760px, 100%);
  padding: 28px;
  border-radius: 8px;
  line-height: 1.85;
}

.love-letter.visible {
  display: block;
}

.roadmap {
  display: grid;
  gap: 18px;
  max-width: 820px;
  margin: 0 auto;
}

.dream-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border-radius: 8px;
}

.dream-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blush), var(--blue));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.58);
}

.dream-card.active {
  transform: translateX(8px);
  box-shadow: 0 20px 55px rgba(214, 174, 98, 0.2);
}

.dream-card.active .dream-icon {
  animation: glowPulse 1.8s ease-in-out infinite;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  padding: 18px;
  border-radius: 8px;
}

.time-box {
  padding: 18px 10px;
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.52);
}

.time-box strong {
  display: block;
  color: var(--rose);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.9rem, 8vw, 2.5rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.time-box strong.tick {
  animation: digitTick 0.26s ease;
}

.sky-section {
  color: #fff;
}

.sky-section .section-heading h2,
.sky-section .section-heading p:not(.eyebrow) {
  color: #fff;
}

.sky-canvas {
  display: block;
  width: min(1080px, 100%);
  height: 58vh;
  min-height: 420px;
  margin: 0 auto;
  border-radius: 8px;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08), rgba(16, 20, 37, 0.44));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
  touch-action: manipulation;
}

.final-section {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding-top: clamp(86px, 12vh, 138px);
  padding-bottom: clamp(96px, 13vh, 148px);
  text-align: center;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 216, 228, 0.42), transparent 26rem),
    radial-gradient(circle at 78% 74%, rgba(214, 174, 98, 0.24), transparent 22rem),
    linear-gradient(180deg, #fff8f0, #fff, #fff0f7);
}

.final-card {
  width: min(760px, 100%);
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: min(620px, calc(100vh - 190px));
  padding: clamp(34px, 7vw, 64px) clamp(18px, 5vw, 52px);
  border-radius: 8px;
  text-align: center;
  isolation: isolate;
}

.final-button {
  margin-left: auto;
  margin-right: auto;
}

.final-message {
  display: none;
  margin-top: clamp(26px, 4vw, 42px);
  font-family: "Cormorant Garamond", serif;
  line-height: 1.16;
}

.final-message.visible {
  display: grid;
  gap: 24px;
  width: 100%;
  justify-items: center;
  text-align: center;
  align-content: center;
}

.final-line,
.final-title {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  animation: cinematicReveal 1.25s ease forwards;
}

.final-line {
  color: rgba(51, 38, 43, 0.86);
  font-size: clamp(1.7rem, 7vw, 3rem);
  max-width: 20ch;
}

.final-line:nth-child(2) {
  animation-delay: 2.1s;
}

.final-title {
  color: #8c3155;
  font-size: clamp(2.6rem, 12vw, 5.4rem);
  max-width: 14ch;
  text-shadow: 0 0 36px rgba(217, 108, 146, 0.26), 0 0 60px rgba(214, 174, 98, 0.2);
  animation-delay: 4.3s;
}

.lightbox,
.gift-modal {
  position: fixed;
  z-index: 90;
  display: none;
}

.lightbox {
  inset: 0;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at center, rgba(255, 216, 228, 0.16), rgba(13, 16, 32, 0.9));
  backdrop-filter: blur(12px);
}

.lightbox.open,
.gift-modal.open {
  display: grid;
}

.lightbox img {
  max-width: min(920px, 92vw);
  max-height: 76vh;
  border: 10px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42), 0 0 46px rgba(214, 174, 98, 0.32);
  animation: lightboxIn 0.5s ease both;
}

.lightbox p {
  color: #fff;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.5rem;
}

.close-lightbox,
.gift-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  font-size: 1.7rem;
}

.gift-modal {
  left: 50%;
  top: 50%;
  width: min(680px, calc(100vw - 32px));
  min-height: 260px;
  padding: 44px 24px 30px;
  border-radius: 8px;
  text-align: center;
  transform: translate(-50%, -50%);
  max-height: calc(100vh - 28px);
  overflow: auto;
  animation: modalIn 0.42s ease both;
}

#giftContent {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  line-height: 1.2;
}

.gift-icon {
  font-size: 3.2rem;
}

.favorite-memory-card {
  margin: 0;
  padding: 12px 12px 18px;
  border: 1px solid rgba(214, 174, 98, 0.36);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 216, 228, 0.22));
  box-shadow: 0 0 38px rgba(214, 174, 98, 0.2), inset 0 1px rgba(255, 255, 255, 0.6);
  animation: memoryGiftIn 0.62s ease both;
}

.favorite-memory-card img {
  width: 100%;
  max-height: 62vh;
  display: block;
  border-radius: 8px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 18px 54px rgba(52, 34, 44, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.favorite-memory-card figcaption {
  margin-top: 14px;
  color: #6f4f5a;
  font-size: clamp(1.3rem, 6vw, 2rem);
}

.gift-bloom {
  font-size: 4.5rem;
  animation: bloom 0.78s cubic-bezier(.18,.9,.25,1.25) both;
}

.modal-action {
  min-height: 46px;
  margin-top: 10px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #4a2a31;
  font: 800 0.9rem Inter, system-ui, sans-serif;
  background: linear-gradient(135deg, #fff, #ffe2ec, #f7d990);
  cursor: pointer;
}

footer {
  padding: 44px 18px 82px;
  color: var(--muted);
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.sparkle {
  position: fixed;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff1a9;
  box-shadow: 0 0 14px #fff1a9;
  pointer-events: none;
  animation: sparkleOut 0.8s ease forwards;
}

@keyframes heartbeat {
  0%, 100% { transform: rotate(45deg) scale(0.9); }
  50% { transform: rotate(45deg) scale(1.08); }
}

@keyframes loaderFallback {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

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

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

@keyframes sparkleOut {
  to { opacity: 0; transform: translateY(-22px) scale(0); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(214, 174, 98, 0); }
  50% { box-shadow: 0 0 34px rgba(214, 174, 98, 0.72); }
}

@keyframes popYes {
  0% {
    opacity: 0;
    transform: scale(0.72) rotate(-4deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

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

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

@keyframes memoryGiftIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes bloom {
  from { transform: scale(0.62) rotate(-12deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes cinematicReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes digitTick {
  0% { transform: translateY(4px); opacity: 0.55; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media (max-width: 520px) {
  .music-player {
    left: 50%;
    right: auto;
    bottom: 10px;
    transform: translateX(-50%);
  }

  .photo-card {
    min-height: 302px;
  }

  .photo-card img {
    height: 236px;
  }

  .gift-grid {
    gap: 12px;
  }

  .gift-box {
    min-height: 142px;
  }
}

@media (min-width: 760px) {
  .section {
    padding: 112px 34px;
  }

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

  .gift-grid,
  .countdown {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .gallery-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .countdown {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    max-width: 1040px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
.letter-title{
    margin-bottom:20px;
}

.birthday-heading{
    margin-top:40px;
    text-align:center;
    font-family:"Cormorant Garamond",serif;
    font-size:clamp(2rem,5vw,3.5rem);
    color:#d96c92;
    text-shadow:
        0 0 20px rgba(255,182,193,.5),
        0 0 45px rgba(214,174,98,.35);
    opacity:0;
    transform:translateY(25px);
    transition:all .8s ease;
}

.birthday-heading.show{
    opacity:1;
    transform:translateY(0);
}