diff --git a/apps/desktop/src/components/GameModal.tsx b/apps/desktop/src/components/GameModal.tsx index bab0a90..ef5424d 100644 --- a/apps/desktop/src/components/GameModal.tsx +++ b/apps/desktop/src/components/GameModal.tsx @@ -48,6 +48,14 @@ export function GameModal({ gameId, onClose }: Props) { useEffect(() => { if (finished && winnerIdx !== null && winnerIdx === myPlayerIdx) { + // Respect the OS-level reduced-motion preference. + if ( + typeof window !== 'undefined' && + window.matchMedia && + window.matchMedia('(prefers-reduced-motion: reduce)').matches + ) { + return; + } // Two bursts from the lower corners for a celebratory feel. void confetti({ particleCount: 80, diff --git a/apps/desktop/src/styles/globals.css b/apps/desktop/src/styles/globals.css index 0828171..ba4a1d0 100644 --- a/apps/desktop/src/styles/globals.css +++ b/apps/desktop/src/styles/globals.css @@ -85,9 +85,10 @@ *, *::before, *::after { - animation-duration: 0.01ms !important; + animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; - transition-duration: 0.01ms !important; + transition-duration: 0.001ms !important; + scroll-behavior: auto !important; } } }