<!-- SOLID CITY · part 3227 -->
400, 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) / 78;
      var rem = flyToward(fe, mother.x + mother.vx * eta * 0.85, mother.y - 6, mother.z + mother.vz * eta * 0.85, 78, dt);
      if (rem < 42) { fe.mode = 'dock'; fe.holdT = 7; }
    } else if (fe.mode === 'dock') {
      var f = motherFlank();
      flyToward(fe, f.x, f.y, f.z, 40, dt);
      fe.yaw = mother.yaw;
      fe.holdT -= dt;
      if (fe.holdT <= 0) { fe.to = pickDest(''); fe.mode = 'toPort'; }
    } else if (fe.mode === 'toPort') {
      var rem2 = flyToward(fe, fe.to.x + 14, fe.to.gy + 12, fe.to.z, 78, dt);
      if (rem2 < 2) { fe.at = fe.to; fe.mode = 'hover'; fe.t = 7 + Math.random() * 8; }
    }
    fe.mesh.position.set(fe.x, fe.y, fe.z);
    fe.mesh.rotation.set(0, fe.yaw, 0);
  }

  /* ================= HIGH TRAFFIC =================
   * Ships on the wide sea lanes, high and far: their heights
   * are surveyed at build from the land beneath their own
   * circles — the sky measured before it is flown, as always. */
  var traffic = [];
  [[-900, -300, 1700], [200, 2300, 1400], [-300, -2900, 1500], [1500, 2500, 1100]].forEach(function (lane, li) {
    var mx = -1e12;
    for (var a = 0; a < Math.PI * 2; a += 0.02) { var g2 = heightAt(lane[0] + Math.cos(a) * lane[2], lane[1] + Math.sin(a) * lane[2]); if (g2 > mx) mx = g2; }
    var h = Math.min(412, Math.max(320, mx + 48));
    var m = buildShuttle(); m.scale.setScalar(2.1); group.add(m);
    traffic.push({ mesh: m, cx: lane[0], cz: lane[1], r: lane[2], h: h, a: li * 1.7, w: (li % 2 ? -1 : 1) * (Math.PI * 2) / (300 + li * 60) });
  });
  function stepTraffic(dt) {
    traffic.forEach(function (tf) {
      tf.a += tf.w * dt;
      var x = tf.cx + Math.cos(tf.a) * tf.r, z = tf.cz + Math.sin(tf.a) * tf.r;
      tf.mesh.position.set(x, tf.h, z);
      tf.mesh.rotation.set(0, Math.atan2(Math.cos(tf.a) * (tf.w > 0 ? 1 : -1), -Math.sin(tf.a) * (tf.w > 0 ? 1 : -1)), 0);
    });
  }

  /* ================= MORE SKY (the King's word, 2026-10-14
   * ~07:36: "Make more traffic in the sky") =================
   * Four new lanes of the wide sea traffic, single-mesh sleek
   * ships crossing the whole map on long straight runs, a
   * ring of orbiters forever circling the ancestors' stack,
   * and THE SISTER SHIP — a smaller cruiser keepin