/* ============================================================
   BIRTHDAY WEBSITE — STYLESHEET
   Soft pastel palette · Responsive · Animated
   ============================================================ */

/* ---------- CSS CUSTOM PROPERTIES (easy to tweak!) ---------- */
:root {
  /* Main pastel palette – change these to restyle the whole site */
  --pink:        #FFD1DC;
  --pink-dark:   #F4A6C1;
  --purple:      #E0BBE4;
  --purple-deep: #C89FD6;
  --lavender:    #C7CEEA;
  --mint:        #B5EAD7;
  --peach:       #FFDFD3;
  --yellow:      #FFF5BA;
  --white:       #fffbfe;
  --text:        #4a3f5c;
  --text-light:  #7a6e8a;

  /* Fonts */
  --font-body:    'Poppins', sans-serif;
  --font-display: 'Dancing Script', cursive;

  /* Misc */
  --radius:    16px;
  --shadow:    0 8px 30px rgba(200, 160, 220, .25);
  --transition: .35s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: linear-gradient(135deg, var(--pink) 0%, var(--purple) 50%, var(--lavender) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

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

/* ---------- CONFETTI CANVAS ---------- */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ---------- SECTION UTILITY ---------- */
.section {
  position: relative;
  width: 100%;
  padding: 80px 24px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  text-align: center;
  margin-bottom: 12px;
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 40px;
}

/* ============================================================
   1. WELCOME / HERO SECTION
   ============================================================ */
.welcome-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  text-align: center;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.45) 0%, transparent 70%);
}

.welcome-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  width: 100%;
  padding: 40px 24px;
  text-align: center;
}

/* ---------- Animated hero title ---------- */
.hero-title {
  font-family: var(--font-display);
  line-height: 1.25;
  margin-bottom: 20px;
}

.hero-title .line {
  display: block;
  opacity: 0;
  transform: translateY(30px) scale(.9);
  animation: popIn .8s ease forwards;
}

.hero-title .line-1 {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  animation-delay: .3s;
}

.hero-title .line-2 {
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  color: var(--purple-deep);
  animation-delay: .8s;
}

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

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  color: var(--text-light);
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp .8s ease 1.3s forwards;
}

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

/* ---------- Cute button ---------- */
.btn-cute {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 14px 36px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  color: var(--text);
  background: linear-gradient(135deg, var(--yellow), var(--pink));
  box-shadow: var(--shadow);
  transition: var(--transition);
  opacity: 0;
  animation: fadeUp .8s ease 1.7s forwards;
  position: relative;
  overflow: hidden;
  max-width: 100%;
  white-space: normal;
}

.btn-cute::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--pink-dark), var(--purple));
  opacity: 0;
  transition: opacity var(--transition);
  border-radius: inherit;
  z-index: -1;
}

.btn-cute:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 12px 36px rgba(200, 160, 220, .4);
}

.btn-cute:hover::after {
  opacity: .25;
}

.btn-cute:active {
  transform: scale(.97);
}

/* Secondary button style */
.btn-cute.btn-secondary {
  background: linear-gradient(135deg, var(--lavender), var(--purple));
  color: var(--white);
}

/* Hero buttons row */
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Section navigation (continue button) */
.section-nav {
  text-align: center;
  margin-top: 40px;
}

/* Page navigation buttons (used on multi-page layout) */
.page-nav {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 48px;
}

.hero-buttons,
.page-nav {
  width: 100%;
}

/* Make <a> buttons look the same as <button> buttons */
a.btn-cute {
  text-decoration: none;
}

/* Full-page section (used when each section is its own page) */
.full-page {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

/* ---------- Floating background elements container ---------- */
.floating-elements {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

/* Each floating item is absolutely‐positioned by JS */
.floating-item {
  position: absolute;
  font-size: 1.6rem;
  opacity: .5;
  animation: floatUp linear infinite;
  pointer-events: none;
  user-select: none;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: .6;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg) scale(.4);
    opacity: 0;
  }
}

/* ============================================================
   2. MEMORY GALLERY SECTION
   ============================================================ */
.memories-section {
  min-height: 100vh;
  background: rgba(255,255,255,.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}

/* ---------- 3‑D flip card ---------- */
.card-container {
  --tilt: 0deg;
  perspective: 900px;
  cursor: pointer;
  position: relative;
  width: 100%;
  transform: rotate(var(--tilt));
  transition: transform .4s ease, filter .35s ease;
}

.card-container:hover {
  transform: rotate(0deg) scale(1.03);
  z-index: 2;
  filter: drop-shadow(0 0 18px rgba(224, 187, 228, .6));
}

/* Decorative gradient border glow */
.card-container::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--pink-dark), var(--purple), var(--lavender), var(--pink));
  background-size: 300% 300%;
  animation: borderShimmer 6s ease infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity .4s ease;
}

.card-container:hover::before {
  opacity: 1;
}

@keyframes borderShimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.4, .0, .2, 1);
  border-radius: 4px;
}

.card-container.flipped .card,
.card-container:hover .card {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 4px;
  overflow: hidden;
}

/* Front: Polaroid style */
.card-front {
  background: var(--white);
  padding: 12px 12px 0 12px;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 4px 16px rgba(160, 120, 180, .2),
    0 1px 4px rgba(0,0,0,.08);
}

/* Washi tape decoration */
.polaroid-tape {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 60px;
  height: 20px;
  background: rgba(255, 245, 186, .75);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
  z-index: 3;
}

.card-container:nth-child(even) .polaroid-tape {
  background: rgba(224, 187, 228, .6);
  transform: translateX(-50%) rotate(1.5deg);
}

.polaroid-img {
  flex: 1;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.polaroid-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition), filter var(--transition);
}

.card-container:hover .polaroid-img img {
  transform: scale(1.05);
}

/* Soft vignette overlay */
.polaroid-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(200,160,220,.12) 100%);
  pointer-events: none;
}

/* Handwritten caption */
.polaroid-caption {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
  text-align: center;
  padding: 14px 8px 16px;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Back */
.card-back {
  background: linear-gradient(135deg, var(--purple), var(--pink-dark), var(--pink));
  background-size: 200% 200%;
  animation: backGradient 5s ease infinite;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 20px;
  box-shadow:
    0 4px 16px rgba(160, 120, 180, .2),
    0 1px 4px rgba(0,0,0,.08);
}

/* Decorative corner hearts on back */
.card-back::before,
.card-back::after {
  position: absolute;
  font-size: 1.2rem;
  opacity: .4;
}
.card-back::before {
  content: '💕';
  top: 12px;
  left: 14px;
}
.card-back::after {
  content: '✨';
  bottom: 12px;
  right: 14px;
}

@keyframes backGradient {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.memory-info {
  color: var(--white);
}

.memory-year {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 14px;
  text-shadow: 0 2px 12px rgba(0,0,0,.2);
  position: relative;
  border-bottom: 2px dashed rgba(255,255,255,.35);
  padding-bottom: 10px;
}

.memory-year::after {
  content: ' 💖';
  font-size: 1.2rem;
}

.memory-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  text-shadow: 0 1px 6px rgba(0,0,0,.12);
  letter-spacing: .02em;
  font-style: italic;
}

/* ============================================================
   3. SPECIAL MESSAGE SECTION
   ============================================================ */
.message-section {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* ---------- Modal overlay ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(74, 63, 92, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  max-width: 560px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px 32px;
  transform: translateY(30px) scale(.95);
  transition: transform .4s ease;
}

.modal-overlay.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-light);
  cursor: pointer;
  transition: color .2s;
  line-height: 1;
}

.modal-close:hover {
  color: var(--pink-dark);
}

.modal-heading {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 18px;
  color: var(--purple-deep);
}

/* Typewriter cursor blink */
.typewriter {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  min-height: 120px;
  white-space: pre-wrap;
}

.typewriter::after {
  content: "|";
  animation: blink .6s step-end infinite;
  color: var(--pink-dark);
}

.typewriter.done::after {
  display: none;
}

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

/* ============================================================
   4. FOOTER
   ============================================================ */
.footer {
  text-align: center;
  padding: 32px 24px;
  font-size: .95rem;
  color: var(--text-light);
  background: rgba(255,255,255,.2);
}

/* ============================================================
   5. FADE-IN ON SCROLL (controlled by JS IntersectionObserver)
   ============================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   6. CLICK-HEART ANIMATION
   ============================================================ */
#click-hearts {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
}

.click-heart {
  position: absolute;
  font-size: 1.6rem;
  pointer-events: none;
  animation: heartRise 1.2s ease-out forwards;
}

@keyframes heartRise {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-90px) scale(1.5) rotate(-15deg);
  }
}

/* ============================================================
   7. EMOTIONAL HEARTS CANVAS (memories page background)
   ============================================================ */
#hearts-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Emotional quote above gallery */
.emotional-quote {
  text-align: center;
  font-style: italic;
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 32px;
  opacity: .85;
}

/* ============================================================
   8. BALLOON-POP INTRO SCENE (wish.html)
   ============================================================ */
.balloon-scene {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  height: 100dvh;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ---------- CARTOON CAT ARCHER (SVG-based) ---------- */
.baby {
  position: absolute;
  bottom: 8%;
  left: 6%;
  cursor: pointer;
  z-index: 10;
  animation: babyBounce 2s ease-in-out infinite;
  transition: transform .25s ease, filter .25s ease;
  filter: drop-shadow(4px 6px 10px rgba(0,0,0,.15));
}
.baby svg {
  display: block;
}
.baby:hover {
  transform: scale(1.06);
  filter: drop-shadow(4px 8px 14px rgba(0,0,0,.2));
}
.baby:active {
  transform: scale(.96);
}

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

/* Eye blink animation */
.baby-eye-group {
  animation: svgBlink 4s ease-in-out infinite;
  transform-origin: center;
}
@keyframes svgBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%           { transform: scaleY(.08); }
}

/* Subtle arm bob while idle */
.baby-arm-group {
  animation: armReady 1.8s ease-in-out infinite;
  transform-origin: 134px 168px;
}
@keyframes armReady {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(-2deg); }
}

/* ---------- ARROW (JS positions & aims dynamically) ---------- */
.arrow {
  position: absolute;
  z-index: 9;
  pointer-events: none;
  filter: drop-shadow(2px 3px 4px rgba(0,0,0,.18));
  transform-origin: left center;
}
.arrow svg {
  display: block;
  width: clamp(84px, 24vw, 120px);
  height: auto;
}
.arrow.hidden {
  opacity: 0;
}

/* ---------- BALLOON ---------- */
.balloon-group {
  position: absolute;
  top: 12%;
  right: 18%;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 8;
  animation: balloonFloat 2.5s ease-in-out infinite;
}

@keyframes balloonFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}

.balloon {
  width: 100px;
  height: 120px;
  background: radial-gradient(ellipse at 35% 30%, #ff9ec4, #e74c8b 80%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset -8px -12px 20px rgba(0,0,0,.12), 0 8px 24px rgba(231,76,139,.3);
}

.balloon-shine {
  position: absolute;
  top: 18%;
  left: 22%;
  width: 28%;
  height: 32%;
  background: radial-gradient(ellipse, rgba(255,255,255,.55), transparent 70%);
  border-radius: 50%;
}

.balloon-text {
  font-size: 2.2rem;
  position: relative;
  z-index: 1;
}

.balloon-string {
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, #e74c8b, #c7ceea);
  margin-top: -2px;
  border-radius: 0 0 2px 2px;
}

/* Balloon pop */
.balloon-group.pop .balloon {
  animation: balloonPop .35s ease-out forwards;
}
.balloon-group.pop .balloon-string {
  opacity: 0;
}

@keyframes balloonPop {
  0%   { transform: scale(1); opacity: 1; }
  40%  { transform: scale(1.3); opacity: .8; }
  100% { transform: scale(0); opacity: 0; }
}

/* ---------- POP PARTICLES ---------- */
.pop-particles {
  position: absolute;
  top: 12%;
  right: 18%;
  width: 100px;
  height: 120px;
  pointer-events: none;
  z-index: 12;
}

.particle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: particleBurst .7s ease-out forwards;
}

@keyframes particleBurst {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--px), var(--py)) scale(.3);
    opacity: 0;
  }
}

/* ---------- SCENE PROMPT ---------- */
.scene-prompt {
  position: absolute;
  bottom: 3%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
  text-align: center;
  width: min(100% - 32px, 420px);
  opacity: .85;
  animation: promptPulse 2s ease-in-out infinite;
  z-index: 10;
}

@keyframes promptPulse {
  0%, 100% { opacity: .85; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

/* Wish content reveal */
.welcome-content.reveal {
  animation: wishReveal .8s ease forwards;
}

/* Override btn-cute opacity/animation inside revealed wish content
   so buttons appear immediately with the reveal, not delayed */
.welcome-content.reveal .btn-cute {
  opacity: 1;
  animation: none;
}

@keyframes wishReveal {
  from { opacity: 0; transform: translateY(30px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   9. SPARKLE TRAIL
   ============================================================ */
.sparkle {
  position: fixed;
  pointer-events: none;
  font-size: 1rem;
  z-index: 9997;
  animation: sparkleFloat .8s ease-out forwards;
}

@keyframes sparkleFloat {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px) scale(.4) rotate(20deg);
  }
}

/* ============================================================
   10. WARM GLOW PULSE (background effect)
   ============================================================ */
.warm-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255,209,220,.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .4; }
  50%      { transform: translate(-50%, -50%) scale(1.2); opacity: .7; }
}

/* ============================================================
   11. RESPONSIVE TWEAKS
   ============================================================ */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }

  .section {
    padding: 60px 16px;
  }

  .section-title,
  .hero-title,
  .hero-sub {
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
  }

  .section-subtitle,
  .emotional-quote {
    margin-bottom: 24px;
  }

  .hero-buttons,
  .page-nav {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons .btn-cute,
  .page-nav .btn-cute {
    width: 100%;
    text-align: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }

  .card-container {
    max-width: 320px;
    margin-inline: auto;
  }

  .memory-year {
    font-size: 2.2rem;
  }

  .memory-desc {
    font-size: 1rem;
  }

  .modal-content {
    padding: 28px 20px;
    width: min(92vw, 560px);
    max-height: 85svh;
    max-height: 85dvh;
  }

  /* Balloon scene responsive */
  .welcome-content {
    padding: 32px 16px;
  }

  .balloon-scene {
    min-height: 520px;
  }

  .baby { left: 2%; bottom: 12%; }
  .baby svg { width: 110px; height: 144px; }
  .baby:hover { transform: scale(1.04); }
  .balloon-group { right: 8%; top: 12%; }
  .balloon { width: 80px; height: 96px; }
  .balloon-text { font-size: 1.6rem; }

  .warm-glow {
    width: 420px;
    height: 420px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 48px 14px;
  }

  .welcome-content {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .card-container {
    max-width: min(100%, 290px);
  }

  .section-title {
    margin-bottom: 10px;
  }

  .section-subtitle,
  .emotional-quote {
    font-size: .95rem;
  }

  .hero-title .line-1 {
    font-size: 2rem;
  }

  .hero-title .line-2 {
    font-size: 2.4rem;
  }

  .btn-cute {
    font-size: 1rem;
    padding: 12px 28px;
  }

  .hero-sub {
    margin-bottom: 28px;
  }

  .memory-year {
    font-size: 2rem;
  }

  .memory-desc {
    font-size: .95rem;
    line-height: 1.6;
  }

  .hero-buttons,
  .page-nav {
    gap: 12px;
  }

  .modal-content {
    width: calc(100% - 20px);
    padding: 24px 16px;
    max-height: 82svh;
    max-height: 82dvh;
  }

  .modal-heading {
    font-size: 1.7rem;
    padding-right: 24px;
  }

  .typewriter {
    font-size: 1rem;
    line-height: 1.7;
  }

  /* Balloon scene small screens */
  .balloon-scene {
    min-height: 480px;
  }

  .baby { left: 2%; bottom: 16%; }
  .baby svg { width: 88px; height: 116px; }
  .baby:hover { transform: scale(1.03); }
  .balloon-group { right: 5%; top: 11%; }
  .balloon { width: 60px; height: 72px; }
  .balloon-text { font-size: 1.2rem; }
  .scene-prompt {
    bottom: 4%;
    font-size: 1rem;
  }

  .warm-glow {
    width: 300px;
    height: 300px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .card-container:hover {
    transform: rotate(var(--tilt));
    filter: none;
  }

  .card-container:hover::before {
    opacity: 0;
  }

  .card-container:hover .card {
    transform: none;
  }
}
