:root {
  --pink: #e0306b;
  --pink-deep: #c2185b;
  --ink: #3b2a2a;
  --paper: #fdf8e8;
  --bg1: #f8eee9;
  --bg2: #f3c8d4;
  --ease-spring: cubic-bezier(.3, 1.5, .5, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg1) 0%, #f6dde3 55%, var(--bg2) 100%);
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }
img { -webkit-user-drag: none; user-select: none; }

/* Photo assets have white backgrounds: multiply blends them into the page, and the edge
   fade hides the frame whenever a transition temporarily isolates the blend. */
.blend {
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent), linear-gradient(180deg, transparent, #000 9%, #000 91%, transparent);
  mask-composite: intersect;
}
.hidden { display: none !important; }

/* ---------- ambient ---------- */
.bg-glow {
  position: fixed; inset: -20%;
  background:
    radial-gradient(40% 35% at 20% 25%, rgba(255, 182, 206, .55), transparent 70%),
    radial-gradient(35% 30% at 80% 70%, rgba(255, 214, 180, .45), transparent 70%),
    radial-gradient(30% 30% at 70% 15%, rgba(236, 170, 255, .25), transparent 70%);
  animation: glowMove 18s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes glowMove { to { transform: translate(4%, -3%) rotate(6deg); } }

.bg-hearts, .bg-dust { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.bg-hearts span {
  position: absolute; bottom: -40px;
  color: #f19ab3;
  filter: blur(.3px);
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  10% { opacity: .55; }
  100% { transform: translateY(-115vh) rotate(25deg); opacity: 0; }
}
.bg-dust i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 6px 2px rgba(255, 255, 255, .8);
  opacity: .0;
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle { 50% { opacity: .9; transform: scale(1.3); } }

#fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

.music-btn {
  position: fixed; top: 16px; right: 16px; z-index: 70;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, .7);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(194, 24, 91, .2);
  color: var(--pink-deep); font-size: 1.2rem;
}
.music-btn.playing { animation: spin 4s linear infinite; }
.music-btn.muted { opacity: .5; text-decoration: line-through; animation: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.progress {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 5;
}
.progress i {
  width: 6px; height: 6px; border-radius: 999px;
  background: rgba(194, 24, 91, .2);
  transition: width .4s, background .4s;
}
.progress i.on { width: 20px; background: var(--pink); }

/* ---------- screens ---------- */
/* no z-index here: it would isolate mix-blend-mode on the photo assets from the page background */
#app { position: relative; height: 100%; }

.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  padding: 40px 20px 60px;
  opacity: 0; visibility: hidden;
  transform: scale(1.03);
  filter: blur(6px);
  transition: opacity .8s ease, transform .8s ease, filter .8s ease, visibility 0s linear .8s;
}
.screen.active {
  opacity: 1; visibility: visible; transform: none; filter: none;
  transition: opacity .8s ease, transform .8s ease, filter .8s ease, visibility 0s;
}

.reveal { opacity: 0; transform: translateY(18px); }
.screen.active .reveal { animation: rise .9s var(--ease-spring) forwards; }
.screen.active .d1 { animation-delay: .2s; }
.screen.active .d2 { animation-delay: .4s; }
.screen.active .d3 { animation-delay: .7s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- type ---------- */
.eyebrow { font-style: italic; color: #9a6f78; font-size: 1rem; letter-spacing: .02em; }
.tiny { font-size: .75rem; color: #b08890; }

.script-title {
  font-family: "Caveat", cursive; font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 3.8rem);
  line-height: 1.02; text-align: center; color: var(--pink-deep);
  text-shadow: 0 2px 0 rgba(255, 255, 255, .6);
}
.name-upper { letter-spacing: .04em; text-transform: uppercase; }
.name-upper-plain { text-transform: uppercase; letter-spacing: .03em; }

.shimmer {
  background: linear-gradient(100deg, var(--pink-deep) 30%, #ff8fb1 45%, #ffd1dc 50%, #ff8fb1 55%, var(--pink-deep) 70%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 3.5s linear infinite;
}
@keyframes shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }

.pink-title {
  font-weight: 700; color: var(--pink);
  font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  position: absolute; top: 12vh;
}
.serif-title {
  font-weight: 700; color: var(--pink-deep);
  font-size: clamp(1.3rem, 3.8vw, 1.9rem);
  position: absolute; top: 10vh; left: 6vw; right: 6vw;
  z-index: 3;
}
.serif-title.center { text-align: center; }
.script-small {
  font-family: "Dancing Script", cursive; color: var(--pink-deep);
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  position: absolute; top: 10vh;
}
.rose-ico { font-size: .8em; }
.pink-serif {
  font-weight: 700; color: var(--pink);
  font-size: clamp(1.7rem, 4.5vw, 2.3rem);
  position: absolute; top: 8vh;
}
.script-pink {
  font-family: "Dancing Script", cursive; color: var(--pink);
  font-size: clamp(2.4rem, 6vw, 3.2rem);
}
.script-pink.small { font-size: clamp(1.9rem, 5vw, 2.4rem); color: var(--pink-deep); }
.hint { font-size: .82rem; color: #a07a80; letter-spacing: .03em; }
.hint-photos { position: absolute; top: calc(8vh + 3.4rem); }
.hint-letter { position: absolute; top: calc(10vh + 2.8rem); }
.question { font-size: .95rem; color: #5a4040; }
.caption-soft { font-family: "Dancing Script", cursive; font-size: 1.3rem; color: #9b5a6a; }

.tap-label { font-size: .72rem; letter-spacing: .18em; color: var(--pink); }
.pulse-text { animation: pulseText 1.8s ease-in-out infinite; }
@keyframes pulseText { 50% { opacity: .35; } }

/* ---------- buttons ---------- */
.btn-row { display: flex; gap: 14px; position: relative; }
.btn {
  padding: 10px 26px; border-radius: 8px; font-size: .95rem;
  transition: transform .25s var(--ease-spring), box-shadow .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.95); }
.btn-primary {
  background: linear-gradient(180deg, #f0508a, var(--pink-deep));
  color: #fff;
  box-shadow: 0 8px 20px rgba(194, 24, 91, .35), inset 0 1px 0 rgba(255, 255, 255, .35);
  position: relative; overflow: hidden;
}
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  animation: btnShine 3s ease-in-out infinite;
}
@keyframes btnShine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
.btn-ghost {
  background: #fff; color: var(--ink);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  transition: transform .35s var(--ease-spring);
}
.btn-soft {
  background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 9px 22px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08); color: #6a4d50;
}
.pill { border-radius: 999px; padding: 12px 32px; position: absolute; bottom: 10vh; animation: rise .7s var(--ease-spring) both; }

/* ---------- start ---------- */
.seal-btn { position: relative; width: 130px; height: 130px; display: grid; place-items: center; }
.seal-heart {
  width: 100px; height: 100px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 2.6rem; color: #ffe3ea;
  background: radial-gradient(circle at 35% 30%, #e0455f, #9e0f2a 70%);
  box-shadow: 0 14px 30px rgba(158, 15, 42, .45), inset 0 -6px 12px rgba(0, 0, 0, .25), inset 0 6px 10px rgba(255, 255, 255, .25);
  animation: heartbeat 1.4s ease-in-out infinite;
}
.seal-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(224, 48, 107, .4);
  animation: ripple 1.8s ease-out infinite;
}
@keyframes heartbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.1); } 30% { transform: scale(.98); } 45% { transform: scale(1.06); } }
@keyframes ripple { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* ---------- intro ---------- */
.duo-img {
  width: min(300px, 72vw); height: auto;
  filter: drop-shadow(0 18px 24px rgba(150, 70, 90, .22));
}
.bob { animation: bob 3.2s ease-in-out infinite; }
.screen.active .duo-img.reveal { animation: rise .9s var(--ease-spring) .4s forwards, bob 3.2s ease-in-out 1.3s infinite; }
@keyframes bob { 50% { translate: 0 -8px; } }

.bunting {
  display: flex; padding-top: 4px;
  width: min(280px, 70vw); justify-content: space-between;
  margin-bottom: -26px;
  position: relative;
}
.bunting::before {
  content: ""; position: absolute; left: -4%; right: -4%; top: -6px; height: 14px;
  border-top: 2px solid #d99aab; border-radius: 50%;
}
.bunting span {
  width: 0; height: 0;
  border-left: 12px solid transparent; border-right: 12px solid transparent;
  border-top: 20px solid #ff8fb1;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .1));
  animation: sway 2.4s ease-in-out infinite; transform-origin: top center;
}
.bunting span:nth-child(3n+2) { border-top-color: #8fd8cc; animation-delay: .3s; }
.bunting span:nth-child(3n) { border-top-color: #ffd36e; animation-delay: .6s; }
.bunting span:nth-child(2), .bunting span:nth-child(8) { margin-top: 6px; }
.bunting span:nth-child(3), .bunting span:nth-child(7) { margin-top: 9px; }
.bunting span:nth-child(4), .bunting span:nth-child(5), .bunting span:nth-child(6) { margin-top: 11px; }
@keyframes sway { 50% { transform: rotate(8deg); } }

/* ---------- balloons ---------- */
.balloon-field { position: relative; width: min(560px, 94vw); height: min(420px, 62vh); margin-top: 40px; }
.balloon {
  position: absolute; width: 86px; height: 150px;
  animation: balloonBob 3.4s ease-in-out infinite;
  cursor: pointer;
  transition: transform .2s;
  filter: drop-shadow(0 10px 12px rgba(120, 50, 80, .2));
}
.balloon svg { width: 100%; height: 100%; overflow: visible; }
.balloon:hover { transform: scale(1.06) rotate(-3deg); }
.balloon.popped { animation: pop .18s ease-out forwards; pointer-events: none; }
@keyframes balloonBob { 0%, 100% { translate: 0 0; rotate: -2deg; } 50% { translate: 0 -14px; rotate: 2deg; } }
@keyframes pop { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: .8; } 100% { transform: scale(1.5); opacity: 0; } }

.balloon-word {
  position: absolute;
  font-family: "Caveat", cursive; font-size: clamp(2rem, 6vw, 2.6rem); font-weight: 700;
  color: var(--pink-deep);
  transform: translate(-50%, -50%) scale(.2) rotate(-8deg);
  opacity: 0;
  transition: transform .6s var(--ease-spring), opacity .4s;
  white-space: nowrap;
  text-shadow: 0 2px 10px rgba(255, 255, 255, .9);
}
.balloon-word.show { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-6deg); }

.shard {
  position: absolute; pointer-events: none; border-radius: 2px;
  animation: shard .8s cubic-bezier(.2, .7, .4, 1) forwards;
}
@keyframes shard { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

/* ---------- cake ---------- */
.dim {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(40, 10, 20, .15), rgba(40, 10, 20, .6));
  opacity: 0; transition: opacity 1.2s ease; pointer-events: none;
}
.dim.on { opacity: 1; }
.cake-wrap { position: relative; display: grid; place-items: center; margin-top: 30px; }
.cake { position: relative; width: min(380px, 86vw); }
.cake img { width: 100%; display: block; mix-blend-mode: multiply; }
.cake-glow {
  position: absolute; left: 50%; top: 14%; width: 360px; height: 360px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 200, 100, .45), transparent 60%);
  animation: glowPulse .18s ease-in-out infinite alternate;
  pointer-events: none;
  transition: opacity .6s;
}
.cake-glow.off { opacity: 0; }
@keyframes glowPulse { to { transform: translate(-50%, -50%) scale(1.04); opacity: .85; } }

.flame-holder { position: absolute; left: 50.2%; top: 14.8%; width: 0; height: 0; z-index: 2; }
.flame {
  position: absolute; left: -9px; bottom: 0;
  width: 18px; height: 40px;
  border-radius: 50% 50% 45% 45% / 70% 70% 30% 30%;
  background: radial-gradient(ellipse at 50% 80%, #fff 0%, #fff6c4 22%, #ffc83d 48%, #ff7b1a 72%, rgba(255, 80, 0, 0) 76%);
  box-shadow: 0 0 30px 10px rgba(255, 170, 40, .55), 0 0 70px 30px rgba(255, 140, 40, .25);
  transform-origin: 50% 100%;
  animation: flicker .12s ease-in-out infinite alternate, sway2 1.8s ease-in-out infinite;
  transition: height .1s;
}
.flame-core {
  position: absolute; left: 50%; bottom: 3px; width: 6px; height: 12px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse, rgba(80, 120, 255, .8), transparent 70%);
}
@keyframes flicker { from { scale: 1 1; } to { scale: .92 1.08; } }
@keyframes sway2 { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
.flame.wobble { animation-duration: .05s, .4s; }
.flame.out { animation: flameOut .35s ease-in forwards; }
@keyframes flameOut { to { scale: .1 .3; opacity: 0; translate: 6px 0; } }

.smoke-wrap { position: absolute; left: 0; bottom: 0; }
.smoke-wrap i {
  position: absolute; left: -5px; bottom: 0; width: 10px; height: 10px; border-radius: 50%;
  background: rgba(200, 200, 200, .7); filter: blur(3px); opacity: 0;
}
.smoke-wrap.go i { animation: smoke 2.4s ease-out forwards; }
.smoke-wrap.go i:nth-child(2) { animation-delay: .25s; }
.smoke-wrap.go i:nth-child(3) { animation-delay: .5s; }
@keyframes smoke {
  0% { opacity: .9; transform: translate(0, 0) scale(1); }
  50% { transform: translate(-10px, -60px) scale(3); }
  100% { opacity: 0; transform: translate(12px, -130px) scale(6); }
}

.wish {
  position: absolute; top: 30%;
  font-family: "Dancing Script", cursive; font-size: clamp(2.2rem, 7vw, 3rem);
  color: #fff; text-align: center; line-height: 1.1; white-space: nowrap;
  text-shadow: 0 2px 20px rgba(0, 0, 0, .45), 0 0 30px rgba(255, 180, 200, .6);
  opacity: 0; transform: scale(.85); filter: blur(6px);
  transition: opacity 1.4s, transform 1.4s, filter 1.4s;
  pointer-events: none; z-index: 4;
}
.wish.show { opacity: 1; transform: none; filter: none; }

.bottom-bar {
  position: absolute; left: 0; right: 0; bottom: 14vh;
  padding: 15px 20px;
  background: rgba(255, 255, 255, .78); backdrop-filter: blur(10px);
  font-size: .88rem; color: #6b5557;
  box-shadow: 0 -2px 20px rgba(0, 0, 0, .05);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  z-index: 3;
}
.mic-dot { width: 10px; height: 10px; border-radius: 50%; background: #7fb0d1; box-shadow: 0 0 0 0 rgba(127, 176, 209, .7); animation: micPulse 1.6s infinite; }
.mic-dot.live { background: #e0306b; box-shadow: 0 0 0 0 rgba(224, 48, 107, .6); }
@keyframes micPulse { 70% { box-shadow: 0 0 0 10px rgba(127, 176, 209, 0); } 100% { box-shadow: 0 0 0 0 rgba(127, 176, 209, 0); } }
#cakeNext { z-index: 5; }

/* ---------- bouquet ---------- */
.bouquet-wrap { position: relative; display: grid; place-items: center; margin-top: 40px; }
.halo {
  position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .9), rgba(255, 210, 225, .4) 45%, transparent 70%);
  animation: haloPulse 4s ease-in-out infinite;
}
@keyframes haloPulse { 50% { transform: scale(1.08); opacity: .8; } }
.bouquet {
  position: relative; width: min(320px, 70vw); height: auto;
  mix-blend-mode: multiply;
  transform-origin: 50% 90%;
}
.screen.active .bouquet { animation: bouquetIn 1.2s var(--ease-spring) both, sway3 5s ease-in-out 1.2s infinite; }
@keyframes bouquetIn { from { transform: translateY(80px) scale(.5) rotate(-10deg); opacity: 0; } }
@keyframes sway3 { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }

.petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.petal {
  position: absolute; top: -30px;
  width: 14px; height: 18px;
  background: radial-gradient(ellipse at 30% 30%, #e8344f, #9c0c24);
  border-radius: 80% 0 80% 0;
  animation: petalFall linear forwards;
  opacity: .9;
}
@keyframes petalFall {
  to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); }
}

/* ---------- photo cards ---------- */
.card-stack { position: relative; width: min(270px, 70vw); aspect-ratio: 3 / 4; margin-top: 40px; perspective: 900px; }
.polaroid {
  position: absolute; inset: 0;
  background: #fffdf9;
  padding: 12px 12px 48px;
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(90, 30, 50, .25), 0 2px 6px rgba(0, 0, 0, .08);
  cursor: grab; touch-action: none;
  transition: transform .45s var(--ease-spring), opacity .4s;
  will-change: transform;
}
.polaroid::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 90px; height: 26px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(255, 220, 230, .75);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
.polaroid.dragging { transition: none; cursor: grabbing; }
.polaroid .photo {
  width: 100%; height: 100%; border-radius: 2px;
  background-size: cover; background-position: center;
  display: grid; place-items: center; font-size: 3rem;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .12);
}
.polaroid .caption {
  position: absolute; left: 0; right: 0; bottom: 10px;
  text-align: center; font-family: "Caveat", cursive; font-size: 1.4rem; color: #5a3b40;
}

/* ---------- envelope ---------- */
.envelope { position: relative; width: min(340px, 82vw); cursor: pointer; }
.envelope img {
  width: 100%; display: block;
  mix-blend-mode: multiply;
  animation: bob 3s ease-in-out infinite;
  transition: transform .6s ease, opacity .6s ease;
}
.seal-shine {
  position: absolute; left: 50%; top: 50%; width: 70px; height: 70px; border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0 rgba(224, 48, 107, .5);
  animation: ripple2 2s ease-out infinite;
}
@keyframes ripple2 { 70% { box-shadow: 0 0 0 26px rgba(224, 48, 107, 0); } 100% { box-shadow: 0 0 0 0 rgba(224, 48, 107, 0); } }
.envelope.shake img { animation: shake .5s ease-in-out; }
.envelope.away img { transform: translateY(40vh) scale(.8) rotate(8deg); opacity: 0; }
.envelope.shake .seal-shine { display: none; }
@keyframes shake { 20%, 60% { transform: rotate(-4deg); } 40%, 80% { transform: rotate(4deg); } }
.env-tap { position: absolute; bottom: 16vh; }

.letter {
  position: relative; width: min(380px, 90vw); min-height: 320px;
  background:
    repeating-linear-gradient(180deg, transparent 0 28.5px, rgba(180, 150, 160, .25) 28.5px 29.5px),
    linear-gradient(135deg, #fffdf2, var(--paper));
  padding: 26px 24px 70px 34px;
  border-radius: 4px;
  box-shadow: 0 24px 50px rgba(100, 50, 50, .25), 0 2px 4px rgba(0, 0, 0, .06);
  transform: rotate(-2deg);
  animation: letterIn 1s var(--ease-spring);
  margin-top: 50px;
}
.letter::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 22px; width: 1px;
  background: rgba(224, 48, 107, .3);
}
@keyframes letterIn { from { transform: translateY(40vh) scale(.6) rotate(6deg); opacity: 0; } }
.letter-body { max-height: 54vh; overflow-y: auto; scrollbar-width: none; }
.letter-body p {
  font-family: "Caveat", cursive; font-size: 1.22rem; line-height: 29.5px;
  color: #3a2c2c; margin-bottom: 0; min-height: 29.5px;
}
.letter-body p.sign { text-align: right; color: var(--pink-deep); font-size: 1.4rem; }
.caret { display: inline-block; width: 1px; height: 1em; background: #3a2c2c; margin-left: 1px; vertical-align: -2px; animation: blink .7s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.letter-sticker { position: absolute; right: 10px; bottom: 8px; width: 78px; transform: rotate(6deg); }

.heart-badge {
  position: absolute; top: -14px; right: -12px;
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f35b8a, var(--pink-deep));
  color: #fff; font-size: 1rem;
  box-shadow: 0 6px 14px rgba(224, 48, 107, .45);
  animation: heartbeat 1.4s ease-in-out infinite;
  z-index: 2;
}
#letterNext { bottom: 4vh; }

/* ---------- gift ---------- */
.gift { position: relative; width: min(280px, 66vw); }
.gift img {
  width: 100%; display: block; position: relative;
  mix-blend-mode: multiply;
  animation: wiggle 2s ease-in-out infinite; transform-origin: 50% 90%;
}
.gift-shadow {
  position: absolute; left: 10%; right: 10%; bottom: -6%; height: 14%;
  background: radial-gradient(ellipse, rgba(120, 40, 70, .25), transparent 70%);
}
.gift.open img { animation: giftOpen .9s ease-in forwards; }
@keyframes wiggle { 0%, 55%, 100% { transform: rotate(0); } 65% { transform: rotate(-7deg) scale(1.03); } 75% { transform: rotate(7deg) scale(1.03); } 85% { transform: rotate(-3deg); } }
@keyframes giftOpen {
  0% { transform: scale(1); }
  30% { transform: scale(.9, 1.1) rotate(-4deg); }
  50% { transform: scale(1.1, .9) rotate(4deg); }
  100% { transform: scale(1.8); opacity: 0; filter: brightness(2); }
}
.flash {
  position: fixed; inset: 0; background: radial-gradient(circle, #fff, rgba(255, 230, 240, .9) 50%, rgba(255, 255, 255, 0) 80%);
  opacity: 0; pointer-events: none; z-index: 55;
}
.flash.go { animation: flash 1.2s ease-out forwards; }
@keyframes flash { 30% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- finale ---------- */
.final-card {
  position: relative; background: #fbf8f2; border-radius: 22px; padding: 20px 26px;
  box-shadow: 0 24px 50px rgba(100, 50, 50, .18);
}
.screen.active .final-card { animation: letterIn 1s var(--ease-spring); }
.final-card .duo-img { width: min(260px, 62vw); filter: none; }
.heart-red { color: #e53935; font-family: sans-serif; display: inline-block; animation: heartbeat 1.4s infinite; }
.final-text { max-width: 320px; text-align: center; font-size: 1rem; line-height: 1.55; color: #4a3535; }

@media (max-height: 700px) {
  .duo-img { width: min(230px, 60vw); }
  .cake { width: min(240px, 62vw); }
  .bouquet { width: min(220px, 56vw); }
}
