/* Interface language is independent from optional English learning glosses. */
.language-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:5px 8px;border:0;border-radius:8px;background:transparent;color:#465e41;font:12px system-ui,sans-serif;white-space:nowrap;cursor:pointer;flex-shrink:0}
.language-toggle:focus-visible,.language-short:focus-visible{outline:2px solid #ad6549;outline-offset:3px}
.language-switch{width:32px;height:19px;border-radius:20px;background:#bdc9b4;position:relative;display:inline-block;flex-shrink:0}
.language-switch:after{content:"";position:absolute;left:3px;top:3px;width:13px;height:13px;border-radius:50%;background:#fffefa;transition:transform .18s}
.language-toggle[aria-checked=true] .language-switch{background:#5c7851}
.language-toggle[aria-checked=true] .language-switch:after{transform:translateX(13px)}
.language-toggle[aria-checked=false] [lang=zh-CN],.language-toggle[aria-checked=true] [lang=en]{font-weight:700}
html[lang=en] .sidebar .nav-item{font-family:system-ui,sans-serif;font-size:10px;letter-spacing:0}
html[lang=en] .summary-stat small{font-size:10px;letter-spacing:0}
html[lang=en] .page-heading h1{letter-spacing:0}
html[lang=en] .rating-label{flex-wrap:wrap}
html[lang=en] .writing-workspace .writing-status{gap:10px}
@media(max-width:900px){
 .topbar-right{gap:12px}
 .writing-header-actions{gap:5px}
 .writing-header-actions button{padding:8px 10px;font-size:12px}
 html[lang=en] .summary-stat{padding-left:14px;padding-right:14px}
}
@media(max-width:700px){
 .topbar .breadcrumb{display:none}
 .topbar{justify-content:flex-end;padding-left:12px;padding-right:12px}
 .topbar-right{width:100%;justify-content:space-between;gap:8px}
 .language-toggle{font-size:11px;gap:6px;padding:4px}
 .english-toggle{font-size:10px}
 .topbar-divider{display:none}
 .writing-workspace-header{flex-wrap:wrap;gap:2px;min-height:48px}
 .writing-character{gap:4px}
 .writing-character .writing-char{font-size:28px}
 .writing-character #writing-pinyin{font-size:13px}
 .writing-character .sound-button{width:30px}
 .writing-header-actions{gap:3px;margin-left:auto}
 .writing-header-actions button{font-size:10px;padding:6px;min-height:44px}
 html[lang=en] .writing-workspace-header{row-gap:2px}
 html[lang=en] .summary-stat small{font-size:8px;margin-left:3px}
 html[lang=en] .summary-stat{padding-left:10px;padding-right:10px}
 html[lang=en] .mode-buttons button{font-size:10px;padding:9px 7px}
 html[lang=en] #skill-select{font-size:10px;max-width:120px}
 html[lang=en] .rating-label>span{display:none}
}
@media(prefers-reduced-motion:reduce){.language-switch:after{transition:none}}
