<!-- NEW6 — TEST 6 · THE FIVE SHORES · part 444 -->
HREE.Euler(0, ang, 0)).multiply(new THREE.Quaternion().setFromEuler(new THREE.Euler(sgn * Math.atan2(4.3, rl), 0, 0))), new THREE.Vector3(1, 1, 1));
        rg.applyMatrix4(m); deckGeos.push(rg);
        const r1 = new THREE.BoxGeometry(0.5, 0.9, (d1 - d0) + 8); // rails follow deck only
        r1.applyMatrix4(new THREE.Matrix4().compose(new THREE.Vector3(cx - uz * (s.w / 2 - 0.4), 5.1, cz + ux * (s.w / 2 - 0.4)), new THREE.Quaternion().setFromEuler(new THREE.Euler(0, ang, 0)), new THREE.Vector3(1, 1, 1)));
        const r2 = new THREE.BoxGeometry(0.5, 0.9, (d1 - d0) + 8);
        r2.applyMatrix4(new THREE.Matrix4().compose(new THREE.Vector3(cx + uz * (s.w / 2 - 0.4), 5.1, cz - ux * (s.w / 2 - 0.4)), new THREE.Quaternion().setFromEuler(new THREE.Euler(0, ang, 0)), new THREE.Vector3(1, 1, 1)));
        if (sgn < 0) { railGeos.push(r1, r2); }
      }
      for (let d = d0 + 6; d < d1 - 3; d += 15) { const px = s.a[0] + ux * d, pz = s.a[1] + uz * d; const pg = new THREE.CylinderGeometry(1.2, 1.4, 4.4, 8); pg.translate(px, 2.2, pz); pierGeos.push(pg); }
    }
  }
  if (streetGeos.length) { const m = new THREE.Mesh(mergeGeometries(streetGeos), new THREE.MeshLambertMaterial({ color: 0x33373c })); m.name = 'STREETS'; group.add(m); }
  if (deckGeos.length) { const m = new THREE.Mesh(mergeGeometries(deckGeos), new THREE.MeshLambertMaterial({ color: 0x4a4d52 })); m.name = 'BRIDGES'; group.add(m); }
  if (pierGeos.length) { const m = new THREE.Mesh(mergeGeometries(pierGeos), new THREE.MeshLambertMaterial({ color: 0x5a5d60 })); m.name = 'PIERS'; group.add(m); }
  if (railGeos.length) { const m = new THREE.Mesh(mergeGeometries(railGeos), new THREE.MeshLambertMaterial({ color: 0x8a8d90 })); m.name = 'RAILS'; group.add(m); }
  // ---------- region kits ----------
  const buckets = new Map();
  const bucket = (color) => { if (!buckets.has(color)) buckets.set(color, []); return buckets.get(color); };
  const treeGeos = [], trunkGeos = [];
  const tree = (x, z, s) => { trunkGeos.push(new THREE.CylinderGeometry(0.22 * s, 0.3 * s, 2.2 * s, 5).applyMatrix4(M4(THREE, x, 1.1 * s, z))); treeGeos.push(new THREE.ConeGeometry(1.9 * s, 5.2 * s, 7).applyMatrix4(M4(THREE, x, 2.2 * s + 2.6 * s, z))); counts.trees++; };
  const WALLS = [0xe8e2d4, 0xdfe5ea, 0xf0e0cc, 0xd8e2d0, 0xead9d9, 0xf3ead9], ROOFS = [0x6b5a4a, 0x596066, 0x746052, 0x4f5a60];
  for (const R of MAP.regions) {
    const rnd = mulberry32(R.seed || 7);
    if (R.kind === 'downtown') {
      // THE 800 THEMSELVES — Test 2's own forge, stood at this region's heart.
      const d = buildDistrict(THREE);
      d.group.position.set(R.x, 0, R.z); group.add(d.group);
      for (const b of d.meta.buildings) buildings.push({ x: b.x + R.x, z: b.z + R.z, w: b.w, d: b.d, h: b.h });
      counts.fashion += d.meta.count;
    } else if (R.kind === 'towers') {
      const slab = new THREE.Mesh(new THREE.BoxGeometry(R.w, 0.3, R.d), new THREE.MeshLambertMaterial({ color: 0x565b60 }));
      slab.position.set(R.x, 0.15, R.z); slab.name = 'TOWER_GROUND_' + R.name; group.add(slab);
      towersKit(THREE, group, R, rnd, buildings, counts, inWater);
    } else if (R.kind === 'suburb') {
      const slab = new THREE.Mesh(new THREE.BoxGeometry(R.w, 0.3, R.d), new THREE.MeshLambertMaterial({ color: 0x66755e }));
      slab.position.set(R.x, 0.15, R.z); slab.name = 'SUBURB_GROUND_' + R.name; group.add(slab);
      const px = 26, pz = 30, cols = Math.floor(R.w / px), rows = Math.floor(R.d / pz);
      for (let i = 0; i < cols; i++) for (let j = 0; j < rows; j++) {
        if (rnd() < 0.14) { tree(R.x - R.w / 2 + (i + 0.5) * px, R.z - R.d / 2 + (j + 0.5) * pz, 0.9 + rnd() * 0.5); continue; }
        const hx = R.x - R.w / 2 + (i + 0.5) * px + (rnd() - 0.5) * 3, hz = R.z - R.d / 2 + (j + 0.5) * pz + (rnd() - 0.5) * 3;
        if (inWater(hx, hz)) continue;
        const w = 8 + rnd() * 3, d = 7 + rnd() * 3, h = 3.6 + rnd() * 1.6, wall = WALLS[Math.floor(rnd() * WALLS.length)], roof = ROOFS[Math.floor(rnd() * ROOFS.length)];
        bucket(wall).push(new THREE.BoxGeometry(w, h, d).applyMatrix4(M4(THREE, hx, h / 2 + 0.3, hz)));
        const rg = new THREE.ConeGeometry(Math.hypot(w, d) * 0.62, 2.6, 4); rg.applyMatrix4(M4(THREE, hx, h + 0.3 + 1.3, hz, Math.PI / 4)); bucket(roof).push(rg);
        buildings.push({ x: hx, z: hz, w: w + 1, d: d + 1, h }); counts.houses++;
      }
    } else if (R.kind === 'island') {
      const disc = new THREE.Mesh(new THREE.CircleGeometry(R.r, 36), new THREE.MeshLambertMaterial({ color: 0x4a7c43 }));
      disc.rotation.x = -Math.PI / 2; disc.position.set(R.x, 0.95, R.z); disc.name = 'ISLAND_' + R.name; group.add(disc);
      const rim = new THREE.Mesh(new THREE.CircleGeometry(R.r + 6, 36), new THREE.MeshLambertMaterial({ color: 0x6b6257 }));
      rim.rotation.x = -Math.PI / 2; rim.position.set(R.x, 0.7, R.z); group.add(rim);
      for (let i = 0; i < 12; i++) { const a = (i / 12) * Math.PI * 2, rr = R.r * (0.45 + rn