:root {
  --pink: #ff4fa3;
  --cyan: #3fe0ff;
  --gold: #ffd166;
  --ink: #0b0d14;
  --panel: rgba(8, 10, 18, 0.72);
  --text: #f4f1ea;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--text); font-family: 'Rajdhani', system-ui, sans-serif; user-select: none; -webkit-user-select: none; }
#view, #view canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#view canvas { filter: saturate(1.18) contrast(1.07); } /* richer, more natural colour grade */
.hidden { display: none !important; }

/* ---------- HUD ---------- */
#hud { position: fixed; inset: 0; pointer-events: none; }
#topRight { position: absolute; top: 14px; right: 18px; text-align: right; text-shadow: 0 2px 4px #000, 0 0 2px #000; }
#clock { font: 30px 'Bungee', sans-serif; color: #fff; }
#money { font: 30px 'Bungee', sans-serif; color: #7dff8a; margin-top: -4px; }
/* sound control, left of the money: speaker button (mute) + volume slider (low -> high) */
#moneyRow { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
#sndCtl { pointer-events: auto; display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 20px; background: rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.25); text-shadow: none; }
#btnSnd { width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 16px; line-height: 30px; padding: 0; cursor: pointer; }
#btnSnd:hover { background: rgba(255,255,255,.25); }
#volMaster { width: 90px; height: 4px; cursor: pointer; accent-color: #7dff8a; }
#weapon { font-weight: 700; font-size: 20px; color: var(--gold); letter-spacing: 1px; }
#bars { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; margin-top: 4px; }
.bar { width: 170px; height: 9px; background: rgba(0,0,0,.6); border: 1px solid rgba(255,255,255,.4); }
.bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg,#d61f3c,#ff5c6c); }
/* health bar colour by level: green (healthy) -> yellow -> red (low) */
#hpBar { transition: width .25s, background .4s; }
#hpBar.hp-good { background: linear-gradient(90deg, #1e9e4a, #3fd46f); }
#hpBar.hp-mid { background: linear-gradient(90deg, #e0a800, #ffd84d); }
#hpBar.hp-low { background: linear-gradient(90deg, #d61f3c, #ff5c6c); }
.bar.armor i { background: linear-gradient(90deg,#3c8cff,#8ac2ff); }
#stars { font-size: 30px; letter-spacing: 2px; color: rgba(255,255,255,.18); height: 34px; }
#stars b { color: var(--gold); font-weight: 400; }
#stars.flash b { animation: flash .5s infinite alternate; }
@keyframes flash { to { color: #fff; } }

#radarWrap { position: absolute; left: 20px; bottom: 20px; width: 220px; height: 220px; border-radius: 50%; overflow: hidden; border: 3px solid rgba(255,255,255,.75); box-shadow: 0 0 0 2px #000, 0 6px 20px rgba(0,0,0,.6); background: #000; }
#radarWrap { pointer-events: auto; cursor: pointer; transition: transform .15s, border-color .15s; }
#radarWrap:hover { transform: scale(1.04); border-color: var(--pink); }
#radarTip { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); font: 11px 'Bungee'; color: #fff; background: rgba(255,79,163,.85); padding: 1px 8px; border-radius: 8px; pointer-events: none; }
#radar { width: 100%; height: 100%; display: block; }
#mapButtons { position: absolute; left: 14px; top: 44px; display: flex; flex-direction: column; gap: 8px; }
.mapBtn { font: 700 17px 'Rajdhani', sans-serif; color: #fff; background: rgba(8,10,18,.8); border: 2px solid rgba(255,255,255,.5); border-radius: 8px; padding: 6px 14px; cursor: pointer; text-align: left; min-width: 150px; }
.mapBtn:hover { background: var(--pink); border-color: #fff; }
.mapBtn.close { background: rgba(214,31,60,.85); }
.mapBtn.clear { border-color: #ff3fa4; color: #ffb3d6; }
#radarN { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); font: 13px 'Bungee'; color: #fff; text-shadow: 0 0 3px #000; }
#areaName { position: absolute; right: 30px; bottom: 120px; font: 40px 'Bungee', sans-serif; color: #fff; text-shadow: 0 3px 0 #9c1f62, 0 0 12px rgba(0,0,0,.8); opacity: 0; transition: opacity .8s; text-align: right; max-width: 70vw; }
#areaName.show { opacity: 1; }
#streetName { position: absolute; left: 252px; bottom: 26px; font-weight: 700; font-size: 20px; color: #fff; text-shadow: 0 2px 3px #000; }
#speedo { position: absolute; right: 26px; bottom: 22px; text-align: right; text-shadow: 0 2px 4px #000; }
#spd { font: 56px 'Bungee', sans-serif; line-height: 1; }
#speedo .unit { font-weight: 700; font-size: 16px; opacity: .8; }
#gear { font-weight: 700; font-size: 16px; color: var(--cyan); }
#radioName { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); font: 22px 'Bungee'; color: var(--gold); text-shadow: 0 2px 4px #000; opacity: 0; transition: opacity .5s; }
#radioName.show { opacity: 1; }
#msg { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); max-width: 70vw; text-align: center; font-weight: 600; font-size: 22px; background: var(--panel); padding: 8px 16px; border-radius: 6px; opacity: 0; transition: opacity .3s; }
#msg.show { opacity: 1; }
#help { position: absolute; left: 18px; top: 16px; max-width: 360px; font-weight: 600; font-size: 18px; background: var(--panel); padding: 10px 14px; border-radius: 6px; border-left: 4px solid var(--pink); opacity: 0; transition: opacity .3s; }
#help.show { opacity: 1; }
#bigMsg { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font: 72px 'Bungee', sans-serif; color: var(--gold); text-shadow: 0 4px 0 #000, 0 0 30px rgba(0,0,0,.8); opacity: 0; transition: opacity .4s; }
#bigMsg.show { opacity: 1; }
#bigMsg.red { color: #ff2a3c; }
#objective { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); font-weight: 700; font-size: 22px; color: #fff; text-shadow: 0 2px 3px #000; text-align: center; }
#timer { position: absolute; right: 22px; top: 180px; font: 30px 'Bungee'; color: #fff; text-shadow: 0 2px 4px #000; }
#copBar { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); width: min(420px, 80vw); text-align: center; background: var(--panel); padding: 8px 14px 10px; border-radius: 8px; border: 2px solid rgba(255,255,255,.2); }
#copText { font-weight: 700; font-size: 19px; margin-bottom: 6px; }
.copTrack { height: 8px; background: rgba(255,255,255,.15); border-radius: 4px; overflow: hidden; }
.copTrack i { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .2s; }
#copBar.catch { border-color: #ff2a3c; animation: copPulse .8s infinite alternate; }
#copBar.catch .copTrack i { background: linear-gradient(90deg, #ff9a3c, #ff2a3c); }
#copBar.hide .copTrack i { background: linear-gradient(90deg, #3c8cff, #3fe0ff); }
#copBar.seen { border-color: #ffd166; }
@keyframes copPulse { to { box-shadow: 0 0 18px rgba(255,42,60,.7); } }
#crosshair { position: absolute; left: 50%; top: 45%; transform: translate(-50%,-50%); font: 30px monospace; color: #fff; text-shadow: 0 0 3px #000; display: none; }
#crosshair.on { display: block; }
#prompt { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); font-weight: 700; font-size: 20px; background: var(--panel); padding: 4px 12px; border-radius: 4px; display: none; }
#prompt.on { display: block; }

/* ---------- map ---------- */
#mapScreen { position: fixed; inset: 0; background: #0a2a3d; z-index: 20; }
#bigmap { width: 100%; height: 100%; display: block; cursor: grab; }
#mapInfo { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: var(--panel); padding: 6px 14px; border-radius: 6px; font-weight: 600; }
#mapLegend { position: absolute; right: 14px; top: 14px; background: var(--panel); padding: 10px 14px; border-radius: 6px; font-weight: 600; line-height: 1.7; max-width: min(560px, calc(100vw - 28px)); }
#mapLegend .lgI { white-space: nowrap; margin-right: 10px; display: inline-block; }
#mapLegend .lgB { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #0b0d14; color: #fff; font-weight: 700; font-size: 12px; vertical-align: middle; }

/* ---------- menus ---------- */
#menu, #pause { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: radial-gradient(ellipse at 50% 30%, rgba(255,79,163,.35), transparent 60%), linear-gradient(180deg, #120a24 0%, #2a0f3a 45%, #ff7a59 100%); }
#pause { background: rgba(5,6,12,.78); }
.logo { text-align: center; margin-bottom: 14px; }
.logo .l1 { font: 92px 'Bungee', sans-serif; line-height: .9; color: #fff; text-shadow: 0 6px 0 var(--pink), 0 0 40px rgba(255,79,163,.6); }
.logo .l2 { font: 46px 'Bungee', sans-serif; color: var(--cyan); text-shadow: 0 4px 0 #0a3a5a; }
.logo .l3 { font-weight: 600; font-size: 18px; letter-spacing: 2px; opacity: .85; margin-top: 8px; }
.ptitle { font: 60px 'Bungee'; color: var(--gold); }
.mbtn { pointer-events: auto; font: 26px 'Bungee', sans-serif; color: #fff; background: rgba(0,0,0,.45); border: 2px solid rgba(255,255,255,.6); padding: 8px 40px; min-width: 300px; border-radius: 8px; cursor: pointer; }
.mbtn:hover, .mbtn:focus-visible { background: var(--pink); border-color: #fff; outline: none; }
.spawnRow { display: flex; gap: 12px; align-items: center; font-weight: 700; font-size: 18px; }
.spawnRow label { min-width: 110px; text-align: right; }
.spawnRow select, .spawnRow input { font: 600 17px 'Rajdhani', sans-serif; padding: 4px 8px; min-width: 220px; border-radius: 6px; border: 0; }
#loadStatus { font-weight: 700; font-size: 20px; }
#loadBarWrap { width: 360px; height: 8px; background: rgba(0,0,0,.4); border-radius: 4px; overflow: hidden; }
#loadBar { height: 100%; width: 0; background: var(--cyan); transition: width .2s; }
#controlsHelp { max-width: 760px; text-align: center; font-size: 16px; line-height: 1.6; background: rgba(0,0,0,.35); padding: 10px 16px; border-radius: 8px; margin-top: 6px; }
#credit { position: absolute; bottom: 10px; left: 0; right: 0; padding: 0 16px; text-align: center; font-size: 13px; opacity: .8; line-height: 1.45; }
.musicBtn { position: absolute; top: 16px; right: 16px; pointer-events: auto; font: 700 15px 'Rajdhani', sans-serif; color: #fff; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: 6px 14px; cursor: pointer; z-index: 5; }
.musicBtn:hover { background: rgba(0,0,0,.55); }
.musicBtn.off { opacity: .65; text-decoration: line-through; }
.musicBtn.waiting { border-color: var(--gold); color: var(--gold); animation: musicPulse 1.6s ease-in-out infinite; }
@keyframes musicPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,209,102,.0); } 50% { box-shadow: 0 0 0 6px rgba(255,209,102,.25); } }
#credit .copy { font-weight: 700; opacity: .95; }
/* Stay connected popup */
#connectPopup { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(5,6,12,.72); padding: 16px; }
#connectPopup.hidden { display: none; }
.connectBox { position: relative; width: 100%; max-width: 470px; background: radial-gradient(ellipse at 50% -20%, rgba(255,62,165,.22), transparent 60%), #12141f; border: 2px solid rgba(255,255,255,.22); border-radius: 16px; padding: 26px 26px 18px; box-shadow: 0 24px 70px rgba(0,0,0,.65); }
.connectBox h2 { margin: 0 0 6px; font: 28px 'Bungee', sans-serif; color: var(--gold); }
.connectLead { margin: 0 0 18px; font-size: 16px; line-height: 1.45; opacity: .9; padding-right: 30px; }
.connectCard { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin-bottom: 12px; border-radius: 12px; color: #fff; text-decoration: none; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); }
.connectCard .ic { flex: none; width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.connectCard.insta .ic { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.connectCard.mail .ic { background: linear-gradient(135deg, #2bb3c0, #1f6fb2); }
.connectCard .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.connectCard .tx b { font-size: 17px; }
.connectCard .tx small, .connectCard .mailLink { font-size: 15px; font-weight: 600; color: var(--cyan); overflow-wrap: anywhere; text-decoration: none; }
.connectCard .mailLink:hover { text-decoration: underline; }
.connectCard.insta { cursor: pointer; transition: background .15s, transform .15s; }
.connectCard.insta:hover { background: rgba(255,255,255,.12); transform: translateY(-1px); }
.connectCard .go { font-size: 20px; opacity: .8; }
.copyBtn { flex: none; font: 700 14px 'Rajdhani', sans-serif; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.copyBtn:hover { background: rgba(255,255,255,.2); }
.connectFoot { margin-top: 6px; text-align: center; font-size: 13px; opacity: .65; }
.connectCard .mailLink { overflow-wrap: normal; white-space: nowrap; }
@media (max-width: 460px) {
  .connectBox { padding: 22px 16px 14px; }
  .connectCard { gap: 10px; padding: 10px 12px; }
  .connectCard .ic { width: 38px; height: 38px; border-radius: 10px; }
  .connectCard .tx b { font-size: 16px; }
  .copyBtn { font-size: 0; width: 36px; height: 34px; padding: 0; }
  .copyBtn::before { content: '⧉'; font-size: 18px; }
}
#stats { font-weight: 600; text-align: center; opacity: .85; }
.mbtn.small { font-size: 18px; padding: 6px 24px; min-width: 200px; background: rgba(0,0,0,.3); }
#menu .logo { margin-bottom: 26px; }
#menu .logo .l1 { font-size: clamp(56px, 20vw, 120px); }
#loadStatus:empty { display: none; }
/* "3D graphics could not start" help panel */
.glHelp { pointer-events: auto; max-width: 620px; margin: 0 16px; padding: 18px 22px; background: rgba(10,12,22,.82); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; font-weight: 500; font-size: 16px; line-height: 1.5; text-align: left; }
.glHelp > b { display: block; font: 22px 'Bungee', sans-serif; color: var(--gold); margin-bottom: 6px; }
.glHelp ol { margin: 8px 0 14px; padding-left: 22px; }
.glHelp li { margin: 6px 0; }
.glHelp code { font: 600 14px Consolas, monospace; background: rgba(255,255,255,.12); padding: 1px 6px; border-radius: 4px; user-select: all; }
.glHelp .btn { font: 18px 'Bungee', sans-serif; color: #fff; background: var(--pink); border: 0; padding: 8px 26px; border-radius: 8px; cursor: pointer; }
#glLost { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); font: 700 20px 'Rajdhani', sans-serif; color: #fff; }
#glLost.hidden { display: none; }
/* title-screen menu: one centred column, every row the same width */
#menuButtons { display: flex; flex-direction: column; gap: 12px; width: 340px; max-width: calc(100vw - 32px); }
#menuButtons .mbtn { width: 100%; min-width: 0; }
#menuButtons .spawnRow { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
#menuButtons .spawnRow label { min-width: 0; text-align: left; }
#menuButtons .spawnRow select { width: 100%; min-width: 0; height: 38px; cursor: pointer; }
#menuButtons #btnKeys { margin-top: 4px; }

/* ---------- grand prize ---------- */
#menuButtons .mbtn.prize { position: relative; background: linear-gradient(135deg, #ffd166 0%, #f4a300 45%, #ff7a2a 100%); color: #2a1300; border-color: #fff3c4; text-shadow: 0 1px 0 rgba(255,255,255,.4); box-shadow: 0 0 0 2px rgba(255,209,102,.35), 0 8px 24px rgba(244,163,0,.45); animation: prizeGlow 2.2s ease-in-out infinite; display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 21px; white-space: nowrap; padding: 8px 14px; }
#menuButtons .mbtn.prize:hover { filter: brightness(1.08); background: linear-gradient(135deg, #ffe08a 0%, #ffb300 45%, #ff8a3a 100%); }
.prize .trophy { font-size: 24px; }
.prize .prizeTag { font: 700 14px 'Rajdhani', sans-serif; background: #2a1300; color: #ffd166; padding: 2px 8px; border-radius: 10px; text-shadow: none; }
@keyframes prizeGlow { 50% { box-shadow: 0 0 0 4px rgba(255,209,102,.5), 0 10px 34px rgba(255,140,0,.65); } }
#prizePopup { position: fixed; inset: 0; z-index: 41; display: flex; align-items: center; justify-content: center; background: rgba(5,6,12,.75); padding: 16px; backdrop-filter: blur(3px); }
.prizeBox { position: relative; width: 100%; max-width: 760px; max-height: 92vh; overflow: auto; border-radius: 18px; background: radial-gradient(ellipse at 50% -10%, rgba(255,209,102,.28), transparent 55%), #12141f; border: 2px solid rgba(255,209,102,.55); box-shadow: 0 30px 80px rgba(0,0,0,.65), 0 0 40px rgba(255,170,0,.18); padding: 26px 30px 24px; }
.prizeHero { text-align: center; }
.prizeBadge { display: inline-block; font: 700 13px 'Rajdhani', sans-serif; letter-spacing: 2px; color: #2a1300; background: #ffd166; padding: 3px 12px; border-radius: 12px; }
.prizeTrophy { font-size: 64px; line-height: 1.1; margin-top: 8px; filter: drop-shadow(0 6px 14px rgba(255,170,0,.55)); }
.prizeHero h2 { margin: 2px 0 4px; font: 40px 'Bungee', sans-serif; background: linear-gradient(180deg, #fff3c4, #ffd166 50%, #f4a300); -webkit-background-clip: text; background-clip: text; color: transparent; }
.prizeBig { font: 52px 'Bungee', sans-serif; color: #fff; text-shadow: 0 4px 0 #9c5a00, 0 0 28px rgba(255,170,0,.5); line-height: 1.05; }
.prizeBig small { font: 700 20px 'Rajdhani', sans-serif; color: #ffd166; text-shadow: none; }
.prizeSub { font-weight: 600; font-size: 19px; margin-top: 6px; opacity: .95; }
.prizeSub b { color: #ffd166; }
.prizeDeadline { display: inline-block; margin-top: 10px; font-weight: 700; font-size: 16px; color: #ffb3c8; background: rgba(255,79,163,.15); border: 1px solid rgba(255,79,163,.45); padding: 3px 12px; border-radius: 12px; }
.prizeIntro { font-size: 18px; line-height: 1.55; text-align: center; margin: 18px 4px 16px; color: #e9e7f2; }
.prizeIntro b { color: #fff; }
.prizeStepsTitle { margin: 4px 0 10px; font: 700 20px 'Rajdhani', sans-serif; color: var(--gold); text-transform: uppercase; letter-spacing: 1px; text-align: center; }
.prizeWin { margin: 16px 0 0; text-align: center; font: 700 20px 'Rajdhani', sans-serif; color: #fff; background: rgba(255,209,102,.12); border: 1px solid rgba(255,209,102,.4); border-radius: 10px; padding: 10px 12px; }
.prizeTagline { margin: 14px 0 0; text-align: center; font: 700 19px 'Rajdhani', sans-serif; color: #ffb25c; }
.prizeTagline span { display: block; margin-top: 4px; font: 16px 'Bungee', sans-serif; color: var(--gold); letter-spacing: 1px; }
.prizeSteps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 12px 14px; }
.step .num { flex: 0 0 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 18px 'Bungee', sans-serif; color: #2a1300; background: linear-gradient(135deg, #ffd166, #f4a300); }
.step b { font-size: 18px; color: #ffd166; }
.step p { margin: 2px 0 0; font-size: 16px; line-height: 1.4; color: #d9d7e6; font-weight: 500; }
.prizeCta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 20px 0 6px; }
.prizeBtn { font: 22px 'Bungee', sans-serif; text-decoration: none; cursor: pointer; padding: 10px 28px; border-radius: 10px; color: #2a1300; background: linear-gradient(135deg, #ffd166, #f4a300 55%, #ff7a2a); border: 2px solid #fff3c4; box-shadow: 0 8px 22px rgba(244,163,0,.4); }
.prizeBtn:hover { filter: brightness(1.08); }
.prizeBtn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); box-shadow: none; }
.prizeBtn.ghost:hover { background: rgba(255,255,255,.08); }
.prizeBtn.disabled { opacity: .55; cursor: default; filter: grayscale(.4); pointer-events: none; font-size: 18px; }
.prizeInfo { margin-top: 14px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 10px; }
.prizeInfo h3 { margin: 10px 0 4px; font: 700 16px 'Rajdhani', sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: var(--cyan); }
.prizeInfo p, .prizeInfo li { font-size: 15px; line-height: 1.5; color: #c9c7d6; font-weight: 500; }
.prizeInfo ul { margin: 4px 0 0; padding-left: 20px; }
@media (max-width: 700px) { .prizeBig { font-size: 38px; } .prizeHero h2 { font-size: 30px; } .prizeBox { padding: 54px 16px 20px; } .prizeSteps { grid-template-columns: 1fr; } .prizeBadge { font-size: 11px; letter-spacing: 1px; } #menuButtons .mbtn.prize { font-size: 18px; } }
#photoFlash { position: fixed; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 35; }
#photoFlash.go { animation: flashOut .45s ease-out; }
@keyframes flashOut { from { opacity: .75; } to { opacity: 0; } }

/* ---------- shortcuts popup ---------- */
#keysPopup { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; background: rgba(5,6,12,.7); padding: 16px; }
.keysBox { position: relative; background: #12141f; border: 2px solid rgba(255,255,255,.25); border-radius: 14px; padding: 22px 28px; max-width: 980px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.keysBox h2 { margin: 0 0 14px; font: 30px 'Bungee', sans-serif; color: var(--gold); }
.keysBox h3 { margin: 0 0 8px; font: 700 20px 'Rajdhani', sans-serif; color: var(--cyan); text-transform: uppercase; letter-spacing: 1px; }
.keysCols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.keysBox table { border-collapse: collapse; width: 100%; font-size: 17px; font-weight: 600; }
.keysBox td { padding: 5px 4px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; }
.keysBox td:first-child { white-space: nowrap; padding-right: 12px; }
kbd { display: inline-block; font: 700 14px 'Rajdhani', sans-serif; background: #2a2e40; border: 1px solid #555b75; border-bottom-width: 3px; border-radius: 5px; padding: 1px 7px; color: #fff; }
.keysX { position: absolute; top: 12px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); background: rgba(214,31,60,.8); color: #fff; font-size: 18px; cursor: pointer; }
.keysX:hover { background: var(--pink); }

/* ---------- touch ---------- */
#touch { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#joy { position: absolute; left: 30px; bottom: 260px; width: 150px; height: 150px; border-radius: 50%; background: rgba(255,255,255,.12); border: 2px solid rgba(255,255,255,.35); pointer-events: auto; touch-action: none; }
#joyKnob { position: absolute; left: 45px; top: 45px; width: 60px; height: 60px; border-radius: 50%; background: rgba(255,255,255,.5); }
#lookPad { position: absolute; left: 35%; right: 0; top: 0; bottom: 45%; pointer-events: auto; touch-action: none; }
.tbtns { position: absolute; right: 16px; bottom: 120px; display: grid; grid-template-columns: repeat(3, 72px); gap: 10px; pointer-events: auto; }
.tb { width: 72px; height: 72px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); background: rgba(0,0,0,.4); color: #fff; font: 700 15px 'Rajdhani'; touch-action: none; }
.tb.fire { background: rgba(214,31,60,.55); }
.tb.sm { height: 48px; border-radius: 10px; }

@media (max-width: 700px) {
  #radarWrap { width: 140px; height: 140px; left: 10px; bottom: 10px; }
  #streetName { left: 160px; bottom: 12px; font-size: 15px; }
  #areaName { font-size: 26px; bottom: 90px; }
  .logo .l1 { font-size: 60px; } .logo .l2 { font-size: 30px; }
  .mbtn { min-width: 240px; font-size: 20px; }
  #controlsHelp { display: none; }
  #spd { font-size: 40px; }
  .bar { width: 120px; }
  #clock, #money { font-size: 22px; }
  #volMaster { width: 60px; }
}
