/*!
 * PumpkinPatch v2 — the shared play world's look (with patch-v2.js).
 * Flat shapes; motion is transform + opacity only, each thing on its own clock.
 */
.pv-scene { position: absolute; inset: 0; overflow: hidden; pointer-events: none; contain: strict; }
.pv-castle { position: absolute; max-width: none; display: block; user-select: none; -webkit-user-drag: none; }
.pv-moon { position: absolute; }
.pv-moon svg { width: 100%; height: 100%; display: block; }
.pv-land { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pv-live, .pv-stars, .pv-hero-slot { position: absolute; inset: 0; }
.pv-live > i, .pv-stars > i { position: absolute; display: block; border-radius: 50%; will-change: opacity, transform; }

/* stars: a soft twinkle, every star on its own tempo (set inline) */
.pv-stars > i { background: #fff; animation: pv-twinkle 3s ease-in-out infinite alternate; }
@keyframes pv-twinkle { from { opacity: 0.25; } to { opacity: 1; } }

/* jack-o'-lantern glow: a FLAT disc that jumps between brightnesses (a flicker, not a fade) */
.pv-glow { background: #ffc24d; opacity: 0.22; animation: pv-flicker 2.2s step-end infinite; }
@keyframes pv-flicker {
  0% { opacity: 0.22; } 14% { opacity: 0.32; } 27% { opacity: 0.18; } 41% { opacity: 0.29; }
  55% { opacity: 0.24; } 63% { opacity: 0.35; } 76% { opacity: 0.2; } 88% { opacity: 0.3; } 100% { opacity: 0.22; }
}

/* the owl's lids: shut for a blink now and then */
.pv-live > .pv-lids { border-radius: 0; opacity: 0; animation: pv-blink 5s step-end infinite; }
.pv-lids svg { width: 100%; height: 100%; display: block; }
@keyframes pv-blink { 0% { opacity: 0; } 92% { opacity: 1; } 95% { opacity: 0; } 100% { opacity: 0; } }

/* fireflies: a warm dot with a flat halo ring, drifting and blinking */
.pv-fly { background: #fff3a0; box-shadow: 0 0 0 4px rgba(255, 236, 140, 0.22); opacity: 0; animation: pv-firefly 8s ease-in-out infinite; }
@keyframes pv-firefly {
  0% { transform: translate(0, 0); opacity: 0; }
  18% { opacity: 0.95; }
  40% { transform: translate(calc(var(--dx) * 0.6), var(--dy)); opacity: 0.2; }
  58% { opacity: 1; }
  75% { transform: translate(var(--dx), calc(var(--dy) * -0.4)); opacity: 0.85; }
  100% { transform: translate(0, 0); opacity: 0; }
}

/* the bat: crosses the moon now and then (the rest of the cycle it's away) */
.pv-bat { position: absolute; opacity: 0; animation: pv-bat 19s linear infinite; animation-delay: -6s; }
.pv-bat-wing { width: 100%; height: 100%; animation: pv-flap 0.26s ease-in-out infinite alternate; }
.pv-bat svg { width: 100%; height: 100%; display: block; overflow: visible; }
@keyframes pv-bat {
  0% { transform: translate(calc(var(--bx) * -1), 30%); opacity: 0; }
  2% { opacity: 1; }
  9% { transform: translate(0, -40%); }
  16% { transform: translate(var(--bx), 10%); opacity: 1; }
  18% { opacity: 0; }
  100% { transform: translate(var(--bx), 10%); opacity: 0; }
}
@keyframes pv-flap { from { transform: scale(1, 1); } to { transform: scale(0.94, 0.55); } }

/* the hero bell: small, in a corner, behind the game (never over a target) */
.pv-hero { position: absolute; }
.pv-hero[hidden] { display: none; }
.pv-hero > svg { width: 100%; height: 100%; display: block; }

@media (prefers-reduced-motion: reduce) {
  .pv-stars > i, .pv-glow, .pv-fly, .pv-bat, .pv-bat-wing, .pv-live > .pv-lids { animation: none; }
  .pv-fly { opacity: 0.8; }
}
