/* Heartbeat: one big heart in the middle of the screen. */

.beat-main { min-height: 100dvh; display: flex; flex-direction: column; }
.hint { text-align: center; font-family: var(--hand); font-size: 30px; margin: 8px 0 0; }

.heart-stage { flex: 1; display: grid; place-items: center; min-height: 300px; }

.heart {
  position: relative;
  width: 230px;
  height: 230px;
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 50%;
}
.heart:active { transform: none; }

.heart-shape {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 32% 28%, #ff9ab3 0, var(--rose) 45%, var(--rose-deep) 100%);
  /* A heart drawn with a mask so the gradient fills it. */
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 92"><path d="M50 91C47 88 3 60 1 30 0 13 12 1 27 1c10 0 18 6 23 14C55 7 63 1 73 1c15 0 27 12 26 29C97 60 53 88 50 91z"/></svg>') center / contain no-repeat;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 92"><path d="M50 91C47 88 3 60 1 30 0 13 12 1 27 1c10 0 18 6 23 14C55 7 63 1 73 1c15 0 27 12 26 29C97 60 53 88 50 91z"/></svg>') center / contain no-repeat;
  filter: drop-shadow(0 18px 30px rgba(201, 58, 98, 0.45));
  animation: beat 1.4s ease-in-out infinite;
}

.heart-ring {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  border: 3px solid var(--rose-soft);
  opacity: 0;
  pointer-events: none;
}

.heart.pulse .heart-shape { animation: tap 0.45s ease, beat 1.4s ease-in-out 0.45s infinite; }
.heart.pulse .heart-ring { animation: ring 0.8s ease-out; }

@keyframes tap {
  0% { transform: scale(1); }
  35% { transform: scale(0.86); }
  70% { transform: scale(1.14); }
  100% { transform: scale(1); }
}
@keyframes ring {
  from { opacity: 0.9; transform: scale(0.8); }
  to { opacity: 0; transform: scale(1.7); }
}

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stats div {
  background: var(--card);
  border-radius: 20px;
  padding: 12px;
  text-align: center;
  box-shadow: 0 6px 18px -12px rgba(150, 50, 80, 0.4);
}
.stats b { display: block; font-family: var(--hand); font-size: 44px; line-height: 1; color: var(--rose-deep); }
.stats span { font-size: 13px; font-weight: 800; color: var(--ink-soft); }

.last { text-align: center; font-weight: 700; margin: 16px 0 4px; }
.total { text-align: center; font-size: 13px; font-weight: 700; margin: 0; }
