:root {
  --bg-deep: #0B0910;
  --bg-card: rgba(24, 19, 34, 0.72);
  --text-cream: #FFF8F3;
  --text-soft: #C7BAC9;
  --rose-blush: #F4B8C1;
  --rose-deep: #E88296;
  --gold-warm: #E8C589;
  --border-glow: rgba(244, 184, 193, 0.25);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-hand: 'Caveat', cursive;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-deep);
  color: var(--text-cream);
  font-family: var(--font-sans);
}

body {
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

#sky-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

#tap-hearts-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 95;
  overflow: hidden;
}

.tap-heart {
  position: absolute;
  font-size: 1.15rem;
  user-select: none;
  animation: floatHeart 1.15s ease-out forwards;
}

@keyframes floatHeart {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0.5) rotate(-10deg); }
  50% { opacity: 0.95; transform: translate(-50%, -140%) scale(1.15) rotate(8deg); }
  100% { opacity: 0; transform: translate(-50%, -240%) scale(0.85) rotate(-6deg); }
}

.ambient-aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(244, 184, 193, 0.14) 0%, transparent 48%),
    radial-gradient(circle at 85% 75%, rgba(232, 197, 137, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(168, 118, 178, 0.08) 0%, transparent 60%);
}

.hidden {
  display: none !important;
}

.kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose-blush);
  margin-bottom: 0.75rem;
}

.audio-pill {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 55;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.52rem 1rem;
  background: rgba(24, 19, 34, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-glow);
  border-radius: 999px;
  color: var(--rose-blush);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
}

.eq-bars span {
  width: 2.5px;
  height: 4px;
  background: var(--rose-blush);
  border-radius: 2px;
}

.eq-bars.playing span:nth-child(1) { animation: eq 0.7s infinite alternate; }
.eq-bars.playing span:nth-child(2) { animation: eq 0.5s infinite alternate 0.15s; }
.eq-bars.playing span:nth-child(3) { animation: eq 0.8s infinite alternate 0.3s; }
.eq-bars.playing span:nth-child(4) { animation: eq 0.6s infinite alternate 0.1s; }

@keyframes eq {
  0% { height: 3px; }
  100% { height: 12px; }
}

/* 1. GATE SCREEN */
.gate-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: radial-gradient(circle at center, #1A1326 0%, var(--bg-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.9s var(--ease-spring), transform 0.9s var(--ease-spring);
}

.gate-screen.fade-out {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

.gate-frame {
  max-width: 410px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.envelope-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(244, 184, 193, 0.14);
  border: 1px solid var(--border-glow);
  color: var(--rose-blush);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
  animation: gentleBounce 2.5s ease-in-out infinite;
}

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

.gate-teaser {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.38;
  color: var(--text-cream);
  margin-bottom: 2.5rem;
}

.hold-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.hold-btn {
  position: relative;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}

.ring-svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: rgba(244, 184, 193, 0.18);
  stroke-width: 2.5;
}

.ring-fg {
  fill: none;
  stroke: var(--rose-blush);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 314.16;
  stroke-dashoffset: 314.16;
  filter: drop-shadow(0 0 10px rgba(244, 184, 193, 0.75));
}

.hold-core {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(232, 130, 150, 0.35), rgba(24, 19, 34, 0.96));
  border: 1px solid var(--border-glow);
  color: var(--rose-blush);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 32px rgba(232, 130, 150, 0.25);
  animation: heartPulse 1.8s ease-in-out infinite;
  transition: transform 0.25s ease;
}

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

.hold-btn.pressing .hold-core {
  animation: none;
  transform: scale(0.9);
  box-shadow: 0 0 46px rgba(244, 184, 193, 0.55);
}

.hold-hint {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-soft);
}

/* MAIN LAYOUT */
.main-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-block {
  padding: 3.75rem 0;
}

.section-intro {
  text-align: center;
  max-width: 480px;
  margin: 0 auto 3rem;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.22;
  color: var(--text-cream);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-soft);
  max-width: 430px;
  margin: 0.75rem auto 1.65rem;
}

.glass-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glow);
  border-radius: 30px;
  padding: 2.5rem 1.5rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

@media (min-width: 600px) {
  .glass-card {
    padding: 3rem 2.5rem;
  }
}

/* 2. HERO */
.hero-section {
  min-height: 90dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 2rem 0 2.5rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-warm);
}

.cute-pill {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(232, 197, 137, 0.14);
  border: 1px solid rgba(232, 197, 137, 0.3);
  color: var(--gold-warm);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  margin-bottom: 1.15rem;
}

.hero-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.75rem;
  color: var(--rose-blush);
  margin-bottom: 0.2rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3.2rem, 10.5vw, 5.2rem);
  font-weight: 600;
  line-height: 1.06;
  background: linear-gradient(180deg, #FFF8F3 15%, #F4B8C1 70%, #E8C589 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rose-stem {
  width: 2px;
  height: 36px;
  background: linear-gradient(to bottom, var(--rose-blush), transparent);
  margin: 1.45rem auto;
}

.hero-tagline {
  font-size: 0.96rem;
  color: var(--text-soft);
  max-width: 440px;
  margin: 0 auto;
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.cue-arrow {
  font-size: 1rem;
  color: var(--rose-blush);
  animation: gentleBounce 1.8s infinite;
}

/* 3. CUTE MINI QUIZ */
.quiz-card {
  text-align: center;
  overflow: hidden;
}

.quiz-arena {
  position: relative;
  min-height: 120px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.dodge-pill-btn {
  padding: 0.85rem 1.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--text-soft);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), background 0.2s ease;
}

.quiz-feedback {
  margin-top: 1.25rem;
  font-family: var(--font-hand);
  font-size: 1.65rem;
  color: var(--gold-warm);
  animation: fadeUp 0.5s var(--ease-spring);
}

/* 4. CUTE BIRTHDAY CAKE & CANDLE */
.candle-card {
  text-align: center;
}

.cake-stage {
  margin: 2.25rem auto 1.5rem;
  width: 170px;
  height: 215px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  cursor: pointer;
  position: relative;
}

.flame-box {
  position: relative;
  width: 30px;
  height: 46px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin-bottom: 2px;
}

.flame-halo {
  position: absolute;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 197, 137, 0.42) 0%, transparent 70%);
  top: -14px;
  animation: pulseHalo 2s ease-in-out infinite alternate;
}

.flame {
  width: 16px;
  height: 34px;
  background: radial-gradient(ellipse at bottom, #FFFFFF 12%, #FDE68A 48%, #F97316 96%);
  border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
  box-shadow: 0 0 18px #FBBF24, 0 0 36px rgba(244, 184, 193, 0.6);
  transform-origin: bottom center;
  animation: flicker 0.18s infinite alternate;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.flame.extinguished,
.flame-halo.extinguished {
  opacity: 0;
  transform: scale(0.2);
}

.smoke-container {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.smoke {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 248, 243, 0.5);
  filter: blur(4px);
  opacity: 0;
}

.smoke-container.active .s1 { animation: smokeRise 2.2s ease-out forwards; }
.smoke-container.active .s2 { animation: smokeRise 2.5s ease-out 0.2s forwards; }
.smoke-container.active .s3 { animation: smokeRise 2.8s ease-out 0.4s forwards; }

@keyframes flicker {
  0% { transform: rotate(-2.5deg) scaleY(1); }
  100% { transform: rotate(2.5deg) scaleY(1.07); }
}

@keyframes pulseHalo {
  0% { transform: scale(0.94); opacity: 0.75; }
  100% { transform: scale(1.14); opacity: 1; }
}

@keyframes smokeRise {
  0% { opacity: 0.75; transform: translate(0, 0) scale(0.8); }
  50% { opacity: 0.45; transform: translate(-8px, -35px) scale(1.8); }
  100% { opacity: 0; transform: translate(10px, -75px) scale(2.8); }
}

.wick {
  width: 3px;
  height: 8px;
  background: #4B4453;
  border-radius: 2px;
}

.candle-stick {
  width: 14px;
  height: 44px;
  background: repeating-linear-gradient(
    -45deg,
    #FFF8F3,
    #FFF8F3 6px,
    #F4B8C1 6px,
    #F4B8C1 12px
  );
  border-radius: 4px 4px 0 0;
}

.cake-top {
  width: 96px;
  height: 36px;
  background: linear-gradient(180deg, #F9D5DC 0%, #F4B8C1 100%);
  border-radius: 14px 14px 4px 4px;
  position: relative;
  box-shadow: inset 0 -4px 0 rgba(232, 130, 150, 0.35);
}

.frosting-drip {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: #FFF8F3;
  border-radius: 14px 14px 8px 8px;
}

.sprinkle {
  position: absolute;
  width: 6px;
  height: 3px;
  border-radius: 3px;
  background: var(--gold-warm);
}
.sp1 { top: 18px; left: 20px; transform: rotate(25deg); }
.sp2 { top: 22px; left: 48px; transform: rotate(-20deg); background: #FFF8F3; }
.sp3 { top: 17px; right: 20px; transform: rotate(40deg); }

.cake-base {
  width: 128px;
  height: 44px;
  background: linear-gradient(180deg, #E8C589 0%, #CFA25E 100%);
  border-radius: 12px 12px 6px 6px;
  box-shadow: inset 0 4px 0 rgba(255, 248, 243, 0.45);
}

.cake-plate {
  width: 156px;
  height: 10px;
  background: linear-gradient(90deg, #8F7C96, #FFF8F3, #8F7C96);
  border-radius: 999px;
  margin-top: 2px;
}

.candle-hint {
  font-size: 0.86rem;
  color: var(--rose-blush);
}

.wish-unlocked-msg {
  margin-top: 1.35rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border-glow);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.36rem;
  color: var(--gold-warm);
}

.unlocked-journey {
  transition: opacity 1s var(--ease-spring), filter 1s var(--ease-spring);
}

.unlocked-journey.locked {
  opacity: 0.2;
  filter: blur(4px);
  pointer-events: none;
}

/* 5. POLAROID SCRAPBOOK */
.lookbook-list {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.lookbook-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.65rem;
  align-items: center;
}

@media (min-width: 640px) {
  .lookbook-item {
    grid-template-columns: 1.02fr 0.98fr;
    gap: 2.25rem;
  }
  .lookbook-item:nth-child(even) .polaroid-frame {
    order: 2;
  }
}

.polaroid-frame {
  position: relative;
  background: #FFF8F3;
  padding: 0.85rem 0.85rem 2.35rem;
  border-radius: 8px;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.55);
  transform: rotate(-1.8deg);
  transition: transform 0.4s var(--ease-spring);
}

.lookbook-item:nth-child(even) .polaroid-frame {
  transform: rotate(1.8deg);
}

.polaroid-frame:hover {
  transform: rotate(0deg) scale(1.02);
}

.washi-tape {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 84px;
  height: 22px;
  background: rgba(244, 184, 193, 0.78);
  backdrop-filter: blur(4px);
  border-radius: 2px;
  z-index: 2;
}

.photo-box {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: #1B1526;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-box img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-placeholder {
  padding: 1.75rem;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--rose-blush);
}

.polaroid-caption {
  position: absolute;
  bottom: 0.45rem;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.35rem;
  font-weight: 600;
  color: #3A2D42;
}

.story-meta {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-warm);
  margin-bottom: 0.4rem;
}

.story-heading {
  font-family: var(--font-serif);
  font-size: 1.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-cream);
  margin-bottom: 0.7rem;
}

.story-text {
  font-size: 0.94rem;
  color: var(--text-soft);
}

/* 6. LOVE LETTER */
.wax-seal-corner {
  position: absolute;
  top: -16px;
  right: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose-deep), #B84A62);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(232, 130, 150, 0.45);
}

.letter-header {
  margin-bottom: 1.85rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border-glow);
}

.letter-body p {
  font-family: var(--font-serif);
  font-size: clamp(1.24rem, 3.6vw, 1.42rem);
  line-height: 1.72;
  color: var(--text-cream);
  margin-bottom: 1.45rem;
  opacity: 0.28;
  transition: opacity 0.7s ease;
}

.letter-body p.illuminated {
  opacity: 1;
}

.letter-footer {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-glow);
  display: flex;
  flex-direction: column;
}

.sig-label {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.sig-name {
  font-family: var(--font-hand);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--rose-blush);
  margin-top: 0.1rem;
}

/* 7 & 8. FORMS & BUTTONS */
.capsule-card,
.reply-card {
  text-align: center;
}

.finale-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.48rem, 4.5vw, 1.9rem);
  line-height: 1.42;
  color: var(--text-cream);
  max-width: 480px;
  margin: 0.5rem auto 1.85rem;
}

.editorial-form {
  max-width: 460px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.editorial-form textarea {
  width: 100%;
  padding: 1rem 1.15rem;
  background: rgba(11, 9, 16, 0.68);
  border: 1px solid var(--border-glow);
  border-radius: 18px;
  color: var(--text-cream);
  font-family: var(--font-sans);
  font-size: 0.92rem;
  line-height: 1.6;
  resize: none;
  outline: none;
  transition: border-color 0.3s ease;
}

.editorial-form textarea:focus {
  border-color: var(--rose-blush);
}

.love-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.92rem 1.85rem;
  background: linear-gradient(135deg, var(--rose-blush), var(--rose-deep));
  border: none;
  border-radius: 999px;
  color: #160E18;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(232, 130, 150, 0.3);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s ease;
}

.love-pill-btn:hover,
.love-pill-btn:active {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 32px rgba(244, 184, 193, 0.45);
}

.love-pill-btn.outline {
  background: transparent;
  border: 1.5px solid var(--gold-warm);
  color: var(--gold-warm);
  box-shadow: none;
}

.love-pill-btn.outline:hover,
.love-pill-btn.outline:active {
  background: var(--gold-warm);
  color: #160E18;
}

.sent-confirmation {
  margin-top: 1.25rem;
  padding: 1.4rem 1.15rem;
  border-top: 1px dashed var(--border-glow);
  animation: fadeUp 0.6s var(--ease-spring);
}

.stamp {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--rose-blush);
  color: var(--rose-blush);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin-bottom: 0.85rem;
}

.saved-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.35rem;
  color: var(--gold-warm);
}

.saved-note {
  font-size: 0.9rem;
  color: var(--text-soft);
}

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

.page-footer {
  text-align: center;
  padding: 1.5rem 0 4rem;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}