<!-- SOLID CITY · part 3427 -->
osition.set(POS.x, M.gy, POS.z);
    A.world.add(grp); M.group = grp; M.state = 'ready';
    collide(grp.userData || {});
    var rep = validate();
    try {
      console.info('[city] Spaceport spatial validation: ' + (rep.pass ? 'PASS' : 'FAIL') + ' (' + rep.results.filter(function (r) { return r.ok; }).length + '/' + rep.results.length + ' checks)');
      rep.results.forEach(function (r) { if (!r.ok) console.warn('[city]   ✗ ' + r.name + ' — ' + r.detail); });
    } catch (e) {}
  }).catch(function (e) { M.state = 'failed'; try { console.warn('[city] Spaceport skipped:', e && e.message); } catch (x) {} });
}
function update(dt) {
  if (M.state === 'idle') { M.wait -= dt; if (M.wait <= 0) load(); return; }
  if (M.state !== 'ready' || !M.group) return;
  try { M.group.userData.update(S.t, dt, A); } catch (e) {}
}
/* C1: stand ON the pad discs (their tops are ground+0.3; walkers stood at ground+0). */
function standY(x, z) {
  if (M.state !== 'ready' || !M.group) return -1000;
  var fl = M.group.userData.standFloors; if (!fl) return -1000;
  var best = -1000;
  for (var i = 0; i < fl.length; i++) {
    var f = fl[i], wx = POS.x + f.cx, wz = POS.z + f.cz;
    if (Math.hypot(x - wx, z - wz) < f.r && S.p.y > M.gy + f.y - 3 && M.gy + f.y > best) best = M.gy + f.y;
  }
  return best;
}
window.CitySpaceport = {
  update: update, standY: standY, pos: POS, state: function () { return M.state; },
  validate: validate,
  kit: function () { return M.group ? M.group.userData.spatialKit : null; }
};
})();


===== FILE: public/city/spaceport.js =====
/* Solid City — SPATIAL INTELLIGENCE: the Orbital Spaceport reference environment.
 *
 * Built under the King's Spatial Intelligence Directive (2026-10-12). The Spaceport is the
 * FIRST APPLICATION: its circulation is audited, its zones reserved, its failures corrected
 * locally, and the successful rules are exported as a REUSABLE KIT for all future builders.
 *
 * THE KING'S CLARIFICATION (2026-10-12): "When I said everything I don't mean the outside
 * of the buildings just inside okay." — The futuristic aesthetic (polished chrome,
 * black-and-red marble, blending wallpapers, twin lightning) applies to INTERIOR
 * surfaces ONLY. Exteriors keep their existing look. Accordingly: every exterior
 * addition in this module is plain, functional, and in the city's own existing visual
 * language (dark metal, the city's red accent). The aesthetic lives inside the hangar:
 * its floor, the inner face of its back wall, and the twin-lightning emblem within.
 * The kit still exports the aesthetic materials — for INTERIOR use by future builders.
 *
 * What was wrong (audit of the live layout, pad centre (-380,330), ground CITY_Y=22):
 *  F1  The pad disc's top sits at ground+0.3 but walkers stand at ground+0 — feet sink into
 *      the pad (same defect on the Double Strike and AI Workshop pads).
 *  F2  The only "ORBITAL SPACEPORT" sign floats 30m overhead, directly above the disembark
 *      point — invisible at player eye level. No arrivals identity where a player lands.
 *  F3  No marked pedestrian corridor: disembark -> city road (east) and disembark -> hangar
 *      hub (north-west) were unmarked desire lines across open ground.
 *  F5  The open hangar SE of the pad was a purposeless shell (posts + roof, nothing inside).
 * Flagged, NOT touched (structural, directive section 8): the gantry column stands on the
 * pad inside the board radius; the control tower's collision box (city-wide cyl() helper)
 * protrudes ~2.8m past its visible surface at the corners.
 *
 * Corrections applied here (all local, all additive, nothing existing moved or removed):
 *  C1  standY surfaces for all three pad discs — you now stand ON the pads.
 *  C2  An eye-level ARRIVALS sign beside the disembark path (never on it), in the city's
 *      standard sign language — the fix is spatial (wayfinding), not a reskin.
 *  C3  Marked circulation: plain dark walkways with red centre dashes (the city's own
 *      road language) — disembark -> road junction (east), disembark -> workshop gate
 *      (NW), and a plain reserved-zone marker under the disembark point.
 *  C5  The hangar's INTERIOR is finished: black-red marble floor, a back wall whose
 *      INNER face is black-red marble carrying the twin-lightning emblem (its outer
 *      face stays plain), and two equipment crates at its edges — its working apron
 *      (16m+) stays clear.
 *
 * THE KIT (section 9 — build one, learn, reuse): createSpatialKit(T) returns
 *   { marbleTexture, lightningTexture, palette, corridor, pylon, validateLayout }
 * Future modules import { createSpatialKit } from '/city/spaceport.js' instead of writing
 * one-off repair scripts. validateLayout(solids, spec, gy) runs the directive section 7
 * static checks: point clearance, corridor clearance, area clearance, footprint overlap.
 */
'use strict';

/* ---------------- procedural textures (the King's aesthetic — INTERIOR use) -------