/* DXED World: interface. The environment dominates; UI is glass, minimal, DXED. */
:root {
  --bg: #080c12; --ink: #f2f5fa; --mute: #a8b4c4; --line: rgba(192,210,234,.14);
  --glass: rgba(9,15,24,.8); --glass2: rgba(12,19,30,.96); --acc: #78c9ff; --acc2: #ffd166; --bad: #ff5c8a;
  --r: 14px; --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font-family: var(--font); overflow: hidden; -webkit-text-size-adjust: 100%; }
body.dxw { user-select: none; -webkit-user-select: none; touch-action: none; }
#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
button, input { font-family: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
kbd { display: inline-block; min-width: 22px; padding: 2px 6px; border: 1px solid rgba(255,255,255,.25); border-radius: 6px; font: 600 11px/1.4 var(--font); background: rgba(255,255,255,.08); text-align: center; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 12px; font-weight: 700; text-decoration: none; color: var(--ink); border: 1px solid var(--line); background: rgba(255,255,255,.06); transition: transform .12s, background .12s; }
.btn:hover { transform: translateY(-1px); background: rgba(255,255,255,.1); }
.btn.primary { background: var(--acc); color: #041018; border-color: transparent; }
.btn.ghost { background: transparent; }

/* ── Boot ── */
.boot { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; background: radial-gradient(900px 560px at 50% 30%, #0f1522, #050506 72%); transition: opacity .6s; }
.boot.done { opacity: 0; pointer-events: none; }
.boot-inner { width: min(440px, 86vw); text-align: center; }
.boot-mark { width: 72px; height: 72px; opacity: .9; filter: drop-shadow(0 0 24px rgba(56,189,248,.35)); }
.boot-title { margin-top: 10px; font-size: 32px; font-weight: 800; letter-spacing: 7px; }
.boot-title span { color: var(--acc); font-weight: 300; letter-spacing: 10px; }
.boot-phase { margin-top: 26px; font-size: 11px; letter-spacing: 3px; color: var(--mute); text-transform: uppercase; }
.boot-steps { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; display: grid; gap: 6px; }
.boot-steps li { font-size: 13px; color: rgba(255,255,255,.35); padding-left: 22px; position: relative; transition: color .3s; }
.boot-steps li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.15); }
.boot-steps li.active { color: var(--ink); }
.boot-steps li.active::before { background: var(--acc); box-shadow: 0 0 10px var(--acc); animation: pulse 1.1s ease-in-out infinite; }
.boot-steps li.done { color: rgba(255,255,255,.6); }
.boot-steps li.done::before { background: #6ee7b7; }
@keyframes pulse { 50% { transform: scale(1.5); opacity: .6; } }
.boot-bar { margin-top: 18px; height: 3px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
#bootFill { height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), #9aa4c0); transition: width .3s; }
.boot-tip { margin-top: 22px; font-size: 12px; color: #6a7080; line-height: 1.6; min-height: 34px; }
.boot-error { margin-top: 14px; color: var(--bad); font-size: 13px; }

/* ── Gate ── */
.gate { position: fixed; inset: 0; z-index: 950; display: flex; align-items: center; justify-content: center; background: radial-gradient(900px 560px at 50% 30%, #0f1522, #050506 72%); }
.gate-card { width: min(420px, 88vw); text-align: center; padding: 34px 26px; border-radius: 20px; background: var(--glass2); border: 1px solid var(--line); backdrop-filter: blur(14px); }
.gate-card img { width: 64px; height: 64px; }
.gate-card h1 { margin: 10px 0 6px; font-size: 22px; }
.gate-card p { color: var(--mute); margin: 0 0 18px; line-height: 1.5; }
.gate-card .btn { margin: 4px; }

/* ── HUD ── */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
.hud > * { pointer-events: auto; }
.hud-top { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hud-place { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); font-size: 13px; font-weight: 600; letter-spacing: .3px; }
.hud-place .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--mute); }
.hud-place #hudWeather { color: var(--mute); font-weight: 500; }
.hud-right { display: flex; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 600; backdrop-filter: blur(10px); }
.chip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.chip b { color: var(--acc2); }
.minimap { position: absolute; right: 14px; bottom: max(14px, env(safe-area-inset-bottom)); width: 176px; height: 176px; border-radius: 50%; border: 1px solid var(--line); background: rgba(5,5,6,.5); backdrop-filter: blur(6px); }
.prompt { position: absolute; left: 50%; bottom: 20%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; backdrop-filter: blur(10px); }
.talk { position: absolute; left: 50%; bottom: max(26px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(640px, 92vw); padding: 12px 14px; border-radius: var(--r); background: var(--glass2); border: 1px solid var(--line); backdrop-filter: blur(14px); }
.talk-name { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--acc); font-weight: 700; }
.talk-state { font-size: 10px; letter-spacing: 1px; color: var(--mute); font-weight: 600; }
.talk-state[data-state="listening"]::before, .talk-state[data-state="speaking"]::before, .talk-state[data-state="processing"]::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; background: var(--acc); vertical-align: middle; }
.talk-state[data-state="processing"]::before { background: var(--acc2); animation: pulse 1.2s infinite; }
.talk-state[data-state="speaking"]::before { background: #7ee787; }
.follow-ask { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--glass2); border: 1px solid var(--line); font-size: 14px; font-weight: 600; backdrop-filter: blur(12px); pointer-events: auto; }
.follow-ask .chip.primary { background: var(--acc); color: #041018; border-color: transparent; }
.follow-chip { position: absolute; left: 14px; top: 64px; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--acc2); backdrop-filter: blur(10px); pointer-events: auto; }
.follow-chip .x { padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); font-size: 11px; font-weight: 700; }
.mictest { display: flex; align-items: center; gap: 10px; }
.mictest .meter { width: 120px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.08); overflow: hidden; }
.mictest .meter i { display: block; height: 100%; width: 0; background: var(--mute); transition: width .06s linear; }
.mictest .meter i.voice { background: var(--acc); }
.talk-sub { min-height: 22px; margin: 6px 0 10px; font-size: var(--sub-size, 16px); line-height: 1.45; }
.talk-row { display: flex; gap: 8px; align-items: center; }
.mic { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.mic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.mic.on { background: rgba(56,189,248,.18); border-color: var(--acc); color: var(--acc); }
.mic.on svg { animation: pulse 1s infinite; }
.talk-form { flex: 1; }
.talk-form input, .chatbox input { width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--ink); font-size: 14px; outline: none; }
.talk-form input:focus, .chatbox input:focus { border-color: var(--acc); }
.notices { position: absolute; top: 64px; right: 14px; display: grid; gap: 6px; max-width: 320px; }
.notice { padding: 10px 14px; border-radius: 12px; background: var(--glass2); border: 1px solid var(--line); font-size: 13px; animation: slidein .25s ease; backdrop-filter: blur(10px); }
.notice.task { border-color: rgba(255,209,102,.5); }
.notice.achievement { border-color: rgba(110,231,183,.5); }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } }
.chatlog { position: absolute; left: 14px; bottom: 70px; width: min(360px, 60vw); display: grid; gap: 4px; pointer-events: none; }
.chatline { padding: 6px 10px; border-radius: 10px; background: rgba(5,5,6,.55); font-size: 13px; opacity: .95; transition: opacity 1s; }
.chatline b { color: var(--acc); }
.chatline.sys { color: var(--mute); }
.chatbox { position: absolute; left: 14px; bottom: max(24px, env(safe-area-inset-bottom)); width: min(360px, 60vw); }
.voice-ind { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(56,189,248,.16); border: 1px solid var(--acc); color: var(--acc); font-size: 12px; font-weight: 700; }
.voice-ind i { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); animation: pulse .8s infinite; }
.voice-ind { pointer-events: auto; cursor: pointer; }
.voice-ind.hot { background: rgba(56,189,248,.32); }
.voice-ind.muted { background: rgba(255,255,255,.08); border-color: #6b7280; color: #cbd5e1; }
.voice-ind.muted i { background: #6b7280; animation: none; }
.fps { position: absolute; left: 14px; top: 60px; font: 11px/1.5 ui-monospace, monospace; color: #9dd; white-space: pre; background: rgba(0,0,0,.45); padding: 6px 8px; border-radius: 8px; }

/* ── Touch ── */
.touch { position: fixed; inset: 0; z-index: 25; pointer-events: none; }
.stick { position: absolute; left: 26px; bottom: max(40px, env(safe-area-inset-bottom)); width: 128px; height: 128px; border-radius: 50%; background: rgba(255,255,255,.06); border: 1px solid var(--line); pointer-events: auto; }
.stick-knob { position: absolute; left: 39px; top: 39px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.28); }
.touch-btns { position: absolute; right: 22px; bottom: max(40px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; pointer-events: auto; }
.tbtn { width: 66px; height: 66px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.08); color: var(--ink); font-weight: 700; font-size: 12px; backdrop-filter: blur(6px); }
.tbtn.on { background: rgba(56,189,248,.28); border-color: var(--acc); }
body.dx-mobile .minimap { display: none; }
body.dx-mobile .chatlog { bottom: 190px; }

/* ── Panels ── */
.panels { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(5,5,6,.45); backdrop-filter: blur(6px); }
.panel { width: min(520px, 94vw); max-height: 88vh; overflow: auto; padding: 18px 20px 22px; border-radius: 18px; background: var(--glass2); border: 1px solid var(--line); backdrop-filter: blur(16px); animation: pop .18s ease; }
.panel.wide { width: min(960px, 96vw); }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.panel-head h2 { margin: 0; font-size: 18px; letter-spacing: .3px; }
.panel .x { padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); font-weight: 600; font-size: 13px; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mbtn { display: block; padding: 18px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--ink); font-weight: 700; font-size: 15px; text-align: left; text-decoration: none; transition: background .12s; }
.mbtn:hover { background: rgba(255,255,255,.1); }
.mbtn.leave { grid-column: span 2; text-align: center; color: var(--mute); }
.menu-foot { margin-top: 14px; font-size: 12px; color: var(--mute); line-height: 1.6; }
#bigmap { width: 100%; height: auto; max-height: 70vh; aspect-ratio: 1; border-radius: 12px; background: #0a0b10; }
.map-legend { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--mute); }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.list { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.row .av { width: 36px; height: 36px; border-radius: 50%; background: #1b1e2a; display: grid; place-items: center; font-weight: 800; color: var(--acc); overflow: hidden; }
.row .av img { width: 100%; height: 100%; object-fit: cover; }
.row .who { flex: 1; min-width: 0; }
.row .who b { display: block; font-size: 14px; }
.row .who span { font-size: 12px; color: var(--mute); }
.row .act { padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); font-size: 12px; font-weight: 600; }
.row .act.primary { background: var(--acc); color: #041018; border-color: transparent; }
.char-grid { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
#charPreview { width: 100%; height: auto; border-radius: 14px; background: radial-gradient(120% 90% at 50% 30%, #182033, #07080c); }
.char-opts { display: grid; gap: 12px; align-content: start; max-height: 66vh; overflow: auto; }
.opt-group h3 { margin: 0 0 6px; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mute); }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.sw.on { border-color: var(--ink); }
.items { display: flex; flex-wrap: wrap; gap: 6px; }
.item { padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--ink); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.item i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.item.on { border-color: var(--acc); background: rgba(56,189,248,.14); }
.item.locked { opacity: .5; }
.inv-grid, .shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.card { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); display: grid; gap: 6px; }
.card .sw { width: 100%; height: 42px; border-radius: 8px; border: none; }
.card b { font-size: 13px; }
.card span { font-size: 12px; color: var(--mute); }
.card button { padding: 7px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); font-size: 12px; font-weight: 700; }
.card button.buy { background: var(--acc); color: #041018; border-color: transparent; }
.card button:disabled { opacity: .45; cursor: default; }
.shop-foot, .game-foot { margin-top: 12px; font-size: 13px; color: var(--mute); }
.settings { display: grid; gap: 14px; }
.setting { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.setting label { font-size: 13px; font-weight: 600; }
.setting small { display: block; color: var(--mute); font-weight: 400; margin-top: 2px; }
.setting select, .setting input[type=range] { accent-color: var(--acc); }
.setting select { padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); background: #0d0e14; color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.seg button { padding: 6px 10px; background: transparent; border: none; color: var(--mute); font-size: 12px; font-weight: 700; }
.seg button.on { background: rgba(56,189,248,.18); color: var(--acc); }
.keys { display: grid; gap: 6px; }
.key { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.key button { min-width: 64px; padding: 5px 8px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); font-weight: 700; font-size: 12px; }
.key button.listening { border-color: var(--acc2); color: var(--acc2); }
#gameCanvas { width: 100%; height: auto; border-radius: 12px; background: #06070c; display: block; }
.board-body { font-size: 14px; line-height: 1.7; }
.board-body p { margin: 0 0 8px; }

/* ── Phone ── */
.panel.phone { width: 360px; padding: 0; background: transparent; border: none; backdrop-filter: none; }
.phone-shell { position: relative; width: 340px; height: min(680px, 86vh); margin: 0 auto; border-radius: 34px; background: #0b0c12; border: 6px solid #1a1c26; box-shadow: 0 30px 80px rgba(0,0,0,.6); overflow: hidden; display: flex; flex-direction: column; }
.phone-top { display: flex; justify-content: space-between; padding: 14px 20px 6px; font-size: 12px; font-weight: 700; color: var(--mute); }
.phone-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 16px; }
.phone-apps button { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; border: none; background: transparent; color: var(--ink); font-size: 11px; font-weight: 600; }
.phone-apps button i { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 18px; background: linear-gradient(135deg, #1c2333, #0f131c); border: 1px solid var(--line); color: var(--acc); }
.phone-apps button.on i { border-color: var(--acc); }
.phone-body { flex: 1; overflow: auto; padding: 8px 16px 16px; font-size: 13px; }
.phone-body h3 { margin: 8px 0; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mute); }
.phone-body .row { padding: 8px 10px; }
.phone-body p { color: var(--mute); line-height: 1.5; }
.phone-body textarea { width: 100%; box-sizing: border-box; min-height: 70px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--ink); font-family: inherit; font-size: 13px; resize: vertical; }
.phone-body img.shot { width: 100%; border-radius: 10px; margin-bottom: 8px; }
.phone-home { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 110px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); border: none; }

/* ── Nameplates are drawn in-canvas; subtitles honor size settings ── */
body.reduced-motion * { animation: none !important; transition: none !important; }
@media (max-width: 720px) {
  .char-grid { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: 1fr; }
  .mbtn.leave { grid-column: span 1; }
  .hud-place { font-size: 12px; padding: 7px 10px; }
  .talk { bottom: 200px; }
  .prompt { bottom: 32%; }
}

/* ── Pause menu: the player card, the menu with a line each ── */
.me-card { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.me-card .av { width: 48px; height: 48px; border-radius: 50%; background: #1b1e2a; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--acc); }
.me-card .who b { display: block; font-size: 15px; }
.me-card .who span { font-size: 12px; color: var(--mute); }
.me-card .xp { height: 5px; margin-top: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.me-card .xp i { display: block; height: 100%; background: var(--acc); }
.me-card .sparks { font-weight: 800; color: var(--acc2); font-size: 15px; white-space: nowrap; }
.me-card .sparks small { display: block; font-weight: 600; font-size: 11px; color: var(--mute); }
.me-card .standing { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 2px; }
.stand { font-size: 11px; color: var(--mute); }
.stand b { display: block; color: var(--ink); font-size: 12px; margin-bottom: 4px; }
.stand .bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.stand .bar i { display: block; height: 100%; background: #6ee7b7; }
.stand.low .bar i { background: var(--bad); }
.stand.mid .bar i { background: var(--acc2); }
.mbtn b { display: block; font-size: 15px; }
.mbtn span { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: var(--mute); }
.head-acts { display: flex; gap: 8px; }

/* ── Map: the district and a list of places beside it ── */
.map-grid { display: grid; grid-template-columns: 1fr 260px; gap: 14px; }
.map-main #bigmap { max-height: 66vh; cursor: crosshair; }
.map-hint { margin: 8px 0 0; font-size: 12px; color: var(--mute); }
.map-side { max-height: 74vh; overflow: auto; display: grid; gap: 6px; align-content: start; }
.map-side h3 { margin: 6px 0 2px; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mute); }
.map-side .row { padding: 8px 10px; }
.map-side .row .who b { font-size: 13px; }
.map-side .row .who span { font-size: 11px; }
.map-side .row.open .who b::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: #6ee7b7; vertical-align: middle; }
.map-side .row.event { border-color: rgba(255,92,138,.4); }
.map-side .row.land .av { color: #e2e8f0; }
@media (max-width: 720px) { .map-grid { grid-template-columns: 1fr; } .map-side { max-height: 30vh; } }

/* ── A waypoint over the street ── */
.waypoint { position: absolute; left: 50%; top: max(104px, calc(env(safe-area-inset-top) + 94px)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 12px; font-weight: 600; backdrop-filter: blur(10px); }
.waypoint b { color: #e2e8f0; }
.waypoint em { font-style: normal; color: var(--mute); }
.waypoint .x { padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); font-size: 12px; line-height: 1; }

/* ── People: tabs, tiers, progress ── */
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--mute); font-size: 12px; font-weight: 700; }
.tabs button.on { background: rgba(56,189,248,.16); color: var(--acc); border-color: rgba(56,189,248,.4); }
.row.contact { align-items: flex-start; }
.row.contact .who b { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
.row.contact .tier { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 6px 0 4px; }
.row.contact .tier i { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.row.contact .tier i::before { content: ''; display: block; height: 100%; width: var(--p, 0%); background: #6ee7b7; }
.row.contact.love .tier i::before { background: #ff8fb8; }
.row.contact .who small { display: block; font-size: 11px; color: var(--mute); line-height: 1.5; }
.row.contact .here { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #6ee7b7; margin-left: 6px; vertical-align: middle; }
.standing-list .row { display: grid; grid-template-columns: 1fr; gap: 6px; }
.standing-list .row b { font-size: 14px; }
.standing-list .row .bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.standing-list .row .bar i { display: block; height: 100%; background: #6ee7b7; }
.standing-list .row.low .bar i { background: var(--bad); }
.standing-list .row.mid .bar i { background: var(--acc2); }
.standing-list .row p { margin: 0; font-size: 12px; color: var(--mute); line-height: 1.5; }

/* ── Contacts: who you know ── */
.row.contact .status { display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-style: normal; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; background: rgba(255,255,255,.08); color: var(--mute); }
.row.contact.friend .status { background: rgba(110,231,183,.16); color: #6ee7b7; }
.row.contact.love .status { background: rgba(255,143,184,.18); color: #ff8fb8; }
.panel .x.small { padding: 5px 9px; font-size: 11px; }

/* ── Sidearm chip: only while it is out ── */
.chip.weapon { border-color: rgba(255,209,102,.45); }
.chip.weapon b { color: var(--acc2); }
.chip.weapon.aim { border-color: var(--bad); background: rgba(255,92,138,.14); }
.notice.danger { border-color: rgba(255,92,138,.6); }

/* ── Wanted, custody, the yard ── */
.chip.wanted { border-color: rgba(255,92,138,.6); background: rgba(255,92,138,.14); color: #ffd7e2; }
.chip.wanted b { color: var(--bad); }
.chip.wanted[data-state="searching"] { border-color: rgba(255,209,102,.5); background: rgba(255,209,102,.1); color: #ffe7b0; }
.chip.wanted[data-state="escaped"], .chip.wanted[data-state="jailed"], .chip.wanted[data-state="duel"] { border-color: var(--line); background: var(--glass); color: var(--ink); }
.chip.wanted.can::after { content: 'E to surrender'; margin-left: 6px; font-size: 10px; color: var(--mute); font-weight: 600; }
.jail-card { position: absolute; left: 50%; top: 14%; transform: translateX(-50%); min-width: 260px; padding: 12px 16px; border-radius: 14px; background: var(--glass2); border: 1px solid var(--line); text-align: center; backdrop-filter: blur(10px); }
.jail-card b { display: block; font-size: 12px; letter-spacing: 2px; color: var(--acc2); }
.jail-card span { display: block; margin-top: 4px; font-size: 13px; color: var(--ink); }
.jail-card em { display: block; margin-top: 6px; font-style: normal; font-size: 12px; color: var(--mute); }
.jail-card.duel b { color: var(--bad); }
.jail-card .hp { height: 6px; margin-top: 8px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.jail-card .hp i { display: block; height: 100%; background: #6ee7b7; transition: width .3s; }
.jail-card .hp.them i { background: var(--bad); }
.ride-card { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--glass2); border: 1px solid var(--line); font-size: 13px; }

/* ── Arsenal: the Arena's guns on the street ── */
.arsenal-grid { display: grid; grid-template-columns: 1fr 440px; gap: 14px; }
.arsenal-list { display: grid; gap: 8px; max-height: 72vh; overflow: auto; align-content: start; }
.gun { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); cursor: pointer; opacity: .78; }
.gun.owned { opacity: 1; }
.gun.sel { border-color: var(--acc); background: rgba(56,189,248,.08); opacity: 1; }
.gun-head { display: flex; align-items: center; gap: 8px; }
.gun-head b { font-size: 14px; }
.gun-head em { font-style: normal; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: 1px; flex: 1; }
.gun .tag { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: rgba(56,189,248,.18); color: var(--acc); font-weight: 700; }
.gun .tag.own { background: rgba(255,255,255,.08); color: var(--mute); }
.gun .tag.price { background: rgba(255,209,102,.16); color: var(--acc2); }
.gun-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.abar span { display: block; font-size: 10px; color: var(--mute); margin-bottom: 3px; }
.abar i { display: block; height: 4px; border-radius: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.abar i b { display: block; height: 100%; background: var(--acc); }
.gun-bps { display: flex; gap: 5px; margin-top: 8px; }
.gun-bps .bp { width: 10px; height: 10px; border-radius: 3px; background: var(--c); opacity: .45; }
.gun-bps .bp.on { opacity: 1; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.gun-bps .bp.locked { opacity: .2; }
.arsenal-side { display: grid; gap: 10px; align-content: start; }
#arsenalPreview { width: 100%; height: auto; border-radius: 14px; background: radial-gradient(120% 90% at 50% 30%, #182033, #07080c); }
#arsenalDetail h3 { margin: 0; font-size: 18px; }
#arsenalDetail h3 em { font-style: normal; font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: 1.5px; margin-left: 8px; }
#arsenalDetail h4 { margin: 12px 0 6px; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mute); }
#arsenalDetail p { margin: 6px 0; font-size: 13px; color: var(--mute); line-height: 1.5; }
.astats { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0; }
.astats span { font-size: 11px; color: var(--mute); }
.astats span b { display: block; font-size: 15px; color: var(--ink); }
.aacts { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.aacts .act { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--ink); font-weight: 700; font-size: 13px; }
.aacts .act.primary { background: var(--acc); color: #041018; border-color: transparent; }
.aacts .act:disabled { opacity: .45; cursor: default; }
.bplist { display: grid; gap: 6px; max-height: 26vh; overflow: auto; }
.bpc { display: grid; grid-template-columns: 14px 1fr; column-gap: 10px; align-items: center; text-align: left; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--ink); }
.bpc i { width: 12px; height: 12px; border-radius: 4px; background: var(--c); grid-row: span 2; }
.bpc b { font-size: 13px; }
.bpc span { display: block; font-size: 11px; color: var(--mute); }
.bpc.on { border-color: rgba(110,231,183,.5); }
.bpc.sel { background: rgba(56,189,248,.1); border-color: var(--acc); }
.bpc.locked { opacity: .55; }
.bpdesc { font-size: 12px; }
.ahint { font-size: 11px; }
@media (max-width: 860px) { .arsenal-grid { grid-template-columns: 1fr; } }
/* Physical construction remains on the live World canvas. */
#worldBuild{position:fixed;left:20px;top:80px;bottom:30px;width:285px;z-index:90;overflow:auto;padding:20px;border:1px solid #b9bca755;border-radius:16px;background:#172b25f2;color:#f0eadc;box-shadow:0 16px 70px #0005;font:14px/1.5 Inter,system-ui}#worldBuild header{display:flex;flex-direction:column;gap:12px}#worldBuild button,.property-list button{padding:9px 12px;margin:4px 4px 4px 0;border:1px solid #b2b9a955;border-radius:7px;background:#344b3f;color:#f5edda;cursor:pointer}#worldBuild button:hover,.property-list button:hover{background:#496b53}#worldBuild label{display:block;margin:14px 0}#worldBuild select{display:block;width:100%;padding:9px;margin-top:5px;background:#24392f;color:#f5edda;border:1px solid #b2b9a955;border-radius:7px}#buildSave{width:100%;background:#a58a50!important;color:#fff}#buildStatus{min-height:45px;color:#d9ccab}.property-list{padding:24px;max-width:900px;margin:auto}.property-list article{padding:20px;margin:16px 0;border:1px solid #d0c9ae33;border-radius:12px;background:#ffffff05}
#worldJob{position:fixed;left:22px;bottom:25px;max-width:340px;padding:16px 20px;border-radius:14px;background:#20372eef;border:1px solid #b2aa7455;color:#f0e7cf;z-index:22;display:flex;flex-direction:column;gap:7px;font:14px/1.4 Inter,system-ui}#worldJob[hidden]{display:none}#worldJob small{color:#b9c3ae}#worldJob button,.job-offer button{padding:9px 12px;background:#a58a50;color:white;border:0;border-radius:7px;cursor:pointer}#worldJob button:disabled{opacity:.5;cursor:default}.job-offer{padding:18px 0;border-bottom:1px solid #ffffff22}.job-offer button{display:block;margin-top:12px}

#worldRoute{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);display:flex;gap:10px;align-items:center;background:#20372fed;color:#f3ecdb;padding:10px 15px;border-radius:12px;z-index:18;font:13px system-ui}#worldRoute[hidden]{display:none}#worldRoute button{padding:6px 12px;border:1px solid #9caa91;border-radius:6px;background:#355044;color:inherit}
/* Keep navigation clear of the first-person hands and reload path. */
body.weapon-drawn .minimap { left: 18px; right: auto; }
