/* Settings: Swipe navigation toggle (client-side, per device) */
(function(){
  document.addEventListener('DOMContentLoaded', function(){
    const t = document.getElementById('swipeNavToggle');
    if (!t) return;
    try { t.checked = (localStorage.getItem('swipeNavEnabled') !== 'false'); } catch(e){}
    t.addEventListener('change', () => {
      try { localStorage.setItem('swipeNavEnabled', t.checked ? 'true' : 'false'); } catch(e){}
    });
  });
})();