:root {
  --bg: #0e1113; --panel: rgba(20, 24, 27, .92); --line: #3a332a; --text: #ece4d4; --muted: #a39b8c;
  --gold: #d9a441; --gold2: #f3cf7a; --red: #d84a3a; --blue: #3d7fd8; --green: #8bc34a;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text);
  font: 14px/1.45 "Segoe UI", system-ui, sans-serif; user-select: none; }
#cv { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
button { font: inherit; color: var(--text); background: #2a2520; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
button:hover { border-color: var(--gold); }
button.main { background: linear-gradient(#b8852f, #8a5f1c); border-color: #e0b35a; color: #fff6e0; font-weight: 600; padding: 8px 20px; }
button.ghost { background: transparent; }
input { font: inherit; color: var(--text); background: #15181a; border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; width: 100%; }
input:focus { outline: none; border-color: var(--gold); }
h1 { font-size: 22px; margin: 0 0 14px; color: var(--gold2); font-weight: 600; letter-spacing: .02em; }

.screen { position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #1d1a16 0%, #0b0c0d 75%); z-index: 5; }
.screen.on { display: flex; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 26px 30px; min-width: 320px; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.box.wide { width: min(920px, 94vw); }
#load-msg { color: var(--muted); margin: 0; }
/* màn trước khi game kịp dựng màn chờ (đang tải mã game) / báo lỗi tải: nền đen, chữ ở chỗ chữ của màn chờ (src/game/loading.js) cho đồng bộ */
#s-load { background: #000; align-items: flex-end; padding-bottom: calc(max(28px, 5vh) + 22px); box-sizing: border-box; }
#s-load .box { background: none; border: 0; box-shadow: none; padding: 0; min-width: 0; width: min(640px, calc(100vw - 32px)); }
#s-load h1 { display: none; }
#s-load #load-msg { color: #f3cf7a; font-weight: 600; text-shadow: 0 1px 2px #000; }

/* đăng nhập: ảnh nền anh chọn (28/10 — assets/ui/dang-nhap/login.webp, phủ kín màn hình, giữ tỉ lệ); viền tối mờ quanh mép + khung kính
   mờ trong suốt cho chữ đọc rõ mà vẫn thấy cảnh phía sau. Màn chọn máy chủ cùng kiểu, ảnh anh chọn 28/10 (assets/ui/chon-may-chu) */
#s-login { background: #0b0c0d url("../../assets/ui/dang-nhap/login.webp") center / cover no-repeat; }
#s-server { background: #0b0c0d url("../../assets/ui/chon-may-chu/selectsever.webp") center / cover no-repeat; }
#s-login::before, #s-server::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,.3) 0%, rgba(0,0,0,.05) 45%, rgba(0,0,0,.45) 100%); }
#s-login .box, #s-server .box { position: relative; background: rgba(12,14,16,.7); border-color: rgba(201,154,74,.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#s-server .card { background: rgba(27,24,20,.78); }
.login { width: min(360px, calc(100vw - 32px)); min-width: 0; }
.login label { display: block; margin-bottom: 12px; color: var(--muted); }
.login input { margin-top: 4px; }
.lg-sv { color: var(--muted); margin: -8px 0 16px; }
.lg-err { color: #ff8a7a; min-height: 1.3em; margin-bottom: 4px; }
.lg-note { color: var(--muted); font-size: 12px; margin: 14px 0 0; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.card { text-align: left; padding: 16px; border-radius: 8px; background: #1b1814; }
.card b { display: block; font-size: 17px; color: var(--gold2); margin-bottom: 4px; }
.card small { display: block; color: var(--muted); }

.row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; color: var(--muted); }
.row.end { justify-content: flex-end; margin: 6px 0 0; }

.hud { position: fixed; inset: 0; pointer-events: none; display: none; z-index: 3; }
.hud.on { display: block; }
.hud > * { pointer-events: auto; }

/* ---------- font giao diện của bản 2: IBM Plex Mono (assets/ui/fonts, SIL OFL 1.1) ---------- */
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../../assets/ui/fonts/ibm-plex-mono-400-vietnamese.woff2) format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../../assets/ui/fonts/ibm-plex-mono-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../../assets/ui/fonts/ibm-plex-mono-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root { --font: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace; }
html, body, button, input, select { font-family: var(--font); }

/* ---------- màn chọn nhân vật (theo bản 2 js/csel.js) ---------- */
.screen.csel { flex-direction: column; justify-content: space-between; color: #f5ebd2; overflow-x: hidden; overflow-y: auto; padding: 16px 12px 18px;
  background: radial-gradient(ellipse at 50% 60%, rgba(4,18,14,.3) 0%, rgba(2,10,8,.92) 100%), url(../../assets/ui/chon_nv/nen_van_ngoc.webp) center / cover no-repeat #071412; }
.csel .cs-top { text-align: center; }
.csel h1 { margin: 2px 0 0; font-size: clamp(24px, 4vw, 36px); letter-spacing: 4px; color: #ffe090; text-shadow: 0 0 15px #c8902a, 0 2px 4px #000; font-weight: bold; text-transform: uppercase; }
.csel .cs-sub { font-size: 13px; color: #dac48c; letter-spacing: 1.5px; margin-top: 2px; }
.csel .cs-row { display: flex; gap: clamp(16px, 4vw, 56px); justify-content: center; align-items: flex-end; width: 100%; max-width: 960px; flex: 1; min-height: 0; padding-top: 10px; }
.csel .cs-slot { flex: 1; max-width: 270px; display: flex; flex-direction: column; align-items: center; cursor: pointer; position: relative; padding: 0 4px 10px;
  transition: filter .25s, transform .25s; filter: brightness(.68) saturate(.75); }
.csel .cs-slot:hover { filter: brightness(.92) saturate(.95); transform: translateY(-4px); }
.csel .cs-slot.on { filter: brightness(1.1) drop-shadow(0 0 22px rgba(255,210,80,.7)); transform: translateY(-8px) scale(1.03); }
.csel .cs-head { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 52px; width: 100%; text-align: center; margin-bottom: 6px; pointer-events: none; }
.csel .nm { font-weight: bold; font-size: clamp(14px, 3.2vw, 18px); text-shadow: 0 2px 5px #000, 0 0 8px rgba(0,0,0,.8); letter-spacing: .5px; line-height: 1.25; }
.csel .lv { font-size: clamp(11.5px, 2.6vw, 13px); color: #ded2b2; text-shadow: 0 1px 3px #000; line-height: 1.25; margin-top: 3px; }
.csel .cs-body { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; }
@keyframes csWalk { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.csel .cs-char { width: clamp(160px, 24vw, 260px); aspect-ratio: 1 / 1; max-height: 48vh; position: relative; overflow: hidden; }
.csel .cs-char i { position: absolute; left: 0; top: 0; height: 100%; background-repeat: no-repeat; background-size: 100% 100%; }
.csel .ped { width: 82%; height: 32px; margin-top: -20px; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(245,190,75,.75) 0%, rgba(160,105,30,.45) 45%, rgba(0,0,0,0) 72%); box-shadow: 0 0 18px rgba(230,160,50,.4); }
.csel .cs-slot.on .ped { background: radial-gradient(ellipse at 50% 50%, rgba(255,235,150,.95) 0%, rgba(230,155,45,.7) 45%, rgba(0,0,0,0) 74%);
  box-shadow: 0 0 30px rgba(255,195,75,.85), inset 0 0 12px rgba(255,235,160,.6); }
.csel .plus { width: 68px; height: 68px; border-radius: 50%; margin: 60px 0 30px; display: flex; align-items: center; justify-content: center;
  font-size: 42px; font-weight: 300; line-height: 1; color: #eed58a; background: radial-gradient(#251b11cc, #0e0a06ee);
  border: 1.5px solid #a88544; box-shadow: 0 0 18px rgba(0,0,0,.8), 0 0 12px rgba(238,213,138,.25); transition: transform .2s, color .2s, border-color .2s; }
.csel .cs-slot:hover .plus { transform: scale(1.12); color: #fff4d0; border-color: #ffd875; box-shadow: 0 0 22px rgba(255,216,117,.5); }
.csel .cs-panel { width: 100%; max-width: 600px; background: linear-gradient(135deg, rgba(28,20,12,.95), rgba(12,16,14,.95)); border: 2px solid #b58c48; border-radius: 8px;
  box-shadow: 0 0 0 2px #0a0805, 0 8px 30px rgba(0,0,0,.85); padding: 12px 16px; margin-top: 10px; }
.csel .cs-info { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 4px 14px; font-size: 13.5px; }
.csel .cs-info .k { color: #caa868; }
.csel .cs-empty { text-align: center; color: #d5c5a0; font-size: 13.5px; }
.csel .cs-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.csel .cs-btns button { min-width: 120px; padding: 9px 16px; font-weight: bold; border-radius: 5px; border: 1px solid #a07a34; background: linear-gradient(#5a3f1c, #2e1f0d);
  color: #f3dfae; font-size: 14px; transition: filter .15s, transform .15s; }
.csel .cs-btns button:hover { filter: brightness(1.18); transform: translateY(-1px); }
.csel .cs-btns button.go { background: linear-gradient(#c28e30, #6d4712); color: #fff8e2; border-color: #ffd875; min-width: 160px; font-size: 15px; box-shadow: 0 0 12px rgba(255,216,117,.35); }
.csel .cs-btns button.red { background: linear-gradient(#78251a, #38110c); border-color: #b84c3d; }
.csel .cs-warn { color: #ff9a7a; text-align: center; font-size: 13px; margin-top: 8px; }
.csel .cs-info .wide { grid-column: span 3; }

/* ---------- màn tạo nhân vật (theo bản 2 js/ui.js pickFaction) ---------- */
/* nền: ảnh anh chọn 28/10 (assets/ui/tao_nv/newchar.webp — sân đá tròn giữa cảnh núi lúc hoàng hôn; bản trước v3/nen_tao_nv.webp); mép trên /
   dưới tối nhẹ để chữ tiêu đề + khung tên đọc rõ trên nền trời sáng */
.screen.cc { flex-direction: column; justify-content: space-between; align-items: stretch; color: #f5ebd2; overflow: hidden;
  background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,0) 22%, rgba(0,0,0,0) 72%, rgba(0,0,0,.4)),
    url(../../assets/ui/tao_nv/newchar.webp) center / cover no-repeat #000; }
.cc-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px 0; }
.cc-title { font-size: clamp(16px, 2.2vw, 22px); font-weight: bold; color: #fce49f; letter-spacing: 3px; text-shadow: 0 0 10px #b8781a, 0 2px 4px #000; text-transform: uppercase; }
.cc-ver { font-size: 13px; color: #d8ccb0; opacity: .85; letter-spacing: 1px; }
.cc-mid { flex: 1; display: flex; align-items: center; justify-content: space-around; position: relative; padding: 0 2vw; max-height: calc(100vh - 160px); }
@keyframes ccWalk { from { transform: translateX(0); } to { transform: translateX(-100%); } }
.cc-char { position: relative; width: clamp(200px, 28vw, 360px); aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  cursor: pointer; transition: transform .2s, filter .2s; }
.cc-char:hover { transform: scale(1.02); }
.cc-vp { width: 100%; height: 100%; position: relative; overflow: hidden; }
.cc-vp i { position: absolute; left: 0; top: 0; height: 100%; background-repeat: no-repeat; background-size: 100% 100%; }
.cc-char.active .cc-vp { filter: drop-shadow(0 0 16px rgba(255,215,80,.75)) drop-shadow(0 0 32px rgba(255,255,255,.4)); }
.cc-char.inactive { filter: grayscale(100%) brightness(.65) opacity(.8); }
.cc-tag { position: absolute; bottom: -8px; font-weight: bold; font-size: clamp(13px, 1.6vw, 16px); letter-spacing: 2px; padding: 4px 18px; border-radius: 14px;
  background: rgba(0,0,0,.75); border: 1.5px solid #a88344; color: #f3dfa7; box-shadow: 0 0 10px rgba(0,0,0,.8); pointer-events: none; z-index: 5; }
.cc-char.active .cc-tag { background: linear-gradient(#b8862e, #553408); border-color: #ffe682; color: #fff; box-shadow: 0 0 12px rgba(255,215,80,.6); }
.cc-pillar { position: relative; z-index: 10; padding: 10px 0; }
.cc-pillar #cc-series { display: flex; flex-direction: column; align-items: center; gap: clamp(6px, 1.5vh, 14px); }
.cc-glow { position: absolute; top: -10%; bottom: -10%; left: 50%; width: 36px; margin-left: -18px; pointer-events: none; filter: blur(4px);
  background: radial-gradient(ellipse at center, rgba(255,235,160,.3) 0%, rgba(255,215,80,.1) 40%, rgba(255,255,255,0) 80%); }
.cc-se { width: clamp(48px, 6.5vw, 64px); height: clamp(48px, 6.5vw, 64px); border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0;
  background: radial-gradient(circle, rgba(20,20,20,.85) 0%, rgba(5,5,5,.95) 100%); border: 2px solid #5a462b; color: #a89472;
  font-size: clamp(14px, 1.8vw, 18px); font-weight: bold; transition: all .2s; box-shadow: 0 4px 10px rgba(0,0,0,.7); }
.cc-se:hover { transform: scale(1.1); filter: brightness(1.2); }
.cc-se.active { border-color: #ffd875; color: #fff; transform: scale(1.14); box-shadow: 0 0 20px rgba(255,216,117,.75), inset 0 0 10px rgba(255,216,117,.5); }
.cc-se.s-0.active { background: radial-gradient(circle, #b88a28 0%, #4a3407 100%); border-color: #ffe48a; }
.cc-se.s-1.active { background: radial-gradient(circle, #2e8a3a 0%, #0d3813 100%); border-color: #8aff96; }
.cc-se.s-2.active { background: radial-gradient(circle, #1e6fa8 0%, #082d47 100%); border-color: #7adaff; }
.cc-se.s-3.active { background: radial-gradient(circle, #b33924 0%, #4a1107 100%); border-color: #ff907a; }
.cc-se.s-4.active { background: radial-gradient(circle, #a87630 0%, #422d0e 100%); border-color: #f7cb79; }
.cc-bot { display: flex; flex-direction: column; align-items: center; padding: 0 12px 14px; z-index: 10; }
.cc-desc { max-width: 760px; width: 95%; background: rgba(8,12,10,.72); border: 1.5px solid #6b5534; border-radius: 6px; padding: 8px 16px; text-align: center;
  box-shadow: 0 0 18px rgba(0,0,0,.9); margin-bottom: 10px; }
#cc-detail { color: #7ef18c; font-size: clamp(12px, 1.4vw, 14px); line-height: 1.45; text-shadow: 0 1px 2px #000; }
#cc-detail s { opacity: .45; }
.cc-warn { color: #ff786b; font-weight: bold; font-size: 12px; }
.cc-warn:not(:empty) { margin-top: 4px; }
.cc-bar { max-width: 760px; width: 95%; display: flex; align-items: center; background: url(../../assets/ui/tao_nv/nen.webp) center / cover; border: 2px solid #ab8240;
  border-radius: 4px; box-shadow: 0 0 20px rgba(0,0,0,.95); overflow: hidden; padding: 3px; }
.cc-bar button { padding: 8px 24px; border: none; background: transparent; color: #fce49f; font-weight: bold; font-size: clamp(14px, 1.8vw, 16px);
  text-shadow: 0 0 4px #000; letter-spacing: 1px; transition: filter .15s; }
.cc-bar button:hover { filter: brightness(1.3); }
.cc-bar button.ok { padding: 8px 28px; color: #ffe882; letter-spacing: 2px; }
.cc-bar button.ok:disabled { color: #888; cursor: default; filter: none; }
.cc-name { flex: 1; display: flex; align-items: center; background: rgba(240,240,230,.92); border-radius: 3px; margin: 0 6px; padding: 0 10px; height: 38px;
  box-shadow: inset 0 1px 4px rgba(0,0,0,.5); }
.cc-name span { color: #2a2016; font-weight: bold; font-size: clamp(13px, 1.5vw, 15px); white-space: nowrap; margin-right: 8px; letter-spacing: 1px; }
.cc-name input { flex: 1; border: none; background: transparent; color: #111; font-size: clamp(13px, 1.5vw, 15px); font-weight: bold; outline: none; width: 100%; padding: 0; }
.cc-err { color: #ff9a7a; font-size: 13px; min-height: 18px; margin-top: 6px; text-shadow: 0 1px 2px #000; }

/* ---------- giao diện trong game giống client PC (src/game/hud.js, assets/ui/hud) ---------- */
:root { --jx: "VK Sans Serif 13", "IBM Plex Mono", monospace; }
#jxhud { position: fixed; inset: 0; pointer-events: none; z-index: 3; font: 13px/13px var(--jx); color: #fff; }
#jxhud .jx-top { position: absolute; top: 0; left: 50%; transform-origin: top center; background-repeat: no-repeat; pointer-events: auto; }
#jxhud .jx-bot { position: absolute; bottom: 0; left: 50%; transform-origin: bottom center; background-repeat: no-repeat; pointer-events: none; }
#jxhud .jx-top > div, #jxhud .jx-bot > * { position: absolute; }
#jxhud .jx-bot > * { pointer-events: auto; }
#jxhud .jx-logo { color: rgb(255,217,78); white-space: nowrap; line-height: 13px; }
#jxhud .jx-lv, #jxhud .jx-rank { text-align: center; line-height: 13px; color: #fff; }
#jxhud .jx-rank { pointer-events: auto; cursor: pointer; }
#jxhud .jx-bar { overflow: hidden; }
#jxhud .jx-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; }
#jxhud .jx-bar span { position: absolute; inset: 0; text-align: center; line-height: 11px; white-space: nowrap;
  text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }
#jxhud .jx-btn { background-repeat: no-repeat; cursor: pointer; }
#jxhud .jx-slot { cursor: pointer; }
#jxhud .jx-slot:hover { box-shadow: inset 0 0 0 1px rgba(255,230,120,.55); }
/* 9 ô phím tắt 1–9 (thuốc — src/game/main.js quick*): icon giữa ô, số bình góc dưới phải, ngưỡng tự uống góc trên trái; hết bình: tối */
#jxhud .jx-slot .jx-qi { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
#jxhud .jx-slot .jx-qn, #jxhud .jx-slot .jx-qa { position: absolute; font: 13px/13px var(--jx); font-style: normal; font-weight: normal; pointer-events: none; text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000, 1px 1px #000, -1px -1px #000, 1px -1px #000, -1px 1px #000; }
#jxhud .jx-slot .jx-qn { right: 2px; bottom: 1px; color: #fff; }
#jxhud .jx-slot .jx-qa { left: 1px; top: 1px; color: rgb(255,217,78); }
#jxhud .jx-slot.empty .jx-qi { filter: grayscale(1) brightness(.55); }
/* hồi chiêu (hud.setCooldowns): quạt tối quét theo chiều kim đồng hồ + số giây còn ở giữa */
#jxhud .jx-slot .jx-cd { position: absolute; inset: 1px; pointer-events: none; display: flex; align-items: center; justify-content: center;
  font: 13px/13px var(--jx); font-style: normal; color: #fff; text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000, 1px 1px #000, -1px -1px #000; }
#jxhud .jx-inback { background-repeat: no-repeat; pointer-events: none; }
#jxhud .jx-input { background: transparent; border: 0; outline: 0; padding: 0; font: 13px/15px var(--jx); caret-color: #fff; }
.jx-menu { position: fixed; z-index: 6; background: rgba(8,14,12,.92); border: 1px solid #3c6e58; box-shadow: 0 0 0 1px #000, 0 6px 18px rgba(0,0,0,.7);
  font: 13px/13px var(--jx); color: #fff; padding: 4px 0; min-width: 150px; }
.jx-menu div { padding: 4px 12px; cursor: pointer; white-space: nowrap; }
.jx-menu div:hover { background: #1f4a3a; color: rgb(255,217,78); }

/* bản đồ nhỏ (小地图_小.ini) */
#jxhud .jx-mm canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
#jxhud .jx-mm-shadow { pointer-events: none; }
#jxhud .jx-mm-name { cursor: pointer; line-height: 14px; white-space: nowrap; overflow: hidden; text-shadow: 1px 1px #000; }
#jxhud .jx-mm-name:hover { color: rgb(0,255,255) !important; }
#jxhud .jx-mm-pos { cursor: pointer; text-align: center; line-height: 14px; text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }
#jxhud .jx-mm-pos:hover { color: rgb(255,255,0) !important; }
#jxhud .jx-mm-input { position: absolute; display: none; font: 13px/14px var(--jx); color: rgb(0,255,255); background: rgba(0,0,0,.75); border: 1px solid rgb(255,0,0); outline: 0; padding: 0 2px; text-align: center; }
#jxhud .jx-auto { cursor: pointer; text-align: right; line-height: 13px; color: #9fe36a; text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }
#jxhud .jx-auto.off { color: #9a9a9a; }
/* khung chat nhiều kênh (消息集合面板_左.ini): tin dồn xuống đáy như client (TextBottom=1) */
#jxhud .jx-strip { background-repeat: no-repeat; }
#jxhud .jx-chat, #jxhud .jx-sys { display: flex; flex-direction: column; overflow-y: auto; scrollbar-width: none; line-height: 14px; word-break: break-word; }
#jxhud .jx-chat::-webkit-scrollbar, #jxhud .jx-sys::-webkit-scrollbar { display: none; }
#jxhud .jx-chat > :first-child, #jxhud .jx-sys > :first-child { margin-top: auto; }
#jxhud .jx-chat.shade { background: rgba(0,0,0,.45); }
#jxhud .jx-chat i, .jx-chmenu i { display: inline-block; vertical-align: -2px; margin-right: 2px; background-repeat: no-repeat; }
#jxhud .jx-sys { text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }
#jxhud .jx-tab { cursor: pointer; text-align: center; line-height: 13px; white-space: nowrap; }
#jxhud .jx-tab:hover { color: #fff !important; }
#jxhud .jx-chbtn { cursor: pointer; background-repeat: no-repeat; background-position: center; }
.jx-chmenu { background: rgb(32,32,32); min-width: 180px; }
.jx-chmenu div { display: flex; align-items: center; gap: 4px; padding: 2px 8px; }
.jx-chmenu i { width: 21px; height: 21px; }
.jx-menu div.on { color: rgb(255,217,78); }
.jx-menu div.khoa, .jx-menu div.khoa:hover { color: #6f7a74; background: none; cursor: default; } /* bãi chưa đủ cấp */

/* ---------- mộc nhân luyện công (src/game/mocnhan.js): bảng DPS + chỉnh kháng, hiện khi đứng gần mộc nhân ở Ba Lăng ---------- */
.mn { position: fixed; z-index: 6; left: 8px; top: 40px; width: 330px; max-width: calc(100vw - 16px); display: none; background: rgba(8,14,12,.9);
  border: 1px solid #3c6e58; box-shadow: 0 0 0 1px #000, 0 6px 18px rgba(0,0,0,.6); font: 13px/16px var(--jx); color: #fff; }
.mn.on { display: block; }
.mn-head { display: flex; align-items: center; gap: 3px; padding: 4px 6px; border-bottom: 1px solid #3c6e58; background: rgba(31,74,58,.45); }
.mn-head b { color: rgb(255,217,78); margin-right: auto; font-weight: normal; }
.mn button { font: 12px/12px var(--jx); padding: 3px 6px; border-radius: 2px; background: #16302a; border: 1px solid #3c6e58; color: #fff; cursor: pointer; }
.mn button:hover { color: rgb(255,217,78); border-color: #6aa88c; }
.mn table { width: 100%; border-collapse: collapse; }
.mn th { color: #9fc9b5; font-weight: normal; padding: 3px 4px; text-align: right; }
.mn td { padding: 2px 4px; text-align: right; font-variant-numeric: tabular-nums; }
.mn th:first-child, .mn td:first-child { text-align: left; }
.mn-dps { margin: 2px 0; }
.mn-dps tr.mn-sum td { border-top: 1px solid #24443a; color: rgb(255,217,78); }
.mn-khang { display: none; border-top: 1px solid #24443a; padding: 4px 4px 2px; }
.mn.khang .mn-khang { display: block; }
.mn-khang td:first-child { white-space: nowrap; color: #9fc9b5; }
.mn-khang input { width: 44px; font: 12px/14px var(--font); padding: 1px 3px; border-radius: 2px; background: #0b1512; border: 1px solid #3c6e58; color: #fff; text-align: right; }
.mn-r { display: flex; align-items: center; gap: 4px; margin: 5px 0 2px; color: #9fc9b5; }
.mn-r input { width: 48px; font: 12px/14px var(--font); padding: 1px 3px; background: #0b1512; border: 1px solid #3c6e58; color: #fff; }
.mn-note { color: #9fc9b5; font: 11px/14px var(--font); padding: 2px 6px 4px; }
.mn.thu table, .mn.thu .mn-khang, .mn.thu .mn-note { display: none; }

/* ---------- công cụ thử (src/game/devtool.js, chỉ máy dev) — cùng kiểu khung menu client ---------- */
.dv { position: fixed; z-index: 7; left: 8px; top: 24px; width: 400px; max-height: calc(100vh - 250px); min-height: 200px; display: none; flex-direction: column;
  background: rgba(8,14,12,.94); border: 1px solid #3c6e58; box-shadow: 0 0 0 1px #000, 0 8px 24px rgba(0,0,0,.7); font: 13px/16px var(--jx); color: #fff; }
.dv.on { display: flex; }
.dv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 4px 6px; border-bottom: 1px solid #3c6e58; background: rgba(31,74,58,.45); }
.dv-head .dv-tab { white-space: nowrap; } /* 7 thẻ (thêm Phong Lăng Độ, Dã Tẩu 27/10): xuống hàng cả thẻ, không ngắt chữ */
.dv-head b { color: rgb(255,217,78); margin-right: auto; font-weight: normal; }
.dv-body { overflow: auto; padding: 4px 8px 8px; }
.dv button { font: 13px/13px var(--jx); padding: 3px 7px; border-radius: 2px; background: #16302a; border: 1px solid #3c6e58; color: #fff; }
.dv button:hover { color: rgb(255,217,78); border-color: #6aa88c; }
.dv button.on, .dv .dv-tab.on { color: rgb(255,217,78); border-color: #8fd0b0; background: #1f4a3a; }
.dv input, .dv select { font: 12px/14px var(--font); padding: 2px 4px; border-radius: 2px; background: #0b1512; border: 1px solid #3c6e58; color: #fff; width: auto; }
.dv input[type=checkbox] { width: auto; margin: 0 2px 0 0; accent-color: #3c9e78; }
.dv .r { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 5px 0; }
.dv .k { color: #9fc9b5; min-width: 78px; }
.dv label { display: inline-flex; align-items: center; cursor: pointer; margin-left: 4px; }
.dv-sel { width: 100%; margin: 4px 0; }
.dv-note { color: #9fc9b5; font: 11px/14px var(--font); }
.dv-list { border: 1px solid #24443a; max-height: 230px; overflow: auto; margin: 4px 0; }
.dv-it { display: flex; align-items: center; gap: 6px; padding: 2px 4px; cursor: pointer; }
.dv-it:hover, .dv-it.on { background: #1f4a3a; }
.dv-it img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; flex: none; }
.dv-it small { display: block; color: #9fc9b5; font: 11px/13px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-it button { flex: none; }
.dv-detail { border: 1px solid #24443a; padding: 4px 6px; white-space: pre-line; min-height: 20px; }
.dv-detail:empty { display: none; }
.dv-detail .t1 { color: #fff; } .dv-detail .t2 { color: #8fb8ff; } .dv-detail .t3 { color: #ff9a8a; }
.dv-head { cursor: move; user-select: none; }
/* bảng quản trị (src/game/quantri.js — anh 28/10): kiểu bảng Công cụ thử, giữa màn hình; z-index như #jxwin và nằm ngay trước nó -> trên HUD,
   dưới cửa sổ / khung hỏi xác nhận của client */
.dv.qt { z-index: 4; left: 50%; top: 40px; transform: translateX(-50%); width: 800px; max-width: calc(100vw - 16px); max-height: calc(100vh - 100px); }
.qt-may { padding: 3px 8px; border-bottom: 1px solid #24443a; }
.qt-bao { color: #8fd0b0; }
.qt-bao:not(:empty) { padding: 3px 8px; border-bottom: 1px solid #24443a; }
.qt-bao.loi { color: #ff8a7a; }
.qt-ds { border: 1px solid #24443a; max-height: 220px; overflow: auto; margin: 4px 0; }
.qt-row { display: grid; grid-template-columns: 120px 1fr 240px 112px; gap: 6px; padding: 3px 6px; cursor: pointer; align-items: baseline; }
.qt-row:hover, .qt-row.on { background: #1f4a3a; }
.qt-row.qt-tieude { cursor: default; color: #9fc9b5; background: #10241e; position: sticky; top: 0; }
.qt-row .c3, .qt-row .c4 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt small { color: #9fc9b5; font: 11px/14px var(--font); }
.qt i { font-style: normal; }
.qt-xanh { color: #7ee07e; } i.qt-xanh { color: #8fb8ff; } .qt-vang { color: rgb(255,217,78); } .qt-do { color: #ff8a7a; }
.qt-box { border: 1px solid #3c6e58; padding: 4px 8px; margin: 6px 0; background: rgba(31,74,58,.18); }
.qt-nv { border-top: 1px solid #24443a; margin-top: 6px; padding-top: 2px; }
.qt-do-ds { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px 8px; margin: 2px 0 4px; }
.qt-do-ds .k, .qt-chon .k { grid-column: 1 / -1; margin-top: 4px; }
.qt-mon { display: flex; align-items: center; gap: 6px; min-width: 0; }
.qt-mon img { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; flex: none; }
.qt-mon > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt-qua { border: 1px solid #3c6e58; padding: 2px 6px 4px; margin: 4px 0; background: rgba(8,14,12,.6); }
.qt-kq { max-height: 150px; }
.qt-chon .qt-mon { padding: 2px 0; }
.qt-nk { border: 1px solid #24443a; max-height: calc(100vh - 270px); overflow: auto; margin: 4px 0; }
.qt-nkr { display: grid; grid-template-columns: 62px 90px 100px 1fr; gap: 6px; padding: 2px 6px; align-items: baseline; }
.qt-nkr:nth-child(odd) { background: rgba(31,74,58,.15); }
.qt-nkr .t { color: #9fc9b5; }
.qt-nkr .a { color: rgb(255,217,78); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qt-nkr .m { min-width: 0; overflow-wrap: anywhere; }
.qt-nkr .l { color: #cfe7dc; } .qt-nkr .l-sai-mk { color: #ff8a7a; } .qt-nkr .l-cap { color: #7ee07e; } .qt-nkr .l-hiem { color: #ffb74d; }
.qt-nkr .l-ktc, .qt-nkr .l-xu { color: #6ec6ff; } .qt-nkr .l-qt, .qt-nkr .l-tb { color: rgb(255,217,78); }
/* thông báo của quản trị: dòng chữ vàng giữa trên màn hình mọi người chơi (quantri.js loaThongBao) */
.qt-loa { position: fixed; left: 50%; top: 92px; transform: translateX(-50%); z-index: 6; max-width: min(900px, calc(100vw - 32px)); padding: 6px 16px;
  text-align: center; font: 16px/20px var(--jx); color: rgb(255,217,78); background: rgba(0,0,0,.5); border: 1px solid rgba(168,131,68,.7);
  text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; pointer-events: none; opacity: 0; transition: opacity .4s; }
.qt-loa.on { opacity: 1; }

/* ---------- cửa sổ giống client (src/game/uiwin.js + windows.js, kho assets/ui/win): hệ 1024×768 căn giữa như HUD ---------- */
#jxwin { position: fixed; left: 50%; top: 0; width: 1024px; height: 768px; transform-origin: top center; pointer-events: none; z-index: 4; }
#jxwin .jw { position: absolute; pointer-events: auto; background-repeat: no-repeat; user-select: none; color: #fff; }
#jxwin .jw-page, #jxwin .jw-i { position: absolute; background-repeat: no-repeat; }
#jxwin .jw-t { display: block; width: 100%; height: 100%; overflow: hidden; box-sizing: border-box; pointer-events: none; }
#jxwin .jw-btn, #jxwin .jw-link { cursor: pointer; }
#jxwin .jw-btn.dis { cursor: default; }
#jxwin .jw-slot:hover { outline: 1px solid rgba(255,217,78,.55); outline-offset: -1px; }
#jxwin .jw-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
#jxwin .jw-box .jw-it { position: absolute; cursor: pointer; }
/* nền ô món trong túi như client (màu đo trên ảnh game thật 25/10): mặc được xanh, thiếu yêu cầu đỏ sậm — tô từng ô, chừa đường lưới;
   món đang cầm trên tay: ẩn */
#jxwin .jw-box .jw-cell { position: absolute; pointer-events: none; }
#jxwin .jw-box .jw-cell.ok { background: rgb(0,56,41); }
#jxwin .jw-box .jw-cell.no { background: rgb(49,0,0); }
#jxwin .jw-box .jw-it:hover .jw-cell { filter: brightness(1.35); }
#jxwin .jw-box .jw-it.held { visibility: hidden; }
/* số bình của chồng thuốc: góc dưới phải ô */
#jxwin .jw-box .jw-n { position: absolute; right: 2px; bottom: 1px; font: 13px/13px var(--jx); font-weight: normal; color: #fff; pointer-events: none; text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000, 1px 1px #000, -1px -1px #000, 1px -1px #000, -1px 1px #000; }
/* ô số lượng của khung mua bán (买卖确认.ini BuyNumber) */
#jxwin .jw-num { position: absolute; left: 0; top: 0; width: 100%; height: 100%; box-sizing: border-box; background: transparent; border: 0; outline: 0; padding: 0;
  text-align: center; font: 13px/15px var(--jx); caret-color: #fff; }
/* nút "Mua tối đa (N)" liền dưới khung mua (khung client 122 × 115 không còn chỗ) */
#jxwin .jw-max { position: absolute; left: 0; height: 20px; box-sizing: border-box; margin-top: 1px; padding: 0; cursor: pointer;
  font: 12px/18px var(--jx); color: rgb(255,246,108); background: rgba(8,14,12,.92); border: 1px solid #3c6e58; border-radius: 2px; }
#jxwin .jw-max:hover:not(:disabled) { color: #fff; border-color: #6aa88c; }
#jxwin .jw-max:disabled { color: #6f7a74; cursor: default; }
/* món đang cầm trên tay: dính theo chuột (src/game/windows.js _handPick) */
.jw-hand { position: fixed; z-index: 9; pointer-events: none; display: flex; align-items: center; justify-content: center; opacity: .9; }
/* ô xem chiêu + ô xem món như client (src/game/windows.js _tipFrame, src/game/skilltip.js, src/game/itemtip.js): chữ canh giữa, không tự
   ngắt, viền chữ đen 1 điểm */
.jw-sktip { position: fixed; z-index: 8; display: none; pointer-events: none; transform-origin: 0 0; }
.jw-sktip .b { color: #fff; text-align: center; white-space: pre;
  text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000, 1px 1px #000, -1px -1px #000, 1px -1px #000, -1px 1px #000; }

/* bản đồ nhỏ dán góc phải trên, khung chat dán góc trái dưới (src/game/hud.js, anh muốn 23/10) */
#jxhud .jx-mmbox { position: absolute; top: 0; right: 0; transform-origin: top right; pointer-events: none; }
/* hàng biểu tượng trạng thái (技能状态列表.ini: ô 24, chữ thời gian y 21 cao 12, cỡ 12 giữa, màu 55,231,63) — x 24 / y 28 theo ảnh client */
#jxhud .jx-stbar { position: absolute; top: 28px; left: 24px; width: 240px; height: 72px; transform-origin: top left; pointer-events: none; }
#jxhud .jx-st { position: absolute; width: 24px; height: 33px; pointer-events: auto; }
#jxhud .jx-st img { position: absolute; left: 0; top: 0; width: 24px; height: 24px; image-rendering: pixelated; }
#jxhud .jx-st span { position: absolute; left: -6px; top: 21px; width: 36px; height: 12px; font: 13px/12px "VK Sans Serif 13", monospace; text-align: center; color: rgb(55,231,63);
  text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; white-space: nowrap; }
#jxhud .jx-chatbox { position: absolute; bottom: 0; left: 0; transform-origin: bottom left; pointer-events: none; }
/* bảng nhiệm vụ góc trái (hud.js setNhiemVu — anh 28/10): dưới 2 hàng biểu tượng trạng thái; chữ client: tên vàng 255,217,78, nhóm cam,
   chữ thường trắng, chữ bấm được xanh lá 55,231,63 gạch chân; nền đen trong như dòng tin chạy; nút mũi tên sys_up / sys_down của khung chat */
#jxhud .jx-nvbang { position: absolute; top: 104px; left: 4px; width: 214px; transform-origin: top left; pointer-events: auto;
  font: 13px/16px var(--jx); color: #fff; text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }
#jxhud .jx-nv-dau { display: flex; align-items: center; justify-content: space-between; height: 18px; padding: 0 3px 0 6px; background: rgba(0,0,0,.55);
  color: rgb(255,246,108); }
#jxhud .jx-nv-nut { width: 15px; height: 14px; background-size: 45px 14px; background-repeat: no-repeat; }
#jxhud .jx-nv-than { overflow: hidden auto; padding: 2px 6px 5px; background: rgba(0,0,0,.36); scrollbar-width: none; }
#jxhud .jx-nv-than::-webkit-scrollbar { display: none; }
#jxhud .jx-nvbang.gon .jx-nv-than { display: none; }
#jxhud .jx-nv-nhom { margin-top: 3px; color: rgb(255,166,59); }
#jxhud .jx-nv-muc { margin: 1px 0 3px; }
#jxhud .jx-nv-ten { color: rgb(255,217,78); }
#jxhud .jx-nv-ten span { color: #c9bfa5; }
#jxhud .jx-nv-dong { padding-left: 9px; word-break: break-word; }
#jxhud .jx-nv-dong.trong { padding: 2px 0; color: #c9bfa5; }
#jxhud .jx-nv-dong .bam { color: rgb(55,231,63); text-decoration: underline; }
#jxhud .jx-nv-dong .bam:hover { color: rgb(255,246,108); }
#jxhud .jx-mmbox > *, #jxhud .jx-chatbox > * { position: absolute; pointer-events: auto; }
#jxhud .jx-mmbox > .jx-mm-shadow { pointer-events: none; }
/* dòng đếm giờ thuyền Phong Lăng Độ (hud.js setThuyen) — kiểu dòng tin chạy client 新闻消息来了.ini: y 30, chữ 14 màu 255,253,122, nền đen trong 80/255 */
#jxhud .jx-thuyen { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); padding: 2px 11px; white-space: nowrap; pointer-events: none;
  font: 14px/16px "JX ASF 14", var(--jx); color: rgb(255,253,122); background: rgba(0,0,0,.31); text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }
#jxhud .jx-mmbox > .jx-mm-input { display: none; }
#jxwin .jw-clip { position: absolute; overflow: hidden; }
#jxwin .jw-face { position: absolute; background-size: 100% 100%; cursor: pointer; }
#jxwin .jw-face.on { outline: 2px solid rgb(255,217,78); outline-offset: -2px; }
#jxwin .jw-list { overflow: hidden; font: 13px/13px "VK Sans Serif 13", "IBM Plex Mono", monospace; }
#jxwin .jw-row { display: flex; justify-content: space-between; padding: 0 10px 0 28px; }
#jxwin .jw-row b { font-weight: normal; color: rgb(255,217,78); }
#jxwin .jw-note { position: absolute; text-align: center; font: 13px/16px "VK Sans Serif 13", "IBM Plex Mono", monospace; color: #c9bfa5; text-shadow: 1px 1px #000; pointer-events: none; }
#jxwin .jw { overflow: hidden; } /* như client: phần con vẽ ra ngoài khung cửa sổ bị cắt */
#jxwin .jw-mem { line-height: 14px; height: 14px; text-align: center; white-space: nowrap; }

/* con trỏ chuột của client (assets/ui/hud/cursor, ui\ui3\公共.ini CursorList) — src/game/main.js đặt --jxcur; ô gõ chữ giữ con trỏ chữ */
body.jxcur, body.jxcur * { cursor: var(--jxcur) !important; }
body.jxcur input, body.jxcur textarea { cursor: text !important; }
/* bộ đo FPS góc trái trên (src/game/main.js fpsTick) */
#fps { position: fixed; left: 4px; top: 2px; z-index: 9; font: 13px/13px "VK Sans Serif 13", "IBM Plex Mono", monospace; color: rgb(0,255,0);
  text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; pointer-events: none; white-space: nowrap; }
#fps.low { color: rgb(255,200,0); }
@media (max-width: 1100px) { #fps { top: 20px; } } /* màn hẹp: dải trên phủ cả bề ngang -> xuống dưới dải */
/* khung Trợ Thủ (src/game/trothu.js): nội dung trong nền khung Thuộc tính khác, chữ client VK Sans Serif 13; tiêu đề mục vàng như
   txtAttribListTitle của client, chữ thường màu chữ ô bật / tắt của Tùy chọn; ô đánh dấu = hình ToggleStatus của client */
#jxwin .tt { position: absolute; left: 10px; top: 62px; width: 296px; height: 346px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
  font: 13px/15px var(--jx); color: rgb(254,255,195); text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }
#jxwin .tt-h { color: rgb(255,250,0); margin: 6px 0 3px; border-bottom: 1px solid rgba(255,250,0,.25); padding-bottom: 1px; }
#jxwin .tt-h:first-child { margin-top: 0; }
#jxwin .tt-r { display: flex; align-items: center; gap: 4px; min-height: 20px; white-space: nowrap; }
#jxwin .tt-in { display: inline-block; width: 12px; }
#jxwin .tt-x { color: rgb(169,211,190); overflow: hidden; text-overflow: ellipsis; }
#jxwin .tt-l { flex: 1 1 auto; min-width: 0; } /* tên dòng thuộc tính / món không nhặt: co lại, dài thì "…" (rê chuột xem đủ) */
#jxwin .tt-t { width: 170px; text-align: left; } /* ô gõ tên món không nhặt */
#jxwin .tt-g { color: rgb(160,160,150); font-size: 12px; line-height: 14px; margin: 2px 0 2px 16px; white-space: normal; }
#jxwin .tt-c { display: inline-block; flex: none; cursor: pointer; background-repeat: no-repeat; }
#jxwin .tt-o { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgb(169,211,190); cursor: pointer; box-sizing: border-box; }
#jxwin .tt-o.on { background: radial-gradient(rgb(255,250,0) 0 35%, transparent 45%); }
#jxwin .tt-n { font: 13px/14px var(--jx); color: rgb(255,246,108); background: rgba(0,0,0,.55); border: 1px solid #6a5a35; padding: 0 2px; text-align: center; height: 16px; box-sizing: border-box; }
#jxwin .tt-s { font: 12px/14px var(--jx); color: #fff; background: #1a1610; border: 1px solid #6a5a35; padding: 0 1px; max-width: 170px; }
#jxwin .tt-b { font: 12px/14px var(--jx); color: rgb(255,217,78); background: #1a1610; border: 1px solid #6a5a35; padding: 1px 6px; cursor: pointer; }
#jxwin .tt-b:hover { color: #fff; border-color: rgb(255,217,78); }

/* bảng chọn chiêu của ô kỹ năng T / P (võ công 25/10) */
.jx-skpick { position: fixed; z-index: 7; display: flex; flex-wrap: wrap; gap: 3px; max-width: 330px; padding: 6px; background: rgba(8,14,12,.94); border: 1px solid #3c6e58; box-shadow: 0 0 0 1px #000, 0 6px 18px rgba(0,0,0,.7); font: 12px/14px var(--jx); color: #e8e2c8; }
.jx-skpick > div { position: relative; width: 34px; height: 34px; border: 1px solid #4a4434; background: #14110b; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.jx-skpick > div:hover { border-color: rgb(255,217,78); }
.jx-skpick > div.on { border-color: #7cff6b; box-shadow: inset 0 0 0 1px #7cff6b; }
.jx-skpick > div > span { font-size: 10px; line-height: 11px; text-align: center; padding: 1px; }
.jx-skpick > div > b { position: absolute; right: 1px; bottom: 0; font: 11px/11px var(--jx); color: rgb(255,217,78); text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }
.jx-skpick > p { flex-basis: 100%; margin: 3px 0 0; color: #a9a38a; font-size: 11px; }
/* icon đang kéo (chiêu / ô dùng nhanh) */
.jx-dragic { position: fixed; z-index: 30; width: 32px; height: 32px; pointer-events: none; opacity: .85; image-rendering: pixelated; }

/* màn chờ chuyển bản đồ (src/game/loading.js): ảnh nền phủ kín, tên bản đồ + thanh tải ở dưới; phủ trên mọi khung -> chờ thì không bấm được */
.zl { position: fixed; inset: 0; z-index: 9000; display: none; background: #000; opacity: 1; transition: opacity .25s; cursor: progress; }
.zl.on { display: block; }
.zl.out { opacity: 0; }
/* ảnh chờ phủ kín màn hình (anh 27/10 "full hình") — src/game/loading.js; dải tối dưới cho chữ + thanh tải */
.zl-bg { position: absolute; inset: 0; background: #0b0c0d center / cover no-repeat; }
.zl::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0) 55%, rgba(0,0,0,.75) 100%); pointer-events: none; }
.zl-bot { z-index: 1; }
.zl-bot { position: absolute; left: 50%; bottom: max(28px, 5vh); transform: translateX(-50%); width: min(640px, calc(100vw - 32px)); }
.zl-t { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; color: #f3cf7a; font-weight: 600;
  text-shadow: 0 1px 2px #000, 0 0 6px #000; font-size: 15px; }
.zl-p { color: #fff6e0; font-variant-numeric: tabular-nums; }
.zl-bar { height: 12px; border: 1px solid #c79a4a; border-radius: 3px; background: rgba(10, 8, 6, .8); box-shadow: 0 0 0 1px #000, inset 0 1px 3px #000; overflow: hidden; }
.zl-bar i { display: block; height: 100%; width: 0; background: linear-gradient(#f6d77e, #c88a2a 55%, #9a6418); transition: width .15s linear; }
/* nút dưới thanh tải (tải trước lần đầu: "Vào game ngay" — src/game/tai-truoc.js) */
.zl-nut { display: none; width: fit-content; margin: 8px 0 0 auto; padding: 4px 12px; font: 13px/15px var(--jx); color: #f3cf7a; background: rgba(10,8,6,.85); border: 1px solid #c79a4a; border-radius: 3px; cursor: pointer; }
.zl-nut:hover { color: #fff6e0; border-color: #f6d77e; }
