/* Use local system fonts with Arabic, Cyrillic, CJK and Thai coverage. */
body { direction:ltr; }
body button,body select,body input,#gameMenu,#overlay,#tipbox,#artGallery { font-family:"Segoe UI",Roboto,"Noto Sans",Arial,sans-serif; }
.language-row { display:flex;align-items:center;justify-content:center;gap:12px;grid-column:1/-1;min-width:0;margin:0 0 12px; }
.language-row label { color:#a8d7e7;font-size:12px;flex:0 0 auto; }
.language-row select { box-sizing:border-box;min-width:0;width:240px;max-width:70%;min-height:36px;padding:6px 10px;background:#0a2332;color:#e0f3fa;border:1px solid #5599b1;border-radius:4px;font-size:13px;cursor:pointer; }
.language-row select:focus-visible { outline:2px solid #a0e6ff;outline-offset:2px; }
.language-row option { background:#0a2332;color:#fff; }
#gameMenu .language-row { justify-content:flex-start;flex-wrap:wrap; }
body #overlay .card::before { display:none; }
body #buildbar::before { content:var(--localized-build-caption,'BUILDINGS'); }
body #gameMenu .menu-tabs { flex-wrap:wrap; }
body #gameMenu .menu-tabs button { flex:1 1 auto;white-space:normal;min-width:0;overflow-wrap:anywhere; }
body #gameMenu .menu-actions { flex-wrap:wrap; }
body #overlay .start-actions button { white-space:normal;overflow-wrap:anywhere; }
body #overlay .diff-btn { white-space:normal;min-width:0; }
html[dir=rtl] #overlay .card,html[dir=rtl] #gameMenu,html[dir=rtl] #artGallery,
html[dir=rtl] #ctxmenu,html[dir=rtl] #tipBox,html[dir=rtl] #touchControls { direction:rtl; }
html[dir=rtl] #gameMenu,html[dir=rtl] #ctxmenu,html[dir=rtl] #tipBox { text-align:right; }
html[dir=rtl] .language-row select { direction:rtl; }
html[dir=rtl] #gameMenu input[type=range] { direction:ltr; }
html[lang=ar] #gameMenu,html[lang=ar] #overlay,html[lang=ar] button,
html[lang=th] #gameMenu,html[lang=th] #overlay,html[lang=th] button { letter-spacing:normal!important;line-height:1.5; }
@media(max-width:1000px),(pointer:coarse) {
 body #commandNav button { max-width:112px;white-space:normal; }
 body #buildToggle,body #frameToggle { max-width:190px;white-space:normal; }
 body #ctxmenu .build-name { overflow-wrap:anywhere; }
}
@media(max-height:540px) {
 body #overlay .card { max-height:calc(100dvh - 16px);overflow:auto; }
 body #overlay .language-row { margin:0;gap:8px; }
 body #overlay .language-row select { min-height:32px;padding:4px 8px;font-size:12px; }
 body.android #overlay .card { gap:6px 14px;padding:10px 16px!important; }
 body.android #overlay #ovTitle { font-size:22px; }
 body.android #overlay #ovText { font-size:10px;line-height:1.3; }
 body.android #overlay .diff-btn { font-size:10px;padding:5px; }
 body.android #overlay #loadingDetail { font-size:9px;line-height:1.25; }
 body.android #overlay .start-actions button { font-size:11px; }
}
