<!-- SOLID CITY · part 3220 -->
e {
      var tx = sh.to.x + 14, tz = sh.to.z, ty = sh.to.gy + 12;
      var dx = tx - sh.x, dz = tz - sh.z, dh = Math.hypot(dx, dz);
      var desY = dh > 90 ? sh.laneY : ty;
      var vy = Math.max(-9, Math.min(9, (desY - sh.y) * 0.8));
      sh.y += vy * dt;
      if (dh > 1) {
        var sp = 36, step = Math.min(dh, sp * dt);
        sh.x += dx / dh * step; sh.z += dz / dh * step;
        var wantYaw = Math.atan2(dx, dz), dy = wantYaw - sh.yaw;
        while (dy > Math.PI) dy -= Math.PI * 2; while (dy < -Math.PI) dy += Math.PI * 2;
        sh.yaw += dy * Math.min(1, dt * 2.2);
      }
      if (dh < 2 && Math.abs(sh.y - ty) < 1.2) { sh.at = sh.to; sh.mode = 'hover'; sh.t = 5 + Math.random() * 6; }
    }
    sh.mesh.position.set(sh.x, sh.y, sh.z);
    sh.mesh.rotation.set(0, sh.yaw, 0);
  }

  /* ================= HOUSE CRAFT =================
   * The grand households keep a little ship on their own port,
   * and it LANDS there — the King marked the pleasure of it
   * with his own eyes (~02:07): "a space ship lands and
   * departs — I like that little cool design." So each hotel
   * and mansion's craft lifts off its disc, flies a visit to
   * another landing, hovers a while in the traffic, comes
   * home, and settles back onto its own stone. The hillside
   * contributing to the sky, as he ordered. */
  var houseCraft = [];
  EXTRA.filter(function (p) { return p.grand; }).forEach(function (home, ci) {
    var m = buildShuttle(); m.scale.setScalar(0.9); group.add(m);
    houseCraft.push({ mesh: m, home: home, mode: 'parked', t: 14 + ci * 17, x: home.x + 4.5, y: home.gy + 0.55, z: home.z + 2, yaw: ci * 1.3, dest: null });
  });
  function stepCraft(cr, dt) {
    cr.t -= dt;
    if (cr.mode === 'parked') {
      if (cr.t <= 0) { cr.dest = pickDest(cr.home.id); cr.mode = 'rise'; }
    } else if (cr.mode === 'rise') {
      cr.y += 5.5 * dt;
      if (cr.y >= cr.home.gy + 16) cr.mode = 'go';
    } else if (cr.mode === 'go') {
      var laneY = Math.min(398, Math.max(cr.home.gy, cr.dest.gy) + 46);
      var rem = flyToward(cr, cr.dest.x + 14, laneY, cr.dest.z, 42, dt);
      if (rem < 30) { flyToward(cr, cr.dest.x + 14, cr.dest.gy + 12, cr.dest.z, 20, dt); if (rem < 3) { cr.mode = 'visit'; cr.t = 6; } }
    } else if (cr.mode === 'visit') {
      cr.y = cr.dest.gy + 12 + Math.sin(perfNow * 0.85 + cr.x) * 0.3;
      if (cr.t <= 0) cr.mode = 'back';
    } else if (cr.mode === 'back') {
      var laneY2 = Math.min(398, Math.max(cr.home.gy, cr.dest.gy) + 46);
      var rem2 = flyToward(cr, cr.home.x + 14, laneY2, cr.home.z, 42, dt);
      if (rem2 < 26) cr.mode = 'land';
    } else if (cr.mode === 'land') {
      var rem3 = flyToward(cr, cr.home.x + 4.5, cr.home.gy + 0.55, cr.home.z + 2, 9, dt);
      if (rem3 < 0.4) { cr.mode = 'parked'; cr.t = 25 + Math.random() * 30; cr.y = cr.home.gy + 0.55; }
    }
    cr.mesh.position.set(cr.x, cr.y, cr.z);
    cr.mesh.rotation.set(0, cr.yaw, 0);
  }

  /* ================= THE MOTHER SHIP =================
   * She flies really far around the whole mountain: a great
   * ellipse, centre (700,-1400), radii 2600 by 2100, at the
   * height the land beneath her demands — never below 375,
   * climbing to terrain + 120 over the eastern wall, where
   * the land itself stands taller than any lawful ceiling
   * for lesser craft. She is a capital ship; her law is her
   * own. One stately circuit takes her about nine minutes. */
  var mother = (function () {
    var g = new T.Group();
    var hull = new T.Mesh(new T.CylinderGeometry(6, 6, 62, 14), MAT.titanium); hull.rotation.x = Math.PI / 2; g.add(hull);
    var nose = new T.Mesh(new T.SphereGeometry(6, 14, 10), MAT.titanium); nose.scale.set(1, 1, 1.6); nose.position.z = 31; g.add(nose);
    var dome = new T.Mesh(new T.SphereGeometry(4.2, 12, 8), MAT.glass); dome.scale.set(1, 0.55, 1.6); dome.position.set(0, 4.6, 16); g.add(dome);
    var ring = new T.Mesh(new T.TorusGeometry(10.5, 1.1, 10, 28), MAT.silver); ring.position.z = -4; g.add(ring);
    g.add(box(15, 0.7, 9, MAT.gold, 0, -5.4, -18));
    var tail = new T.Mesh(new T.CylinderGeometry(6.8, 3.5, 9, 14), MAT.silver); tail.rotation.x = Math.PI / 2; tail.position.z = -35; g.add(tail);
    var eng = new T.Mesh(new T.CircleGeometry(3.2, 14), MAT.white); eng.position.z = -39.6; eng.rotation.y = Math.PI; g.add(eng);
    var navR = box(0.7, 0.7, 0.7, MAT.red, -10.8, 0, -4), navG = box(0.7, 0.7, 0.7, new T.MeshBasicMaterial({ color: 0x3dff7a }), 10.8, 0, -4);
    g.add(navR); g.add(navG);
    group.add(g);
    return { mesh: g, ring: ring, navR: navR, navG: navG, a: 0, x: 0, y: 380, z: 0, vx: 0, vz: 0, yaw: 0 };
  })();
  var MOTHER = { cx: 700, cz: -1400, rx: 2600, rz: 2100, w: (Math.PI * 2) / 540 };
  function stepMother(dt) {
    mother.a += MOTHER.w * dt;
    var nx = MOTHER.cx + Math.cos(mother.a) * MOTHER.rx, nz = MOTHER.cz + Math.sin(mother.a) * MOTHER.rz;
    mother.vx = (nx - mother.x) / Math.max(dt, 0.001); mother.vz = (nz - mother