#baant-app .nw-social{width:min(940px,calc(100vw - 24px));height:min(740px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:18px;overflow:hidden;box-sizing:border-box;background:#0a0c12;color:#eef3fc;border:1px solid #424754;border-top:2px solid #ff174c;border-radius:18px}
#baant-app .nw-social[open]{display:flex;flex-direction:column;gap:12px}
.nw-social-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.nw-social-head h2{margin:0;font-size:22px}.nw-social-head button{min-width:44px!important;min-height:44px!important}
.nw-social-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}.nw-social-tabs button[aria-selected=true]{background:#bd0a36!important;border-color:#ff3b68!important}
.nw-social-status{font-size:12px;line-height:1.6;margin:0;color:#eacb88;overflow-wrap:anywhere;flex-shrink:0}
.nw-social-body{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.nw-social-body section[hidden]{display:none!important}.nw-social-body button{min-height:44px!important;touch-action:manipulation;font-size:13px!important;white-space:normal!important}
.nw-social-body h3{font-size:16px!important}.nw-room-directory{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.nw-room-card{background:#141822;border:1px solid #323949;border-radius:12px;padding:12px;min-width:0}.nw-room-card img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:8px}.nw-room-card p,.nw-room-card small{font-size:12px;display:block;line-height:1.6}.nw-room-card button{margin:6px 5px 0 0}
.nw-global-log{height:clamp(120px,36dvh,320px);overflow:auto;overscroll-behavior:contain;background:#13192470;padding:10px;border-radius:12px;margin:10px 0;scrollbar-width:thin}.nw-global-log p{margin:0 0 8px;display:flex;gap:8px;align-items:baseline;overflow-wrap:anywhere}.nw-global-log button{background:transparent!important;border:0!important;padding:4px!important;color:#f2bf62!important;flex-shrink:0;max-width:40%;text-align:left}.nw-global-log span{font-size:14px;line-height:1.65;min-width:0}.nw-global-quick{display:flex;gap:6px;flex-wrap:wrap}.nw-global-form{display:flex;gap:8px;margin-top:12px;position:sticky;bottom:0;background:#0a0c12;padding:6px 0}.nw-global-form input{min-width:0;flex:1;font:16px system-ui;padding:10px;border:1px solid #485265;border-radius:8px;color:#fff;background:#161d2a}.nw-global-form button{min-width:60px}.nw-hub-open{margin-bottom:16px}
.nw-watch-box canvas{display:block;width:100%;height:clamp(180px,42dvh,460px);background:#080c14;border-radius:12px}.nw-watch-names{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}.nw-friend{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px;border-bottom:1px solid #343b46}.nw-profile-emblem{font-size:68px;color:#ffd366;text-shadow:0 0 28px #f8972344;text-align:center}.nw-social-body section>h2,.nw-social-body section>.nw-profile-emblem{text-align:center}.nw-social-body section>p{font-size:14px;line-height:1.7}.nw-social-body section>button{margin:4px}.nw-vip-confirm{border:1px solid #d9a54b;border-radius:12px;padding:14px;margin-top:12px}
.nw-season-banner{display:flex;gap:14px;align-items:center;justify-content:center;background:linear-gradient(110deg,#1e1015,#170e22,#35131a);color:#ffd38c;padding:9px 16px;border-bottom:1px solid #8f432a;font-size:13px}.nw-season-banner[hidden]{display:none}.nw-season-banner>span{font-size:25px;color:#ff862e}.nw-season-banner small{color:#e2b5cd;font-size:11px}.nw-season-map{outline:1px solid #da853a55;outline-offset:-1px}.nw-halloween .nw-map-card{border-color:#a55d3e55}
#nw-join-requests{display:flex;flex-wrap:wrap;gap:6px}#nw-operations{max-width:1200px;background:#fff;padding:18px;border-radius:12px}#nw-operations input,#nw-operations select,#nw-operations button{min-height:40px;margin:4px;max-width:100%;box-sizing:border-box}#nw-operations .ops-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}#nw-operations .ops-list{max-height:480px;overflow:auto;border:1px solid #ccd2dc;padding:8px}#nw-operations article{border-bottom:1px solid #dce1e8;padding:10px}#nw-operations .ops-status{padding:12px;background:#f3f0df;white-space:pre-wrap}#nw-operations pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}#nw-operations label{display:block;margin:8px 0}#nw-operations fieldset{padding:14px;border:1px solid #d3d9e0;margin-top:16px}#nw-operations input[type=text],#nw-operations input[type=number]{width:min(100%,400px)}
@media(max-width:600px){#baant-app .nw-social{padding:12px;gap:8px}.nw-social-head h2{font-size:19px}.nw-social-tabs button{font-size:12px!important;padding:8px 3px!important;min-height:44px}.nw-room-directory{grid-template-columns:1fr}.nw-season-banner{justify-content:flex-start;gap:8px}.nw-season-banner small{display:none}.nw-global-log span{font-size:13px}#nw-operations .ops-grid{grid-template-columns:1fr}}
@media(max-height:500px) and (orientation:landscape){#baant-app .nw-social[open]{gap:6px;padding:10px}.nw-social-head h2{font-size:17px}.nw-social-tabs{position:absolute;top:10px;left:28%;right:66px}.nw-social-head{min-height:44px}.nw-room-directory{grid-template-columns:repeat(3,minmax(0,1fr))}.nw-global-log{height:100px}.nw-global-quick button{font-size:11px!important}.nw-social-status{font-size:11px}.nw-watch-box canvas{height:180px}}
@media(prefers-reduced-motion:reduce){.nw-season-banner *{animation:none!important}}

.nw-gm-notice{position:absolute;top:25%;left:25%;right:25%;display:flex;align-items:center;gap:8px;background:#29121cef;border:1px solid #ff3763;border-radius:10px;padding:10px;color:#fff;font-size:13px;z-index:40;pointer-events:auto}.nw-gm-notice button{min-width:44px;min-height:44px}.nw-gm-notice span{flex:1;overflow-wrap:anywhere}

#baant-app .nw-social:has([data-tab="vip"][aria-selected="true"]){height:auto;min-height:min(380px,calc(100dvh - 24px))}.nw-social-body section>strong{display:block;margin:20px 0;padding:12px;border:1px solid #827047;border-radius:10px;color:#ffe5a3}

.nw-slot-picker{border:1px solid #3d4554;border-radius:10px;padding:10px;margin:12px 0}.nw-slot-picker>div{display:flex;flex-wrap:wrap;gap:6px}.nw-slot-picker button[aria-pressed=true]{background:#bd0a36!important;border-color:#ff3b68!important}.nw-slot-picker legend{font-size:13px;color:#f0d9a9}

.nw-watch-names{display:block}.nw-watch-names summary{min-height:44px;cursor:pointer;line-height:44px;color:#e6d4a6}.nw-watch-names button{margin:3px}.nw-watch-box canvas{height:clamp(220px,46dvh,460px)}
/* Room choices keep their hit areas and position while live state updates. */
#nw-create-country{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:10px}
#nw-create-country[hidden]{display:none}
#nw-create-country p{grid-column:1/-1;margin:0 0 4px;font-size:12px;line-height:1.5}
#nw-create-country button{width:100%;min-height:44px;padding:7px 5px;font-size:12px}
#nw-create-mode,#nw-create-slots,#nw-room-slots,#nw-room-teams{display:flex;flex-wrap:wrap;gap:6px}
#nw-room-teams[hidden]{display:none}#nw-room-teams>b{flex:1 0 100%;font-size:13px}
#nw-lobby fieldset{min-width:0;margin:12px 0;padding:10px;border:1px solid #39414c;border-radius:12px}
#nw-lobby legend{font-size:12px;color:#c6bfa7;padding:0 4px}
@media(max-height:500px) and (min-width:600px){#nw-lobby-entry{display:grid;grid-template-columns:1.15fr 1fr;gap:8px 16px;align-items:start}#nw-lobby-entry>fieldset:first-child{grid-row:1/4}#nw-lobby-entry>fieldset{margin:0}#nw-join-form{grid-column:2}#nw-lobby-entry>button{align-self:end}}
#nw-lobby #nw-members{max-height:170px;overflow:auto;overscroll-behavior:contain}#nw-pvp-rule{font-size:12px;line-height:1.6;color:#b5c6d7;margin:10px 0}
#nw-lobby .nw-room-actions{position:sticky;bottom:-1px;padding:10px 0 0;background:#0e1319;z-index:2;display:grid;grid-template-columns:1fr 1fr}
#nw-lobby .nw-room-actions .nw-link{grid-column:1/-1;min-height:32px}
#nw-lobby .nw-room-actions button{min-width:0;font-size:12px;padding:8px}
#nw-lobby-status{font-size:12px;line-height:1.5;margin:8px 0}#nw-lobby .nw-muted{font-size:11px;line-height:1.5;margin:8px 0}
@media(max-height:500px) and (min-width:600px){#nw-lobby-room:not([hidden]){display:grid;grid-template-columns:1fr 1fr;gap:6px 16px}#nw-lobby #nw-members{grid-column:1;grid-row:3/7;max-height:130px}#nw-lobby .nw-room-heading{grid-column:1}#nw-lobby .nw-capacity{grid-column:1;margin:0}#nw-lobby #nw-room-teams{grid-column:2;grid-row:1/3}#nw-lobby #nw-lobby-room>fieldset,#nw-lobby #nw-lobby-room>.nw-muted,#nw-lobby #nw-lobby-room>#nw-coop-options,#nw-lobby #nw-pvp-rule{grid-column:2;margin:0}#nw-lobby .nw-room-actions{position:static;grid-column:1/-1;display:flex;justify-content:flex-end}#nw-lobby [data-do="lobby-chat"]{grid-column:1;grid-row:7;justify-self:start}#nw-lobby .nw-room-actions .nw-link{min-height:44px}}
.nw-ai-buttons{display:flex;gap:6px;flex-wrap:wrap}#nw-ai-options small{display:block;font-size:11px;color:#b5c6d7;margin-top:6px;line-height:1.5}
/* A lobby chat is its own bounded sheet; scrolling the lobby must not move its close button offscreen. */
.baant #nw-lobby:has(>#nw-chat:not([hidden])){height:min(560px,calc(100dvh - 24px));overflow:hidden!important}
.baant #nw-lobby:has(>#nw-chat:not([hidden]))>:not(#nw-chat){display:none!important}
.baant #nw-lobby>#nw-chat:not([hidden]){position:absolute!important;inset:8px!important;width:calc(100% - 16px)!important;height:calc(100% - 16px)!important;max-height:calc(100% - 16px)!important;margin:0!important;transform:none!important;display:flex!important;flex-direction:column;gap:5px;padding:10px!important;overflow:hidden!important;box-sizing:border-box}
.baant #nw-lobby>#nw-chat .nw-dialog-head{flex:none;min-height:44px;margin:0}.baant #nw-lobby>#nw-chat .nw-chat-tabs{flex:none;margin:0}.baant #nw-lobby>#nw-chat #nw-chat-status{font-size:10px;line-height:1.3;margin:0;flex:none}
.baant #nw-lobby>#nw-chat .nw-chat-text-pane{display:flex;flex-direction:column;flex:1;min-height:0;overflow:auto}.baant #nw-lobby>#nw-chat .nw-chat-text-pane[hidden]{display:none!important}
.baant #nw-lobby>#nw-chat #nw-chat-log{display:block!important;flex:1;min-height:35px;height:auto;overflow:auto}.baant #nw-lobby>#nw-chat :is(#nw-quick-chat,#nw-chat-form,.nw-chat-footer,.nw-ai-option){flex-shrink:0;margin:0}
.baant #nw-lobby>#nw-chat #nw-chat-text{font-size:16px;height:44px}.baant #nw-lobby>#nw-chat .nw-quick-chat button{min-height:36px}.baant #nw-lobby>#nw-chat .nw-chat-footer{font-size:10px;min-height:20px}.baant #nw-lobby>#nw-chat #nw-chat-report{min-height:24px;font-size:10px}
.baant #nw-chat .nw-ai-option{display:flex!important;align-items:center;gap:7px;min-height:24px;padding:2px 0;font-size:10px;line-height:1.35;margin:0}.baant #nw-chat .nw-ai-option[hidden]{display:none!important}.baant #nw-chat .nw-ai-option input{display:block;width:18px!important;height:18px;min-height:18px;padding:0;margin:0;flex:0 0 18px;accent-color:#e8003b}
.baant #nw-lobby>#nw-chat .nw-chat-text-pane{overflow:hidden}.baant #nw-lobby>#nw-chat #nw-chat-log{min-height:24px}.baant #nw-lobby>#nw-chat .nw-chat-footer{flex:none}
@media(max-height:500px) and (min-width:600px){#nw-lobby-room>#nw-ai-options{grid-column:1!important;grid-row:auto!important}}
