* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #111; font-family: 'Segoe UI', Tahoma, sans-serif; color: #e8e2d4; user-select: none; }
button { font-family: inherit; cursor: pointer; }
#game canvas { display: block; }
body.applying, body.applying * { cursor: crosshair !important; }
.dim { color: #9a927f; font-size: 12px; }

/* ---------- overlays ---------- */
#labels, #nums, #bars { position: fixed; inset: 0; pointer-events: none; contain: strict; }
/* v47: floating numbers / labels / bars move every frame — each one gets its own GPU layer so moving it is a cheap
   compositor move instead of repainting the whole full-screen overlay (that repaint was the "frame ≫ CPU" gap) */
#labels .lbl, .num, .mbar { will-change: transform; backface-visibility: hidden; }
.num { will-change: transform, opacity; }
#labels .lbl { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; white-space: nowrap; font-size: 12px; font-weight: 600;
  padding: 2px 7px; background: rgba(10, 8, 6, 0.82); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 3px; text-shadow: 0 1px 1px #000; }
#labels .lbl:hover { border-color: #fff; background: rgba(40, 34, 24, 0.95); }
.lbl.k-gold { color: #ffd040; }
.lbl.k-currency { color: #f0e0b0; border-color: #a88b4a !important; }
.lbl.k-sigil { color: #ffa040; border-color: #c07020 !important; }
.lbl.k-gem { color: #3ae0d4; border-color: #1b8a84 !important; }
.lbl.k-map { color: #eee; border-color: #ccc !important; }
.lbl.r-unique { border-color: #e0853a !important; box-shadow: 0 0 8px #e0853a; }
.lbl.r-rare { border-color: #b8b050 !important; }
.lbl.ilbl { color: #bfe0ff; font-size: 13px; border-color: #5a7aa0; background: rgba(10, 20, 40, 0.8); }
.lbl.ilbl.hov { border-color: #fff; color: #fff; }
.num { position: absolute; left: 0; top: 0; font-weight: 800; font-size: 15px; text-shadow: 1px 1px 0 #000, -1px 1px 0 #000; white-space: nowrap; }
.num.crit { font-size: 22px; }
.num.dot { font-size: 12px; opacity: 0.85; }
.num.pl { font-size: 16px; }
.num.txt { font-size: 14px; font-style: italic; }
.mbar { position: absolute; left: 0; top: 0; width: 50px; height: 5px; background: rgba(0, 0, 0, 0.7); border: 1px solid rgba(0, 0, 0, 0.8); border-radius: 2px; }
.mbar .f { height: 100%; background: #d83a3a; border-radius: 2px; }
.mbar.magic { border-color: #6a6aff; } .mbar.rare { border-color: #e8e050; width: 60px; } .mbar.rare .f { background: #e85a2a; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#topbar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); background: rgba(12, 10, 8, 0.75); border: 1px solid #6a5a3a; border-radius: 6px; padding: 5px 16px; font-size: 14px; display: flex; gap: 18px; pointer-events: none; }
#gold { color: #ffd040; }
#menu { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
#menu button { width: 46px; height: 46px; font-size: 20px; background: linear-gradient(#3a3226, #221c14); border: 2px solid #8a7040; border-radius: 8px; color: #fff; position: relative; }
#menu button small { position: absolute; bottom: 1px; right: 4px; font-size: 10px; color: #d8c08a; }
#menu button:hover { border-color: #ffe080; }
#minimap { position: absolute; top: 10px; right: 10px; pointer-events: none; }
#bigmap { position: fixed; inset: 0; display: none; pointer-events: none; background: rgba(0, 0, 0, 0.35); }
#bossbar { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); width: 520px; display: none; pointer-events: none; text-align: center; }
#bossbar .name { font-size: 18px; font-weight: 700; color: #ffb070; text-shadow: 0 0 4px #000; font-family: Georgia, serif; }
#bossbar .bar { height: 16px; background: rgba(0, 0, 0, 0.75); border: 2px solid #a88b4a; border-radius: 4px; margin-top: 3px; }
#bossbar .fill { height: 100%; background: linear-gradient(#ff5a3a, #a01a10); }
#hover-name { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.7); padding: 4px 12px; border-radius: 4px; display: none; pointer-events: none; text-align: center; font-weight: 600; min-width: 200px; }
#hover-name .normal { color: #eee; } #hover-name .magic { color: #8c8cff; } #hover-name .rare { color: #ffff77; } #hover-name .boss { color: #e0853a; }
#hover-name small { color: #aaa; font-weight: 400; }
#hover-name .hb { height: 5px; background: #300; margin-top: 3px; } #hover-name .hb div { height: 100%; background: #e03030; }
#messages { position: absolute; left: 12px; bottom: 150px; width: 460px; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.msg { background: rgba(10, 8, 6, 0.7); padding: 4px 10px; border-left: 3px solid #d8b060; font-size: 13px; transition: opacity 0.8s; border-radius: 0 4px 4px 0; }
.msg.warn { border-color: #e04040; color: #ffb0b0; }
.msg.fade { opacity: 0; }
#buffs { position: absolute; bottom: 150px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; pointer-events: none; }
.buff { width: 34px; height: 34px; background: rgba(20, 30, 10, 0.85); border: 1px solid #8ac040; border-radius: 5px; text-align: center; font-size: 17px; line-height: 26px; position: relative; }
.buff small { position: absolute; bottom: -2px; right: 2px; font-size: 10px; line-height: 12px; }
#apply-hint { position: fixed; display: none; background: rgba(20, 15, 5, 0.9); border: 1px solid #d8b060; padding: 3px 8px; font-size: 12px; pointer-events: none; z-index: 60; }
#hurt { position: fixed; inset: 0; pointer-events: none !important; box-shadow: inset 0 0 160px 40px rgba(220, 0, 0, 0.8); opacity: 0; transition: opacity 0.15s; }

#bottom { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 12px; }
.orb { width: 124px; height: 124px; border-radius: 50%; border: 4px solid #8a7040; background: #1a0808; position: relative; overflow: hidden; box-shadow: 0 0 12px #000, inset 0 0 20px #000; }
.orb .fill { position: absolute; bottom: 0; left: 0; right: 0; background: radial-gradient(circle at 40% 30%, #ff6a6a, #a01010 60%, #500000); transition: height 0.1s; }
#orb-mana { background: #080818; }
#orb-mana .fill { background: radial-gradient(circle at 40% 30%, #6a9aff, #1030b0 60%, #001050); }
.orb .es { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(160, 220, 255, 0.35); border-top: 2px solid #bfeaff; }
.orb .txt { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; font-size: 14px; text-shadow: 0 0 3px #000, 0 1px 2px #000; line-height: 1.1; }
.orb .txt small { font-size: 11px; color: #cfeeff; }
#flasks { display: flex; gap: 5px; margin-bottom: 6px; }
.flask { width: 30px; height: 64px; border: 2px solid #8a7040; border-radius: 6px 6px 12px 12px; background: #120e0a; position: relative; overflow: hidden; }
.flask .fill { position: absolute; bottom: 0; left: 0; right: 0; }
#fl-life .fill { background: linear-gradient(#ff6060, #900); } #fl-mana .fill { background: linear-gradient(#6090ff, #009); }
.flask span { position: absolute; bottom: 1px; width: 100%; text-align: center; font-size: 11px; font-weight: 700; text-shadow: 0 0 2px #000; }
#centerbar { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-bottom: 4px; }
#skillbar { display: flex; gap: 5px; }
.sk { width: 54px; height: 54px; background: linear-gradient(#2a241c, #16120c); border: 2px solid #6a5a3a; border-radius: 7px; position: relative; overflow: hidden; cursor: pointer; }
.sk.full { border-color: var(--gc); box-shadow: inset 0 0 12px color-mix(in srgb, var(--gc) 40%, transparent); }
.sk.held { transform: scale(0.94); }
.sk .icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 27px; }
.sk .cd { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0, 0, 0, 0.7); }
.sk .key { position: absolute; bottom: 1px; right: 3px; font-size: 10px; font-weight: 700; color: #f0d890; text-shadow: 0 0 2px #000; }
#xpbar { width: 364px; height: 13px; background: rgba(0, 0, 0, 0.7); border: 1px solid #6a5a3a; border-radius: 3px; position: relative; }
#xpbar .fill { height: 100%; background: linear-gradient(#e8d070, #a08020); }
#xpbar .txt { position: absolute; inset: 0; font-size: 10px; text-align: center; line-height: 12px; text-shadow: 0 0 2px #000; white-space: nowrap; }

/* ---------- panels ---------- */
.panel { position: fixed; top: 64px; bottom: 150px; display: flex; flex-direction: column; background: linear-gradient(#1e1912f5, #120f0af5); border: 2px solid #8a7040; border-radius: 8px; box-shadow: 0 0 30px #000; z-index: 20; }
.panel.right { right: 12px; width: 470px; max-width: calc(100vw - 24px); }
.panel.left { left: 12px; width: 560px; max-width: calc(100vw - 24px); }
.panel.full { left: 12px; right: 12px; }
.ph { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; border-bottom: 1px solid #5a4a2a; font-family: Georgia, serif; font-size: 17px; color: #f0d890; background: rgba(60, 45, 20, 0.4); }
.ph .x { background: none; border: none; color: #d8c08a; font-size: 18px; }
.pb { flex: 1; overflow-y: auto; padding: 10px 12px; }
.pb::-webkit-scrollbar { width: 8px; } .pb::-webkit-scrollbar-thumb { background: #5a4a2a; border-radius: 4px; }
.panel h3 { margin: 12px 0 6px; font-family: Georgia, serif; color: #e8c870; font-size: 15px; }
button.small { background: #3a3024; border: 1px solid #8a7040; color: #f0e0b0; padding: 3px 9px; border-radius: 4px; font-size: 12px; }
button.small:hover:not(:disabled) { border-color: #ffe080; }
button:disabled { opacity: 0.4; cursor: default; }
button.big { background: linear-gradient(#8a6a2a, #5a4018); border: 2px solid #e8c870; color: #fff; padding: 10px 26px; font-size: 17px; border-radius: 7px; font-weight: 700; margin: 10px 0; }
button.big:hover:not(:disabled) { filter: brightness(1.2); }

.cell { width: 42px; height: 42px; background: rgba(0, 0, 0, 0.45); border: 1px solid #3a3226; border-radius: 4px; display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.cell.has { border: 2px solid var(--rc); background: radial-gradient(circle, color-mix(in srgb, var(--rc) 22%, transparent), rgba(0,0,0,0.5)); }
.cell:hover { filter: brightness(1.4); }
.cell .ic { font-size: 22px; }
.cell .ph-ic { font-size: 22px; opacity: 0.18; }
.cell .tier { position: absolute; bottom: 0; right: 2px; font-size: 10px; font-weight: 700; }
.cell.toohigh { box-shadow: inset 0 0 12px #f00; }
.inv-top { display: flex; gap: 10px; }
.equip { display: grid; grid-template-columns: repeat(4, 50px); grid-template-rows: repeat(4, 50px); gap: 4px; }
.equip .cell { width: 50px; height: 50px; }
.eq-helmet { grid-area: 1 / 2; } .eq-amulet { grid-area: 1 / 3; } .eq-weapon { grid-area: 2 / 1 / 4 / 2; height: 104px !important; }
.eq-body { grid-area: 2 / 2 / 4 / 3; height: 104px !important; } .eq-offhand { grid-area: 2 / 3 / 4 / 4; height: 104px !important; }
.eq-ring1 { grid-area: 2 / 4; } .eq-ring2 { grid-area: 3 / 4; } .eq-gloves { grid-area: 4 / 1; } .eq-belt { grid-area: 4 / 2; } .eq-boots { grid-area: 4 / 3; }
.stats { flex: 1; font-size: 12px; }
.stats .nm { font-family: Georgia, serif; font-size: 15px; color: #f0d890; margin-bottom: 4px; }
.stats .nm small { color: #aaa; font-size: 11px; }
.stats .row { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding: 1px 0; }
.stats .dps b { color: #ffb060; }
.grid { display: grid; gap: 3px; margin-top: 10px; }
.inv-grid { grid-template-columns: repeat(10, 42px); }
.stash-grid { grid-template-columns: repeat(12, 42px); }
.currency { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.cur { width: 42px; height: 42px; background: rgba(40, 32, 20, 0.7); border: 1px solid #6a5a3a; border-radius: 4px; position: relative; text-align: center; font-size: 20px; line-height: 38px; cursor: pointer; }
.cur b { position: absolute; top: -2px; left: 3px; font-size: 11px; line-height: 14px; color: #fff; text-shadow: 0 0 2px #000; }
.cur.empty { opacity: 0.35; } .cur.act { border-color: #ffe080; box-shadow: 0 0 8px #ffe080; } .cur.sig { border-color: #c07020; }
.cur:hover { filter: brightness(1.4); }
.filter { margin-top: 10px; font-size: 12px; }
.filter select { background: #2a2218; color: #eee; border: 1px solid #6a5a3a; }

.skrow { display: flex; align-items: center; gap: 4px; padding: 6px; margin: 5px 0; background: rgba(0, 0, 0, 0.3); border-radius: 6px; }
.skkey { width: 34px; font-weight: 700; color: #f0d890; font-size: 12px; text-align: center; }
.sock { width: 38px; height: 38px; border-radius: 50%; border: 2px dashed #5a5040; display: flex; align-items: center; justify-content: center; font-size: 18px; position: relative; cursor: pointer; flex-shrink: 0; }
.sock.act { width: 48px; height: 48px; border-radius: 8px; }
.sock.full { border: 2px solid var(--gc); background: radial-gradient(circle, color-mix(in srgb, var(--gc) 35%, transparent), rgba(0,0,0,0.5)); }
.sock i { position: absolute; bottom: -3px; right: -3px; font-size: 10px; font-style: normal; background: #000; border-radius: 6px; padding: 0 3px; }
.sock.locked { opacity: 0.35; font-size: 13px; cursor: default; }
.sock.bad { border-color: #ff3030 !important; }
.sock.sel { box-shadow: 0 0 10px 3px #ffe080; }
.sock:hover { filter: brightness(1.3); }
.link { width: 7px; height: 4px; background: #3a3226; } .link.on { background: #c8a050; }
.skinfo { font-size: 11px; margin-left: auto; text-align: right; min-width: 56px; }
.baghead { display: flex; align-items: center; justify-content: space-between; }
.bag { display: flex; flex-wrap: wrap; gap: 6px; }

.shop { display: flex; flex-wrap: wrap; gap: 4px; }
.shop-it { background: rgba(0, 0, 0, 0.35); border: 1px solid #4a3e2a; border-radius: 4px; padding: 4px 8px; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.shop-it:hover { border-color: #ffe080; }
.shop-it b { color: #ffd040; }
.gi { width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--gc) 40%, #000); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }

.treehead { height: 30px; display: flex; gap: 20px; align-items: center; font-size: 14px; }
.panel.full .pb { display: flex; flex-direction: column; overflow: hidden; }
#treecv { flex: 1; width: 100%; min-height: 0; border-radius: 6px; cursor: grab; display: block; }
.atlas-wrap { display: flex; flex: 1; gap: 10px; min-height: 0; }
.atlas-left { flex: 1; min-height: 0; }
#atlascv { width: 100%; height: 100%; border-radius: 6px; }
.atlas-right { width: 360px; overflow-y: auto; font-size: 13px; }
@media (max-width: 900px) { .atlas-wrap { flex-direction: column; } .atlas-left { min-height: 320px; } .atlas-right { width: auto; } }
.ap { display: flex; align-items: center; gap: 6px; padding: 5px; margin: 4px 0; background: rgba(0, 0, 0, 0.3); border-radius: 5px; border: 1px solid transparent; }
.ap.on { border-color: #a88b4a; }
.ap > div { flex: 1; } .api { font-size: 22px; } .ap small { color: #ffe060; }

.device { display: flex; gap: 20px; align-items: center; margin: 14px 0; }
.mapslot { width: 80px !important; height: 80px !important; }
.mapslot .ic { font-size: 40px; }
.sigslots { display: grid; grid-template-columns: repeat(2, 48px); gap: 6px; }
.sigslot { width: 48px; height: 48px; }
.sigslot.has { border: 2px solid #ffa040; }
.devinfo { font-size: 13px; background: rgba(0, 0, 0, 0.3); padding: 8px; border-radius: 5px; line-height: 1.6; }
.locked-box { padding: 30px; text-align: center; font-size: 15px; }
.wp { display: flex; justify-content: space-between; align-items: center; padding: 8px; margin: 5px 0; background: rgba(0, 0, 0, 0.3); border-radius: 5px; }
.wp.locked { opacity: 0.5; }
.help { font-size: 13px; line-height: 1.55; }
.help p { margin: 4px 0 8px; }

/* ---------- tooltip ---------- */
#tooltip { position: fixed; display: none; z-index: 100; pointer-events: none; display: none; gap: 6px; }
#tooltip[style*="block"] { display: flex !important; align-items: flex-start; }
.tt { background: rgba(8, 6, 4, 0.96); border: 1px solid #6a5a3a; min-width: 240px; max-width: 360px; font-size: 13px; text-align: center; }
.tt2 { opacity: 0.85; }
.tt-cmp { font-size: 11px; color: #999; padding: 2px; background: #222; }
.tt-head { padding: 6px 10px; border-bottom: 1px solid; background: linear-gradient(rgba(255,255,255,0.06), transparent); font-family: Georgia, serif; }
.tt-name { font-size: 16px; font-weight: 700; }
.tt-base { font-size: 14px; }
.tt-body { padding: 6px 10px; }
.tt-prop { color: #9a9a9a; margin: 2px 0; } .tt-prop b { color: #fff; }
.tt-req { color: #8a8a8a; font-size: 11px; margin-top: 3px; }
.tt-sep { height: 1px; background: linear-gradient(90deg, transparent, #6a5a3a, transparent); margin: 5px 0; }
.tt-mod { color: #8888ff; margin: 2px 0; } .tt-mod.imp { color: #a0a0ff; } .tt-mod.uni { color: #d0a060; }
.tt-tier { font-size: 9px; color: #666; border: 1px solid #444; padding: 0 2px; border-radius: 2px; }
.tt-flavor { color: #b07a30; font-style: italic; font-size: 12px; }
.tt-note { color: #e8d070; font-size: 11px; margin-top: 3px; }
.tt .dps b { color: #ffb060; }

/* ---------- title / death ---------- */
#title, #death { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 200; }
#title { background: radial-gradient(circle at 50% 30%, rgba(80, 60, 30, 0.85), rgba(5, 4, 3, 0.97)); }
#death { background: rgba(40, 0, 0, 0.6); }
.title-box, .death-box { text-align: center; max-width: 760px; }
.title-box h1 { font-family: Georgia, serif; font-size: 64px; margin: 0; color: #ffd878; text-shadow: 0 0 24px #b07020, 0 4px 0 #6a4010; letter-spacing: 4px; }
.title-box .sub { color: #d8c08a; margin-bottom: 20px; }
.title-box input { background: #1a1510; border: 1px solid #8a7040; color: #fff; padding: 8px 12px; font-size: 16px; border-radius: 5px; text-align: center; }
.classes { display: flex; gap: 12px; margin: 16px 0; }
.cls { flex: 1; padding: 14px; border: 2px solid #4a3e2a; border-radius: 10px; background: rgba(0, 0, 0, 0.45); cursor: pointer; transition: transform 0.15s; }
.cls:hover { transform: translateY(-3px); }
.cls.sel { border-color: var(--c); box-shadow: 0 0 18px var(--c); }
.cls .ci { font-size: 42px; } .cls b { font-size: 18px; color: var(--c); } .cls p { font-size: 13px; color: #cfc4ae; }
.title-box .hint { color: #8a806a; font-size: 12px; }
.title-box .or { color: #8a806a; font-size: 12px; }
.death-box h1 { font-family: Georgia, serif; font-size: 52px; color: #ff5a4a; text-shadow: 0 0 20px #000; }

/* ---------- v3: accounts, runes, anvil, banners, overlay ---------- */
.title-box.auth { max-width: 460px; }
.auth-card { background: rgba(0,0,0,0.5); border: 2px solid #8a7040; border-radius: 10px; padding: 16px 20px; text-align: left; }
.auth-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.auth-tabs button { flex: 1; padding: 8px; background: #2a2218; border: 1px solid #6a5a3a; color: #cfc4ae; border-radius: 5px; font-size: 15px; }
.auth-tabs button.on { background: linear-gradient(#8a6a2a, #5a4018); color: #fff; border-color: #e8c870; }
.auth-card label { display: block; font-size: 13px; color: #d8c08a; margin: 8px 0 3px; }
.auth-card input, .title-box input { width: 100%; background: #1a1510; border: 1px solid #8a7040; color: #fff; padding: 9px 12px; font-size: 15px; border-radius: 5px; user-select: text; }
.title-box > input { width: auto; min-width: 260px; text-align: center; }
.auth-card .big { width: 100%; }
.auth-msg { min-height: 20px; color: #ff8080; font-size: 13px; margin-top: 8px; }
.auth-msg.ok { color: #80ff90; }
.acct-bar { margin: 6px 0 4px; font-size: 14px; }
.char-list { display: flex; flex-direction: column; gap: 6px; max-height: 190px; overflow-y: auto; margin: 6px auto; width: 100%; max-width: 520px; }
.char-row { display: flex; align-items: center; gap: 10px; background: rgba(0,0,0,0.45); border: 1px solid #5a4a2a; border-radius: 8px; padding: 6px 10px; text-align: left; }
.char-row .ci { font-size: 28px; } .char-row > div { flex: 1; } .char-row small { color: #aaa; }
.title-box h3 { color: #e8c870; font-family: Georgia, serif; margin: 12px 0 4px; }
.cur.rune { border-width: 2px; } .cur.rune i { position: absolute; bottom: -1px; right: 3px; font-size: 9px; font-style: normal; color: #fff; line-height: 12px; }
.cur.rune.g1 { box-shadow: inset 0 0 8px rgba(255,255,255,0.25); } .cur.rune.g2 { box-shadow: inset 0 0 12px rgba(255,220,120,0.5); }
.sect { margin-top: 10px; }
.cell .socks { position: absolute; top: 2px; left: 2px; display: flex; gap: 1px; }
.cell .socks i { width: 6px; height: 6px; border: 1px solid #ddd; transform: rotate(45deg); background: rgba(0,0,0,0.6); display: block; }
.cell .seal { position: absolute; top: 0; right: 1px; font-size: 10px; }
.cell .qual { position: absolute; bottom: 0; left: 2px; font-size: 9px; color: #8cf; }
.tt-sockets { display: flex; justify-content: center; gap: 6px; margin: 6px 0 2px; }
.tt-sockets span { width: 22px; height: 22px; border: 2px solid #aaa; transform: rotate(45deg); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: rgba(0,0,0,0.5); }
.tt-sockets .sk-rune { background: rgba(255,255,255,0.08); } .tt-sockets .sk-rune { line-height: 1; }
.tt-mod.rune { color: #9fe0ff; } .tt-mod.crafted { color: #d8e8ff; } .tt-mod.cursed { color: #ff6060; }
.tt-sealed { color: #ff4040; font-weight: 800; letter-spacing: 3px; margin-top: 6px; }
.anvil-top { display: flex; gap: 14px; align-items: center; margin: 10px 0; }
.anvil-info { font-size: 13px; }
.anvil-list { display: flex; flex-direction: column; gap: 4px; }
.anvil-row { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,0.3); padding: 5px 8px; border-radius: 5px; font-size: 13px; }
.anvil-row > span:first-child { flex: 1; } .anvil-row .cost { color: #ffd040; font-size: 12px; }
.anvil-row.off { opacity: 0.45; }
#reset-prog { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); display: none; align-items: center; gap: 10px; background: rgba(0,0,0,0.6); padding: 8px 14px; border-radius: 30px; pointer-events: none; }
#reset-prog .ring { width: 30px; height: 30px; border-radius: 50%; }
#boss-banner { position: absolute; top: 22%; left: 50%; transform: translate(-50%, -50%) scale(0.9); text-align: center; pointer-events: none; opacity: 0; transition: opacity 0.4s, transform 0.4s; }
#boss-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
#boss-banner .bb-title { font-size: 16px; letter-spacing: 6px; color: #ffb070; text-transform: uppercase; text-shadow: 0 0 8px #000; }
#boss-banner .bb-name { font-family: Georgia, serif; font-size: 52px; font-weight: 800; color: #ffe0a0; text-shadow: 0 0 20px #b04010, 0 3px 0 #5a2008, 0 0 4px #000; }
#boss-banner.soft .bb-name { font-size: 40px; color: #fff; text-shadow: 0 0 16px #2060a0, 0 2px 0 #102040; }
#boss-banner.soft .bb-title { color: #bfe0ff; }
#bigmap { background: none !important; }

.panel h3, .title-box h3, .ph, .stats .nm, .death-box h1 { font-family: 'Segoe UI', Tahoma, sans-serif !important; font-weight: 700; }


/* ================= v4: professional HUD skin ================= */
.ico { display: block; }
#menu { gap: 5px; }
#menu button { width: 44px; height: 44px; padding: 9px; border-radius: 10px; color: #d8b878;
  background: radial-gradient(circle at 50% 30%, #3e3222, #120c07 75%);
  border: 1px solid #000; box-shadow: 0 0 0 2px #5e4827, inset 0 1px 0 rgba(255,225,160,0.28), inset 0 -6px 10px rgba(0,0,0,0.6), 0 3px 8px rgba(0,0,0,0.7); transition: color .15s, box-shadow .15s; }
#menu button svg { width: 24px; height: 24px; }
#menu button:hover { color: #fff0c8; box-shadow: 0 0 0 2px #c8a060, inset 0 1px 0 rgba(255,225,160,0.4), 0 0 12px rgba(255,190,90,0.55); border-color: #000; }
#menu button small { bottom: -1px; right: 3px; color: #a88c5a; font-weight: 700; }

#centerbar { background: linear-gradient(#2a2016ee, #0f0a06ee); padding: 7px 9px 6px; border-radius: 10px; border: 1px solid #000; box-shadow: 0 0 0 2px #5e4827, inset 0 1px 0 rgba(255,220,150,0.18), 0 4px 14px rgba(0,0,0,0.8); }
#skillbar { gap: 6px; }
.sk { width: 56px; height: 56px; border-radius: 8px; background: #0b0907; border: 1px solid #000; box-shadow: 0 0 0 2px #4a3820, inset 0 0 10px #000; }
.sk.full { border-color: #000; box-shadow: 0 0 0 2px #a8823f, inset 0 0 6px #000; }
.sk:hover { box-shadow: 0 0 0 2px #e8c070, 0 0 12px rgba(255,200,100,0.5); }
.sk .icon { inset: 3px; border-radius: 6px; overflow: hidden; }
.sk .icon svg { width: 100%; height: 100%; }
.sk .key { background: linear-gradient(#3a2c1a, #1a120a); border: 1px solid #7a5e32; border-radius: 4px; padding: 0 3px; right: 2px; bottom: 2px; font-size: 9px; line-height: 12px; color: #f0d898; }
.sk .cd { background: rgba(0,0,0,0.72); }
#xpbar { height: 10px; border-radius: 5px; background: #0a0806; border: 1px solid #000; box-shadow: 0 0 0 1px #5e4827; overflow: hidden; }
#xpbar .fill { background: linear-gradient(#fff2a8, #d8a830 50%, #8a6010); box-shadow: 0 0 8px #e8b840; }
#xpbar .txt { font-size: 9.5px; line-height: 10px; }

.orb { width: 128px; height: 128px; border: none; box-shadow: 0 0 0 3px #0e0906, 0 0 0 7px #7a5e32, 0 0 0 8px #000, 0 0 0 10px #3a2c1a, 0 6px 18px rgba(0,0,0,0.8); background: radial-gradient(circle at 50% 50%, #1a0606, #050101); }
#orb-mana { background: radial-gradient(circle at 50% 50%, #06081a, #010105); }
.orb::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 34% 24%, rgba(255,255,255,0.55), rgba(255,255,255,0) 30%), radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 55%, rgba(0,0,0,0.55) 100%); }
.orb .fill { border-top: 2px solid rgba(255,255,255,0.35); background: radial-gradient(circle at 40% 20%, #ff7a6a, #c01818 45%, #5a0404 100%); }
#orb-mana .fill { background: radial-gradient(circle at 40% 20%, #7aa8ff, #1a44d0 45%, #040c50 100%); }
.orb .txt { z-index: 2; font-size: 13px; }
.flask { width: 30px; height: 66px; border: 1px solid #000; border-radius: 10px 10px 14px 14px; box-shadow: 0 0 0 2px #6a5230, inset 0 0 8px #000; background: #0c0906; }
.flask::after { content: ''; position: absolute; left: 4px; top: 6px; width: 5px; height: 40px; border-radius: 3px; background: linear-gradient(rgba(255,255,255,0.4), rgba(255,255,255,0)); }

.panel { border: 1px solid #000; box-shadow: 0 0 0 2px #6a5230, 0 0 0 3px #000, 0 12px 40px rgba(0,0,0,0.85); background: linear-gradient(#1c160f, #0e0a07); }
.ph { background: linear-gradient(#3a2c1a, #1e160d); border-bottom: 1px solid #6a5230; color: #f0d898; letter-spacing: .5px; }
.cell { background: radial-gradient(circle at 50% 40%, #1c1712, #0a0806); border: 1px solid #2e2518; }
.cell .ic { display: flex; align-items: center; justify-content: center; }
.cell .ic svg { width: 36px; height: 36px; }
.equip .cell .ic svg { width: 44px; height: 44px; }
.eq-weapon .ic svg, .eq-body .ic svg, .eq-offhand .ic svg { width: 48px !important; height: 72px !important; }
.mapslot .ic svg { width: 64px; height: 64px; }

.sock { border: 2px solid #3e3020; background: radial-gradient(circle at 50% 40%, #1a1510, #070504); border-style: solid; box-shadow: inset 0 0 8px #000; }
.sock.full { border-color: #8a6a36; background: radial-gradient(circle at 50% 40%, #241c12, #0a0705); }
.sock.act { border-radius: 10px; }
.sock svg { width: 90%; height: 90%; }
.sock i { background: #120c06; border: 1px solid #8a6a36; color: #f0d898; }
.link { width: 9px; height: 4px; border-radius: 2px; }
.link.on { background: linear-gradient(90deg, #8a6a36, #f0c870, #8a6a36); box-shadow: 0 0 4px #c89a48; }
.shop-it svg { width: 22px; height: 22px; display: inline-block; }

.curtab { margin-top: 10px; background: linear-gradient(#1a140d, #0c0906); border: 1px solid #000; box-shadow: 0 0 0 1px #5e4827; border-radius: 6px; padding: 6px 8px 8px; }
.curtab-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid #3e3020; padding-bottom: 4px; margin-bottom: 4px; }
.curtab-head span { color: #f0d898; font-weight: 700; } .curtab-head small { color: #8a7a5a; font-size: 10.5px; }
.curgrp-t { color: #b8a070; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; margin: 6px 0 3px; }
.cur { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #221a12, #0a0806); border: 1px solid #000; box-shadow: 0 0 0 1px #4a3a24; border-radius: 5px; }
.cur svg { width: 36px; height: 36px; }
.cur b { top: 1px; left: 3px; font-size: 11px; }
.cur.act { box-shadow: 0 0 0 2px #ffe080, 0 0 10px #ffc040; }
.cur:hover { box-shadow: 0 0 0 1px #c8a060; }
#apply-hint { display: none; align-items: center; gap: 8px; padding: 5px 10px 5px 6px; border-radius: 6px; background: rgba(12,9,6,0.94); border: 1px solid #000; box-shadow: 0 0 0 1px #a88b4a; font-size: 12.5px; }
#apply-hint[style*="block"] { display: flex !important; }
#apply-hint small { color: #9a8a6a; }
.tt-ic { display: flex; align-items: center; justify-content: center; gap: 6px; }
.buff { width: 36px; height: 36px; padding: 2px; background: #0a0806; border: 1px solid #000; box-shadow: 0 0 0 1px #6a8a40; }
.buff svg { width: 100%; height: 100%; }
#minimap { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.8)); }
#topbar { background: linear-gradient(#2a2016ee, #0f0a06ee); border: 1px solid #000; box-shadow: 0 0 0 1px #5e4827; }

.ph-ic.ghost { opacity: 1 !important; display: flex; align-items: center; justify-content: center; }
.eq-weapon .ph-ic.ghost svg, .eq-body .ph-ic.ghost svg, .eq-offhand .ph-ic.ghost svg { width: 48px; height: 72px; }


.sock.act.full { padding: 0; overflow: visible; }
.sock.act svg { width: 100%; height: 100%; border-radius: 8px; }
.sock .gbadge { position: absolute; top: -6px; left: -6px; width: 18px; height: 18px; }
.sock .gbadge svg { width: 18px; height: 18px; }


/* ---- v5: 3D item art & rarity backgrounds ---- */
.cell .ic img { width: 42px; height: 42px; image-rendering: auto; filter: drop-shadow(0 2px 2px rgba(0,0,0,0.8)); }
.equip .cell .ic img { width: 48px; height: 48px; }
.eq-weapon .ic img, .eq-body .ic img, .eq-offhand .ic img { width: 58px !important; height: 58px !important; }
.mapslot .ic img { width: 76px; height: 76px; }
.cell.has { border-width: 1px; }
.cell.r-normal { background: radial-gradient(circle at 50% 45%, #2a2622, #0c0a08 75%); border-color: #5a5650; }
.cell.r-magic { background: radial-gradient(circle at 50% 45%, #1e2a5a, #080a18 75%); border-color: #5a6ad0; }
.cell.r-rare { background: radial-gradient(circle at 50% 45%, #4a4212, #100e04 75%); border-color: #c8b040; }
.cell.r-unique { background: radial-gradient(circle at 50% 45%, #5a2e0e, #140a04 75%); border-color: #e0853a; box-shadow: inset 0 0 10px rgba(224,133,58,0.45); }
.cell.has:hover { filter: brightness(1.25); }

/* ================= v6: Hành Trang layout (Vietnamese RPG style) ================= */
#p-inventory { width: 820px; }
#p-inventory .pb { display: flex; flex-direction: column; overflow: hidden; padding: 8px 10px; }
.bag-head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 8px; border-bottom: 1px solid #3e3020; margin-bottom: 8px; }
.bag-head .gift { background: linear-gradient(#c89a3a, #7a5418); border: 1px solid #000; box-shadow: 0 0 0 1px #e8c870; color: #fff6d8; font-weight: 700; padding: 5px 12px; border-radius: 4px; font-size: 13px; }
.bag-head .gift:hover { filter: brightness(1.15); }
.bag-sp { flex: 1; }
.bag-money, .bag-cap { background: #0c0906; border: 1px solid #000; box-shadow: 0 0 0 1px #4e3c24; padding: 4px 12px; border-radius: 4px; font-size: 13px; color: #f0e0b0; display: flex; align-items: center; gap: 6px; }
.bag-money i.coin { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff4b0, #e0a020 60%, #7a4a00); box-shadow: 0 0 4px #ffc040; display: inline-block; }
.bag-body { display: flex; gap: 12px; flex: 1; min-height: 0; }
.bag-left { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.doll { display: grid; grid-template-columns: 72px 1fr 72px; grid-template-rows: repeat(4, 80px); grid-template-areas: "weapon helmet offhand" "gloves portrait body" "ring1 portrait ring2" "amulet belt boots";
  background: radial-gradient(ellipse at 50% 45%, #2a2216, #0e0a06 75%); border: 1px solid #000; box-shadow: 0 0 0 1px #5e4827, inset 0 0 30px rgba(0,0,0,0.8); border-radius: 6px; padding: 6px; }
.dslot { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.ds-weapon { grid-area: weapon; } .ds-helmet { grid-area: helmet; } .ds-offhand { grid-area: offhand; } .ds-gloves { grid-area: gloves; } .ds-body { grid-area: body; }
.ds-ring1 { grid-area: ring1; } .ds-ring2 { grid-area: ring2; } .ds-amulet { grid-area: amulet; } .ds-belt { grid-area: belt; } .ds-boots { grid-area: boots; }
.dslot .cell { width: 56px !important; height: 56px !important; }
.dlabel { font-size: 10.5px; color: #cbb88a; margin-top: 3px; white-space: nowrap; text-shadow: 0 1px 1px #000; }
.doll-portrait { grid-area: portrait; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.doll-portrait img { width: 96px; height: 146px; image-rendering: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.8)); }
.doll-name { font-weight: 700; color: #f0d898; font-size: 13px; margin-top: -4px; }
.doll-lv { font-size: 10.5px; color: #9a8a6a; }
.bag-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px 6px; background: #0c0906; border: 1px solid #000; box-shadow: 0 0 0 1px #4e3c24; border-radius: 6px; padding: 7px 8px; }
.bag-stats .sv { display: flex; flex-direction: column; align-items: center; text-align: center; }
.bag-stats .sv span { font-size: 10.5px; color: #8e7e5e; }
.bag-stats .sv b { font-size: 12.5px; color: #eee2c8; white-space: nowrap; }
.bag-stats .sv:nth-child(9), .bag-stats .sv:nth-child(11) { grid-column: span 2; }
.bag-right { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bag-tabs { display: flex; gap: 4px; margin-bottom: 6px; }
.bag-tabs button { flex: 1; padding: 7px 4px; background: linear-gradient(#2a2016, #140e08); border: 1px solid #000; box-shadow: 0 0 0 1px #4e3c24; color: #b8a070; font-weight: 700; font-size: 13.5px; border-radius: 4px 4px 0 0; }
.bag-tabs button.on { background: linear-gradient(#5a4424, #2a1e10); color: #fff0c8; box-shadow: 0 0 0 1px #c8a060; }
.bag-scroll { flex: 1; overflow-y: auto; min-height: 0; padding: 2px; }
.bag-scroll::-webkit-scrollbar { width: 8px; } .bag-scroll::-webkit-scrollbar-thumb { background: #5a4a2a; border-radius: 4px; }
.bag-right .inv-grid { grid-template-columns: repeat(8, 54px); gap: 5px; margin-top: 2px; }
.bag-right .cell { width: 54px; height: 54px; }
.cell { border-radius: 4px; }
.cell.has { border: 2px solid var(--rc); }
.cell.r-normal { border-color: #8a8a8a !important; }
.cell.r-magic { border-color: #4aa0ff !important; }
.cell.r-rare { border-color: #ffd84a !important; }
.cell.r-unique { border-color: #ff8a30 !important; }
.cell.gemcell { background: radial-gradient(circle at 50% 45%, #1a2a2a, #060a0a 75%); }
.cell.gemcell.sel { box-shadow: 0 0 0 2px #ffe080, 0 0 10px #ffc040; }
.cell .ic img { width: 46px !important; height: 46px !important; image-rendering: auto; filter: drop-shadow(0 2px 2px rgba(0,0,0,.7)); }
.dslot .cell .ic img { width: 48px !important; height: 48px !important; }
.cell .cnt { position: absolute; right: 2px; bottom: 0; font-size: 9.5px; font-weight: 700; color: #fff; text-shadow: 0 0 2px #000, 0 1px 1px #000; pointer-events: none; }
.cell .gemcell .ic svg, .cell.gemcell .ic svg { width: 40px; height: 40px; }
.bag-right .filter { margin-top: 6px; }
.cur b { font-size: 10px; }
/* skill bar labels */
.sk .nm { position: absolute; left: 0; right: 0; bottom: 0; font-size: 8.5px; line-height: 11px; text-align: center; color: #f4e6c0; background: linear-gradient(transparent, rgba(0,0,0,0.85)); padding-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.sk .key { top: 2px; bottom: auto; left: 2px; right: auto; }
/* spirit */
.spirit-box { margin: 10px 0 4px; padding: 8px; background: linear-gradient(#1c1224, #0c0810); border: 1px solid #000; box-shadow: 0 0 0 1px #6a4a8a; border-radius: 6px; }
.sp-head { display: flex; align-items: center; gap: 8px; color: #d8b8ff; }
.sp-bar { flex: 1; height: 8px; background: #140c1c; border: 1px solid #000; box-shadow: 0 0 0 1px #4a3a5a; border-radius: 4px; overflow: hidden; }
.sp-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7a3ad8, #d8a0ff); }
.sp-row { display: flex; gap: 10px; margin-top: 8px; }
.spsock { width: 46px !important; height: 46px !important; }
/* admin */
.adm-sec { margin-bottom: 8px; }
.adm-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0; }
button.adm { padding: 5px 9px; }
button.adm.on { background: #2a5a2a; border-color: #80ff80; }
.adm-sel { background: #1a1510; color: #eee; border: 1px solid #6a5a3a; padding: 4px; border-radius: 4px; }
#btn-admin { color: #ff9a60 !important; font-size: 20px; }
.admin-btn { background: linear-gradient(#a03a1a, #5a1a08) !important; border-color: #ffa060 !important; }

.doll-portrait img { width: 112px !important; height: 170px !important; margin-top: -12px; }
.cell .ic img { width: 50px !important; height: 50px !important; }
.dslot .cell .ic img { width: 52px !important; height: 52px !important; }


#btn-lang .lang-t { font-size: 13px; letter-spacing: 1px; color: #e8c870; }
.lang-sw { text-align: right; margin-bottom: 8px; }


/* ================= v7: skill picker, loot filter, online ================= */
#skpick { position: fixed; z-index: 60; width: 430px; max-width: calc(100vw - 16px); background: linear-gradient(#1c1812f2, #120f0bf2); border: 1px solid #8a6d3b; border-radius: 10px; box-shadow: 0 10px 40px #000c, inset 0 0 0 1px #0008; padding: 10px; color: #e8dcc0; }
#skpick .skp-h { font-size: 13px; margin-bottom: 8px; color: #d8c08a; }
#skpick .skp-h b { color: #fff; background: #3a2f1e; border: 1px solid #8a6d3b; border-radius: 4px; padding: 0 6px; }
#skpick .skp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 300px; overflow: auto; }
#skpick .skp-o { display: flex; gap: 8px; align-items: center; padding: 5px; border: 1px solid #3a3226; border-radius: 7px; background: #0006; cursor: pointer; transition: .12s; }
#skpick .skp-o:hover { border-color: var(--gc, #caa); background: #2a2218; transform: translateY(-1px); }
#skpick .skp-o.on { border-color: #ffd070; box-shadow: 0 0 10px #ffc04055 inset; }
#skpick .skp-o .ic { width: 40px; height: 40px; flex: none; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--gc, #888); }
#skpick .skp-o .t { display: flex; flex-direction: column; min-width: 0; }
#skpick .skp-o b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#skpick .skp-o small { font-size: 11px; color: #a89878; }
#skpick .skp-f { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; }
#skillbar .sk { cursor: pointer; }
#skillbar .sk:hover { filter: brightness(1.2); }

/* loot filter */
.lf-presets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.lf-preset { text-align: left; padding: 9px 10px; border-radius: 8px; border: 1px solid #4a3e2c; background: linear-gradient(#2a2319, #1a1610); color: #e8dcc0; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.lf-preset b { font-size: 14px; color: #ffd98a; }
.lf-preset small { font-size: 11px; color: #a89878; line-height: 1.3; }
.lf-preset:hover { border-color: #b08a4a; }
.lf-preset.on { border-color: #ffd070; box-shadow: 0 0 12px #ffc04044, inset 0 0 12px #ffc04022; }
.lf-cur { margin: 4px 0 8px; font-size: 13px; }
.lf-rules { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid #3a3226; padding-top: 8px; }
.lf-row { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 4px 6px; border-radius: 5px; cursor: pointer; }
.lf-row:hover { background: #ffffff0a; }
.lf-row input[type=number] { background: #0008; color: #fff; border: 1px solid #5a4a30; border-radius: 4px; padding: 3px 6px; margin-left: auto; }
.lf-legend { display: flex; gap: 10px; margin-top: 12px; }
.lf-legend .lbl { position: static; display: inline-block; padding: 2px 8px; border: 1px solid #666; border-radius: 3px; background: #000b; font-size: 12px; }
.lbl.lf-hi, .lf-legend .lf-hi { border-color: #ffe08a !important; box-shadow: 0 0 6px #ffd06088; font-weight: 700; }
.lbl.lf-top, .lf-legend .lf-top { font-size: 14px !important; background: linear-gradient(#fff2d0, #ffcf70) !important; color: #3a1a00 !important; border-color: #fff !important; box-shadow: 0 0 14px #ffb040, 0 0 2px #fff; animation: lfpulse 1.4s ease-in-out infinite; }
@keyframes lfpulse { 50% { box-shadow: 0 0 22px #ffb040, 0 0 4px #fff; } }
.filter .lf-open { padding: 3px 10px; }

/* remote players */
.rp-lbl { position: absolute; left: 0; top: 0; pointer-events: none; white-space: nowrap; font-size: 12px; color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; text-align: center; }
.rp-lbl small { color: #cfc6b0; }
.rp-lbl.friend b { color: #9fe8a0; }
.rp-lbl.party b { color: #7fd8ff; }
.rp-lbl i { display: block; height: 3px; margin: 2px auto 0; width: 60px; background: #e04040; border-radius: 2px; box-shadow: 0 0 0 1px #000; }

/* chat */
#chatbox { position: fixed; left: 14px; bottom: 150px; width: 340px; z-index: 30; display: none; pointer-events: none; }
#chatbox .cb-log { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
#chatbox .cm { background: #0009; padding: 2px 7px; border-radius: 4px; color: #eee; align-self: flex-start; max-width: 100%; word-break: break-word; }
#chatbox .cm.party b { color: #7fd8ff; }
#chatbox .cm.fr b { color: #9fe8a0; }
#chatbox .cm.me b { color: #ffd98a; }
#chatbox input { pointer-events: auto; width: 100%; margin-top: 4px; background: #000a; border: 1px solid #5a4a30; color: #fff; border-radius: 5px; padding: 5px 8px; font-size: 12.5px; opacity: .35; transition: opacity .15s; }
#chatbox input:focus { opacity: 1; outline: none; border-color: #c9a55a; }

/* party HUD */
#party-hud { position: fixed; left: 14px; top: 220px; z-index: 20; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
#party-hud .ph-t { font-size: 12px; color: #d8c08a; text-shadow: 0 1px 2px #000; }
#party-hud .ph-b { color: #9fe8a0; }
#party-hud .ph-m { width: 170px; background: #000a; border: 1px solid #3a4a5a; border-radius: 6px; padding: 3px 7px 5px; display: flex; flex-direction: column; font-size: 12px; color: #cfe8ff; opacity: .7; }
#party-hud .ph-m.here { opacity: 1; border-color: #5aa0d0; }
#party-hud .ph-m small { color: #99a; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#party-hud .ph-m i { display: block; height: 4px; background: linear-gradient(90deg, #c02020, #ff5050); border-radius: 2px; margin-top: 3px; }

/* invites */
.net-toast { position: fixed; top: 90px; left: 50%; transform: translateX(-50%); z-index: 70; background: linear-gradient(#1f2a36f5, #121a22f5); border: 1px solid #5aa0d0; border-radius: 10px; padding: 12px 16px; color: #e8f4ff; box-shadow: 0 10px 30px #000b; animation: toastin .25s ease-out; }
.net-toast .nt-b { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
@keyframes toastin { from { transform: translate(-50%, -12px); opacity: 0; } }

/* social panel */
.net-status { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; background: #0006; font-size: 12.5px; }
.net-status code { color: #9fe8a0; }
.net-status .dot, .net-row .dot { width: 9px; height: 9px; border-radius: 50%; background: #666; flex: none; display: inline-block; }
.net-status.server .dot, .net-row .dot.on { background: #4ce070; box-shadow: 0 0 6px #4ce070; }
.net-status.local .dot { background: #e0c040; box-shadow: 0 0 6px #e0c040; }
.net-srv { display: flex; gap: 6px; margin: 6px 0; }
.net-srv input { flex: 1; background: #0008; color: #fff; border: 1px solid #5a4a30; border-radius: 4px; padding: 5px 8px; }
.net-me { font-size: 12.5px; color: #cbb; margin: 4px 0 6px; }
#p-social h4 { margin: 12px 0 5px; color: #ffd98a; font-size: 14px; border-bottom: 1px solid #3a3226; padding-bottom: 3px; }
#p-social h4 small { display: block; font-weight: normal; font-size: 11px; margin-top: 2px; }
.net-row { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 5px; font-size: 13px; }
.net-row:nth-child(odd) { background: #ffffff06; }
.net-row small { color: #a89878; }
.net-row .sp { flex: 1; }
.net-row.inv { background: #2a3a1c88; border: 1px solid #5a8a3a; }
.net-row .btn { padding: 2px 8px; font-size: 12px; }
button.btn { background: linear-gradient(#3e3326, #2a2219); border: 1px solid #8a7040; color: #f0e0b0; padding: 4px 10px; border-radius: 5px; font-size: 12.5px; }
button.btn:hover:not(:disabled) { border-color: #ffe080; color: #fff; }

/* ===== v8: legendary chase drops ===== */
.lbl.lf-chase { font-size: 15px !important; color: #fff !important; background: linear-gradient(90deg, #ff4060, #ffb040, #fff060, #60ff90, #60c0ff, #c070ff, #ff4060) !important; background-size: 300% 100% !important; border-color: #fff !important; text-shadow: 0 1px 2px #000, 0 0 4px #000; animation: chaseflow 2.5s linear infinite, lfpulse 1s ease-in-out infinite !important; }
@keyframes chaseflow { to { background-position: 300% 0; } }
.tt-chase { margin-top: 6px; text-align: center; font-weight: 700; background: linear-gradient(90deg, #ff6080, #ffd060, #60e0ff, #c080ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tt-mirror { color: #bfefff !important; }

/* ===== v10: admin item shop, monster mods ===== */
.adm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 5px; margin: 6px 0 10px; }
.adm-it { position: relative; height: 50px; display: flex; align-items: center; justify-content: center; background: radial-gradient(#2a241a, #120f0a); border: 1px solid #4a3e2c; border-radius: 6px; cursor: pointer; transition: .1s; }
.adm-it:hover { border-color: #ffd070; transform: translateY(-1px); }
.adm-it small { position: absolute; right: 3px; bottom: 1px; font-size: 10px; color: #fff; text-shadow: 0 1px 2px #000; }
.adm-it.vip { border-color: #8ad0ff; box-shadow: inset 0 0 10px #60b0ff55; }
.adm-it.uq { border-color: #a05a20; }
.adm-it.chase { border: 2px solid transparent; background: linear-gradient(#1a140c, #1a140c) padding-box, linear-gradient(90deg, #ff4060, #ffd060, #60e0ff, #c070ff) border-box; animation: lfpulse 1.4s ease-in-out infinite; }
.adm-sec h3 small { font-weight: normal; font-size: 11px; }
#hover-name .mm { font-weight: 600; color: #e8d8b0; }
#hover-name .mm.hard { color: #ff8a60; text-shadow: 0 0 6px #ff400088; }

/* ===== v11: trade window ===== */
.tr-head { font-size: 15px; margin-bottom: 8px; color: #ffd98a; }
.tr-side { border: 1px solid #3a3226; border-radius: 8px; padding: 8px; margin-bottom: 8px; background: #0005; transition: .2s; }
.tr-side.acc { border-color: #4ce070; box-shadow: 0 0 12px #4ce07044 inset; }
.tr-side h4 { margin: 0 0 6px; font-size: 13px; color: #e8dcc0; }
.tr-side h4 .ok { color: #6cf08a; margin-left: 6px; }
.tr-side h4 small { display: block; font-weight: normal; font-size: 11px; margin-top: 2px; }
.tr-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.tr-cell { aspect-ratio: 1; border: 1px solid #3a3226; border-radius: 5px; background: radial-gradient(#221c14, #0e0b08); display: flex; align-items: center; justify-content: center; }
.tr-cell.has { border-color: var(--rc); box-shadow: inset 0 0 10px color-mix(in srgb, var(--rc) 35%, transparent); cursor: pointer; }
.tr-side.theirs .tr-cell.has { cursor: help; }
.tr-cur { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; min-height: 26px; align-items: center; }
.tr-c { display: inline-flex; align-items: center; gap: 4px; background: #2a2218; border: 1px solid #5a4a30; border-radius: 14px; padding: 2px 8px 2px 4px; font-size: 12px; }
.tr-side.mine .tr-c { cursor: pointer; }
.tr-side.mine .tr-c:hover { border-color: #ff8a60; }
.tr-add { display: flex; gap: 6px; margin-top: 6px; }
.tr-add select { flex: 1; background: #0008; color: #fff; border: 1px solid #5a4a30; border-radius: 4px; }
.tr-add input { width: 70px; background: #0008; color: #fff; border: 1px solid #5a4a30; border-radius: 4px; padding: 3px 6px; }
.tr-warn { font-size: 11.5px; color: #e0b070; margin: 4px 0 8px; }
.tr-btns { display: flex; gap: 8px; align-items: center; }
.tr-btns .big { margin: 0; flex: 1; }
.net-toast.trade { border-color: #e0b050; top: 150px; }

/* ===== v12: Hero Memories panel ===== */
#p-hero .pb h3 { margin: 12px 0 6px; font-size: 14px; color: #ffd98a; border-bottom: 1px solid #3a3226; padding-bottom: 3px; }
#p-hero .pb h3 small { font-weight: normal; font-size: 11px; margin-left: 6px; }
.hero-intro { font-size: 12px; color: #b8a888; line-height: 1.45; }
.hero-lock { margin: 8px 0; padding: 8px 10px; border: 1px dashed #8a5a3a; border-radius: 6px; color: #ffb080; background: #2a140a66; }
.hero-paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-path { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 10px 8px; border-radius: 10px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--hc) 45%, #3a3226); background: radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--hc) 22%, transparent), #120e0a 70%); transition: .15s; }
.hero-path:hover { transform: translateY(-2px); border-color: var(--hc); }
.hero-path.on { border: 2px solid var(--hc); box-shadow: 0 0 18px color-mix(in srgb, var(--hc) 55%, transparent), inset 0 0 18px color-mix(in srgb, var(--hc) 25%, transparent); }
.hero-path.on::after { content: '✔'; position: absolute; top: 4px; right: 7px; color: var(--hc); font-weight: 700; }
.hero-path.locked { filter: grayscale(.7) brightness(.7); }
.hero-path .hp-ic { font-size: 30px; filter: drop-shadow(0 0 6px var(--hc)); }
.hero-path b { font-size: 13.5px; color: #fff; }
.hero-path small { font-size: 11px; color: #b8a888; line-height: 1.3; }
.hero-path .hp-core { font-size: 10.5px; color: color-mix(in srgb, var(--hc) 70%, #fff); border-top: 1px solid #ffffff14; padding-top: 4px; margin-top: 2px; line-height: 1.35; }
.hero-slots { display: flex; flex-direction: column; gap: 8px; }
.hero-slot { border: 1px solid #3a3226; border-radius: 9px; padding: 8px; background: #0006; cursor: pointer; transition: .15s; }
.hero-slot.sel { border-color: #ffd070; box-shadow: 0 0 10px #ffc04033 inset; }
.hero-slot.asc { background: linear-gradient(#2a1a3a55, #0006); border-color: #6a4a8a; }
.hero-slot.asc.sel { border-color: #d0a0ff; }
.hero-slot.locked { opacity: .55; cursor: default; }
.hs-head { font-size: 13px; margin-bottom: 5px; }
.hs-head small { color: #a89878; margin-left: 4px; }
.hs-empty { font-size: 12px; color: #8a7a60; padding: 6px 2px; }
.hs-mem { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 6px; }
.hs-mem .hs-ic { width: 40px; height: 40px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: radial-gradient(#2a2238, #0e0a14); border: 1px solid #5a4a7a; }
.hs-mem span small { color: #b8a888; font-size: 11px; }
.hs-mem .hs-out { margin-left: auto; }
.hs-opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.hs-opt { border: 1px solid #4a3e2c; border-radius: 7px; padding: 6px; background: linear-gradient(#221c14, #120e0a); cursor: pointer; transition: .12s; display: flex; flex-direction: column; gap: 3px; }
.hs-opt:hover { border-color: #ffd070; transform: translateY(-1px); }
.hs-opt b { font-size: 12px; color: #ffe0a0; }
.hs-opt small { font-size: 10.5px; color: #b8a888; line-height: 1.3; }
.hs-opt.on { border: 2px solid #ffd070; background: linear-gradient(#3a2e18, #1a140a); box-shadow: 0 0 12px #ffc04055; }
.hero-slot.asc .hs-opt b { color: #e0c0ff; }
.hero-slot.asc .hs-opt.on { border-color: #d0a0ff; box-shadow: 0 0 12px #b070ff66; }
.hero-active { font-size: 12px; line-height: 1.6; color: #d8c8a8; }
.hero-active b { color: #ffe0a0; }
.lbl.k-memory { color: #d8b0ff; border-color: #8a5ac0 !important; }

/* ===== v13: skill detail breakdown ===== */
.sk-exp { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #8a7040; background: #2a2218; color: #ffd98a; font-size: 13px; cursor: pointer; flex: none; align-self: center; }
.sk-exp:hover, .sk-exp.on { background: #4a3a20; border-color: #ffe080; }
.sk-detail { margin: -2px 0 10px 34px; padding: 8px 10px; border: 1px solid #4a3e2c; border-radius: 8px; background: linear-gradient(#1a150e, #0e0b08); animation: sdIn .15s ease-out; }
@keyframes sdIn { from { opacity: 0; transform: translateY(-4px); } }
.sd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.sd-sec h5 { margin: 2px 0 4px; font-size: 11.5px; color: #c9a55a; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid #3a3226; padding-bottom: 2px; }
.sd-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 1.55; color: #b8a888; }
.sd-row b { color: #f0e6d0; font-weight: 600; text-align: right; }
.sd-row b small { color: #8fd08f; font-weight: normal; }
.sd-row i { font-style: normal; }
.sd-row.hl b { color: #ffe08a; }
.sd-row.big b { color: #ffd060; font-size: 14px; }
@media (max-width: 700px) { .sd-grid { grid-template-columns: 1fr; } .sk-detail { margin-left: 0; } }

/* =====================================================================
   v13: MOBILE / TOUCH LAYOUT  (body.mobile — set automatically on phones & tablets)
   --ui scales every control with the device's short side; safe-area keeps clear of notches.
   ===================================================================== */
#touch { display: none; }
body.mobile { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body.mobile #game canvas { touch-action: none; }
body.mobile #touch { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 25; }
body.mobile #touch > * { pointer-events: auto; }
/* hide desktop-only HUD pieces */
body.mobile #skillbar, body.mobile #flasks, body.mobile .orb, body.mobile #xpbar, body.mobile #reset-prog { display: none !important; }
body.mobile #bottom { pointer-events: none; }
/* compact life / mana / xp bars (top-left) */
#t-bars { position: absolute; left: calc(10px + env(safe-area-inset-left)); top: calc(8px + env(safe-area-inset-top)); width: calc(210px * var(--ui)); display: flex; flex-direction: column; gap: 3px; pointer-events: none !important; }
#t-bars .tb { position: relative; height: calc(15px * var(--ui)); border-radius: 8px; background: #000b; border: 1px solid #5a4a30; overflow: hidden; }
#t-bars .tb i { position: absolute; left: 0; top: 0; bottom: 0; }
#t-bars .life .f { background: linear-gradient(#ff6a5a, #a01818); }
#t-bars .life .es { background: #7fd0ff88; z-index: 1; height: 35%; }
#t-bars .mana .f { background: linear-gradient(#6aa0ff, #1a3aa0); }
#t-bars .xp { height: 5px; border: none; }
#t-bars .xp .f { background: linear-gradient(90deg, #c9a55a, #ffe08a); }
#t-bars span { position: relative; z-index: 2; font-size: calc(10px * var(--ui)); line-height: calc(15px * var(--ui)); padding-left: 6px; color: #fff; text-shadow: 0 1px 2px #000; font-weight: 600; }
/* joystick */
#t-stick-zone { position: absolute; left: 0; top: 18%; width: 42%; bottom: 0; }
#t-stick { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; transition: opacity .12s; pointer-events: none !important; }
#t-stick.on { opacity: 1; }
#t-stick::before { content: ''; position: absolute; left: -62px; top: -62px; width: 124px; height: 124px; border-radius: 50%; background: radial-gradient(#ffffff14, #ffffff06 70%); border: 2px solid #ffffff40; }
#t-stick .knob { position: absolute; left: -28px; top: -28px; width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff8e0, #c9a55a 70%); box-shadow: 0 2px 10px #000a; }
/* skill wheel (bottom-right) */
#t-skills { position: absolute; right: calc(14px + env(safe-area-inset-right)); bottom: calc(14px + env(safe-area-inset-bottom)); width: calc(250px * var(--ui)); height: calc(230px * var(--ui)); pointer-events: none !important; }
#t-skills > * { pointer-events: auto; position: absolute; }
.t-sk { border-radius: 50%; border: 2px solid #c9a55a; background: #1a140ecc; padding: 0; overflow: hidden; box-shadow: 0 3px 10px #000b; touch-action: none; }
.t-sk .ic { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.t-sk .ic svg { width: 100%; height: 100%; border-radius: 50%; }
.t-sk .cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: #000a; color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.t-sk.empty { opacity: .35; border-style: dashed; }
.t-sk.down, .t-act.down { transform: scale(.92); filter: brightness(1.3); }
.t-sk.s0 { width: calc(86px * var(--ui)); height: calc(86px * var(--ui)); right: 0; bottom: 0; border-width: 3px; }
.t-sk.s1 { width: calc(58px * var(--ui)); height: calc(58px * var(--ui)); right: calc(96px * var(--ui)); bottom: calc(2px * var(--ui)); }
.t-sk.s2 { width: calc(58px * var(--ui)); height: calc(58px * var(--ui)); right: calc(88px * var(--ui)); bottom: calc(70px * var(--ui)); }
.t-sk.s3 { width: calc(58px * var(--ui)); height: calc(58px * var(--ui)); right: calc(36px * var(--ui)); bottom: calc(118px * var(--ui)); }
.t-sk.s4 { width: calc(50px * var(--ui)); height: calc(50px * var(--ui)); right: calc(-2px * var(--ui)); bottom: calc(96px * var(--ui)); }
.t-sk.s5 { width: calc(50px * var(--ui)); height: calc(50px * var(--ui)); right: calc(160px * var(--ui)); bottom: calc(30px * var(--ui)); }
.t-act { border-radius: 50%; border: 2px solid #8a7040; background: #1a140ecc; color: #f0e0b0; font-size: calc(20px * var(--ui)); box-shadow: 0 3px 10px #000b; touch-action: none; }
.t-act.dodge { width: calc(50px * var(--ui)); height: calc(50px * var(--ui)); right: calc(156px * var(--ui)); bottom: calc(96px * var(--ui)); }
.t-act.fl { width: calc(36px * var(--ui)); height: calc(52px * var(--ui)); border-radius: 10px; overflow: hidden; bottom: calc(160px * var(--ui)); }
.t-act.fl i { position: absolute; left: 0; right: 0; bottom: 0; }
.t-act.fl.life { right: calc(150px * var(--ui)); } .t-act.fl.life i { background: linear-gradient(#ff6a5a, #901010); }
.t-act.fl.mana { right: calc(108px * var(--ui)); } .t-act.fl.mana i { background: linear-gradient(#6aa0ff, #102a90); }
/* utility buttons (under the minimap) */
#t-util { position: absolute; right: calc(8px + env(safe-area-inset-right)); top: calc(130px * var(--ui) + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 6px; }
#t-util button { width: calc(40px * var(--ui)); height: calc(40px * var(--ui)); border-radius: 10px; border: 1px solid #8a7040; background: #1a140ecc; font-size: calc(18px * var(--ui)); color: #fff; }
/* menu becomes a drawer opened with ☰ */
body.mobile #menu { display: none; position: fixed; left: 0; right: 0; top: 0; flex-wrap: wrap; justify-content: center; gap: 6px; padding: calc(10px + env(safe-area-inset-top)) 10px 10px; background: #0e0b08f2; border-bottom: 1px solid #5a4a30; z-index: 40; }
body.mobile.menu-open #menu { display: flex; }
body.mobile #menu button { width: 52px; height: 52px; }
body.mobile #minimap { width: calc(118px * var(--ui)) !important; height: calc(118px * var(--ui)) !important; top: calc(6px + env(safe-area-inset-top)); right: calc(6px + env(safe-area-inset-right)); }
body.mobile #messages { left: 50%; transform: translateX(-50%); top: calc(6px + env(safe-area-inset-top)); bottom: auto; width: min(60vw, 420px); font-size: 11.5px; pointer-events: none; }
body.mobile #buffs { top: calc(62px * var(--ui) + env(safe-area-inset-top)); left: calc(10px + env(safe-area-inset-left)); }
body.mobile #chatbox { left: calc(10px + env(safe-area-inset-left)); bottom: auto; top: calc(100px * var(--ui)); width: min(46vw, 300px); }
body.mobile #chatbox .cb-log { font-size: 11px; }
body.mobile #party-hud { top: calc(180px * var(--ui)); }
/* panels full screen, scrollable with the finger */
body.mobile .panel { left: env(safe-area-inset-left) !important; right: env(safe-area-inset-right) !important; top: env(safe-area-inset-top) !important; bottom: 0 !important; width: auto !important; max-width: none !important; height: auto !important; max-height: none !important; border-radius: 0 !important; z-index: 45; }
body.mobile .panel .pb { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; max-height: calc(var(--vh, 1vh) * 100 - 52px) !important; }
body.mobile .panel .close, body.mobile .panel .x, body.mobile .panel header button { min-width: 44px; min-height: 44px; font-size: 22px; }
body.mobile #tooltip { max-width: 92vw; font-size: 12px; }
body.mobile .sk { cursor: default; }
body.mobile #skpick { width: min(94vw, 460px); }
body.mobile .net-toast { top: 20%; }
/* title / login screens */
body.mobile .title-box { width: min(96vw, 560px); max-height: calc(var(--vh, 1vh) * 96); overflow-y: auto; padding: 14px; }
body.mobile .classes { flex-wrap: wrap; }
body.mobile input, body.mobile select, body.mobile button { font-size: 16px; } /* no auto-zoom on iOS */
/* rotate hint (phones held upright while playing) */
#t-rotate { display: none; position: fixed; inset: 0; z-index: 90; background: #0a0614f2; color: #ffe0a0; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
#t-rotate div { font-size: 54px; animation: rot 1.6s ease-in-out infinite; }
#t-rotate small { color: #b8a888; }
@keyframes rot { 50% { transform: rotate(90deg); } }
body.mobile.dev-phone.portrait.playing #t-rotate { display: flex; }
/* small / short screens (older phones, landscape with browser bars) */
body.mobile.short #t-util { top: calc(100px * var(--ui)); flex-direction: row; right: calc(130px * var(--ui)); }
body.mobile.short #chatbox { display: none !important; }
body.mobile #centerbar, body.mobile #hover-name { display: none !important; }
body.mobile #messages { top: calc(46px + env(safe-area-inset-top)); }
#t-bars span { display: block; font-size: max(9px, calc(10px * var(--ui))); white-space: nowrap; }

/* ===== v14: compact phone UI (panels / messages / labels were desktop-sized) ===== */
body.mobile .panel .pb { max-height: none !important; flex: 1 1 auto; min-height: 0; overflow-y: auto; }
body.mobile.dev-phone .panel .pb { zoom: 0.62; }
body.mobile.dev-tablet .panel .pb { zoom: 0.85; }
body.mobile.dev-phone .panel .ph { font-size: 14px; padding: 4px 10px; min-height: 0; }
body.mobile.dev-phone .panel .ph .x { min-width: 38px; min-height: 38px; font-size: 18px; }
body.mobile.dev-phone #topbar { font-size: 11px; padding: 3px 10px; top: calc(4px + env(safe-area-inset-top)); gap: 10px; }
body.mobile.dev-phone #topbar * { font-size: 11px !important; }
/* messages: small, left side under the life bars, only the newest 4 */
body.mobile #messages { left: calc(10px + env(safe-area-inset-left)) !important; transform: none !important; top: calc(64px * var(--ui) + env(safe-area-inset-top)) !important; width: min(38vw, 280px) !important; gap: 2px; }
body.mobile #messages .msg { font-size: 10px; padding: 2px 7px; line-height: 1.35; border-left-width: 2px; }
body.mobile #messages .msg:nth-last-child(n+5) { display: none; }
body.mobile #buffs { top: calc(64px * var(--ui) + 4 * 19px + env(safe-area-inset-top)); }
body.mobile #buffs .buff { transform: scale(.75); transform-origin: left top; }
/* loot & NPC labels */
body.mobile #labels .lbl { font-size: 9.5px; padding: 1px 5px; }
body.mobile #labels .lbl.lf-top, body.mobile #labels .lbl.lf-chase { font-size: 11px !important; }
body.mobile .rp-lbl { font-size: 10px; }
body.mobile #boss-banner { zoom: .65; }
body.mobile .num { font-size: 11px; } body.mobile .num.crit { font-size: 15px; } body.mobile .num.dot { font-size: 9px; } body.mobile .num.pl { font-size: 12px; } body.mobile .num.txt { font-size: 10px; }
body.mobile #chatbox { top: auto; bottom: calc(8px + env(safe-area-inset-bottom)); left: 45%; transform: translateX(-50%); width: min(30vw, 240px); }
body.mobile #party-hud { transform: scale(.75); transform-origin: left top; }

/* ===== v16: league mechanics ===== */
#league-hud { display: none; position: fixed; top: 52px; left: 50%; transform: translateX(-50%); z-index: 22; background: linear-gradient(#2a1a10ee, #120a06ee); border: 1px solid #8a6030; border-radius: 8px; padding: 6px 14px; color: #ffe8c0; font-size: 13px; pointer-events: none; white-space: nowrap; box-shadow: 0 4px 16px #000a; }
#league-hud small { color: #d8c0a0; margin-left: 6px; }
#league-hud .hb { display: inline-block; vertical-align: middle; height: 8px; width: 120px; border-radius: 4px; margin: 0 6px; background: linear-gradient(90deg, #ffd060, #e08020); box-shadow: 0 0 0 1px #000; }
#dreamfog { position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0; transition: opacity 1.5s; background: radial-gradient(ellipse at center, transparent 35%, rgba(70,30,120,.35) 70%, rgba(40,10,80,.7) 100%); animation: dreamPulse 4s ease-in-out infinite; }
@keyframes dreamPulse { 50% { filter: hue-rotate(25deg); } }
.rt-head { display: flex; align-items: center; gap: 8px; font-size: 15px; color: #ffb0a0; margin-bottom: 4px; }
.rt-head b { color: #ff6060; font-size: 18px; } .rt-head .sp { flex: 1; }
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 8px; }
.rt-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; border: 1px solid #5a2020; border-radius: 8px; background: radial-gradient(circle at 50% 20%, #3a1010, #120606); text-align: center; font-size: 12px; }
.rt-card.can { border-color: #ff5050; box-shadow: 0 0 10px #ff303040 inset; }
.rt-card.sold { opacity: .4; }
.rt-card .rt-ic { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.rt-card .ok { color: #9fe8a0; }
.rt-btns { display: flex; gap: 4px; }
body.mobile #league-hud { top: calc(30px + env(safe-area-inset-top)); font-size: 10.5px; padding: 3px 9px; }

/* ===== v17: Imp's Pact ===== */
.pk-imp { font-size: 13px; color: #ffb0a0; margin-bottom: 6px; }
.pk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.pk-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 10px; border-radius: 12px; cursor: pointer; text-align: center; border: 2px solid #6a2a2a;
  background: linear-gradient(160deg, #3a1414, #120606 70%); box-shadow: inset 0 0 20px #00000080, 0 4px 14px #000a; transition: .15s; }
.pk-card:hover { transform: translateY(-4px) rotate(-1deg); border-color: #ff6040; box-shadow: 0 0 18px #ff403066, inset 0 0 20px #00000080; }
.pk-t { font-size: 15px; font-weight: 700; color: #ffd070; text-shadow: 0 0 8px #ff6020aa; }
.pk-boon { font-size: 12px; color: #9fe8a0; }
.pk-bane { font-size: 12px; color: #ff8a80; }
.pk-card .btn { margin-top: auto; }
.pk-active { margin-top: 10px; font-size: 12px; color: #d8c0a0; }
@media (max-width: 700px) { .pk-cards { grid-template-columns: 1fr; } }

/* v18 admin showcase build */
.adm.vipbtn { background: linear-gradient(90deg, #1b3a66, #3a7bd5, #1b3a66); color: #e8f6ff; border-color: #8fd0ff; font-weight: 700; padding: 8px 14px; }
.adm.vipbtn:hover { filter: brightness(1.2); }

/* v19 league content labels: always visible and colour-coded */
.lbl.ilbl.league { font-weight: 700; font-size: 13px; padding: 3px 9px; border-width: 1px; border-style: solid; }
.lbl.ilbl.lg-altar { color: #ffd0d0; background: rgba(90,0,0,0.78); border-color: #ff4040; box-shadow: 0 0 10px rgba(255,40,40,0.75); text-shadow: 0 0 6px #ff2020; animation: lgPulse 1.4s ease-in-out infinite; }
.lbl.ilbl.lg-caravan { color: #fff0c0; background: rgba(80,55,0,0.78); border-color: #ffc040; box-shadow: 0 0 8px rgba(255,190,60,0.6); }
.lbl.ilbl.lg-mirror { color: #ecdcff; background: rgba(50,20,90,0.78); border-color: #b080ff; box-shadow: 0 0 8px rgba(176,128,255,0.6); }
.lbl.ilbl.lg-imp { color: #ffe0f0; background: rgba(80,10,50,0.78); border-color: #ff60b0; box-shadow: 0 0 8px rgba(255,96,176,0.6); }
@keyframes lgPulse { 0%,100% { box-shadow: 0 0 6px rgba(255,40,40,0.5); } 50% { box-shadow: 0 0 16px rgba(255,40,40,1); } }

/* v23 🏪 Trade House */
#p-market { width: min(1100px, calc(100vw - 24px)); }
#p-market.mk-withinv { width: calc(100vw - 506px); min-width: 380px; }
@media (max-width: 900px) { #p-market, #p-market.mk-withinv { width: calc(100vw - 24px); min-width: 0; z-index: 25; } }
#p-market .mk-body { container-type: inline-size; }
@container (max-width: 640px) { .mk-buy { grid-template-columns: 1fr !important; } }
#p-market .pb { overflow: hidden; display: flex; flex-direction: column; padding: 0; }
.mk { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.mk-tabs { display: flex; gap: 4px; padding: 8px 10px 0; border-bottom: 1px solid #5a4628; }
.mk-tab { flex: 1; padding: 8px 6px; background: #1a140c; border: 1px solid #5a4628; border-bottom: none; border-radius: 6px 6px 0 0; color: #c8b48a; font-weight: 700; cursor: pointer; }
.mk-tab.on { background: linear-gradient(#4a3818, #2a1f10); color: #ffe7a8; box-shadow: inset 0 2px 0 #ffcc55; }
.mk-wallet { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 6px 12px; background: #0e0b07; border-bottom: 1px solid #3a2e1a; font-size: 13px; }
.mk-wallet span { display: inline-flex; align-items: center; gap: 4px; }
.mk-mode { margin-left: auto; color: #9fb8d8; font-size: 12px; }
.mk-boxn { color: #ffd060; font-weight: 700; }
.mk-coin { display: inline-block; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c0, #ffc830 45%, #a06a00); box-shadow: 0 0 4px #ffb00088; vertical-align: middle; }
.mk-body { flex: 1; min-height: 0; overflow: auto; padding: 10px 12px; }
.mk-buy { display: grid; grid-template-columns: 290px 1fr; gap: 12px; min-height: 100%; }
@media (max-width: 1000px) { .mk-buy { grid-template-columns: 1fr; } }
.mk-filters { display: flex; flex-direction: column; gap: 6px; background: #15100a; border: 1px solid #3a2e1a; border-radius: 8px; padding: 8px; align-self: start; }
.mk-filters label, .mk-lab { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: #b8a47a; }
.mk-filters input, .mk-filters select, .mk-sell input, .mk-sell select { background: #0b0805; color: #f0e2c0; border: 1px solid #5a4628; border-radius: 4px; padding: 5px 6px; font-size: 13px; width: 100%; box-sizing: border-box; }
.mk-row { display: flex; gap: 6px; align-items: center; }
.mk-row .mk-q { flex: 1; }
.mk-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mk-rng { display: flex; gap: 4px; }
.mk-h { margin-top: 4px; font-weight: 700; color: #ffd98a; font-size: 12px; border-top: 1px solid #3a2e1a; padding-top: 6px; }
.mk-stat { display: flex; flex-direction: column; gap: 3px; padding: 4px; border: 1px solid #3a3020; border-radius: 4px; margin-bottom: 4px; }
.mk-stat.not { border-color: #8a2a2a; background: rgba(120, 20, 20, 0.15); }
.mk-srow { display: flex; gap: 4px; align-items: center; }
.mk-srow .mk-sk { flex: 1; min-width: 0; }
.mk-srow .mk-st { flex: 1; min-width: 0; }
.mk-srow .mk-sv, .mk-srow .mk-sx { width: 56px; }
.mk-sdel { padding: 2px 8px !important; color: #ff8080; }
.mk-fm { display: flex; gap: 4px; margin-bottom: 4px; }
.mk-fm select { flex: 1; }
.mk-fm .mk-fcnt { width: 56px; }
.mk-hl b { color: #9fd0ff; }
.mk-chk { flex-direction: row !important; align-items: center; gap: 6px !important; }
.mk-chk input { width: auto !important; }
.mk-go.big, .mk-list.big, .mk-claimbtn.big, .mk-all.big { background: linear-gradient(#e0a530, #9a6410); color: #1a0f00; font-weight: 800; border: 1px solid #ffd070; border-radius: 6px; padding: 7px 14px; cursor: pointer; }
.mk-go.big:hover, .mk-list.big:hover { filter: brightness(1.12); }
button[disabled] { opacity: .45; cursor: default; }
.mk-results { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.mk-rh { font-size: 12px; color: #b8a47a; }
.mk-empty { color: #8a7a5a; text-align: center; padding: 30px 10px; }
.mk-empty.big { font-size: 18px; }
.mk-item { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; background: linear-gradient(90deg, #1c150c, #120d08); border: 1px solid #3a2e1a; border-radius: 7px; padding: 5px 8px; }
.mk-item:hover { border-color: #8a6a30; background: linear-gradient(90deg, #261c0f, #150f09); }
.mk-item.mine { border-color: #3a6a8a; }
.mk-ic { position: relative; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; background: #0a0806; border: 1px solid #4a3a20; border-radius: 6px; cursor: help; }
.mk-cnt { position: absolute; right: 2px; bottom: 0; font-size: 11px; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000; }
.mk-info { min-width: 0; }
.mk-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: help; }
.mk-sub2, .mk-seller { font-size: 11px; color: #9a8a6a; }
.mk-hls { display: flex; flex-wrap: wrap; gap: 3px; margin: 2px 0; }
.mk-hl { font-size: 11px; color: #9fd0ff; background: #0e1a28; border: 1px solid #2a4a6a; border-radius: 4px; padding: 0 5px; }
.mk-buyc { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mk-price { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: #ffe7a8; font-size: 15px; white-space: nowrap; }
.mk-price .ico, .mk-wallet .ico { vertical-align: middle; }
.mk-buybtn { background: linear-gradient(#4ab050, #1e6a24); color: #fff; font-weight: 800; border: 1px solid #8fe090; border-radius: 5px; padding: 5px 16px; cursor: pointer; }
.mk-buybtn:hover { filter: brightness(1.15); }
.mk-pages { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 6px; }
.mk-help { font-size: 12px; color: #c8b48a; background: #1a140c; border: 1px solid #3a2e1a; border-radius: 6px; padding: 8px; margin-bottom: 8px; line-height: 1.45; }
.mk-sell { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.mk-selcard { display: flex; gap: 12px; align-items: center; background: #15100a; border: 1px solid #5a4628; border-radius: 8px; padding: 8px; }
.mk-selcard .mk-ic { width: 70px; height: 70px; }
.mk-calc { background: #0e0b07; border: 1px dashed #5a4628; border-radius: 6px; padding: 8px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.mk-net { font-size: 15px; color: #9fe8a0; }
.mk-pcbox { background: #0e1a28; border: 1px solid #2a4a6a; border-radius: 6px; padding: 8px; font-size: 13px; color: #cfe4ff; }
.mk-claim { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #15100a; border: 1px solid #5a4628; border-radius: 8px; padding: 10px; }
.mk-mine .mk-list, .mk-boxl { display: flex; flex-direction: column; gap: 5px; }
.mk-sales { font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.mk-menu-ic { font-size: 20px; line-height: 1; }

/* v24 🗄 Server management */
#p-server .pb { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.sv { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.sv-tabs { display: flex; gap: 4px; padding: 8px 10px 0; border-bottom: 1px solid #5a4628; }
.sv-reload { margin-left: 6px; }
.sv-body { position: relative; flex: 1; min-height: 0; overflow: auto; padding: 12px; }
.sv-busy { position: absolute; top: 8px; right: 14px; font-size: 18px; }
.sv-empty { color: #8a7a5a; text-align: center; padding: 40px 10px; line-height: 1.8; }
.sv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 12px; }
.sv-card { background: linear-gradient(#241a0e, #140f09); border: 1px solid #5a4628; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sv-card .sv-ic { font-size: 20px; } .sv-card b { font-size: 22px; color: #ffe7a8; } .sv-card small { color: #a89870; }
.sv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.sv-box { background: #15100a; border: 1px solid #3a2e1a; border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sv-box h4, .sv-user h4 { margin: 0 0 4px; color: #ffd98a; }
.sv-box button { align-self: flex-start; margin-top: 6px; }
.sv-path { font-family: monospace; font-size: 11px; color: #9fb8d8; word-break: break-all; }
.sv-box .warn { color: #ff9a6a; }
.sv-top a, .sv-t a, .sv-top a { color: #9fd0ff; cursor: pointer; text-decoration: underline; }
.sv-bar { display: flex; gap: 6px; margin-bottom: 8px; }
.sv-bar input, .sv-bar select { background: #0b0805; color: #f0e2c0; border: 1px solid #5a4628; border-radius: 4px; padding: 6px 8px; }
.sv-bar input { flex: 1; }
.sv-count { font-size: 12px; color: #a89870; margin-bottom: 4px; }
.sv-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.sv-t th { text-align: left; color: #c8b48a; font-weight: 700; border-bottom: 1px solid #5a4628; padding: 5px 6px; position: sticky; top: 0; background: #1a140c; }
.sv-t td { border-bottom: 1px solid #2a2214; padding: 5px 6px; vertical-align: top; }
.sv-t tr:hover td { background: #1e170d; }
.sv-t tr.ban td { background: #2a0e0e; }
.sv-t td.me { color: #9fe8a0; }
.sv-tag { font-size: 10px; font-weight: 800; border-radius: 3px; padding: 1px 5px; margin-left: 4px; }
.sv-tag.adm { background: #3a6aa8; color: #fff; } .sv-tag.ban { background: #a82020; color: #fff; }
.sv-user h3 { margin: 0 0 8px; color: #ffe7a8; }
.sv-kv { display: grid; grid-template-columns: 140px 1fr; gap: 3px 10px; font-size: 13px; margin-bottom: 8px; }
.sv-kv span { color: #a89870; }
.sv-actions { display: flex; gap: 8px; margin: 6px 0 12px; }
button.danger, .sv-ban { background: linear-gradient(#b83030, #6a1010) !important; color: #fff !important; border-color: #ff8080 !important; }
.sv-mini { font-size: 13px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }

/* v25 market: currency picker */
.mk-curname { display: inline-flex; align-items: center; gap: 6px; color: #ffe7a8; font-size: 14px; padding: 4px 0; }
.mk-cp-h { font-size: 12px; color: #b8a47a; }
.mk-curpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 5px; }
.mk-cp { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 3px; background: #0e0b07; border: 1px solid #3a2e1a; border-radius: 6px; color: #c8b48a; cursor: pointer; }
.mk-cp small { font-size: 10px; line-height: 1.1; text-align: center; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-cp:hover { border-color: #8a6a30; background: #1c150c; }
.mk-cp.on { border-color: #ffcc55; background: linear-gradient(#4a3818, #2a1f10); color: #ffe7a8; box-shadow: 0 0 8px #ffcc5566; }
.mk-cp.off { opacity: .3; cursor: not-allowed; }

/* v27 Abyss Orb / corrupted items */
.tt-mod.corrupt { color: #ff6aa8; text-shadow: 0 0 6px #a0184a; }
.tt-sealed.tt-corrupt { color: #ff3a80; letter-spacing: 2px; }
.cell .seal.corr { left: auto; right: 2px; top: 14px; filter: drop-shadow(0 0 3px #ff3a80); }
.mk-corrupt { color: #ff5a9a; }

/* v32 Blood Moon rite: big warning when outside the circle */
#rite-warn { display: none; position: fixed; left: 50%; top: 32%; transform: translateX(-50%); z-index: 30; pointer-events: none; padding: 10px 26px; border-radius: 10px; background: rgba(60,0,0,0.78); border: 2px solid #ff4040; color: #ffd0d0; font-size: 24px; font-weight: 800; text-shadow: 0 0 8px #ff2020; box-shadow: 0 0 24px rgba(255,40,40,0.7); animation: lgPulse 0.8s ease-in-out infinite; }
#rite-warn b { color: #fff; font-size: 30px; margin-left: 6px; }

/* v35 performance monitor (F8) */
#perf-mon { position: fixed; left: 10px; top: 70px; z-index: 40; pointer-events: none; max-width: min(760px, calc(100vw - 20px)); background: rgba(8,10,14,0.86); border: 1px solid #3a6a8a; border-radius: 6px; padding: 6px 9px; font: 12px/1.45 Consolas, monospace; color: #cfe4ff; }
#perf-mon b { color: #fff; }
#perf-mon .pm-worst { color: #ffb0a0; margin-top: 3px; border-top: 1px solid #3a3030; padding-top: 3px; }

/* v43 death: two revive buttons */
.death-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* v44 phones: tap-to-inspect tooltips, pinned at the top and scrollable */
#tooltip.touch { left: 50% !important; top: 6px !important; transform: translateX(-50%); pointer-events: auto; max-height: calc(100vh - 12px); max-width: calc(100vw - 12px); overflow: auto; flex-wrap: wrap; justify-content: center; }
#tooltip.touch .tt { min-width: 0; width: min(330px, calc(50vw - 12px)); font-size: 12px; }
@media (max-width: 560px) { #tooltip.touch .tt { width: calc(100vw - 16px); } }
.tt-touch { margin: 4px 6px 6px; padding: 4px 6px; border-radius: 4px; background: rgba(255,210,100,0.12); color: #ffd98a; font-size: 11px; }

/* ---------- v49: Beast Den (Soul Snare companions) ---------- */
.den .sp-head .dim { font-size: 11px; }
.den-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.den-pet { display: flex; flex-direction: column; align-items: center; width: 92px; padding: 5px 4px; border: 1px solid #4a4a4a; border-radius: 6px; background: rgba(20, 30, 26, 0.8); cursor: pointer; text-align: center; }
.den-pet .ic { font-size: 22px; }
.den-pet .nm { font-size: 11px; line-height: 1.15; max-height: 26px; overflow: hidden; }
.den-pet small { color: #9a927f; font-size: 10px; }
.den-pet.on { border-color: #70ffc0; box-shadow: 0 0 8px rgba(112, 255, 192, 0.45); cursor: default; }
.den-pet.r-magic .nm { color: #9a9aff; } .den-pet.r-rare .nm { color: #ffe050; } .den-pet.r-boss .nm { color: #ff9a50; }
.den-pet.r-boss { border-color: #b0602a; }
.den-pet:hover { border-color: #ffe080; }
.den .sp-head b { white-space: nowrap; }

/* ---------- v51: quick search (~ad col da) ---------- */
.srch { display: flex; align-items: center; gap: 6px; margin: 4px 0 6px; }
.srch input { flex: 1; min-width: 0; padding: 5px 8px; background: #15120d; border: 1px solid #6a5a3a; border-radius: 5px; color: #f0e6cc; font-size: 13px; }
.srch input:focus { outline: none; border-color: #ffd070; box-shadow: 0 0 6px rgba(255, 208, 112, 0.35); }
.srch-n { color: #ffd070; font-size: 12px; min-width: 38px; text-align: right; }
.srch-help { width: 18px; height: 18px; border-radius: 50%; border: 1px solid #8a7040; color: #d8c08a; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; cursor: help; }
.s-miss { opacity: 0.18; filter: grayscale(0.8); }
.s-hit { box-shadow: 0 0 0 2px #ffd070, 0 0 10px rgba(255, 208, 112, 0.55) !important; }
.shop .s-miss { display: none; }

/* ---------- v52: valuable drops — white label, red text (never missed) ---------- */
.lbl.lf-valuable { font-size: 15px !important; font-weight: 800; background: #ffffff !important; color: #d80c0c !important; border: 2px solid #d80c0c !important; text-shadow: none !important; box-shadow: 0 0 12px rgba(255, 40, 40, 0.85), 0 0 2px #fff; z-index: 5; animation: lfpulse 1.2s ease-in-out infinite; }
.lbl.lf-valuable:hover { background: #ffe8e8 !important; }
body.mobile #labels .lbl.lf-valuable { font-size: 12px !important; }
#btn-snd b { font-size: 18px; }
.sv-cheat { margin: 4px 0 8px; padding: 6px 10px; border: 1px solid #c04040; border-radius: 6px; background: rgba(120, 20, 20, 0.35); color: #ffb0a0; font-size: 12px; }

/* ---------- v56: a Soul Snare that caught something shows the Companion ---------- */
.pet-ic { display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: radial-gradient(circle at 50% 38%, #2a4a3c, #0a1410); border: 2px solid #70ffc0; box-sizing: border-box; line-height: 1; }
.pet-ic.r-magic { border-color: #8888ff; } .pet-ic.r-rare { border-color: #ffe050; } .pet-ic.r-boss { border-color: #ff8a40; box-shadow: inset 0 0 8px rgba(255, 140, 60, 0.5); }
.pet-ic.off { filter: grayscale(0.9) brightness(0.6); }

/* ---------- v62: party teleport button ---------- */
#party-hud .ph-go { pointer-events: auto; margin-left: 6px; padding: 0 6px; font-size: 10px; line-height: 16px; border: 1px solid #60ffb0; border-radius: 4px; background: rgba(20, 60, 45, 0.85); color: #b0ffd8; cursor: pointer; }
#party-hud .ph-go:hover { background: rgba(40, 110, 80, 0.95); color: #fff; }
.net-row .btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* 🔮 Foresight preview */
.foresee { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 120; padding: 12px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: auto; display: block; }
.foresee .fs-h { font-weight: bold; color: #e8a0ff; font-size: 16px; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.foresee .fs-cols { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.foresee .fs-t { text-align: center; color: #c8b890; margin-bottom: 4px; }
.foresee .fs-msg { margin-top: 6px; color: #ffd890; max-width: 340px; }
.foresee .fs-b { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.foresee .fs-note { margin-top: 8px; font-size: 12px; max-width: 700px; }
.tt-sealed.tt-foresee { color: #e8a0ff; letter-spacing: 1px; }
/* 🗑 / 💰 ask box + Merchant Pip sell window */
.askbox { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 130; padding: 14px 16px; width: min(420px, calc(100vw - 32px)); display: block; }
.askbox .ask-h { font-weight: bold; font-size: 16px; color: #ffd890; margin-bottom: 8px; }
.askbox.danger .ask-h { color: #ff9080; }
.askbox .ask-b { line-height: 1.5; }
.askbox .ask-it { display: flex; gap: 10px; align-items: center; }
.askbox .ask-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.askbox.danger .ask-ok { background: #7a1e14; border-color: #c04030; }
.sellwin { border: 1px solid #6a5a3a; border-radius: 6px; padding: 8px; margin: 6px 0 10px; background: rgba(40, 30, 10, 0.5); }
.sellwin h3 { margin: 0 0 4px; }
.sellwin .sw-help { font-size: 12px; margin-bottom: 6px; }
.sellwin .sw-grid { min-height: 52px; margin-top: 0; grid-template-columns: repeat(auto-fill, 42px); max-height: 190px; overflow-y: auto; }
.sellwin .sw-empty { grid-column: 1 / -1; }
.sellwin .sw-empty { padding: 14px; }
.sellwin .sw-bar { display: flex; gap: 4px; flex-wrap: wrap; margin: 6px 0; }
.sellwin .sw-sell { width: 100%; }
.cell.sellq { opacity: 0.45; outline: 2px solid #ffd040; outline-offset: -2px; }
.cell .sellq-tag { position: absolute; right: 1px; bottom: 0; font-size: 13px; pointer-events: none; }
/* ⇅ sort bars */
.sortbar { display: flex; gap: 6px; align-items: center; margin: 4px 0; flex-wrap: wrap; }
.sortbar select { max-width: 200px; }
/* 🏆 admin: one optimised build per damage gem */
.adm-note { margin: 6px 0; font-size: 12px; }
.adm-builds { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.adm-builds .ab-btn { display: flex; align-items: center; gap: 8px; text-align: left; padding: 4px 6px; }
.adm-builds .ab-btn span { display: flex; flex-direction: column; min-width: 0; }
.adm-builds .ab-btn small { color: #c8b890; font-size: 11px; }
/* 📖 Build Guide */
.gd { display: grid; grid-template-columns: 210px 1fr; gap: 8px; height: 100%; min-height: 0; }
.gd-list { overflow-y: auto; max-height: calc(100vh - 170px); display: flex; flex-direction: column; gap: 3px; padding-right: 4px; }
.gd-q { margin-bottom: 4px; }
.gd-grp { color: #ffd890; font-weight: bold; margin: 6px 0 2px; font-size: 12px; }
.gd-it { display: flex; align-items: center; gap: 6px; text-align: left; padding: 3px 5px; }
.gd-it span { display: flex; flex-direction: column; min-width: 0; }
.gd-it small { color: #b8a880; font-size: 11px; }
.gd-it.on { outline: 2px solid #ffd060; background: rgba(255, 208, 96, 0.12); }
.gd-it.mine b::after { content: ' ★'; color: #60e0ff; }
.gd-detail { overflow-y: auto; max-height: calc(100vh - 170px); padding-right: 4px; }
.gd-intro p { line-height: 1.5; }
.gd-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.gd-head h3 { margin: 0; }
.gd-dps { color: #ffb060; font-weight: bold; }
.gd-warn { background: rgba(160, 90, 20, 0.25); border: 1px solid #a06020; padding: 5px 8px; border-radius: 4px; margin: 4px 0; font-size: 12px; }
.gd-sec { border-top: 1px solid #3a3020; padding-top: 6px; margin-top: 8px; }
.gd-sec h4 { margin: 0 0 5px; color: #ffd890; }
.gd-gems { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.gd-gem { display: flex; flex-direction: column; align-items: center; width: 72px; cursor: pointer; text-align: center; }
.gd-gem small { font-size: 10px; line-height: 1.2; }
.gd-gem.main { width: 84px; }
.gd-gem:hover { filter: brightness(1.25); }
.gd-hint { font-size: 11px; }
.gd-line { font-size: 12px; margin: 2px 0; }
.gd-gear { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 6px; }
.gd-card { border: 1px solid #4a3e28; border-radius: 5px; padding: 6px 7px; background: rgba(20, 15, 8, 0.55); }
.gd-slot { font-size: 11px; color: #9a8a68; text-transform: uppercase; letter-spacing: 1px; }
.gd-name { font-weight: bold; margin: 2px 0 4px; cursor: help; }
.gd-name.uq { color: #ff9a3a; }
.gd-name.rr { color: #ffe060; }
.gd-name small { color: #b8a880; font-weight: normal; }
.gd-mod { font-size: 12px; color: #9fc0ff; line-height: 1.45; }
.gd-pt { display: inline-block; width: 14px; text-align: center; font-size: 10px; color: #1a1408; background: #c8a860; border-radius: 3px; margin-right: 3px; }
.gd-rune { color: #c8a0ff; }
.gd-ink { color: #ff8080; }
.gd-btns { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.gd-check { margin-top: 6px; border-top: 1px dashed #4a3e28; padding-top: 5px; display: flex; flex-direction: column; gap: 3px; }
.gd-ck { display: grid; grid-template-columns: 18px 1fr auto 58px; gap: 4px; align-items: center; font-size: 12px; }
.gd-ck .gd-min { width: 58px; }
.gd-ck2 { font-size: 12px; }
.gd-go { margin-top: 4px; }
@media (max-width: 760px) { .gd { grid-template-columns: 1fr; } .gd-list { max-height: 34vh; } .gd-detail { max-height: none; } }
#p-guide { width: min(1080px, calc(100vw - 24px)); z-index: 24; }
@media (max-width: 900px) { #p-guide { width: calc(100vw - 24px); } }
/* ============ v80: character screen ============ */
/* nothing of the game shows through any title screen */
body.at-title #hud, body.at-title .panel, body.at-title #bigmap, body.at-title #labels, body.at-title #tooltip { visibility: hidden !important; }
#title { background:
  radial-gradient(ellipse at 50% 0%, rgba(255, 190, 90, 0.16), transparent 55%),
  radial-gradient(ellipse at 15% 100%, rgba(120, 60, 200, 0.14), transparent 50%),
  radial-gradient(ellipse at 85% 100%, rgba(40, 120, 220, 0.12), transparent 50%),
  linear-gradient(180deg, #16110b 0%, #0b0907 55%, #060504 100%); overflow-y: auto; align-items: flex-start; }
#title::before, #title::after { content: ''; position: fixed; inset: 0; pointer-events: none;
  background-image: radial-gradient(2px 2px at 10% 90%, #ffb060, transparent), radial-gradient(1.5px 1.5px at 30% 80%, #ffd090, transparent), radial-gradient(2px 2px at 55% 95%, #ff9040, transparent), radial-gradient(1.5px 1.5px at 75% 85%, #ffc070, transparent), radial-gradient(2px 2px at 90% 92%, #ffa050, transparent);
  animation: csEmbers 14s linear infinite; opacity: 0.55; }
#title::after { animation-duration: 21s; animation-delay: -7s; opacity: 0.35; transform: scaleX(-1); }
@keyframes csEmbers { from { transform: translateY(0); } to { transform: translateY(-110vh); } }
.title-box { position: relative; z-index: 1; margin: auto; }
.cs { position: relative; z-index: 1; width: min(1180px, calc(100vw - 32px)); margin: 18px auto 28px; display: flex; flex-direction: column; gap: 14px; }
.cs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cs-logo h1 { font-family: Georgia, serif; font-size: clamp(30px, 4.4vw, 50px); margin: 0; letter-spacing: 3px; color: #ffd878; text-shadow: 0 0 22px rgba(200, 130, 40, 0.8), 0 3px 0 #6a4010; }
.cs-logo .sub { color: #bfa878; font-size: 13px; letter-spacing: 1px; }
.cs-acct { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.04); border: 1px solid #4a3c22; border-radius: 999px; padding: 5px 6px 5px 14px; }
.cs-user { margin-right: 4px; }
.cs-acct button { border-radius: 999px; }
.cs-main { display: grid; grid-template-columns: minmax(300px, 0.9fr) 1.35fr; gap: 14px; align-items: start; }
.cs-panel { background: linear-gradient(180deg, rgba(38, 30, 18, 0.92), rgba(16, 12, 8, 0.94)); border: 1px solid #6a5430; border-radius: 12px; padding: 14px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 220, 150, 0.08); }
.cs-panel h3 { font-family: Georgia, serif; color: #f0d080; margin: 0 0 10px; font-size: 19px; display: flex; align-items: baseline; justify-content: space-between; }
.cs-panel h3 small { color: #9a8a68; font-family: inherit; font-size: 13px; }
.cs-list { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 240px); overflow-y: auto; padding-right: 3px; }
.cs-char { position: relative; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 10px; cursor: pointer;
  background: linear-gradient(90deg, color-mix(in srgb, var(--c) 16%, transparent), rgba(0, 0, 0, 0.35) 55%); border: 1px solid rgba(255, 255, 255, 0.07); transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s; }
.cs-char:hover { transform: translateX(3px); border-color: var(--c); box-shadow: 0 0 16px color-mix(in srgb, var(--c) 35%, transparent); }
.cs-info { display: flex; flex-direction: column; min-width: 0; }
.cs-info b { font-size: 16px; color: #fff4dc; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-info span { color: color-mix(in srgb, var(--c) 70%, #fff); font-size: 13px; }
.cs-info small { color: #8a7c62; font-size: 11px; }
.cs-lv { position: absolute; left: 44px; bottom: 6px; min-width: 22px; height: 18px; padding: 0 4px; border-radius: 9px; background: #1a140c; border: 1px solid #c8a050; color: #ffe090; font-size: 11px; font-weight: bold; display: flex; align-items: center; justify-content: center; }
.cs-act { display: flex; gap: 5px; align-items: center; }
.cs-act .play { background: linear-gradient(#4a8a3a, #2a5a20); border: 1px solid #8ad070; color: #fff; font-weight: bold; padding: 7px 14px; border-radius: 7px; }
.cs-act .play:hover { filter: brightness(1.2); }
.cs-act .del { opacity: 0.6; } .cs-act .del:hover { opacity: 1; background: #5a1a14; }
.cs-empty { color: #9a8a68; padding: 24px 10px; text-align: center; border: 1px dashed #4a3c22; border-radius: 10px; }
.cs-classes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.cs-cls { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 4px 8px; border-radius: 10px; cursor: pointer; color: #e8dcc0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.5)); border: 1px solid #4a3c22; transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s; }
.cs-cls:hover { transform: translateY(-3px); border-color: var(--c); }
.cs-cls.sel { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 0 22px color-mix(in srgb, var(--c) 45%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, transparent), rgba(0, 0, 0, 0.5)); }
.cs-cls b { color: var(--c); font-size: 14px; }
.cs-cls small { color: #a89878; font-size: 11px; }
.cs-cls em { position: absolute; top: 5px; right: 5px; font-style: normal; font-size: 9px; font-weight: bold; color: #1a1006; background: #ffd060; border-radius: 4px; padding: 1px 4px; letter-spacing: 1px; }
.cs-prev { margin-top: 10px; padding: 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--c) 45%, #3a2e1a); background: radial-gradient(ellipse at 0% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 60%), rgba(0, 0, 0, 0.3); }
.cs-prev-head { display: flex; gap: 12px; align-items: center; }
.cs-prev-head h2 { margin: 0; font-family: Georgia, serif; color: var(--c); font-size: 26px; }
.cs-role { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.cs-role span { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); }
.cs-diff { font-size: 12px; color: #ffd060; } .cs-diff i { color: #4a4030; font-style: normal; }
.cs-prev p { color: #d8ccb0; line-height: 1.5; margin: 8px 0; }
.cs-paths-t { color: #c8b890; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; margin: 6px 0 4px; }
.cs-paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cs-path { display: flex; gap: 8px; padding: 7px; border-radius: 8px; background: rgba(0, 0, 0, 0.35); border-left: 3px solid var(--pc); }
.cs-path .cs-pi { font-size: 22px; }
.cs-path b { display: block; color: var(--pc); font-size: 13px; }
.cs-path small { color: #a89878; font-size: 11px; line-height: 1.35; }
.cs-form { display: flex; gap: 8px; margin-top: 12px; }
.cs-form input { flex: 1; min-width: 0; background: #120e09; border: 1px solid #8a7040; color: #fff; padding: 10px 12px; font-size: 16px; border-radius: 7px; }
.cs-form input:focus { outline: none; border-color: #ffd060; box-shadow: 0 0 0 2px rgba(255, 208, 96, 0.25); }
.cs-form .big { white-space: nowrap; }
.cs-create .admin-btn { width: 100%; margin-top: 6px; }
@media (max-width: 900px) {
  .cs-main { grid-template-columns: 1fr; }
  .cs-classes { grid-template-columns: repeat(3, 1fr); }
  .cs-paths { grid-template-columns: 1fr; }
  .cs-list { max-height: none; }
}
@media (max-width: 480px) { .cs-classes { grid-template-columns: repeat(2, 1fr); } .cs-form { flex-direction: column; } .cs-top { justify-content: center; text-align: center; } }
.gd-grp { display: flex; align-items: center; gap: 6px; padding: 4px 2px 2px; border-bottom: 1px solid #3a3020; }
.gd-grp small { margin-left: auto; color: #60e0ff; font-weight: normal; font-size: 10px; }
.gd-grp.mine { color: #fff0c0; }
/* v83: Temporal Rift (Chronoweave) touch button, above the dodge */
.t-act.rift { width: calc(46px * var(--ui)); height: calc(46px * var(--ui)); right: calc(158px * var(--ui)); bottom: calc(154px * var(--ui)); font-size: calc(22px * var(--ui)); border-color: #b080ff !important; box-shadow: 0 0 12px rgba(176, 128, 255, 0.6); }
.t-act.rift.cd { opacity: 0.45; filter: grayscale(0.6); }
/* v83: admin unique vault */
.adm-uq-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.adm-uq-tabs button.on { background: linear-gradient(#8a6a2a, #5a4018); color: #fff; border-color: #e8c870; }
.adm-uq-tabs small { color: #b8a880; }
.adm-uq { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 5px; max-height: 360px; overflow-y: auto; }
.adm-uq-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 6px; align-items: center; padding: 4px 6px; border: 1px solid #4a3e28; border-radius: 6px; background: rgba(0, 0, 0, 0.35); }
.adm-uq-card.chase { border-color: #ff9a3a; box-shadow: 0 0 10px rgba(255, 154, 58, 0.35); }
.adm-uq-card .uq-t { display: flex; flex-direction: column; min-width: 0; cursor: help; }
.adm-uq-card .uq-t b { color: #ff9a3a; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-uq-card .uq-t small { color: #a89878; font-size: 11px; }
.adm-uq-card .uq-b { display: flex; gap: 3px; }
/* ============ v87: settings drop-down (⚙) + living title background ============ */
#setmenu { position: fixed; top: 62px; left: 10px; z-index: 150; pointer-events: auto; display: none; flex-direction: column; gap: 2px; width: 290px; padding: 8px;
  background: linear-gradient(180deg, rgba(40, 31, 19, 0.98), rgba(16, 12, 8, 0.98)); border: 1px solid #000; border-radius: 12px;
  box-shadow: 0 0 0 1px #6a5430, 0 14px 40px rgba(0, 0, 0, 0.65); }
#setmenu.on { display: flex; animation: smIn 0.14s ease-out; }
@keyframes smIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
#setmenu .sm-h { font-family: Georgia, serif; color: #f0d080; font-size: 15px; padding: 2px 6px 6px; border-bottom: 1px solid #3a2e1a; margin-bottom: 4px; }
#setmenu .sm-row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 6px 8px; border-radius: 8px;
  background: transparent; border: 1px solid transparent; color: #e8dcc0; font-size: 14px; cursor: pointer; }
#setmenu .sm-row:hover { background: rgba(255, 210, 130, 0.08); border-color: #5e4827; }
#setmenu .sm-row i { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-style: normal;
  background: linear-gradient(#3a3226, #1e1912); border: 1px solid #6a5430; color: #d8b878; }
#setmenu .sm-row i svg { width: 20px; height: 20px; }
#setmenu .sm-row i b { font-size: 14px; color: #e8c870; }
#setmenu .sm-row span { display: flex; flex-direction: column; line-height: 1.25; }
#setmenu .sm-row em { font-style: normal; font-size: 11px; color: #9a8a68; }
#setmenu .sm-row small { color: #a88c5a; font-weight: 700; font-size: 11px; }
#setmenu .sm-sep { height: 1px; background: #3a2e1a; margin: 4px 2px; }
#setmenu .sm-out span { color: #ffb090; }
#btn-set.on { color: #fff0c8; box-shadow: 0 0 0 2px #c8a060, 0 0 12px rgba(255, 190, 90, 0.55); }
body.mobile #setmenu { width: min(320px, calc(100vw - 16px)); }
body.at-title #setmenu { display: none !important; }
/* the area name / gold box never sits under the menu on narrower screens */
@media (max-width: 1250px) { body:not(.mobile) #topbar { top: 64px; } }

/* title screens: a live 3D chibi island behind them (js/titlescene.js) */
#title-bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 199; display: none; }
body.at-title #title-bg { display: block; }
#title { background: radial-gradient(ellipse at 50% 45%, rgba(12, 8, 20, 0.05) 30%, rgba(12, 8, 20, 0.5) 100%), linear-gradient(180deg, rgba(14, 8, 30, 0.35), rgba(14, 8, 30, 0) 30%, rgba(14, 8, 30, 0) 70%, rgba(10, 6, 4, 0.4)); }
#title::before, #title::after { opacity: 0.3; }
.title-box.auth h1, .cs-logo h1 { text-shadow: 0 0 22px rgba(200, 130, 40, 0.8), 0 3px 0 #6a4010, 0 0 3px #000, 0 4px 18px rgba(0, 0, 0, 0.9); }
.title-box.auth .sub, .cs-logo .sub { color: #ffe8c0; text-shadow: 0 1px 3px #000, 0 0 10px rgba(0, 0, 0, 0.8); }
.auth-card { background: rgba(14, 10, 8, 0.86); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55); }
.cs-acct { background: rgba(14, 10, 8, 0.75); }
/* ============ v88: account forms — left-aligned fields, show-password eye, codes, account window ============ */
.auth-card, .auth-card label, .auth-card input, .acct-card input { text-align: left; }
.auth-card input, .acct-card input { width: 100%; background: #1a1510; border: 1px solid #8a7040; color: #fff; padding: 9px 12px; font-size: 15px; border-radius: 6px; user-select: text; }
.auth-card input:focus, .acct-card input:focus { outline: none; border-color: #ffd070; box-shadow: 0 0 0 2px rgba(255, 200, 100, 0.25); background: #221a12; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 42px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 30px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: #a89070; border-radius: 6px; cursor: pointer; padding: 0; }
.pw-eye:hover, .pw-eye.on { color: #ffe090; background: rgba(255, 220, 140, 0.08); }
.code-in { font-size: 24px !important; letter-spacing: 10px; text-align: center !important; font-weight: bold; color: #ffe090 !important; }
.auth-card .req { font-style: normal; color: #a89070; font-size: 12px; }
.auth-head { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.auth-head b { font-size: 18px; color: #ffd878; font-family: Georgia, serif; }
.auth-head span { color: #bfa878; font-size: 13px; line-height: 1.4; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.auth-links a { color: #e8c870; text-decoration: none; }
.auth-links a:hover { color: #fff0c0; text-decoration: underline; }
.lang-sw { text-align: right; }
.acct-modal { position: fixed; inset: 0; z-index: 5; display: none; align-items: center; justify-content: center; background: rgba(6, 4, 10, 0.55); padding: 16px; }
.acct-card { position: relative; width: min(440px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; text-align: left; padding: 18px 20px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(40, 31, 19, 0.98), rgba(16, 12, 8, 0.98)); border: 1px solid #000; box-shadow: 0 0 0 1px #6a5430, 0 20px 60px rgba(0, 0, 0, 0.7); }
.acct-card h3 { margin: 0 0 12px; font-family: Georgia, serif; color: #f0d080; font-size: 20px; }
.acct-card h4 { margin: 0 0 10px; color: #ffe0a0; font-size: 16px; }
.acct-card label { display: block; font-size: 13px; color: #d8c08a; margin: 8px 0 3px; }
.acct-x { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 8px; background: transparent; border: 1px solid #4a3c22; color: #c8b890; }
.acct-x:hover { color: #fff; border-color: #c8a060; }
.acct-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid #2e2414; }
.acct-row .k { width: 80px; color: #9a8a68; font-size: 13px; }
.acct-row b { color: #fff4dc; word-break: break-all; }
.em-st { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.em-st.ok { color: #90ff9a; border-color: #2a6a30; background: rgba(40, 120, 50, 0.18); }
.em-st.warn { color: #ffd060; border-color: #6a5420; background: rgba(160, 120, 20, 0.15); }
.em-st.no { color: #c8b890; border-color: #4a3c22; }
.acct-card .hint { margin-top: 8px; }
.acct-card .hint.warn { color: #ffd060; }
.m-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.m-act.col { flex-direction: column; align-items: stretch; }
.m-act .big { flex: 1; }
#c-pw { position: relative; }
#c-acct-warn { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%; background: #ff5a3a; color: #fff; font-style: normal; font-size: 11px; font-weight: bold; display: flex; align-items: center; justify-content: center; }
.auth-card > .hint { margin-top: 12px; }

/* ============ v89: game avatar on the title screens ============ */
.logo-av { width: 96px; height: 96px; border-radius: 50%; display: block; margin: 0 auto 4px; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.55), 0 0 28px rgba(170, 110, 255, 0.65); animation: avFloat 4s ease-in-out infinite; }
@keyframes avFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.cs-logo { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.cs-av { grid-row: span 2; width: 62px; height: 62px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.55), 0 0 18px rgba(170, 110, 255, 0.6); }
@media (max-height: 700px) { .logo-av { width: 64px; height: 64px; } }