/* ======================= GIAO DIEN KIEU VO LAM 2.0 (man hinh ngang rong >= 900px) =======================
   San dau toan man hinh; cac the (Nhan vat, Vo cong, Hanh trang...) thanh cua so noi; menu bieu tuong goc duoi phai,
   cot hoat dong ben phai, nut tron + ban do nho goc phai tren, nhat ky trong suot goc duoi trai. */
body.u20 #app{display:block!important;width:100vw!important;height:100vh!important;max-width:none!important;transform:none!important;margin:0!important}
body.u20 #top,body.u20 #tabs,body.u20 #mainSk,body.u20 #compactBtn{display:none!important}
body.u20 #battle{position:fixed!important;inset:0!important;flex:none!important;height:auto!important;width:auto!important}
/* thanh trang thai tren cung */
body.u20 #hud{left:190px!important;right:340px!important;transform:none!important;width:auto!important;top:0!important;padding:3px 8px!important;
  background:linear-gradient(#3b3424,#1c170e)!important;border:1px solid #7d6a3c!important;border-top:0!important;box-shadow:0 2px 6px #000a!important;display:flex!important;gap:4px!important;align-items:center}
body.u20 #hud .bar{flex:1 1 0;margin:0!important}
body.u20 #topCtl{top:auto!important;bottom:64px!important;right:8px!important;left:auto!important}
/* cua so noi = khung the cu */
body.u20 #panel{position:fixed!important;left:50%;top:64px;transform:translateX(-50%);width:min(560px,46vw);max-height:calc(100vh - 160px);z-index:30;display:none!important;
  border:2px solid #8c7440!important;box-shadow:0 0 18px #000!important;background:rgba(18,18,16,.95)!important;overflow:auto!important}
body.u20.u20win #panel{display:block!important}
body.u20 #panel::before{display:none!important}
#u20wh{position:sticky;top:0;z-index:2;display:flex;align-items:center;height:26px;background:linear-gradient(#4a3f26,#231c0e);border-bottom:1px solid #8c7440;color:#ffe9b0;font-weight:600;justify-content:center}
#u20wh button{position:absolute;right:4px;top:2px;width:22px;height:20px;border:1px solid #8c7440;background:#2a1f10;color:#ffd98a;cursor:var(--cur-hot);line-height:16px}
#u20wh{cursor:move;user-select:none}
/* goc phai tren: nut tron + tien */
#u20r{position:fixed;top:4px;z-index:8;display:flex;gap:6px}
.u20rb{width:46px;height:46px;border-radius:50%;background:radial-gradient(#6b5530,#2a1f0e);border:2px solid #b9974f;color:#ffe9b0;font:600 9.5px/11px var(--font,Tahoma);text-align:center;cursor:var(--cur-hot);box-shadow:0 2px 4px #000;padding:0}
.u20rb:hover{filter:brightness(1.25)}
#u20gold{position:fixed;right:6px;z-index:8;display:flex;gap:10px;color:#ffd970;font-weight:700;font-size:12px;text-shadow:0 1px 2px #000,0 0 3px #000}
#u20gold img{width:15px;height:15px;vertical-align:-3px;margin-right:2px}
/* cot hoat dong ben phai */
#u20side{position:fixed;right:6px;z-index:8;display:flex;flex-direction:column;gap:5px}
.u20sq{position:relative;width:32px;height:32px;border:1px solid #9a8250;background:linear-gradient(#3b5e7a,#16283a);font-size:15px;cursor:var(--cur-hot);padding:0;box-shadow:0 1px 3px #000}
.u20sq:hover::after{content:attr(data-n);position:absolute;right:38px;top:6px;white-space:nowrap;background:#000d;border:1px solid #6d5a30;color:#ffe9b0;font-size:11px;padding:1px 6px}
.u20sq.dot::before{content:'';position:absolute;right:-3px;top:-3px;width:8px;height:8px;border-radius:50%;background:#e33}
/* menu bieu tuong goc duoi phai */
#u20menu{position:fixed;right:6px;bottom:6px;z-index:8;display:flex;gap:3px;padding:3px;background:linear-gradient(#3b3424,#1c170e);border:1px solid #9a8250;border-radius:4px}
.u20mi{position:relative;width:34px;height:34px;border:1px solid #6d5a30;background:radial-gradient(#3e5f50,#13251c) center/24px no-repeat;cursor:var(--cur-hot);padding:0;font-size:16px;color:#fff}
.u20mi small{position:absolute;bottom:-1px;left:0;right:0;font-size:8px;text-align:center;color:#ffe9b0;background:#000a;line-height:10px}
.u20mi.on{border-color:#e0c060;box-shadow:0 0 6px #e0c06088}
.u20mi .dot{position:absolute;right:-3px;top:-3px;width:8px;height:8px;border-radius:50%;background:#e33;display:none}
.u20mi .dot.on{display:block}
/* nhat ky trong suot goc duoi trai */
#u20log{position:fixed;left:0;bottom:50px;width:min(42vw,470px);z-index:7;pointer-events:auto}
#u20lines{max-height:170px;overflow:hidden;padding:4px 8px;font-size:11.5px;line-height:15px;background:linear-gradient(90deg,#000b,#0000);text-shadow:0 1px 1px #000}
#u20lines div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#u20ct{display:flex}
#u20ct button{background:linear-gradient(#2f4a3a,#132219);border:1px solid #6f9c8b;padding:0 5px;font-size:10px;white-space:nowrap;color:#ffe9b0;cursor:var(--cur-hot);height:16px}
#u20ct button.on{background:linear-gradient(#6b5320,#3a2c0e);border-color:#e0c060}
body.u20 #chatBox{bottom:6px!important}
body.u20 #modeSw{bottom:auto!important;top:auto!important;left:auto!important;right:8px!important;bottom:100px!important}
/* thanh mau trum */
#u20boss{position:fixed;left:50%;transform:translateX(-50%);top:30px;width:min(34vw,440px);z-index:7;text-align:center;display:none;pointer-events:none}
#u20boss .t{color:#ffd970;font-weight:700;font-size:12px;text-shadow:0 1px 2px #000}
#u20boss .b{height:12px;border:2px solid #8c7440;border-radius:7px;background:#200;margin-top:2px;position:relative;overflow:hidden}
#u20boss .b i{position:absolute;left:0;top:0;bottom:0;background:linear-gradient(#e44,#911)}
#u20boss .b span{position:absolute;inset:0;font-size:10px;line-height:12px;color:#fff;text-shadow:0 0 2px #000}
/* Tro thu kiem hiep */
.u20tt label{display:block;padding:3px 0}
.u20tt h4{margin:8px 0 2px;color:#e8d49a;border-bottom:1px solid #554}
/* chat the gioi trong giao dien 2.0: nut 💬 goc duoi trai, dong chat hien o tab "Thế giới" cua khung nhat ky; mo 💬 = cua so chat */
body.u20 #u20log{bottom:2px}
body.u20 #u20ct{margin-left:36px;flex-wrap:wrap}
body.u20 #chatBox:not(.open){left:2px!important;bottom:2px!important;width:auto!important}
body.u20 #chatBox:not(.open) #chatLines{display:none}
body.u20.nochat #u20ct{margin-left:0}
body.u20 #chatBox.open{left:2px!important;bottom:24px!important;top:auto!important;height:min(60vh,420px);width:min(34vw,420px)!important}
body.u20 #modal .mbox{max-width:min(680px,60vw)!important}
/* Item grids inside dialogs (Kho chung, Lò Ép, Kho Rèn): fixed cells instead of 6 columns stretched to the dialog width,
   and keep the dialog clear of the skill bar */
body.u20:not(.u2m,.u2s) #modal .invgrid{grid-template-columns:repeat(auto-fill,44px)!important;justify-content:start}
body.u20:not(.u2m,.u2s) #modal .invgrid .it{width:44px;height:44px}
body.u20:not(.u2m,.u2s) #modal .invgrid>small{grid-column:1/-1;padding:4px}
body.u20:not(.u2m,.u2s) #modal .mbox{max-height:calc(100vh - 200px)!important;overflow:auto}
/* Item compare (hud.js Ut): the new item and the equipped one side by side on desktop, actions pinned at the bottom */
body.u20:not(.u2m,.u2s) #modal .mbox:has(.cmpW){max-width:min(1000px,92vw)!important;width:min(1000px,92vw)}
body.u20:not(.u2m,.u2s) #modal .cmpW{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
body.u20:not(.u2m,.u2s) #modal .cmpW>*{min-width:0}
/* Worn piece on the left, the inspected item on the right */
body.u20:not(.u2m,.u2s) #modal .cmpW>.cmp{order:-1;margin:0;padding:0 16px 0 0;border-top:0;border-right:1px solid var(--line)}
body.u20:not(.u2m,.u2s) #modal .mbox:has(.cmpW) .btnrow{position:sticky;bottom:-1px;z-index:1;margin-top:8px;padding:8px 0 2px;background:var(--w2bg,#252320)}
/* ======================= v160: HINH ANH + CUA SO VO LAM 2.0 ======================= */
:root{--w2bg:rgba(24,26,22,.95);--w2ln:#7d7a62;--w2ln2:#3a392e;--w2tx:#e9e1c2;--w2gd:#ffd970;--w2cell:#0b0c0a}
/* thanh menu: bieu tuong goc 2.0 (20x20, 3 khung: thuong / re chuot / dang mo) */
#u20menu{gap:2px;padding:4px 8px;background:linear-gradient(#4a4a3c,#1d1d16);border:1px solid #9a926c;border-radius:14px 14px 3px 3px;box-shadow:0 0 0 1px #000,0 -2px 8px #000a;align-items:flex-end}
.u20mi{width:30px;height:30px;border:0;border-radius:0;background:transparent no-repeat 0 0/90px 30px;image-rendering:auto}
.u20mi:hover{background-position:-30px 0}.u20mi.on{background-position:-60px 0;box-shadow:none}
.u20mi small{display:none}
#u20mini{position:absolute;right:6px;top:-30px;display:flex;gap:3px;padding:2px 4px;background:linear-gradient(#3e3e32,#1d1d16);border:1px solid #8b845f;border-bottom:0;border-radius:8px 8px 0 0}
.u20mi.sm{width:26px;height:26px;background-size:78px 26px}.u20mi.sm:hover{background-position:-26px 0}.u20mi.sm.on{background-position:-52px 0}
/* khung cua so 2.0 */
body.u20 #panel{background:var(--w2bg)!important;border:1px solid var(--w2ln)!important;outline:1px solid #000;box-shadow:inset 0 0 0 1px var(--w2ln2),0 4px 22px #000!important;border-radius:4px;padding:0 0 8px!important;color:var(--w2tx)}
body.u20 #panel .tab{padding:6px 10px 0}
#u20wh{height:30px!important;background:linear-gradient(#55564a,#2a2b24 55%,#1d1e19)!important;border-bottom:1px solid #8c876a!important;color:var(--w2tx)!important;font-size:14px;letter-spacing:.5px;text-shadow:0 1px 2px #000}
#u20wh::before,#u20wh::after{content:'';position:absolute;top:14px;width:22%;height:1px;background:linear-gradient(90deg,transparent,#a59c78)}#u20wh::before{left:12px}#u20wh::after{right:40px;transform:scaleX(-1)}
#u20wh button,body.u20 #modal .mx{width:24px!important;height:24px!important;border-radius:50%!important;border:2px solid #c9c6b6!important;background:radial-gradient(circle at 40% 35%,#6a6a66,#1d1d1b)!important;color:#fff!important;font-size:12px;line-height:18px;padding:0;top:3px!important;right:5px!important;box-shadow:0 0 3px #000}
body.u20[data-u2t=char] #panel{width:600px}body.u20[data-u2t=inv] #panel{width:262px}body.u20[data-u2t=skill] #panel{width:min(740px,60vw)}
body.u20[data-u2t=forge] #panel{width:560px}body.u20[data-u2t=quest] #panel{width:620px}body.u20[data-u2t=tt] #panel{width:520px}body.u20[data-u2t=more] #panel{width:520px}
body.u20.u20win[data-u2t=inv] #panel{left:auto!important;right:200px;transform:none!important}
/* nut, the, o kieu 2.0 */
body.u20 #panel .btn,body.u20 #modal .btn{background:linear-gradient(#5d684d,#2e3825)!important;border:1px solid #a6ad80!important;color:#f3edc8!important;border-radius:3px!important;box-shadow:inset 0 1px 0 #ffffff22,0 1px 2px #000;text-shadow:0 1px 1px #000}
body.u20 #panel .btn:hover:not(:disabled),body.u20 #modal .btn:hover:not(:disabled){filter:brightness(1.2)}
body.u20 #panel .btn.on,body.u20 #modal .btn.on{background:linear-gradient(#8a7434,#4a3c14)!important;border-color:#e8c860!important}
body.u20 #panel .btn.red,body.u20 #modal .btn.red{background:linear-gradient(#7a3a2e,#3e1a12)!important;border-color:#c48a70!important}
.u2tabs,body.u20 .dtabs{display:flex;gap:2px;border-bottom:1px solid var(--w2ln);margin:0 0 6px;padding:0}
.u2tabs button,body.u20 .dtabs button{flex:0 0 auto;background:linear-gradient(#3b3d33,#202119)!important;border:1px solid #6d6b55!important;border-bottom:0!important;border-radius:4px 4px 0 0!important;color:#cfc8a8!important;padding:3px 12px!important;font-size:12px;cursor:var(--cur-hot)}
.u2tabs button.on,body.u20 .dtabs button.on{background:linear-gradient(#6a6a52,#38382a)!important;color:var(--w2gd)!important}
.u2h{display:flex;align-items:center;gap:4px;color:#e8d49a;font-weight:600;margin:8px 0 3px;padding:2px 6px;background:linear-gradient(90deg,#3a3a2c,transparent);border-left:2px solid #b9974f}
.u2h .sp,.u2foot .sp,.u2bh .sp{flex:1}
.u2box{border:1px solid #4e4c3c;background:#00000055;padding:5px 7px;margin-bottom:4px}
.u2btns{display:flex;gap:4px;flex-wrap:wrap;justify-content:center;margin:6px 0 0}
.gold{color:var(--w2gd)}
body.u20 #panel .it{background:var(--w2cell);border:1px solid #4e4c3c;border-radius:0;box-shadow:inset 0 0 6px #000}
body.u20 #panel .it.r1{border-color:#6aa8ff}body.u20 #panel .it.r2{border-color:#ffd24a}body.u20 #panel .it.r3{border-color:#c77bff}
/* Nhan vat */
.u2char{display:grid;grid-template-columns:262px 1fr;gap:10px}
.u2nm{text-align:center;color:var(--w2gd);font-weight:700;padding:3px;background:linear-gradient(90deg,transparent,#3a3a2c,transparent);margin-bottom:3px}
.u2doll{position:relative;width:252px;height:300px;margin:0 auto;background:radial-gradient(ellipse at 50% 45%,#2b2d26,#0d0e0b 75%);border:1px solid #5c5a45;box-shadow:inset 0 0 20px #000}
#u2doll{position:absolute;inset:0;filter:grayscale(1) brightness(.55) contrast(1.15);opacity:.65;pointer-events:none}
.u2s{position:absolute;display:grid;place-items:center;border:1px solid #5c5a45!important;border-radius:0!important;background:#0b0c0acc;box-shadow:inset 0 0 8px #000;font-size:10px;color:#6f6c58;aspect-ratio:auto!important}
.u2s .it{width:100%!important;height:100%!important;aspect-ratio:auto!important;border:0!important;background:transparent!important}
.u2s span{text-align:center;line-height:11px}
.u2a{display:grid;grid-template-columns:1fr 50px 24px 24px;gap:4px;align-items:center;padding:2px 0}.u2a b{text-align:right;color:var(--w2gd)}
.u2a button{height:20px;padding:0;border:1px solid #8b845f;background:linear-gradient(#5a4a26,#2e240e);color:#ffd970;border-radius:2px}.u2a button:disabled{opacity:.35}
.u2row{display:flex;justify-content:space-between;align-items:center;margin-top:4px}
.u2st{display:grid;grid-template-columns:1fr auto;gap:2px 8px;font-size:12px}.u2st span:nth-child(odd){color:#b8b29a}
.u2note{font-size:11px;margin-top:3px}
/* Vo cong */
.u2kg{display:flex;gap:3px;overflow-x:auto;padding-bottom:4px}
.u2kc{display:flex;flex-direction:column;gap:3px;min-width:52px}
.u2kh{text-align:center;font-size:11px;color:#e8e0c0;background:linear-gradient(#2e4a44,#152824);border:1px solid #4d6b62;padding:2px 0}
.u2k{position:relative;width:52px;height:52px;border:1px solid #4e4c3c;background:#0b0c0a;box-shadow:inset 0 0 6px #000;display:grid;place-items:center;cursor:var(--cur-hot)}
.u2k.empty{cursor:var(--cur);background:#0b0c0a99}
.u2k img{width:34px;height:34px;filter:grayscale(1) brightness(.6)}.u2k.on img{filter:none}.u2k.lock{opacity:.45}
.u2k.main{border-color:#ffd24a;box-shadow:inset 0 0 8px #a88420}
.u2k i{position:absolute;left:3px;bottom:0;font:11px var(--font);color:#fff;text-shadow:0 0 2px #000,0 0 2px #000}
.u2k .plus{position:absolute;right:1px;bottom:1px;width:15px;height:15px;padding:0;line-height:12px;font-size:13px;font-weight:700;border:1px solid #fff;background:#c22;color:#fff;border-radius:2px;cursor:var(--cur-hot)}
.u2k .u2dt{position:absolute;right:0;top:0;border:0;background:none;font-size:11px;padding:0;cursor:var(--cur-hot)}
.u2foot{display:flex;align-items:center;gap:5px;margin-top:6px;border-top:1px solid #4e4c3c;padding-top:6px}
.u2pts{margin-left:8px}.u2pts b{color:#f55;font-size:14px}
.u2tip{margin:4px 0 0}.plusd{background:#c22;color:#fff;padding:0 3px}
/* Hanh trang */
.u2bag .invgrid{display:grid!important;grid-template-columns:repeat(6,36px)!important;gap:1px!important;justify-content:center;background:#4e4c3c;border:1px solid #4e4c3c;width:max-content;margin:0 auto}
.u2bag .it{width:36px!important;height:36px!important}.u2bag .it.empty{display:block}
.u2bh{display:flex;align-items:center;gap:6px;margin-bottom:4px;font-size:12px}
.u2money{display:grid;grid-template-columns:auto 1fr;gap:3px 6px;margin-top:6px;font-size:12px;align-items:center}
.u2money b{background:#0b0c0a;border:1px solid #4e4c3c;padding:1px 6px;color:var(--w2gd);text-align:right}
/* Lo ren */
.u2forge{display:grid;grid-template-columns:236px 1fr;gap:10px}
.u2circ{position:relative;width:236px;height:236px;background:radial-gradient(circle,#6b5420 0,#3a2c0c 45%,#120e05 72%);border:1px solid #5c5a45}
.u2circ svg{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 0 3px #f5c84a)}
.u2rc{position:absolute;left:88px;top:88px;width:60px;height:60px;display:grid;place-items:center;text-align:center;font-size:10px}.u2rc img{width:30px;height:30px}.u2rc b{color:var(--w2gd)}
.u2ri{position:absolute;width:38px;height:38px}.u2ri .it{width:38px!important;height:38px!important}
.u2ftxt{background:#00000066;border:1px solid #4e4c3c;padding:4px 8px;font-size:12px}
/* Nhiem vu */
.u2quest{display:grid;grid-template-columns:150px 1fr;gap:6px;min-height:300px}
.u2tree{background:#0b0c0a;border:1px solid #4e4c3c;padding:4px;display:flex;flex-direction:column;align-items:stretch}
.u2tg{color:#e8e0c0;font-size:12px;margin-top:4px}
.u2tree button{text-align:left;background:none;border:0;color:#d0c8a0;padding:2px 2px 2px 16px;font-size:12px;cursor:var(--cur-hot)}
.u2tree button:hover{color:#fff}.u2tree button.on{background:#6b6440;color:#ffe;outline:1px solid #a59c78}
.u2qd{background:#0b0c0a88;border:1px solid #4e4c3c;padding:6px;overflow:auto}
.u2qb{justify-content:center}
#u20trk{position:fixed;right:46px;z-index:7;width:210px;background:#000a;border:1px solid #6d6a52;font-size:11.5px;line-height:15px;color:#e8e0c0}
#u20trk .u2trh{text-align:center;background:linear-gradient(#3e3e32,#1d1d16);padding:2px;color:#fff;font-size:12px}
#u20trk>div[data-q],#u20trk>div:not(.u2trh){padding:3px 6px;cursor:var(--cur-hot)}#u20trk b{color:#ffd24a}
/* Tro thu */
.u2tt label{display:block;padding:3px 0 3px 4px;font-size:12.5px}
.u2tt .lootf{background:none!important;border:0!important;padding:0!important}
/* Hop thoai 2.0 + Ky Tran Cac */
body.u20 #modal{background:#0006}
body.u20 #modal .mbox{background:var(--w2bg)!important;border:1px solid var(--w2ln)!important;outline:1px solid #000;box-shadow:inset 0 0 0 1px var(--w2ln2),0 4px 22px #000!important;border-radius:4px!important;padding:0 12px 12px!important;color:var(--w2tx)}
body.u20 #modal #mBody>h3:first-child{margin:0 -12px 8px;height:30px;line-height:30px;text-align:center;background:linear-gradient(#55564a,#2a2b24 55%,#1d1e19);border-bottom:1px solid #8c876a;font-size:14px;color:var(--w2tx)}
body.u20 #modal #mBody>:first-child:not(h3){margin-top:12px}
body.u20 #modal #mBody>h3:first-child small{font-size:11px;color:#bdb59a}
body.u20 #modal.u2ktc .mbox{max-width:760px!important;width:760px}
.u2shop{display:grid;grid-template-columns:120px 1fr;gap:8px}
.u2cat{background:#0b0c0a;border:1px solid #4e4c3c;display:flex;flex-direction:column;padding:4px;gap:2px}
.u2cat button{background:none;border:0;color:#e0d8b8;padding:6px;cursor:var(--cur-hot);font-size:12.5px}.u2cat button.on{background:linear-gradient(#6a6a52,#38382a);color:var(--w2gd)}
.u2sh{font-size:12px;margin-bottom:6px}.u2sh img{height:14px;vertical-align:-2px;image-rendering:pixelated}
.u2cards{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.u2card{border:1px solid #6d6b55;background:linear-gradient(#2e3632,#1a1f1c);box-shadow:inset 0 0 0 1px #000}
.u2card.bad{opacity:.5}
.u2ct{text-align:center;font-size:12px;background:linear-gradient(#3b4a44,#1e2824);border-bottom:1px solid #6d6b55;padding:2px;color:#e8e0c0}
.u2cb{display:flex;gap:8px;align-items:center;padding:6px;font-size:12px;min-height:46px}.u2cb img{width:34px;height:34px;image-rendering:pixelated;border:1px solid #4e4c3c;background:#000}
.u2cf{display:flex;gap:3px;padding:0 5px 5px}
.u2buy{flex:1;height:26px;border:1px solid #b4a77a;background:linear-gradient(#8a7a5a,#4e4330);color:#fff6d8;font-weight:700;border-radius:3px;cursor:var(--cur-hot);text-shadow:0 1px 1px #000}
.u2buy.x{flex:0 0 auto;padding:0 6px;font-weight:400;font-size:11px}.u2buy.on{background:linear-gradient(#5d684d,#2e3825)}.u2buy:disabled{opacity:.45;cursor:var(--cur)}
.u2buf{margin-top:6px}
body.u20 #t-log .log{display:none}
body.u20 .tab::before,body.u20 #panel::before,body.u20 .mbox::before{display:none!important;content:none!important}
.u2bag .invgrid{grid-template-columns:repeat(6,33px)!important}.u2bag .it{width:33px!important;height:33px!important}
body.u20[data-u2t=inv] #panel{width:250px}
#t-forge .u2tabs button{padding:3px 8px!important}
#u2doll{opacity:.42;filter:grayscale(1) brightness(1.25) contrast(.9)}
.u2st{grid-template-columns:auto 1fr auto 1fr}
body.u20 #modal #mBody>h3:first-child{background:linear-gradient(#55564a,#2a2b24 55%,#1d1e19)!important;border:0!important;border-bottom:1px solid #8c876a!important;box-shadow:none!important;color:var(--w2tx)!important;text-shadow:0 1px 2px #000!important;display:block!important;padding:0 36px!important;margin:0 -12px 8px!important;letter-spacing:.5px}
body.u20 #modal #mBody>h3:first-child small{color:#bdb59a!important;text-shadow:none!important;margin-left:6px}
body.u20 .tab h3,body.u20 .mbox h3:not(:first-child){background:linear-gradient(90deg,#3a3a2c,transparent)!important;border:0!important;border-left:2px solid #b9974f!important;box-shadow:none!important;color:#e8d49a!important;text-shadow:none!important;padding:2px 6px!important;margin:8px 0 4px!important}
body.u20 .tab h3 small,body.u20 .mbox h3:not(:first-child) small{color:#bdb59a!important;text-shadow:none!important}
body.u20 .mbox::after{display:none!important}
.u2sh span,.u2sh b{display:inline!important}
.u2cb small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.u2s{background:#0b0c0a55!important}
/* dieu khien chien dau gom canh thanh ky nang */
body.u20 #topCtl{top:auto!important;bottom:60px!important;left:calc(50% + 6px)!important;right:auto!important;transform:none!important}
body.u20 #modeSw{top:auto!important;bottom:60px!important;right:calc(50% + 6px)!important;left:auto!important}
body.u20 #rideBtn{display:none!important}
.u2tm{max-height:58vh;overflow:auto;padding-right:4px}
/* thanh ban do duoi ban do nho */
#u20zone{position:fixed;z-index:9}
#u20zb{width:100%;height:22px;background:linear-gradient(#4a4a3c,#1d1d16);border:1px solid #9a926c;color:#ffe9a8;font-size:12px;cursor:var(--cur-hot);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:0 6px}
#u20zb:hover{filter:brightness(1.2)}
#u20zl{position:absolute;right:0;top:24px;width:300px;max-height:62vh;overflow:auto;background:var(--w2bg);border:1px solid var(--w2ln);outline:1px solid #000;box-shadow:0 4px 18px #000;padding:6px;color:var(--w2tx)}
#u20zl.hidden{display:none}
.u2zh{display:flex;justify-content:space-between;align-items:center;font-size:12px;margin-bottom:4px}.u2zh b{color:var(--w2gd)}
.u2zs{font-size:11px;margin-bottom:4px;color:#bdb59a}
#u20zl .zrow{width:100%;display:flex;justify-content:space-between;gap:6px;background:#0b0c0a;border:1px solid #3e3c30;color:#e0d8b8;padding:4px 6px;margin-bottom:2px;font-size:12px;cursor:var(--cur-hot);text-align:left}
#u20zl .zrow.cur{border-color:#e0c060;background:#3a3420}#u20zl .zrow.lock{opacity:.4}#u20zl .zrow span{color:#bdb59a;white-space:nowrap}
#u20zl .zalt{display:flex;flex-wrap:wrap;gap:3px;margin:0 0 4px 8px}
#u20trk{right:6px!important}#u20side:empty{display:none!important}

/* ---- sinh tu luat may tinh cho dien thoai doc ---- */
body.u2m #modal .mx{width:24px!important;height:24px!important;border-radius:50%!important;border:2px solid #c9c6b6!important;background:radial-gradient(circle at 40% 35%,#6a6a66,#1d1d1b)!important;color:#fff!important;font-size:12px;line-height:18px;padding:0;top:3px!important;right:5px!important;box-shadow:0 0 3px #000}
body.u2m #panel .btn,body.u2m #modal .btn{background:linear-gradient(#5d684d,#2e3825)!important;border:1px solid #a6ad80!important;color:#f3edc8!important;border-radius:3px!important;box-shadow:inset 0 1px 0 #ffffff22,0 1px 2px #000;text-shadow:0 1px 1px #000}
body.u2m #panel .btn:hover:not(:disabled),body.u2m #modal .btn:hover:not(:disabled){filter:brightness(1.2)}
body.u2m #panel .btn.on,body.u2m #modal .btn.on{background:linear-gradient(#8a7434,#4a3c14)!important;border-color:#e8c860!important}
body.u2m #panel .btn.red,body.u2m #modal .btn.red{background:linear-gradient(#7a3a2e,#3e1a12)!important;border-color:#c48a70!important}
body.u2m .dtabs{display:flex;gap:2px;border-bottom:1px solid var(--w2ln);margin:0 0 6px;padding:0}
body.u2m .dtabs button{flex:0 0 auto;background:linear-gradient(#3b3d33,#202119)!important;border:1px solid #6d6b55!important;border-bottom:0!important;border-radius:4px 4px 0 0!important;color:#cfc8a8!important;padding:3px 12px!important;font-size:12px;cursor:var(--cur-hot)}
body.u2m .dtabs button.on{background:linear-gradient(#6a6a52,#38382a)!important;color:var(--w2gd)!important}
body.u2m #panel .it{background:var(--w2cell);border:1px solid #4e4c3c;border-radius:0;box-shadow:inset 0 0 6px #000}
body.u2m #panel .it.r1{border-color:#6aa8ff}
body.u2m #panel .it.r2{border-color:#ffd24a}
body.u2m #panel .it.r3{border-color:#c77bff}
body.u2m #modal .mbox{background:var(--w2bg)!important;border:1px solid var(--w2ln)!important;outline:1px solid #000;box-shadow:inset 0 0 0 1px var(--w2ln2),0 4px 22px #000!important;border-radius:4px!important;padding:0 12px 10px!important;color:var(--w2tx)}
body.u2m #modal #mBody>h3:first-child{margin:0 -12px 8px;height:30px;line-height:30px;text-align:center;background:linear-gradient(#55564a,#2a2b24 55%,#1d1e19);border-bottom:1px solid #8c876a;font-size:14px;color:var(--w2tx)}
body.u2m #modal #mBody>h3:first-child small{font-size:11px;color:#bdb59a}
body.u2m .tab::before,body.u2m .mbox::before{display:none!important;content:none!important}
/* Bottom ornament: match u2m modal padding (0 12px 10px) so it does not overflow into a horizontal scrollbar */
/* The old bottom ornament showed half-clipped under every phone modal; the 2.0 frame drops it like desktop (line 194) */
body.u2m .mbox::after{display:none!important}
body.u2m #modal #mBody>h3:first-child{background:linear-gradient(#55564a,#2a2b24 55%,#1d1e19)!important;border:0!important;border-bottom:1px solid #8c876a!important;box-shadow:none!important;color:var(--w2tx)!important;text-shadow:0 1px 2px #000!important;display:block!important;padding:0 36px!important;margin:0 -12px 8px!important;letter-spacing:.5px}
body.u2m #modal #mBody>h3:first-child small{color:#bdb59a!important;text-shadow:none!important;margin-left:6px}
body.u2m .tab h3,body.u2m .mbox h3:not(:first-child){background:linear-gradient(90deg,#3a3a2c,transparent)!important;border:0!important;border-left:2px solid #b9974f!important;box-shadow:none!important;color:#e8d49a!important;text-shadow:none!important;padding:2px 6px!important;margin:8px 0 4px!important}
body.u2m .tab h3 small,body.u2m .mbox h3:not(:first-child) small{color:#bdb59a!important;text-shadow:none!important}
/* ======================= DIEN THOAI CAM DOC (body.u2m): phong cach 2.0 trong bo cuc tren / duoi ======================= */
body.u2m #panel{background:var(--w2bg)!important;color:var(--w2tx)}
body.u2m .tab::before,body.u2m #panel::before{display:none!important;content:none!important}
body.u2m #tabs{background:linear-gradient(#4a4a3c,#1d1d16)!important;border-top:1px solid #9a926c!important}
body.u2m #tabs button::before{background-size:auto 100%!important;background-position:0 0!important;image-rendering:auto!important;width:30px!important;height:30px!important;margin-left:-15px!important}
body.u2m #tabs button.on::before{background-position:100% 0!important}
body.u2m #tabs button[data-t=log]::before{background-image:url(img/u2/map.png)!important}
body.u2m #tabs button[data-t=char]::before{background-image:url(img/u2/char.png)!important}
body.u2m #tabs button[data-t=skill]::before{background-image:url(img/u2/skill.png)!important}
body.u2m #tabs button[data-t=inv]::before{background-image:url(img/u2/inv.png)!important}
body.u2m #tabs button[data-t=forge]::before{background-image:url(img/u2/forge.png)!important}
body.u2m #tabs button[data-t=quest]::before{background-image:url(img/u2/quest.png)!important}
body.u2m #tabs button[data-t=more]::before{background-image:url(img/u2/more.png)!important}
body.u2m #tabs button.tride::before{background-image:url(img/u2/ride.png)!important}
body.u2m #tabs button.tride.on::before{background-position:100% 0!important}
body.u2m #tabs button.tride.off{opacity:.45}
body.u2m #tabs{grid-template-columns:repeat(8,1fr)!important}
body.u2m #tabs button{font-size:9.5px!important;letter-spacing:-.3px;white-space:nowrap;overflow:hidden;padding:33px 0 4px!important}
#tabs .tride{display:none}body.u2m #tabs .tride{display:block}
body.u2m #tabs button.on{color:var(--w2gd)!important}
/* noi dung the: xep doc cho man hinh hep */
@media (max-width:640px){
 .u2char,.u2forge{grid-template-columns:1fr}
 .u2dollw,.u2circ{margin:0 auto}
 .u2quest{grid-template-columns:1fr;min-height:0}
 .u2tree{flex-direction:row;flex-wrap:wrap;gap:2px}.u2tree .u2tg{width:100%;margin-top:2px}.u2tree button{padding:3px 8px;border:1px solid #3e3c30}
 .u2shop{grid-template-columns:1fr}.u2cat{flex-direction:row}.u2cat button{flex:1}
 .u2cards{grid-template-columns:repeat(2,1fr)}
 body.u2m #modal.u2ktc .mbox{width:auto!important;max-width:96vw!important}
 .u2tabs{flex-wrap:wrap}
}
/* ======================= DIEN THOAI CAM NGANG (body.u20.u2s): ban thu gon ======================= */
body.u2s #hud{left:4px!important;right:auto!important;width:min(52vw,460px)!important;padding:1px 6px!important}
body.u2s .u20rb{width:38px;height:38px;font-size:8.5px;line-height:9.5px}
body.u2s #u20gold{font-size:11px}
body.u2s #u20menu{padding:3px 5px}
body.u2s .u20mi{width:34px;height:34px;background-size:102px 34px}.u2s .u20mi:hover{background-position:-34px 0}.u2s .u20mi.on{background-position:-68px 0}
body.u2s #u20log{width:min(34vw,300px);bottom:2px}
body.u2s #u20lines{max-height:64px;font-size:10.5px;line-height:13px}
body.u2s #u20ct button{font-size:9px;height:15px;padding:0 3px}
body.u2s #modeSw{top:26px!important;bottom:auto!important;left:4px!important;right:auto!important}
body.u2s #topCtl{top:26px!important;bottom:auto!important;left:196px!important}
body.u2s #panel{top:2px!important;max-height:calc(100vh - 4px)!important;width:min(720px,96vw)!important}
body.u2s[data-u2t=inv] #panel{width:250px!important;right:4px!important}
body.u2s #u20wh{height:26px!important}
body.u2s #u20trk{width:170px;font-size:10.5px;line-height:13px}
/* Below the chip row (mode switch / rotation / Auto), which it used to cover */
body.u2s #u20boss{top:62px}
body.u2s #modal .mbox{max-height:96vh!important}
body.u2s .u2char{grid-template-columns:262px 1fr}
body:not(.u20) #u20wh{display:none!important}
body.u2s #u20ct{flex-wrap:nowrap;overflow:hidden}body.u2s .u2a span{text-align:left}
body.u2s .u2bag .invgrid{grid-template-columns:repeat(10,31px)!important}body.u2s .u2bag .it{width:31px!important;height:31px!important}body.u2s[data-u2t=inv] #panel{width:346px!important}
/* ======================= v165: CHO BAM DE (chat, nut nho, bi che) ======================= */
/* chat luon nam tren khung thong bao; dong thong bao khong chan cham */
body.u20 #chatBox{z-index:9!important}
body.u20 #u20lines{pointer-events:none}
body.u20 #panel{z-index:40!important}
body.u20 #panel{max-height:calc(100vh - 84px)}
@media (pointer:coarse){
  /* dien thoai cam ngang */
  body.u2s #chatBtn{width:40px!important;height:34px!important}
  body.u2s #u20ct{margin-left:44px}
  body.u2s #u20ct button{height:24px!important;font-size:10px!important;padding:0 5px!important}
  body.u2s #u20log{width:min(30vw,270px)}
  body.u2s #topCtl .chip,body.u2s #mswBtn{min-height:32px}
  body.u2s #u20zb{height:30px}
  body.u2s #u20zl .zrow{min-height:34px}
  body.u2s #panel{max-height:calc(100vh - 50px)!important}
  body.u2s #u20wh{height:34px!important}
  body.u2s #u20wh button,body.u2s #modal .mx{width:32px!important;height:32px!important;font-size:15px}
  body.u2s #panel .btn,body.u2s #modal .btn,body.u2s .u2tabs button,body.u2s .dtabs button{min-height:32px}
  body.u2s .u2a button{height:30px}
  body.u2s .u2tree button{min-height:30px}
  body.u2s .u20rb{width:44px;height:44px}
  /* dien thoai cam doc (giao dien thu nho 80%: so do css lon hon) */
  body.u2m #ktcBtn{min-height:36px}
  body.u2m #actBtn,body.u2m #giftBtn,body.u2m #compactBtn{width:40px!important;height:40px!important;line-height:38px!important}
  body.u2m .pbtn{width:44px!important;height:44px!important}
  body.u2m #chatBtn{width:44px!important;height:38px!important}
  body.u2m #topCtl .chip,body.u2m #mswBtn{min-height:34px}
  body.u2m .chip2{min-height:30px}
  body.u2m #u20zb{height:32px}
  body.u2m #u20zl .zrow{min-height:38px}
  body.u2m #u20zl{max-height:50vh}
  body.u2m #panel .btn,body.u2m #modal .btn{min-height:36px}
  body.u2m .u2tabs button,body.u2m .dtabs button{min-height:34px}
  body.u2m .u2tree button{min-height:36px}
  body.u2m .u2a{grid-template-columns:1fr 56px 40px 40px}.u2m .u2a button{height:34px}
  body.u2m .u2bag .invgrid{grid-template-columns:repeat(6,44px)!important}body.u2m .u2bag .it{width:44px!important;height:44px!important}
  body.u2m .u2k{width:60px;height:60px}.u2m .u2kc{min-width:60px}.u2m .u2k .plus{width:22px;height:22px;font-size:16px;line-height:18px}
  body.u2m .u2cat button{min-height:38px}
  body.u2m .u2buy{height:36px}
  body.u2m #modal .mx{width:40px!important;height:40px!important}
  body.u2m #u20ct button{min-height:30px}
}
body.u20 #u20log{pointer-events:none}body.u20 #u20ct button{pointer-events:auto}
@media (pointer:coarse){
  body.u2s #u20ct{flex-wrap:nowrap!important;overflow-x:auto;scrollbar-width:none;pointer-events:auto}
  body.u2s #u20ct button{font-size:9.5px!important;padding:0 4px!important;flex:none}
  body.u2s #u20log{width:min(31vw,280px)}
  /* hanh trang cam ngang: luoi ben trai, ngan luong + nut ben phai */
  body.u2s[data-u2t=inv] #panel{width:min(560px,70vw)!important}
  body.u2s .u2bag{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"h h" "g m" "g b" "g b2";gap:4px 8px;align-items:start}
  body.u2s .u2bh{grid-area:h}body.u2s .u2bag .invgrid{grid-area:g;margin:0}body.u2s .u2money{grid-area:m;margin:0;grid-template-columns:1fr}
  body.u2s #u2invB{grid-area:b;margin:0}body.u2s #u2invB2{grid-area:b2;margin:0}
  body.u2s #u2invB .btn,body.u2s #u2invB2 .btn{flex:1 1 45%}
}
@media (pointer:coarse){body.u2s #u20log{width:min(27vw,240px)}}
body.u20:has(#chatBox.open) #u20log{display:none}
/* nut an / hien khung thong bao (canh nut chat) */
#u20lt{width:34px!important;height:30px!important;padding:0!important;font-size:15px!important;background:linear-gradient(#1d4a38,#0a1d15)!important;border:1px solid #000!important;box-shadow:inset 0 0 0 1px #3f7a62;margin-right:2px;align-self:flex-end}
#u20lt.on{box-shadow:inset 0 0 0 1px #e0c060}
body.u20 #u20ct{align-items:flex-end}
body.u20logoff #u20lines,body.u20logoff #u20ct button[data-lt]{display:none!important}
#u20trk .u2trh{cursor:var(--cur-hot);position:relative}#u20trk .u2trh b{position:absolute;right:6px}
@media (pointer:coarse){body.u2s #u20lt{width:40px!important;height:34px!important}#u20trk .u2trh{padding:6px 2px}}
#u20menu .u20mi.off{filter:grayscale(.8) brightness(.7)}
/* thu tu lop: popup mo sau nam tren; thong bao nhanh luon tren cung */
body.u20 #chatBox{position:fixed!important}
body.u20 #modal{position:fixed!important;z-index:60}
#toast{z-index:9999!important}
body.u20 #toast{position:fixed!important}
/* Keep toasts above the mode / rotation chips that sit over the skill pad */
body.u20:not(.u2m,.u2s) #toast{bottom:100px!important}
/* cot phai: Nhiem vu Theo Dau + Hop thu; Hang canh Luc chien; Cho canh Ky Tran Cac */
#u20rc{position:fixed;right:6px;z-index:7;width:210px;display:flex;flex-direction:column;align-items:stretch;gap:4px}
#u20rc #u20trk{position:static!important;width:auto!important;right:auto!important;top:auto!important}
#u20mail{align-self:flex-end;height:24px;padding:0 10px;background:linear-gradient(#4a4a3c,#1d1d16);border:1px solid #9a926c;color:#ffe9a8;font-size:12px;cursor:var(--cur-hot);border-radius:3px;position:relative}
#u20mail:hover{filter:brightness(1.2)}#u20mail.on{box-shadow:0 0 6px #e0c060;color:#fff}
#u20mailN{position:absolute;top:-7px;right:-6px;min-width:16px;padding:0 3px;background:#c0392b;color:#fff;border-radius:8px;font-size:10px;line-height:16px;font-weight:400}#u20mailN:empty{display:none}
#u20rank{display:none;flex:none;height:18px;padding:0 6px;margin-left:2px;background:linear-gradient(#6b5320,#3a2c0e);border:1px solid #e0c060;color:#ffe9a8;font-size:11px;cursor:var(--cur-hot);border-radius:3px;white-space:nowrap}
body.u20 #u20rank:hover{filter:brightness(1.2)}
body.u2s #u20rc{width:170px}
@media (pointer:coarse){body.u2s #u20mail{height:32px}body.u2s #u20rank{height:24px}}
#u20mail{width:32px!important;height:32px!important;padding:0!important;border:0!important;border-radius:50%!important;background:url(img/u2/mail.png) 0 0/64px 32px no-repeat!important;box-shadow:0 1px 3px #000}
#u20mail.on{background-position:-32px 0!important;box-shadow:0 0 8px #e0c060}
#u20mail:hover{filter:brightness(1.25)}
@media (pointer:coarse){body.u2s #u20mail{width:36px!important;height:36px!important;background-size:72px 36px!important}body.u2s #u20mail.on{background-position:-36px 0!important}}
#u20gold{display:none!important}
#u20rank{pointer-events:auto!important}

/* v320 nut Ma Truong (duoi Hop thu) */
#u20stb{align-self:flex-end;position:relative;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:url(img/u2/stable.png) 0 0/64px 32px no-repeat;box-shadow:0 1px 3px #000;cursor:var(--cur-hot)}
#u20stb.on{background-position:-32px 0;box-shadow:0 0 8px #e0c060}
#u20stb:hover{filter:brightness(1.25)}
#u20stbN{position:absolute;top:-7px;right:-6px;min-width:16px;padding:0 3px;background:#c0392b;color:#fff;border-radius:8px;font-size:10px;line-height:16px;font-weight:400}#u20stbN:empty{display:none}
@media (pointer:coarse){body.u2s #u20stb{width:36px;height:36px;background-size:72px 36px}body.u2s #u20stb.on{background-position:-36px 0}}

/* v345: nut chon ban do khong de len cua so / hop thoai (dien thoai) */
body:has(#modal:not(.hidden)) #u20zone{display:none!important}
body.u2m.u20win #u20zone{display:none!important}
/* v382: vat pham dung duoc trong Hanh trang */
.u2bagit{display:flex;flex-wrap:wrap;gap:4px;margin:4px 0}
.u2bagit .bi{display:flex;align-items:center;gap:4px;padding:2px 4px;border:1px solid #4a473e;background:#0c0b08;font-size:11px}
.u2bagit .bi img{width:20px;height:20px;image-rendering:pixelated}
.u2bagit .bi b{color:#ffd98a;font-weight:normal}
/* v416: Mo rong ruong (bang phu hanh trang nhu JX1) */
.u2bagrow{display:flex;gap:8px;align-items:flex-start;justify-content:center;flex-wrap:nowrap}body.u2m .u2bagrow{flex-wrap:wrap}
.u2bagrow>.u2bag{flex:0 0 240px;width:240px;min-width:0}body.u2s .u2bagrow>.u2bag{flex-basis:330px;width:330px}body.u2m .u2bagrow>.u2bag{flex:1 1 100%;width:auto}
.u2rx{flex:0 0 auto;display:flex;flex-direction:column;gap:4px;align-items:stretch;border-left:1px solid #4e4c3c;padding-left:8px}
.u2rx[hidden]{display:none}
.u2rxt{text-align:center;font-weight:bold;color:#e8d9a8;font-size:13px}
.u2rxtab{display:flex;gap:2px}
.u2rxtab button{min-width:28px;padding:1px 6px;background:#1b1a14;border:1px solid #4e4c3c;color:#bbb;font:inherit;font-size:12px;cursor:var(--cur-hot)}
.u2rxtab button.on{background:#4e4c3c;color:#fff}.u2rxtab button.lk{color:#777}
.u2rx .invgrid{display:grid!important;grid-template-columns:repeat(6,36px)!important;gap:1px!important;background:#4e4c3c;border:1px solid #4e4c3c;width:max-content}
.u2rxlk{width:222px;min-height:120px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center}
.u2bh .u2buy.on{background:#6b5a2a}
body.u20.u2rxon[data-u2t=inv] #panel{width:524px}
body.u2s.u2rxon[data-u2t=inv] #panel{width:min(620px,98vw)!important}
body.u2m.u2rxon .u2rx .invgrid{grid-template-columns:repeat(6,44px)!important}
body.u2s.u2rxon .u2bag{display:block}body.u2s.u2rxon .u2bag .invgrid{margin:0 auto 4px}body.u2s.u2rxon[data-u2t=inv] #panel{width:auto!important;max-width:98vw}
body.u2m .u2rx{border-left:0;padding-left:0;border-top:1px solid #4e4c3c;padding-top:6px;width:100%;align-items:center}
/* v416: Tro Thu Kiem Hiep: nut tron duoi Ma Truong (bieu tuong JX 2.0) */
#u20tt{align-self:flex-end;position:relative;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:url(img/u2/tthu2.png) 0 0/64px 32px no-repeat;box-shadow:0 1px 3px #000;cursor:var(--cur-hot);margin-top:4px}
#u20tt:hover,#u20tt.on{background-position:-32px 0;box-shadow:0 0 8px #e0c060}
@media (pointer:coarse){body.u2s #u20tt{width:36px;height:36px;background-size:72px 36px}body.u2s #u20tt:hover,body.u2s #u20tt.on{background-position:-36px 0}}
/* v416: Tro Thu - nguong thuoc, nguong dong loc do */
.u2pot{display:flex;flex-wrap:wrap;gap:4px 12px;padding-left:22px}.u2pot label{display:inline-flex!important;align-items:center;gap:4px;padding:2px 0!important}.u2pot select{width:auto!important;min-width:0}
#tPri{width:auto;max-width:100%}
.thrbox{border-top:1px solid #4e4c3c;margin-top:6px;padding-top:6px;min-width:0}
.thrl{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:3px 10px;margin:4px 0}
.thri{display:flex;align-items:center;gap:4px;min-width:0;font-size:12px}.thri>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.thri input{width:52px!important}.thri .btn{padding:0 6px!important;min-width:0}
#fThrA{max-width:220px}
/* v418: Lo Hoang Kim - giao dien the nhu Ky Tran Cac */
.hkx{display:flex;flex-direction:column;gap:8px}
.hkbar{display:flex;align-items:center;gap:8px;border:1px solid #6d6b55;background:linear-gradient(#2e3632,#1a1f1c);padding:6px 8px}
.hkbar img{width:30px;height:30px;image-rendering:pixelated}.hkbar span{flex:1;display:flex;flex-direction:column;font-size:12px;color:#e8e0c0}.hkbar small{color:#a9a48a}
.hkbar .u2buy{flex:0 0 auto;padding:0 12px}
.hksec{font-size:13px;color:#f0d890;border-bottom:1px solid #6d6b55;padding:2px 0 3px;margin-top:2px}.hksec small{color:#9c977d;font-size:11px;margin-left:6px}
.hkcards{grid-template-columns:repeat(auto-fill,minmax(190px,1fr))}
.hkcards .u2ct{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:2px 6px}
.hkcards .u2card.hkok{border-color:#b4a77a;box-shadow:inset 0 0 0 1px #000,0 0 6px rgba(255,210,74,.25)}
.hkp{flex:1;min-width:0}.hkpb{height:7px;background:#0b0e0c;border:1px solid #4e4c3c;margin-bottom:4px}.hkpb i{display:block;height:100%;background:linear-gradient(#ffe08a,#c09030)}
.hkn{width:46px;height:26px;box-sizing:border-box;background:#0f1310;border:1px solid #4e4c3c;color:#e8e0c0;text-align:center;font:inherit;font-size:12px}
.hkreq{display:flex;flex-wrap:wrap;gap:5px}
.hkc{display:inline-flex;align-items:center;gap:4px;font-size:11px;padding:2px 7px;border:1px solid #4e4c3c;background:#141815;border-radius:10px;color:#cfc8a8}
.hkc img{width:16px;height:16px;image-rendering:pixelated}.hkc.ok{border-color:#5d7a4a;color:#bfe39a}.hkc.no{border-color:#7a4a3a;color:#f0a080}
.hkrow{display:flex;align-items:center;gap:8px;padding:6px;border:1px solid #3c3b2e;background:linear-gradient(#232a26,#171b18)}
.hkrow.ready{border-color:#b4a77a}
.hki{width:38px;height:38px;image-rendering:pixelated;border:1px solid #4e4c3c;background:#000;flex:none}
.hkm{flex:1;min-width:0;font-size:12px;line-height:1.45}.hkm>div{overflow:hidden;text-overflow:ellipsis}
.hkto{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#9c977d}
.hke{font-size:11px;padding:0 4px;border:1px solid #7a4a3a;color:#f0a080}.hke.ok{border-color:#5d7a4a;color:#bfe39a}
.hkw{font-size:10px;color:#9fd0ff}
.hkrow .u2buy{flex:0 0 auto;min-width:64px;padding:0 10px}
.hknote,.hkempty{margin:2px 0 0}
@media (max-width:560px){.hkcards{grid-template-columns:1fr 1fr}.hkcards .u2cb img{width:28px;height:28px}.hkbar small{display:none}}
/* v419: cuoi Hanh trang - tien gon + nut luoi deu */
.u2mny{display:grid!important;grid-template-columns:1fr!important;gap:4px!important;margin-top:8px!important}
.u2mv{display:flex;align-items:center;gap:5px;background:linear-gradient(#141815,#0b0d0b);border:1px solid #4e4c3c;padding:3px 7px;min-width:0;box-shadow:inset 0 0 0 1px #000}
.u2mv i{font-style:normal;font-size:13px;line-height:1;width:16px;text-align:center}.u2mv img{display:inline-block!important;width:16px!important;height:16px!important;image-rendering:pixelated}
.u2mv span{color:#9c977d;font-size:11px}
.u2mv b{flex:1;text-align:right;color:var(--w2gd,#ffd98a);font-weight:normal;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:none!important;border:0!important;padding:0!important}
.u2mv.k b{color:#ffe14a}
.u2act{display:grid;grid-template-columns:1fr 1fr;gap:4px;margin:4px 0 0}
#u2invB{margin-top:8px;padding-top:8px;border-top:1px solid #3c3b2e}
.u2act .btn{width:100%;margin:0!important;height:28px;padding:0 4px;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid #6d6b55;background:linear-gradient(#3b4a44,#1e2824);color:#e8e0c0;border-radius:3px;box-shadow:inset 0 1px 0 rgba(255,255,255,.08)}
.u2act .btn:hover:not(:disabled){border-color:#b4a77a;color:#fff6d8;background:linear-gradient(#4a5a52,#26322c)}
.u2act .btn:disabled{opacity:.45}
.u2act .btn small{color:#ffd98a;font-size:11px;margin-left:2px}
.u2act .btn.u2sell{border-color:#a0604a;background:linear-gradient(#6a3428,#3a1a14);color:#ffe0d0}
.u2act .btn.u2sell:hover{background:linear-gradient(#7d4032,#47211a)}
body.u2s #u2invB .btn,body.u2s #u2invB2 .btn{flex:none}
body.u2m .u2act .btn{height:36px;font-size:13px}
/* v431 KTC dung ngay */
.u2cf .u2buy.u{background:linear-gradient(#3b5a2a,#24391a);border-color:#6f9a4a;color:#dff5c8}
.u2cf .u2buy.u:disabled{opacity:.45}
.ktcauto{display:flex;align-items:center;gap:5px;margin:4px 0 6px;flex-wrap:wrap}
/* v432 nhan vat: but doi ten */
.u2nm{display:flex;align-items:center;justify-content:center;gap:6px}
.u2pen{background:none;border:1px solid #6a5a3a;border-radius:3px;color:#e8d29a;font-size:12px;line-height:1;padding:2px 4px;cursor:var(--cur-hot)}
.u2pen:hover{background:#4a3f28;color:#fff}
.u2btns .btn{flex:1;min-width:0}
.u2kv{display:grid;grid-template-columns:auto 1fr;gap:2px 10px;margin-top:4px;font-size:12px}.u2kv>b{text-align:right}
/* v427: bo nut Chuot / Cham */
#inBtn{display:none!important}
/* v455 to doi */
#ptInv{position:fixed;right:12px;bottom:120px;z-index:60;background:#1a160f;border:1px solid #c9a35a;border-radius:5px;padding:8px 10px;color:#f3e6c8;font-size:13px;box-shadow:0 4px 18px #000a}
#ptInv .btnrow{margin-top:6px;display:flex;gap:6px}
/* v459: nut + bang quan ly to doi */
#ptBtn{position:relative;flex:none;width:32px;height:32px;border:0;border-radius:50%;background:url(img/u2/team.png) 0 0/96px 32px no-repeat;padding:0;font-size:0;image-rendering:pixelated;box-shadow:0 1px 3px #000}
#ptBtn.in{background-position:-64px 0}#ptBtn.on{background-position:-32px 0}
#ptBtn.on::after{content:attr(data-n);position:absolute;top:-4px;right:-5px;min-width:15px;height:15px;padding:0 3px;border-radius:8px;background:#e0402a;color:#fff;font-size:10px;line-height:15px;box-shadow:0 0 0 2px #0f1613}
body.u2m #ptBtn,body.u2m #netBtn{width:40px!important;height:40px!important;line-height:38px!important}
#ptMgr{min-width:min(360px,86vw)}
#ptMgr h3{margin:0 0 6px;color:#ffd78a}#ptMgr h3 small{color:#c9b98f;font-weight:normal}
#ptMgr .pth2{margin:8px 0 4px;color:#e6c67a;font-size:12px;border-bottom:1px solid #4a3f2a}
#ptMgr .ptm{display:flex;align-items:center;gap:6px;padding:5px 6px;margin:3px 0;background:#1a1712;border:1px solid #3a3122;border-radius:4px}
#ptMgr .ptm.me{border-color:#6a5a3a}
#ptMgr .ptm .nm{position:relative;flex:1;min-width:0;padding-bottom:4px;color:#7fe36a}#ptMgr .ptm.me .nm{color:#fff3c0}
#ptMgr .ptm .nm small{color:#a99}#ptMgr .ptm .ld{color:#ffd24a}
#ptMgr .ptm .nm i{position:absolute;left:0;bottom:0;height:2px;background:#d84a3a;max-width:100%}
#ptMgr .ptmsg{margin:6px 0;font-size:12px;color:#e8dcc8}
#ptMgr .ptadd{display:flex;gap:6px;margin:8px 0}#ptMgr .ptadd input{flex:1;min-width:0;background:#0d0c0a;border:1px solid #6a5a3a;color:#f3e6c8;border-radius:3px;padding:4px 6px}
#ptMgr .btnrow{display:flex;gap:6px;justify-content:flex-end;margin-top:6px}
#ptMgr .ptnote{font-size:11px;margin-top:6px}
#u20pt{align-self:flex-end;position:relative;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:url(img/u2/team.png) 0 0/96px 32px no-repeat;image-rendering:pixelated;box-shadow:0 1px 3px #000;cursor:var(--cur-hot);margin-top:4px;font-size:0}
#u20pt:hover{filter:brightness(1.25)}#u20pt.in{background-position:-64px 0;box-shadow:0 0 8px #7fe36a88}#u20pt.on{background-position:-32px 0;box-shadow:0 0 8px #e06040}
#u20ptN{position:absolute;top:-7px;right:-6px;min-width:16px;padding:0 3px;background:#c0392b;color:#fff;border-radius:8px;font-size:10px;line-height:16px;font-weight:400}#u20ptN:empty{display:none}
@media (pointer:coarse){body.u2s #u20pt{width:36px;height:36px;background-size:108px 36px}body.u2s #u20pt.in{background-position:-72px 0}body.u2s #u20pt.on{background-position:-36px 0}}
#chatHead .cch{position:relative;height:22px;padding:0 9px;margin-right:2px;font-family:inherit;font-weight:bold;font-size:12px;line-height:20px;border-radius:4px 4px 0 0;cursor:var(--cur-hot);background:linear-gradient(#2a3a32,#121c17);border:1px solid #4d6a5d;color:#cfe6dc;text-shadow:0 1px 1px #000}
#chatHead .cch:hover{filter:brightness(1.25)}
#chatHead .cch.on[data-cc="w"]{background:linear-gradient(#f3d27a,#b8862c);border-color:#ffe9a8;color:#2a1a05;text-shadow:none;box-shadow:0 0 6px #e0c06099}
#chatHead .cch.on[data-cc="p"]{background:linear-gradient(#9be37f,#3d8a2a);border-color:#d6ffc4;color:#0b2206;text-shadow:none;box-shadow:0 0 6px #7fe36a99}
#chatHead .cch b{position:absolute;top:-6px;right:-6px;min-width:15px;padding:0 3px;background:#c0392b;color:#fff;border-radius:8px;font-size:10px;line-height:15px;font-weight:400}#chatHead .cch b:empty{display:none}
#chatPt{background:none;border:0;font-size:14px;cursor:var(--cur-hot);padding:0 2px}
/* v460: the Thế giới / Tổ đội / Hệ thống duoi khung thong bao de thay hon */
#u20ct button[data-lt]{position:relative;height:22px!important;padding:0 8px!important;font-size:12px!important;font-weight:bold;border-radius:4px 4px 0 0;margin-right:2px;color:#e8dcc8;background:linear-gradient(#2a3a32,#121c17);border:1px solid #4d6a5d}
#u20ct button[data-lt]:hover{filter:brightness(1.25)}
#u20ct button[data-lt="chat"].on{background:linear-gradient(#f3d27a,#b8862c);border-color:#ffe9a8;color:#2a1a05;box-shadow:0 0 6px #e0c06099}
#u20ct button[data-lt="party"].on{background:linear-gradient(#9be37f,#3d8a2a);border-color:#d6ffc4;color:#0b2206;box-shadow:0 0 6px #7fe36a99}
#u20ct button[data-lt="pk"].on{background:linear-gradient(#e0705a,#8a2a1c);border-color:#ffc4b0;color:#fff;box-shadow:0 0 6px #e0604a99}
#u20ct button[data-lt="sys"].on{background:linear-gradient(#6b6b6b,#2e2e2e);border-color:#cfcfcf;color:#fff}
#u20ct .ctn{position:absolute;top:-7px;right:-6px;min-width:15px;padding:0 3px;background:#c0392b;color:#fff;border-radius:8px;font-size:10px;line-height:15px;font-weight:400}#u20ct .ctn:empty{display:none}

/* v461: khung to doi kieu JX1 (khung thanh vien 107x30 phong to 1.4) */
#ptBox{position:fixed;left:8px;top:96px;z-index:30;width:152px;font-size:11px;color:#f2ecd0;user-select:none}
#ptBox .pth{display:flex;align-items:center;gap:4px;height:18px;padding:0 2px;color:#ffd78a;text-shadow:0 0 2px #000,0 1px 1px #000;font-weight:bold}
#ptBox .ptsh{width:17px;height:17px;padding:0;border:0;background:url(img/u2/pt/show.png) 0 0/51px 17px no-repeat;image-rendering:pixelated;cursor:var(--cur-hot)}
#ptBox .ptsh:hover{background-position:-17px 0}#ptBox .ptsh.off{background-position:-34px 0}
#ptBox .ptf{position:relative;width:150px;height:42px;margin:2px 0;background:url(img/u2/pt/frame.png) 0 0/150px 42px no-repeat;image-rendering:pixelated;cursor:var(--cur-hot)}
#ptBox .ptf:hover{filter:brightness(1.2)}
#ptBox .ptf .fi{position:absolute;left:4px;top:4px;width:29px;height:33px;background:url(img/u2/pt/fac.png) 0 0/1200% 100% no-repeat;image-rendering:auto}
#ptBox .ptf.dead .fi{filter:grayscale(1) brightness(.6)}
#ptBox .ptf .fl{position:absolute;left:-5px;top:-6px;width:18px;height:24px;background:url(img/u2/pt/flag.png) 0 0/100% 100% no-repeat;image-rendering:pixelated}
#ptBox .ptf .nm{position:absolute;left:40px;top:6px;width:84px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#9be37f;text-shadow:0 0 2px #000,0 1px 1px #000}
#ptBox .ptf.me .nm{color:#fff3c0}
#ptBox .ptf .lv{position:absolute;right:10px;top:7px;color:#e6c67a;font-size:10px;text-shadow:0 0 2px #000}
#ptBox .ptf .lf{position:absolute;left:38px;top:27px;width:102px;height:7px;overflow:hidden}
#ptBox .ptf .lf u{display:block;height:100%;background:url(img/u2/pt/life.png) 0 0/102px 7px no-repeat;image-rendering:pixelated}
#ptBox .ptf .st{position:absolute;left:40px;top:17px;font-size:9px;color:#c9b98f;white-space:nowrap;text-shadow:0 0 2px #000}
#ptMgr .ptm .fi{flex:none;width:23px;height:26px;background:url(img/u2/pt/fac.png) 0 0/1200% 100% no-repeat}
#ptMgr .ptchk{display:flex;align-items:center;gap:6px;margin-top:8px;font-size:12px;cursor:var(--cur-hot)}
.u20mi.pt{filter:drop-shadow(0 0 4px #7fe36a)}   /* v463: dang trong to doi */
/* v463: nut thu gon khung chat: dau "−" ro rang */
#chatBox #chatX{margin-left:auto;width:24px;height:20px;padding:0;border:1px solid #9a926c;border-radius:3px;background:linear-gradient(#4a4a3c,#1d1d16);color:#ffe9a8;font:bold 18px/16px sans-serif;cursor:var(--cur-hot);text-shadow:none}
#chatBox #chatX:hover{filter:brightness(1.3);border-color:#e0c060}
/* v468: khung chat + thong bao gon hon: bo nut 💬 / 📜 (an / hien bang nut − tren thanh the; bam the dang chon lan nua de nhan tin) */
body.u20 #chatBox:not(.open),body.u20 #u20lt{display:none!important}
body.u20 #u20ct{margin-left:0!important;padding-left:4px;align-items:flex-end}
body.u20 #u20lines{max-height:180px;padding:5px 10px 4px;background:linear-gradient(90deg,#000d 0%,#000b 65%,#0000 100%);border-top:1px solid #6d5a3055;border-radius:0 6px 0 0;line-height:16px}
#u20hide{pointer-events:auto;height:22px;min-width:24px;padding:0 6px;margin-left:2px;border:1px solid #9a926c;border-radius:4px 4px 0 0;background:linear-gradient(#4a4a3c,#1d1d16);color:#ffe9a8;font:bold 16px/18px sans-serif;cursor:var(--cur-hot)}
#u20hide:hover{filter:brightness(1.3);border-color:#e0c060}
body.u20logoff #u20hide{border-radius:4px;opacity:.85}
body.u20 #u20ct #u20hide{height:22px!important;min-width:26px!important;font-size:18px!important;line-height:18px!important;padding:0 7px!important;font-weight:bold!important}
/* v469: o chat co dinh duoi khung thong bao (kieu JX1: kenh · o nhap · Gui) */
#u20in{display:none}
body.u20 #u20in{display:flex;gap:3px;align-items:stretch;pointer-events:auto;margin-top:2px;padding:3px 4px;background:linear-gradient(#000c,#000e);border-top:1px solid #6d5a30aa;border-radius:0 0 6px 0}
body.u20 #u20ch{flex:none;height:24px;padding:0 8px;border:1px solid #9a926c;border-radius:3px;background:linear-gradient(#f3d27a,#b8862c);color:#2a1a05;font-weight:bold;font-size:12px;cursor:var(--cur-hot)}
body.u20 #u20ch.pt{background:linear-gradient(#9be37f,#3d8a2a);color:#0b2206;border-color:#d6ffc4}
body.u20 #u20ch::after{content:' ⇄';opacity:.7}
body.u20 #u20txt{flex:1;min-width:0;height:24px;padding:0 8px;border:1px solid #4d6a5d;border-radius:3px;background:#0b1410e6;color:#f3ead2;font-size:12.5px;outline:0}
body.u20 #u20txt:focus{border-color:#e0c060;box-shadow:0 0 6px #e0c06066}
body.u20 #u20go{flex:none;height:24px;padding:0 10px;border:1px solid #9a926c;border-radius:3px;background:linear-gradient(#4a4a3c,#1d1d16);color:#ffe9a8;font-weight:bold;font-size:12px;cursor:var(--cur-hot)}
body.u20 #u20go:hover,body.u20 #u20ch:hover{filter:brightness(1.2)}
body.u20logoff #u20in{display:none!important}
/* v471: nut kenh chat = bieu tuong tron; nut − chi an noi dung (giu thanh the + o chat) */
body.u20 #u20ch{width:26px;height:26px;padding:0;border-radius:50%;font-size:15px;line-height:24px;text-align:center;background:radial-gradient(#3a5f8a,#0d1d33);border:1px solid #9ac0e8;color:#fff;box-shadow:0 0 4px #000}
body.u20 #u20ch.pt{background:radial-gradient(#3d8a2a,#0b2206);border-color:#d6ffc4}
body.u20 #u20ch::after{content:none}
body.u20 #u20in{align-items:center}
body.u20logoff #u20ct button[data-lt]{display:inline-flex!important}
body.u20logoff #u20in{display:flex!important}
body.u20logoff #u20hide{border-radius:4px 4px 0 0;opacity:1}
/* v476: dien thoai doc: o duoi "Ngua" -> "To doi" (bieu tuong JX1), bo nut To doi tren thanh tren */
body.u2m #tabs button.tride::before{background-image:url(img/u2/team.png)!important;background-size:300% 100%!important;background-position:0 0!important}
body.u2m #tabs button.tride.on::before{background-position:100% 0!important}
body.u2m #tabs button.tride.off{opacity:1}
body.u2m #ptBtn{display:none!important}
body.u2m #tabs button.tride.inv::after{content:"";position:absolute;top:2px;right:18%;width:8px;height:8px;border-radius:50%;background:#e33;box-shadow:0 0 0 2px #0f1613}
/* v476: dien thoai doc: khung chat kieu ban may tinh (the + 3 dong + o chat), bo nut 💬 cu */
body.u2m #u20log{position:fixed;z-index:8;pointer-events:none}
body.u2m #u20lines{max-height:54px;font-size:11px;line-height:13px;padding:2px 6px;background:linear-gradient(90deg,#000c,#0007 70%,#0000);overflow:hidden}
body.u2m #u20lines div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.u2m #u20ct{display:flex;gap:2px;pointer-events:auto;padding-left:2px}
body.u2m #u20ct button[data-lt]{height:22px;padding:0 6px;font-size:11px;font-weight:bold;border-radius:4px 4px 0 0;color:#e8dcc8;background:linear-gradient(#2a3a32,#121c17);border:1px solid #4d6a5d}
body.u2m #u20ct button[data-lt="chat"].on{background:linear-gradient(#f3d27a,#b8862c);color:#2a1a05;border-color:#ffe9a8}
body.u2m #u20ct button[data-lt="party"].on{background:linear-gradient(#9be37f,#3d8a2a);color:#0b2206;border-color:#d6ffc4}
body.u2m #u20ct button[data-lt="pk"].on{background:linear-gradient(#e0705a,#8a2a1c);color:#fff;border-color:#ffc4b0}
body.u2m #u20ct button[data-lt="sys"].on{background:linear-gradient(#6b6b6b,#2e2e2e);color:#fff;border-color:#cfcfcf}
body.u2m #u20ct .ctn{position:absolute;top:-6px;right:-5px;min-width:14px;padding:0 3px;background:#c0392b;color:#fff;border-radius:7px;font-size:9px;line-height:14px}body.u2m #u20ct .ctn:empty{display:none}
body.u2m #u20ct button{position:relative}
body.u2m #u20lt{display:none!important}
body.u2m #u20hide{height:22px;min-width:24px;padding:0 6px;border:1px solid #9a926c;border-radius:4px 4px 0 0;background:linear-gradient(#4a4a3c,#1d1d16);color:#ffe9a8;font:bold 15px/18px sans-serif}
body.u2m #u20in{display:flex;gap:3px;align-items:center;pointer-events:auto;padding:3px 4px;background:#000d;border-top:1px solid #6d5a30aa}
body.u2m #u20ch{width:26px;height:26px;padding:0;border-radius:50%;font-size:14px;background:radial-gradient(#3a5f8a,#0d1d33);border:1px solid #9ac0e8;color:#fff}
body.u2m #u20ch.pt{background:radial-gradient(#3d8a2a,#0b2206);border-color:#d6ffc4}
body.u2m #u20txt{flex:1;min-width:0;height:26px;padding:0 8px;border:1px solid #4d6a5d;border-radius:3px;background:#0b1410;color:#f3ead2;font-size:13px}
body.u2m #u20go{height:26px;padding:0 10px;border:1px solid #9a926c;border-radius:3px;background:linear-gradient(#4a4a3c,#1d1d16);color:#ffe9a8;font-weight:bold;font-size:12px}
body.u2m.u20logoff #u20lines{display:none!important}
body.u2m #chatBox:not(.open){display:none!important}
/* v477: dien thoai: nut − an ca cum chat (the + o chat), chi con nut + nho */
body.u2m.u20logoff #u20ct button[data-lt],body.u2m.u20logoff #u20in{display:none!important}
body.u2m.u20logoff #u20hide{border-radius:4px;opacity:.9}
/* v481: tam dong To doi */
.ptclosed #ptBtn,.ptclosed #u20pt,.ptclosed #u20menu [data-u="team"],.ptclosed #tabRide,.ptclosed #chatHead [data-cc="p"],.ptclosed #u20ct [data-lt="party"],.ptclosed #u20ch,.ptclosed #ptBox{display:none!important}
.ptclosed #pfParty{display:none!important}
/* v483: an khung chat / thong bao o man dang nhap va chon nhan vat */
body.ngate-on #u20log,body.ngate-on #chatBox,body.ngate-on #chatBtn,body.ngate-on #ptBox,body.ngate-on #ptInv,
body:has(#csel) #u20log,body:has(#csel) #chatBox,body:has(#csel) #chatBtn,body:has(#csel) #ptBox{display:none!important}
/* v484: dien thoai dang go chat (ban phim ao): an thanh chieu / che do / the kenh, khung chat gon 3 dong sat ban phim */
body.u2m.u2kb #pad,body.u2m.u2kb #modeSw,body.u2m.u2kb #u20ct{display:none!important}
body.u2m.u2kb #u20lines{max-height:4.2em!important;overflow:hidden}
body.u2m.u2kb #u20log{background:#000a}
/* v487: di dong: chat doc duoc - xuong dong day du, cuon (vuot / thanh cuon) de doc tin cu, nam tren nhan ten ban do */
body.u2m #u20log{z-index:10}
body.u2m #u20lines{pointer-events:auto;overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;max-height:84px;font-size:11.5px;line-height:14px;padding:3px 4px 3px 6px;background:linear-gradient(90deg,#000d,#000b 75%,#0008)}
body.u2m #u20lines{scrollbar-width:none;padding-right:12px}body.u2m #u20lines::-webkit-scrollbar{display:none}
#u20sb{display:none}
body.u2m #u20sb{display:block;position:absolute;right:2px;top:0;width:6px;border-radius:3px;background:#0008;pointer-events:none}
body.u2m #u20sb i{position:absolute;left:0;right:0;border-radius:3px;background:linear-gradient(#f3d27a,#b8862e);box-shadow:0 0 3px #000}
body.u2m #u20sb.no,body.u2m.u20logoff #u20sb{display:none}
body.u2m #u20log{position:fixed}
body.u2m #u20lines div{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere;padding:1px 0;border-bottom:1px solid #ffffff0d}
body.u2m.u2kb #u20lines{max-height:4.4em!important}
/* v487: To doi tam dong: an the To doi ca khi khung chat thu gon (quy tac thu gon hien lai the kenh co do uu tien cao hon) */
html.ptclosed body #u20ct button[data-lt="party"],html.ptclosed body #chatHead button[data-cc="p"],html.ptclosed body #u20in #u20ch{display:none!important}
body.u2m #u20lines{background:#000c}
/* v488: may tinh cung vay: tin dai xuong dong day du, cuon chuot / vuot de doc tin cu, thanh cuon vang */
#u20lines div{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere}
body.u20 #u20lines,body.u20 #u20log #u20lines{pointer-events:auto!important;overflow-y:auto!important;overscroll-behavior:contain;scrollbar-width:none;padding-right:12px}
#u20lines::-webkit-scrollbar{display:none}
body.u20 #u20sb{display:block;position:absolute;right:2px;top:0;width:6px;border-radius:3px;background:#0008;pointer-events:none}
body.u20 #u20sb i{position:absolute;left:0;right:0;border-radius:3px;background:linear-gradient(#f3d27a,#b8862e);box-shadow:0 0 3px #000}
body.u20 #u20sb.no,body.u20logoff #u20sb{display:none!important}
/* v490: di dong / cua so hep: khong mo khung chat lon de len khung chat chinh (khung chinh da cuon doc tin cu duoc) */
body.u2m #chatBox{display:none!important}
/* v491: di dong: dang mo hop thoai / cua so thi an khung chat (khong de len noi dung) */
body.u2m:has(#modal:not(.hidden)) #u20log,body.u2m.u20win #u20log{display:none!important}
/* v492: may tinh / man ngang: chu chat sang hon, nen toi deu (khong mo dan sang trong suot ben phai) - de doc tren nen co */
body.u20 #u20lines{background:linear-gradient(90deg,#000d 0%,#000c 85%,#0007 100%)!important;color:#ece4cf}
body.u20 #u20lines .cl small{color:#b9ad8f}
body.u2m #u20lines{color:#ece4cf}
/* hop thoai mo: khung chat nam duoi lop hop thoai, khong chen len */
body.u20:has(#modal:not(.hidden)) #u20log{z-index:5!important}
/* v492: khung chat chinh giong khung chat lon: ten nguoi choi / mon do bam duoc (gach chan cham), chu dam ro */
#u20lines .cl{color:#f2ecd0;line-height:1.35;word-break:break-word}
#u20lines .cl i{font-style:normal;color:#e8c46a}
#u20lines .cl b[data-pn]{cursor:var(--cur-hot);text-decoration:underline dotted;text-underline-offset:2px;pointer-events:auto}
#u20lines .cl b[data-pn]:hover{filter:brightness(1.3)}
#u20lines .cl small{color:#9fd2bc}
#u20lines a.chit{cursor:var(--cur-hot);text-decoration:underline dotted;pointer-events:auto}
#u20lines .cl.sys{color:#a9a39a;font-style:italic}
/* v495: thanh doi kenh (The gioi / He thong / −) nam TREN CUNG khung chat nhu khung chat lon, khong nam giua chu va o nhap */
#u20log{display:flex!important;flex-direction:column}
body.ngate-on #u20log,body:has(#csel) #u20log,body.u2m:has(#modal:not(.hidden)) #u20log,body.u2m.u20win #u20log,body.u20:has(#chatBox.open) #u20log{display:none!important}
#u20ct{order:-1;align-items:center!important;gap:3px;padding:3px 4px!important;margin:0!important;background:linear-gradient(#2c2a20,#14130e);border:1px solid #6d5a30;border-bottom-color:#3a3220;border-radius:6px 6px 0 0;pointer-events:auto}
#u20ct #u20hide{margin-left:auto!important;border-radius:4px!important}
#u20lines{order:0;border-top:0!important;border-radius:0!important}
#u20in{order:1}
body.u20logoff #u20ct{background:none;border-color:transparent;padding:0!important}
body.u20logoff #u20ct #u20hide{margin-left:0!important}
/* v496: may tinh: khung chat cao hon (~45% chieu cao man hinh) */
body.u20:not(.u2m) #u20lines{height:min(45vh,460px)!important;max-height:min(45vh,460px)!important}
body.u20.u2s:not(.u2m) #u20lines{height:min(34vh,200px)!important;max-height:min(34vh,200px)!important}
/* v497: so nguoi online tren thanh kenh chat */
#u20onl{margin-left:auto;padding:0 6px;font-size:11px;color:#8fe08a;white-space:nowrap;pointer-events:none}
#u20onl:empty{display:none}
#u20onl::before{content:'';display:inline-block;width:7px;height:7px;border-radius:50%;background:#4cd84a;box-shadow:0 0 4px #4cd84a;margin-right:4px;vertical-align:1px}
#u20onl:not(:empty)+#u20hide{margin-left:0!important}
body.u20logoff #u20onl{display:none}
/* v498: kenh Tong hop: dong he thong mau nhat hon tin chat */
#u20lines .cl.syl{color:#cfc6a8}
#u20lines .cl.syl i{color:#8a8470}
#u20ct button[data-lt="all"].on{background:linear-gradient(#8fd0ff,#2f6fa0);border-color:#d8f0ff;color:#04182a;box-shadow:0 0 6px #6fb8ff99}
/* v502: dien thoai: bo the Giang ho (thong tin thua) - khong mo the nao thi san dau chiem het, bam lai the dang mo de dong */
body.u2m #tabs button[data-t="log"]{display:none!important}
body.u2m.tablog #panel{display:none!important}
body.u2m.tablog #battle{flex:1 1 auto!important}
/* v503: khung chat khong bi truot ngang (mat chu ben trai khi co link dai) */
#u20log,#u20lines{overflow-x:hidden!important}
#u20lines .cl{overflow-wrap:anywhere;word-break:break-word}
/* v506: UX dien thoai */
/* thanh the duoi: cac the chia deu ca chieu ngang (truoc: chua cho trong ben phai, chu bi cat "Hành tran") */
body.u2m #tabs{grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important}
/* dang mo the (Nhan vat, Hanh trang...): an khung chat de con thay san dau */
body.u2m:not(.tablog) #u20log{display:none!important}
/* man hep (<=380px, iPhone SE): thanh tren cung gon lai, khong day nut ⛶ ra ngoai man hinh */
@media (max-width:380px){
  body.u2m #actBtn,body.u2m #giftBtn,body.u2m #compactBtn,body.u2m #netBtn{width:32px!important;height:32px!important;line-height:30px!important;font-size:14px!important}
  body.u2m #gold{font-size:10px!important}
}
/* o danh dau / nut nho de cham tren dien thoai */
body.mob input[type=checkbox]{width:18px;height:18px;vertical-align:middle}
body.mob .plus:not(.u2k .plus),body.mob .minus{min-width:30px!important;min-height:30px!important}
body.mob #bName{min-width:26px;min-height:26px}
body.mob .u2buy{min-width:30px}
body.mob #u20hide{min-width:32px!important;min-height:28px!important}
/* v507: dien thoai xoay ngang - Hanh trang: cot ben phai du rong, nut khong bi cat chu */
@media (pointer:coarse){
  body.u2s[data-u2t=inv] #panel{width:min(620px,78vw)!important;left:auto!important;right:4px!important;max-width:calc(100vw - 8px)!important}
  body.u2s .u2bag{grid-template-columns:auto minmax(150px,1fr)!important}
  body.u2s #u2invB,body.u2s #u2invB2{display:grid!important;grid-template-columns:1fr 1fr!important;gap:4px!important}
  body.u2s #u2invB .btn,body.u2s #u2invB2 .btn{width:auto!important;min-width:0!important;font-size:10.5px!important;white-space:normal!important;line-height:1.15!important;padding:3px 4px!important;min-height:30px;overflow:visible!important;text-overflow:clip!important}
}
/* Ky Tran Cac: nut Mua / x10 / x100 / 1 / 10 / 100 de cham hon */
body.mob .u2buy,body.mob .u2b10,body.mob [data-ktc10],body.mob [data-ktc100]{min-width:34px!important;min-height:32px!important}
@media (pointer:coarse){
  body.u2s .u2bag .invgrid{grid-template-columns:repeat(10,28px)!important}body.u2s .u2bag .it{width:28px!important;height:28px!important}
  body.u2s[data-u2t=inv] #panel .u2bag{width:auto!important;max-width:100%!important}
  body.u2s .u2money input,body.u2s .u2money span,body.u2s .u2money b{min-width:0!important;max-width:100%!important}
}
/* Themed thin scrollbars (elements that hide their scrollbar keep doing so via more specific rules) */
*{scrollbar-width:thin;scrollbar-color:#5a5744 #0b0c0a}
::-webkit-scrollbar{width:8px;height:8px}
::-webkit-scrollbar-track{background:#0b0c0a}
::-webkit-scrollbar-thumb{background:#5a5744;border:2px solid #0b0c0a;border-radius:4px}
::-webkit-scrollbar-thumb:hover{background:#7d7a62}

/* Town bar (Biện Kinh): compact framed panel instead of a black strip across the screen */
body.u20 #townBar{width:max-content;gap:6px;padding:5px 8px 5px 12px;background:linear-gradient(#2a2117f2,#120e0af2);border:1px solid #8a6a32;border-radius:6px;box-shadow:0 0 0 1px #000,0 6px 18px #000a}
body.u20 #townBar b{flex:none;margin-right:8px;font-size:15px;letter-spacing:1px;color:#f3d27a;text-shadow:0 1px 2px #000}
/* Phone portrait: toasts sit above the skill bar (hud.js toastLift fine-tunes the offset), and the PvP target card drops below the
   top strip / mode switch (it was pinned at top:10px over level, hand power and Auto) and keeps clear of the minimap */
body.u2m #toast{position:fixed!important;bottom:96px!important;max-width:calc(100% - 16px);white-space:normal;text-align:center}
body.u2m #pvpTargetHud{left:6px!important;transform:none!important;min-width:0!important;width:calc(100% - 96px);box-sizing:border-box;padding:6px 10px!important}
/* Phones: the GM button (gm-tool.js pins it at 18px,18px) covered the avatar / mode switch; move it to free space,
   under the minimap zone label in portrait (storage-ui.js pn sets the exact spot) and beside the mode switch in landscape */
body.u2m #gmToolBtn,body.u2s #gmToolBtn{padding:5px 8px!important;font-size:11px!important}
body.u2m #gmToolBtn{left:auto!important;right:8px!important;top:204px!important}
/* Landscape left column: mode switch with GM beside it, then the buff row, then the town grid */
body.u2s #gmToolBtn{left:152px!important;top:28px!important}
body.u2s #skBuffs{top:62px!important}
/* Phone portrait: the boss bar sat on the top stat strip; it goes under the mode switch, left of the minimap */
body.u2m #u20boss{top:118px!important;left:6px!important;transform:none!important;width:calc(100% - 96px)!important}
/* Phones: town actions off the battle view. Portrait: a vertical stack under the minimap's zone label (placed by
   storage-ui.js pn, which also moves the GM button below it). Landscape: a 2x2 grid in the left column under GM.
   The town name is already on the zone label and Kỳ Trân Các is in the top row, so both are dropped here. */
body.u2m #townBar,body.u2s #townBar{right:auto!important;transform:none!important;max-width:none!important;gap:3px!important;padding:0!important;
  background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important}
body.u2m #townBar{flex-direction:column;align-items:stretch;flex-wrap:nowrap}
body.u2s #townBar:not(.hidden){display:grid!important;grid-template-columns:1fr 1fr;top:100px!important;left:4px!important;width:184px!important}
body.u2m #townBar b,body.u2m #townBar #bKtcT,body.u2s #townBar b,body.u2s #townBar #bKtcT{display:none!important}
body.u2m #townBar .btn,body.u2s #townBar .btn{width:100%;margin:0!important;height:auto!important;min-height:24px!important;padding:3px 2px!important;
  font-size:10.5px!important;line-height:1.15!important;white-space:normal;background:#0d0b09e6!important;border:1px solid #6b5333!important;
  border-radius:0!important;box-shadow:none!important;color:#d9c79f!important;text-shadow:none!important}
body.u2m #townBar .btn.on,body.u2s #townBar .btn.on{border-color:#c9a165!important;color:#f3dfb0!important}
body.u2m #townBar #bSellTown,body.u2s #townBar #bSellTown{font-size:0!important}
body.u2m #townBar #bSellTown::before,body.u2s #townBar #bSellTown::before{content:"Bán đồ lọc";font-size:10.5px}
/* Phones: "Chế Độ: 🔥 Chiến Đấu PK ▴" ran into the rotation chip in landscape; drop the "Chế Độ:" prefix */
body.u2m #mswBtn,body.u2s #mswBtn{font-size:0!important}
body.u2m #mswBtn b,body.u2s #mswBtn b{font-size:12px}
body.u2m #mswBtn::after,body.u2s #mswBtn::after{content:" ▴";font-size:10px}
/* Phone portrait tab bar: without the phone-only "mob" class (e.g. a narrow desktop window) the buttons kept the
   browser's light grey button face, which glared under the dark game; keep them dark in every portrait layout */
body.u2m #tabs button{background:transparent!important;border:0!important;border-right:1px solid #0007!important;color:#b9b29a}
body.u2m #tabs button.on{background:radial-gradient(ellipse at 50% 30%,#4a3d1c88,transparent 70%)!important}
/* Phone portrait: the open map list (inside #u20zone) slid under the chat log (z-index 10) */
body.u2m #u20zone{z-index:12!important}
/* Phone portrait header: hero name and map name stay on one line (ellipsis) instead of wrapping to 3-4 lines
   between the avatar and the Kỳ Trân Các button */
body.u2m #top .topmid{min-width:0;flex:1 1 0}
body.u2m #top .topmid .row{flex-direction:column;align-items:flex-start;gap:0;min-width:0;max-width:100%}
body.u2m #heroName,body.u2m #stageLbl{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.u2m #top .topmid .row>span{min-width:0;max-width:100%}
/* ...and give that column more room: tighter header gaps, the "online players" pill overlaps the avatar corner
   instead of taking a slot beside the map name, slightly smaller name text */
body.u2m #top{gap:4px;padding-left:6px;padding-right:6px}
body.u2m #top{position:relative}
body.u2m #mpMapBadge{position:absolute!important;left:34px;top:3px;padding:0 4px!important;font-size:9px!important;line-height:12px;z-index:2}
body.u2m #heroName{font-size:11px}
body.u2m #stageLbl{font-size:10.5px}
body.u2m #top .topmid .row>span{display:block!important}
