async function loadIncludes() {
    const includes = document.querySelectorAll("[data-include]");
    for (const el of includes) {
        const file = el.getAttribute("data-include");
        if (!file) continue;
        try {
            const res = await fetch(file);
            if (res.ok) {
                el.innerHTML = await res.text();
            } else {
                console.error("Include failed:", file, res.status);
            }
        } catch (err) {
            console.error("Include failed:", file, err);
        }
    }
}
