/* RDE // KONTRAKT — noir HUD, diegetic phone, glass panels */
:root {
  --red: #e0182d; --red2: #ff3b4e; --gold: #f2c86b; --ink: #0b0c10; --glass: rgba(12, 13, 18, 0.72); --line: rgba(255, 255, 255, 0.09);
  --txt: #ece7dc; --dim: #9a958c; --green: #5fd38d; --blue: #5aa8ff;
  --f-head: 'Oswald', 'Bahnschrift', 'Arial Narrow', sans-serif; --f-body: 'Inter', 'Segoe UI', system-ui, sans-serif; --f-mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #050608; color: var(--txt); font-family: var(--f-body); user-select: none; -webkit-user-select: none; }
canvas { display: block; position: fixed; inset: 0; width: 100vw; height: 100vh; }
#view { z-index: 0; }
#post { z-index: 1; }
#over { z-index: 2; pointer-events: none; }
body.nopost #post { display: none; }
body.ingame { cursor: none; }
body.ingame.menu { cursor: default; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }

/* ------------------------------------------------------------------ HUD */
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; }
#tl { position: absolute; top: 18px; left: 22px; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
#clock { display: flex; align-items: baseline; gap: 10px; font-family: var(--f-head); }
#clock b { font-size: 34px; font-weight: 600; letter-spacing: 1px; }
#c-day { font-size: 13px; color: var(--dim); letter-spacing: 2px; text-transform: uppercase; }
#c-weather { font-size: 18px; }
#district { font-family: var(--f-head); font-size: 12px; letter-spacing: 4px; text-transform: uppercase; color: var(--gold); margin-top: 2px; }
#money { font-family: var(--f-head); font-size: 24px; color: #9ff0b8; margin-top: 4px; letter-spacing: 1px; transition: transform .2s; }
#money.bump { transform: scale(1.15); color: #d6ffe3; }
#bank { font: 500 12px var(--f-head); letter-spacing: 1px; color: #7fb7a0; margin-top: 1px; }
#jailbox { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); min-width: 360px; max-width: 520px; text-align: center; background: rgba(12,10,8,.82); border: 1px solid rgba(232,106,18,.5); border-radius: 4px; padding: 8px 14px 10px; overflow: hidden; }
#jailbox b { display: block; font: 600 18px var(--f-head); letter-spacing: 3px; color: #ff9a4a; }
#jailbox span { display: block; font-size: 12px; color: #d8cfc0; margin-top: 3px; }
#jailbox kbd { font: 700 11px var(--f-head); background: #ece7dc; color: #111; padding: 1px 5px; border-radius: 3px; }
#jailbox i { position: absolute; left: 0; bottom: 0; height: 3px; background: #ff9a4a; }

#wanted { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); text-align: center; }
#stars { font-size: 26px; letter-spacing: 6px; color: rgba(255,255,255,.12); text-shadow: 0 2px 8px rgba(0,0,0,.9); }
#stars b { color: #ffd23a; text-shadow: 0 0 12px rgba(255,180,0,.8); }
#stars.blink b { animation: blink .5s infinite; }
@keyframes blink { 50% { opacity: .25; } }
#heat { width: 160px; height: 3px; margin: 4px auto 0; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
#heat i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #4f9bff, #ff3b4e); }
body.wanted #hud::after { content: ''; position: fixed; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(40,80,255,.18); animation: siren 1s steps(2) infinite; }
@keyframes siren { 50% { box-shadow: inset 0 0 120px rgba(255,30,50,.2); } }

#tracker { position: absolute; top: 18px; right: 22px; width: 300px; background: var(--glass); border: 1px solid var(--line); border-left: 3px solid var(--red); padding: 10px 12px; backdrop-filter: blur(8px); border-radius: 4px; }
#tracker .tk-h { display: flex; gap: 10px; align-items: center; }
#tracker canvas { position: static; width: 46px; height: 46px; border-radius: 4px; background: #15161b; flex: none; }
#tracker .tk-n { font-family: var(--f-head); font-size: 17px; letter-spacing: .5px; line-height: 1.1; }
#tracker .tk-p { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 2px; }
#tracker .tk-o { margin-top: 8px; font-size: 12px; color: #cfc9be; display: grid; gap: 3px; }
#tracker .tk-o div::before { content: '◆ '; color: var(--red); }
#tracker .tk-o .ok::before { content: '✔ '; color: var(--green); }
#tracker .tk-t { margin-top: 6px; font-family: var(--f-mono); font-size: 11px; color: var(--gold); }

#minimap { position: absolute; left: 22px; bottom: 22px; width: 220px; height: 220px; border-radius: 50%; overflow: hidden; border: 2px solid rgba(255,255,255,.15); box-shadow: 0 0 0 4px rgba(0,0,0,.45), 0 10px 30px rgba(0,0,0,.6); }
#minimap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#mm-n { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); font: 600 11px var(--f-head); color: var(--gold); }

#vitals { position: absolute; left: 258px; bottom: 26px; width: 250px; }
.bar { position: relative; height: 10px; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.08); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; transition: width .2s; }
.bar.hp { height: 16px; }
.bar.hp i { background: linear-gradient(90deg, #8a0f1c, #e0182d); box-shadow: 0 0 10px rgba(224,24,45,.6); }
.bar.hp span { position: absolute; right: 6px; top: 0; font: 600 12px/16px var(--f-head); }
.bar.armor i { background: linear-gradient(90deg, #2f5ea8, #6aa8ff); }
.bar.stam { height: 4px; } .bar.stam i { background: #e8e2d4; }
#needs { display: flex; gap: 8px; margin-top: 8px; }
.need { position: relative; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.1); display: grid; place-items: center; overflow: hidden; }
.need em { font-style: normal; font-size: 16px; position: relative; z-index: 1; }
.need i { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(95,211,141,.35); height: 50%; }
.need.low i { background: rgba(224,24,45,.55); animation: blink 1s infinite; }
.need.status { font-size: 16px; display: none; }
.need.status.on { display: grid; animation: blink 1.2s infinite; }

#weapon { position: absolute; right: 24px; bottom: 24px; text-align: right; }
#w-main { display: flex; align-items: center; justify-content: flex-end; gap: 14px; background: var(--glass); border: 1px solid var(--line); padding: 10px 16px; border-radius: 4px; backdrop-filter: blur(8px); }
#w-icon { width: 120px; height: 50px; filter: drop-shadow(0 0 6px rgba(255,255,255,.25)); }
#w-name { font-family: var(--f-head); font-size: 15px; letter-spacing: 1px; text-transform: uppercase; }
#w-ammo { font-family: var(--f-head); font-size: 28px; line-height: 1; margin-top: 2px; }
#w-ammo small { font-size: 15px; color: var(--dim); }
#w-ammo .sup { font-size: 10px; color: var(--blue); letter-spacing: 2px; display: block; }
#w-ammo.empty { color: var(--red2); }
#w-slots { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: 6px; }
#w-slots div { width: 46px; height: 26px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.08); border-radius: 3px; position: relative; display: grid; place-items: center; }
#w-slots div.on { border-color: var(--red); background: rgba(224,24,45,.18); }
#w-slots img { width: 40px; height: 17px; opacity: .85; }
#w-slots span { position: absolute; top: -1px; left: 3px; font: 600 9px var(--f-head); color: var(--dim); }
#w-slots b { position: absolute; bottom: -1px; right: 3px; font: 600 9px var(--f-head); color: var(--gold); }

#stance { position: absolute; right: 24px; bottom: 150px; font: 600 11px var(--f-head); letter-spacing: 3px; color: var(--dim); text-align: right; }
#stance b { display: inline-block; padding: 3px 8px; margin-left: 4px; background: rgba(0,0,0,.5); border-radius: 3px; }
#stance b.on { color: #fff; background: rgba(224,24,45,.45); }
#stance b.blue { color: #fff; background: rgba(60,120,255,.45); }

#prompt { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; }
#prompt div { background: rgba(8,8,12,.78); border: 1px solid var(--line); padding: 6px 14px 6px 6px; border-radius: 4px; font-size: 14px; display: flex; align-items: center; gap: 10px; backdrop-filter: blur(6px); animation: pop .15s; }
#prompt kbd { font: 700 13px var(--f-head); min-width: 26px; height: 26px; display: inline-grid; place-items: center; background: #ece7dc; color: #111; border-radius: 3px; box-shadow: 0 2px 0 #8a857c; }
#prompt div.off { opacity: .55; }
#prompt div.off kbd { background: #555; color: #bbb; box-shadow: none; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }

#feed { position: absolute; left: 22px; top: 162px; width: 360px; display: flex; flex-direction: column; gap: 5px; }
#feed div { background: linear-gradient(90deg, rgba(8,8,12,.85), rgba(8,8,12,0)); padding: 6px 12px; font-size: 13px; border-left: 2px solid var(--dim); animation: slide .25s; transition: opacity .6s; }
#feed div.money { border-color: #5fd38d; color: #c9f5d9; }
#feed div.bad { border-color: var(--red); color: #ffb9c0; }
#feed div.good { border-color: var(--blue); }
#feed div.loot { border-color: var(--gold); color: #ffe7b0; }
#feed div.phone { border-color: #ece9e2; color: #f4f2ec; }
@keyframes slide { from { transform: translateX(-20px); opacity: 0; } }

#banner { position: absolute; left: 0; right: 0; top: 24%; text-align: center; opacity: 0; transition: opacity .4s; }
#banner.on { opacity: 1; }
#banner b { display: block; font: 700 54px/1 var(--f-head); letter-spacing: 10px; text-shadow: 0 4px 30px rgba(0,0,0,.9); }
#banner span { display: inline-block; margin-top: 10px; font-size: 15px; letter-spacing: 4px; text-transform: uppercase; color: var(--dim); }
#banner.red b { color: var(--red2); }
#banner.gold b { color: var(--gold); }
#banner.level b { color: #9fd2ff; }
#banner.disguise b { color: #e8e2d4; font-size: 40px; }
#banner.grey b { color: #bbb; }
#banner.wanted b { color: #ffd23a; }
#phone-hint { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font-size: 11px; color: rgba(255,255,255,.35); letter-spacing: 1px; }
#phone-hint b { color: rgba(255,255,255,.6); }

/* ------------------------------------------------------------------ phone */
#phone { position: fixed; right: 40px; bottom: 30px; z-index: 20; animation: phoneUp .35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes phoneUp { from { transform: translateY(110%) rotate(6deg); } }
.ph-frame { width: 340px; height: 640px; background: #0b0c10; border-radius: 38px; padding: 14px; box-shadow: 0 0 0 2px #2a2c33, 0 0 0 9px #111216, 0 40px 80px rgba(0,0,0,.8), inset 0 0 0 1px #333; display: flex; flex-direction: column; overflow: hidden; }
.ph-top { display: flex; justify-content: space-between; font: 600 11px var(--f-head); color: #aaa; padding: 4px 14px 8px; letter-spacing: 1px; }
#ph-body { flex: 1; overflow-y: auto; background: radial-gradient(ellipse at top, #1d1420, #0d0e13 60%); border-radius: 22px; padding: 14px; }
.ph-home { display: flex; justify-content: space-around; padding-top: 10px; }
.ph-home button { background: none; border: 0; color: #888; font-size: 16px; width: 60px; height: 30px; }
.ph-home button:hover { color: #fff; }
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 10px; }
.app { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; font-size: 11px; color: #ddd; position: relative; }
.app i { width: 62px; height: 62px; border-radius: 16px; display: grid; place-items: center; font-style: normal; font-size: 28px; box-shadow: 0 6px 16px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.2); }
.app:hover i { transform: scale(1.06); }
.app .badge { position: absolute; top: -4px; right: 6px; background: var(--red); color: #fff; font: 700 11px/18px var(--f-head); min-width: 18px; height: 18px; border-radius: 9px; }
.ph-h { font: 600 20px var(--f-head); letter-spacing: 2px; margin: 4px 0 12px; }
.ph-wall { text-align: center; padding: 20px 0 6px; }
.ph-wall b { font: 300 64px var(--f-head); display: block; letter-spacing: 2px; }
.ph-wall span { font-size: 12px; color: #aaa; letter-spacing: 2px; text-transform: uppercase; }
.card { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.card.active { border-color: var(--red); background: rgba(224,24,45,.07); }
.card .row { display: flex; gap: 10px; align-items: center; }
.card canvas { position: static; width: 56px; height: 56px; border-radius: 8px; background: #15161b; flex: none; }
.card h4 { margin: 0; font: 600 16px var(--f-head); letter-spacing: .5px; }
.card .sub { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 1.5px; }
.card p { font-size: 12px; color: #cfc9be; line-height: 1.45; margin: 8px 0; }
.card .meta { display: flex; justify-content: space-between; font-size: 12px; margin-top: 6px; }
.card .meta b { color: #9ff0b8; font-family: var(--f-head); font-size: 16px; }
.pill { display: inline-block; font-size: 10px; padding: 2px 7px; border-radius: 10px; background: rgba(255,255,255,.08); margin: 2px 3px 2px 0; letter-spacing: .5px; }
.pill.red { background: rgba(224,24,45,.25); color: #ffc2c8; }
.btn { background: #ece7dc; color: #111; border: 0; padding: 8px 14px; border-radius: 8px; font: 600 13px var(--f-head); letter-spacing: 1px; text-transform: uppercase; }
.btn:hover { background: #fff; }
.btn.red { background: var(--red); color: #fff; } .btn.red:hover { background: var(--red2); }
.btn.ghost { background: rgba(255,255,255,.07); color: #ddd; } .btn.ghost:hover { background: rgba(255,255,255,.14); }
.btn:disabled { opacity: .4; cursor: default; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.skill { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.skill i { font-style: normal; font-size: 22px; width: 30px; text-align: center; }
.skill .sk-n { flex: 1; font-size: 13px; }
.skill .sk-n small { display: block; color: var(--dim); font-size: 11px; }
.pips { display: flex; gap: 3px; } .pips u { width: 10px; height: 10px; border-radius: 2px; background: rgba(255,255,255,.12); } .pips u.on { background: var(--gold); }
.skill button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--gold); color: #111; font-weight: 700; }
.skill button:disabled { background: #333; color: #666; }
.stat { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.stat b { font-family: var(--f-head); }
.xpbar { height: 6px; background: rgba(255,255,255,.1); border-radius: 3px; overflow: hidden; margin: 6px 0 12px; } .xpbar i { display: block; height: 100%; background: linear-gradient(90deg, #5aa8ff, #9fd2ff); }
.msg { font-size: 12px; padding: 8px 10px; background: rgba(255,255,255,.04); border-radius: 10px; margin-bottom: 6px; }
.msg small { display: block; color: var(--dim); font-size: 10px; margin-bottom: 2px; }

/* ------------------------------------------------------------------ panels */
#panel, #mapview, #pause, #result, #dead { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(10,8,12,.55), rgba(0,0,0,.85)); backdrop-filter: blur(3px); }
.pn-box { width: min(980px, 94vw); max-height: 88vh; background: rgba(14,15,20,.96); border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: 6px; display: flex; flex-direction: column; box-shadow: 0 40px 100px rgba(0,0,0,.7); animation: pop .2s; }
.pn-box header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.pn-box h2 { margin: 0; font: 600 22px var(--f-head); letter-spacing: 4px; text-transform: uppercase; }
.pn-x { background: none; border: 0; font-size: 20px; color: var(--dim); }
.pn-x:hover { color: #fff; }
#pn-body { padding: 16px 20px 20px; overflow-y: auto; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sec { font: 600 12px var(--f-head); letter-spacing: 3px; color: var(--gold); text-transform: uppercase; margin: 6px 0 8px; display: flex; justify-content: space-between; }
.sec small { color: var(--dim); letter-spacing: 1px; }
.list { display: grid; gap: 6px; }
.it { display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 5px; }
.it:hover { background: rgba(255,255,255,.06); }
.it.on { border-color: var(--red); }
.it .ic { width: 64px; height: 30px; display: grid; place-items: center; font-size: 22px; flex: none; }
.it .ic img { width: 64px; height: 27px; }
.it .nm { flex: 1; font-size: 14px; min-width: 0; }
.it .nm small { display: block; color: var(--dim); font-size: 11px; margin-top: 2px; }
.it .pr { font: 600 15px var(--f-head); color: #9ff0b8; min-width: 70px; text-align: right; }
.it .pr.bad { color: var(--red2); }
.it .q { font: 600 14px var(--f-head); color: var(--gold); min-width: 34px; text-align: right; }
.it .btn { padding: 6px 10px; font-size: 12px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs button { background: rgba(255,255,255,.05); border: 1px solid var(--line); padding: 6px 14px; border-radius: 4px; font: 600 13px var(--f-head); letter-spacing: 2px; text-transform: uppercase; color: var(--dim); }
.tabs button.on { background: var(--red); color: #fff; border-color: var(--red); }
.wallet { font: 600 18px var(--f-head); color: #9ff0b8; }
.outfits { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.outfit { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 6px; padding: 10px; text-align: center; }
.outfit.on { border-color: var(--red); }
.outfit canvas { position: static; width: 80px; height: 80px; margin: 0 auto 6px; }
.outfit div { font-size: 13px; margin-bottom: 6px; }

.mv-box { width: min(1100px, 96vw); height: min(92vh, 980px); background: #0d0e12; border: 1px solid var(--line); border-radius: 6px; display: flex; flex-direction: column; position: relative; }
.mv-box header { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.mv-box h2 { margin: 0; font: 600 22px var(--f-head); letter-spacing: 6px; }
.mv-box header span { font-size: 12px; color: var(--dim); }
#mapview .mv-box { width: min(1560px, 97vw); height: 94vh; }
.mv-main { flex: 1; min-height: 0; display: flex; }
.mv-stage { position: relative; flex: 1; min-width: 0; overflow: hidden; }
#bigmap { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
#bigmap.drag { cursor: grabbing; }
.mv-ctl { position: absolute; left: 12px; top: 12px; display: flex; flex-direction: column; gap: 4px; }
.mv-ctl button { width: 34px; height: 34px; border: 1px solid rgba(236,233,226,.18); background: rgba(10,11,14,.88); color: #ece9e2; font: 600 18px var(--f-head); cursor: pointer; border-radius: 2px; }
.mv-ctl button:hover { border-color: #e0182d; color: #fff; }
.mv-scale { position: absolute; left: 12px; bottom: 10px; font: 500 11px var(--f-head); letter-spacing: .12em; color: rgba(236,233,226,.6); pointer-events: none; }
#mv-legend { width: 250px; flex: none; overflow-y: auto; padding: 14px 14px 18px; border-left: 1px solid rgba(236,233,226,.1); font-size: 12px; color: #cfc9be; }
#mv-legend.off { display: none; }
#mv-legend h4 { margin: 14px 0 6px; font: 600 11px var(--f-head); letter-spacing: .22em; color: #8d8a84; text-transform: uppercase; }
#mv-legend h4:first-child { margin-top: 0; }
#mv-legend .lg { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 3px 6px; }
#mv-legend .lg i { font-style: normal; text-align: center; }
@media (max-width: 900px) { #mv-legend { position: absolute; right: 0; top: 0; bottom: 0; background: rgba(10,11,14,.95); } }

/* ------------------------------------------------------------------ title / pause / results */
#title { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 60%, rgba(0,0,0,.25), rgba(0,0,0,.85)); }
#title::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0 2px, transparent 2px 4px); pointer-events: none; }
.t-inner { text-align: center; position: relative; }
.t-brand { font: 500 12px var(--f-head); letter-spacing: 8px; color: var(--red2); }
#title h1 { font: 700 clamp(64px, 13vw, 168px)/0.9 var(--f-head); letter-spacing: clamp(12px, 3vw, 40px); margin: 14px 0 4px; padding-left: clamp(12px, 3vw, 40px); color: #f2ede4; text-shadow: 0 0 60px rgba(224,24,45,.5), 0 10px 40px rgba(0,0,0,.9); animation: flick 6s infinite; }
@keyframes flick { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .5; } 94% { opacity: 1; } 96% { opacity: .7; } }
.t-sub { font-size: 14px; letter-spacing: 6px; text-transform: uppercase; color: var(--dim); }
.t-menu { display: flex; flex-direction: column; gap: 10px; align-items: center; margin-top: 46px; }
.t-menu button, .p-box button { width: 300px; padding: 14px; background: rgba(10,10,14,.7); border: 1px solid var(--line); color: #e6e0d4; font: 500 17px var(--f-head); letter-spacing: 5px; text-transform: uppercase; transition: all .15s; }
.t-menu button:hover, .p-box button:hover { background: var(--red); border-color: var(--red); color: #fff; letter-spacing: 7px; }
.t-foot { margin-top: 40px; font-size: 11px; color: rgba(255,255,255,.3); letter-spacing: 2px; }
.p-box { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.p-box h2 { font: 700 46px var(--f-head); letter-spacing: 16px; margin: 0 0 20px; }

.res-box { width: min(620px, 94vw); background: rgba(10,10,14,.96); border: 1px solid var(--line); padding: 30px 34px; text-align: center; animation: pop .4s; }
.res-box .k { font: 500 12px var(--f-head); letter-spacing: 8px; color: var(--dim); }
.res-box h1 { font: 700 46px var(--f-head); letter-spacing: 8px; margin: 10px 0 2px; color: var(--gold); text-shadow: 0 0 30px rgba(242,200,107,.4); }
.res-box h3 { margin: 0 0 20px; font: 400 16px var(--f-head); letter-spacing: 3px; color: #ddd; }
.res-box .ln { display: flex; justify-content: space-between; padding: 8px 4px; border-bottom: 1px dashed var(--line); font-size: 14px; opacity: 0; animation: lnIn .35s forwards; }
.res-box .ln b { font-family: var(--f-head); font-size: 16px; }
.res-box .ln.no { color: #777; text-decoration: line-through; }
.res-box .ln.neg b { color: var(--red2); }
.res-box .tot { display: flex; justify-content: space-between; margin-top: 16px; font: 600 26px var(--f-head); color: #9ff0b8; }
@keyframes lnIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; } }
#dead .res-box h1 { color: var(--red2); }

#fade { position: fixed; inset: 0; background: #000; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .8s; }
#fade.on { opacity: 1; }
#toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 61; font: 600 28px var(--f-head); letter-spacing: 6px; pointer-events: none; opacity: 0; transition: opacity .6s; text-align: center; }
#toast.on { opacity: 1; }
.kbd-grid { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 8px 14px; font-size: 13px; align-items: center; }
.kbd-grid kbd { font: 700 12px var(--f-head); padding: 4px 8px; background: #ece7dc; color: #111; border-radius: 3px; text-align: center; white-space: nowrap; }
.set { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; gap: 16px; }
.set small { display: block; color: var(--dim); font-size: 11px; }
.set input[type=range] { width: 180px; accent-color: var(--red); }
.tog { width: 46px; height: 24px; border-radius: 12px; background: #333; border: 0; position: relative; flex: none; }
.tog::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #aaa; transition: all .15s; }
.tog.on { background: var(--red); } .tog.on::after { left: 25px; background: #fff; }
.set select { background: #1a1b20; color: #eee; border: 1px solid var(--line); padding: 5px 8px; border-radius: 4px; }

@media (max-width: 900px) {
  #vitals { left: 22px; bottom: 250px; width: 200px; }
  #tracker { width: 230px; }
  #minimap { width: 160px; height: 160px; }
  #w-icon { width: 80px; height: 34px; }
  .cols { grid-template-columns: 1fr; }
  #banner b { font-size: 34px; letter-spacing: 5px; }
  #phone { right: 50%; transform: translateX(50%); bottom: 10px; }
  .ph-frame { height: 82vh; }
}

/* crew */
.crewgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.crewcard { display: flex; gap: 12px; border-width: 1px; }
.crewcard .crewpic { width: 72px; height: 72px; border-radius: 10px; flex: none; }
.crewcard .cbody { flex: 1; min-width: 0; }
.crewcard h4 { margin: 0 0 2px; font: 600 16px var(--f-head); letter-spacing: 1px; }
.crewmeta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11px; color: #bbb; margin: 4px 0 6px; }
.crewcard .skills { display: grid; gap: 3px; margin-bottom: 8px; }
.crewcard .sk { display: grid; grid-template-columns: 70px 1fr 26px; align-items: center; gap: 6px; font-size: 11px; color: #aaa; }
.crewcard .sk i { height: 5px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.crewcard .sk i b { display: block; height: 100%; }
.crewcard .sk em { font-style: normal; text-align: right; color: #ddd; }
.crewcard .btns { display: flex; flex-wrap: wrap; gap: 6px; }
.crewcard .tag { font-size: 12px; color: #888; }
.cmdrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.lead { color: #c9b28a; font-style: italic; margin: 0 0 10px; }
#crewhud { position: absolute; right: 24px; bottom: 150px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; pointer-events: none; }
#crewhud .cm { background: rgba(10,10,14,.72); border: 1px solid rgba(255,255,255,.1); border-left: 3px solid var(--c, #3ddc84); border-radius: 8px; padding: 5px 9px; min-width: 150px; font: 600 12px var(--f-head); letter-spacing: 1px; color: #eee; }
#crewhud .cm small { color: #9a9a9a; font-weight: 400; letter-spacing: 0; margin-left: 6px; }
#crewhud .cm i { display: block; height: 3px; margin-top: 4px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
#crewhud .cm i b { display: block; height: 100%; background: #3ddc84; }
@media (max-width: 700px) { .crewgrid { grid-template-columns: 1fr; } #crewhud { bottom: 120px; right: 12px; } }

/* gang & tag editor */
.gangcard { display: flex; gap: 14px; align-items: center; }
.gangcard h4 { margin: 0 0 4px; font: 600 18px var(--f-head); letter-spacing: 1px; }
.gangtag { width: 192px; height: 64px; border: 1px dashed; border-radius: 8px; display: grid; place-items: center; background: repeating-linear-gradient(90deg, #2a2a2e 0 14px, #26262a 14px 28px); flex: none; }
.gangtag img { width: 100%; height: 100%; object-fit: contain; }
.ganglist { display: grid; gap: 6px; }
.ganrow { display: grid; grid-template-columns: 1.4fr .8fr .8fr auto; align-items: center; gap: 10px; margin: 0; }
.tagwrap { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.tagside { display: grid; gap: 8px; width: 260px; }
.tagside label { display: grid; gap: 4px; font-size: 12px; color: #aaa; }
.tagside input { background: #111; border: 1px solid var(--line); color: #eee; padding: 8px; border-radius: 8px; font: inherit; }
.tagside .sw { display: flex; gap: 6px; flex-wrap: wrap; }
.tagside .sw i { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.tagside .sw i.on { border-color: #fff; }
.tagside .caps { display: flex; flex-wrap: wrap; gap: 4px; }
.tagside .caps .btn.on { background: #eee; color: #111; }
#tg-cv { position: static; inset: auto; height: auto; flex: 1 1 420px; min-width: 260px; max-width: 768px; aspect-ratio: 3 / 1; border-radius: 10px; cursor: crosshair; touch-action: none; background: linear-gradient(#3a3d44, #2d3036), repeating-linear-gradient(0deg, transparent 0 31px, rgba(0,0,0,.25) 31px 32px), repeating-linear-gradient(90deg, transparent 0 63px, rgba(0,0,0,.25) 63px 64px); background-blend-mode: multiply; }
@media (max-width: 700px) { .ganrow { grid-template-columns: 1fr 1fr; } .tagside { width: 100%; } }

/* ---- cars: dealer, tuning, car service, pump, car hud ---- */
.dealer { display: grid; grid-template-columns: 220px 1fr; gap: 14px; }
.dl-list { display: grid; gap: 6px; align-content: start; max-height: 62vh; overflow: auto; }
.dl-it { text-align: left; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: #ddd; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.dl-it b { display: block; font: 600 14px var(--f-head); letter-spacing: 1px; }
.dl-it small { color: #999; }
.dl-it.on { border-color: #f59e0b; background: rgba(245,158,11,.1); }
.dl-main canvas, .tn-left canvas { position: static; width: 100%; height: auto; border-radius: 10px; display: block; }
.dl-main h3, .tn-left h3 { font: 600 22px var(--f-head); letter-spacing: 2px; margin: 10px 0 4px; }
.dl-main h3 small, .tn-left h3 small { color: #f59e0b; font-size: 12px; margin-left: 8px; }
.carstats { display: grid; gap: 4px; margin: 8px 0; }
.carstats .sk { display: grid; grid-template-columns: 80px 1fr 90px; align-items: center; gap: 8px; font-size: 12px; color: #aaa; }
.carstats .sk i { height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.carstats .sk i b { display: block; height: 100%; }
.carstats .sk em { font-style: normal; color: #ddd; text-align: right; }
.dealer .sw, .tune .sw { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 10px; }
.dealer .sw i { width: 26px; height: 26px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(255,255,255,.15); }
.dealer .sw i.on { border-color: #fff; }
.tune { display: grid; grid-template-columns: 360px 1fr; gap: 16px; }
.tn-rep p { color: #aaa; font-size: 12px; margin: 4px 0 8px; }
.tn-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tn-cats button { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-bottom: 3px solid var(--c); color: #ddd; padding: 7px 10px; border-radius: 8px; cursor: pointer; font: 600 13px var(--f-head); letter-spacing: 1px; }
.tn-cats button.on { background: color-mix(in srgb, var(--c) 25%, transparent); color: #fff; }
.tn-part { margin-bottom: 10px; }
.tn-part .sub small { color: #888; text-transform: none; letter-spacing: 0; }
.tn-opts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.tn-o { background: rgba(255,255,255,.04); border: 1px solid var(--line); color: #ddd; border-radius: 7px; padding: 6px 9px; cursor: pointer; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.tn-o i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1px solid rgba(255,255,255,.3); }
.tn-o small { color: #f59e0b; }
.tn-o.cur { border-color: #5fd38d; color: #5fd38d; }
.tn-o.pv { border-color: #f59e0b; background: rgba(245,158,11,.15); }
.tn-buy { position: sticky; bottom: -14px; margin-top: 10px; display: flex; gap: 10px; align-items: center; justify-content: flex-end; background: rgba(12,12,16,.96); padding: 10px; border-top: 1px solid var(--line); }
.tn-buy span { margin-right: auto; color: #ccc; }
.cs { color: #e6edf3; }
.cs-head { background: linear-gradient(135deg,#0f172a,#0d1117); border: 1px solid #1e293b; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.cs-head b { display: block; letter-spacing: 2px; font-size: 13px; }
.cs-head small { color: #22d3ee; font-size: 11px; }
.cs-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.cs-tabs button { flex: 1; background: #0f172a; color: #94a3b8; border: 1px solid #1e293b; border-radius: 8px; padding: 6px; cursor: pointer; }
.cs-tabs button.on { color: #fff; border-color: #3b82f6; }
.cs-card { background: #0f172a; border: 1px solid #1e293b; border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.cs-card.blue { border-left: 3px solid #3b82f6; } .cs-card.green { border-left: 3px solid #10b981; }
.cs-card p { color: #94a3b8; font-size: 12px; margin: 4px 0 8px; }
.cs-car { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #0f172a; border: 1px solid #1e293b; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; }
.cs-car small { display: block; color: #94a3b8; font-size: 11px; }
#pumppanel { position: absolute; right: 24px; bottom: 190px; width: 256px; padding: 10px; border-radius: 10px; background: linear-gradient(160deg,#c9ced4,#8b939c 45%,#b8bec6); box-shadow: 0 10px 30px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.6); color: #111; font-family: 'Share Tech Mono', ui-monospace, monospace; }
.pp-head { background: #1f8a4c; border-bottom: 4px solid #f2c200; color: #fff; padding: 4px 8px; border-radius: 4px; font: 700 13px var(--f-head); letter-spacing: 2px; display: flex; gap: 6px; align-items: center; }
.pp-head em { margin-left: auto; font-style: normal; font-size: 11px; opacity: .8; }
.pp-screen { background: #060606; border-radius: 6px; margin-top: 8px; padding: 8px 10px; box-shadow: inset 0 2px 8px rgba(0,0,0,.9); }
.pp-screen label { display: block; color: #6b6b6b; font-size: 10px; letter-spacing: 2px; }
.seg { position: relative; font-size: 30px; line-height: 1.1; text-align: right; font-weight: 700; letter-spacing: 2px; }
.seg s { position: absolute; right: 0; color: rgba(255,120,0,.08); text-decoration: none; }
.seg span { color: #ff8a1a; text-shadow: 0 0 8px rgba(255,120,0,.8); position: relative; }
.pp-bar { height: 6px; background: #222; border-radius: 3px; margin: 6px 0; overflow: hidden; }
.pp-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg,#ff5a00,#ffb000); }
.pp-foot { display: flex; justify-content: space-between; color: #888; font-size: 10px; }
.leds u { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #3a1a00; margin-left: 3px; }
#pumppanel.on .leds u { animation: led 1.02s infinite; } #pumppanel.on .leds u:nth-child(2) { animation-delay: .34s; } #pumppanel.on .leds u:nth-child(3) { animation-delay: .68s; }
@keyframes led { 0%, 30% { background: #ff8a1a; box-shadow: 0 0 6px #ff8a1a; } 31%, 100% { background: #3a1a00; box-shadow: none; } }
.pp-hose { margin-top: 6px; text-align: center; font-size: 10px; letter-spacing: 2px; background: #222; color: #ffb000; border-radius: 3px; padding: 2px; }
.pp-err { display: none; margin-top: 6px; text-align: center; background: #b00020; color: #fff; font-weight: 700; padding: 3px; border-radius: 3px; animation: pulse .6s infinite alternate; }
#pumppanel.err .pp-err { display: block; }
#carhud { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); pointer-events: none; }
#carhud canvas { position: static; width: 760px; height: 170px; }
#ch-warn { position: absolute; left: 50%; top: -34px; transform: translateX(-50%); white-space: nowrap; background: rgba(239,68,68,.92); color: #fff; font: 700 13px var(--f-head); letter-spacing: 2px; padding: 4px 12px; border-radius: 6px; display: none; }
#ch-warn.on { display: block; animation: pulse .5s infinite alternate; }
#crack { position: absolute; inset: 0; pointer-events: none; background-repeat: no-repeat; background-size: cover; }
body.driving #vitals { opacity: .55; }
@media (max-width: 900px) { .dealer, .tune { grid-template-columns: 1fr; } #carhud canvas { width: 96vw; height: auto; } }
@keyframes pulse { from { opacity: 1; } to { opacity: .55; } }
body.driving #prompt { bottom: 205px; }
@media (max-width: 1720px) { body.driving #weapon { bottom: 196px; } }

/* ---- contract look: graphite, bone white and signal red (no neon) ---- */
#minimap { border: 2px solid rgba(236,233,226,.85); background: #0b0c0f; box-shadow: 0 0 0 4px rgba(0,0,0,.55), 0 10px 30px rgba(0,0,0,.6); }
#district { color: #ece9e2; letter-spacing: .28em; text-shadow: none; border-left: 2px solid #e0182d; padding-left: 8px; }
#clock b { text-shadow: none; }
#mapview .mv-box { background: #0c0e11; border: 1px solid rgba(236,233,226,.14); box-shadow: 0 30px 80px rgba(0,0,0,.7); }
#mapview header h2 { font-family: var(--f-head); font-size: 26px; letter-spacing: .35em; color: #ece9e2; text-shadow: none; text-transform: uppercase; border-left: 3px solid #e0182d; padding-left: 12px; }

/* ---- drag & drop inventory + hotbar ---- */
.inv2 { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.tile { position: relative; height: 78px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); display: grid; place-items: center; cursor: grab; user-select: none; touch-action: none; transition: transform .08s, border-color .1s; }
.tile:hover { border-color: rgba(236,233,226,.45); transform: translateY(-1px); }
.tile.sel { border-color: #e0182d; box-shadow: 0 0 0 1px rgba(224,24,45,.4) inset; }
.tile.dragging { opacity: .35; }
.tile img { width: 70px; height: 30px; object-fit: contain; pointer-events: none; }
.tile .emo, .hb .emo, .drag-ghost .emo { font-style: normal; font-size: 26px; pointer-events: none; }
.tile b { position: absolute; top: 4px; right: 6px; font: 600 11px var(--f-head); color: var(--gold); }
.tile u { position: absolute; top: 4px; left: 6px; text-decoration: none; font: 700 10px var(--f-head); color: #111; background: #ece9e2; border-radius: 4px; padding: 0 4px; }
.tile small { position: absolute; bottom: 4px; left: 4px; right: 4px; text-align: center; font-size: 10px; color: #aaa; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.ammo { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: #aaa; } .ammo b { color: #ddd; }
#inv-det .det-h { display: flex; align-items: center; gap: 10px; } #inv-det .det-h img { width: 70px; height: 30px; } #inv-det h4 { margin: 0; } #inv-det p { color: #aaa; font-size: 12px; }
.inv-hb { display: grid; grid-template-columns: repeat(9, 1fr); gap: 6px; }
.inv-hb .hb { height: 62px; }
.hb { position: relative; border-radius: 8px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.12); display: grid; place-items: center; user-select: none; touch-action: none; }
.hb[data-drag] { cursor: grab; }
.hb.empty { border-style: dashed; opacity: .6; }
.hb.on { border-color: #e0182d; background: rgba(224,24,45,.14); box-shadow: none; }
.hb.out { opacity: .4; }
.hb.over, .zone.over { border-color: #ece9e2 !important; background: rgba(236,233,226,.1) !important; }
.hb img { width: 46px; height: 20px; object-fit: contain; pointer-events: none; }
.hb span { position: absolute; top: 1px; left: 4px; font: 600 9px var(--f-head); color: var(--dim); pointer-events: none; }
.hb b { position: absolute; bottom: 1px; right: 4px; font: 600 9px var(--f-head); color: var(--gold); pointer-events: none; }
.inv-zones { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 10px; }
.zone { border: 1px dashed rgba(255,255,255,.25); border-radius: 10px; padding: 12px; text-align: center; color: #bbb; font: 600 13px var(--f-head); letter-spacing: 1px; }
.zone.bad { border-color: rgba(239,68,68,.45); color: #f88; }
.drag-ghost { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, -50%) scale(1.15); background: rgba(10,11,14,.92); border: 1px solid #e0182d; border-radius: 10px; padding: 6px 8px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.drag-ghost img { width: 70px; height: 30px; }
/* HUD hotbar */
#w-slots { display: grid; grid-template-columns: repeat(9, 40px); gap: 4px; justify-content: end; margin-bottom: 6px; }
#w-slots .hb { width: 40px; height: 32px; }
#w-slots .hb img { width: 36px; height: 15px; }
#w-slots .hb .emo { font-size: 17px; }
@media (max-width: 900px) { .inv2 { grid-template-columns: 1fr; } .inv-hb .hb { height: 48px; } #w-slots { grid-template-columns: repeat(9, 30px); } #w-slots .hb { width: 30px; height: 26px; } }

/* ---------- prop system: placement bar, containers, stations, furniture app (violet accent) */
#placebar { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(15,23,42,.94); border: 1px solid rgba(139,92,246,.55); border-radius: 12px; padding: 10px 16px; box-shadow: 0 10px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(139,92,246,.15) inset; min-width: 420px; pointer-events: none; }
#placebar .pb-top { display: flex; align-items: center; gap: 10px; font: 600 15px var(--f-head); letter-spacing: .04em; color: #ede9fe; }
#placebar .pb-top i { font-style: normal; font-size: 20px; }
#placebar .pb-top span { margin-left: auto; font: 600 12px var(--f-head); padding: 3px 8px; border-radius: 6px; }
#placebar .pb-top span.ok { background: rgba(16,185,129,.18); color: #6ee7b7; }
#placebar .pb-top span.no { background: rgba(244,63,94,.18); color: #fda4af; }
#placebar .pb-keys { margin-top: 6px; font-size: 12px; color: #a5b4fc; }
#placebar kbd { display: inline-block; min-width: 22px; padding: 1px 6px; margin: 0 2px 0 8px; border-radius: 4px; background: #1e293b; border: 1px solid rgba(139,92,246,.5); color: #ddd6fe; font: 600 11px var(--f-head); text-align: center; }
#placebar kbd:first-child { margin-left: 0; }
body.placing #prompt { display: none; }
.ctr-cap { display: flex; gap: 14px; margin: 0 0 12px; font-size: 12px; color: #c4b5fd; }
.ctr-cap .bar { flex: 1; height: 6px; background: #1e293b; border-radius: 3px; overflow: hidden; align-self: center; }
.ctr-cap .bar i { display: block; height: 100%; background: linear-gradient(90deg,#8b5cf6,#c084fc); }
.ctr-lock { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 10px; background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.35); border-radius: 8px; font-size: 13px; }
.ctr-lock input { width: 70px; background: #0f172a; border: 1px solid #334155; color: #fff; border-radius: 5px; padding: 3px 6px; font: 600 14px var(--f-head); letter-spacing: .2em; }
.rcp { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 10px 12px; margin-bottom: 8px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); border-radius: 8px; }
.rcp b { font: 600 15px var(--f-head); }
.rcp small { color: #9ca3af; display: block; margin-top: 2px; }
.rcp small .miss { color: #fda4af; } .rcp small .have { color: #6ee7b7; }
.job { padding: 12px; margin-bottom: 12px; border-radius: 10px; background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.4); }
.job .bar { height: 8px; background: #1e293b; border-radius: 4px; overflow: hidden; margin: 8px 0; }
.job .bar i { display: block; height: 100%; background: linear-gradient(90deg,#8b5cf6,#10b981); }
.fx-app .cat { font: 600 12px var(--f-head); letter-spacing: .12em; color: #a78bfa; margin: 14px 0 6px; text-transform: uppercase; }
.fx-app .pi { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; padding: 8px; border-radius: 8px; background: rgba(255,255,255,.04); margin-bottom: 6px; }
.fx-app .pi i { font-style: normal; font-size: 20px; text-align: center; }
.fx-app .pi b { font-size: 13px; } .fx-app .pi small { display: block; color: #9ca3af; font-size: 11px; }
.fx-app .pi .btn { padding: 5px 9px; font-size: 12px; }

/* manhunt status under the stars */
#hunt { margin-top: 4px; text-align: center; font: 600 11px var(--f-head); letter-spacing: .3em; min-height: 14px; }
#hunt.seen { color: #ff3b4e; animation: pulse .5s infinite alternate; }
#hunt.search, #hunt.hide { color: #ffb000; }
#hunt.lost, #hunt.hid0 { color: #ece9e2; opacity: .8; }

/* injuries */
#bodyfig { position: absolute; right: -46px; bottom: 2px; width: 36px; height: 64px; opacity: 0; transition: opacity .4s; }
#bodyfig.on { opacity: 1; }
#bodyfig [data-z] { fill: rgba(236,233,226,.18); stroke: rgba(236,233,226,.5); stroke-width: 1; }
#bodyfig .w1 { fill: rgba(255,176,0,.75); }
#bodyfig .w2 { fill: rgba(224,24,45,.85); }
#bodyfig .frac { fill: #f4f4f0; stroke: #e0182d; stroke-width: 2; stroke-dasharray: 3 2; }
#bodyfig .art { fill: #e0182d; animation: pulse .35s infinite alternate; }
#downed { position: absolute; left: 50%; top: 90px; transform: translateX(-50%); width: 360px; padding: 14px 18px; background: rgba(10,6,8,.86); border: 1px solid rgba(224,24,45,.5); border-top: 3px solid #e0182d; border-radius: 6px; color: #ece9e2; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
#downed b { display: block; font: 600 18px var(--f-head); letter-spacing: .32em; color: #ff3b4e; margin-bottom: 8px; animation: pulse .9s infinite alternate; }
#downed .dn-row { display: flex; justify-content: space-between; font-size: 13px; color: #cfc9be; margin: 4px 0; }
#downed em { font-style: normal; font: 600 14px var(--f-head); color: #fff; }
#downed .dn-bar { height: 8px; background: #1b1416; border-radius: 4px; overflow: hidden; }
#downed .dn-bar i { display: block; height: 100%; transition: width .3s; }
#downed .dn-bar i.g { background: #10b981; } #downed .dn-bar i.a { background: #f59e0b; } #downed .dn-bar i.r { background: #e0182d; }
#dn-ems { margin-top: 8px; font-size: 13px; color: #a5b4fc; min-height: 16px; }

/* organisation app */
.org-rank { padding: 10px 12px; margin-bottom: 10px; border-left: 3px solid #e0182d; background: rgba(224,24,45,.08); }
.org-rank b { display: block; font: 600 20px var(--f-head); letter-spacing: .12em; color: #ece9e2; text-transform: uppercase; }
.org-rank small { color: #9ca3af; font-size: 12px; }
.org-rank .xpbar { margin-top: 6px; }

/* ------------------------------------------------------------------ character editor */
.pn-box.ce-box { width: min(1180px, 96vw); max-height: 92vh; }
.ce { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 24px; align-items: start; }
.ce-prev { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; }
.ce-portrait { position: static; width: 100%; height: auto; aspect-ratio: 1; border-radius: 6px; border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.ce-sub { display: flex; gap: 12px; align-items: center; }
.ce-top { position: static; width: 132px; height: 132px; flex: none; border-radius: 6px; border: 1px solid var(--line); }
.ce-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ce-id b { font: 600 22px var(--f-head); letter-spacing: 1px; text-transform: uppercase; overflow-wrap: anywhere; }
.ce-id span { color: var(--gold); font: 500 12px var(--f-head); letter-spacing: 2px; text-transform: uppercase; }
.ce-id small { color: var(--dim); font-size: 11px; }
.ce-form section { padding: 4px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.ce-form h3 { margin: 0 0 10px; font: 600 13px var(--f-head); letter-spacing: 3px; text-transform: uppercase; color: var(--red2); }
.ce-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.ce-row > label { font-size: 11px; color: var(--dim); letter-spacing: 1px; text-transform: uppercase; }
.ce-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ce-in { background: #1a1b20; color: var(--txt); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; font: 500 14px var(--f-body); user-select: text; -webkit-user-select: text; color-scheme: dark; width: 100%; }
.ce-in:focus { outline: none; border-color: var(--red); }
.ce-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ce-chip { background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 4px; padding: 6px 11px; font: 500 12px var(--f-head); letter-spacing: 1px; text-transform: uppercase; color: #cfcac0; }
.ce-chip:hover { background: rgba(255,255,255,.12); }
.ce-chip.on { background: var(--red); border-color: var(--red); color: #fff; }
.ce-sws { display: flex; flex-wrap: wrap; gap: 6px; }
.ce-sw { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255,255,255,.12); background: var(--c); padding: 0; }
.ce-sw:hover { transform: scale(1.1); }
.ce-sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--red); }
.ce-morphs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin: 4px 0 10px; }
.ce-morph { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--dim); }
.ce-morph input { width: 100%; accent-color: var(--red); }
.ce-err { display: block; color: var(--red2); font-size: 12px; font-style: normal; min-height: 0; }
.ce-err:empty { display: none; }
.ce-act { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.ce-act .btn { padding: 11px 20px; font-size: 14px; }
@media (max-width: 760px) {
  .ce { grid-template-columns: 1fr; }
  .ce-prev { position: static; }
  .ce-two, .ce-morphs { grid-template-columns: 1fr; }
}
