: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-surplus: #80878f;
  --r-common: #c3cad3;
  --r-magic: #58b4ff;
  --r-rare: #ffd24a;
  --r-epic: #c27bff;
  --r-legendary: #ff8a2a;
  --r-mythic: #ff5cd6;
  --r-prototype: #9ff8ee;
  --proto-grad: linear-gradient(90deg, #ff6b6b, #ffd24a, #5af0a0, #58b4ff, #c27bff, #ff5cd6, #ff6b6b);
  --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-surplus { color: var(--r-surplus); } .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-surplus { border-color: #33383e !important; } .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; }
.coach { position: absolute; inset: 0; pointer-events: none; transition: opacity 0.6s; }
.coach.fade { opacity: 0; }
.coach-card { position: absolute; left: 50%; bottom: 112px; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-end; gap: 16px; max-width: calc(100% - 32px); padding: 12px 40px 10px 18px; background: rgba(8, 12, 16, 0.78); border: 1px solid var(--line); border-radius: 10px; color: #e6edf3; }
.coach kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px; border: 1px solid #8a96a3; border-bottom-width: 3px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); font: 800 12px var(--font); color: #fff; }
.coach kbd.wide { min-width: 64px; }
.coach .cg { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.coach .cg b, .coach .cb { font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.coach .cg b { color: var(--amber); }
.coach .cg.sm kbd { height: 22px; min-width: 22px; font-size: 11px; }
.coach .cg.sm .wide { min-width: 54px; }
.coach .cg.ok { opacity: 0.5; }
.coach .cg.ok b::after { content: " ✓"; color: var(--good); }
.coach .wasd { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.coach .wasd span { display: flex; gap: 2px; }
.coach .mouse { width: 22px; height: 32px; color: #e6edf3; }
.coach-x { position: absolute; top: 6px; right: 6px; pointer-events: auto; width: 26px; height: 26px; border: 0; border-radius: 6px; background: rgba(255, 255, 255, 0.08); color: #cfd8e0; font-size: 13px; cursor: pointer; }
.coach > .coach-x { top: auto; bottom: 230px; right: 50%; transform: translateX(50%); width: 34px; height: 34px; }
.coach .cb { position: absolute; transform: translate(-50%, -100%); padding: 6px 10px; border: 1px solid var(--amber); border-radius: 8px; background: rgba(8, 12, 16, 0.85); color: #fff; white-space: nowrap; }
.coach .cb.in { transform: translate(-50%, -50%); background: rgba(8, 12, 16, 0.6); }
.coach .cb.ok { border-color: var(--good); opacity: 0.5; }
.coach .cring { position: absolute; border: 2px solid var(--amber); border-radius: 50%; animation: coachPulse 1.4s ease-out infinite; }
@keyframes coachPulse { from { box-shadow: 0 0 0 0 rgba(255, 180, 58, 0.55); } to { box-shadow: 0 0 0 16px rgba(255, 180, 58, 0); } }
@media (prefers-reduced-motion: reduce) { .coach .cring { animation: none; } }
.coach .ckeys { display: grid; grid-template-columns: repeat(4, auto); gap: 6px 14px; align-self: center; }
.coach .ckeys span { display: flex; align-items: center; gap: 6px; }
.coach .ckeys kbd { height: 22px; min-width: 22px; font-size: 11px; }
.coach .ckeys kbd.wide { min-width: 50px; }
.coach .ckeys b { color: var(--amber); font-size: 10.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
@media (max-width: 700px) { .coach .ckeys { grid-template-columns: repeat(2, auto); } }
/* Just-in-time control tip: one keycap card at a time, ✓ flash when the player does it. */
.tip { position: absolute; left: 50%; top: 31%; transform: translate(-50%, 8px); display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: rgba(8, 12, 16, 0.82); border: 1px solid var(--amber); border-radius: 10px; color: #e6edf3; font-size: 13px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.35s, transform 0.35s, border-color 0.2s; z-index: 24; }
.tip.show { opacity: 1; transform: translate(-50%, 0); }
.tip kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border: 1px solid #8a96a3; border-bottom-width: 3px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); font: 800 12px var(--font); color: #fff; }
.tip kbd.wide { min-width: 52px; }
.tip.ok { border-color: var(--good); }
.tip.ok span::after { content: " ✓"; color: var(--good); }
@media (prefers-reduced-motion: reduce) { .tip { transition: opacity 0.35s; transform: translateX(-50%); } }
.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; }
/* Above the bottom bar: the gear pickup prompt and, stacked over it, the unspent skill point pill. */
.hud-prompts { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; }
.loot-prompt { display: flex; align-items: center; gap: 8px; max-width: min(420px, 92vw); padding: 6px 12px; border: 1px solid var(--line); border-left: 3px solid var(--rc, var(--line)); border-radius: 8px; background: rgba(8, 12, 16, 0.88); font: 700 12px var(--font); white-space: nowrap; }
.loot-prompt b { font-size: 11px; letter-spacing: 0.12em; color: var(--muted); }
.loot-prompt.up b { color: var(--good); }
.loot-prompt span { overflow: hidden; text-overflow: ellipsis; color: var(--rc, var(--ink)); }
.loot-prompt em { font-style: normal; color: var(--amber-2); }
.sk-pill { padding: 5px 14px; border: 1px solid var(--amber); border-radius: 999px; background: rgba(34, 24, 6, 0.9); color: var(--amber-2); font: 800 12px var(--font); letter-spacing: 0.04em; white-space: nowrap; animation: pillPulse 1.6s ease-in-out infinite; }
.sk-pill kbd, .loot-prompt kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; margin: 0 2px; border: 1px solid #8a96a3; border-bottom-width: 2px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); font: 800 11px var(--font); color: #fff; }
@keyframes pillPulse { 50% { box-shadow: 0 0 16px rgba(255, 180, 58, 0.55); } }
.sk-pill.hot { animation: pillHot 0.7s ease-in-out infinite; background: rgba(58, 38, 6, 0.95); color: #fff3c0; }
@keyframes pillHot { 0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(255, 180, 58, 0.5); } 50% { transform: scale(1.12); box-shadow: 0 0 26px rgba(255, 210, 74, 0.95), 0 0 0 4px rgba(255, 210, 74, 0.25); } }
@media (prefers-reduced-motion: reduce) { .sk-pill, .sk-pill.hot { animation: none; } .sk-pill.hot { box-shadow: 0 0 16px rgba(255, 210, 74, 0.8); } }
body:has(#hud:not([hidden]) .hud-prompts > :not([hidden])) .toasts { bottom: 160px; }
.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; }
.streak-call { position: absolute; left: 0; bottom: calc(100% + 10px); pointer-events: none; opacity: 0; transition: opacity 0.4s; text-shadow: 0 3px 12px #000; white-space: nowrap; }
.streak-call b { display: block; font: 900 26px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.streak-call small { font: 700 11px var(--mono); color: #e6edf3; }
.streak-call[data-tier="2"] b { color: #ff9a3a; }
.streak-call[data-tier="3"] b { color: #ff4d5e; }
.streak-call[data-tier="jackpot"] b { color: #ffb347; }
.streak-call.show { opacity: 1; transition: none; animation: streakPop 0.35s ease-out; }
@keyframes streakPop { from { transform: scale(1.7); opacity: 0; } 60% { transform: scale(0.95); } }
@media (prefers-reduced-motion: reduce) { .streak-call.show { animation: none; } }
.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: 10px; right: 170px; 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 { right: 130px; }
/* Touch: the chat button and log sit above the sticks, not inside the left stick's reach. */
body.is-touch .chat { bottom: 232px; width: min(60vw, calc(100vw - 230px)); }
/* Phones held sideways: the tall-screen layout stacks the action buttons over the minimap. Keep the right
   thumb's cluster (stick + buttons) in the bottom-right corner and the map, objective and menu buttons on top. */
@media (max-height: 520px) {
  body.is-touch .stick { width: 104px; height: 104px; bottom: 12px; }
  body.is-touch .stick i { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  body.is-touch .stick.l { left: 12px; }
  body.is-touch .stick.r { right: 12px; }
  body.is-touch .t-buttons { right: 124px; bottom: 12px; width: 84px; gap: 6px; }
  body.is-touch .tb { width: 39px; height: 39px; font-size: 14px; }
  body.is-touch .tb.wide { width: 84px; height: 34px; font-size: 12px; }
  body.is-touch #minimap { width: 88px; height: 88px; }
  body.is-touch .hud-tr { width: min(200px, 34vw); gap: 6px; }
  body.is-touch .tracker { font-size: 10.5px; padding: 5px 7px; }
  body.is-touch .pause-btn { right: 106px; width: 30px; height: 30px; }
  body.is-touch #bag-btn { top: 10px; right: 142px; }
  body.is-touch #sk-btn { top: 10px; right: 178px; }
  body.is-touch .hud-bottom { transform: translateX(-50%) scale(0.74); }
  body.is-touch .chat { bottom: 124px; }
}
@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; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis; }
.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; }
.class-card .sig-line { display: block; margin-top: 6px; font-size: 11px; line-height: 1.4; color: #f5d76e; }
.class-card .sig-line b { color: #ffe9a0; }
.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 minmax(0, 1fr); overflow: hidden; overflow: clip; }
.hub-head { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(16, 22, 30, 0.96), rgba(10, 14, 20, 0.96)); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); z-index: 2; }
.hub-nav { display: flex; gap: 6px; }
.hub-nav .btn { padding: 5px 10px; font-size: 12px; }
.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 { position: relative; flex: none; display: flex; gap: 2px; overflow-x: auto; padding: 0 10px; border-bottom: 1px solid var(--line); background: rgba(8, 11, 15, 0.94); scrollbar-width: none; z-index: 1; }
.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; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.tabs button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.03); }
.tabs button .ti { margin-right: 6px; opacity: 0.75; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--amber); background: linear-gradient(180deg, transparent, rgba(255, 180, 58, 0.07)); }
.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-scroll { overflow: auto; overscroll-behavior: contain; }
.hub-body { padding: 14px; max-width: 1200px; width: 100%; margin: 0 auto; }
.hub-body.enter { animation: tabIn 0.22s ease-out; }
@keyframes tabIn { from { opacity: 0; transform: translateY(6px); } }
.pane { transition: border-color 0.2s; }
.comp { transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.comp:hover { border-color: #3a4d62; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.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: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 40%), var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 12px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 20px rgba(0, 0, 0, 0.18); }
.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; }
.hub-notes { display: grid; gap: 10px; padding-bottom: 0; }
.hub-notes .next-op { margin-bottom: 0; }
.daily-strip { display: flex; gap: 5px; margin: 6px 0; }
.daily-strip span { display: grid; place-items: center; width: 34px; height: 38px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, 0.03); color: var(--muted); font-size: 12px; line-height: 1.1; }
.daily-strip b { font-size: 10px; letter-spacing: 0.06em; }
.daily-strip .big { color: #c27bff; }
.daily-strip .got { border-color: #2c5a44; color: var(--good); background: rgba(90, 240, 160, 0.08); }
.daily-strip .now { border-color: var(--amber); color: var(--amber); background: rgba(255, 180, 58, 0.14); box-shadow: 0 0 0 1px var(--amber); }
.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; }

/* ---- Skill tree: branch cards, bevelled glowing nodes, energy links, learn burst */
.tree { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .tree { grid-template-columns: 1fr; } }
.branch { --glow: color-mix(in srgb, var(--bcol) 45%, transparent); border: 1px solid color-mix(in srgb, var(--bcol) 22%, var(--line)); border-top: 2px solid var(--bcol); border-radius: 10px; padding: 10px 10px 20px; background: radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--bcol) 12%, transparent), transparent 70%), linear-gradient(180deg, #121a22, #0b1016); position: relative; min-width: 0; }
.branch h4 { margin: 0 0 6px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; display: flex; justify-content: space-between; color: var(--bcol); text-shadow: 0 0 10px var(--glow); }
.branch h4 .mono { color: var(--ink); text-shadow: none; }
.br-meter { height: 6px; margin-bottom: 14px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6); overflow: hidden; }
.br-meter i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--bcol) 55%, #000), var(--bcol) 70%, #fff); box-shadow: 0 0 8px var(--bcol); transition: width 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.rows { display: grid; gap: 14px; position: relative; }
.trow { display: flex; gap: 8px; justify-content: center; position: relative; padding: 0 16px; }
.trow .tier { position: absolute; left: 0; top: 50%; transform: translateY(-50%); font: 800 10px var(--mono); letter-spacing: 0.04em; color: color-mix(in srgb, var(--bcol) 55%, #4a5866); }
.trow.shut .node { opacity: 0.28; filter: grayscale(0.9) brightness(0.7); animation: none; box-shadow: none; }
.trow.shut .tier { color: #3a4652; }
.lockmsg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border: 1px solid #3a4652; border-radius: 999px; background: rgba(7, 9, 12, 0.88); color: #b9c3cd; font: 700 10.5px var(--mono); white-space: nowrap; pointer-events: none; }
.node { --bcol-d: color-mix(in srgb, var(--bcol) 30%, #0a0f14); width: 64px; height: 64px; border-radius: 14px; border: 2px solid #2a3642; background: linear-gradient(160deg, #1d2732, #0a0f14 70%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), inset 0 -4px 8px rgba(0, 0, 0, 0.55), 0 3px 6px rgba(0, 0, 0, 0.5); display: grid; place-items: center; position: relative; padding: 0; z-index: 1; transition: transform 0.15s, box-shadow 0.2s; }
.node:hover, .node:focus-visible { transform: translateY(-2px) scale(1.04); }
.node.active { border-radius: 50%; }
.node.mod { border-style: dashed; }
.node .g { font-size: 24px; line-height: 1; color: #8d99a6; transition: color 0.2s; }
.node .pips { position: absolute; bottom: -7px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; padding: 2px 4px; border: 1px solid #2a3642; border-radius: 6px; background: #0a0f14; z-index: 2; }
.node .pips i { width: 6px; height: 6px; border-radius: 50%; background: #26313c; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6); transition: background 0.3s; }
.node .pips i.on { background: var(--bcol); box-shadow: 0 0 5px var(--bcol), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.node.locked { opacity: 0.35; filter: grayscale(1); }
.node.can { border-color: var(--amber); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 10px rgba(255, 180, 58, 0.25), 0 0 10px rgba(255, 180, 58, 0.35); animation: canpulse 1.6s infinite; }
.node.can .g { color: #ffe7b0; }
@keyframes canpulse { 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 14px rgba(255, 180, 58, 0.35), 0 0 20px rgba(255, 180, 58, 0.6); } }
.node.has { border-color: var(--bcol); background: radial-gradient(circle at 50% 32%, color-mix(in srgb, var(--bcol) 80%, #fff) 0%, color-mix(in srgb, var(--bcol) 50%, #0d1319) 26%, var(--bcol-d) 60%, #070a0e 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.28), inset 0 -5px 10px rgba(0, 0, 0, 0.55), inset 0 0 16px color-mix(in srgb, var(--bcol) 55%, transparent), 0 0 14px color-mix(in srgb, var(--bcol) 45%, transparent), 0 3px 6px rgba(0, 0, 0, 0.5); }
.node.has .g { color: #fff; text-shadow: 0 0 10px var(--bcol), 0 1px 0 rgba(0, 0, 0, 0.6); }
.node.has.can { border-color: color-mix(in srgb, var(--bcol) 50%, var(--amber)); }
.node.max { border-color: color-mix(in srgb, var(--bcol) 45%, #ffe08a); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), inset 0 0 18px color-mix(in srgb, var(--bcol) 70%, transparent), 0 0 22px var(--bcol), 0 3px 6px rgba(0, 0, 0, 0.5); }
.node.max.active::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid rgba(255, 210, 74, 0.75); box-shadow: 0 0 12px rgba(255, 210, 74, 0.55); animation: aura 3.2s ease-in-out infinite; pointer-events: none; }
.node.sel { outline: 2px solid #fff; outline-offset: 4px; }
.node.key.sel { outline: none; }
.tree .node.key.sel::before { outline: 2px solid #fff; outline-offset: 5px; }
/* Keystone: a large ornate diamond with a slow aura, drawn by pseudo-elements so the button itself stays upright. */
.node.key { width: 74px; height: 74px; border: 0; background: none; box-shadow: none; }
.node.key::before { content: ""; position: absolute; inset: 13px; transform: rotate(45deg); border-radius: 6px; border: 2px solid #3a4652; outline: 1px solid #2a3642; outline-offset: 4px; background: linear-gradient(160deg, #1d2732, #0a0f14 70%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -4px 8px rgba(0, 0, 0, 0.55), 0 3px 8px rgba(0, 0, 0, 0.6); z-index: -1; }
.node.key::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--bcol) 35%, transparent), transparent); opacity: 0.35; animation: aura 4s ease-in-out infinite; z-index: -2; pointer-events: none; }
.node.key .g { font-size: 26px; }
.node.key.can::before { border-color: var(--amber); outline-color: rgba(255, 180, 58, 0.5); }
.node.key.can { animation: none; }
.node.key.has::before, .node.key.max::before { border-color: #ffe08a; outline: 2px solid var(--bcol); background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--bcol) 70%, #fff), var(--bcol-d) 60%, #070a0e); box-shadow: inset 0 0 18px var(--bcol), 0 0 20px var(--bcol); }
.node.key.has::after { opacity: 1; background: radial-gradient(closest-side, color-mix(in srgb, var(--bcol) 55%, transparent), color-mix(in srgb, #ffd24a 18%, transparent) 70%, transparent); }
@keyframes aura { 0%, 100% { transform: scale(0.94); opacity: 0.55; } 50% { transform: scale(1.1); opacity: 1; } }
.links { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.links .lk { stroke: #26313c; stroke-width: 2; }
.links .lk.on { stroke: var(--bcol); stroke-width: 3; opacity: 0.8; filter: drop-shadow(0 0 3px var(--bcol)); }
.links .flow { stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 3 13; opacity: 0.9; filter: drop-shadow(0 0 4px var(--bcol)); animation: flow 0.9s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -16; } }
/* Learn burst: node pop, particle ring and shockwave; .sk-edge flashes the screen edges in the branch colour. */
.node.burst { animation: nodePop 0.55s cubic-bezier(0.2, 1.6, 0.4, 1); z-index: 3; }
@keyframes nodePop { 0% { transform: scale(1); } 35% { transform: scale(1.38); } 100% { transform: scale(1); } }
.nb-fx { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 4; }
.nb-wave { position: absolute; left: -32px; top: -32px; width: 64px; height: 64px; border-radius: 50%; border: 3px solid var(--bcol); box-shadow: 0 0 16px var(--bcol), inset 0 0 12px var(--bcol); animation: nbWave 0.7s ease-out forwards; }
.nb-p { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px var(--bcol), 0 0 2px #fff; animation: nbP 0.75s cubic-bezier(0.1, 0.7, 0.3, 1) forwards; }
.nb-p:nth-child(odd) { background: var(--bcol); }
@keyframes nbWave { from { transform: scale(0.5); opacity: 1; } to { transform: scale(2.6); opacity: 0; } }
@keyframes nbP { from { transform: rotate(var(--a)) translateY(0) scale(1.3); opacity: 1; } to { transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(0.4); opacity: 0; } }
.sk-edge { position: fixed; inset: 0; pointer-events: none; z-index: 200; box-shadow: inset 0 0 90px 14px var(--bcol), inset 0 0 0 3px var(--bcol); opacity: 0; animation: edgeFlash 0.8s ease-out; }
@keyframes edgeFlash { 15% { opacity: 0.9; } to { opacity: 0; } }
.sk-pts.on { color: var(--amber-2); text-shadow: 0 0 10px rgba(255, 180, 58, 0.6); }
/* Hover/focus tooltip and the detail pane's current-vs-next table. */
.sk-tip { position: fixed; z-index: 210; width: max-content; max-width: min(290px, calc(100vw - 24px)); padding: 9px 11px; border: 1px solid color-mix(in srgb, var(--bcol, var(--amber)) 60%, var(--line)); border-radius: 9px; background: rgba(9, 13, 18, 0.96); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 14px color-mix(in srgb, var(--bcol, var(--amber)) 25%, transparent); color: var(--ink); font-size: 12px; pointer-events: none; }
.sk-tip p { margin: 6px 0 0; color: #cfd8e0; line-height: 1.35; }
.tt-h { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.tt-h .g { color: var(--bcol, var(--amber)); font-size: 16px; }
.tt-r { margin-left: auto; font: 800 11px var(--mono); color: var(--muted); }
.tt-k { font: 700 10.5px var(--mono); letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.tt-why { margin-top: 6px; font-size: 11px; color: #ffb0a0; }
.rk-rows { display: grid; gap: 2px; max-width: 380px; margin: 8px 0 4px; font: 600 11.5px var(--mono); }
.rk-rows > div { display: grid; grid-template-columns: minmax(0, 1fr) auto 14px auto; gap: 6px; align-items: baseline; }
.rk-rows span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-family: var(--font); }
.rk-rows b { text-align: right; color: var(--ink); }
.rk-rows b.nx { color: var(--good); }
.rk-rows i { color: var(--muted); font-style: normal; text-align: center; }
.rk-rows .rk-h b { font-size: 10px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.mastery { display: grid; gap: 2px; max-width: 380px; margin: 8px 0 4px; padding: 6px 9px; border: 1px dashed rgba(255, 210, 74, 0.45); border-radius: 7px; background: rgba(255, 180, 58, 0.05); font-size: 12px; }
.mastery b { font: 800 10.5px var(--mono); letter-spacing: 0.06em; color: #b99654; text-transform: uppercase; }
.mastery span { color: #b9c3cd; }
.mastery.on { border-style: solid; border-color: var(--amber-2); background: linear-gradient(90deg, rgba(255, 180, 58, 0.18), rgba(255, 180, 58, 0.04)); box-shadow: 0 0 12px rgba(255, 180, 58, 0.25); }
.mastery.on b { color: var(--amber-2); }
.mastery.on span { color: #fff3c0; }
.sk-detail { border-top: 2px solid var(--bcol); }
@media (prefers-reduced-motion: reduce) {
  .node, .node:hover, .node:focus-visible { transition: none; transform: none; }
  .node.can, .node.burst, .node.max.active::after, .node.key::after, .links .flow { animation: none; }
  .nb-fx { display: none; }
  .sk-edge { animation: none; opacity: 0.6; }
  .br-meter i { transition: none; }
}
.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; gap: 4px; }
.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; } .tag.allied { color: #7fd8ff; border-color: #2a5a7a; background: rgba(88, 199, 255, 0.08); }
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: 30%; width: max-content; max-width: calc(100% - 32px); transform: translate(-50%, -50%); text-align: center; pointer-events: none; z-index: 25; animation: lvl 3.1s ease-out forwards; }
.levelup::before { content: ""; position: absolute; left: 50%; top: 50%; width: 140%; height: 130%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(255, 180, 58, 0.32), rgba(255, 180, 58, 0)); z-index: -1; }
.levelup b { display: block; font-size: clamp(34px, 7vw, 60px); font-weight: 900; letter-spacing: 0.18em; line-height: 1.05; color: transparent; background: linear-gradient(180deg, #fff6d0 10%, var(--amber-2) 45%, var(--amber) 70%, #b86a10); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 18px rgba(255, 180, 58, 0.75)) drop-shadow(0 2px 0 #3a2404); }
.lv-gains { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; }
.lv-gains i { font: 800 13px var(--mono); font-style: normal; letter-spacing: 0.06em; padding: 3px 10px; border: 1px solid rgba(255, 210, 74, 0.55); border-radius: 999px; background: rgba(30, 20, 4, 0.82); color: var(--good); animation: lvGain 0.45s ease-out backwards; }
.lv-gains i:nth-child(2) { animation-delay: 0.12s; } .lv-gains i:nth-child(3) { animation-delay: 0.24s; } .lv-gains i:nth-child(4) { animation-delay: 0.36s; }
.lv-gains i.sp { color: var(--amber-2); border-color: var(--amber); }
@keyframes lvl { 0% { opacity: 0; transform: translate(-50%, -30%) scale(0.6); } 10% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); } 18% { transform: translate(-50%, -50%) scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -64%); } }
@keyframes lvGain { from { opacity: 0; transform: translateY(8px) scale(0.8); } }
@media (prefers-reduced-motion: reduce) { .levelup { animation: lvlFade 3.1s linear forwards; } .lv-gains i { animation: none; } }
@keyframes lvlFade { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
.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; }

/* ------------------------------------------------ town stalls */
.card.town-panel { max-width: 1100px; width: 100%; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 0; overflow: hidden; }
.tp-head { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 212, 138, 0.07), transparent); }
.tp-badge { width: 48px; height: 48px; border-radius: 10px; border: 1px solid rgba(255, 212, 138, 0.45); background: radial-gradient(circle at 35% 30%, rgba(255, 212, 138, 0.25), rgba(255, 212, 138, 0.05)); display: grid; place-items: center; font-size: 24px; font-weight: 900; color: #ffd48a; flex: none; box-shadow: 0 0 18px rgba(255, 180, 58, 0.15); }
.tp-who { color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-transform: none; }
.tp-title { font-weight: 900; letter-spacing: 0.08em; color: #ffd48a; text-transform: uppercase; }
.tp-line { color: var(--muted); font-size: 13px; font-style: italic; margin-top: 2px; }
.tp-wallet { margin-left: auto; color: var(--amber-2); font-weight: 800; }
.panel-body { overflow: auto; max-width: none; }
@media (max-width: 720px) { .tp-line { display: none; } .tp-head { flex-wrap: wrap; gap: 8px 10px; padding: 10px; } .tp-badge { width: 36px; height: 36px; font-size: 18px; } .tp-tabs { order: 5; width: 100%; } .tp-tabs .btn { flex: 1; } .card.town-panel { max-width: 100%; } .panel-body { padding: 10px; } }

/* ------------------------------------------------ field kit */
#bag-btn { top: 50px; font-size: 15px; }
#sk-btn { top: 90px; font-size: 15px; }
.pause-btn.fk:hover { border-color: #4a6a8a; }
.tp-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tp-tabs .badge { display: inline-block; min-width: 16px; height: 16px; border-radius: 8px; background: #1a1004; color: var(--amber); font: 800 10px/16px var(--mono); text-align: center; padding: 0 4px; margin-left: 4px; }
.tp-tabs .btn:not(.primary) .badge { background: var(--amber); color: #1a1004; }

/* ---------------------------------------------------------------- items: cards, sheet, compare, bulk, squad gear */
.gold { color: var(--amber-2); }
.it { border-left-width: 3px; padding-right: 22px; }
.it .meta { font: 600 10px var(--mono); letter-spacing: 0.04em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.it .meta b { font-weight: 800; }
.it .ex { font-family: var(--mono); font-size: 10.5px; }
.bag.multi .it { padding-right: 30px; }
.it .ck { position: absolute; right: 6px; top: 6px; width: 18px; height: 18px; border: 1.5px solid #4a5a6a; border-radius: 4px; display: grid; place-items: center; font: 900 12px/1 var(--font); color: #1a1004; }
.it.picked { background: linear-gradient(180deg, rgba(255, 180, 58, 0.1), transparent), var(--panel-2); box-shadow: inset 0 0 0 1px rgba(255, 180, 58, 0.55); }
.it.picked .ck { background: var(--amber); border-color: var(--amber); }
.baghead { row-gap: 6px; }
.baghead .sorts { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.bulk-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding: 8px; border: 1px dashed #2e3b48; border-radius: 6px; background: rgba(255, 255, 255, 0.015); }
.bulkbar { position: sticky; bottom: 0; z-index: 3; margin: 10px -12px -12px; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; background: rgba(12, 16, 22, 0.96); border-top: 1px solid #3a4a5a; border-radius: 0 0 8px 8px; box-shadow: 0 -8px 18px rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px); }
.bulkbar .bb-info { display: grid; gap: 2px; font-size: 12.5px; min-width: 0; flex: 1 1 180px; }
.bulkbar .bb-info > div b { font: 800 15px var(--mono); color: var(--amber-2); }
.bulkbar .bb-info span { font-size: 11.5px; color: var(--muted); }
.bulkbar .bb-acts { display: flex; gap: 6px; flex-wrap: wrap; }

.sheet { display: grid; gap: 10px; }
.sh-head { border-left: 3px solid; padding: 2px 0 2px 10px; }
.sh-head .nm { font-size: 17px; font-weight: 800; line-height: 1.2; }
.sh-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sheet .badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.sheet .badge { font: 700 10px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; border: 1px solid var(--line); color: var(--muted); }
.sheet .badge.hot { color: #ffd0d4; border-color: #8a2a34; background: rgba(255, 77, 94, 0.14); }
.sheet .badge.origin { color: var(--amber); border-color: #6a5a2a; background: rgba(255, 180, 58, 0.08); }
.sheet .badge.eq { color: var(--good); border-color: #2a6a4a; }
.sheet .badge.aff { color: var(--info); border-color: #2f5a8a; }
.sheet .badge.sig { color: #f5d76e; border-color: #8a6d1f; background: rgba(245, 215, 110, 0.08); }
.w-name.sig { color: #f5d76e; text-shadow: 0 0 8px rgba(245, 215, 110, 0.45); }
.sheet .power, .give-cmp .power { border: 1px solid #7a4a1a; background: linear-gradient(90deg, rgba(255, 138, 42, 0.14), rgba(255, 138, 42, 0.03)); border-radius: 6px; padding: 8px 10px; font-size: 12.5px; line-height: 1.4; }
.power .ph { font: 800 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--r-legendary); margin-bottom: 3px; }
.power .perk { margin-left: 6px; padding: 1px 6px; border-radius: 3px; background: var(--r-legendary); color: #1a0e04; letter-spacing: 0.06em; }
.sheet .sec h4, .compare h4, .give-cmp h4 { margin: 0 0 5px; font: 800 10.5px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.sheet .core { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 3px 14px; font-size: 12.5px; }
.sheet .core div { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed #1f2832; }
.sheet .core b { font: 600 12.5px var(--mono); }
.sheet .core .hi b { color: var(--amber-2); font-size: 14px; font-weight: 800; }
.sheet .bonus { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; }
.sheet .bonus li { display: flex; gap: 8px; align-items: baseline; }
.sheet .bonus i { font-style: normal; width: 14px; text-align: center; }
.g-off i, .bchip.g-off { color: #ff9a7a; } .g-def i, .bchip.g-def { color: #7ad0ff; } .g-util i, .bchip.g-util { color: #b8e07a; }
.sheet .worth { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.sheet .worth div { display: flex; gap: 6px; align-items: baseline; }
.sheet .worth span { color: var(--muted); }
.sheet .worth b { font-weight: 700; }
.detail .acts { margin-top: 12px; }
.detail .acts .btn, .give-cmp .btn, .bulkbar .btn, .merc .hire .btn { min-height: 34px; }

.compare { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.compare p { margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; width: fit-content; max-width: 100%; }
.seg button { border: 0; background: #0f151c; padding: 6px 12px; min-height: 32px; font-size: 12px; font-weight: 700; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: rgba(255, 180, 58, 0.16); color: var(--amber-2); }
.cmp { display: grid; font-size: 12.5px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.cmp .cr { display: grid; grid-template-columns: minmax(0, 1fr) 64px 64px 78px; gap: 6px; padding: 4px 8px; align-items: baseline; }
.cmp .cr:nth-child(even) { background: rgba(255, 255, 255, 0.022); }
.cmp .cr.hd { font: 700 9.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); background: #0d1218; }
.cmp .k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp .v, .cmp .d { font-family: var(--mono); text-align: right; white-space: nowrap; }
.cmp .v { color: var(--muted); }
.cmp .v.nx { color: var(--ink); font-weight: 700; }
.cmp .d { font-weight: 800; font-size: 11.5px; }
.cmp .up .d { color: var(--good); } .cmp .dn .d { color: var(--bad); }
.cmp .same { opacity: 0.55; }

.bchips { display: flex; flex-wrap: wrap; gap: 4px; }
.bchip { font: 700 10.5px var(--mono); padding: 2px 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.gslot { display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: rgba(0, 0, 0, 0.18); }
.merc .gslot { grid-template-columns: 50px minmax(0, 1fr); }
.gslot .sl { font: 700 9.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.gslot .gi { display: grid; min-width: 0; }
.gslot .nm { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gslot .ex { font: 10.5px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.comp .gslot select { max-width: 96px; min-height: 32px; }
.give-cmp { grid-column: 1 / -1; display: grid; gap: 8px; padding: 10px; border: 1px solid #6a5a2a; border-radius: 6px; background: rgba(255, 180, 58, 0.05); }
.give-cmp h4 { color: var(--ink); letter-spacing: 0.08em; }
.merc .hire { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.merc .hire .gold { font-size: 15px; font-weight: 800; margin-right: auto; }
@media (max-width: 520px) {
  .cmp .cr { grid-template-columns: minmax(0, 1fr) 52px 56px 66px; gap: 4px; padding: 4px 6px; font-size: 12px; }
  .baghead .sorts { margin-left: 0; order: 3; width: 100%; }
  .baghead .btn.tiny, .bulk-tools .btn.tiny { min-height: 32px; padding: 4px 10px; }
  .bag { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sheet .core { grid-template-columns: 1fr; }
}
.roster .comp.giving { grid-column: 1 / -1; }
.give-cmp .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; align-items: start; }
.give-cmp .cols h4 { color: var(--muted); }
@media (max-width: 520px) { .cmp .k { white-space: normal; line-height: 1.25; } .cmp .cr { align-items: center; } }

/* ------------------------------------------------ chat */
.chat { position: absolute; left: 10px; bottom: 112px; width: min(350px, 40vw); display: flex; flex-direction: column; gap: 4px; pointer-events: none; z-index: 3; }
.chat-log { display: flex; flex-direction: column; gap: 2px; max-height: 176px; overflow: hidden; justify-content: flex-end; mask-image: linear-gradient(180deg, transparent, #000 22%); }
.chat.open .chat-log { max-height: 260px; overflow-y: auto; pointer-events: auto; background: rgba(6, 9, 13, 0.72); border: 1px solid var(--line); border-radius: 6px; padding: 6px; mask-image: none; }
.chat-log p { margin: 0; font: 600 12px/1.35 system-ui; color: #e8edf2; text-shadow: 0 1px 2px #000; padding: 1px 4px; border-radius: 3px; animation: radioIn 0.2s ease-out; transition: opacity 0.6s; }
.chat-log p.old { opacity: 0; }
.chat.open .chat-log p.old { opacity: 0.75; }
.chat-log b { margin-right: 6px; font-weight: 800; }
.chat-log .ch-radio { color: #bfe6c8; }
.chat-log .ch-radio b { color: var(--good); }
.chat-log .ch-you b { color: #7fc0ff; }
.chat-log .ch-npc b { color: #ffd48a; }
.chat-log .ch-foe { color: #ffc0c0; }
.chat-log .ch-foe b { color: #ff6a6a; }
.chat-log .ch-sys { color: var(--muted); font-style: italic; }
.chat-form input { width: 100%; pointer-events: auto; background: rgba(8, 12, 18, 0.92); border: 1px solid #3a5a7a; border-radius: 6px; padding: 8px 10px; color: var(--ink); font: 600 13px system-ui; }
.chat-btn { pointer-events: auto; align-self: flex-start; width: 34px; height: 30px; border-radius: 6px; border: 1px solid var(--line); background: rgba(10, 14, 20, 0.75); font-size: 14px; }
.hud .radio { display: none; }
.convo { position: absolute; left: 50%; bottom: 128px; transform: translateX(-50%); width: min(520px, calc(100vw - 24px)); background: rgba(12, 16, 22, 0.94); border: 1px solid #5a4a2a; border-radius: 10px; padding: 12px; z-index: 4; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5); animation: toastIn 0.2s ease-out; }
.convo h4 { margin: 0 0 2px; color: #ffd48a; letter-spacing: 0.06em; }
.convo .job { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.convo .topics { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 720px) { .chat { bottom: 170px; width: 60vw; } .chat-log { max-height: 96px; } .chat-log p { font-size: 11px; } }

/* ------------------------------------------------ loot tiers & item detail */
.r-mythic { color: var(--r-mythic); }
.r-prototype { background: var(--proto-grad); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: bz-shimmer 4s linear infinite; }
.bd-mythic { border-color: #b03a98 !important; box-shadow: 0 0 14px rgba(255, 92, 214, 0.4); }
.bd-prototype { border-color: #9ff8ee; animation: bz-proto-edge 3s linear infinite; }
.it.bd-surplus { background: #12161b; }
.it.bd-surplus .nm { opacity: 0.85; }
@keyframes bz-shimmer { to { background-position: 300% 0; } }
@keyframes bz-proto-edge {
  0% { border-color: #ff6b6b; box-shadow: 0 0 14px rgba(255, 107, 107, 0.45); }
  25% { border-color: #ffd24a; box-shadow: 0 0 14px rgba(255, 210, 74, 0.45); }
  50% { border-color: #5af0a0; box-shadow: 0 0 14px rgba(90, 240, 160, 0.45); }
  75% { border-color: #58b4ff; box-shadow: 0 0 14px rgba(88, 180, 255, 0.45); }
  100% { border-color: #ff6b6b; box-shadow: 0 0 14px rgba(255, 107, 107, 0.45); }
}
@media (prefers-reduced-motion: reduce) { .r-prototype, .bd-prototype { animation: none; } }
.toast.rt-mythic { box-shadow: 0 0 16px rgba(255, 92, 214, 0.45); }
.toast.rt-prototype { background-image: linear-gradient(#0b0f14, #0b0f14), var(--proto-grad); background-origin: border-box; background-clip: padding-box, border-box; border: 1.5px solid transparent; font-weight: 800; }
.it .pips { margin-left: 5px; color: var(--amber-2); letter-spacing: 1px; font-size: 9px; }
.sh-make { font-size: 12px; margin-top: 5px; color: var(--ink); }
.sh-make b { color: var(--amber-2); font-weight: 700; }
.sh-flavor { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 2px; line-height: 1.4; }
.sheet .badge.cond { color: #cfd6de; }
.sheet .badge.c-worn { color: #c9a38a; border-color: #5a4232; }
.sheet .badge.c-factory { color: #9ff8ee; border-color: #2a6a64; }
.sheet .badge.set { color: #7ff0c0; border-color: #2a6a4a; }
.sheet .bonus li > span { display: grid; gap: 1px; }
.sheet .bonus small { font-size: 11px; color: var(--muted); line-height: 1.35; }
.sheet .setsec .bonus li.off { opacity: 0.5; }
.sheet .setsec .bonus li.on i { color: #7ff0c0; }
.plist { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.plist li { min-width: 0; display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255, 255, 255, 0.02); font-size: 12.5px; }
.plist li.empty { border-style: dashed; }
.plist .ps { font: 700 9.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.plist .pn { display: grid; gap: 2px; min-width: 0; }
.plist .pa { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.plist .fitsel { max-width: 160px; min-width: 0; font-size: 11px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 3px; }
.mods { display: flex; flex-wrap: wrap; gap: 3px 8px; font: 600 11px var(--mono); }
.mods.big { font-size: 12.5px; gap: 4px 12px; }
.mods .mg { color: var(--good); } .mods .mb { color: #ffb070; }
.fitpick { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.fitpick select { flex: 1 1 0; width: 0; min-width: 0; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; padding: 4px; }
@media (max-width: 560px) {
  .plist li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .plist .pa { justify-content: flex-start; flex-wrap: nowrap; min-width: 0; }
  .plist .fitsel { max-width: none; flex: 1 1 0; width: 0; }
}

/* ------------------------------------------------------------------ town life */
.lf .pane h3 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lf-meal { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 12px; padding: 9px 12px; border: 1px solid #5a4a22; border-left: 3px solid var(--amber); border-radius: 8px; background: rgba(255, 180, 58, 0.07); font-size: 13px; }
.lf-meal span { color: var(--good); font-weight: 700; }
.lf-meal em { margin-left: auto; color: var(--muted); font-style: normal; font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.lf-meal.empty { border-color: var(--line); border-left-color: var(--muted); background: var(--panel-2); color: var(--muted); }
.lf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lf-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; margin: 2px 4px 2px 0; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 255, 255, 0.03); font-size: 12px; color: var(--ink); }
.lf-chip i { font-style: normal; }
.lf-chip b { font: 700 11px var(--mono); color: var(--good); }
.lf-chip.short b { color: var(--bad); }
.lf-stage { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid #1f3a48; touch-action: none; }
#lf-canvas { display: block; width: 100%; height: 250px; cursor: pointer; touch-action: none; }
.lf-over { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4, 10, 14, 0.55); animation: lf-pop 0.35s ease-out; pointer-events: none; }
.lf-catch { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 2px solid var(--tc, var(--line)); border-radius: 10px; background: rgba(10, 16, 22, 0.92); box-shadow: 0 0 28px color-mix(in srgb, var(--tc, #000) 45%, transparent); max-width: 92%; }
.lf-catch .ic { font-size: 40px; }
.lf-catch .t { font: 800 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--tc, var(--muted)); }
.lf-catch .n { font-size: 20px; font-weight: 800; }
.lf-catch .sz { color: var(--muted); font-size: 13px; }
.lf-catch.lost { --tc: #6a7580; }
.lf-prog { height: 6px; margin-top: 8px; border-radius: 3px; background: #0d151c; overflow: hidden; }
.lf-prog i { display: block; height: 100%; background: linear-gradient(90deg, #3fae6a, #5af0a0); transition: width 0.08s linear; }
.lf-status { margin: 8px 0; min-height: 20px; font-weight: 700; color: var(--muted); }
.lf-status.bite { color: var(--amber-2); animation: lf-blink 0.25s steps(2) infinite; }
.lf-status.reel { color: var(--good); }
.lf-big { padding: 12px 20px; font-size: 15px; display: inline-flex; flex-direction: column; align-items: center; gap: 2px; min-width: 120px; touch-action: none; }
.lf-big small { font: 600 11px var(--mono); opacity: 0.8; }
.lf-controls .lf-big { flex-direction: row; gap: 8px; }
#lf-hold { flex: 1; min-height: 56px; }
#lf-hold:active { transform: scale(0.98); filter: brightness(1.15); }
.kbd { font: 700 10px var(--mono); padding: 1px 5px; border: 1px solid currentColor; border-radius: 3px; opacity: 0.7; }
.lf-log { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.lf-logc { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-left: 3px solid var(--tc); border-radius: 6px; background: var(--panel-2); }
.lf-logc i { grid-row: span 2; font-style: normal; font-size: 20px; }
.lf-logc b { font-size: 12px; color: var(--tc); }
.lf-logc span { font-size: 10.5px; color: var(--muted); }
.lf-logc.unk { opacity: 0.5; filter: grayscale(0.7); }
.lf-recipe.locked { opacity: 0.55; }
.lf-buff { color: var(--good); font-size: 12px; font-weight: 700; }
.lf-beds { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.lf-bed { display: grid; justify-items: center; gap: 4px; padding: 10px 8px; border: 1px solid #4a3a26; border-radius: 8px; background: linear-gradient(180deg, #2a1f14, #1a130c); text-align: center; }
.lf-bed .ic { font-size: 28px; line-height: 1; }
.lf-bed .n { font-weight: 700; font-size: 13px; }
.lf-bed.ripe { border-color: var(--amber); box-shadow: 0 0 14px rgba(255, 180, 58, 0.3); animation: lf-glow 1.6s ease-in-out infinite; }
.lf-bed.empty { border-style: dashed; }
.lf-bed.locked { border-style: dashed; border-color: var(--line); background: var(--panel-2); opacity: 0.7; }
.lf-grow { width: 100%; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.45); overflow: hidden; }
.lf-grow i { display: block; height: 100%; }
.lf-picked { border-color: var(--amber); }
.lf-felt { display: grid; justify-items: center; gap: 8px; padding: 18px 12px; border-radius: 12px; background: radial-gradient(ellipse at center, #1f5a3a, #0f2a1c 75%); border: 3px solid #4a2e18; box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5); transition: box-shadow 0.2s; }
.lf-felt.win { box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5), 0 0 22px rgba(90, 240, 160, 0.35); }
.lf-felt.bust { box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5), 0 0 22px rgba(255, 77, 94, 0.4); }
.lf-dice { display: flex; gap: 16px; }
.lf-die { width: 64px; height: 64px; padding: 9px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; border-radius: 12px; background: linear-gradient(145deg, #fbf7ee, #d9d2c3); box-shadow: 0 5px 0 #a79f8f, 0 8px 14px rgba(0, 0, 0, 0.45); }
.lf-die i { border-radius: 50%; }
.lf-die i.on { background: #1a1a1a; box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25); }
.lf-die.rolling { animation: lf-roll 0.45s cubic-bezier(0.2, 0.7, 0.3, 1.2); }
.lf-die.rolling + .lf-die.rolling { animation-delay: 0.05s; }
.lf-sum { font-size: 28px; font-weight: 800; color: #f4efe2; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5); }
.lf-pot { font-size: 14px; }
.lf-pot b { color: var(--amber-2); font-size: 18px; }
.lf-note { min-height: 18px; color: #cfe7d6; font-size: 13px; text-align: center; }
.lf-calls, .lf-stakes { margin: 10px 0; }
.lf-calls .lf-big { flex: 1; }
.lf-oddsgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 4px; margin-top: 8px; }
.lf-oddsgrid div { display: grid; padding: 4px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel-2); font-size: 11px; }
.lf-oddsgrid b { color: var(--amber-2); }
.lf-oddsgrid span { color: var(--muted); font-family: var(--mono); }
.lf-rooms { display: grid; gap: 8px; }
.lf-room { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.lf-room.built { border-left: 3px solid var(--good); }
.lf-room .ic { font-size: 26px; }
.lf-room .n { font-weight: 800; display: flex; align-items: center; gap: 8px; }
.lf-room .now { font-size: 12px; color: var(--good); }
.lf-room .next { font-size: 12px; color: var(--muted); }
.lf-room .cost { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font: 600 11px var(--mono); }
.lf-room .cost .short { color: var(--bad) !important; }
.lf-pips { display: inline-flex; gap: 3px; }
.lf-pips i { width: 9px; height: 9px; border-radius: 2px; background: #2a3440; transform: rotate(45deg); }
.lf-pips i.on { background: var(--amber); }
.lf-sum-line { color: var(--good); }
.lf-hud { position: absolute; left: 12px; bottom: 12px; display: flex; align-items: center; gap: 6px; max-width: 46vw; padding: 5px 9px; border: 1px solid #5a4a22; border-radius: 999px; background: rgba(10, 14, 20, 0.8); color: var(--good); font: 700 11px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lf-hud i { font-style: normal; font-size: 14px; }
.lf-hud span { overflow: hidden; text-overflow: ellipsis; }
@keyframes lf-pop { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes lf-blink { 50% { opacity: 0.55; } }
@keyframes lf-glow { 50% { box-shadow: 0 0 22px rgba(255, 180, 58, 0.5); } }
@keyframes lf-roll { 0% { transform: translateY(-26px) rotate(-200deg) scale(0.8); } 70% { transform: translateY(4px) rotate(12deg); } 100% { transform: none; } }
@media (max-width: 720px) {
  #lf-canvas { height: 210px; }
  .lf-die { width: 52px; height: 52px; padding: 7px; }
  .lf-room { grid-template-columns: auto minmax(0, 1fr); }
  .lf-room .cost { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
  .lf-meal em { margin-left: 0; width: 100%; }
  .lf-hud { bottom: auto; top: 80px; }
  body.is-touch .kbd { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lf-die.rolling, .lf-bed.ripe, .lf-status.bite, .lf-over { animation: none; } }

/* ---- Level-up skill draft, skill preview clips and stat bars */
.draft .row { gap: 10px; }
.draft-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.dcard { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--line); border-top: 3px solid var(--bcol, var(--amber)); border-radius: 10px; background: var(--panel-2); outline: none; transition: border-color 0.15s, transform 0.15s; }
.dcard.on, .dcard:focus-visible { border-color: var(--bcol, var(--amber)); transform: translateY(-2px); }
.dcard p { margin: 0; flex: 1; font-size: 13px; line-height: 1.4; color: #cfd8e0; }
.dcard .btn { align-self: stretch; }
.dc-name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 800; }
.dc-name .g { color: var(--bcol, var(--amber)); }
.dc-kind { font: 700 11px var(--mono); letter-spacing: 0.04em; color: var(--muted); }
.dc-prev { display: grid; place-items: center; aspect-ratio: 240 / 150; border-radius: 8px; overflow: hidden; background: #07090c; }
.sk-detail .dc-prev { max-width: 320px; margin-bottom: 10px; }
.sk-clip { display: block; width: 100%; height: 100%; }
.sk-bars { display: flex; flex-direction: column; justify-content: center; gap: 10px; width: 100%; height: 100%; padding: 12px 14px; }
.sk-bars .sb { display: grid; grid-template-columns: minmax(0, max-content) minmax(60px, 1fr) auto; align-items: center; gap: 8px; font: 700 11px var(--mono); }
.sk-bars .sb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.sk-bars .sb i { position: relative; height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.sk-bars .sb i::before { content: ""; position: absolute; inset: 0; transform-origin: left; background: var(--bcol, var(--amber)); animation: sbGrow 1.8s ease-in-out infinite alternate; }
.sk-bars .sb b { color: var(--good); }
@keyframes sbGrow { from { transform: scaleX(var(--from)); } to { transform: scaleX(var(--to)); } }
@media (max-width: 860px) { .draft-cards { grid-template-columns: 1fr; } .dcard { display: grid; grid-template-columns: 160px minmax(0, 1fr); column-gap: 10px; } .dcard .dc-prev { grid-row: span 5; } }
@media (max-width: 520px) { .dcard { display: flex; } }
@media (prefers-reduced-motion: reduce) { .sk-bars .sb i::before { animation: none; transform: scaleX(var(--to)); } }

/* ---- Skills: four-branch tree, node filter and legend */
.skillgrid { grid-template-columns: minmax(0, 2.4fr) minmax(240px, 1fr); align-items: start; }
.skillgrid .sk-detail { position: sticky; top: 8px; }
.tree.cols { grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.tree.cols .branch h4 { font-size: 12px; gap: 6px; }
.tree.cols .branch h4 span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tree.cols .branch h4 .mono { flex: none; }
.sk-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.sk-legend .chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--ink); font: 700 12px/1 var(--mono, monospace); cursor: pointer; }
.sk-legend .chip.on { border-color: var(--amber); color: var(--amber-2); box-shadow: 0 0 0 1px rgba(255, 180, 58, 0.25) inset; }
.sk-legend .chip .n { color: var(--muted); font-weight: 600; }
.sk-legend .sw { display: inline-grid; place-items: center; width: 14px; height: 14px; font-size: 10px; color: var(--muted); }
.sk-legend .sw-active { border: 2px solid currentColor; border-radius: 50%; font-size: 0; width: 12px; height: 12px; }
.sk-legend .sw-passive { border: 2px solid currentColor; border-radius: 3px; font-size: 0; width: 12px; height: 12px; }
.sk-legend .sw-mod { border: 2px dashed currentColor; border-radius: 3px; font-size: 0; width: 12px; height: 12px; }
.sk-legend .sw-key { border: 2px solid currentColor; border-radius: 2px; transform: rotate(45deg); font-size: 0; width: 10px; height: 10px; }
.node.dim { opacity: 0.18; filter: grayscale(1); animation: none; box-shadow: none; }
.tree.filtering .links { opacity: 0.25; }
.tree.filtering .node.locked:not(.dim) { opacity: 0.8; filter: none; border-color: var(--bcol, #58b4ff); }
@media (max-width: 1100px) { .skillgrid { grid-template-columns: 1fr; } .skillgrid .sk-detail { position: static; } }
@media (max-width: 860px) { .tree.cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .tree.cols { gap: 8px; }
  .tree.cols .branch { padding: 8px 6px; }
  .tree.cols .branch h4 { font-size: 11px; letter-spacing: 0.06em; align-items: baseline; }
  .tree.cols .branch h4 span:first-child { white-space: normal; overflow-wrap: anywhere; }
  .tree.cols .trow { gap: 6px; padding: 0 12px; }
  .tree.cols .trow .tier { font-size: 8px; }
  .tree.cols .rows { gap: 12px; }
  .tree.cols .node { width: 48px; height: 48px; border-radius: 11px; }
  .tree.cols .node.active { border-radius: 50%; }
  .tree.cols .node.key { width: 56px; height: 56px; }
  .tree.cols .node.key::before { inset: 10px; }
  .tree.cols .node .g { font-size: 18px; }
  .tree.cols .node .pips i { width: 5px; height: 5px; }
  .lockmsg { font-size: 9.5px; padding: 2px 7px; }
  .sk-legend .chip { padding: 5px 8px; font-size: 11px; }
}

/* ------------------------------------------------ quick clean */
.quick-clean { display: grid; gap: 6px; padding: 8px 10px; margin-bottom: 10px; border: 1px solid #3a3222; border-radius: 8px; background: linear-gradient(180deg, rgba(255, 180, 58, 0.06), rgba(255, 180, 58, 0.02)); }
.qc-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qc-lbl { font: 800 11px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); margin-right: 4px; }
.qc-tiers { display: flex; flex-wrap: wrap; gap: 4px; }
.qc-row .btn.small { white-space: normal; text-align: left; line-height: 1.35; }
.qc-note { margin: 0; }
.itw { position: relative; display: grid; }
.itw > .it { height: 100%; }
.itw .qa { position: absolute; right: 5px; bottom: 5px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s; }
.itw:hover .qa, .itw:focus-within .qa, body.is-touch .itw .qa { opacity: 1; }
.itw .qa .lk { opacity: 1; font-size: 12px; }
.itw:has(.lk) .qa { opacity: 1; }
.qb { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--line); background: rgba(10, 14, 20, 0.92); color: var(--ink); font: 800 13px var(--mono); display: grid; place-items: center; }
.qb[data-qsell] { color: var(--amber-2); }
.qb:hover { border-color: #6a8aaa; background: #1c2631; }
@media (hover: none) { .itw .qa { opacity: 1; } .itw > .it { padding-bottom: 38px; } }
body.is-touch .itw > .it { padding-bottom: 38px; }

/* ------------------------------------------------ loot: NEW tags, kit HUD, bag-full prompt, collection */
.it .newtag { display: inline-block; margin-right: 5px; font: 900 9px var(--mono); letter-spacing: 0.06em; color: #0b140f; background: #7dffb0; border-radius: 3px; padding: 1px 4px; box-shadow: 0 0 8px rgba(125, 255, 176, 0.5); vertical-align: 1px; }
.toast.fresh { box-shadow: 0 0 0 1px #7dffb0 inset, 0 0 12px rgba(125, 255, 176, 0.35); }
.sec.quirk { border-left: 3px solid #58b4ff; padding-left: 8px; }
.sec.quirk p { margin: 2px 0 0; }
.cons .kg { font-size: 18px; line-height: 1; }
.cons.empty { opacity: 0.5; }
.cons .cyc { position: absolute; right: 0; top: 0; width: 18px; height: 20px; display: grid; place-items: center; font: 900 11px var(--mono); color: var(--amber-2); background: rgba(255, 180, 58, 0.14); border-bottom-left-radius: 6px; pointer-events: auto; }
.cons .cyc small { display: none; }
body.is-touch .cons .cyc { width: 22px; height: 24px; font-size: 13px; }
.bagfull { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); z-index: 35; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #6a2a2a; border-radius: 8px; background: rgba(24, 10, 12, 0.94); color: #ffc0c0; font-size: 13px; max-width: calc(100vw - 32px); flex-wrap: wrap; justify-content: center; animation: toastIn 0.2s ease-out; }
.bagfull b { font: 900 12px var(--mono); letter-spacing: 0.1em; }
.bagfull[hidden] { display: none; }
.collection { margin-bottom: 12px; }
.col-head { justify-content: space-between; align-items: baseline; }
.col-total b { font: 900 20px var(--mono); color: var(--amber-2); }
.col-prog { position: relative; height: 8px; margin: 8px 0 6px; overflow: visible; }
.col-prog i { background: linear-gradient(90deg, #ffb43a, #ff8a2a); border-radius: 3px; }
.col-prog em { position: absolute; top: -3px; width: 3px; height: 14px; margin-left: -1px; background: #3a4552; border-radius: 1px; }
.col-prog em.hit { background: var(--amber-2); box-shadow: 0 0 6px var(--amber-2); }
.col-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 320px; overflow: auto; padding-right: 2px; }
.col-cell { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; display: grid; gap: 1px; min-height: 44px; background: var(--panel-2); }
.col-cell .cn { font-weight: 700; font-size: 12.5px; overflow-wrap: anywhere; }
.col-cell .cs { font: 600 10px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-cell.sil { background: repeating-linear-gradient(135deg, #0e1319 0 6px, #111820 6px 12px); border-style: dashed; }
.col-cell.sil .cn { color: #3c4754; letter-spacing: 0.12em; }
.col-foot { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 13px; }
.col-foot .pity span { font-family: var(--mono); letter-spacing: 1px; color: #6a5a3a; }
@media (max-width: 520px) {
  .col-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 360px; }
  .col-foot { flex-direction: column; align-items: flex-start; }
}

/* ---- Blackzone expansion: HUD greed meter, zone cards, threat slider, debrief */
.dz-hud { flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 8px; max-width: min(760px, calc(100vw - 24px)); }
.dz-hud .dz-greed { position: relative; min-width: 120px; overflow: hidden; }
.dz-hud .dz-greed i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(255, 180, 60, 0.35), rgba(255, 60, 60, 0.55)); transition: width 0.3s; }
.dz-hud .dz-greed em { position: relative; font-style: normal; }
.dz-hud .dz-greed b { color: #ffe08a; }
.dz-hud .dz-greed.hunted { border-color: #ff4d5e; animation: dzPulse 1.6s ease-in-out infinite; }
.dz-hud .dz-exfil { color: #b8ffd8; border-color: #2a6a4a; background: rgba(6, 26, 16, 0.82); }
.dz-hud .dz-mods { color: #ffd9a0; }
.dz-hud .dz-keys b { margin-right: 6px; }
.dz-evac { font: 800 11px var(--mono); padding: 4px 10px; border-radius: 4px; border: 1px solid #b0303a; background: rgba(90, 10, 16, 0.85); color: #ffd0d4; cursor: pointer; }
.dz-evac:disabled { opacity: 0.45; cursor: not-allowed; }
@keyframes dzPulse { 50% { box-shadow: 0 0 10px rgba(255, 77, 94, 0.6); } }
.toast.dz-big { font-size: 15px; font-weight: 900; letter-spacing: 1px; box-shadow: 0 0 14px rgba(255, 200, 80, 0.35); }
.dz-zone { border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin-top: 8px; background: rgba(40, 8, 12, 0.25); }
.dz-zone.locked { opacity: 0.55; }
.dz-zh { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.dz-zone .d { margin: 6px 0; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.dz-facts, .dz-mods, .dz-tiers { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 12px; }
.dz-facts span { background: rgba(255, 255, 255, 0.05); border-radius: 4px; padding: 2px 6px; }
.dz-mods { margin-top: 5px; }
.dz-mod { border: 1px solid #6a4a1a; color: #ffd9a0; border-radius: 10px; padding: 1px 8px; background: rgba(60, 40, 10, 0.4); }
.dz-mod small { color: #c8a060; }
.dz-threat { margin-top: 10px; display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: start; }
.dz-threat .dz-tl { font-weight: 700; white-space: nowrap; line-height: 22px; }
.dz-threat .dz-tl b { color: #ff6a74; font-size: 18px; display: inline-block; min-width: 30px; }
.dz-threat #dz-td { grid-column: 1 / -1; margin: 4px 0 0; }
.dz-slider input[type="range"] { width: 100%; margin: 0; accent-color: #ff4d5e; }
.dz-ticks { display: flex; justify-content: space-between; font: 700 11px var(--mono); color: #ffb0b8; }
.dz-ticks span { width: 16px; text-align: center; }
.dz-ticks span.off { color: #5a4a4c; }
.dz-ticks small { display: block; font-size: 9px; }
.dz-key { display: inline-block; border: 1px solid var(--k); color: var(--k); border-radius: 4px; padding: 1px 6px; margin-right: 4px; font: 700 11px var(--mono); }
.dz-unlocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px; font-size: 12px; }
.dz-unlocks div { color: var(--muted); }
.dz-unlocks div.got { color: var(--ink); }
.dz-unlocks b { font-family: var(--mono); color: #ff6a74; margin-right: 4px; }
.dz-sum .dz-tiers { margin: 4px 0 6px; }
.dz-tier { border: 1px solid currentColor; border-radius: 4px; padding: 1px 6px; font-weight: 700; }
@media (max-width: 520px) {
  .dz-hud { top: 78px; left: 10px; transform: none; flex-direction: column; align-items: flex-start; font-size: 10px; gap: 3px; max-width: 190px; }
  .dz-hud span { padding: 2px 6px; }
  .dz-hud .dz-greed { min-width: 0; }
  .dz-hud .dz-mods { display: none; }
  .dz-evac { font-size: 10px; padding: 3px 6px; }
  .dz-zh { flex-wrap: wrap; }
}
.col-tabs .chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--ink); font: 700 12px/1 var(--mono, monospace); cursor: pointer; }
.col-tabs .chip.on { border-color: var(--amber); color: var(--amber-2); box-shadow: 0 0 0 1px rgba(255, 180, 58, 0.25) inset; }
.col-tabs .chip .n { color: var(--muted); font-weight: 600; }
.dz-zone .k { font: 700 11px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: #ff7a84; }
.dz-zone .n { font-weight: 800; font-size: 15px; }
.dz-tab .dz-threat + .row { margin-top: 8px; }

/* ---------------------------------------------------------------- voice, companion talk, personal quests */
.talk-btn { position: relative; }
.talk-btn b { margin-left: 5px; min-width: 15px; padding: 0 4px; border-radius: 8px; background: var(--info); color: #06121e; font: 800 10px/15px var(--mono); display: inline-block; }
.talk-btn.offer b { background: var(--amber); color: #1a1004; animation: canpulse 1.6s infinite; }
.talk-btn.on { border-color: var(--info); color: var(--info); }
.talk-panel { grid-column: 1 / -1; border: 1px solid #2c3d4f; border-radius: 6px; background: rgba(88, 180, 255, 0.05); padding: 8px; display: grid; gap: 7px; }
.talk-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.talk-head b { font-family: var(--mono); color: var(--amber-2); }
.lbar { position: relative; flex: 1; min-width: 90px; height: 6px; background: #1b222a; border-radius: 3px; }
.lbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--info), var(--good)); border-radius: 3px; }
.lbar s { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--amber); }
.talk-panel .perk { color: var(--amber-2); }
.talk-panel .topics { display: grid; gap: 5px; }
.topic { display: flex; justify-content: space-between; align-items: center; gap: 8px; text-align: left; padding: 8px 10px; min-height: 40px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.topic:hover:not(:disabled) { border-color: var(--info); }
.topic .ts { font: 700 10.5px var(--mono); letter-spacing: 0.06em; color: var(--info); white-space: nowrap; }
.topic.done { opacity: 0.72; }
.topic.done .ts { color: var(--muted); }
.topic.offer { border-color: rgba(255, 180, 58, 0.55); background: rgba(255, 180, 58, 0.07); }
.topic.offer .ts { color: var(--amber-2); }
.topic:disabled { cursor: default; color: var(--muted); background: transparent; border-style: dashed; }
.topic:disabled .ts { color: var(--muted); }
.dialog.talk .who .tag { margin-left: 6px; font-size: 10px; letter-spacing: 0.04em; text-transform: none; vertical-align: middle; }
.dialog.talk .line { min-height: 0; margin-bottom: 10px; }
.dialog .replies { display: grid; gap: 6px; margin-bottom: 8px; }
.btn.reply { display: flex; gap: 10px; align-items: center; text-align: left; white-space: normal; line-height: 1.35; min-height: 44px; }
.btn.reply .key { flex: none; width: 20px; height: 20px; border-radius: 4px; border: 1px solid var(--line); font: 800 11px/18px var(--mono); text-align: center; color: var(--amber-2); }
.voice-set .vcats { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.voice-set .vcats .chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); font-size: 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.voice-set select { max-width: 60%; }
.pane.personal .quest.offer { border-color: rgba(255, 180, 58, 0.55); background: rgba(255, 180, 58, 0.06); }
.pane.personal .quest.pending .prog, .pane.personal .quest.pending .prog i { display: block; }
.pane.personal .quest.pending .prog { height: 5px; }
.offer-note { color: var(--amber-2); }
.roster:has(.talk-panel) { align-items: start; }
.btn.reply { font-weight: 600; }
.grid2 > .pane.voice-set { margin-top: 0; }
.pq-offer { border: 1px solid rgba(255, 180, 58, 0.5); background: rgba(255, 180, 58, 0.07); border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; display: grid; gap: 3px; }
.pq-offer .k { font: 700 10.5px var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber-2); }
.pq-reward { color: var(--amber-2); }
@media (max-width: 520px) {
  .dialog.talk { grid-template-columns: 64px 1fr; gap: 10px; }
  .dialog.talk canvas { width: 64px; height: 80px; }
  .voice-set label { flex-wrap: wrap; }
  .voice-set select { max-width: 100%; }
}

/* ---- operator dossier with ten classes: a 5×2 grid on wide screens, two columns on phones */
.card:has(> .class-grid) { max-width: 1180px; }
.class-card { align-content: start; }
@media (min-width: 1100px) {
  .class-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .card:has(> .class-grid) .look-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .class-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .class-card { padding: 9px; gap: 4px; }
  .class-card .cn { font-size: 14px; }
  .class-card .cr { font-size: 9.5px; letter-spacing: 0.06em; }
  .class-card p { font-size: 11.5px; }
  .class-card .cs { font-size: 10px; }
}

/* ---- vehicles, mounted guns and the door gun: a compact panel above the weapon bar */
.mount-hud { position: absolute; left: 50%; bottom: calc(max(12px, env(safe-area-inset-bottom)) + 92px); transform: translateX(-50%); width: min(300px, calc(100vw - 32px)); background: rgba(10, 14, 20, 0.86); border: 1px solid var(--line); border-radius: 6px; padding: 7px 10px; display: grid; gap: 5px; pointer-events: none; z-index: 5; }
.mount-hud .mh-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mount-hud b { font: 800 12px var(--mono); letter-spacing: 0.14em; color: var(--amber-2); }
.mh-speed, .mh-time { font: 800 18px/1 var(--mono); }
.mh-speed small { font-size: 10px; color: var(--muted); font-weight: 700; }
.mh-hull, .mh-heat { position: relative; height: 14px; background: #1a222b; border-radius: 3px; overflow: hidden; }
.mh-hull i, .mh-heat i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #6fae5a, #9fd36a); transition: width 0.12s; }
.mh-hull.low i { background: linear-gradient(90deg, #d0661a, #ffb43a); }
.mh-hull.burn i { background: linear-gradient(90deg, #b8241a, #ff5a2a); animation: mh-blink 0.5s steps(2) infinite; }
.mh-heat i { background: linear-gradient(90deg, #ffd24a, #ff8a2a 70%, #ff4d2a); }
.mh-heat.over i { background: #ff4d2a; animation: mh-blink 0.35s steps(2) infinite; }
.mh-hull em, .mh-heat em { position: absolute; inset: 0; display: flex; align-items: center; padding: 0 6px; font: 700 10px var(--mono); letter-spacing: 0.08em; font-style: normal; color: #fff; text-shadow: 0 1px 2px #000; }
.mh-keys { font: 600 10.5px var(--mono); color: var(--muted); }
.mh-offer { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.mh-offer span { grid-column: 1; font: 600 11.5px var(--font); color: var(--ink); }
.mh-offer em { grid-row: 1 / span 2; grid-column: 2; font: 800 26px/1 var(--mono); font-style: normal; color: var(--amber); }
@keyframes mh-blink { 50% { opacity: 0.45; } }
body.in-mount #skillbar, body.in-mount .cons { opacity: 0.3; }
body.is-touch .mount-hud { top: calc(env(safe-area-inset-top) + 150px); bottom: auto; left: 10px; transform: none; width: min(200px, calc(50vw - 16px)); padding: 6px 8px; }
body.is-touch .mh-keys { font-size: 9.5px; }
body.is-touch .mh-offer em { font-size: 20px; }
@media (prefers-reduced-motion: reduce) { .mh-hull.burn i, .mh-heat.over i { animation: none; } }

/* ---------------- campaigns: mode select, career hub, case board, service record */
.mode-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 10px 0 6px; }
.mode-card { --mc: var(--amber); text-align: left; border: 1px solid var(--line); background: linear-gradient(160deg, color-mix(in srgb, var(--mc) 12%, transparent), transparent 60%), var(--panel-2); border-radius: 8px; padding: 12px; display: grid; gap: 5px; align-content: start; }
.mode-card.sel { border-color: var(--mc); box-shadow: 0 0 0 1px var(--mc), 0 0 22px color-mix(in srgb, var(--mc) 30%, transparent); }
.mode-card .mi { font-size: 22px; color: var(--mc); line-height: 1; }
.mode-card .mn { font-weight: 900; font-size: 16px; }
.mode-card .mu { font: 700 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mc); }
.mode-card p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.mode-card .mr { font: 10.5px/1.5 var(--mono); color: #a8b4c0; }
.hub[data-career="police"] { --amber: #6ea8ff; --amber-2: #9cc4ff; background: radial-gradient(ellipse at 70% -10%, rgba(79, 140, 255, 0.14), transparent 55%), linear-gradient(180deg, #080d16, #05070b); }
.hub[data-career="soldier"] { --amber: #c2cf72; --amber-2: #dbe39a; background: radial-gradient(ellipse at 70% -10%, rgba(181, 196, 106, 0.12), transparent 55%), linear-gradient(180deg, #0c0e0a, #060705); }
.hub[data-career="police"] .btn.primary { background: linear-gradient(180deg, #6ea8ff, #3a6fd0); color: #07101f; border-color: #9cc4ff; }
.hub[data-career="soldier"] .btn.primary { background: linear-gradient(180deg, #c8d47a, #8f9c46); color: #12140a; border-color: #dbe39a; }
.hub[data-career="police"] .next-op { background: linear-gradient(90deg, rgba(79, 140, 255, 0.16), rgba(79, 140, 255, 0.02)); border-color: #2a4a80; }
.hub[data-career="soldier"] .next-op { background: linear-gradient(90deg, rgba(181, 196, 106, 0.16), rgba(181, 196, 106, 0.02)); border-color: #4f5a2a; }
.career-chip { --mc: var(--amber); display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 4px; border: 1px solid color-mix(in srgb, var(--mc) 55%, var(--line)); border-radius: 12px; font: 700 11px var(--mono); letter-spacing: 0.06em; color: var(--mc); white-space: nowrap; }
.career-switch { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.career-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.career-head .insignia { flex: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5)); }
.career-head .ch-body { min-width: 0; flex: 1; }
.career-head h2 { margin: 2px 0 2px; font-size: 22px; }
.career-head .k, .career-card .k { color: var(--amber); letter-spacing: 0.08em; }
.rank-track { display: flex; gap: 4px; margin: 10px 0 8px; overflow-x: auto; scrollbar-width: none; }
.rank-track .rk { flex: 1 0 68px; display: grid; justify-items: center; gap: 3px; padding: 6px 2px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); opacity: 0.45; }
.rank-track .rk.done { opacity: 0.8; }
.rank-track .rk.cur { opacity: 1; border-color: var(--amber); box-shadow: 0 0 14px color-mix(in srgb, var(--amber) 25%, transparent); }
.rank-track .rk em { font: 700 9.5px/1.2 var(--mono); font-style: normal; text-align: center; color: var(--muted); }
.rank-track .rk.cur em { color: var(--ink); }
.career-stats { flex-wrap: wrap; gap: 6px 14px; color: var(--muted); }
.career-stats b { color: var(--ink); }
.career-stats .bad b, .career-line .bad, .career-hud .bad b { color: var(--bad); }
.op.done .n { color: var(--good); }
.op.locked { opacity: 0.55; }
.op .d { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.career-card .row { gap: 12px; align-items: center; }
.career-card h2 { margin: 2px 0; }
.caseboard { width: 100%; height: auto; display: block; border-radius: 8px; box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5); }
.case-board h4 { margin: 12px 0 6px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.evidence { border-left: 3px solid var(--amber-2); background: var(--panel-2); border-radius: 0 6px 6px 0; padding: 7px 10px; margin-top: 6px; }
.evidence p { margin: 3px 0 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.service-record h3 { margin: 12px 0 6px; }
.service-record h3:first-child { margin-top: 0; }
.medal { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); margin-top: 6px; font-weight: 700; }
.medal .mdl { color: #ffd24a; font-size: 18px; }
.letter-btn { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--panel-2); border-radius: 6px; padding: 8px 10px; margin-top: 6px; }
.letter-btn:hover { border-color: var(--amber); }
.fallen { padding: 6px 8px; border-left: 3px solid #8a8f96; margin-top: 6px; font-weight: 700; }
.letter-card { background: #efe6d2; color: #2a241c; border-color: #b8a888; }
.letter { font-family: Georgia, "Times New Roman", serif; }
.letter .lt { font-weight: 700; font-size: 17px; margin-bottom: 8px; }
.letter p { font-size: 15px; line-height: 1.6; margin: 0 0 10px; }
.letter .from { text-align: right; font-style: italic; }
.letter-card .btn { color: #2a241c; border-color: #8a7a62; background: #e2d6bc; }
.career-sum { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; }
.career-sum .promo { display: flex; gap: 12px; align-items: center; padding: 10px; margin: 6px 0; border: 1px solid color-mix(in srgb, var(--mc) 55%, var(--line)); border-radius: 8px; background: linear-gradient(90deg, color-mix(in srgb, var(--mc) 16%, transparent), transparent); }
.career-sum .promo b { font-size: 18px; }
.career-sum .promo p { margin: 2px 0 0; }
.career-sum .k { color: var(--mc); letter-spacing: 0.12em; }
.career-hud { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.career-hud b { color: var(--ink); }
.career-hud .cold { display: inline-flex; align-items: center; gap: 4px; }
.career-hud .cold i { display: inline-block; width: 64px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.career-hud .cold s { display: block; height: 100%; background: linear-gradient(90deg, #9fd0ff, #ffb060); }
.career-hud .cold.low s { background: #9fd0ff; }
.career-hud .under { color: #7fd0c8; font-weight: 800; letter-spacing: 0.1em; }
.career-hud .conduct { color: var(--muted); }
.career-hud .conduct.ok { color: var(--good); }
/* career layer: promotion board, duty roster, specialization, quartermaster, commendations */
.board { margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.board .k { color: var(--amber); letter-spacing: 0.08em; }
.board-req { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0; font-size: 12.5px; color: var(--muted); }
.board-req .ok { color: var(--good); }
.board-req b { color: var(--ink); }
.board .meter { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.board .meter s { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--amber-2)); }
.board p { margin: 6px 0 0; }
.career-grid { align-items: start; }
.career-grid > div > * + * { margin-top: 12px; }
.duty-roster .row h3 { margin: 0; }
.duties { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin-top: 8px; }
.duty { display: grid; gap: 4px; align-content: start; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(160deg, color-mix(in srgb, var(--amber) 8%, transparent), transparent 55%), var(--panel-2); }
.duty .k { color: var(--amber); letter-spacing: 0.08em; }
.duty .t { font-weight: 800; font-size: 15px; }
.duty .d { margin: 2px 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.duty .btn { margin-top: 4px; justify-self: start; }
.conducts { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 4px 0; }
.conduct { display: inline-flex; gap: 4px; align-items: baseline; padding: 2px 7px; border: 1px solid var(--line); border-radius: 10px; font-size: 11px; color: var(--ink); }
.conduct em { font-style: normal; color: var(--amber-2); font-family: var(--mono); font-size: 10px; }
.conduct.ok { border-color: color-mix(in srgb, var(--good) 55%, var(--line)); color: var(--good); }
.conduct.bad { border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); color: var(--bad); opacity: 0.85; }
.career-sum .conducts .k { margin-right: 4px; }
.perk-tier { margin-top: 8px; }
.perk-tier .k { color: var(--amber); letter-spacing: 0.08em; margin-bottom: 4px; }
.perk-tier.locked { opacity: 0.55; }
.perk-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.perk-opt { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--ink); }
.perk-opt[data-perk]:hover { border-color: var(--amber); }
.perk-opt.sel { border-color: var(--amber); box-shadow: 0 0 12px color-mix(in srgb, var(--amber) 25%, transparent); }
.perk-opt.dim { opacity: 0.45; }
.quartermaster .row h3 { margin: 0; }
.req { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.req > div { flex: 1; min-width: 0; }
.req.locked { opacity: 0.55; }
.comms { display: grid; gap: 6px; }
.comm { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); opacity: 0.55; }
.comm.won { opacity: 1; border-color: color-mix(in srgb, var(--amber) 50%, var(--line)); }
.ribbon { flex: none; display: inline-flex; width: 26px; height: 12px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); vertical-align: middle; }
.ribbon i { flex: 1; background: #5a5f66; }
.comm.won .ribbon i:nth-child(1), .comm.won .ribbon i:nth-child(3), .comm-line .ribbon i:nth-child(1), .comm-line .ribbon i:nth-child(3) { background: var(--amber); }
.comm.won .ribbon i:nth-child(2), .comm-line .ribbon i:nth-child(2) { background: #c8323c; }
.case-file summary { display: flex; align-items: baseline; gap: 8px; cursor: pointer; list-style: none; }
.case-file summary::-webkit-details-marker { display: none; }
.case-file summary h3 { margin: 0; }
.case-file summary::before { content: "▸"; color: var(--amber); }
.case-file[open] summary::before { content: "▾"; }
@media (max-width: 720px) {
  .perk-opts { grid-template-columns: 1fr; }
  .career-chip { padding: 2px 4px; }
  .career-chip .rt { display: none; }
  .career-head { gap: 10px; }
  .career-head .insignia { width: 56px; height: 56px; }
  .rank-track .rk { flex-basis: 54px; }
  .rank-track .rk em { font-size: 8.5px; }
  .mode-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------ card multi-pick */
.itw .qpick { position: absolute; left: 5px; top: 5px; width: 24px; height: 24px; border-radius: 5px; border: 1px solid var(--line); background: rgba(10, 14, 20, 0.9); color: var(--muted); font-size: 13px; line-height: 1; display: grid; place-items: center; opacity: 0; transition: opacity 0.15s; }
.itw:hover .qpick, .itw:focus-within .qpick { opacity: 1; }
.itw .qpick:hover { color: var(--amber); border-color: var(--amber); }
@media (hover: none) { .itw .qpick { opacity: 0.9; } }
body.is-touch .itw .qpick { opacity: 0.9; }
.itw > .it .meta { padding-left: 0; }
.itw:hover > .it .meta, body.is-touch .itw > .it .meta { padding-left: 26px; }
.multi-hint { margin: 4px 0 0; }
.title-wrap .legal { margin-top: 10px; opacity: 0.6; font-size: 11px; }

.raid-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-top: 12px; }
.raid-card { border: 1px solid #3a2f45; border-radius: 12px; padding: 14px 16px; background: linear-gradient(160deg, rgba(120, 40, 80, 0.18), rgba(20, 20, 28, 0.6)); }
.raid-card.raid-sovereign { border-color: #2d4556; background: linear-gradient(160deg, rgba(60, 140, 190, 0.16), rgba(20, 20, 28, 0.6)); }
.raid-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.raid-head .k { font: 600 11px var(--mono); color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }
.raid-head .n { font-size: 20px; font-weight: 800; margin-top: 2px; }
.raid-head .boss { color: #ff8fa6; font-size: 13px; margin-top: 2px; }
.raid-sovereign .raid-head .boss { color: #7fd6ff; }
.raid-card .d { margin: 10px 0 6px; line-height: 1.5; }
.raid-card .tips { margin: 0 0 10px 18px; padding: 0; font-size: 13px; color: #c9cfd8; }
.raid-foot { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.raid-foot .ready { color: #f5d76e; font-weight: 700; }
.raid-foot .spent { color: var(--muted); }

.nvg-hud { position: absolute; left: 16px; top: 78px; display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 8px; background: rgba(8, 12, 10, 0.72); border: 1px solid #2e3a32; font: 600 11px var(--mono); color: #9fb3a6; pointer-events: none; }
.nvg-hud b { letter-spacing: 0.12em; color: #cfe; }
.nvg-hud .bar { width: 64px; height: 6px; border-radius: 3px; background: #1d2620; overflow: hidden; }
.nvg-hud .bar i { display: block; height: 100%; background: #4cff7a; }
.nvg-hud.on { border-color: #4cff7a; color: #bfffd0; box-shadow: 0 0 10px rgba(76, 255, 122, 0.35); }
.nvg-hud.low .bar i { background: #ff5a4a; }
.touch .nvg-tb { display: none; }
body.is-dark .touch .nvg-tb { display: block; }

.summary .reward-ad { display: block; width: 100%; margin-top: 12px; border-color: #d9b44a; }
.summary .reward-ad:disabled { opacity: 0.75; cursor: default; }

/* Signal Echo */
.echo-pane { margin-bottom: 14px; border-color: #3a3163; background: linear-gradient(160deg, rgba(110, 90, 220, 0.14), rgba(16, 16, 26, 0.6)); }
.echo-frag { color: #b7a8ff; }
.echo-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-top: 8px; }
.echo-card { position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 12px 14px; border-radius: 10px; border: 1px solid #4a3f7a; background: rgba(40, 32, 80, 0.45); color: var(--ink); cursor: pointer; }
.echo-card:hover, .echo-card:focus-visible { border-color: #b7a8ff; background: rgba(70, 56, 140, 0.5); }
.echo-card span { font-size: 12.5px; color: #c9c4e8; line-height: 1.4; }
.echo-card { border-top: 3px solid var(--c, #4a3f7a); }
.echo-card em { font-style: normal; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--c); }
.echo-card > b { font-size: 16px; }
.echo-card .rank { font-style: normal; font-size: 12px; color: var(--muted); }
.echo-card.cursed { border-color: #7a2f3a; background: linear-gradient(180deg, rgba(40, 32, 80, 0.45), rgba(90, 20, 30, 0.45)); }
.echo-card .curse { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; padding: 8px; border-radius: 8px; border: 1px solid rgba(255, 77, 94, 0.5); background: rgba(255, 77, 94, 0.1); }
.echo-card .curse b, .echo-card .curse span { color: #ff8a95; }
.echo-card .curse .pays { color: var(--amber-2); font-size: 12.5px; }
.echo-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.echo-chip { padding: 3px 9px; border-radius: 999px; font-size: 12px; border: 1px solid var(--c, #4a3f7a); color: var(--c, #c9c4e8); background: rgba(20, 18, 34, 0.7); }
.echo-chip.curse { --c: #ff6b78; }
.echo-run { margin: 10px 0 2px; }
.echo-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.echo-mode { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; border: 1px solid #4a3f7a; background: rgba(20, 18, 34, 0.6); }
.echo-mode.daily { border-color: #8a7a2a; background: linear-gradient(160deg, rgba(255, 210, 74, 0.1), rgba(20, 18, 34, 0.6)); }
.echo-mode .btn { align-self: flex-start; margin-top: auto; }
.echo-done { font-size: 12.5px; color: var(--good); }
.echo-unlock, .echo-end { margin: 10px 0; padding: 12px 14px; border-radius: 10px; border: 1px solid #6a5ad0; background: linear-gradient(160deg, rgba(110, 90, 220, 0.28), rgba(16, 16, 26, 0.6)); }
.echo-unlock em, .echo-end em { font-style: normal; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #b7a8ff; }
.echo-unlock h3 { margin: 2px 0 4px; font-size: 22px; color: #e3dcff; }
.echo-unlock p { margin: 0; }
.echo-perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.echo-perk { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid #2f2a4a; border-radius: 8px; background: rgba(20, 18, 34, 0.6); }
