/* Language controls stay in document flow; never overlay gameplay or modal actions. */
.topbar{height:auto;min-height:62px;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px 18px}
.brand{min-width:0;align-self:center;text-align:left}.brand>span:last-child{min-width:0}.brand-name,.brand-en{overflow-wrap:anywhere;white-space:normal}
.header-tools{display:grid;justify-items:end;gap:6px;min-width:0}.top-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;min-width:0}.top-actions .edition{align-self:center}
.locale-toggle{display:flex;justify-content:flex-end;align-items:center;gap:3px;pointer-events:auto;flex-shrink:0;font:500 12px/1.2 system-ui,sans-serif}
.locale-toggle button{min-width:44px;min-height:36px;padding:7px 10px;border:1px solid #b99b62;border-radius:7px;background:#10243b;color:#fff0ce;font:inherit;letter-spacing:0}
.locale-toggle button[aria-pressed=true]{background:#e2bd79;color:#112135;border-color:#ffe5a8;font-weight:700}.locale-toggle button:focus-visible{outline:3px solid #fff0a9;outline-offset:3px}
.modal-locale{display:flex;justify-content:flex-end;position:relative;z-index:2;margin-bottom:10px}.modal-title{gap:12px}.modal-title h2{overflow-wrap:anywhere}.modal-title button{min-width:40px;min-height:40px;flex-shrink:0}
html[lang=en] .brand-name{letter-spacing:1px;font-size:18px}html[lang=en] .brand-en{letter-spacing:1px}
html[lang=en] .menu h1{font-size:clamp(30px,5vw,60px);letter-spacing:2px;text-indent:0;overflow-wrap:normal;line-height:1.2}
html[lang=en] .menu .eyebrow{letter-spacing:2px}html[lang=en] .menu-caption{letter-spacing:1px}html[lang=en] .menu-buttons .ornate{letter-spacing:1px}
html[lang=en] .formation-name,html[lang=en] .section-line h2,html[lang=en] .opponent-label b,html[lang=en] .result-hero h1,html[lang=en] .outcome-title{letter-spacing:.3px}
html[lang=en] .formation-main{min-width:0}html[lang=en] .formation-name{font-size:13px}html[lang=en] .formation-name .tiny{display:inline-block}html[lang=en] .formation-desc{line-height:1.35}
html[lang=en] .formation-button{flex-shrink:0;max-width:125px;white-space:normal}html[lang=en] .round-label{line-height:1.35}
html[lang=en] .coach{line-height:1.35;gap:8px;border-radius:12px}html[lang=en] .coach strong{min-width:60px;white-space:normal}html[lang=en] .coach span{min-width:0}html[lang=en] .coach button{flex-shrink:0}
html[lang=en] .section-line{flex-wrap:wrap;row-gap:3px}html[lang=en] .selection-bar{white-space:normal;flex-wrap:wrap}html[lang=en] .suit-trait{letter-spacing:0}
html[lang=en] .card-name{font-size:10px;letter-spacing:0;overflow-wrap:anywhere}html[lang=en] .bottom-status{gap:8px;flex-wrap:wrap;white-space:normal}
html[lang=en] .combat-head{letter-spacing:.3px}html[lang=en] .combat-reason,html[lang=en] .combat-index{letter-spacing:0;line-height:1.35}html[lang=en] .combat-message{line-height:1.4}
html[lang=en] .battle-outcome p{line-height:1.4}html[lang=en] .result-meta{white-space:normal}.result-actions{flex-wrap:wrap}
@media(max-width:700px){
 .topbar{grid-template-columns:minmax(0,1fr) auto;padding:10px 12px;gap:8px}.header-tools{display:contents}.header-tools>.locale-toggle{grid-column:2;grid-row:1;align-self:center}.top-actions{grid-column:1/-1;grid-row:2;justify-content:flex-end;gap:5px}.brand{grid-column:1;grid-row:1}.top-actions button{min-height:36px;padding:7px 10px;border-radius:9px}.brand-name{font-size:15px!important}.brand-en{font-size:7px;line-height:1.5}.locale-toggle button{min-height:40px}
 .game-layout{height:calc(100dvh - 112px)}
 html[lang=en] .game-layout{min-height:900px}html[lang=en] .coach{left:2%;right:2%;top:33%;font-size:10px;min-height:0;padding:8px;max-height:none}html[lang=en] .board-section{top:48%}
 html[lang=en] .board-section>.section-line .small:last-child{letter-spacing:0;font-size:8px}html[lang=en] .formation-ribbon{top:calc(100% + 28px);align-items:flex-start}html[lang=en] .formation-desc{font-size:10px;max-width:none}html[lang=en] .formation-button{font-size:10px;max-width:100px;padding:7px}
 html[lang=en] .suit-traits{top:calc(100% + 110px);left:0;right:0;gap:3px;flex-wrap:wrap}html[lang=en] .suit-trait{font-size:9px;gap:3px}html[lang=en] .bottom-status{font-size:8px;line-height:1.4}
 html[lang=en] .combat-center{height:auto;min-height:120px;top:25%;gap:4px}html[lang=en] .combat-message,html[lang=en] .combat-reason{font-size:10px}html[lang=en] .battle-outcome{top:25%;padding:10px 4px}html[lang=en] .battle-outcome p{font-size:10px}
 html[lang=en] .combat-controls{gap:4px}html[lang=en] .combat-controls .ghost{min-height:36px;font-size:10px;padding:6px 9px}html[lang=en] .combat-progress{bottom:12%}
 html[lang=en] .menu h1{font-size:clamp(29px,8vw,46px)}html[lang=en] .menu-foot{font-size:10px}.menu-content{max-width:100%}
}
@media(max-width:360px){.topbar{padding:8px}.brand-mark{display:none}.brand-name{font-size:14px!important}.locale-toggle button{min-width:40px;padding:6px}.top-actions{gap:4px}.top-actions button{font-size:10px;padding:6px 8px}.modal{padding:18px 12px}.result-stats{gap:10px}}
