d(){ state.wind = +windEl.value; windVal.textContent = (state.wind>=0?'+':'') + state.wind; puffs.forEach(p=>p.vx = (state.wind/60*DPR)* (p.vx>=0?1:-1)); }
    windEl.addEventListener('input', syncWind); syncWind();

    document.getElementById('clear').addEventListener('click', ()=>{ puffs.length = 0; });
    const planesToggle = document.getElementById('planesToggle');
    planesToggle.addEventListener('change', ()=>{ state.planesEnabled = planesToggle.checked; });

    document.getElementById('save').add