/* Animaciones cortas de refuerzo. Nunca deben retrasar la interacción. */

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  35%      { transform: translateY(-8px); }
  70%      { transform: translateY(1px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-7px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(2px); }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(4px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes confetti-fall {
  from { opacity: 1; transform: translate(0, -10vh) rotate(0deg); }
  to   { opacity: 0; transform: translate(var(--drift), 60vh) rotate(240deg); }
}

.is-bouncing { animation: bounce 0.32s cubic-bezier(0.34, 1.56, 0.64, 1); }
.is-shaking  { animation: shake 0.3s ease-in-out; }
.is-popping  { animation: pop 0.16s ease-out; }

.confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti span {
  position: absolute;
  top: 0;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--tone);
  animation: confetti-fall 1.4s ease-in forwards;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
