
/* ---------- 1. Reset & variabel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

:root{
  --kraft:        #e7dcc0;
  --kraft-deep:   #d8c9a2;
  --cardboard:    #cdb98c;
  --cream:        #fbf6ea;
  --ink:          #2c2620;
  --navy:         #24406b;
  --navy-deep:    #1a2e4d;
  --red:          #c1352b;
  --orange:       #dd8f2e;
  --gold:         #b6884f;
  --rose:         #c98f78;
  --tape:         rgba(255,255,255,0.55);

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-script:  'Caveat', cursive;
  --font-serif:   'Playfair Display', Georgia, serif;
  --font-body:    'Poppins', system-ui, sans-serif;

  --gutter: clamp(1rem, 4vw, 3rem);
  --radius-paper: 3px;
}

body{
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--kraft);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,p { margin: 0; }

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

/* ---------- 2. Tekstur dasar ---------- */
.paper-texture{
  background-color: var(--kraft);
  background-image:
    radial-gradient(rgba(0,0,0,0.05) 1px, transparent 1px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.02) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse 60% 40% at 12% 8%, rgba(193,53,43,0.05), transparent 60%),
    radial-gradient(ellipse 50% 35% at 88% 18%, rgba(36,64,107,0.06), transparent 60%),
    radial-gradient(ellipse 55% 45% at 20% 92%, rgba(221,143,46,0.06), transparent 60%),
    radial-gradient(ellipse 45% 35% at 85% 85%, rgba(36,64,107,0.05), transparent 60%);
  background-size: 6px 6px, 4px 4px, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat;
  background-attachment: fixed, fixed, fixed, fixed, fixed, fixed;
}

/* faint scattered dots + a soft inner vignette, repeated behind every page */
.page{
  background-image:
    radial-gradient(rgba(44,38,32,0.16) 1.5px, transparent 1.6px),
    radial-gradient(rgba(44,38,32,0.1) 1.5px, transparent 1.6px);
  background-size: 90px 90px, 130px 130px;
  background-position: 0 0, 45px 60px;
  box-shadow: inset 0 12px 34px rgba(0,0,0,0.06), inset 0 -12px 34px rgba(0,0,0,0.06);
}

/* soft rotated tape in the top corners of a page, purely decorative */
.page-inner::before,
.page-inner::after{
  content: "";
  position: absolute;
  width: 76px;
  height: 26px;
  background: var(--tape);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  opacity: 0.8;
  z-index: 1;
  pointer-events: none;
}
.page-inner::before{ top: -10px; left: 6%; transform: rotate(-8deg); }
.page-inner::after{ top: -10px; right: 6%; transform: rotate(7deg); }

.page{
  position: relative;
  width: 100%;
  min-height: 100svh;
  padding: clamp(4.5rem, 10vh, 6rem) var(--gutter) clamp(3rem, 8vh, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.page-inner{
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* spiral binder along the left edge, like a scrapbook album */
.spiral{
  position: absolute;
  top: 0; left: 0;
  width: clamp(14px, 3vw, 26px);
  height: 100%;
  background-image: radial-gradient(circle, var(--kraft) 32%, transparent 34%),
                     radial-gradient(circle, rgba(0,0,0,0.18) 0 2px, transparent 2px);
  background-size: 100% 34px, 100% 34px;
  background-repeat: repeat-y;
  background-position: center;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(2px 0 2px rgba(0,0,0,0.15));
}
.spiral::before{
  content: "";
  position: absolute;
  inset: 0 40% 0 40%;
  background: repeating-linear-gradient(#9a9186, #9a9186 2px, transparent 2px, transparent 34px);
  opacity: 0.6;
}

/* ---------- 3. Komponen dekoratif ---------- */

/* washi tape strip */
.tape{
  position: absolute;
  width: 90px;
  height: 30px;
  background: var(--tape);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  opacity: 0.85;
}
.tape.tape-red{ background: rgba(193,53,43,0.35); }
.tape.tape-navy{ background: rgba(36,64,107,0.3); }

/* torn / cardboard photo frame, mimics reference frame */
.torn-frame{
  position: relative;
  background: var(--cardboard);
  padding: 14px;
  clip-path: polygon(
    1% 4%, 6% 0%, 20% 2%, 35% 0%, 52% 3%, 68% 0%, 84% 2%, 98% 0%,
    100% 18%, 97% 34%, 100% 50%, 98% 68%, 100% 84%, 96% 98%,
    82% 100%, 66% 97%, 48% 100%, 32% 98%, 16% 100%, 2% 97%,
    0% 82%, 3% 64%, 0% 46%, 2% 28%, 0% 12%
  );
  box-shadow: 0 12px 24px rgba(0,0,0,0.25);
}
.torn-frame img,
.torn-frame .placeholder{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* polaroid style photo */
.polaroid{
  background: var(--cream);
  padding: 12px 12px 16px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  position: relative;
  display: flex;
  flex-direction: column;
}
.polaroid img,
.polaroid .placeholder{
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #e8ded0, #cbb98c);
}
.polaroid figcaption{
  margin-top: 10px;
  font-family: var(--font-script);
  font-size: 1.15rem;
  color: var(--ink);
  text-align: center;
}

/* fallback placeholder look for missing photos */
.placeholder{
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7d715a;
  background: repeating-linear-gradient(45deg, #efe7d4, #efe7d4 10px, #e6dcc2 10px, #e6dcc2 20px);
  padding: 1rem;
}

/* hand-drawn sticker stars / doodles */
.sticker{
  position: absolute;
  z-index: 4;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.2));
  pointer-events: none;
}

/* red rectangular date tag */
.date-tag{
  display: inline-block;
  background: var(--red);
  color: var(--cream);
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  font-size: clamp(0.9rem, 2.4vw, 1.15rem);
  padding: 0.5em 1em;
  transform: rotate(-2deg);
  box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}

/* magazine cut-out title letters — stacks one word per row, always */
.cutout-title{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.35rem, 1.6vw, 0.7rem);
}
.cutout-word{
  display: flex;
  flex-wrap: nowrap;
  white-space: nowrap;
  justify-content: center;
  gap: clamp(0.15rem, 1vw, 0.35rem);
  max-width: 100%;
  transform-origin: center center;
  transition: transform 0.2s ease;
}
.cutout-title span{
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 11vw, 4.6rem);
  line-height: 1;
  padding: 0.14em 0.18em;
  color: var(--cream);
  box-shadow: 0 6px 14px rgba(0,0,0,0.22);
  border: 3px solid var(--cream);
}
.cutout-word span:nth-child(6n+1){ background: var(--navy); transform: rotate(-4deg); }
.cutout-word span:nth-child(6n+2){ background: var(--red); transform: rotate(3deg); }
.cutout-word span:nth-child(6n+3){ background: var(--orange); color: var(--ink); transform: rotate(-2deg); border-color: var(--ink); }
.cutout-word span:nth-child(6n+4){ background: var(--cream); color: var(--ink); transform: rotate(4deg); font-family: var(--font-serif); font-style: italic; border-color: var(--ink); }
.cutout-word span:nth-child(6n+5){ background: var(--navy); transform: rotate(2deg); }
.cutout-word span:nth-child(6n+0){ background: var(--red); transform: rotate(-3deg); }

@media (max-width: 380px){
  .cutout-title span{ font-size: clamp(1.5rem, 13vw, 2.4rem); padding: 0.12em 0.14em; }
}

/* sticky note ("NOT REALLY" style annotation) */
.sticky-note{
  background: #fff7d6;
  padding: 0.9rem 1.1rem;
  font-family: var(--font-script);
  font-size: 1.15rem;
  line-height: 1.3;
  color: #4a4130;
  box-shadow: 0 8px 16px rgba(0,0,0,0.18);
  transform: rotate(-3deg);
  max-width: 220px;
}

/* eyebrow label */
.eyebrow{
  font-family: var(--font-script);
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--navy-deep);
}

.eyebrow,
.hero-bottom,
.cover-eyebrow,
.cover-sub,
.cover-hint,
.letter-body,
.letter-sign,
.timeline-caption,
.polaroid figcaption,
.sticky-note,
.wish-instruction,
.wish-message,
.closing-title,
.closing-message,
.closing-note{
  white-space: pre-line;
}

.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.reveal.visible{
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 4. Layar sampul ---------- */
#cover{
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-deep);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.06), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(255,255,255,0.05), transparent 45%),
    linear-gradient(180deg, var(--navy-deep), #0f1b30);
  transition: opacity 1.1s ease, visibility 1.1s ease;
}
#cover.hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.cover-card{
  text-align: center;
  color: var(--cream);
  padding: clamp(2rem, 6vw, 3rem);
  max-width: 420px;
}
.cover-frame{
  border: 1px solid rgba(255,255,255,0.35);
  padding: clamp(2.2rem, 8vw, 3.5rem) clamp(1.4rem, 6vw, 2.5rem);
  position: relative;
}

.cover-eyebrow{
  font-family: var(--font-script);
  font-size: clamp(1.1rem, 3.5vw, 1.4rem);
  color: var(--rose);
  letter-spacing: 0.02em;
}
.cover-name-tag{
  display: inline-block;
  background: var(--cream);
  padding: 0.1em 0.55em 0.16em;
  transform: rotate(-2.5deg);
  box-shadow: 0 10px 22px rgba(0,0,0,0.4);
  border: 3px solid var(--cream);
  margin: 0.35em 0 0.5em;
}
.cover-name{
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2rem, 8vw, 3.1rem);
  color: var(--ink);
  line-height: 1.1;
}
.cover-tape{
  position: absolute;
  width: 68px;
  height: 24px;
  background: rgba(251,246,234,0.5);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  z-index: 1;
}
.cover-tape-left{ top: -12px; left: 10%; transform: rotate(-9deg); }
.cover-tape-right{ top: -12px; right: 10%; transform: rotate(8deg); }
.cover-star{ position: absolute; z-index: 1; }
.cover-star-left{ top: 8%; left: -6%; }
.cover-star-right{ bottom: 10%; right: -4%; }
.cover-line{
  width: 60px;
  height: 1px;
  background: var(--rose);
  margin: 0.6em auto 1.1em;
}
.cover-sub{
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2rem;
}
.open-btn{
  border: 1px solid var(--rose);
  background: transparent;
  color: var(--cream);
  padding: 0.9em 2.2em;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background 0.35s ease, color 0.35s ease, transform 0.35s ease;
}
.open-btn:hover,
.open-btn:focus-visible{
  background: var(--rose);
  color: var(--navy-deep);
  transform: translateY(-2px);
}
.open-btn:focus-visible{ outline: 2px solid var(--cream); outline-offset: 3px; }

.cover-hint{
  margin-top: 1.4rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

/* ---------- 5. Halaman 1 — Judul ---------- */
#page-hero{ background: var(--kraft); }
.hero-top{
  text-align: center;
  margin-bottom: clamp(1.5rem, 5vh, 2.5rem);
}
.hero-photo-wrap{
  display: flex;
  justify-content: center;
  margin: clamp(1.5rem, 5vh, 2.5rem) 0;
}
.hero-photo{
  width: min(280px, 70vw);
  transform: rotate(-3deg);
}
.hero-bottom{
  text-align: center;
  font-family: var(--font-script);
  font-size: clamp(1.2rem, 3.5vw, 1.6rem);
  color: var(--navy-deep);
  max-width: 460px;
  margin: 0 auto;
}
.hero-date-wrap{
  display: flex;
  justify-content: center;
  margin: 1.4rem 0;
}
.hero-scroll-cue{
  margin-top: 2.4rem;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.55;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob{
  0%,100%{ transform: translateY(0); }
  50%{ transform: translateY(6px); }
}

/* ---------- 6. Halaman 2 — Lini masa ---------- */
#page-timeline{ background: var(--kraft-deep); }
.timeline-head{ text-align: center; margin-bottom: clamp(2rem, 6vh, 3rem); }
.timeline-title{
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  color: var(--navy-deep);
}
.timeline{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(2.4rem, 8vh, 3.6rem);
}
.timeline::before{
  content: "";
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: repeating-linear-gradient(var(--navy), var(--navy) 8px, transparent 8px, transparent 16px);
  transform: translateX(-50%);
  opacity: 0.4;
}
.timeline-item{
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.5rem);
  position: relative;
}
.timeline-item:nth-child(even) .timeline-photo{ order: 2; }
.timeline-item:nth-child(even) .timeline-text{ order: 1; text-align: right; }
.timeline-photo{ display: flex; justify-content: center; }
.timeline-item:nth-child(odd) .timeline-photo{ justify-content: flex-end; }
.timeline-item:nth-child(even) .timeline-photo{ justify-content: flex-start; }
.timeline-photo .polaroid{ width: min(230px, 46vw); }
.timeline-text{ padding: 0 0.5rem; }
.timeline-year{
  font-family: var(--font-display);
  color: var(--red);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}
.timeline-caption{
  font-family: var(--font-script);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  color: var(--ink);
  margin-top: 0.3rem;
}

/* ---------- 7. Halaman 3 — Surat ---------- */
#page-letter{
  background: var(--kraft);
  display: flex;
  align-items: center;
}
.letter-sheet{
  background: var(--cream);
  background-image: repeating-linear-gradient(180deg, transparent 0 38px, rgba(36,64,107,0.12) 38px 39px);
  padding: clamp(2rem, 7vw, 3.5rem) clamp(1.6rem, 6vw, 3rem);
  box-shadow: 0 16px 34px rgba(0,0,0,0.22);
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  transform: rotate(-0.6deg);
}
.letter-title{
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  color: var(--navy-deep);
  margin-bottom: 1.2rem;
}
.letter-body{
  font-family: var(--font-script);
  font-size: clamp(1.15rem, 3.2vw, 1.45rem);
  line-height: 39px;
  color: var(--ink);
  white-space: pre-line;
}
.letter-sign{
  margin-top: 1.6rem;
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--navy-deep);
}

/* ---------- 8. Halaman 4 — Galeri ---------- */
#page-gallery{ background: var(--kraft-deep); }
.gallery-head{ text-align: center; margin-bottom: clamp(2rem, 6vh, 3rem); }
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 7vw, 2.4rem) clamp(1.4rem, 5vw, 2rem);
  align-items: start;
  justify-items: center;
}
.gallery-grid .polaroid{
  width: 100%;
  max-width: 220px;
  min-width: 0;
  transition: transform 0.4s ease;
}
.gallery-grid .polaroid:nth-child(odd){ transform: rotate(-2deg); }
.gallery-grid .polaroid:nth-child(even){ transform: rotate(1.5deg); }
.gallery-grid .polaroid:hover{ transform: rotate(0deg) scale(1.04); }

@media (max-width: 480px){
  .gallery-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.2rem 1rem;
  }
  .gallery-grid .polaroid{
    max-width: 155px;
    transform: none !important;
  }
}

/* ---------- 9. Halaman 5 — Lilin & harapan ---------- */
#page-wish{
  background: var(--navy-deep);
  color: var(--cream);
  text-align: center;
  align-items: center;
}
.wish-title{
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2rem, 6vw, 2.8rem);
}
.wish-instruction{
  margin-top: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.cake-wrap{
  margin: clamp(2rem, 8vh, 3.5rem) auto;
  display: flex;
  justify-content: center;
}
.cake{ position: relative; }
.cake-base{
  width: 190px;
  height: 90px;
  background: linear-gradient(180deg, #eecfa0, #d9a86a);
  border-radius: 10px 10px 26px 26px;
  box-shadow: 0 14px 26px rgba(0,0,0,0.35);
}
.cake-base::before{
  content: "";
  position: absolute;
  top: -14px; left: 0; right: 0;
  height: 20px;
  background: var(--rose);
  border-radius: 50%;
}
.candles{
  position: absolute;
  top: -46px; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 18px;
}
.candle{
  width: 6px;
  height: 34px;
  background: linear-gradient(180deg, #fff, var(--red));
  border-radius: 2px;
  position: relative;
}
.flame{
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 16px;
  background: radial-gradient(circle at 50% 30%, #fff6c8, var(--orange) 60%, transparent 70%);
  border-radius: 60% 60% 60% 60% / 80% 80% 40% 40%;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.candle.out .flame{ opacity: 0; transform: translateX(-50%) scale(0.3); }
.wish-message{
  margin-top: 2rem;
  font-family: var(--font-script);
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  max-width: 480px;
  margin-inline: auto;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.wish-message.show{ opacity: 1; }

/* confetti */
.confetti-piece{
  position: fixed;
  top: -10px;
  width: 8px; height: 14px;
  z-index: 200;
  pointer-events: none;
  animation: fall linear forwards;
}
@keyframes fall{
  to{ transform: translateY(110vh) rotate(360deg); opacity: 0.8; }
}

/* ---------- 10. Halaman 6 — Penutup ---------- */
#page-closing{
  background: var(--kraft);
  text-align: center;
  align-items: center;
}
.closing-title{
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  color: var(--navy-deep);
}
.cutout-title--small{
  margin: 0.6rem 0 1.2rem;
}
.cutout-title--small span{
  font-size: clamp(1.6rem, 8vw, 3rem);
}
.closing-message{
  font-family: var(--font-script);
  font-size: clamp(1.2rem, 3.6vw, 1.55rem);
  color: var(--ink);
  max-width: 440px;
  margin: 0 auto;
  line-height: 1.4;
}
.closing-note{
  margin-top: 1.1rem;
  font-family: var(--font-script);
  font-size: 1.15rem;
  color: var(--navy);
  opacity: 0.85;
}
.restart-btn{
  margin-top: 2.2rem;
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy-deep);
  padding: 0.75em 1.8em;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease;
}
.restart-btn:hover{ background: var(--navy-deep); color: var(--cream); }

/* ---------- 11. Kontrol musik ---------- */
#music-control{
  position: fixed;
  right: clamp(0.9rem, 3vw, 1.6rem);
  bottom: clamp(0.9rem, 3vw, 1.6rem);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--cream);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 999px;
  padding: 0.5rem 0.9rem 0.5rem 0.5rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#music-control.active{ opacity: 1; visibility: visible; }
#music-toggle{
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--navy-deep);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
}
#music-toggle:focus-visible{ outline: 2px solid var(--navy); outline-offset: 2px; }
.music-status{
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy-deep);
}
.music-bars{ display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; margin-right: 2px; }
.music-bars span{
  width: 2px; background: var(--navy-deep);
  animation: eq 0.9s ease-in-out infinite;
}
.music-bars span:nth-child(1){ height: 40%; animation-delay: 0s; }
.music-bars span:nth-child(2){ height: 100%; animation-delay: 0.15s; }
.music-bars span:nth-child(3){ height: 65%; animation-delay: 0.3s; }
#music-control.paused .music-bars span{ animation-play-state: paused; height: 30%; }
@keyframes eq{
  0%,100%{ height: 30%; }
  50%{ height: 100%; }
}

/* ---------- 13. Responsive ---------- */
@media (max-width: 720px){
  .timeline-item{
    grid-template-columns: 1fr;
    text-align: center;
  }
  .timeline-item:nth-child(even) .timeline-text{ text-align: center; order: 2; }
  .timeline-item:nth-child(even) .timeline-photo{ order: 1; justify-content: center; }
  .timeline-item:nth-child(odd) .timeline-photo{ justify-content: center; }
  .timeline::before{ left: 20px; }
  .gallery-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .letter-body{ line-height: 34px; }
  .letter-sheet{ background-image: repeating-linear-gradient(180deg, transparent 0 34px, rgba(36,64,107,0.12) 34px 35px); }
}

@media (max-width: 430px){
  .page{
    padding-left: calc(var(--gutter) + 10px);
    padding-right: calc(var(--gutter) + 10px);
  }
  .cake-base{ width: 150px; height: 74px; }
  .candles{ gap: 12px; top: -40px; }
  .sticker{ transform: scale(0.75); }
}

@media (min-width: 900px){
  .gallery-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-grid .polaroid{ max-width: 260px; }
}
