/* reservaime — Tweaks island.
Mounts only the Tweaks panel into #tweaks-root and writes the chosen
values to CSS custom properties on :root, so the vanilla landing
restyles live. */
const { useState, useEffect } = React;
const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
"brand": "#1B3461",
"accent": "#C9932A",
"font": "Inter",
"headingFont": "match",
"radius": 16
}/*EDITMODE-END*/;
const FONT_STACK = {
"Inter": "'Inter', system-ui, sans-serif",
"Manrope": "'Manrope', system-ui, sans-serif",
"Plus Jakarta Sans": "'Plus Jakarta Sans', system-ui, sans-serif",
"Sora": "'Sora', system-ui, sans-serif"
};
function applyTweaks(t) {
const root = document.documentElement.style;
root.setProperty("--navy", t.brand);
root.setProperty("--gold", t.accent);
root.setProperty("--font", FONT_STACK[t.font] || FONT_STACK.Inter);
const r = Number(t.radius);
root.setProperty("--radius", r + "px");
root.setProperty("--radius-sm", Math.round(r * 0.62) + "px");
root.setProperty("--radius-lg", Math.round(r * 1.5) + "px");
}
function App() {
const [t, setTweak] = useTweaks(TWEAK_DEFAULTS);
useEffect(() => { applyTweaks(t); }, [t]);
return (
setTweak("brand", v)}
/>
setTweak("accent", v)}
/>
setTweak("font", v)}
/>
setTweak("radius", v)}
/>
);
}
ReactDOM.createRoot(document.getElementById("tweaks-root")).render();