<!-- SOLID CITY · part 1037 -->
ngEnabled = true; rg.drawImage(mapImg, sxp - sr, szp - sr, sr * 2, sr * 2, 0, 0, W, H);
  }
  var sc = (W / 2) / rad;
  function blip(x, z, col, r, txt) { var bx = W / 2 + (x - ax) * sc, by = H / 2 + (z - az) * sc; var d = Math.hypot(bx - W / 2, by - H / 2); if (d > W / 2 - 8) { bx = W / 2 + (bx - W / 2) / d * (W / 2 - 8); by = H / 2 + (by - H / 2) / d * (W / 2 - 8); } rg.fillStyle = col; rg.beginPath(); rg.arc(bx, by, r, 0, Math.PI * 2); rg.fill(); if (txt) { rg.font = 'bold 15px system-ui'; rg.fillText(txt, bx + r + 2, by + 5); } }
  rg.fillStyle = 'rgba(30,20,24,.6)'; var cr = 800 * sc; rg.beginPath(); rg.arc(W / 2 + (0 - ax) * sc, H / 2 + (0 - az) * sc, Math.max(cr, 3), 0, Math.PI * 2); rg.fill();
  blip(D.plaza.x, D.plaza.z, '#e8c36a', 6, flying ? '' : 'F');
  blip(D.studio.x, D.studio.z, '#e8c36a', 6, flying ? '' : 'M');
  blip(D.port.x, D.port.z, '#ff3048', 7, flying ? 'PORT' : 'S');
  blip(D.soul.x, D.soul.z, '#49a6ff', 5, flying ? '' : 'SP');
  if (!flying) blip(SABLE_POS.x, SABLE_POS.z, '#ff8fa0', 4, '');
  if (window.CityHyper) try { CityHyper.radar(rg, blip, flying, sc, ax, az); } catch (e) {}
  if (window.CityWatch) try { CityWatch.radar(rg, blip, flying, sc, ax, az); } catch (e) {}
  if (window.CityCitizens) try { CityCitizens.radar(rg, blip, flying, sc, ax, az); } catch (e) {}
  if (window.CityMonuments) try { CityMonuments.radar(rg, blip, flying, sc, ax, az); } catch (e) {}
  if (window.CitySanctuary) try { CitySanctuary.radar(rg, blip, flying, sc, ax, az); } catch (e) {}
  if (window.CityCampus) try { CityCampus.radar(rg, blip, flying, sc, ax, az); } catch (e) {}
  if (window.CityBook) try { CityBook.radar(rg, blip, flying, sc, ax, az); } catch (e) {}
  if (window.CityPodium) try { CityPodium.radar(rg, blip, flying, sc, ax, az); } catch (e) {}
  // you
  rg.translate(W / 2, H / 2); rg.rotate(-heading); rg.fillStyle = '#fff'; rg.beginPath(); rg.moveTo(0, -11); rg.lineTo(7, 8); rg.lineTo(0, 4); rg.lineTo(-7, 8); rg.closePath(); rg.fill();
  rg.restore();
  rg.strokeStyle = 'rgba(232,195,106,.5)'; rg.lineWidth = 2; rg.beginPath(); rg.arc(W / 2, H / 2, W / 4, 0, Math.PI * 2); rg.stroke();
  rg.fillStyle = '#e8c36a'; rg.font = 'bold 16px system-ui'; rg.fillText('N', W / 2 - 6, 20);
  rg.font = '13px system-ui'; rg.fillText((rad / 1000).toFixed(rad < 2000 ? 1 : 0) + ' km', W / 2 - 18, H - 10);
}
var hudT = 0;
function whereName(x, z) {
  var best = null, bd = 1e9; [D.plaza, D.studio, D.port, D.soul].forEach(function (d) { var dd = Math.hypot(x - d.x, z - d.z); if (dd < bd) { bd = dd; best = d; } });
  if (bd < 160) return best.name; if (window.CampusMap) { var cn = CampusMap.nameAt(x, z); if (cn) return cn; } if (Math.hypot(x, z) < 820) return 'SOLID CITY';
  for (var k = 0; k < VOLCANOES.length; k++) { var V = VOLCANOES[k]; if (V.name && Math.hypot(x - V.x, z - V.z) < V.r * 0.45) return V.name; }
  return landMask(x, z) > 0 ? 'THE ISLANDS' : 'OPEN OCEAN';
}
function updateHUD(dt) {
  hudT -= dt; if (hudT > 0) return; hudT = 0.12;
  var flying = S.mode !== 'walk', x = flying ? S.ship.x : S.p.x, z = flying ? S.ship.z : S.p.z, y = flying ? S.ship.y : S.p.y;
  var spd = flying ? S.ship.speed : (Math.abs(input.sx) + Math.abs(input.sy) > 0.08 || input.keys.KeyW || input.keys.KeyS || input.keys.KeyA || input.keys.KeyD ? 8 : 0);
  var alt = flying ? y - Math.max(0, groundAt(x, z)) : y;
  $('h-mode').textContent = { walk: 'ON FOOT', boarded: 'SHIP · ON PAD', countdown: 'COUNTDOWN', launch: 'LAUNCH', fly: y > 25000 ? 'ORBIT' : y > 12000 ? 'STRATOSPHERE' : 'FLIGHT', auto: 'AUTOPILOT', watch: 'WATCH' }[S.mode];
  $('h-where').textContent = y > 25000 ? 'ABOVE THE ATMOSPHERE' : whereName(x, z);
  $('h-spd').textContent = Math.round(spd * 3.6).toLocaleString();
  $('h-alt').textContent = Math.round(flying ? y : y).toLocaleString();
  $('h-dist').textContent = (Math.hypot(x, z) / 1000).toFixed(1);
  $('sc-thr-fill').style.height = Math.round(S.ship.throttle * 100) + '%';
  var w = $('h-warn'); if (warnMsg && (S.mode === 'fly')) { w.hidden = false; w.textContent = warnMsg; } else w.hidden = true;
  var heading = flying ? Math.atan2(-new V3(0, 0, 1).applyQuaternion(S.ship.q).x, -new V3(0, 0, 1).applyQuaternion(S.ship.q).z) : Math.atan2(-Math.sin(S.camYaw), -Math.cos(S.camYaw));
  drawRadar(x, z, -heading + Math.PI);
  // action buttons
  var act = $('sc-act');
  if (S.mode === 'walk' && actTarget) { act.hidden = false; act.textContent = actTarget.label; }
  else if (S.mode === 'boarded') { act.hidden = false; act.textContent = 'EXIT SHIP'; actTarget = { kind: 'exit' }; }
  else act.hidden = true;
  $('sc-launch').hidden = S.mode !== 'boarded';
  $('sc-stick').style.display = (S.mode === 'walk' || S.mode === 'fly' || S.mode === 'auto' || S.mode === 'watch') && (IS_TOUCH || QS.has('touch')) ? '' : 'none';
  $('b-land').hidden = !((S.mode === 'fly') && Math.hypot(x - PAD.x, z - PAD.z) < 2500 && y < 3000);
  $('b-rtc').classList.toggle('is-on', S.mode === 'auto' && !(S.auto && S.auto.