<!-- SOLID CITY · part 3208 -->
      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.z) / Math.max(dt, 0.001);
    mother.x = nx; mother.z = nz;
    var need = 375;
    for (var i = 0; i <= 6; i++) { var aa = mother.a + i * 0.012, gx = MOTHER.cx + Math.cos(aa) * MOTHER.rx, gz = MOTHER.cz + Math.sin(aa) * MOTHER.rz, gg = heightAt(gx, gz) + 120; if (gg > need) need = gg; }
    mother.y += Math.max(-6 * dt, Math.min(6 * dt, need - mother.y));
    mother.yaw = Math.atan2(mother.vx, mother.vz);
    mother.mesh.position.set(mother.x, mother.y, mother.z);
    mother.mesh.rotation.set(0, mother.yaw, Math.sin(mother.a * 3) * 0.01);
    mother.ring.rotation.z += dt * 0.25;
    var blink = (perfNow % 1.6) < 1.1;
    mother.navR.visible = blink; mother.navG.visible = blink;
  }
  function motherFlank() {
    var rx = Math.cos(mother.yaw), rz = -Math.sin(mother.yaw);
    return { x: mother.x + rx * 58, y: mother.y - 6, z: mother.z + rz * 58 };
  }

  /* ================= FERRIES — TO AND FROM THE MOTHER =================
   * Her own traffic: craft that leave the ports, climb to meet
   * her on her circuit, hold at her flank a while, and come
   * home — and craft that start the day docked at her side and
   * depart down to the ports. The sky's comings and goings. */
  var ferries = [];
  for (var fi = 0; fi < 2; fi++) {
    var fe = { mesh: buildShuttle(), mode: fi === 0 ? 'dock' : 'hover', t: 6 + fi * 9, holdT: 9, at: STATIONS[3 + fi * 5], to: null, x: 0, y: -1000, z: 0, yaw: 0 };
    fe.mesh.scale.setScalar(1.5);
    if (fi === 0) { var f0 = motherFlank(); fe.x = f0.x; fe.y = f0.y; fe.z = f0.z; }
    else { fe.x = fe.at.x + 14; fe.z = fe.at.z; fe.y = fe.at.gy + 12; }
    group.add(fe.mesh); ferries.push(fe);
  }
  function flyToward(fe, tx, ty, tz, speed, dt) {
    var dx = tx - fe.x, dy = ty - fe.y, dz = tz - fe.z, d = Math.hypot(dx, dy, dz);
    if (d < 0.5) return 0;
    var step = Math.min(d, speed * dt);
    fe.x += dx / d * step; fe.y += dy / d * step; fe.z += dz / d * step;
    var wantYaw = Math.atan2(dx, dz), dyw = wantYaw - fe.yaw;
    while (dyw > Math.PI) dyw -= Math.PI * 2; while (dyw < -Math.PI) dyw += Math.PI * 2;
    fe.yaw += dyw * Math.min(1, dt * 2.4);
    return d - step;
  }
  function stepFerry(fe, dt) {
    fe.t -= dt;
    if (fe.mode === 'hover') {
      fe.y = fe.at.gy + 12 + Math.sin(perfNow * 0.8 + fe.x) * 0.3;
      if (fe.t <= 0) fe.mode = 'toMother';
    } else if (fe.mode === 'toMother') {
      var eta = Math.hypot(mother.x - fe.x, mother.z - fe.z)