/* Site script, served at /assets/app.js (deferred). Vanilla JS, no build step. 1. Preferences: theme, length order and base map (saved in localStorage; applied early by prefs.js), and the theme menu in the header 1b. Saved trails: the Save buttons, the count in the header (lh-saved in localStorage) 1c. The Saved page (/saved/): the visitor's saved trails, or a list from a link 2. Maps: .mapfig[data-map] figures. A frame is never empty: the page carries a static drawing of its tracks (olt/sketch.py). A moment after the page has loaded (idle, or after 500 ms at most), and never on a scroll, a touch, a key or focus, every map starts by itself: the script loads MapLibre (and the contour add-on) from the addresses on its own