<!-- SOLID CITY · part 1968 -->
| [];
  for (var i = 0; i < zones.length; i++) {
    var zn = zones[i];
    if (zn.kind === 'flat') {
      if (lx >= zn.x0 && lx <= zn.x1 && lz >= zn.z0 && lz <= zn.z1 && wy > zn.y - 2.4 && zn.y > best) best = zn.y;
    } else if (zn.kind === 'ramp') {
      if (lx >= zn.x0 && lx <= zn.x1 && lz >= zn.z0 && lz <= zn.z1) {
        var t = (lz - zn.z0) / (zn.z1 - zn.z0), sy = zn.y0 + (zn.y1 - zn.y0) * t;
        if (wy > sy - 2.4 && sy > best) best = sy;
      }
    } else if (zn.kind === 'road') {
      for (var j = 0; j < zn.segs.length; j++) {
        var sg = zn.segs[j], dx = sg.x2 - sg.x1, dz = sg.z2 - sg.z1, L2 = dx * dx + dz * dz;
        var tt = L2 > 0 ? ((lx - sg.x1) * dx + (lz - sg.z1) * dz) / L2 : 0;
        if (tt < -0.05 || tt > 1.05) continue;
        var px = sg.x1 + dx * tt, pz = sg.z1 + dz * tt;
        if (Math.hypot(lx - px, lz - pz) > 7.2) continue;
        var ry = sg.y1 + (sg.y2 - sg.y1) * tt + 0.02;
        if (wy > ry - 2.4 && ry > best) best = ry;
      }
    }
  }
  return best;
}
function update(dt) {
  if (M.state === 'idle') { if (A.isBuilt && !A.isBuilt()) return; M.wait -= dt; if (M.wait <= 0) load(); return; }
  if (M.state !== 'ready' || document.hidden) return;
  var c = A.camera.position, d = Math.hypot(c.x + A.origin.x - POS.x, c.z + A.origin.z - (POS.z + 122));
  M.group.visible = d < 9000;
  if (d < 3200 && M.group.userData.update) try { M.group.userData.update(S.t); } catch (e) {}
  if (M.outBtn) M.outBtn.style.display = (window.CityDrive && CityDrive.active()) ? 'block' : 'none';
  if (S.mode === 'walk' && !S.drive) {
    var pd = Math.hypot(S.p.x - POS.x, S.p.z - (POS.z + 122));
    if (pd < 300 && !M.said) { M.said = true; if (window.CityHyper && CityHyper.narrate) CityHyper.narrate('<b>The South Lot</b>: fourteen rides under the First City. Walk to one and roll \u2014 the Long Road runs east to the capital.', 10); }
    else if (pd > 600) M.said = false;
  }
}
function radar(g, blip, fl) { if (M.state === 'ready') blip(POS.x, POS.z + 122, '#ffd27a', fl ? 3 : 6, fl ? '' : 'SOUTH LOT'); }
window.CityFirstParking = { update: update, radar: radar, standY: standY, actHere: actHere, act: act, pos: POS, state: function () { return M.state; } };
})();


===== FILE: public/city/first-city-parking-place.js.bak-rung2-20261013 =====
/* Solid City — places THE SOUTH LOT (public/city/first-city-parking.js) below
   the First City's southern edge: apron, ramp, lot, rides, the Long Road.
   Also lends the First City's podium a standY, so a walker can travel
   shelf -> ramp -> apron -> podium: the edge the King found is fixed.
   Rides roll through window.CityDrive (city.js): walk to a car, the action
   button rolls; the action button (or the STEP OUT button) steps you out. */
(function () {
'use strict';
if (!window.SC || !SC.api) return;
var A = SC.api, S = A.S;
var POS = { x: -1300, z: -620 };            // the podium's south edge centre
var FC = { x: -1300, z: -1000 };            // the First City itself
var M = { state: 'idle', group: null, wait: 9.5, gy: null, said: false, outBtn: null };
function firstCityDeckY() {
  if (M.gy !== null) return M.gy;
  var g = (typeof groundAt === 'function') ? groundAt : null;
  if (!g) { M.gy = 20; return M.gy; }
  var max = -1000, h, ix, iz;
  for (ix = -3; ix <= 3; ix++) for (iz = -3; iz <= 3; iz++) {
    try { h = g(FC.x + ix * 70, FC.z + iz * 127); } catch (e) { h = 20; }
    if (h > max) max = h;
  }
  M.gy = max + 1.0;   // the podium deck surface, sampled exactly as its placer samples
  return M.gy;
}
function addBox(cx, cz, w, d, rot, y0, y1) {
  var out = [];
  var nx = Math.max(1, Math.ceil(w / 2.5)), nz = Math.max(1, Math.ceil(d / 2.5)), cw = w / nx, cd = d / nz, c = Math.cos(rot), s = Math.sin(rot);
  var hx = cw / 2 * Math.abs(c) + cd / 2 * Math.abs(s), hz = cw / 2 * Math.abs(s) + cd / 2 * Math.abs(c);
  for (var i = 0; i < nx; i++) for (var j = 0; j < nz; j++) {
    var ox = -w / 2 + cw * (i + 0.5), oz = -d / 2 + cd * (j + 0.5), lx = cx + ox * c + oz * s, lz = cz - ox * s + oz * c;
    var e = { x0: POS.x + lx - hx, x1: POS.x + lx + hx, z0: POS.z + lz - hz, z1: POS.z + lz + hz, y0: y0, y1: y1, firstParking: true };
    A.solids.push(e); out.push(e);
  }
  return out;
}
function removeSolids(list) {
  if (!list) return;
  list.forEach(function (e) { var i = A.solids.indexOf(e); if (i >= 0) A.solids.splice(i, 1); });
}
function collide(ud) {
  (ud.footprint || []).forEach(function (b) {
    var entries = addBox(b[0], b[1], b[2], b[3], b[6] || 0, b[4], b[5]);
    if (b[7] && String(b[7]).indexOf('car:') === 0) {
      var id = String(b[7]).slice(4);
      (ud.cars || []).forEach(function (car) { if (car.id === id) car.solids = entries; });
    }
  });
  // the lot's retaining edges (below-deck walls; the ramp gap stays open)
  var ly = ud.lotY;
  addBox(-74.5, 73, 131, 2, 0, ly - 4, ly - 0.1);
  addBox(74.5, 73, 131, 2, 0, ly - 4, ly - 0.1);
  addBox(0, 171, 280, 2, 0, ly - 4, ly - 0.1);
  addBox(