<!-- SOLID CITY · part 2147 -->
 || 0, b[4], b[5]); });
  // THE SEAL: the wormhole is the only crossing — no walk-through at the Bore's far end
  A.solids.push({ x0: POS.x - 6.5, x1: POS.x + 6.5, z0: POS.z - 792, z1: POS.z - 790, y0: M.floorY, y1: M.floorY + 22, hyperTrain: true });
}
function standY(x, z) {
  var lx = x - POS.x, lz = z - POS.z;
  // station platform (local x 9..23, z -6..24)
  if (lx > 9 && lx < 23 && lz > -6 && lz < 24) return M.floorY + 1.31;
  // arrival platform (local z -824..-806)
  if (Math.abs(lx) < 9 && lz > -824 && lz < -806) return M.floorY + 1.0;
  return -1000;
}
function load() {
  var fy = villageFloor();
  if (fy === null) { M.wait = 1.5; return; }
  M.floorY = fy; M.state = 'loading';
  var p; try { p = import('/city/hyper-train.js?v=20261011c'); } catch (e) { p = Promise.reject(e); }
  p.then(function (mod) {
    var make = mod.createHyperTrain || mod.default;
    var g = make({ THREE: A.T, position: { x: POS.x, y: M.floorY, z: POS.z } });
    A.world.add(g); M.group = g; M.state = 'ready';
    collide(g.userData || {});
  }).catch(function (e) { M.state = 'failed'; try { console.warn('[city] Hyper train skipped:', e && e.message); } catch (x) {} });
}
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 - 400));
  M.group.visible = d < 6000;
  if (d < 2500 && M.group.userData.update) try { M.group.userData.update(S.t, dt, A); } catch (e) {}
}
function radar(g, blip, fl) {
  if (M.state !== 'ready') return;
  blip(POS.x + 16, POS.z + 9, '#d8aa48', fl ? 3 : 5, fl ? '' : 'TRAIN');
}
function actHere(x, z) {
  if (M.state !== 'ready') return null;
  try { return M.group.userData.actHere(x, z); } catch (e) { return null; }
}
function board() {
  if (M.state !== 'ready') return;
  try { M.group.userData.board(); } catch (e) {}
}
window.CityHyperTrain = { update: update, radar: radar, pos: POS, standY: standY, actHere: actHere, board: board, state: function () { return M.state; } };
})();


===== FILE: public/city/hyper-train.js =====
/* SOLID CITY — THE HYPER TRAIN & WORMHOLE (2026-10-11, the King's word)
 * "I like it but i wanted a hyper train through the tunnel to get to the
 *  other side through a worm hole."
 *
 * THE DEPARTURE (station at the Bore mouth) -> 800m ride down the Bore ->
 * THE WORMHOLE (the only way through) -> transit -> THE ARRIVAL (Starwell).
 *
 * Design law: mathematical beauty, no excess words. Acceleration is physics
 * (ease-in, cruise, ease-out). The wormhole spiral follows the golden angle.
 *
 * Self-contained ES module. Local frame: mouth at (0,0,0), floor y=0,
 * tunnel extends along local -Z. The placer sets world position.
 */
var PHI = 1.6180339887;
var GOLDEN_ANGLE = 137.5 * Math.PI / 180;
var Z_STATION = 6, Z_WORM = -788, Z_ARRIVAL = -815;
var RIDE_T = 20, VMAX = 794 / 17;

function namePlaque(T, text, w, stoneMat) {
  w = w || 7;
  var c = document.createElement('canvas'); c.width = 512; c.height = 160;
  var g = c.getContext('2d');
  g.fillStyle = '#141216'; g.fillRect(0, 0, 512, 160);
  g.strokeStyle = '#8a6f3a'; g.lineWidth = 5; g.strokeRect(10, 10, 492, 140);
  g.fillStyle = '#d8aa48'; g.textAlign = 'center'; g.textBaseline = 'middle';
  g.font = 'bold ' + (text.length > 14 ? 34 : 44) + 'px Georgia, serif';
  g.fillText(text, 256, 82);
  var t = new T.CanvasTexture(c); t.encoding = T.sRGBEncoding; t.anisotropy = 4;
  var grp = new T.Group();
  grp.add(new T.Mesh(new T.BoxGeometry(w + 0.8, w * 160 / 512 + 0.8, 0.5), stoneMat));
  var face = new T.Mesh(new T.PlaneGeometry(w, w * 160 / 512), new T.MeshBasicMaterial({ map: t }));
  face.position.z = 0.26; grp.add(face);
  return grp;
}

export function createHyperTrain(o) {
  var T = o.THREE, P = o.position || { x: 0, y: 0, z: 0 };
  var root = new T.Group(); root.name = 'hyper-train'; root.position.set(P.x, P.y, P.z);
  var foot = [];
  var C = { gold: 0xd8aa48, basalt: 0x1c1a20, stone: 0x2b2630, hull: 0x14141c };
  var stoneMat = new T.MeshLambertMaterial({ color: C.stone });
  var basaltMat = new T.MeshLambertMaterial({ color: C.basalt });
  var hullMat = new T.MeshLambertMaterial({ color: C.hull });
  var goldBasic = new T.MeshBasicMaterial({ color: C.gold });
  var goldGlow = new T.MeshBasicMaterial({ color: 0xffe8b0 });

  // ================= THE DEPARTURE: station platform =================
  var plat = new T.Mesh(new T.BoxGeometry(14, 1.2, 30), stoneMat);
  plat.position.set(16, 0.6, 9); root.add(plat);
  foot.push([16, 9, 14, 30, 0, 1.2, 0]);
  // gold trim
  var trim = new T.Mesh(new T.BoxGeometry(14.4, 0.18, 30.4), goldBasic);
  trim.position.set(16, 1.22, 9); root.add(trim);
  // bench
  var bench = new T.Mesh(new T.BoxGeometry(4.5, 0.5, 1.2), basaltMat);
  bench.position.set(16, 1.7, 14); root.add(bench);
  [-1, 1].forEach(function (s) {
   