:root {
  --bg: #07090c;
  --panel: rgba(12, 16, 22, 0.94);
  --panel2: rgba(20, 26, 34, 0.96);
  --line: #2a3644;
  --line2: #3d4d60;
  --text: #d6dde6;
  --dim: #8894a3;
  --accent: #39f0d8;
  --accent2: #ff9a3c;
  --danger: #ff4d4d;
  --good: #6fe06f;
  --hp: #d0283a;
  --en: #2f8cff;
  --gold: #ffd27a;
  --common: #c8c8c8; --enhanced: #6fe06f; --advanced: #5aa0ff; --prototype: #e8d34a; --relic: #ff8c2a; --veyr: #39f0d8;
  font-family: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; user-select: none; }
body { font-size: 15px; }
.hidden { display: none !important; }
button { font-family: inherit; }

#game-root { position: fixed; inset: 0; }
#viewport { position: absolute; inset: 0; }
#viewport canvas { display: block; }
#overlay { position: absolute; inset: 0; pointer-events: none; }
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#panels { position: absolute; inset: 0; pointer-events: none; }
#panels > * { pointer-events: auto; }

/* ---------------------------------------------------------------- screens */
.screen { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
#loading { background: #000; z-index: 60; }
.loading-text { font-family: Orbitron; letter-spacing: 4px; color: var(--accent); animation: pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.lobby-bg { position: absolute; inset: 0; background:
  radial-gradient(ellipse at 70% 30%, rgba(57,240,216,0.12), transparent 50%),
  radial-gradient(ellipse at 20% 80%, rgba(255,120,40,0.10), transparent 55%),
  linear-gradient(180deg, #05070a, #0c1016 60%, #140b08); }
.lobby-bg::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(1px 1px at 20px 30px, #fff8, transparent), radial-gradient(1px 1px at 120px 80px, #fff6, transparent), radial-gradient(1px 1px at 220px 160px, #fff5, transparent), radial-gradient(1.5px 1.5px at 320px 60px, #9ff8, transparent); background-size: 360px 220px; opacity: 0.5; }
.lobby-inner { position: relative; width: min(1100px, 94vw); max-height: 94vh; overflow: auto; }
.title { font-family: Orbitron; font-weight: 900; font-size: 64px; letter-spacing: 12px; text-align: center; margin: 10px 0 24px; color: #e8f6ff; text-shadow: 0 0 24px rgba(57,240,216,0.45); }
.title span { display: block; font-size: 16px; letter-spacing: 9px; color: var(--accent2); font-weight: 500; margin-top: 4px; text-shadow: none; }
.lobby-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; }
.box { background: var(--panel); border: 1px solid var(--line); padding: 16px; position: relative; }
.box::before { content: ''; position: absolute; left: -1px; top: -1px; width: 14px; height: 14px; border-left: 2px solid var(--accent); border-top: 2px solid var(--accent); }
.box h2 { font-family: Orbitron; font-size: 14px; letter-spacing: 3px; color: var(--accent); margin: 0 0 12px; font-weight: 700; }
.char-card { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); margin-bottom: 8px; cursor: pointer; background: rgba(255,255,255,0.02); }
.char-card:hover, .char-card.sel { border-color: var(--accent); background: rgba(57,240,216,0.06); }
.char-card .emblem { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: Orbitron; color: #000; }
.char-card .nm { font-size: 18px; font-weight: 700; }
.char-card .sub { color: var(--dim); font-size: 13px; }
.char-card .del { margin-left: auto; opacity: 0.5; font-size: 12px; }
.char-card .del:hover { opacity: 1; color: var(--danger); }
.class-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 10px 0; }
.class-card { border: 1px solid var(--line); padding: 10px 8px; cursor: pointer; text-align: center; background: rgba(255,255,255,0.02); min-height: 150px; }
.class-card:hover { border-color: var(--line2); }
.class-card.sel { border-color: var(--accent); background: rgba(57,240,216,0.07); }
.class-card .cn { font-family: Orbitron; font-size: 12px; font-weight: 700; letter-spacing: 1px; margin: 6px 0; }
.class-card .cb { font-size: 12px; color: var(--dim); line-height: 1.25; }
.class-card .ci { height: 36px; width: 36px; margin: 0 auto; border-radius: 6px; transform: rotate(45deg); }
.btn { background: linear-gradient(180deg, #1e2a36, #141c25); border: 1px solid var(--line2); color: var(--text); padding: 8px 16px; font-size: 15px; font-weight: 600; letter-spacing: 1px; cursor: pointer; }
.btn:hover { border-color: var(--accent); color: #fff; }
.btn.primary { background: linear-gradient(180deg, #13574f, #0c3a35); border-color: var(--accent); color: #e8fffb; }
.btn.warn { border-color: #804040; }
.btn:disabled { opacity: 0.4; cursor: default; }
input.text { background: #0a0e13; border: 1px solid var(--line2); color: var(--text); padding: 8px 10px; font-family: inherit; font-size: 16px; width: 100%; outline: none; }
input.text:focus { border-color: var(--accent); }
.row { display: flex; gap: 8px; align-items: center; }
.game-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); padding: 8px 10px; margin-bottom: 6px; }
.game-row .gn { font-weight: 700; }
.game-row .gp { color: var(--dim); font-size: 13px; }
.game-row .btn { margin-left: auto; }
.err { color: var(--danger); min-height: 20px; margin-top: 6px; }
.small { font-size: 13px; color: var(--dim); }

/* ---------------------------------------------------------------- HUD */
.hud-bottom { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 14px; }
.orb { width: 118px; height: 118px; border-radius: 50%; position: relative; overflow: hidden; border: 2px solid #3a2e24; box-shadow: 0 0 0 3px #0c0a08, 0 0 24px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,0,0,0.9); background: #0a0506; }
.orb .fill { position: absolute; left: 0; right: 0; bottom: 0; transition: height 0.12s; }
.orb.hp .fill { background: radial-gradient(circle at 40% 30%, #ff6b7a, #b0122a 55%, #4a0610); }
.orb.en .fill { background: radial-gradient(circle at 40% 30%, #7fc4ff, #1f62d0 55%, #081d48); }
.orb .shield { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 4px rgba(170,230,255,0.8); display: none; }
.orb .gloss { position: absolute; inset: 0; background: radial-gradient(circle at 35% 25%, rgba(255,255,255,0.35), transparent 35%); }
.orb .val { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-weight: 700; font-size: 16px; text-shadow: 0 0 4px #000, 0 0 2px #000; }
.orb .lbl { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 10px; letter-spacing: 2px; color: #ffffffa0; text-shadow: 0 0 3px #000; }
.bar-center { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 6px; }
.buffs { display: flex; gap: 4px; min-height: 28px; }
.buff { width: 28px; height: 28px; border: 1px solid var(--line2); background: #0c1218; font-size: 11px; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.buff .bi { position: absolute; top: 2px; left: 0; right: 0; text-align: center; font-size: 13px; }
.buff .bt { font-size: 10px; color: #fff; text-shadow: 0 0 2px #000; }
.slots { display: flex; gap: 5px; padding: 6px; background: rgba(8,10,14,0.85); border: 1px solid var(--line); }
.slot { width: 52px; height: 52px; border: 1px solid var(--line2); background: linear-gradient(180deg, #151c24, #0a0e13); position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.slot:hover { border-color: var(--accent); }
.slot .key { position: absolute; top: 1px; left: 3px; font-size: 11px; color: var(--dim); font-weight: 700; }
.slot .cd { position: absolute; inset: 0; background: rgba(0,0,0,0.65); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.slot .cost { position: absolute; bottom: 1px; right: 3px; font-size: 10px; color: #7fc4ff; }
.slot .qty { position: absolute; bottom: 1px; right: 3px; font-size: 12px; color: #fff; font-weight: 700; }
.slot.nores { box-shadow: inset 0 0 12px rgba(40,80,255,0.7); }
.slot.sep { margin-left: 8px; }
.xpbar { width: 100%; height: 7px; background: #0a0d10; border: 1px solid var(--line); position: relative; }
.xpbar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #a07a20, #ffd27a); }
.xpbar .txt { position: absolute; top: -16px; right: 0; font-size: 11px; color: var(--dim); }
.lvlpts { position: absolute; bottom: 150px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.lvlpts .pt { background: rgba(40,30,8,0.9); border: 1px solid var(--gold); color: var(--gold); padding: 3px 10px; font-weight: 700; cursor: pointer; animation: glow 1.6s infinite; }
@keyframes glow { 50% { box-shadow: 0 0 12px rgba(255,210,122,0.6); } }

.hud-tr { position: absolute; top: 10px; right: 10px; width: 230px; display: flex; flex-direction: column; gap: 8px; }
.minimap-wrap { position: relative; width: 230px; height: 230px; border: 1px solid var(--line2); background: #05070a; box-shadow: 0 0 18px rgba(0,0,0,0.8); }
.minimap-wrap canvas { width: 100%; height: 100%; }
.zone-name { position: absolute; top: 0; left: 0; right: 0; text-align: center; font-family: Orbitron; font-size: 11px; letter-spacing: 1px; padding: 3px; background: linear-gradient(180deg, rgba(0,0,0,0.85), transparent); color: #e8f6ff; }
.zone-lvl { position: absolute; bottom: 2px; right: 6px; font-size: 11px; color: var(--dim); }
.tracker { background: rgba(8,10,14,0.72); border: 1px solid var(--line); padding: 8px 10px; font-size: 14px; max-height: 42vh; overflow: auto; }
.tracker .q { margin-bottom: 8px; }
.tracker .qn { font-weight: 700; color: var(--gold); font-size: 14px; }
.tracker .qn.side { color: #9fd8ff; }
.tracker .qn.bounty { color: #ff9a6a; }
.tracker .qo { color: var(--text); font-size: 13px; padding-left: 8px; }
.tracker .qo.done { color: var(--good); text-decoration: line-through; opacity: 0.7; }
.events { display: flex; flex-direction: column; gap: 6px; }
.event { background: rgba(40,10,10,0.8); border: 1px solid #803030; padding: 6px 8px; font-size: 13px; }
.event b { color: #ffb080; }

.hud-tl { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; }
.pframe { width: 190px; background: rgba(8,10,14,0.8); border: 1px solid var(--line); padding: 5px 7px; font-size: 13px; }
.pframe .pn { display: flex; justify-content: space-between; font-weight: 700; }
.pframe .bar { height: 6px; background: #1a0a0c; margin-top: 3px; }
.pframe .bar div { height: 100%; background: var(--hp); }
.pframe .bar.e div { background: var(--en); }
.pframe.down { border-color: var(--danger); }
.pframe .pz { font-size: 11px; color: var(--dim); }
.pframe .tr { font-size: 11px; cursor: pointer; color: var(--accent); }

.bossbar { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: min(560px, 50vw); text-align: center; }
.bossbar .bn { font-family: Orbitron; font-size: 16px; letter-spacing: 2px; color: #ffd0c0; text-shadow: 0 0 8px #000; }
.bossbar .bt { font-size: 12px; color: var(--dim); margin-bottom: 3px; }
.bossbar .bb { height: 14px; background: #1a0808; border: 1px solid #6a2020; position: relative; }
.bossbar .bb div { height: 100%; background: linear-gradient(180deg, #ff5040, #901010); transition: width 0.15s; }
.bossbar .bb.shielded div { background: linear-gradient(180deg, #60f0ff, #1070a0); }

.banner { position: absolute; top: 22%; left: 50%; transform: translateX(-50%); text-align: center; pointer-events: none; animation: bannerIn 3.6s forwards; }
.banner .a { font-family: Orbitron; font-weight: 900; font-size: 34px; letter-spacing: 4px; text-shadow: 0 0 18px rgba(0,0,0,0.9), 0 0 30px currentColor; }
.banner .b { font-size: 17px; letter-spacing: 5px; color: var(--text); text-transform: uppercase; margin-top: 4px; text-shadow: 0 0 6px #000; }
@keyframes bannerIn { 0% { opacity: 0; transform: translate(-50%, 10px); } 10% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; } 100% { opacity: 0; } }

.feed { position: absolute; left: 10px; bottom: 150px; width: 380px; display: flex; flex-direction: column; gap: 2px; pointer-events: none; }
.feed .n { font-size: 14px; text-shadow: 0 0 4px #000, 0 0 2px #000; animation: fadeOut 7s forwards; }
@keyframes fadeOut { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
.chat { position: absolute; left: 10px; bottom: 10px; width: 380px; }
.chat .log { max-height: 120px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: 14px; text-shadow: 0 0 3px #000; }
.chat .log .c b { color: var(--accent); }
.chat input { width: 100%; margin-top: 4px; background: rgba(0,0,0,0.75); border: 1px solid var(--line2); color: var(--text); padding: 5px 8px; font-family: inherit; font-size: 14px; outline: none; }
.center-msg { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.center-msg .big { font-family: Orbitron; font-size: 40px; color: #ff5040; letter-spacing: 6px; text-shadow: 0 0 20px #000; }
.center-msg .sm { font-size: 18px; color: var(--text); text-shadow: 0 0 6px #000; }
.menubtns { position: absolute; bottom: 10px; right: 10px; display: flex; flex-direction: column; gap: 4px; width: 118px; }
.menubtns .btn { padding: 5px 9px; font-size: 13px; }
.menubtns .btn .k { color: var(--dim); font-size: 11px; margin-left: 3px; }
.menubtns .btn.alert { border-color: var(--gold); color: var(--gold); }

/* ---------------------------------------------------------------- panels */
.win { position: absolute; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 10px 40px rgba(0,0,0,0.8); display: flex; flex-direction: column; }
.win .wh { display: flex; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #17202a, #10161d); }
.win .wh .wt { font-family: Orbitron; font-size: 13px; letter-spacing: 2px; color: var(--accent); font-weight: 700; }
.win .wh .sub { margin-left: 10px; color: var(--dim); font-size: 13px; }
.win .wh .x { margin-left: auto; cursor: pointer; color: var(--dim); font-size: 18px; padding: 0 4px; }
.win .wh .x:hover { color: #fff; }
.win .wb { padding: 12px; overflow: auto; flex: 1; }
.win.right { right: 10px; top: 60px; width: 420px; max-height: calc(100vh - 200px); }
.win.left { left: 10px; top: 60px; width: 440px; max-height: calc(100vh - 200px); }
.win.center { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(900px, 94vw); max-height: 84vh; }
.win.dialog { left: 50%; bottom: 150px; transform: translateX(-50%); width: min(720px, 92vw); max-height: calc(100vh - 170px); }

.equip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.eslot { height: 64px; border: 1px solid var(--line2); background: #0a0e13; position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.eslot .sl { position: absolute; top: 2px; left: 4px; font-size: 10px; color: var(--dim); letter-spacing: 1px; text-transform: uppercase; }
.eslot:hover { border-color: var(--accent); }
.inv-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.cell { aspect-ratio: 1; border: 1px solid #222c38; background: #0a0e13; position: relative; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cell:hover { border-color: var(--accent); }
.cell.drag { opacity: 0.4; }
.cell.over { border-color: var(--gold); }
.cell .q { position: absolute; bottom: 0; right: 2px; font-size: 11px; font-weight: 700; text-shadow: 0 0 2px #000; }
.cell .up { position: absolute; top: 0; right: 2px; font-size: 10px; color: var(--gold); }
.cell.broken { box-shadow: inset 0 0 10px rgba(255,0,0,0.6); }
.cell.unusable::after { content: ''; position: absolute; inset: 0; background: rgba(160,20,20,0.25); }
.icon { width: 80%; height: 80%; display: flex; align-items: center; justify-content: center; }
.icon svg, .icon img { width: 100%; height: 100%; }
.icon img { object-fit: contain; pointer-events: none; user-select: none; }
.r-common { border-color: #555 !important; } .r-enhanced { border-color: #2e6a2e !important; } .r-advanced { border-color: #2a4f86 !important; }
.r-prototype { border-color: #857720 !important; box-shadow: inset 0 0 8px rgba(232,211,74,0.25); } .r-relic { border-color: #a45410 !important; box-shadow: inset 0 0 10px rgba(255,140,42,0.35); }
.r-veyr { border-color: #1f8a7c !important; box-shadow: inset 0 0 10px rgba(57,240,216,0.35); }
.money { display: flex; gap: 14px; margin-top: 10px; font-size: 14px; flex-wrap: wrap; }
.money span b { color: var(--gold); }
.mat { color: var(--dim); }

.tooltip, #tooltip { position: fixed; z-index: 100; background: rgba(6,8,11,0.97); border: 1px solid var(--line2); padding: 10px 12px; max-width: 360px; pointer-events: none; font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,0.9); }
#tooltip .tn { font-size: 18px; font-weight: 700; }
#tooltip .tt { font-size: 12px; color: var(--dim); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 6px; }
#tooltip .l-main { color: #fff; font-weight: 600; }
#tooltip .l-sub { color: var(--dim); font-size: 13px; }
#tooltip .l-affix { color: #8fb4ff; }
#tooltip .l-implicit { color: #c0c8d0; }
#tooltip .l-power { color: var(--accent2); margin-top: 4px; }
#tooltip .l-unknown { color: var(--accent); font-style: italic; }
#tooltip .l-lore { color: #a0a8b0; font-style: italic; }
#tooltip .req { color: var(--danger); }
#tooltip .cmp { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); font-size: 13px; }
#tooltip .cmp .up { color: var(--good); } #tooltip .cmp .down { color: var(--danger); }
#tooltip .price { color: var(--gold); margin-top: 6px; }
#tooltip .hint { color: var(--dim); font-size: 12px; margin-top: 6px; }
#tooltip .sep { border-top: 1px solid var(--line); margin: 6px 0; }

.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.stats-table td { padding: 2px 4px; border-bottom: 1px solid #16202a; }
.stats-table td:last-child { text-align: right; font-weight: 700; }
.attr-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #16202a; }
.attr-row .an { flex: 1; font-weight: 700; }
.attr-row .av { width: 40px; text-align: right; font-weight: 700; font-size: 17px; }
.attr-row .plus { width: 24px; height: 24px; padding: 0; }
.attr-desc { font-size: 12px; color: var(--dim); }

.skill-tree { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.branch { border: 1px solid var(--line); padding: 8px; background: rgba(255,255,255,0.015); }
.branch .bh { font-family: Orbitron; font-size: 12px; letter-spacing: 1px; color: var(--accent); margin-bottom: 8px; text-align: center; }
.sk { display: flex; gap: 8px; align-items: center; padding: 6px; border: 1px solid #1c2530; margin-bottom: 6px; cursor: pointer; background: #0a0e13; }
.sk:hover { border-color: var(--line2); }
.sk.learned { border-color: #2a5a52; }
.sk.locked { opacity: 0.45; }
.sk .si { width: 38px; height: 38px; font-size: 22px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line2); background: #121a22; flex-shrink: 0; }
.sk.passive .si { border-radius: 50%; }
.sk .sn { font-weight: 700; font-size: 14px; }
.sk .sr { font-size: 12px; color: var(--dim); }
.sk .sb { margin-left: auto; }
.sk .plusbtn { width: 26px; height: 26px; padding: 0; font-size: 16px; }
.hotbar-assign { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }

.dialog .speaker { font-family: Orbitron; font-size: 15px; color: var(--gold); }
.dialog .stitle { color: var(--dim); font-size: 13px; margin-bottom: 8px; }
.dialog .dtext { white-space: pre-wrap; line-height: 1.45; font-size: 16px; margin-bottom: 12px; }
.dopt { display: block; width: 100%; text-align: left; padding: 7px 10px; margin-bottom: 4px; background: #0e141b; border: 1px solid #1f2a36; color: var(--text); cursor: pointer; font-size: 15px; font-family: inherit; }
.dopt:hover { border-color: var(--accent); color: #fff; }
.dopt.quest { color: var(--gold); }
.dopt.shop { color: #9fd8ff; }
.dopt .n { color: var(--dim); margin-right: 8px; }

.shop-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.shop-item { border: 1px solid var(--line); background: #0a0e13; padding: 4px; cursor: pointer; text-align: center; font-size: 12px; }
.shop-item:hover { border-color: var(--accent); }
.shop-item .ic { height: 48px; display: flex; align-items: center; justify-content: center; }
.shop-item .pr { color: var(--gold); font-weight: 700; }
.shop-item .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-item.cant .pr { color: var(--danger); }
.tabs { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.tab { padding: 5px 10px; border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.tab.on { border-color: var(--accent); color: var(--accent); }
.recipe { display: flex; align-items: center; gap: 10px; padding: 7px; border: 1px solid var(--line); margin-bottom: 5px; }
.recipe .rn { font-weight: 700; }
.recipe .rd { font-size: 12px; color: var(--dim); }
.recipe .rc { margin-left: auto; font-size: 12px; text-align: right; }
.journal { display: grid; grid-template-columns: 260px 1fr; gap: 12px; min-height: 400px; }
.jlist .ji { padding: 6px 8px; cursor: pointer; border: 1px solid transparent; }
.jlist .ji:hover { border-color: var(--line); }
.jlist .ji.on { border-color: var(--accent); }
.jlist .jh { font-family: Orbitron; font-size: 11px; color: var(--dim); letter-spacing: 2px; margin: 10px 0 4px; }
.jdetail h3 { margin: 0 0 6px; color: var(--gold); }
.jdetail .lore-text { white-space: pre-wrap; line-height: 1.5; font-size: 15px; color: #cbd3dc; }
.lore-win .lore-text { white-space: pre-wrap; line-height: 1.55; font-size: 16px; color: #d4dce4; font-family: 'Rajdhani', monospace; }
.wp-list .wp { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border: 1px solid var(--line); margin-bottom: 5px; cursor: pointer; }
.wp-list .wp:hover { border-color: var(--accent); }
.wp-list .wp.locked { opacity: 0.4; cursor: default; }
.keypad { display: grid; grid-template-columns: repeat(3, 64px); gap: 6px; justify-content: center; margin-top: 10px; }
.keypad button { height: 54px; font-size: 22px; }
.kp-display { font-family: Orbitron; font-size: 32px; letter-spacing: 10px; text-align: center; background: #031010; border: 1px solid #1a5a50; color: var(--accent); padding: 8px; min-height: 58px; }
.glyph-grid { display: grid; grid-template-columns: repeat(4, 80px); gap: 8px; justify-content: center; margin-top: 10px; }
.glyph-btn { height: 80px; border: 1px solid #1f6a60; background: #03100f; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.glyph-btn:hover { border-color: var(--accent); box-shadow: 0 0 12px rgba(57,240,216,0.4); }
.glyph-seq { display: flex; gap: 8px; justify-content: center; min-height: 64px; }
.glyph-seq div { width: 60px; height: 60px; border: 1px dashed #1f6a60; display: flex; align-items: center; justify-content: center; }
.trade-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trade-cols .ok { color: var(--good); font-weight: 700; }
.map-canvas { width: 100%; display: block; background: #030405; }
.menu-list .btn { display: block; width: 100%; margin-bottom: 8px; }
.help-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 20px; font-size: 14px; }
.help-grid b { color: var(--accent); display: inline-block; min-width: 110px; }
.stat-hl { color: var(--gold); }
.rep { display: flex; gap: 10px; margin-top: 8px; font-size: 13px; }
.flex1 { flex: 1; }
.gold { color: var(--gold); }
.accent { color: var(--accent); }
.dim { color: var(--dim); }
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-thumb { background: #243140; } ::-webkit-scrollbar-track { background: transparent; }
