urn Math.random().toString(36).slice(2) + Math.random().toString(36).slice(2); }

        function spawnRainLine(initial=false) {
          const W = canvas.clientWidth, H = canvas.clientHeight;
          const x = rand(0, W);
          const y = initial ? rand(0, H) : -rand(0, H*0.2);
          const len = rand(8, 24);
          const spd = rand(240, 440);
          state.rainLines.push({ x, y, len, spd });
        }

        function setTargetByBuffer() {
          if (!state.buffer) { state.targetId = nu