/* UI9: bounded panels, clear text and touch targets, without changing game rules. */
.baant{font-synthesis:none;text-rendering:optimizeLegibility}
.baant :is(p,small,label,button,a,span,b,strong,h2,h3){text-shadow:none;letter-spacing:normal}
.baant :is(button,.nw-btn){min-height:44px;line-height:1.35;white-space:normal;overflow-wrap:anywhere;font-size:13px;padding:8px 12px;box-sizing:border-box}
.baant :is(input,select,textarea){font-size:16px;line-height:1.5;min-width:0;max-width:100%;box-sizing:border-box}
.baant .nw-language{flex:none;min-width:67px;padding:8px;background:#171b22;border:1px solid #4d5663;border-radius:7px;color:#fff;font-weight:700}
.baant .nw-language span{color:#9ea8b7;font-weight:400}
.baant .nw-header{gap:10px}.baant .nw-header nav{gap:16px;min-width:0}.baant .nw-header .nw-brand{margin-right:auto}
.baant .nw-dialog{max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px);padding:16px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#606b7b #101318}
.baant .nw-dialog-head{gap:12px;align-items:center}.baant .nw-dialog-head h2{font-size:20px;line-height:1.4;margin:0}.baant .nw-dialog-head button{flex:none;min-width:44px;padding:8px}
.baant .nw-account-dialog{width:440px}.baant .nw-account-dialog>p{font-size:12px;line-height:1.6;margin:6px 0 12px;color:#bac5d2}
.baant .nw-auth-grid{display:block}.baant .nw-auth-card{padding:12px;border:0;border-radius:8px;background:#171c24;display:grid;gap:10px}.baant .nw-auth-card[hidden]{display:none!important}
.baant .nw-auth-card h3{display:none}.baant .nw-auth-card p{margin:0;font-size:11px;line-height:1.55}.baant .nw-auth-card .nw-btn{width:100%;min-height:44px;font-size:14px;padding:10px}.baant .nw-auth-card .nw-link{font-size:12px;min-height:44px;display:flex;align-items:center}
.baant .nw-auth-card input:not([type=checkbox]):not([type=hidden]){min-height:44px;padding:10px}.baant .nw-auth-card label{font-size:12px}.baant .nw-consent{display:flex;align-items:flex-start;gap:9px;line-height:1.6;font-size:12px;margin:4px 0}.baant .nw-consent input{flex:none;width:20px;height:20px;min-height:20px;margin:2px 0}
.baant .nw-account-tabs,.baant .nw-chat-tabs{display:flex;gap:5px;background:#080c11;padding:4px;border:1px solid #3c4654;border-radius:8px;margin:8px 0 12px}.baant :is(.nw-account-tabs,.nw-chat-tabs) button{flex:1;border:0;border-radius:5px;color:#c1cad6;background:transparent}.baant :is(.nw-account-tabs,.nw-chat-tabs) [aria-selected=true]{background:#e30d37;color:white;box-shadow:0 2px 8px #0005}
.baant .nw-chat{position:absolute!important;inset:64px 12px auto auto!important;width:min(380px,calc(100% - 24px))!important;height:min(410px,calc(100dvh - 82px))!important;max-height:calc(100dvh - 82px)!important;box-sizing:border-box;padding:10px!important;display:flex;flex-direction:column;gap:5px;overflow:hidden!important;border:1px solid #586273;border-top:2px solid #ff244e;border-radius:10px;background:#0c111aee;backdrop-filter:blur(16px);z-index:12;box-shadow:0 12px 42px #0009}
.baant .nw-chat .nw-dialog-head{position:static;padding:0;margin:0;background:transparent;min-height:44px;flex:none}.baant .nw-chat .nw-dialog-head b{font-size:15px}.baant .nw-chat .nw-dialog-head button{border:1px solid #4f5c6e;border-radius:6px;background:#202a38;color:white}.baant .nw-chat-tabs{margin:0;flex:none;padding:2px}.baant .nw-chat-tabs button{font-size:12px;padding:6px;min-height:38px}
.baant #nw-chat-status{font-size:10px;line-height:1.4;margin:0;flex:none;color:#b1bdce;overflow-wrap:anywhere}.baant .nw-chat-text-pane{display:flex;flex-direction:column;gap:5px;min-height:0;flex:1;overflow:hidden}.baant .nw-chat-log{height:auto!important;min-height:42px;flex:1;overflow-y:auto;padding:7px;background:#05080d99;border-radius:5px;scrollbar-width:thin}.baant .nw-chat-log p{font-size:12px;line-height:1.5;margin:4px 0;overflow-wrap:anywhere}.baant .nw-chat-log button{min-height:32px;font-size:10px;padding:4px 6px}.baant .nw-quick-chat{display:flex;overflow-x:auto;flex-wrap:nowrap;gap:5px;padding-bottom:2px;flex:none;scrollbar-width:thin}.baant .nw-quick-chat button{white-space:nowrap;flex:none;font-size:11px;min-height:38px;padding:6px 9px;background:#222c39;color:white;border:1px solid #4d5b70;border-radius:6px}.baant #nw-chat-form{display:flex;gap:5px;flex:none}.baant #nw-chat-form input{width:0;flex:1;min-height:40px;padding:7px}.baant #nw-chat-form button{min-height:40px;padding:7px 10px;background:#e30d37;color:#fff;border:0;border-radius:6px}.baant .nw-chat-text-pane>.nw-link{min-height:32px;font-size:10px;padding:3px;align-self:flex-end}.baant .nw-voice,.baant .nw-chat-style{margin:0;padding:10px;min-height:0;overflow-y:auto;font-size:12px;border-color:#39485d;background:#141e2b}.baant .nw-voice p{font-size:11px;line-height:1.5;margin:6px 0}.baant .nw-voice small{font-size:10px}.baant .nw-voice-actions{gap:6px}.baant .nw-voice-actions button{font-size:12px;min-height:44px;padding:7px}.baant .nw-chat-style{display:grid;gap:8px}.baant .nw-chat-style select{min-height:40px}.baant .nw-chat-style label{margin:0}
.baant #nw-lobby>.nw-chat{inset:60px 10px 10px!important;width:calc(100% - 20px)!important;height:auto!important;max-height:calc(100% - 70px)!important}
.baant .nw-tactics{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:12px 0}.baant .nw-tactics article{border:1px solid #394655;border-radius:7px;padding:10px;background:#0d121a;min-width:0}.baant .nw-tactics b{font-size:12px;color:#ffd578}.baant .nw-tactics p{font-size:12px;line-height:1.6;margin:5px 0 0;color:#c8d2df}.baant .nw-tactics details{grid-column:1/-1;font-size:12px}.baant .nw-tactics summary{min-height:44px}.baant .nw-tactics details p{padding:10px;background:#171e28;border-radius:5px}
.baant .nw-profile-avatar{width:52px;height:52px}.baant #nw-profile-photo{width:52px;height:52px;object-fit:cover;object-position:center 28%}.baant .nw-account h2{line-height:1.45;font-size:18px}.baant .nw-account p{line-height:1.55;font-size:12px}.baant .nw-wallet span{gap:5px;font-size:11px}.baant .nw-wallet b{font-size:17px}
.baant .nw-action-pad #nw-jump{position:absolute;right:150px;bottom:60px;width:58px;height:58px;border:1px solid #9fc7f7;border-radius:50%;background:#102a43d9;box-shadow:0 0 12px #409fff26;font-size:10px;padding:3px}.baant #nw-jump b{font-size:24px}.baant #nw-jump span{display:block}.baant .nw-action-pad button{overflow-wrap:normal}.baant .nw-equipment-bar{max-width:40vw}.baant .nw-equipment-bar button{min-width:44px}
@media(max-width:760px){.baant .nw-header{gap:6px}.baant .nw-header .nw-brand{min-width:80px}.baant .nw-reference-logo{transform:scale(.85);transform-origin:left center;width:89px}.baant .nw-header .nw-login{font-size:11px;padding:6px 8px}.baant .nw-language{font-size:12px;min-width:61px}.baant .nw-header .nw-settings-btn{width:40px;min-width:40px;padding:7px}.baant .nw-tactics{grid-template-columns:1fr}.baant .nw-dialog{padding:12px;max-height:calc(100dvh - 16px)}.baant .nw-dialog-head h2{font-size:18px}.baant .nw-auth-card{padding:10px}.baant .nw-wallet{grid-template-columns:1fr 1fr}.baant .nw-wallet-xp{display:none!important}}
@media(max-height:500px) and (orientation:landscape){.baant .nw-chat{top:52px!important;height:calc(100dvh - 64px)!important;max-height:calc(100dvh - 64px)!important;width:340px!important;gap:3px;padding:7px!important}.baant .nw-chat .nw-dialog-head{min-height:34px}.baant .nw-chat .nw-dialog-head button{min-height:34px;font-size:11px}.baant .nw-chat-tabs button{min-height:34px}.baant .nw-voice-actions button{min-height:40px}.baant #nw-chat-status{font-size:9px}.baant .nw-chat-text-pane>.nw-link{min-height:24px}.baant .nw-action-pad #nw-jump{right:135px;bottom:55px;width:48px;height:48px}.baant .nw-game-hint{display:none}.baant .nw-account-dialog{max-height:calc(100dvh - 16px)}}
@media(prefers-reduced-motion:reduce){.baant *{scroll-behavior:auto!important}.baant .nw-chat-log.is-glowing b{animation:none!important}}

.baant .nw-mobile-dock :is(button,a){padding:4px;font-size:10px;white-space:nowrap;overflow-wrap:normal}.baant .nw-mobile-dock span{white-space:nowrap}
.baant .nw-install-dialog{width:440px}.baant .nw-install-dialog p{font-size:13px;line-height:1.7}.baant .nw-install{border-color:#79869a}

.baant .nw-hero-bottom{flex-wrap:wrap}.baant .nw-install-home{background:#d80d32;color:#fff;border:1px solid #ff5071;font-size:11px;min-height:44px;padding:6px 9px}

.baant .nw-profile-avatar{padding:0;width:54px;height:54px;min-width:54px;overflow:visible}.baant #nw-profile-photo{width:52px;height:52px;max-width:none;object-fit:cover;display:block}
.baant .nw-hero-bottom{height:auto;min-height:52px}.baant .nw-hero .nw-art-label{bottom:58px}
@media(max-width:760px){.baant .nw-hero-bottom{min-height:78px;justify-content:center;align-content:center;gap:3px 9px}.baant .nw-siege-layout .nw-hero{min-height:555px}.baant .nw-hero-copy{bottom:114px}.baant .nw-hero .nw-art-label{bottom:85px}}

.baant .nw-team-hud.nw-large-team{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:220px;gap:3px;max-height:115px;overflow:auto}.baant .nw-large-team>div{min-width:0;padding:2px 4px}.baant .nw-large-team b{font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}.baant .nw-large-team span{font-size:9px}.baant .nw-large-team progress{height:3px}.baant #nw-members{max-height:230px;overflow-y:auto;scrollbar-width:thin}.baant .nw-capacity{color:#ffd277;font-size:13px;font-weight:700}
.baant .nw-live-counts{grid-template-columns:repeat(4,minmax(0,1fr))}.baant .nw-live-counts>span{min-width:0;overflow-wrap:anywhere}@media(max-width:1000px){.baant .nw-live-counts{grid-template-columns:repeat(2,minmax(0,1fr))}}
.baant .nw-equipment-bar button{padding:4px 2px;overflow-wrap:normal;flex-shrink:0}.baant .nw-equipment-bar button span{white-space:nowrap}@media(max-height:500px) and (orientation:landscape){.baant .nw-equipment-bar button{width:56px}}

/* Test 8: touch-safe game panels and deterministic chat states. */
.baant #nw-chat [hidden]{display:none!important}
.baant #nw-chat{inset:58px max(10px,env(safe-area-inset-right)) auto auto!important;width:min(390px,calc(100% - 20px))!important;height:min(490px,calc(100dvh - 70px))!important;max-height:calc(100dvh - 70px)!important;gap:4px;padding:8px!important;background:#0b0e14f5;touch-action:pan-y}
.baant #nw-chat :is(button,input,select){touch-action:manipulation;min-height:44px}
.baant #nw-chat .nw-dialog-head{min-height:44px;flex:none}
.baant #nw-chat-close{width:44px;height:44px;padding:4px;font-size:20px}
.baant #nw-chat .nw-chat-tabs button{min-height:44px}
.baant #nw-chat .nw-chat-text-pane{gap:4px}
.baant #nw-chat .nw-chat-log{min-height:48px;touch-action:pan-y;overscroll-behavior:contain}
.baant #nw-chat .nw-chat-empty{border:0;background:transparent;font-size:12px;color:#aebdcd;line-height:1.6;padding:4px}
.baant #nw-chat .nw-quick-chat{margin:0;scrollbar-width:none;touch-action:pan-x;padding:0}
.baant #nw-chat .nw-quick-chat button{font-size:11px;min-height:44px;touch-action:pan-x}
.baant #nw-chat-form{margin:0}.baant #nw-chat-form input{font-size:16px;min-height:44px}.baant #nw-chat-send{min-width:50px}
.baant .nw-chat-footer{display:flex;align-items:center;gap:8px;justify-content:space-between;min-height:30px;flex:none;font-size:10px;line-height:1.4}
.baant #nw-chat .nw-chat-footer button{font-size:10px;padding:4px 7px;min-height:32px;white-space:nowrap;flex:none}
.baant #nw-chat-online{border:1px solid #744354;border-radius:5px;color:#fff;background:#541528}
.baant #nw-chat-feedback{color:#92e3be}
.baant #nw-chat-sample b{color:var(--name-color,#8bf1d0)}.baant #nw-chat-sample.is-glowing b{animation:nw-nameglow 3s ease-in-out infinite alternate}
.baant #nw-chat :is(.nw-voice,.nw-chat-style){flex:1;min-height:0;overscroll-behavior:contain;touch-action:pan-y}
.baant #nw-lobby>#nw-chat{inset:56px 8px 8px!important;width:calc(100% - 16px)!important;height:auto!important;max-height:calc(100% - 64px)!important}
.baant #nw-toast{position:fixed;z-index:100;bottom:max(16px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);max-width:min(500px,calc(100% - 24px));pointer-events:none;padding:10px 14px;border:1px solid #a84b60;background:#11151af5;color:white;border-radius:8px;font-size:13px}
.baant .nw-hud-buttons button{width:44px;height:44px;min-height:44px;min-width:44px;touch-action:manipulation}
.baant .nw-dialog{touch-action:pan-y}.baant .nw-dialog :is(button,select,input){touch-action:manipulation}
.baant .nw-arena button:focus-visible{outline-offset:1px}.baant .nw-arena .pressed{filter:brightness(1.3)}
@media(max-height:500px) and (orientation:landscape){
 .baant #nw-chat{top:8px!important;right:max(8px,env(safe-area-inset-right))!important;height:calc(100dvh - 16px)!important;max-height:calc(100dvh - 16px)!important;width:360px!important}
 .baant #nw-chat-status{font-size:10px;line-height:1.35}.baant #nw-chat .nw-chat-tabs{margin:0}.baant #nw-chat .nw-chat-tabs button{padding:3px;font-size:11px}
 .baant .nw-hud-buttons{gap:3px;padding:3px}.baant .nw-hud-top{gap:6px}.baant .nw-hud-top>div:first-child{max-width:25%;font-size:10px}.baant .nw-core{min-width:125px;max-width:170px}
}
@media(max-width:700px) and (orientation:landscape){
 .baant .nw-equipment-bar{display:none}.baant .nw-hud-top>div:first-child{max-width:155px}.baant .nw-core{position:absolute;top:65px;left:0;width:150px}.baant .nw-team-hud{top:122px}.baant .nw-large-team{max-height:76px!important;width:180px!important}
 .baant .nw-team-communication{top:105px}.baant .nw-camera-pad{top:57px}
}
@media(prefers-reduced-motion:reduce){.baant #nw-chat-sample b{animation:none!important}}
.baant[data-motion=reduce] #nw-chat-sample b{animation:none!important}

.baant .nw-nameplates{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:2}
.baant .nw-nameplate{position:absolute;top:0;left:0;width:106px;display:grid;grid-template-columns:23px 1fr;gap:2px 4px;align-items:center;padding:4px 6px;background:#090d16dc;border:1px solid #5b6b7d90;border-radius:7px;box-shadow:0 3px 10px #0006;color:#fff;will-change:transform}
.baant .nw-nameplate b{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}.baant .nw-nameplate small{grid-column:1/-1;font-size:8px;line-height:1.2;color:#a8d9c7;text-align:center}
.baant .nw-head-badge{grid-row:span 2;width:23px;height:23px;color:var(--badge-color)}.baant .nw-head-badge svg{width:100%;height:100%;fill:#0c1321;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round;stroke-linecap:round}
.baant .nw-head-health{display:block;height:3px;border-radius:3px;background:#53232f;overflow:hidden}.baant .nw-head-health i{display:block;height:100%;background:#66e4b3}.baant .nw-nameplate.is-self{border-color:var(--badge-color)}.baant .nw-nameplate.is-down{border-color:#ff4767}.baant .nw-nameplate.is-down small{color:#ff7189}
.baant .nw-badge-options{padding:0 10px;border:1px solid #424653;border-radius:8px;margin-bottom:8px;background:#10141d}.baant .nw-badge-options summary{font-size:13px;min-height:44px}.baant .nw-badge-options label{font-size:12px;margin:0}.baant .nw-badge-options p,.baant .nw-badge-options small{font-size:11px;line-height:1.6;margin:6px 0;display:block}
.baant .nw-badge-preview{display:grid;grid-template-columns:40px 1fr;align-items:center;gap:2px 9px;padding:10px;margin-top:10px;border:1px solid var(--badge-color);border-radius:8px;background:linear-gradient(120deg,#101723,#05070b);color:white}.baant .nw-badge-preview span{grid-row:span 2;color:var(--badge-color)}.baant .nw-badge-preview svg{width:36px;height:36px;fill:#101729;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round;stroke-linecap:round}.baant .nw-badge-preview b{font-size:14px}.baant .nw-badge-preview small{margin:0;color:var(--badge-color)}
@media(max-height:350px) and (orientation:landscape){.baant #nw-chat .nw-chat-log{min-height:20px!important}.baant #nw-chat .nw-chat-footer{min-height:28px}.baant #nw-chat .nw-chat-footer button{min-height:28px;padding:2px 6px}}
