/* game.css — full-screen, non-scrolling game. Transform owners: .gm-meter = heartbeat · .gm-count-num = pop ·
   .gm-heartfill-heart = the fill (WAAPI). */

[data-screen="game"] {
  overflow: hidden;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.gm-area { position: absolute; inset: 0; touch-action: none; }
.gm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.gm-hud {
  position: absolute;
  top: calc(10px + var(--sat));
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  pointer-events: none;
}
.gm-meter { pointer-events: none; }
.gm-meter.is-beat { animation: heartbeat 1.1s ease-in-out 2; }
.gm-meter-heart { position: relative; width: 72px; height: 65px; }
.gm-meter-svg { width: 72px; height: 65px; overflow: visible; filter: drop-shadow(0 0 8px rgba(255, 255, 255, .6)); }
.gm-meter-outline { fill: rgba(255, 255, 255, .16); stroke: #fff; stroke-width: 1.2; }
.gm-meter-fill { fill: #fff; }
.gm-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--rose-700);
  font-variant-numeric: tabular-nums;
}
.gm-toast {
  min-height: 24px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  text-shadow: var(--text-shadow);
  opacity: 0;
  transition: opacity .3s ease;
}
.gm-toast.is-in { opacity: 1; }

.gm-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--sat)) 20px calc(24px + var(--sab));
  touch-action: none;
}
.gm-intro { background: rgba(136, 14, 79, .18); }
.gm-intro-card { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 360px; text-align: center; animation: cardIn .7s var(--ease-out) both; }
.gm-instructions { white-space: pre-line; font-size: 16px; font-weight: 500; line-height: 1.5; color: #fff; text-shadow: var(--text-shadow); }
.gm-start { margin-top: 8px; min-width: 160px; }
.gm-skip { margin-top: 2px; }
.gm-skip-play { position: absolute; right: calc(12px + var(--sar)); bottom: calc(12px + var(--sab)); touch-action: manipulation; }
.gm-count { pointer-events: none; }
.gm-count-num { font-family: var(--font-love); font-size: 96px; font-weight: 700; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, .25); animation: countPop .6s var(--ease-out) both; }
.gm-win {
  position: absolute;
  left: 0;
  right: 0;
  top: 40%;
  text-align: center;
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 700;
  color: #fff;
  text-shadow: var(--text-shadow);
  pointer-events: none;
}

/* body-level overlay: the heart that fills the screen and carries us into the proposal */
.gm-heartfill { position: fixed; inset: 0; z-index: 55; pointer-events: none; transition: opacity .6s ease, background-color .2s ease; }
.gm-heartfill-heart { position: absolute; color: #fff; will-change: transform; }
.gm-heartfill.is-solid { background-color: #880E4F; }
.gm-heartfill.is-out { opacity: 0; }
.gm-heartfill.is-fade .gm-heartfill-heart { display: none; }
.gm-heartfill.is-fade { background-color: #880E4F; opacity: 0; }
.gm-heartfill.is-fade.is-on { opacity: 1; }
.gm-heartfill.is-fade.is-out { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .gm-meter.is-beat, .gm-count-num, .gm-intro-card { animation: none !important; }
}
