(() => { const allowedThemes = new Set(["system", "light", "dark"]); let theme = "system"; try { const savedTheme = window.localStorage.getItem("roster-theme"); if (allowedThemes.has(savedTheme)) { theme = savedTheme; } } catch { // Storage can be unavailable in hardened or private browsing contexts. } document.documentElement.dataset.theme = theme; })();