diff --git a/assets/app.js b/assets/app.js index 457a2ef..4242763 100644 --- a/assets/app.js +++ b/assets/app.js @@ -410,6 +410,8 @@ function scheduleAmbientDrift() { const delay = 10000 + Math.random() * 10000; // 10–20s fireflyTimer = setTimeout(() => { if (!animationsEnabled) { stopAmbientDrift(); return; } + const existing = document.querySelectorAll(isDarkMode ? '.firefly-wrap' : '.seed-wrap').length; + if (existing >= 5) { scheduleAmbientDrift(); return; } if (isDarkMode) { spawnFirefly(); } else {