  html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
  canvas { display: block; width: 100%; height: 100%; cursor: default; touch-action: none; }
  canvas.over-heart { cursor: grab; }
  canvas.hover-const { cursor: pointer; }
  canvas.dragging { cursor: grabbing; }
  .hint {
    position: fixed; left: 0; right: 0; bottom: 18px; text-align: center;
    font: 300 12px/1 system-ui, sans-serif; letter-spacing: .3em; text-transform: uppercase;
    color: rgba(255, 150, 190, .6); pointer-events: none;
  }

.sign {
  position: fixed; top: 16px; left: 0; right: 0; text-align: center;
  font: 300 12px/1 system-ui, sans-serif; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(150, 180, 255, .45); pointer-events: none;
}
.sign { transition: opacity .7s ease; }
@media (max-width: 520px) {
  .hint, .sign { letter-spacing: .12em; font-size: 11px; }
}

/* ---------- Notificaciones ---------- */
.toast-wrap {
  position: fixed; right: 20px; bottom: 56px; z-index: 10;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  position: relative; overflow: hidden; pointer-events: auto; box-sizing: border-box;
  width: min(360px, calc(100vw - 32px)); padding: 14px 16px 18px; border-radius: 12px;
  background: linear-gradient(135deg, #2a2b30 0%, #1d1f3d 100%);
  border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 12px 40px rgba(0, 0, 0, .65);
  color: #fff; font-family: system-ui, "Segoe UI", sans-serif;
  transform: translateX(120%); opacity: 0;
  transition: transform .65s cubic-bezier(.2, .8, .2, 1), opacity .65s ease;
}
.toast.show { transform: none; opacity: 1; }
.t-head { display: flex; align-items: center; gap: 8px; }
.t-ico { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; }
.t-app { font-size: 12px; color: #e6e6ee; }
.t-close {
  margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none;
  color: #d8d8e2; font-size: 20px; line-height: 1; cursor: pointer;
}
.t-close:hover { background: rgba(255, 255, 255, .1); }
.t-title { margin-top: 8px; font-size: 15px; font-weight: 600; }
.t-text { margin-top: 3px; font-size: 14px; line-height: 1.35; color: #b9bccb; }
.t-bar {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, #ff6fa5, #ff2d6f); transform-origin: left;
  animation: tbar linear forwards; opacity: .8;
}
.toast.hold .t-bar { animation-play-state: paused; }
@keyframes tbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 520px) {
  .toast-wrap { left: 16px; right: 16px; top: 44px; bottom: auto; }
  .toast { width: 100%; }
}

/* ---------- Botón y aviso de la pregunta ---------- */
.ask-btn {
  position: fixed; left: 20px; bottom: 18px; z-index: 12; cursor: pointer;
  padding: 10px 18px; border-radius: 999px; color: #ffd3e3;
  font: 500 13px/1 system-ui, "Segoe UI", sans-serif; letter-spacing: .04em;
  background: rgba(60, 14, 34, .72); border: 1px solid rgba(255, 130, 175, .55);
  box-shadow: 0 0 18px rgba(255, 45, 111, .25);
  transition: background .25s, box-shadow .25s, transform .25s;
}
.ask-btn:hover { background: rgba(255, 45, 111, .28); box-shadow: 0 0 26px rgba(255, 45, 111, .5); transform: translateY(-1px); }
.ask-layer { position: fixed; inset: 0; z-index: 20; opacity: 0; transition: opacity .35s ease, background .35s ease; pointer-events: none; }
.ask-layer.on { opacity: 1; pointer-events: auto; }
.ask-layer.dim { background: rgba(0, 0, 0, .72); }
.ask-card {
  position: absolute; box-sizing: border-box; width: min(340px, calc(100vw - 20px)); padding: 16px 18px 18px;
  border-radius: 14px; color: #fff; font-family: system-ui, "Segoe UI", sans-serif;
  background: linear-gradient(135deg, #2a2b30 0%, #1d1f3d 100%);
  border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 14px 44px rgba(0, 0, 0, .7);
  transition: left .55s cubic-bezier(.2, .8, .2, 1), top .55s cubic-bezier(.2, .8, .2, 1);
}
.ask-card[hidden], .ask-stop[hidden], .ask-actions[hidden], .ask-done[hidden] { display: none; }
.ask-head { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #e6e6ee; }
.ask-dot { width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(135deg, #ff6fa5, #ff2d6f); }
.ask-q { margin-top: 10px; font-size: 18px; font-weight: 600; line-height: 1.3; }
.ask-actions { display: flex; gap: 10px; margin-top: 16px; }
.ask-yes, .ask-no {
  flex: 1; padding: 10px 0; border-radius: 9px; cursor: pointer; font: 600 14px/1 system-ui, "Segoe UI", sans-serif;
  border: 1px solid rgba(255, 255, 255, .18); color: #fff; background: rgba(255, 255, 255, .07); transition: background .2s, transform .15s;
}
.ask-yes { background: linear-gradient(135deg, #ff6fa5, #ff2d6f); border-color: transparent; }
.ask-yes:hover, .ask-no:hover { transform: translateY(-1px); }
.ask-no:hover { background: rgba(255, 255, 255, .16); }
.ask-done { width: 100%; margin-top: 16px; }
.ask-stop {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center;
  width: min(300px, 82vw); font-family: system-ui, "Segoe UI", sans-serif; color: #fff;
}
.ask-stop img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 14px 44px rgba(0, 0, 0, .8); }
.ask-stop p { margin: 14px 4px 14px; font-size: 18px; font-weight: 700; line-height: 1.3; }
.ask-stop .ask-yes { width: 100%; flex: none; }
.fly-heart {
  position: fixed; bottom: -40px; z-index: 30; color: #ff4d86; pointer-events: none;
  text-shadow: 0 0 12px rgba(255, 45, 111, .8); animation: flyup linear forwards;
}
@keyframes flyup { from { transform: translateY(0) rotate(0); opacity: 1; } to { transform: translateY(-110vh) rotate(25deg); opacity: 0; } }
@media (max-width: 520px) { .ask-btn { bottom: 52px; left: 16px; } }

/* ---------- Carta (papel arrugado -> desarrugado) ---------- */
.letter { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.letter[hidden] { display: none; }
.letter-ball {
  position: absolute; width: min(340px, 78vw); height: auto; opacity: 0; pointer-events: none;
  will-change: transform, opacity;
}
.letter-sheet {
  position: absolute; width: min(400px, 92vw); height: min(82vh, 680px); opacity: 0; transform-origin: center; will-change: transform, opacity;
}
.letter-paper {
  position: absolute; inset: 0; border-radius: 3px; isolation: isolate; overflow: hidden;
  background: linear-gradient(160deg, #f7f2e8 0%, #efe7d8 60%, #e9dfcd 100%);
  box-shadow: 0 22px 60px rgba(0, 0, 0, .65);
}
.letter-text {
  position: absolute; inset: 0; box-sizing: border-box; padding: 34px 30px 40px; overflow-y: auto; text-align: center;
  color: #3a3226; font-family: Georgia, "Palatino Linotype", "Book Antiqua", serif; font-size: 16px; line-height: 1.65;
  scrollbar-width: thin; scrollbar-color: rgba(58, 50, 38, .25) transparent;
}
.st { margin: 0 0 1.35em; opacity: 0; transform: translateY(9px); transition: opacity 1.1s ease, transform 1.1s ease; }
.letter-text.show .st { opacity: 1; transform: none; }
.st-title { font-size: 13px; letter-spacing: .32em; text-transform: uppercase; color: #8a6d4b; margin-bottom: 1.8em; }
.st-sign { text-align: right; font-style: italic; margin-top: 1.8em; padding-right: 6px; color: #6b5337; }
.letter-close {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%) translateY(8px); opacity: 0; pointer-events: none;
  padding: 10px 26px; border-radius: 999px; cursor: pointer; font: 600 13px/1 system-ui, "Segoe UI", sans-serif; letter-spacing: .06em;
  color: #fff; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 45, 111, .35);
  transition: opacity .8s ease, transform .8s ease;
}
.letter-close.on { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
@media (max-height: 640px) { .letter-text { font-size: 14px; line-height: 1.55; padding: 26px 24px 34px; } }
body.letter-open .toast-wrap { display: none; }
.ask-layer.dim.letter-dim { background: rgba(0, 0, 0, .96); }
.letter-ball { transform-origin: center; }
.letter-ball { z-index: 2; }
.cr { position: absolute; inset: 0; background: url(arrugas.png) center / cover; mix-blend-mode: multiply; pointer-events: none; will-change: opacity; }
.cr-b { transform: rotate(90deg) scale(1.75); }
html, body { -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
