Apply resolved theme to DOM.
Sets data-theme on all .middag-root elements + class dark on for Tailwind.
Also syncs color-scheme on so native form controls (text inputs,
textareas, native selects, date/number pickers, autofill, scrollbars) render
in the matching UA scheme. Without this, switching to dark leaves native
widgets in the OS/UA light scheme — light foreground text on a light native
background reads as invisible inside forms.
Apply resolved theme to DOM. Sets data-theme on all .middag-root elements + class dark on for Tailwind.
Also syncs
color-schemeon so native form controls (text inputs, textareas, native selects, date/number pickers, autofill, scrollbars) render in the matching UA scheme. Without this, switching to dark leaves native widgets in the OS/UA light scheme — light foreground text on a light native background reads as invisible inside forms.