/* ============================================================
   動畫與減少動態支援
   ============================================================ */
@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
@keyframes floatUp { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-46px); opacity: 0; } }
@keyframes pulseRed { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 95, 0); } 50% { box-shadow: 0 0 0 8px rgba(255, 90, 95, 0.35); } }
@keyframes ripple { from { transform: scale(0); opacity: 0.45; } to { transform: scale(2.6); opacity: 0; } }
@keyframes flashBurst { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes confettiFall { 0% { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 1; } 100% { transform: translate3d(var(--dx, 0px), 105vh, 0) rotate(var(--rot, 540deg)); opacity: 0.9; } }
@keyframes boost { 0% { filter: none; } 40% { filter: drop-shadow(0 0 14px #ffd23f) brightness(1.25); } 100% { filter: none; } }
@keyframes bump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes starPop { 0% { transform: scale(0) rotate(-40deg); opacity: 0; } 70% { transform: scale(1.25) rotate(8deg); opacity: 1; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes countPop { 0% { transform: scale(2.4); opacity: 0; } 25% { transform: scale(1); opacity: 1; } 85% { opacity: 1; } 100% { transform: scale(0.8); opacity: 0; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes trophyShine { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.06) rotate(-3deg); } }
@keyframes nodePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 210, 63, 0.55); } 50% { box-shadow: 0 0 0 12px rgba(255, 210, 63, 0); } }

.is-shake { animation: shake 0.45s ease both; }
.is-boost { animation: boost 0.9s ease both; }

.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.55); pointer-events: none; animation: ripple 0.55s ease-out forwards; }

.confetti__piece { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: confettiFall var(--dur, 2.4s) cubic-bezier(0.3, 0.1, 0.5, 1) forwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .confetti { display: none; }
  .flash.is-on { animation: none; opacity: 0; }
}
