#mysqlSaveStatus{display:none!important}
#mysqlWorldStatus{position:static!important;display:inline-flex;align-items:center;flex:0 0 auto;gap:4px;padding:3px 7px;margin-left:4px;border:1px solid #827043;border-radius:5px;background:#171b14e8;color:#dce6bc;font:11px/1.4 sans-serif;white-space:nowrap;pointer-events:none}
#hud{flex-wrap:wrap}
body.u20 #u20log{box-sizing:border-box;width:min(420px,calc(100vw - 16px));left:8px;bottom:8px;border:1px solid #9a8046;border-radius:8px;background:linear-gradient(135deg,#1f211bea,#10120fee);padding:5px;box-shadow:0 4px 18px #0008;overflow:hidden}
body.u20 #u20lines{box-sizing:border-box;height:150px;max-height:28vh;overflow-y:auto;overflow-x:hidden;background:#070a0799;border:1px solid #575039;border-radius:4px;padding:7px 8px;font:12px/1.55 sans-serif;overflow-wrap:anywhere;text-shadow:0 1px #000;scrollbar-width:thin;scrollbar-color:#b29551 #1b1d16}
body.u20 #u20ct{margin:5px 0 0!important;display:flex;gap:3px;flex-wrap:wrap;align-items:center}
body.u20 #u20ct button{min-height:25px;padding:3px 6px;border:1px solid #6f704d;border-radius:4px;background:#25392e;color:#eee3bf;font:11px sans-serif}
body.u20 #u20ct button.on{background:#705b2b;border-color:#c6a359;color:#fff3c9}
body.u20 #u20lt{order:-1;min-width:28px;font-size:19px!important;line-height:18px}
body.u20 #u20lx{margin-left:auto}
body.u20 #u20in{margin-top:5px}
body.u20 #u20in .cinrow{display:flex;gap:4px;align-items:center}
body.u20 #u20txt{min-width:0;flex:1;padding:6px;border:1px solid #6e704e;border-radius:4px;background:#090f0c;color:#f1ebcf;font:12px sans-serif}
body.u20.u20logbig #u20lines{height:280px;max-height:45vh}
body.u20.u20logoff #u20log{width:auto!important;padding:3px;background:#171e17e8}
body.u20.u20logoff #u20lines,body.u20.u20logoff #u20in,body.u20.u20logoff #u20ct button:not(#u20lt){display:none!important}
body.u20.u20logoff #u20ct{margin:0!important}
#chatBox.open{border-radius:8px!important;border:1px solid #9a8046!important;background:#111910ed!important;box-shadow:0 4px 18px #0008}
#chatLines{font-size:12px!important;line-height:1.55!important;overflow-wrap:anywhere;padding:8px!important;scrollbar-width:thin}
#chatTabs{gap:4px;flex-wrap:wrap}
#chatTabs button{border-radius:4px;padding:4px 7px}
#chatX,#chatBtn{font-size:20px!important;font-weight:bold;min-width:28px;min-height:28px}
#chatTxt{min-width:0}
@media(max-width:600px){#mysqlWorldStatus{font-size:10px;padding:2px 4px}#chatBox.open{width:calc(100vw - 16px)!important;max-height:45vh!important;left:8px!important;right:8px!important}#chatLines{max-height:24vh!important}}
body.u20 #u20lines{height:150px!important;min-height:80px!important;max-height:28vh!important;margin:0;overflow-y:auto!important}
body.u20.u20logbig #u20lines{height:280px!important;min-height:80px!important;max-height:45vh!important}
body.u20 #u20ct button[data-lt],body.u20 #u20lx{height:25px!important;padding:3px 6px!important;font-size:11px!important;border-radius:4px!important}
body.u20 #u20log::before{display:none}

/* V4.3: one chat surface on desktop and mobile; legacy log remains a data sink only. */
body.u20 #u20log,body.u20.u20logoff #u20log{display:none!important}
#chatBox.open #chatBtn{display:none!important}
#chatBox:not(.open){border:0!important;background:none!important;box-shadow:none!important}
#chatBox:not(.open) #chatPmList,#chatBox:not(.open) #chatSub{display:none!important}
#chatBox.open #chatHead{display:flex!important;align-items:flex-start;gap:5px;padding:5px}
#chatBox.open #chatTabs{display:flex;flex:1;min-width:0;flex-wrap:wrap}
#chatX{flex:none;align-self:flex-start;border-radius:4px;cursor:pointer}
#chatBox.open #chatLines{flex:1;min-height:0;max-height:none!important}
#chatBox.open #chatIn .cinrow{display:flex;gap:3px;align-items:center}
#chatBox.open #chatTxt{flex:1;min-width:0}

.pmCompose{display:flex;gap:5px;padding:7px;flex:none}.pmCompose input{min-width:0;flex:1;padding:7px;background:#111b14;color:#eee4c9;border:1px solid #857243;border-radius:4px}.pmCompose button{padding:5px 8px;background:#4a4123;color:#fff0bb;border:1px solid #a68b4d;border-radius:4px}#chatBox.open #chatTabs{pointer-events:auto!important}#chatTabs button{pointer-events:auto!important;min-height:26px}#chatBox.open #chatPmList[hidden]{display:none!important}

/* Điện thoại: giữ toàn bộ kênh chat trên một hàng, không để Hệ thống rơi xuống. */
@media (max-width:600px){
  #chatBox.open{box-sizing:border-box;width:calc(100vw - 10px)!important;left:5px!important;right:5px!important;height:min(42vh,300px)!important;max-height:42vh!important}
  #chatBox.open #chatHead{box-sizing:border-box;align-items:center!important;gap:3px!important;width:100%;padding:3px!important;overflow:hidden}
  #chatBox.open #chatTabs{display:flex!important;flex:1 1 auto!important;flex-wrap:nowrap!important;align-items:center;gap:2px!important;min-width:0;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
  #chatBox.open #chatTabs::-webkit-scrollbar{display:none}
  #chatBox.open #chatTabs button{flex:0 0 auto!important;min-width:0!important;min-height:24px!important;height:24px!important;padding:2px 5px!important;border-radius:3px!important;font-size:10px!important;line-height:18px!important;white-space:nowrap}
  #chatBox.open #chatTabs button[data-ct="sys"]{margin-left:0!important}
  #chatBox.open #chatX{flex:0 0 24px!important;align-self:center!important;min-width:24px!important;width:24px!important;min-height:24px!important;height:24px!important;padding:0!important;font-size:16px!important;line-height:22px!important}
  #chatBox.open #chatInfo{min-height:25px;padding:2px 5px!important;gap:4px!important}
  #chatBox.open #chatLines{max-height:none!important;padding:5px 6px!important;font-size:11px!important;line-height:1.4!important}
  #chatBox.open #chatIn{padding:3px!important}
  #chatBox.open #chatIn .cinrow{gap:2px!important}
  #chatBox.open #chatIn .cib{width:25px;height:25px;font-size:14px}
  #chatBox.open #chatTxt{height:25px;box-sizing:border-box;padding:3px 5px!important;font-size:11px!important}
  #chatBox.open #chatSend{height:25px!important;min-height:25px!important;padding:2px 8px!important;font-size:11px!important}
}
