/* 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: 14px; right: 22px; text-align: right; }
#stars { font-size: 24px; letter-spacing: 5px; line-height: 1.1; 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: 140px; height: 3px; margin: 3px 0 0 auto; 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: 78px; 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; }
#taximeter { position: absolute; top: 300px; right: 22px; min-width: 170px; background: var(--glass); border: 1px solid var(--line); border-left: 3px solid #f2c200; padding: 8px 12px; backdrop-filter: blur(8px); border-radius: 4px; }
#taximeter .tx-h { font: 700 11px/1 var(--mono, monospace); letter-spacing: .18em; color: #f2c200; }
#taximeter .tx-f { font: 700 26px/1.2 var(--mono, monospace); color: #ffe27a; margin-top: 4px; }
#taximeter .tx-s { font-size: 12px; opacity: .8; margin-top: 2px; }
#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); }

.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; }

/* ---- bottom left: minimap with the vitals ring (designed at 300 px; --hs scales it) · top right: wanted stars · bottom right: weapon bar ---- */
#hudl { position: absolute; left: -26px; bottom: -14px; width: 300px; height: 300px; transform: scale(var(--hs, 1)); transform-origin: 0 100%; }
#mmc { position: relative; width: 300px; height: 300px; flex: none; }
#minimap { position: absolute; left: 50px; top: 50px; width: 200px; height: 200px; 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); }
/* health (left half) · armor (right half) · stamina (thin, below): arcs on the rim of the minimap */
#ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
#ring path { fill: none; stroke-linecap: butt; }
#ring .trk { stroke: rgba(0,0,0,.55); stroke-width: 9; }
#ring .trk.st { stroke-width: 4; }
#ring .val { stroke-width: 8; transition: stroke-dasharray .2s; }
#ring .val.hp { stroke: #e0182d; filter: drop-shadow(0 0 5px rgba(224,24,45,.55)); }
#ring .val.ar { stroke: #5aa8ff; filter: drop-shadow(0 0 5px rgba(90,168,255,.45)); }
#ring .val.st { stroke-width: 3; stroke: #e8e2d4; }
#mmc.noarmor .ar-g { opacity: .3; }
#mmc.hurt #ring .val.hp { animation: blink .9s infinite; }
#mmc.winded #ring .val.st { stroke: #ff9a4a; }
/* the numbers sit on the lower rim of the map */
#vals { position: absolute; left: 50%; top: 226px; transform: translateX(-50%); display: flex; gap: 6px; font: 600 13px/1 var(--f-head); letter-spacing: .5px; pointer-events: none; text-shadow: 0 1px 3px #000; }
#vals span { padding: 3px 7px; border-radius: 9px; background: rgba(8,8,12,.72); }
#hp-t { color: #ff6272; }
#ar-t { color: #8fc2ff; } #ar-t:empty { display: none; }
/* needs: one round gauge each, spread over the upper-left rim of the ring */
.need { position: absolute; width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.14); display: grid; place-items: center; overflow: hidden;
  left: calc(150px + 133px * cos(var(--a)) - 15px); top: calc(150px + 133px * sin(var(--a)) - 15px); }
.need em { font-style: normal; font-size: 14px; 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.press i { background: rgba(242,200,60,.4); }
.need.press.warn i { background: rgba(255,140,40,.55); }
.need.press.full i { background: rgba(224,24,45,.6); animation: blink .8s infinite; }
.need.status { font-size: 14px; display: none; }
.need.status.on { display: grid; animation: blink 1.2s infinite; }
#n-food { --a: 218deg; } #n-water { --a: 248deg; } #n-energy { --a: 278deg; } #n-bladder { --a: 308deg; } #n-bowel { --a: 338deg; } #n-drunk { --a: 8deg; } #n-bleed { --a: 38deg; }

/* weapon: compact — nine slots across the width of the cluster, one slim row below */
#weapon { position: absolute; right: 18px; bottom: 16px; width: 300px; text-align: right; transform: scale(var(--hs, 1)); transform-origin: 100% 100%; }
#w-slots { display: grid; grid-template-columns: repeat(9, 1fr); gap: 3px; margin-bottom: 4px; }
#w-slots .hb { width: auto; height: 27px; border-radius: 5px; }
#w-slots .hb img { width: 25px; height: 12px; }
#w-slots .hb .emo { font-size: 14px; }
#w-slots .hb span { top: 0; left: 3px; font-size: 8px; }
#w-slots .hb b { bottom: 0; right: 3px; font-size: 8px; }
#w-main { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 8px; background: var(--glass); border: 1px solid var(--line); padding: 4px 10px; border-radius: 4px; backdrop-filter: blur(8px); text-align: left; min-height: 34px; }
#w-icon { width: 56px; height: 22px; object-fit: contain; filter: drop-shadow(0 0 5px rgba(255,255,255,.25)); }
#w-name { font-family: var(--f-head); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#w-ammo { font-family: var(--f-head); font-size: 19px; line-height: 1; text-align: right; white-space: nowrap; }
#w-ammo small { font-size: 12px; color: var(--dim); }
#w-ammo .sup { font-size: 9px; color: var(--blue); letter-spacing: 2px; display: inline-block; margin-left: 6px; vertical-align: middle; }
#w-ammo.empty { color: var(--red2); }

#stance { position: absolute; right: 22px; bottom: 92px; 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: css/phone.css (the device, home screen, app chrome); the shared pieces below (cards, buttons, pills …) are also used by the panels */
.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; }
.t-legal { margin-top: 10px; font-size: 11px; letter-spacing: 2px; display: flex; gap: 10px; justify-content: center; color: rgba(255,255,255,.25); position: relative; z-index: 2; pointer-events: auto; }
.t-legal a { color: rgba(255,255,255,.45); text-decoration: none; text-transform: uppercase; }
.t-legal a:hover { color: #fff; text-decoration: underline; }
.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) {
  #hudl { --hs: .74; left: -20px; bottom: -8px; }
  #weapon { --hs: .74; right: 10px; bottom: 10px; }
  #tracker { width: 230px; }
  .cols { grid-template-columns: 1fr; }
  #banner b { font-size: 34px; letter-spacing: 5px; }
}

/* 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: 22px; bottom: 124px; 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; }
/* the car radio (audio/radio.js): a slim head unit above the dashboard, clickable, the mouse wheel tunes */
#ch-radio { position: absolute; left: 50%; top: -34px; transform: translateX(-50%); width: 360px; height: 30px; display: flex; align-items: center; gap: 4px; padding: 0 6px; pointer-events: auto;
  background: linear-gradient(180deg, rgba(18,20,24,.96), rgba(8,9,11,.96)); border: 1px solid rgba(255,255,255,.12); border-radius: 7px; box-shadow: 0 4px 14px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); font-family: Inter, sans-serif; user-select: none; }
#ch-radio.hidden { display: none; }
#ch-radio button { display: grid; place-items: center; width: 24px; height: 22px; flex: none; border: 1px solid rgba(255,255,255,.1); border-radius: 4px; background: #15171b; color: #8a8f98; font-size: 11px; cursor: pointer; padding: 0; }
#ch-radio button:hover { color: #fff; border-color: rgba(255,255,255,.3); }
#ch-radio.on button[data-r=pow] { color: #4ade80; border-color: rgba(74,222,128,.5); box-shadow: 0 0 6px rgba(74,222,128,.35); }
#ch-radio .rd-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; line-height: 1.05; padding: 0 4px; background: #06210f; border-radius: 3px; height: 22px; box-shadow: inset 0 0 6px rgba(0,0,0,.8); }
#ch-radio:not(.on) .rd-mid { background: #0c0d0f; }
#ch-radio .rd-st { color: #7dffa8; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 6px rgba(125,255,168,.45); }
#ch-radio:not(.on) .rd-st { color: #6a6f78; text-shadow: none; }
#ch-radio .rd-np { color: #9ad8b0; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ch-radio:not(.on) .rd-np { color: #555a62; }
#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 #hudl #needs { opacity: .75; }
@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: 236px; }   /* above the car radio (#ch-radio sits on top of the dashboard) */
@media (max-width: 1400px) { body.driving #hudl { bottom: 176px; } body.driving #weapon { bottom: 196px; } }   /* the dashboard is 760 px wide: on narrow screens the cluster rides above it */

/* ---- 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); }   /* (same size as above — 200 px inside the 300 px cluster) */
#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 */
@media (max-width: 900px) { .inv2 { grid-template-columns: 1fr; } .inv-hb .hb { height: 48px; } }

/* ---------- 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: 3px; text-align: right; font: 600 10px var(--f-head); letter-spacing: .26em; min-height: 12px; }
#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; left: calc(100% - 8px); bottom: 24px; 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; }
}

/* gang organisation dashboard (multiplayer) */
.hq-tabs { flex-wrap: wrap; }
.hq-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0; }
.hq-row small { color: var(--dim); }
.hq-row select, .hq-row input:not([type=checkbox]), .hq-rank input[type=text], .hq-rank input:not([type=checkbox]):not([type=number]) { background: #15161b; border: 1px solid var(--line); color: #ece9e2; border-radius: 6px; padding: 5px 8px; }
.hq-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; margin: 8px 0; font-size: 12px; color: #cfc9be; }
.hq-perms label { display: flex; gap: 6px; align-items: center; }
.hq-perms input:disabled + * , .hq-perms label:has(input:disabled) { opacity: .45; }

/* ------------------------------------------------------------------ the jukebox (audio/radio.js jukeboxPanel): a Wurlitzer — neon arch, a record under glass, title strips */
#jukebox { position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%); z-index: 30; pointer-events: auto; animation: jbUp .3s cubic-bezier(.2,.9,.3,1.15); font-family: Inter, system-ui, sans-serif; user-select: none; }
@keyframes jbUp { from { transform: translate(-50%, 40px); opacity: 0; } }
#jukebox .jb-arch { position: relative; width: 330px; padding: 18px 18px 16px; border-radius: 165px 165px 22px 22px;
  background: radial-gradient(120% 60% at 50% 0%, #3a1630, #170a18 55%, #0c0710); box-shadow: 0 30px 70px rgba(0,0,0,.75), inset 0 0 0 2px rgba(255,255,255,.06); }
#jukebox .jb-arch::before { content: ''; position: absolute; inset: -3px; border-radius: inherit; padding: 3px; pointer-events: none;
  background: linear-gradient(var(--jb-a, 0deg), #ff2a6d, #ffb000, #05d9e8, #b84dff, #ff2a6d); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; filter: drop-shadow(0 0 8px rgba(255,42,109,.6)); opacity: .55; }
#jukebox.on .jb-arch::before { opacity: 1; animation: jbGlow 4s linear infinite; }
@property --jb-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes jbGlow { to { --jb-a: 360deg; } }
#jukebox .jb-x { position: absolute; right: 36px; top: 70px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.4); color: #aaa; font-size: 11px; cursor: pointer; }
#jukebox .jb-x:hover { color: #fff; }
#jukebox .jb-crown { text-align: center; font: 700 13px/1 Oswald, sans-serif; letter-spacing: 6px; color: #ffd27a; text-shadow: 0 0 10px rgba(255,176,0,.7); margin: 10px 0 10px; }
#jukebox .jb-dome { width: 150px; height: 92px; margin: 0 auto; border-radius: 75px 75px 10px 10px; overflow: hidden; position: relative;
  background: radial-gradient(80% 70% at 50% 30%, rgba(255,255,255,.12), rgba(0,0,0,.6)); box-shadow: inset 0 0 0 2px rgba(255,210,122,.35), inset 0 -10px 20px rgba(0,0,0,.6); }
#jukebox .jb-disc { position: absolute; left: 50%; top: 28px; width: 112px; height: 112px; margin-left: -56px; border-radius: 50%;
  background: repeating-radial-gradient(circle, #0b0b0d 0 2px, #17171b 2px 4px); box-shadow: 0 0 0 1px #000, 0 6px 14px rgba(0,0,0,.6); }
#jukebox .jb-disc i { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: conic-gradient(#ff2a6d 0 25%, #ffb000 0 50%, #ff2a6d 0 75%, #ffb000 0); box-shadow: 0 0 0 2px #0b0b0d; }
#jukebox .jb-disc i::after { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #ddd; }
#jukebox.on .jb-disc { animation: jbSpin 1.8s linear infinite; }
@keyframes jbSpin { to { transform: rotate(360deg); } }
#jukebox .jb-lcd { margin: 12px 4px 10px; padding: 7px 10px; border-radius: 6px; background: #0a1a12; box-shadow: inset 0 0 10px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.06); text-align: center; min-height: 34px; }
#jukebox .jb-st { display: block; color: #7dffa8; font: 700 12px/1.2 'Share Tech Mono', monospace; letter-spacing: 1.5px; text-transform: uppercase; text-shadow: 0 0 6px rgba(125,255,168,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#jukebox .jb-np { display: block; color: #a6dcb8; font: 11px/1.3 'Share Tech Mono', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#jukebox:not(.on) .jb-lcd { background: #0d0d10; } #jukebox:not(.on) .jb-st { color: #777; text-shadow: none; }
#jukebox .jb-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 150px; overflow-y: auto; scrollbar-width: thin; padding: 2px 4px; }
#jukebox .jb-list button { display: flex; align-items: center; gap: 7px; padding: 6px 8px; border-radius: 4px; cursor: pointer; text-align: left; min-width: 0;
  background: linear-gradient(180deg, #f6ecd2, #e3d3ad); border: 0; box-shadow: inset 0 0 0 1px rgba(120,80,20,.35), 0 2px 0 rgba(0,0,0,.4); color: #3a2410; font: 600 11px Inter, sans-serif; }
#jukebox .jb-list button em { font: 700 10px Oswald, sans-serif; font-style: normal; color: #b0122d; flex: none; }
#jukebox .jb-list button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#jukebox .jb-list button:hover { filter: brightness(1.06); transform: translateY(-1px); }
#jukebox .jb-list button.on { background: linear-gradient(180deg, #ffe08a, #ffc23d); box-shadow: inset 0 0 0 1px rgba(160,90,0,.5), 0 0 12px rgba(255,194,61,.55); }
#jukebox .jb-none { grid-column: 1 / -1; text-align: center; color: #998; font-size: 12px; padding: 8px; }
#jukebox .jb-ctl { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
#jukebox .jb-ctl button { display: grid; place-items: center; width: 42px; height: 34px; border-radius: 17px; border: 0; cursor: pointer; color: #fff; font-size: 13px;
  background: linear-gradient(180deg, #ff4d78, #b0122d); box-shadow: 0 3px 0 #5a0717, inset 0 1px 0 rgba(255,255,255,.35); }
#jukebox .jb-ctl button:active { transform: translateY(2px); box-shadow: 0 1px 0 #5a0717; }
#jukebox .jb-ctl button[data-j=pow] { background: linear-gradient(180deg, #4a4f58, #24272d); box-shadow: 0 3px 0 #0e0f12, inset 0 1px 0 rgba(255,255,255,.2); }
#jukebox.on .jb-ctl button[data-j=pow] { background: linear-gradient(180deg, #4ade80, #15803d); box-shadow: 0 3px 0 #0a3d1c, 0 0 12px rgba(74,222,128,.5); }

/* ---- the ID card (game/fines.js, ui.js idCardHtml) ---- */
.idcard { margin: 4px 0 12px; border-radius: 14px; overflow: hidden; color: #1a2230; background: linear-gradient(135deg, #e9eef5 0%, #cfdbea 55%, #b9cbe0 100%); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); font-family: var(--f-body, sans-serif); }
.idcard .id-top { display: flex; justify-content: space-between; align-items: center; padding: 7px 12px; background: linear-gradient(90deg, #1b3a66, #2b5a94); color: #e9f1ff; }
.idcard .id-top b { font: 700 11px var(--f-head, sans-serif); letter-spacing: 2px; }
.idcard .id-top span { font-size: 10px; opacity: 0.8; letter-spacing: 1px; text-transform: uppercase; }
.idcard .id-body { display: flex; gap: 10px; padding: 10px 12px 6px; }
.idcard .id-face { position: static; display: block; width: 78px; height: 78px; border-radius: 8px; border: 2px solid rgba(27, 58, 102, 0.35); flex: none; }
.idcard .id-f { display: grid; grid-template-columns: 1fr; min-width: 0; }
.idcard .id-f small { font-size: 8.5px; color: #5a6a80; text-transform: uppercase; letter-spacing: 1px; line-height: 1.1; }
.idcard .id-f b { font-size: 12.5px; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.idcard .id-f i { font-style: normal; color: #5a6a80; font-weight: 400; }
.idcard .id-foot { display: flex; justify-content: space-between; gap: 8px; padding: 6px 12px 8px; font: 600 11px monospace; letter-spacing: 1.5px; color: #2b3b52; border-top: 1px dashed rgba(27, 58, 102, 0.25); }
.idcard .id-foot em { font: 10px var(--f-body, sans-serif); font-style: normal; color: #1b5a3a; text-align: right; }
#idpop { position: fixed; left: 50%; transform: translateX(-50%); top: 84px; z-index: 30; width: 300px; padding: 10px; border-radius: 18px; background: rgba(12, 13, 18, 0.85); border: 1px solid var(--line); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); cursor: pointer; animation: phoneUp .3s; }
#idpop .sub { color: var(--dim); font-size: 11px; margin: 2px 4px 8px; }

/* ---- banking (ui/bankui.js) ---- */
.bk-tier { display: inline-block; padding: 1px 8px; border-radius: 9px; font: 600 10px var(--f-head, sans-serif); letter-spacing: 1.5px; text-transform: uppercase; color: #0b0c10; background: var(--tc); box-shadow: 0 0 10px color-mix(in srgb, var(--tc) 50%, transparent); }
.bk-no { font-family: var(--f-mono, monospace); letter-spacing: 2px; margin: 2px 0 6px; }
.bk-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin: 8px 0 4px; }
.bk-bar i { display: block; height: 100%; background: linear-gradient(90deg, #7fb7a0, #f2c86b); }
.bk-dim { color: var(--dim); font-size: 12px; }
.bk-tabs { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.bk-tabs button { flex: 1; min-width: 70px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 6px; background: rgba(255,255,255,.04); color: var(--dim); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; }
.bk-tabs button.on { color: #9ff0b8; border-color: rgba(95,211,141,.45); background: rgba(95,211,141,.1); }
.bk-tabs.ph button { min-width: 0; font-size: 10px; padding: 6px 2px; }
.bk-form { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; }
.bk-form input { flex: 1; min-width: 90px; }
.bk-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.bk-row span small { display: block; color: var(--dim); font-size: 10.5px; }
.bk-row .pos { color: #9ff0b8; } .bk-row .neg, .neg { color: #ff6b7a; }
.atm { max-width: 620px; margin: 0 auto; border-radius: 18px; padding: 14px; background: linear-gradient(180deg, #2b3038, #15181d); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 20px 50px rgba(0,0,0,.5); }
.atm-head { display: flex; justify-content: space-between; font: 600 12px var(--f-head, sans-serif); letter-spacing: 3px; color: #c9d6e0; padding: 0 4px 10px; }
.atm-head span { color: #5fd38d; }
.atm-face { display: grid; grid-template-columns: 90px 1fr 90px; gap: 8px; align-items: stretch; }
.atm-side { display: flex; flex-direction: column; justify-content: space-around; gap: 6px; }
.atm-side button { min-height: 38px; border: 0; border-radius: 6px; background: linear-gradient(180deg, #4a515c, #343a43); color: #e6edf3; font-size: 11px; cursor: pointer; box-shadow: 0 2px 0 #1b1e23; }
.atm-side button:active { transform: translateY(1px); box-shadow: none; }
.atm-screen { min-height: 200px; border-radius: 8px; padding: 14px 16px; background: radial-gradient(120% 90% at 50% 0%, #0f3b3a, #061615); color: #bff5e6; border: 2px solid #0b0d10; box-shadow: inset 0 0 30px rgba(0,255,200,.12); font-family: var(--f-mono, monospace); text-shadow: 0 0 6px rgba(120,255,220,.35); }
.atm-screen h3 { margin: 0 0 8px; font: 600 18px var(--f-head, sans-serif); letter-spacing: 2px; color: #dfffee; }
.atm-screen .bk-dim { color: #6fb3a3; }
.atm-amt { font-size: 32px; margin: 10px 0; color: #fff; }
.atm-dots { display: flex; gap: 12px; margin: 18px 0; }
.atm-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #5fd8b8; }
.atm-dots i.on { background: #9ff8de; box-shadow: 0 0 10px #5fd8b8; }
.atm-stmt .bk-row { font-size: 11px; border-color: rgba(120,255,220,.12); }
.atm-stmt .bk-row span small { color: #5f9c8f; }
.atm-low { display: grid; grid-template-columns: 1fr 160px; gap: 14px; margin-top: 12px; }
.atm-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.atm-keys button { height: 42px; border: 0; border-radius: 6px; background: linear-gradient(180deg, #d9dde2, #aab0b8); color: #1b1e23; font: 700 16px var(--f-mono, monospace); cursor: pointer; box-shadow: 0 3px 0 #6b7078; }
.atm-keys button:active { transform: translateY(2px); box-shadow: 0 1px 0 #6b7078; }
.atm-keys .ok { background: linear-gradient(180deg, #5fd38d, #2f9a5c); color: #04210d; }
.atm-keys .clr { background: linear-gradient(180deg, #f2c86b, #c8952e); }
.atm-slots { display: flex; flex-direction: column; gap: 10px; }
.atm-slot { height: 46px; border-radius: 6px; background: #0b0d10; border: 1px solid #3a4049; display: flex; align-items: center; justify-content: center; color: #5a626d; font-size: 10px; letter-spacing: 3px; position: relative; overflow: hidden; }
.atm-slot .card-in { width: 64px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, #f2c86b, #c8102e); box-shadow: 0 0 8px rgba(242,200,107,.6); }
.atm-slot.cash { height: 56px; }
@media (max-width: 640px) { .atm-face { grid-template-columns: 70px 1fr 70px; } .atm-low { grid-template-columns: 1fr; } }

/* ---- the ATM up close (ui/atm3d.js) ---- */
#atm3d { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .25s; user-select: none; cursor: default; }
#atm3d.in { opacity: 1; } #atm3d.out { opacity: 0; }
#atm3d .a3-bg { position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 40%, rgba(40,60,80,.35), rgba(0,0,0,.92)); backdrop-filter: blur(6px) brightness(.55); }
#atm3d .a3-vign { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,.75) 100%); }
#atm3d .a3-hint { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.4); font: 11px var(--f-mono, monospace); letter-spacing: 1px; }
#atm3d .a3-cam { perspective: 1300px; perspective-origin: 50% 35%; }
#atm3d .a3-rig { transform-style: preserve-3d; }
#atm3d .a3-machine { position: relative; width: min(560px, 86vw); padding: 18px 22px 26px; border-radius: 22px 22px 10px 10px; transform-style: preserve-3d;
  background: linear-gradient(100deg, #3a4048 0%, #59616c 18%, #3f454e 40%, #2a2f36 70%, #464d57 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.18), inset 0 -3px 0 rgba(0,0,0,.4), 0 40px 80px rgba(0,0,0,.7), 0 0 0 2px #16191d; }
#atm3d .a3-machine::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 2px, transparent 2px 5px); }
#atm3d .a3-top { display: flex; align-items: center; gap: 10px; padding: 6px 10px 12px; color: #dfe7ef; font: 600 12px var(--f-head, sans-serif); letter-spacing: 3px; }
#atm3d .a3-logo { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, #e0182d, #7a0b16); color: #fff; font-size: 12px; box-shadow: 0 0 14px rgba(224,24,45,.6); }
#atm3d .a3-lens { margin-left: auto; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #6aa0ff, #0a1020 60%); box-shadow: 0 0 0 3px #111, 0 0 8px rgba(80,140,255,.5); }
#atm3d .a3-face { display: grid; grid-template-columns: 52px 1fr 52px; gap: 10px; align-items: stretch; }
#atm3d .a3-sides { display: grid; grid-template-rows: repeat(4, 1fr); gap: 10px; padding: 46px 0 10px; }
#atm3d .a3-side { border: 0; border-radius: 6px; cursor: pointer; background: linear-gradient(180deg, #c9ced5, #8f969f); box-shadow: 0 4px 0 #4b5058, 0 6px 10px rgba(0,0,0,.4); transform: translateZ(4px); transition: transform .06s, box-shadow .06s; }
#atm3d .a3-side i { display: block; width: 60%; height: 3px; margin: 0 auto; border-radius: 2px; background: #5a6068; }
#atm3d .a3-side.down, #atm3d .a3-key.down { transform: translateY(3px) translateZ(1px); box-shadow: 0 1px 0 #4b5058, 0 2px 4px rgba(0,0,0,.4); }
#atm3d .a3-bezel { padding: 12px; border-radius: 12px; background: linear-gradient(180deg, #101317, #22272e); box-shadow: inset 0 3px 8px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.12); }
#atm3d .a3-screen { position: relative; height: 250px; border-radius: 14px / 18px; overflow: hidden; background: radial-gradient(130% 100% at 50% 20%, #0f4a45 0%, #062421 55%, #020a09 100%); box-shadow: inset 0 0 40px rgba(0,0,0,.85), inset 0 0 90px rgba(40,255,200,.08); animation: a3flick 5s infinite steps(1); }
@keyframes a3flick { 0%, 100% { filter: brightness(1); } 47% { filter: brightness(1.06); } 48% { filter: brightness(.96); } 49% { filter: brightness(1.03); } }
#atm3d .a3-scan { position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
#atm3d .a3-scan::after { content: ""; position: absolute; left: 0; right: 0; height: 30%; background: linear-gradient(180deg, transparent, rgba(140,255,220,.06), transparent); animation: a3roll 6s linear infinite; }
@keyframes a3roll { from { top: -30%; } to { top: 110%; } }
#atm3d .a3-glare { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(125deg, rgba(255,255,255,.12) 0%, transparent 35%, transparent 70%, rgba(255,255,255,.04) 100%); }
#atm3d .a3-scr { position: absolute; inset: 0; padding: 12px 16px; color: #c4ffe9; font: 14px var(--f-mono, monospace); text-shadow: 0 0 6px rgba(120,255,220,.55), 0 0 14px rgba(120,255,220,.2); }
#atm3d .a3-st { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 2px; color: #6fc9b3; border-bottom: 1px solid rgba(120,255,220,.2); padding-bottom: 6px; }
#atm3d .a3-body { position: absolute; left: 0; right: 0; top: 38px; bottom: 8px; padding: 6px 110px; text-align: center; display: flex; flex-direction: column; align-items: center; }
#atm3d .a3-body h2 { margin: 18px 0 8px; font: 600 20px var(--f-head, sans-serif); letter-spacing: 3px; color: #e9fff6; text-transform: uppercase; }
#atm3d .a3-body p { margin: 4px 0; font-size: 12px; line-height: 1.5; }
#atm3d .dim { color: #6fb3a3; } #atm3d .bad { color: #ff8f8f; text-shadow: 0 0 8px rgba(255,80,80,.5); } #atm3d .pos { color: #a8ffcf; }
#atm3d .a3-amt { font-size: 34px; color: #fff; margin: 8px 0; letter-spacing: 1px; }
#atm3d .a3-dots { display: flex; gap: 14px; margin: 16px 0 10px; }
#atm3d .a3-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #5fd8b8; box-shadow: 0 0 6px rgba(95,216,184,.4); }
#atm3d .a3-dots i.on { background: #b8ffe8; box-shadow: 0 0 14px #5fd8b8; }
#atm3d .a3-load { width: 60%; height: 6px; border: 1px solid #5fd8b8; border-radius: 3px; margin: 18px 0 8px; overflow: hidden; }
#atm3d .a3-load i { display: block; height: 100%; width: 40%; background: #9ff8de; animation: a3load 1s ease-in-out infinite alternate; }
@keyframes a3load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
#atm3d .a3-arrow { margin-top: 10px; animation: a3bob .9s ease-in-out infinite alternate; color: #9ff8de; font-size: 18px; }
@keyframes a3bob { to { transform: translateY(6px); } }
#atm3d .a3-lab { position: absolute; top: calc(58px + var(--row) * 48px); font-size: 12px; letter-spacing: 1px; color: #dfffee; }
#atm3d .a3-lab.l { left: 6px; } #atm3d .a3-lab.r { right: 6px; text-align: right; }
#atm3d .a3-stmt { width: 100%; font-size: 11px; text-align: left; }
#atm3d .a3-stmt div { display: flex; justify-content: space-between; border-bottom: 1px dashed rgba(120,255,220,.15); padding: 3px 0; }
#atm3d .a3-tier { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--tc); color: #06110e; text-shadow: none; font-size: 10px; }
#atm3d .a3-mid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 6px 46px; }   /* (46px under it: the notes come out of the wide slot and hang there) */
#atm3d .a3-cardslot, #atm3d .a3-printer { position: relative; height: 46px; border-radius: 8px; background: linear-gradient(180deg, #23272d, #3a4049); box-shadow: inset 0 2px 4px rgba(0,0,0,.6); display: flex; align-items: center; padding: 0 12px; gap: 10px; }
#atm3d .a3-cardslot span, #atm3d .a3-printer span, #atm3d .a3-cashbox > span { font: 9px var(--f-mono, monospace); letter-spacing: 3px; color: #8a929c; }
#atm3d .a3-mouth { flex: 1; height: 8px; border-radius: 4px; background: #000; box-shadow: inset 0 2px 3px rgba(0,0,0,1), 0 1px 0 rgba(255,255,255,.12); }
#atm3d .a3-led { width: 8px; height: 8px; border-radius: 50%; background: #1f3a2a; }
#atm3d .a3-cardslot.reader { height: auto; flex-direction: column; justify-content: center; gap: 14px; padding: 10px; border-radius: 10px; box-shadow: inset 0 2px 6px rgba(0,0,0,.6); }
#atm3d .a3-cardslot.reader .a3-mouth { flex: none; width: 110px; height: 7px; }
#atm3d .a3-cardslot.want .a3-led { background: #5fff9a; box-shadow: 0 0 10px #5fff9a; animation: a3blink .8s infinite; }
@keyframes a3blink { 50% { opacity: .25; } }
#atm3d .a3-cardslot.want .a3-mouth { box-shadow: inset 0 2px 3px #000, 0 0 10px rgba(95,255,154,.45); }
#atm3d .a3-pmouth { flex: 1; height: 5px; border-radius: 3px; background: #000; }
#atm3d .a3-receipt { position: absolute; left: 50%; top: 26px; width: 170px; transform: translateX(-50%); height: 0; overflow: hidden; background: linear-gradient(180deg, #f4f1e6, #e8e3d2); color: #222; font: 10px/1.5 var(--f-mono, monospace); box-shadow: 0 8px 16px rgba(0,0,0,.4); border-radius: 0 0 3px 3px; z-index: 3; cursor: pointer; }
#atm3d .a3-receipt.print { animation: a3print 1s steps(14) forwards; padding: 6px 10px; }
@keyframes a3print { to { height: 150px; } }
#atm3d .a3-receipt.print div { opacity: 0; animation: a3line .1s forwards; animation-delay: var(--d); }
@keyframes a3line { to { opacity: 1; } }
#atm3d .a3-receipt.done:hover { transform: translateX(-50%) rotate(-2deg) translateY(4px); }
#atm3d .a3-receipt.gone { transition: transform .4s, opacity .4s; transform: translateX(-50%) translateY(120px) rotate(12deg); opacity: 0; }
#atm3d .a3-low { display: grid; grid-template-columns: 1fr 150px; gap: 18px; margin: 0 6px; }
#atm3d .a3-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 12px; border-radius: 10px; background: linear-gradient(180deg, #1d2126, #2c3138); box-shadow: inset 0 2px 6px rgba(0,0,0,.7); transform: rotateX(18deg); transform-origin: top; }
#atm3d .a3-key { height: 40px; border: 0; border-radius: 6px; cursor: pointer; font: 700 16px var(--f-mono, monospace); color: #1d2024; background: linear-gradient(180deg, #e9ecf0, #b4bac2); box-shadow: 0 4px 0 #6c727a, 0 6px 10px rgba(0,0,0,.45); transition: transform .06s, box-shadow .06s; }
#atm3d .a3-key:hover { filter: brightness(1.08); }
#atm3d .a3-key.fn { font-size: 9px; letter-spacing: 1px; color: #111; }
#atm3d .a3-key.cancel { background: linear-gradient(180deg, #ff5a5a, #b41818); color: #fff; }
#atm3d .a3-key.clear { background: linear-gradient(180deg, #ffd66b, #c98f12); }
#atm3d .a3-key.enter { background: linear-gradient(180deg, #6be89c, #1f9a52); }
#atm3d .a3-key.blank { background: linear-gradient(180deg, #3a4048, #2a2f36); box-shadow: 0 3px 0 #16191d; cursor: default; }
#atm3d .a3-cashbox { position: relative; border-radius: 10px; background: linear-gradient(180deg, #23272d, #3a4049); box-shadow: inset 0 2px 6px rgba(0,0,0,.6); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; }
#atm3d .a3-cmouth { position: relative; width: 120px; height: 14px; border-radius: 4px; background: #000; box-shadow: inset 0 3px 4px #000, 0 1px 0 rgba(255,255,255,.12); }
#atm3d .a3-cmouth.open { box-shadow: inset 0 3px 4px #000, 0 0 12px rgba(255,220,120,.35); }
#atm3d .a3-cled { width: 50px; height: 4px; border-radius: 2px; background: #3a2a10; }
#atm3d .a3-cashbox.wide { height: 46px; flex-direction: row; justify-content: flex-start; gap: 10px; padding: 0 12px; }
#atm3d .a3-cashbox.wide .a3-cmouth { flex: 1; width: auto; height: 14px; }
#atm3d .a3-cashbox.wide .a3-cled { width: 8px; height: 8px; border-radius: 50%; flex: none; }
#atm3d .a3-cmouth.open + .a3-cled { background: #ffb84d; box-shadow: 0 0 10px #ffb84d; animation: a3blink .6s infinite; }
#atm3d .a3-bills { position: absolute; left: 6px; right: 6px; top: 6px; height: 0; cursor: pointer; z-index: 4; }
#atm3d .a3-bill { position: absolute; left: 0; right: 0; top: 0; height: 52px; border-radius: 3px; transform-origin: top center; opacity: 0;
  background: linear-gradient(90deg, #6f8f5a, #a9c08a 30%, #92ad74 70%, #5f7f4c); border: 1px solid #3f5a32; box-shadow: 0 2px 4px rgba(0,0,0,.4);
  animation: a3bill .35s ease-out forwards; animation-delay: var(--d); }
#atm3d .a3-bill::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(40,60,30,.5); border-radius: 2px; }
#atm3d .a3-bill b { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; background: rgba(40,60,30,.35); color: #e8f2d9; display: grid; place-items: center; font: 700 12px sans-serif; }
@keyframes a3bill { from { opacity: 1; transform: translateY(-40px) rotate(0deg) scaleY(.2); } to { opacity: 1; transform: translateY(calc(var(--i) * 1.2px)) rotate(var(--r)) scaleY(1); } }
#atm3d .a3-bill u { position: absolute; left: 8px; top: 6px; text-decoration: none; font: 700 10px var(--f-mono, monospace); color: #1f3a17; }
#atm3d .a3-bill.vmid { background: linear-gradient(90deg, #5f8f50, #9fcb82 30%, #86b56b 70%, #52803f); border-color: #335a2a; }
#atm3d .a3-bill.vhi { background: linear-gradient(90deg, #4f7f48, #8dbb78 30%, #74a560 70%, #406f3a); border-color: #2d5a2c; }
#atm3d .a3-bills:hover .a3-bill { filter: brightness(1.1); }
#atm3d .a3-bills.fly { transition: transform .65s cubic-bezier(.5,-.3,.7,1), opacity .65s; transform: translate(var(--fx), var(--fy)) scale(.2) rotate(-20deg); opacity: 0; }
#atm3d .a3-shelf { height: 14px; margin: 18px -22px -26px; border-radius: 0 0 10px 10px; background: linear-gradient(180deg, #5b636e, #2a2f36); }
#atm3d .a3-hand { position: absolute; right: 7vw; bottom: 9vh; perspective: 600px; transition: opacity .3s; }
#atm3d .a3-hand.none, #atm3d .a3-hand.in, #atm3d .a3-hand.kept, #atm3d .a3-hand.pocket { opacity: 0; pointer-events: none; }
#atm3d .a3-card { width: 220px; height: 138px; border-radius: 12px; padding: 14px 16px; position: relative; cursor: pointer; color: #fff6dc;
  background: linear-gradient(135deg, #c8102e 0%, #6b0a18 45%, #2a0a10 100%); box-shadow: 0 20px 40px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.25); transform: rotateX(18deg) rotateZ(-8deg); transition: transform .65s cubic-bezier(.6,0,.4,1), opacity .65s; font-family: var(--f-mono, monospace); }
#atm3d .a3-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.18) 45%, transparent 60%); }
#atm3d .a3-card .chip { position: absolute; left: 18px; top: 38px; width: 34px; height: 26px; border-radius: 5px; background: linear-gradient(135deg, #f7d77a, #b8892a); box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
#atm3d .a3-card .nfc { position: absolute; left: 62px; top: 42px; width: 16px; height: 16px; border: 2px solid rgba(255,240,200,.5); border-left: 0; border-bottom: 0; border-radius: 0 16px 0 0; transform: rotate(45deg); }
#atm3d .a3-card b { position: absolute; left: 18px; bottom: 34px; font-size: 15px; letter-spacing: 2px; }
#atm3d .a3-card span { position: absolute; left: 18px; bottom: 14px; font-size: 10px; letter-spacing: 1.5px; opacity: .85; }
#atm3d .a3-card em { position: absolute; right: 14px; top: 12px; font: 600 8px var(--f-head, sans-serif); letter-spacing: 2px; font-style: normal; opacity: .8; }
#atm3d .a3-card.glow { animation: a3cardglow 1.6s ease-in-out infinite; }
@keyframes a3cardglow { 50% { box-shadow: 0 20px 40px rgba(0,0,0,.6), 0 0 26px rgba(242,200,107,.55); } }
#atm3d .a3-hand.going .a3-card { transform: translate(var(--cx, -28vw), var(--cy, -34vh)) rotateX(70deg) rotateZ(0deg) scale(.45); opacity: 0; }   /* --cx/--cy: measured to the CARD slot (atm3d.js atmAim) */
#atm3d .a3-hand.out .a3-card { animation: a3cardout .6s ease-out; }
@keyframes a3cardout { from { transform: translate(var(--cx, -28vw), var(--cy, -34vh)) rotateX(70deg) scale(.45); opacity: 0; } }
@media (max-width: 700px) { #atm3d .a3-body { padding: 6px 70px; } #atm3d .a3-low { grid-template-columns: 1fr; } #atm3d .a3-hand { right: 4vw; bottom: 4vh; transform: scale(.75); } }
#atm3d .a3-body .a3-foot { margin-top: auto; margin-bottom: 4px; letter-spacing: 2px; text-transform: uppercase; }
#atm3d .a3-cashbox, #atm3d .a3-printer { cursor: pointer; }
#atm3d-gone { position: fixed; inset: 0; z-index: 60; opacity: 0; transition: opacity .25s; pointer-events: none; }
#atm3d .a3-bill.feed { animation: a3feed .4s ease-in forwards; animation-delay: var(--d); opacity: 1; }
@keyframes a3feed { from { opacity: 1; transform: translateY(26px) rotate(var(--r)); } 70% { opacity: 1; } to { opacity: 0; transform: translateY(-30px) scaleY(.2); } }

/* ---- the vending machine up close (ui/vend3d.js) ---- */
#vend3d { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: 34px 0 var(--pb, 90px); opacity: 0; transition: opacity .25s; user-select: none; cursor: default; }
#vend3d.in { opacity: 1; } #vend3d.out { opacity: 0; }
#vend3d .v3-bg { position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 40%, rgba(70,40,44,.35), rgba(0,0,0,.92)); backdrop-filter: blur(6px) brightness(.55); }
#vend3d .v3-vign { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,.75) 100%); }
#vend3d .v3-hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); white-space: nowrap; max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis; color: rgba(255,255,255,.45); font: 11px var(--f-mono, monospace); letter-spacing: 1px; }
#vend3d .v3-cam { perspective: 1500px; perspective-origin: 50% 40%; }
#vend3d .v3-rig { transform-style: preserve-3d; will-change: transform; }
#vend3d .v3-fit { --s: 1; position: relative; width: calc(540px * var(--s)); height: calc(608px * var(--s)); flex: none; transform-style: preserve-3d; }
#vend3d .v3-machine { position: absolute; left: 0; top: 0; width: 540px; height: 596px; padding: 12px; box-sizing: border-box; transform: scale(var(--s)); transform-origin: 0 0; transform-style: preserve-3d;
  display: grid; grid-template-columns: 332px minmax(0, 1fr); grid-template-rows: 46px 516px; gap: 8px 10px; border-radius: 16px 16px 6px 6px;
  background: linear-gradient(100deg, #7d0e19 0%, #c4192a 22%, #94101d 46%, #660911 76%, #a3121f 100%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.28), inset 0 -4px 0 rgba(0,0,0,.4), 0 40px 80px rgba(0,0,0,.7), 0 0 0 2px #2a0509; }
#vend3d .v3-machine::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: repeating-linear-gradient(90deg, rgba(255,255,255,.03) 0 2px, transparent 2px 5px); }
#vend3d .v3-sign { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-radius: 9px; transform: translateZ(4px); min-width: 0;
  background: linear-gradient(180deg, #ffffff, #e3e8ee); color: #c3121f; box-shadow: inset 0 -5px 12px rgba(0,0,0,.2), 0 0 28px rgba(255,255,255,.3), 0 3px 8px rgba(0,0,0,.5); }
#vend3d .v3-sign b { font: 700 25px var(--f-head, sans-serif); letter-spacing: 5px; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
#vend3d .v3-sign span { color: #2a2f36; font: 600 11px var(--f-head, sans-serif); letter-spacing: 3px; text-transform: uppercase; }
#vend3d .v3-glasswrap { width: 332px; height: 516px; padding: 8px; border-radius: 9px; background: linear-gradient(180deg, #1c1f24, #0d0f12); transform: translateZ(3px); box-shadow: inset 0 2px 6px rgba(0,0,0,.9), 0 1px 0 rgba(255,255,255,.18); }
#vend3d .v3-glass { position: relative; width: 316px; height: 500px; overflow: hidden; border-radius: 3px; background: #07080a; box-shadow: inset 0 0 22px rgba(0,0,0,.8); }
#vend3d #v3-cv { position: absolute; inset: 0 auto auto 0; display: block; width: 316px; height: 500px; }   /* (the game's own canvas rule is position: fixed, full screen) */
#vend3d .v3-hots { position: absolute; left: 0; top: 0; width: 316px; height: 430px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(var(--n, 4), 1fr); }
#vend3d .v3-hot { appearance: none; border: 0; padding: 0; margin: 0; background: transparent; cursor: pointer; outline: none; border-radius: 4px; transition: background .12s; }
#vend3d .v3-hot:hover { background: rgba(120,225,255,.10); box-shadow: inset 0 0 0 1px rgba(120,225,255,.35); }
#vend3d .v3-refl { position: absolute; inset: 0; pointer-events: none; --rx: 50%;
  background: linear-gradient(108deg, transparent calc(var(--rx) - 24%), rgba(255,255,255,.08) calc(var(--rx) - 4%), rgba(255,255,255,.02) calc(var(--rx) + 8%), transparent calc(var(--rx) + 20%)), linear-gradient(180deg, rgba(255,255,255,.07), transparent 28%); }
#vend3d .v3-flap { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; transform-origin: 50% 0;
  background: linear-gradient(180deg, rgba(34,38,44,.5), rgba(8,10,12,.7)); border-top: 2px solid rgba(255,255,255,.22); box-shadow: inset 0 8px 16px rgba(255,255,255,.04);
  transition: transform .28s ease, opacity .28s ease; color: rgba(255,255,255,.55); font: 600 11px var(--f-head, sans-serif); letter-spacing: 4px; }
#vend3d .v3-flap i { width: 22px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.35); }
#vend3d .v3-flap.open { transform: perspective(260px) rotateX(-72deg); opacity: .35; }
#vend3d .v3-flap.glow { color: #9dffbe; border-top-color: rgba(120,255,170,.8); animation: v3glow 1s ease-in-out infinite alternate; }
#vend3d .v3-flap.tap { transform: translateY(2px); }
@keyframes v3glow { from { box-shadow: inset 0 0 0 rgba(90,255,150,0); } to { box-shadow: inset 0 -16px 26px rgba(90,255,150,.28); } }
#vend3d .v3-panel { display: flex; flex-direction: column; gap: 7px; padding: 8px; border-radius: 9px; transform: translateZ(4px); min-width: 0; overflow: hidden;
  background: linear-gradient(180deg, #2c3037, #1b1e23); box-shadow: inset 0 2px 5px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.14); }
#vend3d .v3-info { height: 58px; flex: none; padding: 4px 7px; line-height: 1.25; border-radius: 5px; background: #0b1216; border: 1px solid #22303a; display: flex; flex-direction: column; justify-content: center; gap: 1px; font: 10px var(--f-mono, monospace); color: #9fd6e8; overflow: hidden; }
#vend3d .v3-info em { text-align: center; color: #5d7886; font-style: normal; letter-spacing: 1px; }
#vend3d .v3-info b { color: #fff; font: 600 12px/1.25 var(--f-head, sans-serif); letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vend3d .v3-info span { color: #8fb7c8; white-space: nowrap; }
#vend3d .v3-info u { text-decoration: none; color: var(--gold, #f2c86b); font-weight: 700; } #vend3d .v3-info u.bad { color: #ff6a6a; } #vend3d .v3-info u small { color: #6d8795; font-size: 9px; margin-left: 4px; }
#vend3d .v3-lcdwrap { padding: 4px; border-radius: 6px; background: #08090b; box-shadow: inset 0 1px 4px #000, 0 1px 0 rgba(255,255,255,.1); }
#vend3d .v3-lcd { height: 46px; padding: 6px 7px; border-radius: 3px; background: linear-gradient(180deg, #06150f, #03100a); font: 11px var(--f-mono, monospace); color: #5cff9a; text-shadow: 0 0 6px rgba(80,255,150,.6); letter-spacing: 1px; overflow: hidden; box-shadow: inset 0 0 14px rgba(0,0,0,.8); }
#vend3d .v3-lcd .l1 { font-weight: 700; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: clip; } #vend3d .v3-lcd .l2 { margin-top: 5px; opacity: .8; white-space: nowrap; }
#vend3d .v3-lcd.bad .l1 { color: #ff5a5a; text-shadow: 0 0 8px rgba(255,70,70,.7); } #vend3d .v3-lcd.good .l1 { color: #b6ffcb; } #vend3d .v3-lcd.dim .l2 { color: #ffd66b; text-shadow: 0 0 6px rgba(255,200,80,.5); }
#vend3d .v3-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
#vend3d .v3-key { appearance: none; border: 0; height: 28px; border-radius: 5px; cursor: pointer; font: 700 13px var(--f-mono, monospace); color: #1b1f25; transform: translateZ(1px);
  background: linear-gradient(180deg, #d4d9df, #959ca6); box-shadow: 0 3px 0 #4b5058, 0 4px 6px rgba(0,0,0,.4); transition: transform .06s, box-shadow .06s; }
#vend3d .v3-key.fn { font-size: 11px; color: #fff; background: linear-gradient(180deg, #5b626c, #3a3f47); }
#vend3d .v3-key[data-k="C"] { background: linear-gradient(180deg, #d9534f, #8e1f1b); } #vend3d .v3-key[data-k="OK"] { background: linear-gradient(180deg, #4cc47a, #1c7c43); }
#vend3d .v3-key.down { transform: translateY(3px) translateZ(1px); box-shadow: 0 0 0 #4b5058, 0 1px 3px rgba(0,0,0,.4); }
#vend3d .v3-pay { display: grid; grid-template-columns: 1fr 34px; grid-template-areas: "coin ret" "note note" "nfc nfc" "cup cup"; gap: 6px; flex: 1; min-height: 0; }
#vend3d .v3-coin, #vend3d .v3-note, #vend3d .v3-nfc, #vend3d .v3-cup { position: relative; border-radius: 6px; background: #14171b; box-shadow: inset 0 2px 5px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.1); }
#vend3d .v3-coin { grid-area: coin; height: 46px; } #vend3d .v3-note { grid-area: note; height: 38px; } #vend3d .v3-nfc { grid-area: nfc; height: 40px; display: grid; place-items: center; color: #6fb6e8; cursor: pointer; }
#vend3d .v3-coin span, #vend3d .v3-note span { position: absolute; left: 7px; top: 4px; font: 600 8px var(--f-head, sans-serif); letter-spacing: 2px; color: #7c8591; }
#vend3d .v3-coin .mouth { position: absolute; right: 14px; top: 7px; width: 7px; height: 32px; border-radius: 4px; background: #000; box-shadow: 0 0 0 2px #b0883a, 0 0 0 3px #3a2a0c; }
#vend3d .v3-note .mouth { position: absolute; left: 14px; right: 14px; bottom: 9px; height: 7px; border-radius: 4px; background: #000; box-shadow: 0 0 0 2px #7d8590, 0 0 0 3px #2a2f36; }
#vend3d .v3-coin.blink .mouth { animation: v3mouth .5s; } @keyframes v3mouth { 0%, 100% { box-shadow: 0 0 0 2px #b0883a, 0 0 0 3px #3a2a0c; } 30% { box-shadow: 0 0 0 2px #ffe08a, 0 0 12px 3px rgba(255,210,100,.8); } }
#vend3d .led { position: absolute; right: 8px; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #1f3a26; } #vend3d .led.blink { animation: v3led .6s; }
@keyframes v3led { 0%, 100% { background: #1f3a26; box-shadow: none; } 25% { background: #4dff88; box-shadow: 0 0 8px 2px rgba(80,255,140,.9); } }
#vend3d .v3-ret { grid-area: ret; appearance: none; border: 0; width: 34px; height: 46px; border-radius: 6px; cursor: pointer; background: linear-gradient(180deg, #c9ced5, #8f969f); box-shadow: 0 3px 0 #4b5058, 0 4px 6px rgba(0,0,0,.4); display: grid; place-items: center; }
#vend3d .v3-ret:active { transform: translateY(3px); box-shadow: 0 0 0 #4b5058; }
#vend3d .v3-ret i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #4b5058; position: relative; } #vend3d .v3-ret i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 2px; margin: -1px 0 0 -3px; background: #4b5058; }
#vend3d .v3-nfc svg { width: 28px; height: 28px; } #vend3d .v3-nfc.blink { animation: v3nfc .6s; } @keyframes v3nfc { 30% { color: #9dffbe; box-shadow: inset 0 0 14px rgba(90,255,150,.5); } }
#vend3d .v3-cup { grid-area: cup; min-height: 54px; overflow: hidden; } #vend3d .v3-cup.has { cursor: pointer; box-shadow: inset 0 2px 5px rgba(0,0,0,.8), 0 0 0 1px rgba(242,200,107,.5); }
#vend3d .v3-cup i { position: absolute; left: var(--x); bottom: calc(5px + var(--i) * 1.4px); width: 14px; height: 14px; border-radius: 50%; transform: rotate(var(--r));
  background: radial-gradient(circle at 35% 30%, #fff1b8, #d9a930 55%, #7a5a10); box-shadow: 0 1px 2px rgba(0,0,0,.7); animation: v3drop .4s cubic-bezier(.3,0,.6,1) both; animation-delay: calc(var(--i) * 70ms); }
@keyframes v3drop { from { transform: translateY(-40px) rotate(var(--r)); opacity: 0; } to { transform: translateY(0) rotate(var(--r)); opacity: 1; } }
#vend3d .v3-plinth { position: absolute; left: 24px; right: 24px; bottom: -12px; height: 12px; display: flex; justify-content: space-between; } #vend3d .v3-plinth i { width: 40px; height: 12px; border-radius: 0 0 6px 6px; background: linear-gradient(180deg, #2a2e34, #0c0d10); }
#vend3d .v3-plinth i:nth-child(n+3):nth-child(-n+4) { visibility: hidden; }
/* the wallet under the machine: your cash as coins and notes to click, and the card */
#vend3d .v3-wallet { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; max-width: calc(100vw - 16px); box-sizing: border-box; padding: 8px 14px; border-radius: 14px; background: rgba(12,13,18,.84); border: 1px solid var(--line, rgba(255,255,255,.09)); box-shadow: 0 10px 30px rgba(0,0,0,.6); }
#vend3d .v3-cash { display: flex; flex-direction: column; align-items: flex-end; margin-right: 6px; } #vend3d .v3-cash small { color: var(--dim, #9a958c); font: 9px var(--f-head, sans-serif); letter-spacing: 2px; text-transform: uppercase; } #vend3d .v3-cash b { color: var(--gold, #f2c86b); font: 700 17px var(--f-mono, monospace); }
.v3-chip, .v3-fly.coin, .v3-fly.note { font: 700 13px var(--f-mono, monospace); }
.v3-chip { appearance: none; border: 0; cursor: pointer; display: grid; place-items: center; transition: transform .1s, filter .15s; color: #2a1c02; }
.v3-chip:hover:not(:disabled) { transform: translateY(-3px) rotate(-3deg); filter: brightness(1.12); } .v3-chip:disabled { opacity: .3; cursor: default; }
.v3-chip.coin, .v3-fly.coin { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff1b8, #e0b13a 55%, #8a6410); box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 0 0 3px rgba(122,90,16,.55); }
.v3-chip.coin.c2 { background: radial-gradient(circle at 35% 30%, #ffffff, #c4cad2 55%, #6c737d); color: #20242a; width: 44px; height: 44px; }
.v3-chip.note, .v3-fly.note { width: 62px; height: 32px; border-radius: 4px; color: #05230f; background: linear-gradient(135deg, #bfe9c9, #6fbf86); box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 0 0 2px rgba(20,90,45,.5); }
.v3-chip.note.n10 { background: linear-gradient(135deg, #b9e0e8, #5fa8bd); color: #062630; } .v3-chip.note.n20 { background: linear-gradient(135deg, #e6d9b0, #b99b4a); color: #2e2204; }
.v3-chip.card { width: 62px; height: 40px; border-radius: 6px; color: #cfe6ff; font: 700 9px var(--f-head, sans-serif); letter-spacing: 2px; background: linear-gradient(135deg, #2b3b57, #121a2a); box-shadow: 0 2px 4px rgba(0,0,0,.6), inset 0 0 0 1px rgba(150,190,255,.3); grid-template-rows: auto auto; gap: 2px; padding-top: 4px; }
.v3-chip.card i { width: 14px; height: 10px; border-radius: 2px; background: linear-gradient(135deg, #f4d58a, #b8902f); }
.v3-fly { position: fixed; z-index: 80; pointer-events: none; display: grid; place-items: center; color: #2a1c02; transform: translate(-50%, -50%); }
.v3-fly.item { display: block; height: auto; image-rendering: auto; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
@media (prefers-reduced-motion: reduce) { #vend3d .v3-flap, #vend3d .v3-hot { transition: none; } #vend3d .v3-flap.glow { animation: none; } }

/* gun shop › Skins (js/ui/skinshop.js) */
.skin-guns { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.skin-stage { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; cursor: crosshair; background: radial-gradient(ellipse at 50% 35%, #26262b 0%, #141417 60%, #0a0a0c 100%); }
.skin-stage canvas { position: static; display: block; width: 100%; height: auto; }
.skin-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.skin-card { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 5px; padding: 4px 5px 6px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.skin-card:hover { border-color: #5a5348; }
.skin-card.on { border-color: #d4a63a; box-shadow: 0 0 0 1px #d4a63a inset; }
.skin-card canvas { position: static; display: block; width: 100%; height: auto; aspect-ratio: 3 / 1; }
.skin-card b { display: block; margin-top: 2px; font: 500 12px Oswald, sans-serif; letter-spacing: .04em; text-transform: uppercase; }
.skin-card small { color: #d4a63a; font-size: 11px; }

/* fighting styles (ui/stylewheel.js): the wheel on [Y], the lesson on the screen */
#stylewheel { position: fixed; left: 50%; top: 50%; width: 0; height: 0; z-index: 60; pointer-events: none; opacity: 0; transition: opacity .12s; }
#stylewheel.on { opacity: 1; }
#stylewheel .sw-c { position: absolute; left: -62px; top: -62px; width: 124px; height: 124px; border-radius: 50%; background: radial-gradient(circle, rgba(12,13,18,.82), rgba(12,13,18,.4) 70%, transparent 72%); display: flex; flex-direction: column; align-items: center; justify-content: center; font: 700 10px/1.4 var(--mono, monospace); letter-spacing: .2em; color: #8a909a; }
#stylewheel .sw-c span { color: #fff; font-size: 12px; letter-spacing: .06em; }
#stylewheel .sw-o { position: absolute; left: -64px; top: -26px; width: 128px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--glass); border: 1px solid var(--line); border-bottom: 3px solid var(--c); border-radius: 6px; backdrop-filter: blur(8px); transition: transform .1s, background .1s; }
#stylewheel .sw-o b { font: 700 13px/1.2 var(--mono, monospace); color: #e8ebef; }
#stylewheel .sw-o small { font: 11px/1.2 var(--mono, monospace); color: var(--c); letter-spacing: .1em; }
#stylewheel .sw-o.cur { box-shadow: 0 0 0 1px var(--c) inset; }
#stylewheel .sw-o.hot { background: rgba(30,32,40,.95); box-shadow: 0 0 18px -4px var(--c), 0 0 0 1px var(--c) inset; }
#stylewheel .sw-o.hot b { color: #fff; }
#lessonhud { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); min-width: 300px; max-width: 460px; text-align: center; background: var(--glass); border: 1px solid var(--line); padding: 10px 16px 12px; border-radius: 6px; backdrop-filter: blur(8px); pointer-events: none; }
#lessonhud .ls-h { font: 700 11px/1 var(--mono, monospace); letter-spacing: .2em; }
#lessonhud .ls-c { font: 700 30px/1.25 var(--mono, monospace); color: #cfd3d9; margin-top: 6px; transition: color .1s; }
#lessonhud .ls-c.go { color: #fff; text-shadow: 0 0 14px rgba(255,255,255,.35); }
#lessonhud .ls-s { font: 13px/1.3 var(--mono, monospace); color: #cfd3d9; margin-top: 6px; }
#lessonhud .ls-k { font: 12px/1.3 var(--mono, monospace); color: #9aa3ad; margin-top: 2px; }
#lessonhud .ls-bar { height: 4px; background: rgba(255,255,255,.08); margin-top: 8px; border-radius: 2px; overflow: hidden; }
#lessonhud .ls-bar i { display: block; height: 100%; transition: width .1s linear; }
#lessonhud .ls-d { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
#lessonhud .ls-d i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.12); }
#lessonhud .ls-d i.now { background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.6); }
#lessonhud .ls-d i.ok { background: #3dce6b; } #lessonhud .ls-d i.half { background: #f2c86b; } #lessonhud .ls-d i.no { background: #e0182d; }

/* ---------- inventory 2.0 + hotbar with the shaded weapons and their finishes (ui/weaponart.js, menus.js inventory) ---------- */
.pn-box.inv-box { width: min(1180px, 96vw); max-height: 92vh; }
.inv-box .inv2 { grid-template-columns: 1fr 340px; gap: 18px; }
.inv-box .sec { display: flex; align-items: baseline; gap: 8px; font: 600 12px var(--f-head); letter-spacing: 2.5px; text-transform: uppercase; color: #ece9e2; margin-bottom: 8px; }
.inv-box .sec small { font: 500 10px var(--f-body); letter-spacing: .5px; text-transform: none; color: var(--dim); }
.inv-empty { color: #777; font-size: 12px; margin: 4px 0 8px; }
img.wa { object-fit: contain; pointer-events: none; transition: opacity .25s, filter .25s; }
img.wa:not(.wa-on) { opacity: .55; filter: grayscale(1) brightness(1.4); }
/* weapon cards */
.wtiles { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.tile.wt { --tint: rgba(255,255,255,.14); height: 112px; display: block; padding: 0; overflow: hidden; border-radius: 9px;
  background: radial-gradient(120% 90% at 50% 38%, rgba(255,255,255,.075), rgba(255,255,255,.015) 62%), linear-gradient(180deg, rgba(22,24,30,.95), rgba(10,11,15,.95));
  border: 1px solid rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.tile.wt::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--tint); opacity: .55; }
.tile.wt.sk { border-color: color-mix(in srgb, var(--tint) 35%, transparent); background: radial-gradient(120% 90% at 50% 38%, color-mix(in srgb, var(--tint) 16%, transparent), rgba(255,255,255,.015) 64%), linear-gradient(180deg, rgba(22,24,30,.95), rgba(10,11,15,.95)); }
.tile.wt.sk::after { opacity: 1; box-shadow: 0 0 10px var(--tint); }
.tile.wt:hover { transform: translateY(-2px); border-color: rgba(236,233,226,.35); box-shadow: 0 8px 22px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.06); }
.tile.wt.sel { border-color: #e0182d; box-shadow: 0 0 0 1px rgba(224,24,45,.5) inset, 0 0 18px rgba(224,24,45,.18); }
.tile.wt.cur .wt-nm::before { content: '\25CF'; color: #e0182d; margin-right: 5px; font-size: 8px; vertical-align: 2px; }
.wt-art { position: absolute; left: 8px; right: 8px; top: 18px; height: 56px; display: grid; place-items: center; }
.tile.wt .wt-art img { width: 100%; height: 56px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.55)); transition: transform .15s; }
.tile.wt:hover .wt-art img { transform: scale(1.05); }
.wt-nm { position: absolute; left: 9px; right: 9px; bottom: 9px; font: 600 11px var(--f-head); letter-spacing: 1px; text-transform: uppercase; color: #e8e4da; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-nm em { display: block; font: 500 9px var(--f-body); letter-spacing: .4px; text-transform: none; font-style: normal; color: var(--tint); margin-top: 1px; }
.tile.wt b { top: 6px; right: 8px; font: 600 13px var(--f-head); color: #ece9e2; } .tile.wt b small { position: static; font-size: 9px; color: var(--dim); margin-left: 1px; }
.tile.wt u { top: 6px; left: 8px; }
.wt-tag { position: absolute; top: 7px; left: 30px; font: 700 8px var(--f-head); letter-spacing: 1px; font-style: normal; color: #9fd0ff; border: 1px solid rgba(159,208,255,.4); border-radius: 3px; padding: 0 3px; }
.wt-mag { position: absolute; right: 8px; top: 25px; width: 46px; height: 3px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.wt-mag i { display: block; height: 100%; background: linear-gradient(90deg, #f2c86b, #ffe2a3); }
.wt-mag.empty { background: rgba(224,24,45,.35); }
/* item tiles */
.itiles { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.tile.it { height: 84px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); }
.tile.it img { width: 62px; height: 28px; margin-top: -12px; }
.tile.it .emo { margin-top: -12px; }
.tile.it.hot { border-color: rgba(224,24,45,.35); }
.inv-wt { margin-left: auto; position: relative; width: 150px; height: 14px; border-radius: 7px; background: rgba(255,255,255,.06); overflow: hidden; align-self: center; }
.inv-wt i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(95,211,141,.45), rgba(95,211,141,.7)); }
.inv-wt.warn i { background: linear-gradient(90deg, rgba(242,200,107,.45), rgba(242,200,107,.75)); } .inv-wt.bad i { background: linear-gradient(90deg, rgba(224,24,45,.5), rgba(224,24,45,.8)); }
.inv-wt em { position: relative; display: block; text-align: center; font: 600 9px var(--f-head); letter-spacing: 1px; font-style: normal; color: #ece9e2; line-height: 14px; }
.inv-box .ammo span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 6px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.inv-box .ammo span i { width: 4px; height: 12px; border-radius: 1px; background: linear-gradient(180deg, #f6d68d, #b07d2a); box-shadow: 5px 0 0 #d9ad5b, 10px 0 0 #c59741; margin-right: 10px; }
/* details */
#inv-det.det { padding: 12px 14px 14px; min-height: 120px; margin-bottom: 14px; }
#inv-det .det-none { color: #777; font-size: 12px; }
.det-stage { --tint: rgba(255,255,255,.2); position: relative; margin: -4px -6px 6px; border-radius: 8px; overflow: hidden; cursor: crosshair;
  background: radial-gradient(80% 70% at 50% 35%, color-mix(in srgb, var(--tint) 14%, #22252c), #0b0c10 80%); }
.det-stage canvas { position: static; display: block; width: 100%; height: auto; inset: auto; }
#inv-det .det-h { display: grid; place-items: center; height: 70px; } #inv-det .det-h img { width: 150px; height: 60px; } #inv-det .det-h.big .emo { font-size: 44px; }
#inv-det h4.det-nm { margin: 2px 0 2px; font: 600 17px var(--f-head); letter-spacing: 1.5px; text-transform: uppercase; }
#inv-det h4.det-nm em { display: block; font: 500 11px var(--f-body); letter-spacing: .3px; text-transform: none; font-style: normal; color: var(--dim); }
#inv-det .det-sub { color: #aaa; font-size: 12px; margin: 4px 0 8px; }
#inv-det .det-hint { color: #777; font-size: 11px; margin: 6px 0 0; }
.det-bars { display: grid; gap: 5px; margin: 8px 0 10px; }
.det-bars > div { display: grid; grid-template-columns: 74px 1fr 52px; align-items: center; gap: 8px; font-size: 11px; color: #aaa; }
.det-bars > div > i { height: 5px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.det-bars > div > i > i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #b3121f, #ff3b4e); box-shadow: 0 0 8px rgba(255,59,78,.4); }
.det-bars b { text-align: right; font: 600 11px var(--f-head); color: #ece9e2; }
.det-skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 5px; margin-top: 4px; }
.det-skins button { --tint: #8a8f99; position: relative; height: 44px; padding: 2px 2px 12px; border-radius: 6px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); cursor: pointer; }
.det-skins button img { width: 100%; height: 26px; }
.det-skins button small { position: absolute; left: 2px; right: 2px; bottom: 1px; font-size: 8px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.det-skins button:hover { border-color: color-mix(in srgb, var(--tint) 60%, transparent); }
.det-skins button.on { border-color: var(--tint); box-shadow: 0 0 10px color-mix(in srgb, var(--tint) 40%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--tint) 35%, transparent); }
.det-skins button.on small { color: var(--tint); }
.inv-st { display: grid; gap: 6px; }
.sbar { display: grid; grid-template-columns: 70px 1fr 60px; align-items: center; gap: 8px; font-size: 11px; color: #aaa; }
.sbar i { height: 5px; border-radius: 3px; background: linear-gradient(90deg, var(--c) var(--v), rgba(255,255,255,.07) var(--v)); }
.sbar b { text-align: right; font: 600 11px var(--f-head); color: #ece9e2; }
/* the hotbar in the inventory */
.inv-box .inv-hb .hb { height: 70px; background: linear-gradient(180deg, rgba(22,24,30,.9), rgba(8,9,12,.9)); }
.inv-box .inv-hb .hb img { width: 86%; height: 34px; }
.hb.hw.sk { border-color: color-mix(in srgb, var(--tint) 45%, transparent); }
.hb.hw.sk::after { content: ''; position: absolute; left: 6px; right: 6px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--tint); box-shadow: 0 0 6px var(--tint); }
.hb.on { border-color: #e0182d; background: linear-gradient(180deg, rgba(224,24,45,.22), rgba(224,24,45,.06)); box-shadow: 0 0 14px rgba(224,24,45,.25), inset 0 0 0 1px rgba(224,24,45,.35); }
.drag-ghost img.wa { width: 120px; height: 46px; }
/* the HUD: slots with the pictures, the weapon box with a large one */
#weapon { width: 340px; }
#w-slots { gap: 4px; margin-bottom: 5px; }
#w-slots .hb { height: 34px; border-radius: 6px; background: linear-gradient(180deg, rgba(18,20,26,.78), rgba(6,7,10,.78)); border-color: rgba(255,255,255,.1); backdrop-filter: blur(6px); transition: transform .12s, border-color .12s; }
#w-slots .hb img { width: 90%; height: 20px; }
#w-slots .hb.on { transform: translateY(-3px); }
#w-slots .hb span { top: 1px; left: 3px; font-size: 8px; }
#w-main { grid-template-columns: 92px 1fr auto; min-height: 44px; padding: 5px 12px 5px 8px; background: linear-gradient(100deg, rgba(10,11,16,.82), rgba(18,20,27,.72)); border-radius: 6px; border-left: 2px solid #e0182d; }
#w-icon { width: 92px; height: 34px; filter: drop-shadow(0 3px 5px rgba(0,0,0,.6)); }
#w-icon.wa-on { filter: drop-shadow(0 3px 5px rgba(0,0,0,.6)) drop-shadow(0 0 6px var(--tint, transparent)); }
#w-name small { display: block; font: 500 9px var(--f-body); letter-spacing: .3px; text-transform: none; color: var(--tint, var(--dim)); }
@media (max-width: 900px) { .inv-box .inv2 { grid-template-columns: 1fr; } }

/* ---------- on duty in singleplayer: the dispatch / emergency card (ui/dutyhud.js) ---------- */
#dutyhud { position: absolute; top: 92px; right: 22px; width: 290px; background: linear-gradient(160deg, rgba(10,14,26,.9), rgba(12,13,18,.82)); border: 1px solid var(--line); border-left: 3px solid #3d8df5; border-radius: 6px; padding: 9px 12px 10px; backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0,0,0,.45); pointer-events: none; transition: border-color .2s; }
#dutyhud.medic { border-left-color: #e8452c; background: linear-gradient(160deg, rgba(26,10,10,.9), rgba(12,13,18,.82)); }
#dutyhud.hot { animation: dhPulse 1.4s infinite; }
#dutyhud.cop.hot { border-left-color: #ff3b4e; }
@keyframes dhPulse { 0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,.45); } 50% { box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 1px rgba(255,59,78,.35), 0 0 22px rgba(255,59,78,.25); } }
#dutyhud .dh-h { display: flex; justify-content: space-between; align-items: center; font: 700 10px var(--f-head); letter-spacing: 2.5px; color: #7fb2ff; }
#dutyhud.medic .dh-h { color: #ff8a70; }
#dutyhud .dh-h b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: #3d8df5; box-shadow: 10px 0 0 #e0182d; animation: dhSiren .6s steps(2) infinite; }
#dutyhud.medic .dh-h b::before { background: #e8452c; box-shadow: 10px 0 0 #f2f2f2; }
@keyframes dhSiren { 50% { opacity: .35; } }
#dutyhud .dh-h b { font-weight: 700; padding-right: 10px; }
#dutyhud .dh-h span { font: 600 10px var(--f-head); letter-spacing: 1px; color: var(--gold); }
#dutyhud .dh-t { font: 600 17px var(--f-head); letter-spacing: 1px; text-transform: uppercase; color: #f2efe8; margin-top: 4px; }
#dutyhud .dh-s { font-size: 11px; color: #b9b4aa; margin-top: 2px; line-height: 1.35; }
#dutyhud .dh-k { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11.5px; color: #ece9e2; margin-top: 7px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.07); line-height: 1.35; }
#dutyhud.hot .dh-k { color: #ffd0d4; }
#dutyhud .dh-to { flex: none; font: 600 13px var(--f-head); color: #fff; white-space: nowrap; }
#dutyhud .dh-to i { display: inline-block; font-style: normal; margin-right: 5px; color: #7fb2ff; }
#dutyhud.medic .dh-to i { color: #ff8a70; }
#dutyhud .dh-bar { position: relative; height: 14px; margin-top: 6px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
#dutyhud .dh-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #8f0f1c, #e0182d); }
#dutyhud .dh-bar em { position: relative; display: block; text-align: center; font: 600 9px/14px var(--f-head); letter-spacing: 1px; font-style: normal; color: #fff; }
