/* =========================================================
   style.css — poori website ka design
   Sections usi order mein hain jaise page par: gate, hero,
   cake, letter, photos, reasons, balloons, finale, lightbox
   ========================================================= */

:root {
  --gold: #ffd166;
  --pink: #ff5d8f;
  --teal: #2ee6c5;
  --sky: #5ec8ff;
  --purple: #b388ff;
  --orange: #ff8c42;
  --text: #fff8ef;
  --muted: rgba(255, 248, 239, .74);
  --font: 'Baloo 2', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --hand: 'Caveat', 'Segoe Print', 'Comic Sans MS', cursive;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth; -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* double-tap zoom ka delay hatao, pinch zoom chalta rahe */
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
  background: #160c38;
}
body.locked { overflow: hidden; height: 100vh; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
.btn, .candle, .balloon, .gift, .flip, .envelope, .music-btn, .lb-nav, .lb-close {
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
[hidden] { display: none !important; }

/* ---------- background + taare + confetti ----------
   background ek fixed layer pe hai (phone pe "background-attachment: fixed" atakta hai) */
.stars {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1100px 620px at 8% -8%, rgba(108, 54, 214, .55), transparent 62%),
    radial-gradient(900px 560px at 108% 28%, rgba(14, 110, 160, .40), transparent 62%),
    radial-gradient(900px 700px at 50% 108%, rgba(255, 93, 143, .22), transparent 60%),
    linear-gradient(180deg, #160c38 0%, #1b1042 45%, #0e1633 100%);
}
.stars i {
  position: absolute; background: #fff; border-radius: 50%; opacity: .2;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle { 0%, 100% { opacity: .12; transform: scale(.8); } 50% { opacity: .95; transform: scale(1.25); } }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }
/* kuch bhi screen se bahar na nikle (warna phone pe page zoom-out ho jaata hai) */
main { position: relative; z-index: 1; overflow-x: hidden; overflow-x: clip; }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 22px;
  font-weight: 700; font-size: 1.05rem; color: #fff; text-decoration: none;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  box-shadow: 0 10px 26px rgba(255, 93, 143, .35);
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s;
}
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn.ghost { background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
/* hover sirf mouse wale devices par — phone pe tap ke baad "chipka" nahi rehta */
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255, 93, 143, .45); }
  .btn.ghost:hover { background: rgba(255, 255, 255, .14); }
}
.btn:focus-visible, .polaroid:focus-visible, .flip:focus-visible, .envelope:focus-visible, .candle:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 4px;
}

/* ---------- common section ---------- */
.section {
  position: relative; max-width: 1040px; margin: 0 auto; text-align: center;
  padding: 88px max(20px, env(safe-area-inset-right)) 88px max(20px, env(safe-area-inset-left));
}
@media (max-width: 600px) {
  .section { padding-top: 64px; padding-bottom: 64px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}
.m-only { display: none; }
@media (max-width: 600px) { .m-only { display: inline; } .d-only { display: none; } }
.kicker { font-family: var(--hand); color: var(--gold); font-size: 1.7rem; font-weight: 700; margin: 0 0 2px; line-height: 1.2; }
.section h2 { font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1.15; margin: 0 0 8px; font-weight: 800; }
.hint { color: var(--muted); margin: 0 0 30px; font-size: 1.05rem; }
.hint b { color: var(--gold); }
.nowrap { white-space: nowrap; }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.gold-text {
  background: linear-gradient(90deg, #ffd166, #fff4c9, #ff9f43, #ffd166);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 3.5s linear infinite;
}
@keyframes shimmer { to { background-position: -250% 0; } }

/* =========================================================
   0. GIFT GATE
   ========================================================= */
.gate {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  padding: 24px; text-align: center;
  background: radial-gradient(circle at 50% 40%, #33197a 0%, #160c38 68%);
  transition: opacity .9s ease, visibility .9s;
  touch-action: none; overscroll-behavior: none; /* gate ke peeche page scroll na ho */
}
.gate.gone { opacity: 0; visibility: hidden; }
.gate-kicker { font-family: var(--hand); font-size: 1.9rem; color: var(--gold); margin: 0; }
.gate-title { font-size: clamp(1.9rem, 7vw, 3.1rem); line-height: 1.1; margin: .15em 0 1.1em; font-weight: 800; }
.gate-title span {
  background: linear-gradient(90deg, #ffd166, #fff4c9, #ff9f43, #ffd166); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 3.5s linear infinite;
}
.gate-hint { color: var(--muted); margin-top: 34px; font-size: 1.1rem; }
.gate-hint small { display: block; opacity: .8; font-size: .9rem; }

.gift {
  position: relative; width: 170px; height: 170px; border: 0; padding: 0; background: none;
  animation: giftBounce 1.6s ease-in-out infinite;
}
.gift::after { /* zameen pe parchhai */
  content: ''; position: absolute; left: 18px; right: 18px; bottom: -16px; height: 14px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, .45), transparent 70%);
}
.gift-box {
  position: absolute; left: 12px; right: 12px; bottom: 0; height: 112px; border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 43%, var(--gold) 43%, var(--gold) 57%, transparent 57%),
    linear-gradient(135deg, #ff6f9c, #d6336f);
  box-shadow: inset 0 -12px 0 rgba(0, 0, 0, .12), 0 18px 40px rgba(0, 0, 0, .35);
}
.gift-lid {
  position: absolute; left: 0; right: 0; top: 30px; height: 38px; border-radius: 8px; z-index: 2;
  background:
    linear-gradient(90deg, transparent 43%, #ffe08a 43%, #ffe08a 57%, transparent 57%),
    linear-gradient(135deg, #ff86ad, #e8457f);
  box-shadow: 0 6px 10px rgba(0, 0, 0, .2);
  transition: transform .8s cubic-bezier(.3, 1.4, .5, 1), opacity .8s;
}
.gift-bow { position: absolute; left: 50%; top: -24px; }
.gift-bow::before, .gift-bow::after {
  content: ''; position: absolute; top: 0; width: 40px; height: 28px;
  border: 8px solid var(--gold); border-radius: 50%;
}
.gift-bow::before { right: 0; transform: rotate(-22deg); }
.gift-bow::after { left: 0; transform: rotate(22deg); }
.gift.shake { animation: shake .45s ease-in-out; }
.gift.open { animation: none; }
.gift.open .gift-lid { transform: translate(60px, -170px) rotate(40deg); opacity: 0; }
@keyframes giftBounce { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(-2deg); } }
@keyframes shake {
  0%, 100% { transform: rotate(0); } 20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); }
  60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); }
}

/* music button */
.music-btn {
  position: fixed; z-index: 40; width: 44px; height: 44px; border-radius: 50%; padding: 0;
  right: calc(12px + env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom));
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(20, 12, 50, .72); font-size: 19px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .35);
  animation: fadeUp .6s ease both;
}
.music-btn.playing { animation: fadeUp .6s ease both, pulse 1.8s ease-in-out infinite .6s; }
@media (max-width: 600px) { /* phone pe upar kone mein — neeche ke text/buttons ko na dhake */
  .music-btn { top: calc(10px + env(safe-area-inset-top)); bottom: auto; right: calc(10px + env(safe-area-inset-right)); width: 40px; height: 40px; font-size: 17px; }
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 209, 102, .5); } 50% { box-shadow: 0 0 0 10px rgba(255, 209, 102, 0); } }

/* =========================================================
   1. HERO
   ========================================================= */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 70px 20px 60px; text-align: center;
}
.hero > *:not(.balloons) { position: relative; z-index: 1; }
.hero .kicker, .hero-photo, .hero-sub, .scroll-hint { opacity: 0; }
.started .hero .kicker { animation: fadeUp .8s ease .2s both; }
.started .hero-photo { animation: photoIn 1s cubic-bezier(.3, 1.5, .5, 1) 1.5s both; }
.started .hero-sub { animation: fadeUp .8s ease 2.1s both; }
.started .scroll-hint { animation: fadeUp .8s ease 2.6s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes photoIn { from { opacity: 0; transform: scale(.4) rotate(-20deg); } to { opacity: 1; transform: none; } }

.title { margin: 0; font-weight: 800; line-height: 1; }
.title::after { /* naam ke peeche halki sunehri roshni (static — phone pe halka) */
  content: ''; position: absolute; left: 5%; right: 5%; bottom: -6%; height: 60%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 55%, rgba(255, 190, 80, .30), transparent 70%);
}
.title-line { display: block; font-size: clamp(2.3rem, 9.5vw, 4.8rem); letter-spacing: .5px; }
.title-line .ch { display: inline-block; opacity: 0; text-shadow: 0 4px 18px rgba(0, 0, 0, .35); }
.title-line .sp { display: inline-block; width: .3em; }
.started .title-line .ch {
  animation: drop .7s cubic-bezier(.3, 1.6, .5, 1) forwards, wave 2.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * .06s + .3s), calc(var(--i) * .09s + 2s);
}
@keyframes drop { from { opacity: 0; transform: translateY(-70px) rotate(-14deg); } to { opacity: 1; transform: none; } }
@keyframes wave { 0%, 100% { transform: translateY(0); } 25% { transform: translateY(-10px); } 50% { transform: translateY(0); } }

.title-name {
  display: block; font-size: clamp(3.4rem, 17vw, 8rem); line-height: 1.05; margin-top: .05em;
  background: linear-gradient(90deg, #ffd166, #fff4c9, #ff9f43, #ffd166); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0;
}
.started .title-name { animation: namePop 1s cubic-bezier(.3, 1.6, .5, 1) 1.1s both, shimmer 3.5s linear 2s infinite; }
@keyframes namePop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }

.hero-photo { position: relative; width: clamp(190px, 48vw, 260px); aspect-ratio: 1; margin: 30px auto 20px; }
.hero-photo .clip {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden; border: 5px solid #fff;
  box-shadow: 0 0 0 7px rgba(255, 209, 102, .35), 0 22px 50px rgba(0, 0, 0, .5);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 53% 22%; transform: scale(1.35); transform-origin: 53% 25%; }
.hero-photo .ring {
  position: absolute; inset: -18px; border-radius: 50%; border: 3px dashed rgba(255, 209, 102, .85);
  animation: spin 16s linear infinite;
}
.hero-photo .badge {
  position: absolute; right: -6px; bottom: 4px; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; font-size: 30px; background: var(--pink); border: 4px solid #fff;
  animation: wiggle 2.2s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(10deg) scale(1.08); } }
.hero-sub { font-size: clamp(1.15rem, 4.2vw, 1.5rem); margin: 6px 0 0; font-weight: 600; }
.scroll-hint {
  margin-top: 26px; color: var(--muted); text-decoration: none; font-size: 1rem;
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
}
.scroll-hint span { font-size: 1.5rem; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }

/* ---------- balloons (hero + game dono) ---------- */
.balloons { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.balloon {
  --c: #ff5d8f;
  position: absolute; width: 58px; height: 70px; padding: 0; border: 0;
  border-radius: 50% 50% 48% 52% / 44% 44% 56% 56%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .8) 0 6%, rgba(255, 255, 255, 0) 22%),
    radial-gradient(circle at 70% 78%, rgba(0, 0, 0, .2), transparent 55%),
    var(--c);
  box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .12);
}
.balloon::before { /* gaanth */
  content: ''; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 9px solid var(--c);
  filter: brightness(.85);
}
.balloon::after { /* dhaaga */
  content: ''; position: absolute; left: 50%; top: 100%; margin-top: 2px; width: 1.5px; height: 80px;
  background: linear-gradient(rgba(255, 255, 255, .75), rgba(255, 255, 255, 0));
  transform-origin: top; animation: string 2.2s ease-in-out infinite alternate;
}
@keyframes string { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.balloon.float {
  --k: 1; --z: calc(var(--s, 1) * var(--k));
  bottom: -160px; opacity: .85; transform: scale(var(--z)); animation: rise 14s linear infinite;
}
@media (max-width: 600px) { .balloon.float { --k: .7; opacity: .75; } }
@keyframes rise {
  0% { transform: translate(0, 0) scale(var(--z)); }
  25% { transform: translate(14px, -30vh) scale(var(--z)); }
  50% { transform: translate(-10px, -60vh) scale(var(--z)); }
  75% { transform: translate(12px, -90vh) scale(var(--z)); }
  100% { transform: translate(0, calc(-100vh - 320px)) scale(var(--z)); }
}

/* =========================================================
   2. CAKE
   ========================================================= */
.cake-stage { position: relative; display: grid; place-items: center; padding-top: 8px; }
.cake-glow {
  position: absolute; left: 50%; top: 42%; width: min(460px, 100%); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 186, 90, .38), rgba(255, 140, 66, .12) 40%, transparent 68%);
  animation: glow 2.4s ease-in-out infinite; transition: opacity 1.2s ease; pointer-events: none;
}
@keyframes glow { 0%, 100% { opacity: .85; } 50% { opacity: 1; } }
.lights-on .cake-glow { opacity: 0; animation: none; }

/* poora cake "em" mein bana hai — font-size badlo to cake chhota/bada */
.cake { position: relative; font-size: clamp(11px, 3.9vw, 18px); width: 20em; height: 21.5em; }
.plate {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2.4em; border-radius: 50%; z-index: 1;
  background: radial-gradient(ellipse at 50% 35%, #ffffff, #d7dbea 70%, #b9bfd6);
  box-shadow: 0 1em 2em rgba(0, 0, 0, .4);
}
.cake-inside { /* kaatne ke baad beech mein dikhne wala andar ka hissa */
  position: absolute; left: 50%; width: 2.4em; margin-left: -1.2em; bottom: 1.9em; height: 10.4em; z-index: 2;
  background: repeating-linear-gradient(180deg, #fff1d8 0 .8em, #ff8fb4 .8em 1.2em, #6b3a22 1.2em 2.1em);
  border-radius: .3em; opacity: 0; transition: opacity .4s ease .25s;
}
.cake-halves { position: absolute; inset: 0; z-index: 3; }
.half { position: absolute; inset: 0; transition: transform 1s cubic-bezier(.3, 1.4, .5, 1); transform-origin: 50% 100%; }
.half.left { clip-path: inset(0 50% 0 0); }
.half.right { clip-path: inset(0 0 0 50%); }
.cake-art { position: absolute; inset: 0; }

.tier { position: absolute; }
.tier::before { /* upar ka gol surface */
  content: ''; position: absolute; left: 0; right: 0; border-radius: 50%; z-index: 1;
}
.tier.bottom {
  left: 1.25em; width: 17.5em; bottom: 1.1em; height: 6.6em;
  border-radius: 0 0 50% 50% / 0 0 1.4em 1.4em;
  background: linear-gradient(90deg, #4e2615, #85462a 22%, #a2603a 48%, #85462a 75%, #4e2615);
}
.tier.bottom::before { top: -1.3em; height: 2.6em; background: radial-gradient(ellipse at 50% 38%, #ffd0e0, #ff8fb4 75%); }
.tier.top {
  left: 3.75em; width: 12.5em; bottom: 7.7em; height: 4.8em;
  border-radius: 0 0 50% 50% / 0 0 1.05em 1.05em;
  background: linear-gradient(90deg, #d94f80, #ff86ad 25%, #ffb3cb 50%, #ff86ad 75%, #d94f80);
}
.tier.top::before { top: -1em; height: 2em; background: radial-gradient(ellipse at 50% 38%, #ffffff, #fde9f1 75%); }
.drips { position: absolute; left: 0; right: 0; top: 0; z-index: 1; }
.drips i { position: absolute; top: -.05em; border-radius: 0 0 1em 1em; }
.tier.bottom .drips i { background: #ff9dbd; }
.tier.top .drips i { background: #fdeef4; }
.sprinkles { position: absolute; inset: 0; z-index: 1; }
.sprinkles i { position: absolute; width: .55em; height: .17em; border-radius: .1em; opacity: .95; }
.cake-text {
  position: absolute; left: 0; right: 0; bottom: 1.05em; z-index: 2; text-align: center;
  font-family: var(--hand); font-weight: 700; font-size: 2.3em; line-height: 1; color: #ffd6e5;
  text-shadow: 0 .06em 0 #b0164f, 0 0 .4em rgba(255, 143, 180, .5);
}

/* candles */
.candles {
  --lean: 0deg;
  position: absolute; left: 4.6em; width: 10.8em; bottom: 12.2em; z-index: 4;
  display: flex; justify-content: space-evenly; align-items: flex-end;
  transition: opacity .5s ease, transform .5s ease;
}
.candle {
  position: relative; width: .85em; height: 3.6em; padding: 0; border: 0; border-radius: .2em .2em .1em .1em;
  background: repeating-linear-gradient(135deg, #fff 0 .35em, var(--cc) .35em .7em);
  box-shadow: inset -.15em 0 .2em rgba(0, 0, 0, .18);
}
.candle:nth-child(even) { margin-bottom: .55em; height: 3.3em; }
.candle::before { content: ''; position: absolute; inset: -2.4em -.7em -.4em; } /* bada tap area */
.wick { position: absolute; left: 50%; top: -.55em; width: .12em; height: .6em; margin-left: -.06em; background: #3a2a20; border-radius: .05em; }
.flame {
  position: absolute; left: 50%; bottom: calc(100% + .38em); width: .95em; height: 1.75em; margin-left: -.475em;
  transform-origin: 50% 100%; transform: rotate(var(--lean)); transition: transform .12s ease, opacity .3s ease;
  pointer-events: none;
}
.flame i {
  position: absolute; inset: 0; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 78%, #fff 0 14%, #fff2a8 28%, #ffb23f 60%, rgba(255, 96, 30, 0) 100%);
  box-shadow: 0 0 1.1em .35em rgba(255, 190, 80, .55), 0 0 3em 1em rgba(255, 150, 50, .22);
  transform-origin: 50% 100%; animation: flicker .9s ease-in-out infinite alternate;
}
.candle:nth-child(2n) .flame i { animation-duration: .7s; }
.candle:nth-child(3n) .flame i { animation-duration: 1.1s; }
@keyframes flicker {
  0% { transform: scale(1, 1) skewX(0); } 30% { transform: scale(.94, 1.06) skewX(2deg); }
  60% { transform: scale(1.04, .95) skewX(-2deg); } 100% { transform: scale(.97, 1.08) skewX(1deg); }
}
.candle.out .flame { opacity: 0; transform: rotate(var(--lean)) scale(.2); }
.candle.out { cursor: default; }
.smoke {
  position: absolute; left: 50%; bottom: calc(100% + .3em); width: .55em; height: .55em; border-radius: 50%;
  background: rgba(225, 225, 235, .6); filter: blur(2px); pointer-events: none;
  animation: smoke 2.2s ease-out forwards;
}
@keyframes smoke {
  0% { transform: translate(-50%, 0) scale(.6); opacity: .85; }
  100% { transform: translate(calc(-50% + var(--dx)), -5.5em) scale(3.4); opacity: 0; }
}

/* knife + kaatna */
.knife {
  position: absolute; left: 50%; top: -3em; width: 2.4em; height: 9.5em; margin-left: -1.2em; z-index: 5;
  opacity: 0; pointer-events: none; filter: drop-shadow(0 .3em .4em rgba(0, 0, 0, .45));
}
.cake.cutting .knife { animation: knife 1.4s ease-in-out forwards; }
.cake.cutting .candles { opacity: 0; transform: translateY(-1em); pointer-events: none; }
@keyframes knife {
  0% { opacity: 0; transform: translateY(-3em); }
  18% { opacity: 1; transform: translateY(-1.5em); }
  55% { opacity: 1; transform: translateY(12em); }
  75% { opacity: 1; transform: translateY(12em); }
  100% { opacity: 0; transform: translateY(-2em); }
}
.cake.split .half.left { transform: translateX(-1.3em) rotate(-2.5deg); }
.cake.split .half.right { transform: translateX(1.3em) rotate(2.5deg); }
.cake.split .cake-inside { opacity: 1; }

.blow-meter { width: min(260px, 70%); height: 10px; margin: 18px auto 0; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .12); }
.blow-meter span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--teal), var(--gold), var(--pink)); transition: width .08s linear; }
.cake-msg { font-family: var(--hand); font-size: 1.9rem; color: var(--gold); min-height: 1.4em; margin: 18px 0 0; line-height: 1.2; }

/* =========================================================
   3. LETTER
   ========================================================= */
.envelope {
  position: relative; display: block; width: min(320px, 82vw); aspect-ratio: 3 / 2; margin: 10px auto 0;
  border: 0; padding: 0; background: none; perspective: 900px;
}
.envelope.reveal.in:not(.open) { animation: nudge 2.6s ease-in-out infinite 1s; }
@keyframes nudge { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-3deg); } 90% { transform: rotate(3deg); } 95% { transform: rotate(-2deg); } }
.envelope span { position: absolute; display: block; }
.env-back { inset: 0; border-radius: 10px; background: #d9a85a; box-shadow: 0 22px 44px rgba(0, 0, 0, .45); }
.env-paper {
  left: 6%; right: 6%; top: 7%; bottom: 8%; z-index: 1; border-radius: 6px;
  background: #fffaf0 repeating-linear-gradient(#fffaf0 0 14px, #efe2cb 14px 15px);
  transition: transform .9s cubic-bezier(.3, 1.2, .5, 1) .35s;
}
.env-front {
  inset: 0; z-index: 2; border-radius: 10px;
  background: linear-gradient(160deg, #f8d797, #eebf6c);
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
}
.env-flap {
  left: 0; right: 0; top: 0; height: 60%; z-index: 3; border-radius: 10px 10px 0 0;
  background: linear-gradient(180deg, #e6b261, #dca553);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top; transition: transform .6s ease, z-index 0s .3s;
}
.env-seal {
  left: 50%; top: 56%; z-index: 4; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%;
  display: grid !important; place-items: center; font-size: 20px; color: #ffd7df;
  background: radial-gradient(circle at 40% 35%, #f0566f, #b3173a); box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
  transition: opacity .3s, transform .3s;
}
.envelope.open { cursor: default; }
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.open .env-paper { transform: translateY(-46%); }
.envelope.open .env-seal { opacity: 0; transform: scale(1.6); }

.letter {
  position: relative; max-width: 640px; margin: 34px auto 0; padding: 30px 26px 24px; text-align: left;
  border-radius: 14px; color: #3b2a1a; font-family: var(--hand); font-size: 1.6rem; line-height: 1.35;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .9), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(225, 196, 150, .35), transparent 70%),
    #fff8ec;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .45); scroll-margin-top: 24px; overflow: hidden;
  animation: letterIn .8s cubic-bezier(.2, .9, .3, 1.2);
}
.letter::before { /* airmail wali patti */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 7px;
  background: repeating-linear-gradient(135deg, #e63b5c 0 12px, transparent 12px 20px, #3f7be0 20px 32px, transparent 32px 40px);
}
@keyframes letterIn { from { opacity: 0; transform: translateY(40px) rotate(-2deg) scale(.95); } to { opacity: 1; transform: none; } }
.letter p { margin: 0 0 .55em; }
.letter-body p:first-child { font-weight: 700; }
.letter .caret::after { content: '|'; margin-left: 1px; animation: blink .8s steps(1) infinite; color: #b06a2a; }
@keyframes blink { 50% { opacity: 0; } }
.letter-sign { text-align: right; margin: .6em 0 0; font-weight: 700; color: #a0293f; opacity: 0; transition: opacity .8s; }
.letter-sign.show { opacity: 1; }
.letter-skip {
  position: absolute; top: 10px; right: 10px; border: 0; border-radius: 999px; color: #8a6a44;
  background: rgba(154, 123, 85, .14); font-family: var(--font); font-size: .9rem; font-weight: 600; padding: 6px 12px;
}
@media (max-width: 600px) {
  .letter { padding: 50px 18px 20px; font-size: 1.5rem; line-height: 1.32; border-radius: 12px; }
  .letter-skip { right: auto; left: 50%; transform: translateX(-50%); top: 14px; }
}

/* =========================================================
   4. PHOTOS (polaroids)
   ========================================================= */
.gallery { columns: 2; column-gap: 16px; max-width: 920px; margin: 0 auto; }
@media (min-width: 760px) { .gallery { columns: 3; column-gap: 30px; } }
.pol-wrap { break-inside: avoid; padding: 16px 4px 22px; }

/* phone: badi photos ka swipe wala carousel */
@media (max-width: 600px) {
  .gallery {
    columns: auto; display: flex; align-items: center; gap: 18px;
    margin: 0 -16px; padding: 4px 12vw 8px; scroll-padding: 0 12vw;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .pol-wrap { flex: 0 0 76vw; scroll-snap-align: center; padding: 20px 0 26px; }
  .polaroid .cap { font-size: 1.45rem; }
}
.gal-dots { display: none; }
@media (max-width: 600px) {
  .gal-dots { display: flex; justify-content: center; }
  .gal-dots button { /* button bada (tap ke liye), dikhne wala dot chhota */
    display: grid; place-items: center; min-width: 20px; height: 30px; padding: 0 3px; border: 0; background: none;
  }
  .gal-dots button::before {
    content: ''; display: block; width: 8px; height: 8px; border-radius: 99px;
    background: rgba(255, 255, 255, .32); transition: width .3s, background-color .3s;
  }
  .gal-dots button.on::before { width: 24px; background-color: var(--gold); }
}
.polaroid {
  --rot: 0deg;
  position: relative; display: block; width: 100%; padding: 10px 10px 0; border: 0; border-radius: 4px;
  background: #fff; cursor: zoom-in; transform: rotate(var(--rot));
  box-shadow: 0 14px 30px rgba(0, 0, 0, .45);
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s;
}
.polaroid::before { /* tape */
  content: ''; position: absolute; top: -12px; left: 50%; width: 80px; height: 24px; margin-left: -40px;
  background: rgba(255, 228, 150, .78); transform: rotate(calc(var(--rot) * -1.6));
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}
.polaroid img { width: 100%; height: auto; background: #ddd; }
.polaroid .cap {
  display: flex; align-items: center; justify-content: center; min-height: 2.8em; padding: 8px 4px 10px;
  font-family: var(--hand); font-size: 1.3rem; line-height: 1.1; color: #333; text-align: center;
}
.polaroid:focus-visible { transform: rotate(0) scale(1.05); box-shadow: 0 22px 44px rgba(0, 0, 0, .55); z-index: 2; }
.polaroid:active { transform: rotate(0) scale(.98); }
@media (hover: hover) {
  .polaroid:hover { transform: rotate(0) scale(1.05); box-shadow: 0 22px 44px rgba(0, 0, 0, .55); z-index: 2; }
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(8, 5, 22, .94);
  animation: fadeIn .25s ease;
  touch-action: pinch-zoom; overscroll-behavior: contain;
}
@keyframes fadeIn { from { opacity: 0; } }
.lb-figure { margin: 0; max-width: min(92vw, 900px); text-align: center; animation: zoomIn .35s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes zoomIn { from { transform: scale(.85); opacity: 0; } }
.lb-figure img { max-width: 100%; max-height: 76vh; margin: 0 auto; border: 8px solid #fff; border-radius: 4px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.lb-figure figcaption { font-family: var(--hand); font-size: 1.9rem; color: var(--gold); margin-top: 12px; }
.lb-close, .lb-nav {
  position: absolute; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 1.6rem; line-height: 1;
  background: rgba(255, 255, 255, .12); color: #fff;
}
.lb-close { top: 16px; right: 16px; }
.lb-nav { top: 50%; margin-top: -24px; font-size: 2.2rem; }
.lb-nav.prev { left: 12px; }
.lb-nav.next { right: 12px; }
@media (hover: hover) { .lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .24); } }
.lb-nav:active, .lb-close:active { background: rgba(255, 255, 255, .3); }
.lb-count { position: absolute; left: 0; right: 0; bottom: calc(30px + env(safe-area-inset-bottom)); margin: 0; text-align: center; color: var(--muted); font-size: .95rem; pointer-events: none; }
@media (max-width: 600px) { /* phone: aage/peeche ke button neeche, photo ke upar nahi */
  .lightbox { padding: 64px 12px 100px; }
  .lb-figure img { max-height: 64vh; border-width: 6px; }
  .lb-figure figcaption { font-size: 1.7rem; }
  .lb-nav { top: auto; margin-top: 0; bottom: calc(18px + env(safe-area-inset-bottom)); width: 52px; height: 52px; }
  .lb-nav.prev { left: calc(50% - 120px); }
  .lb-nav.next { right: calc(50% - 120px); }
  .lb-close { top: calc(12px + env(safe-area-inset-top)); right: 12px; }
}

/* =========================================================
   5. REASONS (flip cards)
   ========================================================= */
.reasons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 900px; margin: 0 auto; }
@media (min-width: 760px) { .reasons { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.flip { height: 190px; padding: 0; border: 0; background: none; perspective: 900px; }
.flip-inner { display: block; position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, 1.3, .5, 1); }
.flip.flipped .flip-inner { transform: rotateY(180deg); }
.face {
  position: absolute; inset: 0; border-radius: 18px; padding: 16px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.face.front {
  background: linear-gradient(160deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .18); box-shadow: 0 14px 30px rgba(0, 0, 0, .3);
}
.face.front .emo { font-size: 2.8rem; line-height: 1.1; animation: bob 3s ease-in-out infinite; }
.face.front .ttl { font-weight: 800; font-size: 1.2rem; margin-top: 6px; line-height: 1.2; }
.face.front .tap { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.face.back {
  transform: rotateY(180deg); color: #1d1238; font-weight: 600; font-size: 1.08rem; line-height: 1.35;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 14px 30px rgba(0, 0, 0, .3);
}

/* =========================================================
   6. BALLOON GAME
   ========================================================= */
.pop-sky {
  position: relative; height: 380px; max-width: 760px; margin: 0 auto; overflow: hidden; border-radius: 24px;
  background: linear-gradient(180deg, rgba(94, 200, 255, .17), rgba(179, 136, 255, .10));
  border: 1px solid rgba(255, 255, 255, .13);
}
.pop-sky .balloon { cursor: pointer; margin-left: -29px; animation: bob 3s ease-in-out infinite; transition: transform .2s; }
@media (hover: hover) { .pop-sky .balloon:hover { filter: brightness(1.1); } }
.pop-sky .tap-area { position: absolute; inset: -12px -10px -20px; } /* bada tap area — ungli se aasaani se phoote */
.pop-sky .balloon.popped { animation: burst .22s ease-out forwards; pointer-events: none; }
.pop-sky .balloon.popped::after { display: none; }
@keyframes burst { to { transform: scale(1.7); opacity: 0; } }
.wish-pop {
  position: absolute; z-index: 3; max-width: 210px; padding: 8px 14px; border-radius: 14px;
  background: #fff; color: #2a1a45; font-weight: 700; font-size: 1rem; line-height: 1.25;
  transform: translate(-50%, -50%); box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
  animation: wishUp 2.4s ease forwards; pointer-events: none;
}
@keyframes wishUp {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  75% { opacity: 1; transform: translate(-50%, -70%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -110%) scale(.95); }
}
.pop-done { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; font-family: var(--hand); font-size: 2rem; color: var(--gold); line-height: 1.2; animation: fadeIn .6s; }
.wish-list { list-style: none; max-width: 760px; margin: 22px auto 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.wish-list li {
  padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
  animation: chipIn .5s cubic-bezier(.3, 1.6, .5, 1);
}
@keyframes chipIn { from { opacity: 0; transform: scale(.4); } }

/* =========================================================
   7. FINALE
   ========================================================= */
.finale {
  position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: grid; place-items: center;
  padding: 80px 20px 40px; text-align: center;
  background: radial-gradient(ellipse at 50% 120%, rgba(255, 93, 143, .28), transparent 60%);
}
.fireworks { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; cursor: crosshair; }
.finale-inner { position: relative; z-index: 1; pointer-events: none; }
.finale-inner .btn { pointer-events: auto; }
.finale-title { font-size: clamp(2.3rem, 8.5vw, 4.6rem); line-height: 1.05; margin: 0 0 16px; font-weight: 800; }
.finale-title span {
  background: linear-gradient(90deg, #ffd166, #fff4c9, #ff9f43, #ffd166); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 3.5s linear infinite;
}
.finale-sub { max-width: 560px; margin: 0 auto; font-size: 1.2rem; color: var(--muted); }
.footer { margin-top: 56px; color: var(--muted); font-size: .95rem; }
.footer span { color: var(--gold); font-weight: 700; }
.finale-tip { font-size: .85rem; color: var(--muted); opacity: .8; margin-top: 10px; }

/* ---------- kam animation chahne walon ke liye ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .balloon.float { display: none; }
}
