/* HUMANS 2.0 — one screen, no page scroll. Teenage Engineering x Apple: dark glass, mono numerals, one orange accent. */
:root { --bg: #0b0b0d; --card: rgba(14, 14, 16, .80); --line: rgba(255, 255, 255, .13); --ink: #f2f2f0; --sub: #9a9a96; --acc: #ff6a00; --ok: #48e070;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px); --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
  --u: clamp(9px, 1.55vh + .25vw, 13px); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 500 var(--u)/1.25 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', Inter, system-ui, sans-serif;
  -webkit-user-select: none; user-select: none; touch-action: none; overscroll-behavior: none; position: fixed; inset: 0; }
#cv_unused { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); image-rendering: pixelated; image-rendering: crisp-edges; touch-action: none; display: block; }
b, .mono, #hCash, #hStars, #tag, .tabs, .wallet, #hW, #hAmmo, #hClock, #hLv, #mTitle { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
button { font: inherit; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 600; letter-spacing: .04em; color: var(--ink); background: #1c1c20; border: 1px solid var(--line); border-radius: 8px;
  padding: .55em .9em; touch-action: manipulation; cursor: pointer; min-height: 32px; }
button.primary { background: var(--acc); border-color: var(--acc); color: #111; }
button.ghost { background: transparent; }
button.small { padding: .35em .7em; min-height: 28px; font-size: .9em; }
button:disabled { opacity: .38; }
button.focus { outline: 2px solid #fff; outline-offset: 1px; }
button.kiss { border-color: #ff3ea5; }
[hidden] { display: none !important; }
#fade { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 30; }
#fade.on { opacity: 1; }
/* title */
#title { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 20; background: linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55)); }
.tcard { text-align: center; padding: 2.2em 2.6em; background: var(--card); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); max-width: 92vw; }
.tlogo { font: 800 clamp(30px, 9vh, 64px)/1 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .06em; }
.tlogo i { font-style: normal; color: var(--acc); }
.tsub { color: var(--sub); letter-spacing: .3em; margin: .5em 0 1.3em; font-family: ui-monospace, Menlo, monospace; }
.trow { display: flex; gap: .7em; justify-content: center; }
.tnote, .tkeys { margin-top: 1.1em; color: var(--sub); font-size: .85em; letter-spacing: .08em; font-family: ui-monospace, Menlo, monospace; }
.tkeys span { color: var(--ink); }
/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.card { position: absolute; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .5em .7em; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.tl { left: calc(8px + var(--sal)); top: calc(6px + var(--sat)); width: clamp(168px, 24vw, 250px); }
.tl .r1 { display: flex; justify-content: space-between; align-items: baseline; gap: .5em; }
#hCash { font-size: 1.35em; color: #fff; }
#hStars { color: #55555a; letter-spacing: .05em; }
#hStars.hot { color: #ffd23a; animation: blink .5s steps(2) infinite; }
@keyframes blink { 50% { color: #ff4040; } }
.bars { display: grid; gap: 3px; margin: .35em 0; }
.bar { height: 5px; background: #2a2a2e; border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 100%; background: var(--ok); }
.bar.ar i { background: #3a8aff; }
.r2 { color: var(--sub); font-size: .82em; white-space: normal; overflow: visible; letter-spacing: .02em; line-height: 1.3; }
#hClock, #hArea { word-break: break-word; }
#hArea { font-size: .78em; }
.tc { left: 50%; transform: translateX(-50%); top: calc(6px + var(--sat)); max-width: min(calc(100vw - 2 * (clamp(160px, 23vw, 250px) + 20px)), 420px); text-align: center; }
#mTitle { color: var(--acc); font-size: .78em; letter-spacing: .12em; }
#mTxt { font-weight: 700; font-size: 1.05em; }
#mHint { color: var(--sub); font-size: .82em; }
.tr { right: calc(8px + var(--sar)); top: calc(6px + var(--sat)); width: clamp(150px, 22vw, 220px); pointer-events: auto; }
#hWbox { display: flex; justify-content: space-between; align-items: baseline; gap: .4em; cursor: pointer; }
#hW { font-size: .95em; white-space: nowrap; }
#hAmmo { color: var(--sub); font-size: .78em; white-space: nowrap; }
#mini { width: 100%; aspect-ratio: 1.6; height: auto; display: block; margin: .35em 0 .25em; border-radius: 8px; image-rendering: pixelated; border: 1px solid var(--line); }
#hCar { color: var(--sub); font-size: .78em; min-height: 0; white-space: normal; overflow: visible; line-height: 1.3; font-family: ui-monospace, Menlo, monospace; }
.btns { display: flex; gap: 4px; margin-top: .3em; }
.btns button { flex: 1; padding: .25em 0; min-height: 26px; font-size: .82em; }
#toasts { position: absolute; left: 50%; transform: translateX(-50%); top: calc(8px + var(--sat) + 86px); text-align: center; font-weight: 700; font-size: .95em; max-width: min(40vw, 420px); pointer-events: none; z-index: 11; }
#toasts div { margin: 0; background: rgba(8, 8, 10, .82); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: .4em .75em; text-shadow: none; line-height: 1.3; }
body.inside #toasts { top: calc(8px + var(--sat) + 86px); }
#hud:has(#mission:not([hidden])) #toasts { top: calc(8px + var(--sat) + 118px); }
#prompt { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(26px + var(--sab)); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: .35em .9em; white-space: normal; font-size: .9em; max-width: min(70vw, 520px); overflow: visible; text-align: center; line-height: 1.3; }
#prompt b { color: var(--acc); }
#bustWrap { position: absolute; left: 50%; transform: translateX(-50%); top: 40%; text-align: center; font: 800 1.2em ui-monospace, Menlo, monospace; color: #9fd8ff; }
#bustWrap div { width: 160px; height: 6px; background: #222; border-radius: 3px; overflow: hidden; margin-top: 4px; }
#bustWrap i { display: block; height: 100%; background: #38a8ff; width: 0; }
#banner { position: fixed; left: 50%; top: 36%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; z-index: 12; width: min(80vw, 640px); }
#banner h1 { margin: 0; font: 800 clamp(20px, 6vh, 44px)/1.05 ui-monospace, Menlo, monospace; letter-spacing: .06em; text-shadow: 0 2px 0 #000, 0 0 12px #000; }
#banner p { margin: .3em 0 0; color: #ddd; text-shadow: 0 1px 0 #000, 0 0 6px #000; font-weight: 600; }
#banner.show { animation: pop .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
#cine { position: fixed; left: 50%; bottom: calc(14vh + var(--sab)); transform: translateX(-50%); width: min(86vw, 720px); text-align: center; white-space: pre-line; font-weight: 700; font-size: 1.1em; z-index: 12; text-shadow: 0 1px 0 #000; pointer-events: none; }
/* panels: sized to fit one landscape screen */
.panel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 15; width: min(560px, 92vw); max-height: calc(100dvh - 16px - var(--sat) - var(--sab)); display: flex; flex-direction: column; gap: .45em;
  background: rgba(12, 12, 14, .94); border: 1px solid var(--line); border-radius: 16px; padding: .9em 1.1em; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.panel.wide { width: min(820px, 94vw); }
.panel h2 { margin: 0; font: 800 1.35em ui-monospace, Menlo, monospace; letter-spacing: .03em; }
.panel h2 small { font-size: .55em; color: var(--sub); }
.tagline { color: var(--acc); font: 700 .78em ui-monospace, Menlo, monospace; letter-spacing: .14em; }
.line { margin: 0; color: #e8e8e4; }
.small { margin: 0; color: var(--sub); font-size: .85em; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; }
.opts button { text-align: left; font-family: -apple-system, system-ui, sans-serif; font-weight: 600; letter-spacing: 0; }
.row { display: flex; gap: .5em; justify-content: flex-end; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .4em; }
.list { display: flex; flex-direction: column; gap: .3em; min-height: 0; overflow-y: auto; }
.list.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .3em .5em; align-content: start; }
.item { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; gap: 0 .5em; padding: .35em .55em; border: 1px solid var(--line); border-radius: 9px; background: #151518; }
.item b { font-size: .88em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item b i { color: var(--ok); font-style: normal; }
.item span { grid-column: 1; color: var(--sub); font-size: .78em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item button { grid-row: 1 / span 2; grid-column: 2; }
.item.done { opacity: .55; }
.item.stat { grid-template-columns: 1fr auto; } .item.stat span { grid-column: 2; grid-row: 1; color: var(--ink); }
.tabs { display: flex; gap: .3em; align-items: center; }
.tabs .tab { padding: .35em .7em; min-height: 28px; font-size: .82em; background: transparent; }
.tabs .tab.on { background: #2a2a30; border-color: #fff4; }
.wallet { color: var(--ink); font-size: .9em; } .wallet em { color: var(--acc); font-style: normal; font-size: .8em; letter-spacing: .08em; }
.legend { display: flex; flex-wrap: wrap; gap: .3em .8em; font-size: .78em; color: var(--sub); align-items: center; font-family: ui-monospace, Menlo, monospace; }
.legend .k { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: -.4em; }
#bigmap { width: 100%; height: auto; border-radius: 6px; image-rendering: pixelated; touch-action: none; }
.ctrl { display: grid; gap: .4em; font-size: .82em; color: #d8d8d4; } .ctrl b { color: var(--acc); margin-right: .4em; }
/* pool + boat overlays */
#pool { position: fixed; inset: 0; z-index: 16; background: rgba(6, 6, 8, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4em; padding: calc(6px + var(--sat)) 8px calc(22px + var(--sab)); }
#pool .ptop { display: flex; gap: 1em; align-items: center; justify-content: space-between; width: min(92vw, 720px); }
#pool canvas { image-rendering: pixelated; border-radius: 6px; touch-action: none; }
.phint { color: var(--sub); font-size: .8em; text-align: center; }
#boat { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 16; width: min(520px, 90vw); background: rgba(12,12,14,.94); border: 1px solid var(--line); border-radius: 16px; padding: 1em; text-align: center; }
#boat .bar { position: relative; height: 26px; background: #1a3a5a; border-radius: 6px; margin: .7em 0; }
#boat .zone { position: absolute; left: 32.5%; width: 35%; top: 0; bottom: 0; background: rgba(72,224,112,.35); border-radius: 4px; }
#boat .needle { position: absolute; top: -4px; bottom: -4px; width: 6px; margin-left: -3px; background: #fff; border-radius: 2px; left: 50%; }
#boat p { margin: 0; color: var(--sub); }
/* touch controls */
#touch { display: none; }
body.touch #touch { display: block; }
#stickZone { position: fixed; left: 0; bottom: 0; width: 44vw; height: 72vh; z-index: 9; touch-action: none; }
#stick { position: fixed; left: 0; top: 0; width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.06); z-index: 9; pointer-events: none; }
#knob { position: absolute; left: 36px; top: 36px; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.32); }
.pad { position: fixed; right: calc(10px + var(--sar)); bottom: calc(14px + var(--sab)); width: 210px; height: 200px; z-index: 11; }
.pad button { position: absolute; border-radius: 50%; background: rgba(20,20,24,.55); border: 1px solid rgba(255,255,255,.22); padding: 0; min-height: 0; font-family: -apple-system, system-ui, sans-serif; }
.pad button.on { background: rgba(255,106,0,.55); }
.fb { width: 54px; height: 54px; font-size: 22px; line-height: 1; }
.fb.x { right: 66px; bottom: 0; color: #9ab8ff; } .fb.o { right: 0; bottom: 60px; color: #ff8a8a; } .fb.sq { right: 132px; bottom: 60px; color: #ff9ad8; } .fb.tri { right: 66px; bottom: 120px; color: #7ae8b0; }
.sh { width: 52px; height: 34px; border-radius: 10px !important; font-size: 12px; line-height: 1; }
.sh i { display: block; font-style: normal; font-size: 8px; color: var(--sub); }
.sh.l2 { right: 140px; bottom: 150px; } .sh.r2 { right: 0; bottom: 150px; } .sh.l1 { right: 140px; bottom: 120px; height: 26px; display: none; } .sh.r1 { right: 0; bottom: 120px; height: 26px; }
.sh.run { right: 140px; bottom: 6px; }
body.touch #prompt { bottom: calc(42px + var(--sab)); left: 42%; max-width: min(36vw, 320px); }
/* the ..1982.. tag (fixed, bottom centre) */
#tag { position: fixed; left: 50%; bottom: calc(3px + var(--sab)); transform: translateX(-50%); z-index: 40; pointer-events: none; font: 600 10px/1 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .32em;
  color: #cfcfca; background: rgba(10,10,12,.66); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 4px 10px 4px 13px; }
#rotate { display: none; position: fixed; inset: 0; z-index: 50; background: var(--bg); flex-direction: column; align-items: center; justify-content: center; gap: .6em; font-family: ui-monospace, Menlo, monospace; text-align: center; }
#rotate span { color: var(--sub); }
@media (orientation: portrait) and (pointer: coarse) { #rotate { display: flex; } }
@media (max-height: 420px) { .tl, .tr { width: clamp(160px, 23vw, 230px); padding: .35em .55em; } .r2:not(button) { font-size: .76em; } #mini { aspect-ratio: 2.1; margin: .25em 0 .2em; } body.touch .camrow button { min-height: 26px; } .panel { padding: .6em .8em; gap: .3em; } .item { padding: .25em .45em; } }

/* ---- HUMANS 2.0 iso: the three.js canvas + the iso test's grade overlays ---- */
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; filter: saturate(.8) contrast(1.06) brightness(1.03) sepia(.05); }
#vig { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 48%, rgba(0,0,0,0) 55%, rgba(10,10,8,.42) 100%); }
#grain { position: fixed; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: overlay; width: 100%; height: 100%; }
#haze { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at 50% 50%, rgba(var(--hz,201,198,214),.12) 15%, rgba(var(--hz,201,198,214),.72) 100%); }
#tint { position: fixed; inset: 0; pointer-events: none; background: rgba(28,26,38,0); }
.isohud { display: none !important; }
.tag { position: fixed; transform: translate(-50%,-100%); pointer-events: none; font: 700 10px ui-monospace, Menlo, monospace; letter-spacing: .14em; white-space: nowrap; padding: 4px 8px; background: rgba(24,24,22,.62); border-left: 2px solid #d9785a; color: #efe9dc; z-index: 3; }
.tag small { display: block; font-weight: 400; font-size: 8px; opacity: .7; letter-spacing: .08em; margin-top: 2px; }
#joy, #ctrlHidden, #help, #bAct { display: none !important; }
#wmtitle { position: fixed; top: calc(8px + var(--sat)); left: 50%; transform: translateX(-50%); z-index: 9; display: none; font: 700 11px/1 ui-monospace, Menlo, monospace; letter-spacing: .24em; color: #e9d8b4; text-shadow: 0 1px 4px #000; pointer-events: none; }
body.inside #c { filter: none; image-rendering: pixelated; } body.inside #tint, body.inside #haze, body.inside .tag { display: none !important; }
body.inside #wmtitle { display: none !important; }
#br { position: fixed; right: calc(8px + var(--sar)); bottom: calc(3px + var(--sab)); font-size: 8px; opacity: .45; letter-spacing: .04em; pointer-events: none; z-index: 2; }
body.touch #br { display: none; }
.camrow { display: flex; gap: 4px; margin-top: 4px; }
.camrow button { flex: 1; padding: .2em 0; min-height: 26px; font-size: .95em; font-family: -apple-system, system-ui, sans-serif; }
body.touch .camrow button { min-height: 30px; }
#pops { position: fixed; inset: 0; pointer-events: none; z-index: 9; overflow: hidden; }
.pop { position: absolute; left: 0; top: 0; font: 800 14px ui-monospace, Menlo, monospace; text-shadow: 0 1px 0 #000, 0 0 4px #000; white-space: nowrap; }
.mapwrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 30%); gap: .7em; align-items: start; min-height: 0; }
.mapwrap canvas { width: 100%; max-height: calc(100dvh - 60px - var(--sat) - var(--sab)); object-fit: contain; }
.mapside { display: flex; flex-direction: column; gap: .5em; } .mapside b { font-size: .8em; color: var(--acc); letter-spacing: .08em; }
.mapside .row { justify-content: flex-start; }
#cine.cctv { color: #c8ffd0; font-family: ui-monospace, Menlo, monospace; }
#letterbox { position: fixed; inset: 0; pointer-events: none; z-index: 11; display: none; }
#letterbox::before, #letterbox::after { content: ''; position: absolute; left: 0; right: 0; height: 9vh; background: #000; }
#letterbox::before { top: 0; } #letterbox::after { bottom: 0; }
body.cine #letterbox { display: block; } body.cine #hud .card { opacity: .25; }
#inHint { position: fixed; left: 50%; top: calc(8px + var(--sat)); transform: translateX(-50%); font: 600 11px/1.45 ui-monospace, Menlo, monospace; letter-spacing: .06em; color: #f0e6d0; opacity: 1; pointer-events: none; z-index: 11; display: none; }
body.inside #inHint { display: block; }
#title .tcard { background: rgba(10,10,12,.72); }
#title { background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.35)); }
.sh.cam { right: 140px; bottom: 150px; display: none; }

/* touch: a faint resting stick so the move zone is discoverable (the live stick appears under the thumb) */
body.touch #stickZone::after { content: 'MOVE'; position: absolute; left: calc(26px + var(--sal, 0px)); bottom: calc(26px + var(--sab, 0px)); width: 104px; height: 104px; border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.16); color: rgba(255,255,255,.28); font: 600 10px/104px ui-monospace, Menlo, monospace; text-align: center; letter-spacing: .12em; pointer-events: none; }
body.touch #stickZone.active::after { display: none; }
/* phones in landscape: shoulder buttons move into a column left of the face buttons so the pad stays low and clear of the map card */
@media (max-height: 500px) {
  body.touch .pad { width: 252px; height: 176px; bottom: calc(10px + var(--sab)); }
  body.touch .fb.tri { bottom: 118px; }
  body.touch .sh.l2 { right: 196px; bottom: 136px; } body.touch .sh.r2 { right: 196px; bottom: 96px; } body.touch .sh.r1 { right: 196px; bottom: 62px; }
  body.touch .sh.run { right: 196px; bottom: 6px; height: 40px; }
  body.touch .pad button { background: rgba(20,20,24,.42); }
}
/* keep the use prompt clear of the ..1982.. tag, and the bar hint between the two HUD cards */
#prompt, body.touch #prompt { bottom: calc(42px + var(--sab)); }
#inHint { max-width: calc(100vw - 2 * (clamp(168px, 24vw, 250px) + 24px)); white-space: normal; text-align: center; line-height: 1.45;
  background: rgba(8, 8, 10, .82); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; padding: .4em .8em; }
/* hide street prompts / bar hint when a panel or the pool table is up — they must not sit under a card */
body:has(#panel:not([hidden])) #prompt,
body:has(#panel:not([hidden])) #inHint,
body:has(#panel:not([hidden])) #toasts,
body:has(#pool:not([hidden])) #inHint,
body:has(#pool:not([hidden])) #prompt,
body:has(#pool:not([hidden])) #toasts { display: none !important; }
