:root {
  --blush: #fff0f3;
  --blush-2: #ffe3ea;
  --rose: #ff8fab;
  --rose-2: #fb6f92;
  --deep: #c9184a;
  --wine: #800f2f;
  --honey: #ffc629;
  --ink: #5a2a3a;
  --muted: #9c6b7b;
  --paper: #fffaf5;
  --shadow: 0 18px 40px -18px rgba(201, 24, 74, .45);
  --radius: 22px;
  --script: "Dancing Script", cursive;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Be Vietnam Pro", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #ffd6e0 0%, transparent 60%),
    radial-gradient(900px 500px at 110% 20%, #ffe5b4 0%, transparent 55%),
    linear-gradient(180deg, var(--blush) 0%, #fff5f7 40%, var(--blush-2) 100%);
  background-attachment: fixed;
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
}
body.locked { overflow: hidden; height: 100vh; }
img { display: block; max-width: 100%; }
.script { font-family: var(--script); font-weight: 700; }

#hearts-bg {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
main { position: relative; z-index: 1; opacity: 0; transition: opacity 1.2s ease; }
body.opened main { opacity: 1; }

/* ================= INTRO ================= */
#intro {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background: radial-gradient(circle at 50% 40%, #ffe3ea, #ffc2d1 70%, #ffafc5);
  transition: opacity 1s ease 1.4s, visibility 0s linear 2.4s;
  padding: 24px;
  text-align: center;
}
body.opened #intro { opacity: 0; visibility: hidden; }
.intro-hint { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 4vw, 1.5rem); color: var(--wine); }
.intro-tap { font-size: .95rem; color: var(--wine); opacity: .8; animation: pulse 1.6s ease-in-out infinite; }

.envelope {
  --w: min(78vw, 360px);
  --h: calc(var(--w) * .66);
  position: relative; width: var(--w); height: var(--h);
  border: 0; background: none; cursor: pointer;
  animation: floaty 3s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.env-back, .env-front, .env-flap, .env-letter { position: absolute; left: 0; width: 100%; }
.env-back { inset: 0; height: 100%; background: #e5506f; border-radius: 10px; box-shadow: var(--shadow); }
.env-letter {
  left: 6%; width: 88%; height: 90%; bottom: 4%;
  background: var(--paper); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform 1s cubic-bezier(.2,.8,.2,1) .5s, opacity .3s ease .4s;
  z-index: 1; opacity: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.letter-script { font-family: var(--script); font-size: calc(var(--w) * .11); color: var(--deep); line-height: 1.1; }
.letter-name { font-family: var(--serif); font-style: italic; font-size: calc(var(--w) * .07); color: var(--wine); }
.env-front {
  bottom: 0; height: 100%; z-index: 2; border-radius: 0 0 10px 10px;
  background: #ff7a9c;
  clip-path: polygon(0 35%, 50% 72%, 100% 35%, 100% 100%, 0 100%);
}
.env-flap {
  top: 0; height: 62%; z-index: 3;
  background: #ff5c8a;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform .7s ease, z-index 0s linear .35s;
  border-radius: 10px 10px 0 0;
}
.env-seal {
  position: absolute; z-index: 4; left: 50%; top: 52%; transform: translate(-50%, -50%);
  font-size: calc(var(--w) * .13);
  filter: drop-shadow(0 3px 6px rgba(128, 15, 47, .4));
  transition: opacity .3s ease, transform .4s ease;
}
.envelope.open { animation: none; }
.envelope.open .env-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.open .env-seal { opacity: 0; transform: translate(-50%, -50%) scale(1.8); }
.envelope.open .env-letter { transform: translateY(-62%); opacity: 1; }

body.preview *, body.preview main { transition: none !important; }
body.preview .hero { min-height: 860px; }

/* ================= MUSIC ================= */
.music-btn {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 40;
  width: 48px; height: 48px; border-radius: 50%; border: 0;
  background: linear-gradient(135deg, var(--rose), var(--deep));
  color: #fff; font-size: 1.3rem; box-shadow: var(--shadow); cursor: pointer;
}
.music-btn.playing { animation: spin 4s linear infinite; }
.music-btn.muted { opacity: .55; }

/* ================= COMMON ================= */
section, header { position: relative; padding: clamp(64px, 10vw, 120px) 20px; }
.section-title {
  text-align: center; font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.5rem, 4.6vw, 2.4rem); color: var(--wine); line-height: 1.3;
  max-width: 820px; margin: 0 auto 18px;
}
.section-title .script {
  display: block; font-size: clamp(2.2rem, 8vw, 3.6rem); color: var(--rose-2); font-weight: 700;
  margin-bottom: 2px;
}
.section-lead { text-align: center; max-width: 620px; margin: 0 auto 36px; color: var(--muted); font-size: 1.02rem; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ================= HERO ================= */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 14px; padding-top: 48px;
}
.hero-ring {
  width: clamp(170px, 42vw, 240px); height: clamp(170px, 42vw, 240px); flex: none; border-radius: 50%; padding: 6px;
  background: conic-gradient(from 0deg, var(--rose), var(--honey), var(--rose-2), #ffb3c6, var(--rose));
  animation: spin 10s linear infinite; box-shadow: 0 0 60px rgba(255, 143, 171, .6);
}
.hero-photo {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 30%;
  border: 5px solid #fff; animation: spin 10s linear infinite reverse;
}
.hero-kicker { margin-top: 18px; font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.05rem; }
.hero-title { display: flex; flex-direction: column; line-height: 1; }
.hero-title .script {
  font-size: clamp(3rem, 13vw, 6.4rem);
  background: linear-gradient(90deg, var(--deep), var(--rose-2), #ff9e00, var(--rose-2), var(--deep));
  background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 5s linear infinite; padding: 0 .1em;
}
.hero-title .name {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(2.2rem, 9vw, 4.6rem); color: var(--wine); margin-top: 6px; transition-delay: .2s;
}
.hero-sub { font-size: clamp(1rem, 3.6vw, 1.2rem); transition-delay: .35s; }

.counter {
  margin-top: 22px; padding: 20px 18px 16px; border-radius: var(--radius);
  background: rgba(255,255,255,.6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.9); box-shadow: var(--shadow); width: min(100%, 460px);
  transition-delay: .5s;
}
.counter-label { font-size: .92rem; color: var(--muted); }
.counter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0; }
.counter-grid div { background: linear-gradient(160deg, #fff, #ffe3ea); border-radius: 14px; padding: 10px 4px; }
.counter-grid b { display: block; font-family: var(--serif); font-size: clamp(1.4rem, 6vw, 2rem); color: var(--deep); line-height: 1.1; font-variant-numeric: tabular-nums; }
.counter-grid span { font-size: .78rem; color: var(--muted); }
.counter-foot { font-size: .88rem; color: var(--muted); }
.counter-foot b { color: #c78a00; }

.scroll-down {
  margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--rose-2); text-decoration: none; font-size: .88rem;
}
.scroll-down i { font-style: normal; font-size: 1.4rem; animation: bounce 1.6s ease-in-out infinite; }

/* ================= MATCH ================= */
.match-stage {
  position: relative; height: clamp(300px, 70vw, 420px); max-width: 560px; margin: 0 auto 40px;
}
.swipe-card {
  position: absolute; top: 8%; width: 46%; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden;
  background: #fff; border: 5px solid #fff; box-shadow: var(--shadow);
  transition: transform 1.1s cubic-bezier(.2,.9,.25,1.2), opacity .6s ease;
  opacity: 0;
}
.swipe-card img { width: 100%; height: 100%; object-fit: cover; }
.swipe-card.left { left: 4%; transform: translateX(-120%) rotate(-25deg); }
.swipe-card.right { right: 4%; transform: translateX(120%) rotate(25deg); }
.swipe-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-weight: 600; font-size: .95rem;
}
.match-stage.go .swipe-card { opacity: 1; }
.match-stage.go .swipe-card.left { transform: translateX(8%) rotate(-8deg); }
.match-stage.go .swipe-card.right { transform: translateX(-8%) rotate(8deg); }

.match-burst {
  position: absolute; left: 50%; bottom: -12%; transform: translate(-50%, 0) scale(0);
  display: flex; flex-direction: column; align-items: center; z-index: 3;
  transition: transform .7s cubic-bezier(.2,1.6,.4,1) 1s;
}
.match-stage.go .match-burst { transform: translate(-50%, 0) scale(1); }
.match-text {
  font-family: var(--script); font-size: clamp(2.4rem, 10vw, 3.6rem); color: var(--honey);
  -webkit-text-stroke: 1.5px #b07d00; text-shadow: 0 4px 0 #fff, 0 8px 24px rgba(255,198,41,.7);
  white-space: nowrap; line-height: 1;
}
.match-heart { font-size: 2.4rem; animation: heartbeat 1.2s ease-in-out infinite; }

.chat {
  max-width: 420px; margin: 0 auto; background: #fff; border-radius: 26px; overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid #ffe3ea;
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--honey); }
.chat-head b { display: block; color: #3d2b00; line-height: 1.2; }
.chat-head small { color: #6b5200; font-size: .78rem; }
.chat-avatar { width: 42px; height: 42px; border-radius: 50%; background-size: cover; background-position: 50% 25%; border: 2px solid #fff; flex: none; }
.chat-body { padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 260px; background: #fffdf6; }
.bubble {
  max-width: 80%; padding: 9px 14px; border-radius: 18px; font-size: .95rem; line-height: 1.45;
  animation: pop .35s cubic-bezier(.2,1.4,.4,1) both;
}
.bubble.me { align-self: flex-end; background: linear-gradient(135deg, var(--rose), var(--rose-2)); color: #fff; border-bottom-right-radius: 6px; }
.bubble.her { align-self: flex-start; background: #f1f1f4; color: #333; border-bottom-left-radius: 6px; }
.bubble.typing { display: inline-flex; gap: 4px; padding: 12px 14px; }
.bubble.typing i { width: 7px; height: 7px; border-radius: 50%; background: #aaa; animation: blink 1s infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .15s; }
.bubble.typing i:nth-child(3) { animation-delay: .3s; }

/* ================= TIMELINE ================= */
.timeline { position: relative; max-width: 1040px; margin: 40px auto 0; }
.timeline::before {
  content: ""; position: absolute; left: 22px; top: 0; bottom: 0; width: 3px;
  background: repeating-linear-gradient(to bottom, var(--rose) 0 10px, transparent 10px 18px);
}
.chapter { position: relative; padding-left: 60px; margin-bottom: 70px; }
.chapter-dot {
  position: absolute; left: 4px; top: 4px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.2rem; background: #fff;
  box-shadow: 0 0 0 5px var(--blush), 0 0 0 7px var(--rose); z-index: 1;
}
.chapter-when { font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rose-2); font-weight: 600; }
.chapter h3 { font-family: var(--serif); font-size: clamp(1.35rem, 4.2vw, 1.9rem); color: var(--wine); line-height: 1.3; margin: 2px 0 10px; }
.chapter p.text { color: var(--ink); margin-bottom: 18px; max-width: 520px; }

.polaroids { display: flex; flex-wrap: wrap; gap: 14px; }
.polaroid {
  background: #fff; padding: 9px 9px 34px; border-radius: 4px; box-shadow: 0 12px 28px -12px rgba(128,15,47,.45);
  position: relative; cursor: zoom-in; transition: transform .4s ease, box-shadow .4s ease;
  width: calc(50% - 7px);
}
.polaroid.wide { width: 100%; }
.polaroids:not(.single) .polaroid:last-child:nth-child(odd):not(.wide) { margin: 0 auto; }
.polaroids.single .polaroid { width: min(100%, 360px); }
.polaroids.single .polaroid.wide { width: min(100%, 520px); }
.polaroid img { width: 100%; aspect-ratio: var(--ar, 3/4); object-fit: cover; border-radius: 2px; }
.polaroid figcaption {
  position: absolute; left: 0; right: 0; bottom: 6px; text-align: center;
  font-family: var(--script); font-size: 1.15rem; color: var(--wine); line-height: 1.2; padding: 0 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.polaroid::before {
  content: ""; position: absolute; top: -10px; left: 50%; width: 72px; height: 22px; transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 198, 41, .55); box-shadow: 0 1px 3px rgba(0,0,0,.1); z-index: 1;
}
.polaroid:nth-child(odd) { transform: rotate(-2deg); }
.polaroid:nth-child(even) { transform: rotate(2.2deg); }
.polaroid:hover { transform: rotate(0) scale(1.03); box-shadow: 0 20px 40px -14px rgba(128,15,47,.55); z-index: 2; }

/* car road */
.road { position: relative; height: 54px; margin: 6px 0 18px; max-width: 520px; overflow: hidden; border-radius: 12px; background: #5b5560; }
.road::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, #ffd166 0 22px, transparent 22px 40px); animation: road 0.9s linear infinite; }
.road .car { position: absolute; top: 50%; left: 50%; font-size: 2rem; transform: translate(-50%, -55%) scaleX(-1); animation: wobble .5s ease-in-out infinite alternate; }
.road .heart-trail { position: absolute; top: 18%; font-size: .9rem; animation: trail 1.8s linear infinite; }

@media (min-width: 820px) {
  .timeline::before { left: 50%; transform: translateX(-50%); }
  .chapter { width: 50%; padding: 0 60px 0 0; text-align: right; }
  .chapter .polaroids { justify-content: flex-end; }
  .chapter p.text { margin-left: auto; }
  .chapter .road { margin-left: auto; }
  .chapter-dot { left: auto; right: -20px; }
  .chapter:nth-child(even) { margin-left: 50%; padding: 0 0 0 60px; text-align: left; }
  .chapter:nth-child(even) .polaroids { justify-content: flex-start; }
  .chapter:nth-child(even) p.text, .chapter:nth-child(even) .road { margin-left: 0; }
  .chapter:nth-child(even) .chapter-dot { right: auto; left: -20px; }
  .chapter { margin-bottom: 20px; }
  .chapter + .chapter { margin-top: -40px; }
}

/* ================= OFFICIAL ================= */
.official { text-align: center; overflow: hidden; }
.official-heart { position: relative; width: clamp(220px, 60vw, 320px); margin: 0 auto 24px; animation: heartbeat 1.4s ease-in-out infinite; }
.official-heart svg { width: 100%; fill: var(--rose-2); filter: drop-shadow(0 18px 30px rgba(201,24,74,.45)); }
.official-date { position: absolute; inset: 0 0 12% 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; line-height: 1; }
.official-date span:first-child { font-family: var(--serif); font-size: clamp(3.4rem, 14vw, 5rem); font-weight: 600; }
.official-date small { font-family: var(--script); font-size: clamp(1.3rem, 5vw, 1.8rem); margin: 2px 0 4px; }
.official-date span:last-child { letter-spacing: .3em; font-size: .9rem; }
.official-title { font-family: var(--script); font-size: clamp(2.2rem, 9vw, 3.6rem); color: var(--deep); line-height: 1.15; }
.official-text { max-width: 560px; margin: 16px auto 0; font-size: 1.05rem; }
.official-text em { font-family: var(--serif); color: var(--deep); }

/* ================= GALLERY ================= */
.gallery { columns: 2 160px; column-gap: 12px; max-width: 1100px; margin: 30px auto 0; }
@media (min-width: 820px) { .gallery { columns: 4 200px; column-gap: 16px; } }
.g-item {
  break-inside: avoid; margin-bottom: 12px; border-radius: 16px; overflow: hidden; position: relative; cursor: zoom-in;
  box-shadow: 0 10px 24px -14px rgba(128,15,47,.5); background: #fff;
}
.g-item img { width: 100%; transition: transform .8s ease; }
.g-item:hover img { transform: scale(1.06); }
.g-item::after {
  content: "♥"; position: absolute; right: 10px; bottom: 6px; color: #fff; font-size: 1.3rem; opacity: 0;
  transform: scale(.4); transition: .35s ease; text-shadow: 0 2px 8px rgba(201,24,74,.8);
}
.g-item:hover::after { opacity: 1; transform: scale(1); }

/* ================= VIDEO ================= */
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; max-width: 1000px; margin: 30px auto 0; }
.video-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-card video { width: 100%; display: block; background: #000; max-height: 80vh; }
.video-card p { padding: 12px 16px; font-family: var(--script); font-size: 1.3rem; color: var(--wine); }
.video-empty {
  grid-column: 1 / -1; text-align: center; padding: 50px 20px; border-radius: var(--radius);
  border: 2px dashed var(--rose); background: rgba(255,255,255,.55); color: var(--muted);
}
.video-empty b { display: block; font-family: var(--script); font-size: 2rem; color: var(--rose-2); }

/* ================= LETTER ================= */
.letter-paper {
  max-width: 680px; margin: 0 auto; padding: clamp(28px, 6vw, 56px);
  background:
    repeating-linear-gradient(transparent 0 33px, rgba(255,143,171,.25) 33px 34px),
    var(--paper);
  border-radius: 6px; box-shadow: 0 30px 60px -30px rgba(128,15,47,.5), 0 0 0 1px #ffe3ea;
  position: relative; line-height: 34px;
}
.letter-paper::before { content: "💌"; position: absolute; top: -26px; right: 22px; font-size: 3rem; transform: rotate(12deg); }
.letter-greet { font-family: var(--script); font-size: 1.8rem; color: var(--deep); margin-bottom: 8px; }
.letter-body { font-family: var(--serif); font-style: italic; font-size: clamp(1.02rem, 3.4vw, 1.15rem); color: #4a2533; min-height: 10em; white-space: pre-line; }
.letter-body .caret { display: inline-block; width: 2px; height: 1.1em; background: var(--deep); vertical-align: -3px; animation: blink .8s infinite; }
.letter-sign { margin-top: 24px; text-align: right; font-family: var(--serif); font-style: italic; color: var(--muted); }
.letter-sign .script { font-size: 2.6rem; color: var(--deep); line-height: 1.2; }

/* ================= CAKE ================= */
.cake-section { text-align: center; }
.cake { position: relative; width: 240px; height: 250px; margin: 50px auto 10px; cursor: pointer; -webkit-tap-highlight-color: transparent; outline: none; }
.plate { position: absolute; bottom: 0; left: -20px; right: -20px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 8px 18px rgba(128,15,47,.25); }
.tier { position: absolute; left: 50%; transform: translateX(-50%); border-radius: 14px 14px 10px 10px; overflow: hidden; }
.tier-bottom { bottom: 10px; width: 220px; height: 100px; background: linear-gradient(#ffb3c6, #ff8fab); }
.tier-top { bottom: 105px; width: 160px; height: 78px; background: linear-gradient(#fff0f3, #ffccd5); }
.drip { position: absolute; top: 0; left: 0; right: 0; height: 26px;
  background: radial-gradient(circle at 10px 12px, #fff 11px, transparent 12px) 0 0 / 28px 26px repeat-x, linear-gradient(#fff 0 10px, transparent 10px); }
.tier-top .drip { background: radial-gradient(circle at 10px 12px, var(--rose-2) 11px, transparent 12px) 0 0 / 28px 26px repeat-x, linear-gradient(var(--rose-2) 0 10px, transparent 10px); }
.sprinkles { position: absolute; inset: 34px 10px 10px;
  background:
    radial-gradient(circle, #ffc629 2.5px, transparent 3px) 0 0 / 34px 26px,
    radial-gradient(circle, #fff 2.5px, transparent 3px) 17px 13px / 34px 26px; }
.candles { position: absolute; bottom: 182px; left: 50%; transform: translateX(-50%); display: flex; gap: 26px; }
.candle { position: relative; width: 12px; height: 46px; border-radius: 3px; background: repeating-linear-gradient(45deg, #fff 0 6px, var(--rose-2) 6px 12px); }
.flame {
  position: absolute; left: 50%; top: -26px; width: 14px; height: 24px; transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 80%, #fff 0 20%, #ffd166 40%, #ff7b00 75%, transparent 76%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flicker .25s ease-in-out infinite alternate; filter: drop-shadow(0 0 10px #ffb703);
  transition: opacity .4s, transform .4s;
}
.cake.blown .flame { opacity: 0; transform: translateX(-50%) scale(.2) translateY(-20px); }
.cake.blown .candle::after { content: ""; position: absolute; left: 50%; top: -30px; width: 4px; height: 30px; background: linear-gradient(transparent, rgba(150,150,150,.6)); border-radius: 4px; animation: smoke 1.6s ease-out forwards; }
.cake-hint { color: var(--muted); animation: pulse 1.6s ease-in-out infinite; }
.wish { max-width: 600px; margin: 20px auto 0; animation: pop .7s cubic-bezier(.2,1.4,.4,1) both; }
.wish h3 { font-size: clamp(2.4rem, 10vw, 3.6rem); color: var(--deep); line-height: 1.2; }
.wish p { font-size: 1.08rem; margin-top: 10px; }

/* ================= FOOTER ================= */
.footer { text-align: center; padding: 40px 20px calc(80px + env(safe-area-inset-bottom)); color: var(--muted); position: relative; z-index: 1; }
.footer .script { font-size: 2.6rem; color: var(--rose-2); }

/* ================= LIGHTBOX ================= */
.lightbox {
  position: fixed; inset: 0; z-index: 60; background: rgba(40, 6, 18, .92);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade .3s ease;
}
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 94vw; max-height: 80vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,.5); object-fit: contain; }
.lightbox figcaption { color: #ffd6e0; font-family: var(--script); font-size: 1.5rem; margin-top: 10px; text-align: center; }
.lightbox button { position: absolute; border: 0; background: rgba(255,255,255,.14); color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.lb-close { top: calc(16px + env(safe-area-inset-top)); right: 16px; font-size: 1.1rem !important; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: calc(20px + env(safe-area-inset-bottom)); transform: none; } }

/* ================= FX ================= */
.burst-heart { position: fixed; pointer-events: none; z-index: 70; font-size: 1.4rem; animation: burst 1.2s ease-out forwards; }
.sparkle { position: fixed; pointer-events: none; z-index: 70; font-size: .8rem; animation: sparkle .9s ease-out forwards; }

@keyframes floaty { 50% { transform: translateY(-10px) rotate(-1deg); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes bounce { 50% { transform: translateY(6px); } }
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }
@keyframes pop { from { opacity: 0; transform: scale(.6) translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: .2; } }
@keyframes road { to { background-position: -40px 0; } }
@keyframes wobble { to { transform: translate(-50%, -62%) scaleX(-1) rotate(-2deg); } }
@keyframes trail { from { left: 44%; opacity: 1; } to { left: -10%; opacity: 0; } }
@keyframes flicker { to { transform: translateX(-50%) scale(1.06, .94) rotate(3deg); } }
@keyframes smoke { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -40px) scaleX(3); } }
@keyframes fade { from { opacity: 0; } }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) scale(.4) rotate(var(--r)); opacity: 0; } }
@keyframes sparkle { to { transform: translateY(24px) scale(.2); opacity: 0; } }

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