:root {
  color-scheme: dark;
  --bg: #07090c;
  --ink: #e6ebf0;
  --muted: #8d99a6;
  --panel: #10151b;
  --panel-2: #161d25;
  --line: #26313c;
  --amber: #ffb43a;
  --amber-2: #ffd24a;
  --good: #5af0a0;
  --bad: #ff4d5e;
  --info: #58b4ff;
  --r-common: #c3cad3;
  --r-magic: #58b4ff;
  --r-rare: #ffd24a;
  --r-epic: #c27bff;
  --r-legendary: #ff8a2a;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-family: var(--font);
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; background: var(--bg); color: var(--ink); }
body { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: none; }
input, select, textarea { font: inherit; user-select: text; -webkit-user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.app { position: fixed; inset: 0; overflow: hidden; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; cursor: none; }
body.in-menu #view { cursor: default; }

.r-common { color: var(--r-common); } .r-magic { color: var(--r-magic); } .r-rare { color: var(--r-rare); } .r-epic { color: var(--r-epic); } .r-legendary { color: var(--r-legendary); }
.bd-common { border-color: #4a525c !important; } .bd-magic { border-color: #2f6db0 !important; } .bd-rare { border-color: #a88a2a !important; } .bd-epic { border-color: #7a4ab0 !important; } .bd-legendary { border-color: #d0661a !important; box-shadow: 0 0 12px rgba(255, 138, 42, 0.35); }

/* ------------------------------------------------ HUD */
.hud { position: absolute; inset: 0; pointer-events: none; font-family: var(--font); }
.hud button { pointer-events: auto; }
.hud-tl { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 8px; width: min(300px, 46vw); }
.op-chip { background: rgba(10, 14, 20, 0.78); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 6px; padding: 7px 9px; backdrop-filter: blur(4px); }
.op-name { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.op-name b { color: var(--ink); font-size: 14px; letter-spacing: 0.1em; }
.bar { position: relative; height: 14px; background: #1b222a; border-radius: 3px; overflow: hidden; margin-top: 5px; }
.bar i, .bar s { position: absolute; left: 0; top: 0; bottom: 0; width: 0; transition: width 0.12s; }
.bar.hp i { background: linear-gradient(90deg, #d8303e, #ff5a4a); }
.bar.hp s { background: rgba(88, 180, 255, 0.75); height: 4px; top: auto; }
.bar.xp { height: 5px; }
.bar.xp i { background: var(--amber); }
.bar span { position: absolute; inset: 0; font: 700 10.5px/14px var(--mono); text-align: center; color: #fff; text-shadow: 0 1px 2px #000; }
.bar.xp span { display: none; }
.squad-hud { display: flex; flex-direction: column; gap: 4px; }
.sq { display: grid; grid-template-columns: 8px 1fr 60px; align-items: center; gap: 6px; background: rgba(10, 14, 20, 0.7); border-radius: 4px; padding: 3px 6px; font-size: 11px; }
.sq .dot { width: 8px; height: 8px; border-radius: 50%; }
.sq .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq .nm small { color: var(--muted); margin-left: 4px; }
.sq .hb { height: 5px; background: #1b222a; border-radius: 2px; overflow: hidden; }
.sq .hb i { display: block; height: 100%; background: var(--good); }
.sq.down { color: var(--bad); }
.sq.down .hb i { background: var(--bad); }
.radio { display: flex; flex-direction: column; gap: 3px; max-width: 100%; }
.radio p { margin: 0; font: 600 11.5px/1.35 var(--mono); color: #bfe6c8; background: rgba(6, 12, 8, 0.72); border-left: 2px solid var(--good); padding: 4px 7px; border-radius: 3px; animation: radioIn 0.25s ease-out; }
@keyframes radioIn { from { transform: translateX(-10px); opacity: 0; } }
.hud-tr { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; width: min(240px, 42vw); }
#minimap { width: 150px; height: 150px; border-radius: 6px; border: 1px solid var(--line); background: rgba(6, 9, 12, 0.85); pointer-events: auto; cursor: pointer; }
.tracker { background: rgba(10, 14, 20, 0.78); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; font-size: 12px; width: 100%; }
.tracker h4 { margin: 0 0 4px; font-size: 10.5px; letter-spacing: 0.14em; color: var(--amber); text-transform: uppercase; }
.tracker .obj { display: flex; gap: 6px; align-items: baseline; color: var(--muted); padding: 1px 0; }
.tracker .obj.cur { color: var(--ink); font-weight: 700; }
.tracker .obj.done { color: var(--good); text-decoration: line-through; opacity: 0.7; }
.tracker .obj b { font-family: var(--mono); color: var(--amber-2); margin-left: auto; font-weight: 700; }
.tracker .cmd { margin-top: 4px; font-size: 10.5px; color: var(--muted); }
.bossbar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: min(520px, 50vw); text-align: center; }
.boss-name b { font-size: 15px; letter-spacing: 0.12em; text-transform: uppercase; color: #ffd0d0; text-shadow: 0 2px 6px #000; }
.boss-name span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.bossbar .bb { height: 10px; background: rgba(20, 8, 10, 0.85); border: 1px solid #5a1a22; border-radius: 3px; overflow: hidden; }
.bossbar .bb i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #a0102a, #ff4d5e); transition: width 0.15s; }
.banner { position: absolute; top: 22%; left: 0; right: 0; text-align: center; font-weight: 900; letter-spacing: 0.2em; text-transform: uppercase; font-size: clamp(20px, 4vw, 38px); color: #fff; text-shadow: 0 4px 16px #000; opacity: 0; transition: opacity 0.3s; }
.banner small { display: block; font-size: 0.42em; letter-spacing: 0.3em; color: var(--amber); margin-top: 6px; }
.banner.show { opacity: 1; }
.dz-hud { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; font: 700 12px var(--mono); }
.dz-hud span { background: rgba(30, 6, 10, 0.8); border: 1px solid #6a1a22; padding: 4px 10px; border-radius: 4px; color: #ffb0b8; }
.dz-hud .hot b { color: #fff; }
.hud-bottom { position: absolute; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: flex-end; gap: 12px; }
.weapon-box { background: rgba(10, 14, 20, 0.8); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; min-width: 150px; }
.w-name { font-size: 11px; color: var(--muted); white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.ammo { font: 800 24px/1 var(--mono); }
.ammo span { font-size: 13px; color: var(--muted); margin-left: 2px; }
.ammo.low b { color: var(--bad); }
.reload { height: 3px; background: #1b222a; margin-top: 4px; }
.reload i { display: block; height: 100%; width: 0; background: var(--amber); }
.w-alt { font-size: 10px; color: #62707e; margin-top: 3px; white-space: nowrap; }
.skillbar { display: flex; gap: 6px; }
.sk, .cons { position: relative; width: 52px; height: 52px; border-radius: 8px; border: 1px solid var(--line); background: linear-gradient(180deg, #1a232d, #0f151b); display: grid; place-items: center; overflow: hidden; padding: 0; }
.sk .glyph { font-size: 22px; line-height: 1; }
.sk.empty { opacity: 0.35; }
.sk.ready { border-color: #4a6a8a; box-shadow: inset 0 0 12px rgba(88, 180, 255, 0.2); }
.sk .key, .cons .key { position: absolute; left: 3px; top: 2px; font: 800 9.5px var(--mono); color: var(--muted); }
.sk .cd { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.65); height: 0; }
.sk .cdnum { position: absolute; inset: 0; display: grid; place-items: center; font: 800 15px var(--mono); color: #fff; text-shadow: 0 1px 2px #000; }
.sk.flash { animation: skflash 0.35s; }
@keyframes skflash { 0% { box-shadow: 0 0 0 0 rgba(255, 210, 74, 0.9); } 100% { box-shadow: 0 0 0 14px rgba(255, 210, 74, 0); } }
.consumables { display: flex; gap: 6px; align-items: flex-end; }
.cons { width: 44px; height: 44px; font-size: 18px; color: #e8e8e8; }
.cons b { position: absolute; right: 4px; bottom: 2px; font: 800 12px var(--mono); }
.roll-cd { position: relative; width: 44px; height: 8px; background: #1b222a; border-radius: 4px; overflow: hidden; align-self: center; }
.roll-cd i { display: block; height: 100%; background: var(--info); }
.roll-cd .key { display: none; }
.pause-btn { position: absolute; top: 170px; right: 10px; width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line); background: rgba(10, 14, 20, 0.8); font-size: 12px; }
body.is-touch .sk .key, body.is-touch .cons .key { display: none; }

/* touch */
.touch { position: absolute; inset: 0; pointer-events: none; }
.stick { position: absolute; bottom: 90px; width: 130px; height: 130px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.04); pointer-events: auto; touch-action: none; }
.stick.l { left: 18px; }
.stick.r { right: 18px; border-color: rgba(255, 90, 90, 0.25); }
.stick i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.stick.r i { background: rgba(255, 90, 90, 0.35); }
.t-buttons { position: absolute; right: 16px; bottom: 236px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; width: 200px; pointer-events: none; }
.tb { pointer-events: auto; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: rgba(16, 22, 30, 0.8); font-weight: 900; font-size: 16px; }
.tb.wide { width: 70px; border-radius: 24px; font-size: 13px; letter-spacing: 0.1em; color: var(--amber-2); }
body.is-touch .hud-bottom { bottom: 8px; transform: translateX(-50%) scale(0.86); transform-origin: bottom center; }
body.is-touch .weapon-box { display: none; }
body.is-touch #minimap { width: 110px; height: 110px; }
body.is-touch .pause-btn { top: 130px; }
@media (max-width: 720px) {
  .hud-tl { width: 48vw; }
  .radio { display: none; }
  .tracker { font-size: 11px; }
  .skillbar .sk { width: 46px; height: 46px; }
}
.bigmap { position: absolute; inset: 0; background: rgba(4, 6, 9, 0.9); display: grid; place-items: center; align-content: center; gap: 8px; z-index: 5; }
.bigmap canvas { width: min(86vh, 92vw); height: min(86vh, 92vw); border: 1px solid var(--line); border-radius: 8px; }
.bigmap p { margin: 0; color: var(--muted); font-size: 12px; }

.toasts { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%); display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; z-index: 30; pointer-events: none; }
.toast { background: rgba(10, 14, 20, 0.9); border: 1px solid var(--line); border-radius: 5px; padding: 5px 12px; font-size: 13px; font-weight: 600; animation: toastIn 0.2s ease-out; white-space: nowrap; }
.toast.item { border-left: 3px solid currentColor; }
.toast.good { border-color: #2a6a4a; color: #b8ffd8; }
.toast.bad { border-color: #6a2a2a; color: #ffc0c0; }
.toast.gold { border-color: #6a5a2a; color: #ffe8a0; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } }

/* ------------------------------------------------ screens & hub */
.screen, .hub, .modal { position: absolute; inset: 0; overflow: auto; }
.screen { z-index: 20; background: radial-gradient(ellipse at 50% 20%, rgba(255, 140, 40, 0.1), transparent 60%), linear-gradient(180deg, rgba(5, 7, 10, 0.92), rgba(5, 7, 10, 0.98)); display: grid; place-items: center; padding: 20px; }
.screen.clear { background: rgba(4, 6, 9, 0.55); }
.modal { z-index: 40; background: rgba(4, 6, 9, 0.75); display: grid; place-items: center; padding: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; max-width: 760px; width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); }
.card.narrow { max-width: 460px; }
.title-wrap { text-align: center; max-width: 640px; }
.logo { font-weight: 900; font-size: clamp(40px, 9vw, 86px); letter-spacing: 0.14em; line-height: 0.95; margin: 0; background: linear-gradient(180deg, #fff 30%, #9aa6b2); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 40px rgba(255, 140, 40, 0.15); }
.logo-sub { font: 700 clamp(13px, 2.4vw, 18px) var(--mono); letter-spacing: 0.5em; color: var(--amber); margin: 10px 0 18px; text-transform: uppercase; }
.tagline { color: var(--muted); line-height: 1.55; margin: 0 auto 24px; max-width: 520px; }
.btn { border: 1px solid var(--line); background: linear-gradient(180deg, #1c2631, #121920); color: var(--ink); padding: 10px 18px; border-radius: 6px; font-weight: 700; letter-spacing: 0.04em; }
.btn:hover:not(:disabled) { border-color: #4a6a8a; background: linear-gradient(180deg, #223040, #16202a); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary { background: linear-gradient(180deg, #ffb43a, #d9861a); color: #1a1004; border-color: #ffcf7a; }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, #ffc55a, #e8962a); }
.btn.danger { border-color: #6a2a30; color: #ffb0b8; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.tiny { padding: 3px 7px; font-size: 11px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.center { justify-content: center; }
.row.end { justify-content: flex-end; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); }
.stack { display: flex; flex-direction: column; gap: 10px; }
h2, h3 { margin: 0 0 8px; }
h2 { font-size: 18px; letter-spacing: 0.06em; }
h3 { font-size: 14px; letter-spacing: 0.08em; color: var(--amber); text-transform: uppercase; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 12px 0; }
.class-card { text-align: left; border: 1px solid var(--line); background: var(--panel-2); border-radius: 8px; padding: 12px; display: grid; gap: 6px; }
.class-card.sel { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 0 20px rgba(255, 180, 58, 0.2); }
.class-card .cn { font-weight: 800; font-size: 16px; }
.class-card .cr { font: 700 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.class-card p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.class-card .cs { font: 11px var(--mono); color: #a8b4c0; }
.field { display: grid; gap: 4px; }
.field input { background: #0b1016; border: 1px solid var(--line); border-radius: 6px; padding: 9px 11px; color: var(--ink); letter-spacing: 0.15em; text-transform: uppercase; font-weight: 700; }

.hub { z-index: 10; background: radial-gradient(ellipse at 70% -10%, rgba(88, 180, 255, 0.08), transparent 55%), linear-gradient(180deg, #0a0e13, #06080b); display: grid; grid-template-rows: auto auto 1fr; }
.hub-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(10, 14, 20, 0.9); position: sticky; top: 0; z-index: 2; }
.hub-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hub-id .cs { font-weight: 900; letter-spacing: 0.14em; }
.hub-id .cl { font: 700 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.lvl { font: 800 12px var(--mono); background: #1b222a; border-radius: 4px; padding: 2px 6px; }
.xpmini { width: 120px; height: 5px; background: #1b222a; border-radius: 3px; overflow: hidden; }
.xpmini i { display: block; height: 100%; background: var(--amber); }
.wallet { display: flex; gap: 12px; flex-wrap: wrap; margin-left: auto; font: 700 12px var(--mono); }
.wallet span { display: inline-flex; gap: 4px; align-items: center; }
.wallet .cr { color: var(--amber-2); font-size: 14px; }
.tabs { display: flex; gap: 2px; overflow-x: auto; padding: 0 10px; border-bottom: 1px solid var(--line); background: rgba(8, 11, 15, 0.9); scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 11px 12px; font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; position: relative; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--amber); }
.tabs button .badge { position: absolute; top: 5px; right: 1px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--amber); color: #1a1004; font: 800 10px/16px var(--mono); text-align: center; padding: 0 4px; }
.hub-body { padding: 14px; max-width: 1200px; width: 100%; margin: 0 auto; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
@media (max-width: 860px) { .grid2 { grid-template-columns: 1fr; } }
.pane { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.pane + .pane { margin-top: 12px; }
.next-op { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: linear-gradient(90deg, rgba(255, 180, 58, 0.12), rgba(255, 180, 58, 0.02)); border: 1px solid #5a4620; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
.next-op .t { font-weight: 800; }
.next-op .d { color: var(--muted); font-size: 12.5px; }
.worldmap { width: 100%; aspect-ratio: 1.55; background: radial-gradient(ellipse at 30% 70%, #13202a, #0a0f14 70%); border: 1px solid var(--line); border-radius: 8px; display: block; }
.worldmap .sector { cursor: pointer; }
.worldmap .sector:hover circle.core { stroke: #fff; }
.worldmap text { font-family: var(--font); pointer-events: none; }
.sector-card .own { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; }
.sector-card .own i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.op { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); margin-top: 6px; }
.op .n { font-weight: 700; }
.op .k { font: 700 10px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; }
.op .k.story { color: var(--amber); } .op .k.faction { color: var(--info); } .op .k.patrol { color: var(--good); } .op .k.assault { color: #ff9a4d; } .op .k.dz { color: var(--bad); }
.op .d { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.log p { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.log p b { color: var(--ink); font-family: var(--mono); margin-right: 6px; font-weight: 600; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.slot, .it { border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); padding: 7px 8px; text-align: left; min-height: 54px; display: grid; gap: 2px; align-content: start; }
.slot .sl { font: 700 9.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.slot .nm, .it .nm { font-weight: 700; font-size: 12.5px; line-height: 1.25; }
.slot .ex, .it .ex { font-size: 11px; color: var(--muted); }
.it.sel, .slot.sel { outline: 2px solid var(--amber); }
.bag { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.it { position: relative; }
.it .up { position: absolute; right: 6px; top: 5px; color: var(--good); font-weight: 900; font-size: 12px; }
.it .hot { position: absolute; right: 6px; bottom: 4px; color: var(--bad); font: 700 9px var(--mono); }
.detail .nm { font-size: 16px; font-weight: 800; }
.detail .power { color: var(--r-legendary); font-size: 12.5px; margin: 6px 0; }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font-size: 12.5px; margin: 8px 0; }
.stats .v { font-family: var(--mono); text-align: right; }
.stats .up { color: var(--good); } .stats .dn { color: var(--bad); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; font-size: 12.5px; }
.kv div { display: flex; justify-content: space-between; border-bottom: 1px dashed #1f2832; padding: 2px 0; }
.kv b { font-family: var(--mono); font-weight: 600; }

.tree { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .tree { grid-template-columns: 1fr; } }
.branch { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--panel-2); position: relative; }
.branch h4 { margin: 0 0 8px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; display: flex; justify-content: space-between; }
.rows { display: grid; gap: 8px; position: relative; }
.trow { display: flex; gap: 8px; justify-content: center; position: relative; }
.trow .req { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); font: 700 9px var(--mono); color: #4a5866; }
.node { width: 64px; height: 64px; border-radius: 12px; border: 2px solid #2a3642; background: #0d1319; display: grid; place-items: center; position: relative; padding: 0; }
.node.active { border-radius: 50%; }
.node.key { border-radius: 4px; transform: rotate(45deg); width: 54px; height: 54px; margin: 5px; }
.node.key > * { transform: rotate(-45deg); }
.node .g { font-size: 24px; line-height: 1; }
.node .rk { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); font: 800 10px var(--mono); background: #0d1319; border: 1px solid #2a3642; border-radius: 8px; padding: 0 5px; white-space: nowrap; }
.node.key .rk { transform: translateX(-50%) rotate(-45deg); bottom: -12px; left: 40%; }
.node.locked { opacity: 0.35; filter: grayscale(1); }
.node.can { border-color: var(--amber); box-shadow: 0 0 10px rgba(255, 180, 58, 0.35); animation: canpulse 1.6s infinite; }
@keyframes canpulse { 50% { box-shadow: 0 0 18px rgba(255, 180, 58, 0.6); } }
.node.has { border-color: var(--bcol, #58b4ff); background: radial-gradient(circle, color-mix(in srgb, var(--bcol, #58b4ff) 30%, #0d1319), #0d1319); }
.node.max { box-shadow: 0 0 12px var(--bcol, #58b4ff); }
.node.sel { outline: 2px solid #fff; outline-offset: 3px; }
.links { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.loadout { display: flex; gap: 8px; flex-wrap: wrap; }
.lslot { width: 150px; border: 1px dashed var(--line); border-radius: 8px; padding: 8px; display: flex; gap: 8px; align-items: center; background: var(--panel-2); text-align: left; }
.lslot.sel { border-style: solid; border-color: var(--amber); }
.lslot .g { font-size: 22px; }
.lslot .k { font: 800 10px var(--mono); color: var(--muted); }

.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.comp { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); padding: 10px; display: grid; grid-template-columns: 72px 1fr; gap: 10px; }
.comp.on { border-color: #3a6a8a; box-shadow: inset 0 0 0 1px #3a6a8a; }
.comp canvas { width: 72px; height: 88px; border-radius: 6px; }
.comp .nm { font-weight: 800; }
.comp .cl { font: 700 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.comp select { background: #0b1016; color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 3px; font-size: 12px; }
.comp .bio { font-size: 11.5px; color: var(--muted); grid-column: 1 / -1; margin: 0; }
.comp .gear { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.comp .gear div { font-size: 11px; border: 1px solid var(--line); border-radius: 4px; padding: 3px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pending { opacity: 0.6; border-style: dashed; }

.fac { border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); padding: 12px; display: grid; gap: 6px; }
.fac .hd { display: flex; align-items: center; gap: 8px; }
.fac .hd i { width: 12px; height: 12px; border-radius: 3px; }
.fac .hd b { font-size: 15px; }
.fac .tier { margin-left: auto; font: 800 11px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; }
.repbar { position: relative; height: 8px; background: linear-gradient(90deg, #5a1a22 0 25%, #5a3a1a 25% 45%, #2a3038 45% 62.5%, #1a4a2a 62.5% 80%, #1a3a5a 80%); border-radius: 4px; }
.repbar i { position: absolute; top: -3px; width: 4px; height: 14px; background: #fff; border-radius: 2px; transform: translateX(-2px); box-shadow: 0 0 6px #fff; }
.fac p { margin: 0; font-size: 12px; color: var(--muted); }
.tag { display: inline-block; font: 700 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.tag.war { color: var(--bad); border-color: #6a2a30; } .tag.ally { color: var(--info); border-color: #2a4a6a; } .tag.peace { color: var(--good); border-color: #2a5a3a; } .tag.tense { color: #ffb070; border-color: #5a3a1a; }
table.rel { border-collapse: collapse; font-size: 11px; }
table.rel td, table.rel th { padding: 3px 5px; border: 1px solid var(--line); text-align: center; }
.quest { border: 1px solid var(--line); border-radius: 6px; padding: 9px 10px; background: var(--panel-2); margin-top: 6px; display: grid; gap: 4px; }
.quest.main { border-left: 3px solid var(--amber); }
.quest .qn { font-weight: 800; }
.quest .qd { font-size: 12px; color: var(--muted); }
.quest .qr { font: 11px var(--mono); color: #a8b4c0; }
.prog { height: 6px; background: #1b222a; border-radius: 3px; overflow: hidden; }
.prog i { display: block; height: 100%; background: var(--good); }
.ach { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); }
.ach.done { border-color: #2a5a3a; }
.ach .an { font-weight: 700; font-size: 13px; }
.ach .ad { font-size: 11.5px; color: var(--muted); }

.dialog { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: start; }
.dialog canvas { width: 96px; height: 120px; border-radius: 8px; }
.dialog .who { font: 800 12px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.dialog .line { font-size: 16px; line-height: 1.55; min-height: 70px; }
.choices { display: grid; gap: 8px; margin-top: 12px; }
.choices .btn { text-align: left; }
.summary .big { font-size: 28px; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.summary .big.win { color: var(--good); } .summary .big.lose { color: var(--bad); }
.loot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; margin: 8px 0; }
.levelup { position: absolute; left: 50%; top: 32%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; z-index: 25; animation: lvl 2.2s ease-out forwards; }
.levelup b { display: block; font-size: 44px; font-weight: 900; letter-spacing: 0.2em; color: var(--amber-2); text-shadow: 0 0 24px rgba(255, 180, 58, 0.7); }
.levelup span { font: 700 13px var(--mono); letter-spacing: 0.2em; color: #fff; }
@keyframes lvl { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.7); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%); } }
.enh-fx { font-size: 26px; font-weight: 900; text-align: center; padding: 10px; animation: enh 0.6s; }
@keyframes enh { from { transform: scale(1.6); opacity: 0; } }
.settings label { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px dashed #1f2832; }
textarea.code { width: 100%; min-height: 80px; background: #0b1016; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 8px; font: 11px var(--mono); }
body.embedded .hub-head { padding-top: 6px; }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0 12px; }
.look { border: 1px solid var(--line); background: radial-gradient(circle, #1d2630, #0d1217); border-radius: 8px; padding: 6px; display: grid; gap: 4px; justify-items: center; }
.look img { width: 72px; height: 72px; object-fit: contain; transform: rotate(-90deg); filter: drop-shadow(0 3px 4px rgba(0,0,0,0.6)); }
.look span { font-size: 11px; font-weight: 700; }
.look.sel { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.screen .title-wrap { position: relative; z-index: 1; }
.screen.title-bg { background: linear-gradient(180deg, rgba(5,7,10,0.35), rgba(5,7,10,0.92) 70%), url("/games/assets/covers/blackzone.webp") center / cover no-repeat; }
