/* =========================================================
   Vishu & Divya — Engagement Invitation
   Palette: ivory · blush · dusty rose · sage · muted gold
   ========================================================= */
:root {
  --ivory: #fbf7f2;
  --cream: #f5ede3;
  --paper: #fffdf9;
  --blush: #ecd0cb;
  --rose: #c98b8b;
  --rose-deep: #a86b72;
  --mauve: #8a6b75;
  --ink: #5b4650;
  --ink-soft: #7d6872;
  --gold: #b8965a;
  --gold-soft: #dcc8a0;
  --sage: #a9b8a3;

  --f-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --f-script: "Great Vibes", "Brush Script MT", cursive;
  --f-caps: "Marcellus", "Cormorant Garamond", serif;
  --f-hindi: "Tiro Devanagari Hindi", "Noto Serif Devanagari", serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --vh: 100vh;
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--f-serif);
  color: var(--ink);
  background: var(--ivory);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
svg { display: block; }

/* ---------- Decorative corners ---------- */
.corner {
  position: absolute;
  width: clamp(104px, 22vw, 210px);
  height: clamp(104px, 22vw, 210px);
  pointer-events: none;
  opacity: .9;
  z-index: 1;
  animation: sway 9s ease-in-out infinite alternate;
}
.corner.tl { top: 0; left: 0; transform-origin: 0 0; }
.corner.tr { top: 0; right: 0; transform: scaleX(-1); transform-origin: 100% 0; animation-name: sway-x; }
.corner.bl { bottom: 0; left: 0; transform: scaleY(-1); transform-origin: 0 100%; animation-name: sway-y; }
.corner.br { bottom: 0; right: 0; transform: rotate(180deg); transform-origin: 100% 100%; animation-name: sway-r; }
@keyframes sway   { to { transform: rotate(1.6deg); } }
@keyframes sway-x { from { transform: scaleX(-1); } to { transform: scaleX(-1) rotate(1.6deg); } }
@keyframes sway-y { from { transform: scaleY(-1); } to { transform: scaleY(-1) rotate(1.6deg); } }
@keyframes sway-r { from { transform: rotate(180deg); } to { transform: rotate(181.6deg); } }

/* ---------- Falling petals ---------- */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.petal {
  position: absolute;
  top: -6vh;
  left: var(--left);
  width: var(--size);
  height: calc(var(--size) * .78);
  background: radial-gradient(circle at 30% 30%, #fff3f1 0%, var(--tint) 70%);
  border-radius: 80% 0 80% 0;
  opacity: var(--op);
  animation: fall var(--dur) linear var(--delay) infinite;
  will-change: transform;
}
@keyframes fall {
  0%   { transform: translate3d(0, -6vh, 0) rotate(0deg); }
  50%  { transform: translate3d(var(--drift), 52vh, 0) rotate(200deg); }
  100% { transform: translate3d(calc(var(--drift) * -.4), 112vh, 0) rotate(420deg); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  font-family: var(--f-caps);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .95em 1.7em;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #cfb07a, #a9864c);
  box-shadow: 0 8px 22px -10px rgba(140, 104, 50, .65), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(140, 104, 50, .7), inset 0 1px 0 rgba(255,255,255,.35); }
.btn:active { transform: translateY(0); }
.btn svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-ghost { background: transparent; color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-soft); }
.btn-ghost:hover { background: rgba(220, 200, 160, .16); box-shadow: inset 0 0 0 1px var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- Gate / cover ---------- */
.gate {
  position: fixed; inset: 0; z-index: 40;
  display: grid; place-items: center;
  height: var(--vh);
  overflow: hidden;
}
.door {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.9), transparent 70%),
    linear-gradient(180deg, #fbf6ef, #f3e8dc);
  transition: transform 1.6s var(--ease);
  overflow: hidden;
}
.door-l { left: 0; box-shadow: inset -1px 0 0 rgba(184,150,90,.35); }
.door-r { right: 0; box-shadow: inset 1px 0 0 rgba(184,150,90,.35); }
.door::before {
  content: ""; position: absolute; inset: 14px; border: 1px solid rgba(184,150,90,.28); pointer-events: none;
}
.door-l::before { border-right: 0; }
.door-r::before { border-left: 0; }
.gate.opening .door-l { transform: translateX(-101%); }
.gate.opening .door-r { transform: translateX(101%); }

.gate-card {
  position: relative; z-index: 2;
  text-align: center;
  padding: 24px;
  max-width: 460px;
  transition: opacity .8s var(--ease), transform .9s var(--ease);
  animation: gateIn 1.6s var(--ease) both;
}
@keyframes gateIn { from { opacity: 0; transform: translateY(16px); } }
.gate.opening .gate-card { opacity: 0; transform: scale(.94); }
.gate.gone { display: none; }

.monogram {
  position: relative;
  width: clamp(150px, 42vw, 200px);
  aspect-ratio: 1;
  margin: 18px auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-script);
  color: var(--rose-deep);
}
.monogram-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 60s linear infinite; }
.mono-l, .mono-r { font-size: clamp(3.2rem, 12vw, 4.4rem); line-height: 1; }
.mono-l { transform: translate(6px, -6px); }
.mono-r { transform: translate(-6px, 8px); }
.mono-amp { font-family: var(--f-serif); font-style: italic; font-size: 1.4rem; color: var(--gold); margin: 0 .15em; }
@keyframes spin { to { transform: rotate(360deg); } }

.gate-names {
  font-family: var(--f-script);
  font-weight: 400;
  font-size: clamp(2.3rem, 9vw, 3.4rem);
  color: var(--ink);
  line-height: 1.15;
}
.gate-names em { font-family: var(--f-serif); font-style: italic; color: var(--gold); font-size: .6em; padding: 0 .15em; }
.gate-date {
  font-family: var(--f-caps); letter-spacing: .4em; color: var(--mauve);
  font-size: .9rem; margin: 10px 0 30px; padding-left: .4em;
}
.btn-open { animation: pulse 2.8s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 22px -10px rgba(140,104,50,.65), 0 0 0 0 rgba(201,169,110,.45); }
  50%      { box-shadow: 0 8px 22px -10px rgba(140,104,50,.65), 0 0 0 12px rgba(201,169,110,0); }
}
.gate-note { margin-top: 18px; font-style: italic; font-size: .95rem; color: var(--ink-soft); }

/* ---------- Book & pages ---------- */
.book { position: fixed; inset: 0; height: var(--vh); }
.page {
  position: absolute; inset: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 46px, 0) scale(.985);
  filter: blur(6px);
  transition:
    opacity .9s var(--ease),
    transform 1.1s var(--ease),
    filter .9s var(--ease),
    visibility 0s linear 1.1s;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(236,208,203,.38), transparent 70%),
    radial-gradient(ellipse 70% 40% at 50% 100%, rgba(169,184,163,.18), transparent 70%),
    var(--ivory);
}
.page.before { transform: translate3d(0, -46px, 0) scale(1.015); }
.page.active {
  opacity: 1; visibility: visible; transform: none; filter: none; z-index: 2;
  transition-delay: .22s, .22s, .22s, 0s;
}

.frame { position: absolute; inset: 12px; border: 1px solid rgba(184,150,90,.3); pointer-events: none; z-index: 1; }
.frame::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(184,150,90,.16); }

.page-scroll {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
  z-index: 2;
}
.page-scroll::-webkit-scrollbar { display: none; }
.page-inner {
  min-height: 100%;
  max-width: 580px;
  margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: calc(64px + env(safe-area-inset-top)) 26px calc(104px + env(safe-area-inset-bottom));
}

/* reveal on page entry */
.rv { opacity: 0; transform: translateY(18px); }
.page.on .rv { animation: rise 1.1s var(--ease) both; animation-delay: calc(.5s + var(--i, 0) * .12s); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Typography ---------- */
.kicker {
  font-family: var(--f-caps);
  font-size: .74rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  padding-left: .32em;
}
.section-title {
  font-family: var(--f-serif); font-weight: 300; font-style: italic;
  font-size: clamp(2.1rem, 8vw, 2.8rem);
  color: var(--ink);
  letter-spacing: .02em;
  margin-top: 2px;
}
.script-title {
  font-family: var(--f-script); font-weight: 400;
  font-size: clamp(3.2rem, 13vw, 4.6rem);
  color: var(--rose-deep);
  line-height: 1.1;
  margin: 4px 0 6px;
}
.lead {
  font-size: clamp(1.1rem, 4.2vw, 1.28rem);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 30em;
  margin: 8px auto 0;
}
.hindi { font-family: var(--f-hindi); }
.invocation { font-size: clamp(1.15rem, 4.6vw, 1.4rem); color: var(--rose-deep); letter-spacing: .04em; }
.shloka { font-size: clamp(.98rem, 3.9vw, 1.15rem); line-height: 1.9; color: var(--ink); margin-top: 6px; }
.translation { font-style: italic; font-size: .98rem; line-height: 1.55; color: var(--ink-soft); margin-top: 8px; }

.divider {
  position: relative; width: 150px; height: 1px; margin: 22px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.divider::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px;
  background: var(--ivory); border: 1px solid var(--gold);
  transform: translate(-50%, -50%) rotate(45deg);
}

.hint {
  margin-top: 26px;
  font-family: var(--f-caps); font-size: .72rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold);
  padding: 10px 14px;
}
.hint span { display: inline-block; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }

/* ---------- Page 1 · welcome ---------- */
.diya-wrap { position: relative; width: clamp(150px, 44vw, 200px); aspect-ratio: 1; margin: 6px auto 4px; display: grid; place-items: center; }
.mandala { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 90s linear infinite; opacity: .85; }
.diya { position: relative; width: 58%; margin-top: 12%; }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flicker 2.2s ease-in-out infinite; }
.diya-glow { transform-box: fill-box; transform-origin: center; animation: glow 2.2s ease-in-out infinite; }
@keyframes flicker {
  0%, 100% { transform: scale(1, 1) rotate(0deg); }
  25% { transform: scale(.94, 1.06) rotate(-2deg); }
  50% { transform: scale(1.04, .96) rotate(1.5deg); }
  75% { transform: scale(.97, 1.04) rotate(-1deg); }
}
@keyframes glow { 50% { transform: scale(1.12); opacity: .4; } }

/* ---------- Illustrations ---------- */
.illus { margin: 14px auto 6px; }
.illus svg { width: min(300px, 74vw); height: auto; max-height: 36vh; margin: 0 auto; }
.couple svg { max-height: 38vh; }
.ring-sparkle { transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .55; transform: scale(1.12); } }

/* ---------- Page 2 · engagement ---------- */
.names {
  font-family: var(--f-script); font-weight: 400;
  font-size: clamp(2.6rem, 11vw, 4rem);
  color: var(--rose-deep);
  line-height: 1.1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; column-gap: .25em;
}
.names em { font-family: var(--f-serif); font-style: italic; font-size: .55em; color: var(--gold); }

.date-block {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  margin: 22px auto 6px; width: min(340px, 100%);
}
.db-side {
  font-family: var(--f-caps); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--mauve); line-height: 1.6;
  border-top: 1px solid var(--gold-soft); border-bottom: 1px solid var(--gold-soft);
  padding: 10px 4px;
}
.db-main { display: flex; flex-direction: column; align-items: center; padding: 0 18px; }
.db-month, .db-year { font-family: var(--f-caps); font-size: .72rem; letter-spacing: .3em; color: var(--gold); text-transform: uppercase; padding-left: .3em; }
.db-day { font-family: var(--f-serif); font-weight: 300; font-size: 3.6rem; line-height: 1; color: var(--ink); }
.venue-mini { font-style: italic; font-size: 1.05rem; color: var(--ink-soft); margin-top: 8px; }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: min(340px, 100%); margin: 22px auto 0; }
.countdown > div {
  padding: 12px 4px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.55);
  box-shadow: inset 0 0 0 1px rgba(220,200,160,.65);
  backdrop-filter: blur(4px);
}
.countdown b { display: block; font-family: var(--f-serif); font-weight: 500; font-size: 1.75rem; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.countdown span { font-family: var(--f-caps); font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.cd-caption { font-style: italic; color: var(--ink-soft); margin-top: 10px; font-size: 1rem; }

/* ---------- Page 3 · birthday ---------- */
.page-bday {
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(242,181,196,.32), transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(200,182,226,.3), transparent 70%),
    #fdf7f8;
}
.page-bday .frame { border-color: rgba(200,182,226,.55); }
.page-bday .frame::after { border-color: rgba(242,181,196,.4); }
.page-bday .kicker { color: #a58bc4; }
.bday-title {
  font-family: var(--f-script); font-weight: 400;
  font-size: clamp(2.5rem, 10vw, 3.6rem);
  color: #b0789a;
  line-height: 1.1;
  margin-top: 6px;
}
.bday-title span {
  display: flex; align-items: center; justify-content: center; gap: .3em;
  font-family: var(--f-caps); font-size: .32em; letter-spacing: .3em; text-transform: uppercase; color: var(--mauve);
  margin-top: 8px;
}
.bday-title b {
  font-family: var(--f-serif); font-weight: 500; letter-spacing: 0;
  width: 2.4em; height: 2.4em; border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 1.6em; color: #fff;
  background: linear-gradient(135deg, #e7c6dc, #b49fd4);
  box-shadow: 0 6px 16px -6px rgba(140,110,180,.6);
}
.bday-name { font-family: var(--f-script); font-size: clamp(2.4rem, 10vw, 3.2rem); color: #a96a8c; line-height: 1.2; }
.balloons { animation: bob 5s ease-in-out infinite; transform-origin: 86px 124px; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-1.5deg); } }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .55em 1.1em;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  box-shadow: inset 0 0 0 1px rgba(200,182,226,.7);
  font-size: 1.02rem; color: var(--ink);
}
.chip svg { width: 16px; height: 16px; fill: none; stroke: #a58bc4; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bday-note { font-style: italic; color: var(--ink-soft); margin-top: 18px; }

.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 1; overflow: hidden; }
.confetti i {
  position: absolute; top: -10px; width: 7px; height: 4px; border-radius: 1px;
  animation: confetti var(--dur) linear var(--delay) infinite;
  opacity: .7;
}
@keyframes confetti { to { transform: translate3d(var(--drift), calc(var(--vh) + 20px), 0) rotate(720deg); } }

/* ---------- Page 4 · venue ---------- */
.taj svg { width: min(300px, 78vw); max-height: 24vh; }
.venue-card {
  width: 100%;
  margin-top: 14px;
  padding: 26px 18px 20px;
  border-radius: 22px;
  background: rgba(255, 253, 249, .85);
  box-shadow: 0 18px 40px -26px rgba(91,70,80,.45), inset 0 0 0 1px rgba(220,200,160,.6);
}
.venue-name { font-family: var(--f-serif); font-weight: 500; font-size: clamp(1.6rem, 6vw, 2rem); color: var(--ink); margin-top: 6px; }
.address { font-size: 1.1rem; line-height: 1.55; color: var(--ink-soft); margin-top: 4px; }
.venue-when { font-family: var(--f-caps); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-top: 12px; }
.venue-times { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 6px; font-style: italic; font-size: 1.05rem; color: var(--ink-soft); }
.venue-times span + span::before { content: "\2766"; font-style: normal; color: var(--gold-soft); margin-right: 14px; }
.map {
  position: relative;
  margin: 16px 0 18px;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #f3ebe0, #ece3f0);
  box-shadow: inset 0 0 0 1px rgba(220,200,160,.6);
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.75) sepia(.08); }
.btn-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.closing { font-family: var(--f-script); font-size: clamp(2rem, 8vw, 2.6rem); color: var(--rose-deep); line-height: 1.2; }
.family { font-family: var(--f-caps); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--mauve); margin-top: 6px; }

.dev-credit {
  margin-top: 40px;
  padding-top: 18px;
  width: min(320px, 100%);
  border-top: 1px dashed rgba(184,150,90,.35);
  font-size: .95rem;
  font-style: italic;
  color: var(--ink-soft);
}
.dev-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.dev-links a {
  display: inline-flex; align-items: center; gap: .45em;
  padding: .45em 1em;
  border-radius: 999px;
  font-family: var(--f-caps); font-style: normal; font-size: .72rem; letter-spacing: .12em;
  text-decoration: none;
  color: var(--mauve);
  background: rgba(255,255,255,.6);
  box-shadow: inset 0 0 0 1px rgba(220,200,160,.6);
  transition: color .3s, box-shadow .3s, transform .3s var(--ease);
}
.dev-links a:hover { color: var(--rose-deep); box-shadow: inset 0 0 0 1px var(--gold); transform: translateY(-1px); }
.dev-links svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Pager ---------- */
.pager {
  position: fixed; z-index: 30;
  left: 50%; bottom: calc(18px + env(safe-area-inset-bottom));
  transform: translate(-50%, 30px);
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255, 253, 249, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -16px rgba(91,70,80,.5), inset 0 0 0 1px rgba(220,200,160,.6);
  opacity: 0; pointer-events: none;
  transition: opacity .8s var(--ease) .6s, transform .8s var(--ease) .6s;
}
body.opened .pager { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.pg-arrow { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); transition: background .3s, opacity .3s; }
.pg-arrow:hover { background: rgba(220,200,160,.22); }
.pg-arrow:disabled { opacity: .3; cursor: default; background: none; }
.pg-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dots { display: flex; gap: 8px; padding: 0 4px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--gold-soft); transition: width .5s var(--ease), background .5s; }
.dot.active { width: 24px; background: var(--gold); }

/* ---------- Music button ---------- */
.music-btn {
  position: fixed; z-index: 45;
  top: calc(18px + env(safe-area-inset-top)); right: 18px;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,253,249,.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px -14px rgba(91,70,80,.6), inset 0 0 0 1px rgba(220,200,160,.75);
  color: var(--gold);
  opacity: 0; pointer-events: none; transform: scale(.8);
  transition: opacity .6s var(--ease) .8s, transform .6s var(--ease) .8s;
}
body.opened .music-btn { opacity: 1; pointer-events: auto; transform: none; }
.music-btn .note { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.music-btn .bars { display: none; align-items: flex-end; gap: 3px; height: 18px; }
.music-btn .bars i { width: 3px; height: 100%; border-radius: 2px; background: currentColor; transform-origin: bottom; animation: eq 1.1s ease-in-out infinite; }
.music-btn .bars i:nth-child(2) { animation-delay: -.3s; }
.music-btn .bars i:nth-child(3) { animation-delay: -.6s; }
.music-btn .bars i:nth-child(4) { animation-delay: -.85s; }
.music-btn.playing .bars { display: flex; }
.music-btn.playing .note { display: none; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ---------- Page-turn veil ---------- */
.veil {
  position: fixed; inset: -10% -40%; z-index: 25; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(236,208,203,.42) 45%, rgba(255,250,244,.6) 50%, rgba(236,208,203,.42) 55%, transparent 70%);
  transform: translateX(-100%);
  opacity: 0;
}
.veil.run { animation: veil 1.25s var(--ease); }
.veil.run.back { animation-name: veil-back; }
@keyframes veil { 0% { transform: translateX(-70%); opacity: 1; } 100% { transform: translateX(70%); opacity: 0; } }
@keyframes veil-back { 0% { transform: translateX(70%); opacity: 1; } 100% { transform: translateX(-70%); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  .frame { inset: 20px; }
  .page-inner { padding-top: 80px; padding-bottom: 120px; }
  .illus svg { width: 320px; }
}
@media (max-width: 380px) {
  .page-inner { padding-left: 20px; padding-right: 20px; }
  .countdown { gap: 6px; }
  .countdown b { font-size: 1.45rem; }
  .db-main { padding: 0 12px; }
  .db-day { font-size: 3rem; }
}
@media (max-height: 640px) {
  .illus svg { max-height: 30vh; }
  .diya-wrap { width: 130px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .petals, .confetti { display: none; }
  .page { transition-duration: .4s !important; filter: none; transform: none; }
  .rv { opacity: 1; transform: none; }
}
