/* 테마별 색상 변수를 공통 화면 속성에 연결 */

html {
    --eh-t-accent:var(--theme-main);
    --eh-t-accent2:var(--theme-dark);
    --eh-t-border:var(--theme-border);
    --eh-t-text:var(--theme-text);
    --eh-t-muted:var(--theme-text);
    --eh-t-hover:var(--theme-light);
    --eh-t-selected:var(--theme-main);
    --eh-t-head:var(--theme-light);
    --eh-t-headtext:var(--theme-text);
    --eh-t-headborder:var(--theme-border);
    --eh-t-onhead:var(--theme-button);
    --eh-t-bg:var(--theme-page);
    --eh-t-surface:var(--theme-surface);
    --eh-t-soft:var(--theme-light);
    --eh-unified-header-bg:var(--theme-header-bg);
    --eh-unified-header-text:var(--theme-header-text);
    --eh-unified-header-mark:var(--theme-light);
    --eh-banner-outline:var(--theme-border);
    --eh-list-header-outline:var(--eh-border-level4,var(--theme-divider));
    --eh-fta-form-border:var(--theme-border);
    --eh-fta-input-border:var(--theme-border);
    --eh-fta-focus:var(--theme-main);
    --eh-fta-text:var(--theme-text);
    --eh-fta-button-bg:var(--theme-main);
    --eh-fta-button-border:var(--theme-border);
    --eh-fta-button-text:var(--theme-button);
}
html[data-eh-theme] body :is(.eh-theme-area-top) {
    --theme-main:var(--theme-top-main);
    --theme-dark:var(--theme-top-dark);
    --theme-light:var(--theme-top-light);
    --theme-border:var(--theme-top-border);
    --theme-surface:var(--theme-top-surface);
    --theme-button:var(--theme-top-button);
    --eh-t-accent:var(--theme-main);
    --eh-t-accent2:var(--theme-dark);
    --eh-t-border:var(--theme-border);
    --eh-t-text:var(--theme-text);
    --eh-t-muted:var(--theme-text);
    --eh-t-hover:var(--theme-light);
    --eh-t-selected:var(--theme-main);
    --eh-t-head:var(--theme-light);
    --eh-t-headtext:var(--theme-text);
    --eh-t-headborder:var(--theme-border);
    --eh-t-onhead:var(--theme-button);
    --eh-t-surface:var(--theme-surface);
    --eh-t-soft:var(--theme-light);
    --eh-unified-header-bg:var(--theme-header-bg);
    --eh-unified-header-text:var(--theme-header-text);
    --eh-unified-header-mark:var(--theme-light);
    --eh-menu-header-color:var(--theme-dark);
    --eh-banner-outline:var(--theme-border);
    --eh-list-header-outline:var(--eh-border-level4,var(--theme-divider));
    --eh-fta-form-border:var(--theme-border);
    --eh-fta-input-border:var(--theme-border);
    --eh-fta-focus:var(--theme-main);
    --eh-fta-text:var(--theme-text);
    --eh-fta-button-bg:var(--theme-main);
    --eh-fta-button-border:var(--theme-border);
    --eh-fta-button-text:var(--theme-button);
}
html[data-eh-theme] body :is(.fmain_border, .head_div_row, .eh-weekbar) {
    --theme-main:var(--theme-middle-main);
    --theme-dark:var(--theme-middle-dark);
    --theme-light:var(--theme-middle-light);
    --theme-border:var(--theme-middle-border);
    --theme-text:var(--theme-middle-text);
    --theme-surface:var(--theme-middle-surface);
    --theme-button:var(--theme-middle-button);
    --eh-t-accent:var(--theme-main);
    --eh-t-accent2:var(--theme-dark);
    --eh-t-border:var(--theme-border);
    --eh-t-text:var(--theme-text);
    --eh-t-muted:var(--theme-text);
    --eh-t-hover:var(--theme-light);
    --eh-t-selected:var(--theme-main);
    --eh-t-head:var(--theme-light);
    --eh-t-headtext:var(--theme-text);
    --eh-t-headborder:var(--theme-border);
    --eh-t-onhead:var(--theme-button);
    --eh-t-surface:var(--theme-surface);
    --eh-t-soft:var(--theme-light);
    --eh-unified-header-bg:var(--theme-header-bg);
    --eh-unified-header-text:var(--theme-header-text);
    --eh-unified-header-mark:var(--theme-light);
    --eh-menu-header-color:var(--theme-dark);
    --eh-banner-outline:var(--theme-border);
    --eh-list-header-outline:var(--eh-border-level4,var(--theme-divider));
    --eh-fta-form-border:var(--theme-border);
    --eh-fta-input-border:var(--theme-border);
    --eh-fta-focus:var(--theme-main);
    --eh-fta-text:var(--theme-text);
    --eh-fta-button-bg:var(--theme-main);
    --eh-fta-button-border:var(--theme-border);
    --eh-fta-button-text:var(--theme-button);
}
html[data-eh-theme] body :is(#re_bottom, .bottom_border) {
    --theme-main:var(--theme-bottom-main);
    --theme-dark:var(--theme-bottom-dark);
    --theme-light:var(--theme-bottom-light);
    --theme-border:var(--theme-bottom-border);
    --theme-text:var(--theme-bottom-text);
    --theme-surface:var(--theme-bottom-surface);
    --theme-button:var(--theme-bottom-button);
    --eh-t-accent:var(--theme-main);
    --eh-t-accent2:var(--theme-dark);
    --eh-t-border:var(--theme-border);
    --eh-t-text:var(--theme-text);
    --eh-t-muted:var(--theme-text);
    --eh-t-hover:var(--theme-light);
    --eh-t-selected:var(--theme-main);
    --eh-t-head:var(--theme-light);
    --eh-t-headtext:var(--theme-text);
    --eh-t-headborder:var(--theme-border);
    --eh-t-onhead:var(--theme-button);
    --eh-t-surface:var(--theme-surface);
    --eh-t-soft:var(--theme-light);
    --eh-unified-header-bg:var(--theme-header-bg);
    --eh-unified-header-text:var(--theme-header-text);
    --eh-unified-header-mark:var(--theme-light);
    --eh-menu-header-color:var(--theme-dark);
    --eh-banner-outline:var(--theme-border);
    --eh-list-header-outline:var(--eh-border-level4,var(--theme-divider));
    --eh-fta-form-border:var(--theme-border);
    --eh-fta-input-border:var(--theme-border);
    --eh-fta-focus:var(--theme-main);
    --eh-fta-text:var(--theme-text);
    --eh-fta-button-bg:var(--theme-main);
    --eh-fta-button-border:var(--theme-border);
    --eh-fta-button-text:var(--theme-button);
}
