.language-switcher{position:relative;flex-shrink:0;z-index:65}
.language-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-width:44px;min-height:36px;border:1px solid transparent;border-radius:9px;color:#f6f2fb;background:transparent}
.language-toggle:hover,.language-toggle[aria-expanded=true]{background:#ffffff14;border-color:#ffffff28;color:#fff}
.language-toggle svg{width:20px;height:20px}.language-toggle>img{width:18px;height:13px;border-radius:2px;object-fit:cover}
.language-popover{position:absolute;right:0;top:calc(100% + 9px);width:248px;max-width:calc(100vw - 28px);padding:10px;border:1px solid var(--line);border-radius:15px;background:var(--surface);color:var(--ink);box-shadow:0 14px 45px #28113524;animation:language-appear .18s ease-out}
.language-popover[hidden]{display:none}.language-menu-title{padding:7px 9px 10px;font-size:11px;font-weight:600;color:var(--muted)}
.language-options{display:grid;gap:3px}.language-option{display:flex;align-items:center;gap:12px;width:100%;min-height:41px;padding:8px 10px;border-radius:8px;text-align:left;color:var(--ink);font-size:13px;font-weight:500}
.language-option img{width:25px;height:18px;object-fit:cover;border-radius:3px;box-shadow:0 0 0 1px #80768920}.language-option span{flex:1}
.language-option:hover,.language-option:focus-visible{background:var(--surface-2)}.language-option[aria-checked=true]{background:color-mix(in srgb,var(--accent,#843cf0) 10%,var(--surface));color:var(--accent,#843cf0)}
.language-option i{font-style:normal;opacity:0}.language-option[aria-checked=true] i{opacity:1}.language-toggle:focus-visible,.language-option:focus-visible,.language-retry:focus-visible{outline:2px solid var(--accent,#843cf0);outline-offset:2px}
.language-footer{border-top:1px solid var(--line);margin-top:8px;padding:11px 9px 3px}.language-status{font-size:10px;line-height:1.6;color:var(--muted);margin:0}.language-retry{font-size:11px;color:var(--accent,#843cf0);margin-top:6px;text-decoration:underline}
html[data-translation-state=loading] .language-toggle:after{content:'';width:5px;height:5px;background:var(--accent,#843cf0);border-radius:50%;animation:language-pulse 1s infinite}
html[data-translation-state=error] .language-toggle{border-color:#c78631}
html:lang(zh),html:lang(ja),html:lang(ko){--font-ui:"Google Sans",system-ui,"Noto Sans CJK SC","Noto Sans CJK JP","Noto Sans CJK KR",sans-serif}
@keyframes language-appear{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@keyframes language-pulse{50%{opacity:.25}}
@media(max-width:740px){.language-toggle{min-width:32px;min-height:30px;gap:5px}.language-toggle svg{width:18px;height:18px}.language-toggle>img{width:15px;height:11px}.language-popover{right:-2px;width:235px}.language-option{min-height:43px}}
@media(prefers-reduced-motion:reduce){.language-popover,html[data-translation-state=loading] .language-toggle:after{animation:none}}
