/* Sweet Birthday Crush — styles */
:root {
  --pink: #FF5E8A;
  --pink-deep: #E54573;
  --cream: #FFF6EE;
  --ink: #5A3A4A;
  --ink-soft: #8A6A78;
  --gold: #E8B53A;
  --card: #FFFFFF;
  --shadow: 0 10px 30px rgba(160, 80, 110, 0.18);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: 'Nunito', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 190, 215, 0.55), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(255, 214, 165, 0.5), transparent 45%),
    linear-gradient(180deg, #FFEFF5 0%, #FFF6EC 100%);
  overflow: hidden;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.display { font-family: 'Baloo 2', cursive; }

/* ---------- screens ---------- */
.screen {
  position: fixed; inset: 0;
  z-index: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: screenIn 0.45s ease-out;
}
.screen.active { display: flex; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.btn {
  font-family: 'Baloo 2', cursive;
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(180deg, #FF7AA2 0%, var(--pink) 55%, var(--pink-deep) 100%);
  border: none;
  border-radius: 999px;
  padding: 16px 44px;
  min-height: 56px;
  cursor: pointer;
  box-shadow: 0 6px 0 #C73561, 0 12px 24px rgba(229, 69, 115, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn:active { transform: translateY(4px) scale(0.98); box-shadow: 0 2px 0 #C73561, 0 6px 12px rgba(229, 69, 115, 0.3); }
.btn.gold {
  background: linear-gradient(180deg, #FFD978 0%, var(--gold) 55%, #C8932A 100%);
  box-shadow: 0 6px 0 #A87B1F, 0 12px 24px rgba(200, 147, 42, 0.35);
}
.btn.gold:active { box-shadow: 0 2px 0 #A87B1F, 0 6px 12px rgba(200, 147, 42, 0.3); }
.btn.subtle {
  background: #fff;
  color: var(--pink-deep);
  box-shadow: 0 4px 0 #E8CFD9, 0 8px 16px rgba(160, 80, 110, 0.15);
  font-size: 18px;
  padding: 12px 32px;
}
.btn.subtle:active { box-shadow: 0 1px 0 #E8CFD9; }

/* ---------- sound toggle ---------- */
#btn-mute {
  position: fixed; bottom: 16px; right: 16px; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid rgba(229, 69, 115, 0.25);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--pink-deep);
  box-shadow: var(--shadow);
}
#btn-mute svg { width: 24px; height: 24px; }
#btn-mute .icon-off { display: none; }
#btn-mute.muted .icon-on { display: none; }
#btn-mute.muted .icon-off { display: block; }

/* ---------- start screen ---------- */
#screen-start { gap: 28px; text-align: center; }
.start-candies { display: flex; gap: 14px; margin-bottom: 4px; }
.start-candies .sc { width: 54px; height: 54px; animation: bob 2.6s ease-in-out infinite; }
.start-candies .sc:nth-child(2) { animation-delay: 0.3s; }
.start-candies .sc:nth-child(3) { animation-delay: 0.6s; }
.start-candies .sc:nth-child(4) { animation-delay: 0.9s; }
.start-candies .sc:nth-child(5) { animation-delay: 1.2s; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }
.game-title {
  font-size: clamp(44px, 9vw, 72px);
  font-weight: 800;
  line-height: 1.02;
  color: var(--pink-deep);
  text-shadow: 0 3px 0 #fff, 0 8px 18px rgba(229, 69, 115, 0.25);
}
.game-title span { color: var(--gold); }
.start-sub { font-size: 18px; font-weight: 700; color: var(--ink-soft); max-width: 320px; }

/* ---------- map screen ---------- */
#screen-map { gap: 10px; }
.map-title { font-size: 34px; font-weight: 800; color: var(--pink-deep); margin-bottom: 18px; }
.map-path { display: flex; flex-direction: column; gap: 0; align-items: center; }
.map-row { display: flex; align-items: center; gap: 0; }
.map-node {
  width: 76px; height: 76px; border-radius: 50%;
  background: #fff;
  border: 4px solid var(--pink);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 26px; color: var(--pink-deep);
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
  position: relative;
}
.map-node:active { transform: scale(0.94); }
.map-node .stars { font-size: 13px; letter-spacing: 1px; color: var(--gold); height: 14px; line-height: 1; }
.map-node.locked { border-color: #D9C2CC; color: #C2A8B4; background: #F7EEF2; cursor: default; box-shadow: none; }
.map-node.done { border-color: var(--gold); }
.map-node.current { animation: pulseNode 1.6s ease-in-out infinite; }
@keyframes pulseNode {
  0%, 100% { box-shadow: var(--shadow), 0 0 0 0 rgba(255, 94, 138, 0.45); }
  50% { box-shadow: var(--shadow), 0 0 0 14px rgba(255, 94, 138, 0); }
}
.map-node.gem-node.current { border-color: var(--gold); }
.map-link { width: 26px; height: 6px; background: #F0CFDC; border-radius: 3px; }
.map-link.v { width: 6px; height: 26px; margin: 2px 0; align-self: center; }
.map-link.v.right { align-self: flex-end; margin-right: 38px; }
.map-link.v.left { align-self: flex-start; margin-left: 38px; }
.map-node .prize-badge {
  position: absolute; top: -8px; right: -10px;
  background: linear-gradient(180deg, #FFD978, var(--gold));
  color: #fff; font-family: 'Baloo 2', cursive; font-size: 14px; font-weight: 800;
  border-radius: 999px; padding: 2px 8px; line-height: 1.3;
  box-shadow: 0 3px 8px rgba(200, 147, 42, 0.5);
  pointer-events: none;
}
.map-node.final-node { width: 100px; height: 100px; border-color: var(--gold); font-size: 34px; }
.map-node.final-node.locked { border-color: #D9C2CC; }
.map-hint { margin-top: 22px; font-weight: 700; color: var(--ink-soft); font-size: 15px; }

/* ---------- game screen ---------- */
#screen-game { justify-content: flex-start; padding-top: 14px; gap: 12px; }
.hud {
  width: min(92vw, 480px);
  display: flex; align-items: center; gap: 10px;
}
.hud-chip {
  background: #fff; border-radius: 16px; padding: 8px 14px;
  box-shadow: 0 4px 12px rgba(160, 80, 110, 0.12);
  font-weight: 800; font-size: 15px; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; line-height: 1.15;
  min-width: 64px;
}
.hud-chip small { font-weight: 700; font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.5px; }
#hud-moves { font-family: 'Baloo 2', cursive; font-size: 24px; color: var(--pink-deep); }
#hud-moves-box.low #hud-moves { color: #D9342B; animation: blinkLow 0.9s ease-in-out infinite; }
@keyframes blinkLow { 50% { opacity: 0.45; } }
.hud-progress { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.hud-progress .labels { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--ink-soft); }
.bar { height: 16px; background: #F3DCE6; border-radius: 999px; overflow: hidden; }
#hud-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #FFB066, var(--pink));
  border-radius: 999px;
  transition: width 0.4s ease;
}
#screen-game[data-theme="gems"] #hud-fill { background: linear-gradient(90deg, #FFD978, var(--gold)); }
#btn-back {
  background: none; border: none; cursor: pointer; color: var(--ink-soft);
  font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 14px;
  padding: 8px 10px; border-radius: 10px;
}
#btn-back:hover { background: rgba(255, 255, 255, 0.7); }

#board-wrap {
  width: min(92vw, 480px, 62vh);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  padding: 8px;
  box-shadow: var(--shadow);
}
#screen-game[data-theme="gems"] #board-wrap {
  background: linear-gradient(165deg, #31204A 0%, #221334 100%);
  box-shadow: inset 0 0 0 2px rgba(244, 206, 99, 0.3), 0 10px 36px rgba(40, 18, 70, 0.5);
}
#board { position: relative; width: 100%; aspect-ratio: 1 / 1; touch-action: none; }
.tile {
  position: absolute; top: 0; left: 0;
  width: 12.5%; height: 12.5%;
  transition: transform 0.28s cubic-bezier(0.34, 1.3, 0.5, 1);
  cursor: pointer;
  z-index: 1;
  touch-action: none;
}
.tile-inner {
  position: absolute; inset: 5%;
  transition: transform 0.24s ease, opacity 0.24s ease;
  filter: drop-shadow(0 2px 3px rgba(120, 50, 80, 0.25));
}
.tile-inner svg { width: 100%; height: 100%; display: block; }
.tile.selected { z-index: 3; }
.tile.selected .tile-inner { transform: scale(1.18); filter: drop-shadow(0 0 8px rgba(255, 94, 138, 0.9)); }
.tile.pop .tile-inner { transform: scale(0); opacity: 0; }
.tile.bomb .tile-inner { animation: bombGlow 1.2s ease-in-out infinite; }
.tile.bomb::after {
  content: '✦';
  position: absolute; top: 2%; right: 8%;
  font-size: 38%; color: #fff;
  text-shadow: 0 0 6px rgba(255, 220, 100, 1), 0 0 2px #B8860B;
  z-index: 2; pointer-events: none;
  font-size: 14px;
}
@keyframes bombGlow {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.9)); }
  50% { filter: drop-shadow(0 0 10px rgba(255, 215, 0, 1)); }
}
.tile.bomb-born .tile-inner { animation: bornPop 0.45s ease; }
@keyframes bornPop { 0% { transform: scale(0.4); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; top: 14%;
  transform: translateX(-50%) translateY(-12px);
  background: var(--ink); color: #fff;
  font-family: 'Baloo 2', cursive; font-weight: 700; font-size: 18px;
  padding: 10px 24px; border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 70;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- overlays ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(90, 40, 60, 0.45);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.35s ease;
}
.overlay.show { opacity: 1; pointer-events: auto; }
/* the letter is opened from the finale (z-index 80), so it must sit above it */
#ov-letter { z-index: 100; }
.modal {
  background: var(--card);
  border-radius: 28px;
  padding: 32px 28px;
  max-width: 400px; width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(60, 20, 40, 0.35);
  transform: translateY(24px) scale(0.95);
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.5, 1);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.overlay.show .modal { transform: none; }
.modal h2 { font-family: 'Baloo 2', cursive; font-size: 30px; color: var(--pink-deep); line-height: 1.1; }
.modal p { font-size: 17px; font-weight: 700; color: var(--ink-soft); }

/* ---------- coupon 5€ ---------- */
.coupon5 {
  width: 100%;
  background: linear-gradient(135deg, #FFF3D6, #FFE3EC);
  border-radius: 16px;
  border: 2px dashed var(--pink);
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.coupon5 .top { display: flex; align-items: center; gap: 16px; }
.coupon5 .amount {
  font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 46px;
  color: var(--pink-deep); line-height: 1;
  flex-shrink: 0;
}
.coupon5 .info { text-align: left; }
.coupon5 .info strong { display: block; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink); }
.coupon5 .info span { font-size: 14px; font-weight: 700; color: var(--ink-soft); }

/* ---------- finale ---------- */
#finale {
  position: fixed; inset: 0; z-index: 80;
  background: radial-gradient(circle at 50% 38%, #3A2150 0%, #1B0F2E 70%);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 1.4s ease;
  overflow: hidden;
}
#finale.show { opacity: 1; pointer-events: auto; }
#finale::before {
  content: '';
  position: absolute; inset: -50%;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.9) 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 220, 150, 0.7) 1px, transparent 1.8px);
  background-size: 140px 140px, 220px 220px;
  background-position: 0 0, 60px 90px;
  animation: drift 60s linear infinite;
  opacity: 0.5;
}
@keyframes drift { to { transform: translate(140px, 140px); } }

#finale-stage {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 26px;
  transition: transform 0.8s ease, opacity 0.8s ease;
}
#finale-stage.shrink { transform: translateY(-26vh) scale(0.55); opacity: 0.35; }
#finale-tease {
  font-family: 'Baloo 2', cursive; font-size: clamp(22px, 5vw, 30px); font-weight: 700;
  color: #FFE9C8; text-align: center; max-width: 340px; line-height: 1.25;
  opacity: 0; transform: translateY(16px);
  transition: opacity 1s ease, transform 1s ease;
}
#finale-tease.in { opacity: 1; transform: none; }
#finale-hint {
  font-weight: 800; font-size: 16px; color: rgba(255, 233, 200, 0.85);
  opacity: 0; transition: opacity 0.8s ease;
  animation: hintPulse 1.6s ease-in-out infinite;
}
#finale-hint.in { opacity: 1; }
@keyframes hintPulse { 50% { transform: translateY(-4px); } }

#jewel-box-wrap {
  opacity: 0; transform: scale(0.6) translateY(30px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.34, 1.3, 0.5, 1);
  perspective: 700px;
}
#jewel-box-wrap.in { opacity: 1; transform: none; }
#jewel-box { position: relative; width: 230px; height: 210px; cursor: pointer; transform-style: preserve-3d; }
.box-glow {
  position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 235, 170, 1), rgba(255, 215, 110, 0.4) 55%, transparent 75%);
  opacity: 0; transition: opacity 0.7s ease 0.35s, width 0.9s ease 0.35s, height 0.9s ease 0.35s;
  pointer-events: none;
}
#jewel-box.open .box-glow { opacity: 1; width: 380px; height: 380px; }
.box-base {
  position: absolute; left: 15px; right: 15px; bottom: 0; height: 118px;
  background: linear-gradient(180deg, #B62D52 0%, #8E1F3D 60%, #6E152E 100%);
  border-radius: 14px 14px 22px 22px;
  box-shadow: inset 0 6px 14px rgba(255, 160, 180, 0.25), 0 18px 40px rgba(0, 0, 0, 0.5);
}
.box-base::after {
  content: '';
  position: absolute; left: 50%; top: 38%; transform: translateX(-50%);
  width: 34px; height: 22px;
  background: linear-gradient(180deg, #FFE9A8, #D9A93A);
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}
.box-lid {
  position: absolute; left: 8px; right: 8px; bottom: 106px; height: 64px;
  background: linear-gradient(180deg, #D2436E 0%, #A82950 100%);
  border-radius: 16px 16px 8px 8px;
  transform-origin: 50% 100%;
  transition: transform 1s cubic-bezier(0.45, 0, 0.2, 1);
  box-shadow: inset 0 4px 10px rgba(255, 180, 200, 0.35), 0 4px 10px rgba(0, 0, 0, 0.35);
  z-index: 3;
}
#jewel-box.open .box-lid { transform: rotateX(-112deg); }
.box-inside {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(46px) scale(0.3);
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.34, 1.4, 0.5, 1) 0.45s, opacity 0.6s ease 0.45s;
  z-index: 2;
}
#jewel-box.open .box-inside { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
.ring { position: relative; width: 84px; height: 96px; }
.ring-band {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 64px; height: 64px; border-radius: 50%;
  border: 9px solid #F4CE63;
  box-shadow: inset 0 0 6px rgba(170, 120, 20, 0.7), 0 0 14px rgba(255, 220, 120, 0.7);
}
.ring-gem {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 26px; height: 26px;
  background: linear-gradient(135deg, #FFFFFF 0%, #BBE5FF 45%, #6FB6F2 100%);
  border-radius: 5px;
  box-shadow: 0 0 16px rgba(190, 230, 255, 1), 0 0 4px #fff;
  animation: gemTwinkle 1.8s ease-in-out infinite;
}
@keyframes gemTwinkle { 50% { box-shadow: 0 0 26px rgba(210, 240, 255, 1), 0 0 8px #fff; } }

#finale-card {
  position: absolute; inset: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.9s ease 0.2s;
}
#finale-card.in { opacity: 1; pointer-events: auto; }
.gift-card {
  background: linear-gradient(180deg, #FFFDF7 0%, #FFF4E4 100%);
  border-radius: 26px;
  padding: 22px 20px 18px;
  max-width: 420px; width: 100%;
  max-height: 94vh; overflow-y: auto;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(244, 206, 99, 0.35);
  display: flex; flex-direction: column; gap: 14px; align-items: center;
  transform: translateY(30px);
  transition: transform 0.9s cubic-bezier(0.34, 1.3, 0.5, 1) 0.2s;
}
#finale-card.in .gift-card { transform: none; }
.gift-card h2 {
  font-family: 'Baloo 2', cursive; font-size: 27px; line-height: 1.1;
  color: #A82950;
}
.gift-card .msg { font-size: 15px; font-weight: 700; color: #7A5A4A; line-height: 1.45; }
.gift-card .msg em { color: #A82950; font-style: normal; font-weight: 800; }

.coupon150 {
  width: 100%;
  background: linear-gradient(135deg, #241536 0%, #3A2150 100%);
  border-radius: 18px;
  padding: 20px 18px 16px;
  color: #FFE9C8;
  position: relative;
  box-shadow: inset 0 0 0 2px rgba(244, 206, 99, 0.7), 0 10px 24px rgba(30, 10, 50, 0.4);
  display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.coupon150 .label { font-size: 12px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; color: #F4CE63; }
.coupon150 .amount {
  font-family: 'Baloo 2', cursive; font-weight: 800; font-size: 48px; line-height: 1;
  color: #FFF;
  text-shadow: 0 0 22px rgba(244, 206, 99, 0.8);
}
.coupon150 .for { font-size: 15px; font-weight: 800; }
.coupon150 .terms { font-size: 12.5px; font-weight: 600; opacity: 0.85; font-style: italic; }
.amount.revealed { animation: amountPop 0.7s cubic-bezier(0.34, 1.5, 0.5, 1); }
@keyframes amountPop { 0% { transform: scale(0.2); opacity: 0; } 60% { transform: scale(1.3); } 100% { transform: scale(1); opacity: 1; } }
.coupon150 .serial { font-size: 10.5px; letter-spacing: 1.5px; opacity: 0.55; margin-top: 4px; }

/* ---------- coupon codes (scratch) ---------- */
.code-row { display: flex; gap: 8px; width: 100%; margin-top: 8px; }
.scratch-box {
  position: relative; overflow: hidden;
  border-radius: 10px; padding: 7px 10px 8px;
  display: flex; flex-direction: column; gap: 1px;
  text-align: left; min-height: 48px; justify-content: center;
}
.scratch-box.code-main { flex: 1; }
.scratch-box.code-pin { width: 86px; flex-shrink: 0; }
.scratch-box small { font-size: 9.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; opacity: 0.7; }
.scratch-box .code-value { font-size: 14px; font-weight: 800; letter-spacing: 0.5px; font-variant-numeric: tabular-nums; }
.coupon150 .scratch-box { background: rgba(255, 233, 200, 0.12); color: #FFE9C8; box-shadow: inset 0 0 0 1px rgba(244, 206, 99, 0.4); }
.coupon5 .scratch-box { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(229, 69, 115, 0.3); }
.coupon5 .code-row { margin-top: 0; }
.scratch-cv { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: pointer; transition: opacity 0.7s ease; }
.scratch-cv.cleared { opacity: 0; pointer-events: none; }

.shop-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 800; font-size: 14px; text-decoration: none;
  border-radius: 999px; padding: 8px 18px;
}
.coupon150 .shop-link { color: #F4CE63; box-shadow: inset 0 0 0 1.5px rgba(244, 206, 99, 0.7); margin-top: 6px; }
.modal .shop-link { color: var(--pink-deep); box-shadow: inset 0 0 0 1.5px rgba(229, 69, 115, 0.45); }
.shop-link:active { transform: scale(0.96); }
.gift-card .sign { font-size: 17px; font-weight: 800; color: #A82950; }

/* ---------- love theme board ---------- */
#screen-game[data-theme="love"] #board-wrap {
  background: linear-gradient(165deg, #FFE3EF 0%, #FFF0F6 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 150, 185, 0.4), 0 10px 36px rgba(220, 120, 160, 0.35);
}
#screen-game[data-theme="love"] #hud-fill { background: linear-gradient(90deg, #FF9FC0, #FF5E8A); }

/* ---------- love coupon (купон нежности) ---------- */
.love-sub { font-size: 16px; font-weight: 800; color: var(--pink-deep); }
.love-coupon {
  width: 100%;
  background: linear-gradient(140deg, #FFF4E9 0%, #FFE6F0 100%);
  border: 2px dashed var(--pink);
  border-radius: 20px;
  padding: 22px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.love-coupon::before, .love-coupon::after {
  content: ''; position: absolute; top: 50%; width: 18px; height: 18px;
  background: var(--cream); border-radius: 50%; transform: translateY(-50%);
  box-shadow: inset 0 0 0 2px rgba(255, 150, 185, 0.35);
}
.love-coupon::before { left: -10px; }
.love-coupon::after { right: -10px; }
.love-emoji { font-size: 46px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(220, 120, 160, 0.4)); }
.love-title { font-size: 25px; font-weight: 800; color: var(--pink-deep); line-height: 1.1; }
.love-desc { font-size: 15.5px; font-weight: 700; color: var(--ink-soft); line-height: 1.45; }
.love-foot {
  margin-top: 4px; font-size: 11px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--gold);
}

/* ---------- love letter ---------- */
.letter {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 224, 236, 0.7), transparent 40%),
    linear-gradient(180deg, #FFFDF8 0%, #FFF3F7 100%);
  border-radius: 26px;
  padding: 30px 28px 26px;
  max-width: 440px; width: 100%;
  max-height: 92vh; overflow-y: auto;
  text-align: center;
  box-shadow: 0 24px 60px rgba(60, 20, 40, 0.4), inset 0 0 0 1.5px rgba(255, 150, 185, 0.35);
  transform: translateY(24px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.5, 1);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.overlay.show .letter { transform: none; }
.letter-deco { font-size: 40px; }
.letter h2 { font-family: 'Baloo 2', cursive; font-size: 28px; color: var(--pink-deep); line-height: 1.1; }
.letter-body { display: flex; flex-direction: column; gap: 12px; }
.letter-body p {
  font-size: 16px; font-weight: 600; line-height: 1.6; color: var(--ink);
  text-wrap: pretty; text-align: left;
}
.letter-body strong { color: var(--pink-deep); font-weight: 800; }
.letter-sign {
  font-family: 'Baloo 2', cursive; font-size: 19px; font-weight: 700; color: var(--pink-deep);
  align-self: flex-end;
}

/* ---------- floating background hearts ---------- */
#bg-hearts { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.fh {
  position: absolute; bottom: -8%;
  animation-name: floatUp; animation-timing-function: linear; animation-iteration-count: infinite;
  will-change: transform, opacity;
}
@keyframes floatUp {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-118vh) rotate(40deg); }
}
@media (prefers-reduced-motion: reduce) { .fh { animation: none; display: none; } }

/* ---------- confetti ---------- */
#confetti { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
