<!-- SOLID CITY · part 2760 -->
']);
  compound(880, -1180, "THE EAST PLAIN 'OHANA", 'plantation', ['dickey', 'waa', 'noa']);
  compound(-480, -1150, "THE SHORE ROAD 'OHANA", 'dickey', ['noa', 'plantation', 'waa']);
  singles(560, -1330, 'THE MERIDIAN BENCHES', 6, ['plantation', 'noa', 'waa', 'dickey']);
  compound(1080, -1620, 'THE EASTERN BENCHES', 'dickey', ['plantation', 'waa', 'mission'], { ring: 33 });
  singles(1270, -1560, 'THE HIGH BENCHES', 6, ['dickey', 'plantation', 'noa']);
  singles(950, -1830, 'THE OVERLOOK BENCHES', 4, ['waa', 'dickey', 'plantation']);
  singles(790, -1900, 'THE EAST CLIMB HOMES', 4, ['plantation', 'waa', 'noa']);
  compound(660, -2080, 'THE NORTH BENCHES', 'plantation', ['waa', 'plantation', 'noa']);
  singles(430, -2330, 'THE COLOSSEUM ROAD HOMES', 7, ['plantation', 'dickey', 'noa', 'waa']);
  compound(470, -2430, "THE FAR NORTH 'OHANA", 'noa', ['waa', 'plantation', 'noa']);
  singles(-350, -1080, 'THE WESTERN BENCHES', 5, ['noa', 'plantation', 'waa'], 100);
  // the base flats — two small apartment blocks where the ground gentles
  var aptSites = [[705, -1005, -Math.PI / 2], [-625, -1155, Math.PI / 2], [820, -1120, -Math.PI / 2]];
  for (var ai = 0; ai < aptSites.length && homes.filter(function (h) { return h.style === 'apartment'; }).length < 2; ai++) {
    var as = aptSites[ai];
    if (benchAt(as[0], as[1], 16) >= 0 && clearOf(as[0], as[1], 20) && roadClear(as[0], as[1], 16)) {
      var arec = buildApartment(as[0], as[1], as[2]);
      placed.push([as[0], as[1], 26]);
      dressHome({ x: as[0], z: as[1], ry: as[2], w: 27, d: 11, lanaiDepth: 0 }, { palm: true });
    }
  }
  var treeCount = scatterTrees(130);
  buildPlates();
  railBodies();

  /* ================= ASSEMBLY ================= */
  var group = new T.Group();
  group.add(solid.build(new T.MeshLambertMaterial({ vertexColors: true })));
  group.add(glassB.build(new T.MeshLambertMaterial({ vertexColors: true, transparent: true, opacity: 0.55 })));
  group.add(glowB.build(new T.MeshBasicMaterial({ vertexColors: true })));
  extras.forEach(function (m) { group.add(m); });

  var houseCount = 0, unitCount = 0;
  homes.forEach(function (h) { if (h.style === 'apartment') unitCount += (h.units || 6); else houseCount++; });
  function standYAt(x, z) {
    var best = -Infinity;
    for (var i = 0; i < standRects.length; i++) {
      var r = standRects[i], dx = x - r.cx, dz = z - r.cz;
      var lx = dx * r.cos - dz * r.sin, lz = dx * r.sin + dz * r.cos;
      if (Math.abs(lx - r.lx) <= r.hw && Math.abs(lz - r.lz) <= r.hd && r.y > best) best = r.y;
    }
    return best;
  }
  group.userData = {
    footprint: foot,
    standRects: standRects,
    standTris: standTris,
    homes: homes,
    counts: { houses: houseCount, apartmentUnits: unitCount, dwellings: houseCount + unitCount, trees: treeCount, styles: STYLE_COUNT },
    center: { x: 300, z: -1500 },
    standYAt: standYAt,
    update: null
  };
  return group;
}


===== FILE: public/city/mountain-homes.js.bak-roadfix-20261013 =====
/* SOLID CITY — NĀ HALE O NĀ KŪPUNA: THE ANCESTORS' HOMES (2026-10-12, by order of the King)
 * "We need to build homes for hawaiians." — homes woven into the green coastal
 * benches around THE ANCESTRAL ROADS (0,-1600), on the ancestors' own land:
 * 'ohana compounds (a main hale, a kupuna hale, a keiki hale around a shared yard),
 * plantation homes, Dickey-roof residences, traditional hale, small apartment
 * blocks at the base — following the verified historic style guide (hale →
 * plantation → Dickey → mission).
 *
 * Design sources (the King's method): three AI reference images (compound / plantation
 * home / mountainside pattern) + his real Hilo ground photos (steep roofs, A-frame gables,
 * earth-tone stucco, lawn-and-path layout, yellow path stones).
 *
 * PLACEMENT LAW (the King's word): homes sit on gentle slopes and valley floors ONLY —
 * never on ledges, ridge crests, or cliff edges. Ledges keep their natural form.
 * Every home has a driveway and a parking pad. Every home is WALK-IN: a real door
 * opening, a real little interior, walls solid, door gap passable.
 *
 * Performance: ALL static geometry is merged into a few vertex-colored batches
 * (opaque / glow / glass) — the whole mountainside is a handful of draw calls.
 * Self-contained ES module:
 *   import { createMountainHomes } from '/city/mountain-homes.js';
 *   const g = createMountainHomes({ THREE, groundAt });
 *   // g.userData: footprint [x,z,w,d,y0,y1,rot] (world), standRects, homes, update(t)
 */
function mulberry(a) { return function () { a |= 0; a = a + 0x6D2B79F5 | 0; var t = Math.imul(a ^ a >>> 15, 1 | a); t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t; return ((t ^ t >>> 14) >>> 0) / 4294967296; }; }

export function createMountainHomes(o) {
  var T = o.THREE, groundAt = o.groundAt;
  var R = mulberry(20261012);
  var root = new T.Group(); root.name = 'mountain-homes';
  var foot = [];        // collision footprints, world coords: [x, z, w, d, y0,