  r = Math.min(r, Math.abs(w)/2, Math.abs(h)/2);
      ctx.beginPath();
      ctx.moveTo(x+r, y);
      ctx.arcTo(x+w, y, x+w, y+h, r);
      ctx.arcTo(x+w, y+h, x, y+h, r);
      ctx.arcTo(x, y+h, x, y, r);
      ctx.arcTo(x, y, x+w, y, r);
      ctx.closePath();
    }

    let lastT = performance.now();
    function frame(now){
      const dtMs = now - lastT; lastT = now;
      const dt = Math.max(0.5, Math.min(4, dtMs/16.67));
      drawBackground(now);
      updatePuffs(dt);
      for (let i=0;i<puffs.l