.theme-switcher {
    --switch-tab-width:30px;
    --switch-bg:#fff; --switch-text:#18263d; --switch-muted:#5c687a;
    --switch-line:#d2dae5; --switch-accent:#245bff; --switch-tab:#102449; --switch-tab-text:#fff;
    position:fixed; z-index:1000; left:0; bottom:max(12px,env(safe-area-inset-bottom));
    display:flex; align-items:center; gap:0; padding:0; margin:0; color:var(--switch-text);
    width:var(--switch-tab-width); height:112px; box-sizing:border-box; overflow:hidden;
    border:1px solid var(--switch-line); border-left:0; background:var(--switch-tab);
    transition:width .16s ease,background-color .1s ease;
    font-family:Manrope,'Pretendard Variable',sans-serif;
    box-shadow:0 3px 16px #0002; border-radius:0 7px 7px 0;
}
:root[data-theme=vivid] .theme-switcher {
    --switch-bg:#182331; --switch-text:#f8faff; --switch-muted:#b4c5db;
    --switch-line:#3d526e; --switch-accent:#8eafff; --switch-tab:#245bff; --switch-tab-text:#fff;
}
:root[data-theme=dark] .theme-switcher {
    --switch-bg:#181b20; --switch-text:#f5f6f8; --switch-muted:#aeb5c0;
    --switch-line:#424750; --switch-accent:#f5f6f8; --switch-tab:#292e36; --switch-tab-text:#fff;
}
.theme-toggle {
    position:absolute; inset:0 auto 0 0; display:grid; place-items:center;
    width:calc(var(--switch-tab-width) - 1px); height:100%;
    margin:0; padding:0; border:0; border-right:1px solid var(--switch-line);
    border-radius:0; background:var(--switch-tab); color:var(--switch-tab-text);
    font:800 9px/1 Manrope,sans-serif; letter-spacing:2px; cursor:pointer;
    writing-mode:vertical-rl; text-orientation:upright; opacity:.7;
}
.theme-menu {
    display:grid; grid-template-rows:repeat(3,1fr); align-items:stretch; gap:2px;
    flex:0 0 102px; width:102px; height:100%; padding:6px;
    margin-left:calc(var(--switch-tab-width) - 1px);
    overflow:hidden; visibility:hidden; opacity:0;
    border:0; border-radius:0; background:transparent; transform:translateX(-6px);
    transition:opacity .1s ease,transform .16s ease;
}
.theme-switcher.is-open {width:calc(var(--switch-tab-width) + 102px); background:var(--switch-bg);}
.theme-switcher.is-open .theme-menu {
    visibility:visible; opacity:1; transform:translateX(0);
}
.theme-menu .theme-choice {
    display:flex; align-items:center; justify-content:space-between; gap:8px;
    min-width:0; height:auto; padding:0 8px;
    border-radius:4px; color:var(--switch-muted); background:transparent;
    font:600 12px/1 Manrope,sans-serif; text-decoration:none; white-space:nowrap;
    transition:color .1s,background-color .1s;
}
.theme-menu .theme-divider {display:none;}
.theme-menu .theme-choice::after {content:''; width:11px; flex:0 0 11px; font-size:11px;}
.theme-menu .theme-choice[aria-pressed=true] {
    color:var(--switch-accent); background:color-mix(in srgb,var(--switch-accent) 14%,transparent); font-weight:800;
}
.theme-menu .theme-choice[aria-pressed=true]::after {content:'✓';}
.theme-menu .theme-choice:hover {color:var(--switch-accent); background:color-mix(in srgb,var(--switch-accent) 22%,transparent);}
.theme-switcher :is(button,a):focus-visible {outline:2px solid var(--switch-accent); outline-offset:-3px;}
@media(max-width:767px) {
    .theme-switcher {--switch-tab-width:20px;}
}
@media(prefers-reduced-motion:reduce) {.theme-switcher,.theme-menu,.theme-menu .theme-choice {transition:none;}}

@media print {.theme-switcher {display:none!important;}}

.theme-menu .theme-choice {border:0; margin:0; text-align:left; cursor:pointer;}
