/* ═══ A Little Universe — animation layer ═══ */

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.float-slow { animation: float-slow 4.5s ease-in-out infinite; }

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  12%      { transform: scale(1.08); }
  24%      { transform: scale(1); }
  36%      { transform: scale(1.05); }
}
.gate-heart { animation: heartbeat 2.6s ease-in-out infinite; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes stage-out {
  to { opacity: 0; transform: scale(.985); }
}
@keyframes stage-in {
  from { opacity: 0; transform: scale(1.015); }
  to   { opacity: 1; transform: scale(1); }
}
.stage.leaving, .scene.leaving { animation: stage-out .45s ease forwards; }
.stage.entering, .scene.entering { animation: stage-in .6s ease both; }

/* cat life */
@keyframes cat-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}
#cat.bobbing img { animation: cat-bob 2.8s ease-in-out infinite; }
@keyframes cat-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  35%      { transform: translateY(-16px) scale(1.04); }
  70%      { transform: translateY(0) scale(.98); }
}
#cat.bouncing img { animation: cat-bounce .65s ease; }
@keyframes cat-quiet-sway {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-2px) rotate(-1.5deg); }
}
#cat.quiet img { animation: cat-quiet-sway 4s ease-in-out infinite; }

/* door reaction particles (spawned by JS) */
.door-reaction span { font-size: 0; border-radius: 50%; }
@keyframes rx-float-up {
  0%   { opacity: 0; transform: translateY(0) scale(.4); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-46vh) scale(1.15); }
}
@keyframes rx-star-fall {
  0%   { opacity: 0; transform: translateY(-8vh) rotate(0deg) scale(.5); }
  12%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(52vh) rotate(220deg) scale(1); }
}
@keyframes rx-spark {
  0%   { opacity: 0; transform: scale(.2); }
  25%  { opacity: 1; }
  100% { opacity: 0; transform: scale(1.6); }
}
.rx-heart { background: var(--baby-pink); box-shadow: 0 0 10px rgba(255,182,217,.9); animation: rx-float-up 2.4s ease-out forwards; }
.rx-star  { background: var(--soft-white); box-shadow: 0 0 10px rgba(249,234,243,.9); clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%); animation: rx-star-fall 2.2s ease-in forwards; }
.rx-spark { background: var(--soft-pink); box-shadow: 0 0 12px rgba(236,121,187,.95); animation: rx-spark 1.6s ease-out forwards; }

/* finale reveal */
@keyframes reveal-line {
  from { opacity: 0; transform: translateY(30px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.finale-line.revealed { animation: reveal-line 1.6s ease both; }

/* music play state icon pulse */
@keyframes soft-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(236,121,187,.5); }
  50%      { box-shadow: 0 0 0 7px rgba(236,121,187,0); }
}
.mini-player.playing .mp-play { animation: soft-pulse 2.2s ease-out infinite; }

/* gate error shake */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); } 40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(4px); }
}
.date-input.error { animation: shake .45s ease; }

/* equalizer bars */
@keyframes eq {
  0%, 100% { height: 4px; }
  50%      { height: 12px; }
}

/* reduced motion: calm everything, keep content fully usable */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .float-slow, .gate-heart, #cat.bobbing img, #cat.bouncing img, #cat.quiet img { animation: none; }
}
