<!-- SOLID CITY · part 2672 -->
e drive still ends at the road's own
      // surface (endY), on whichever road asks the least of it.
      var tgt = null, tScore = 1e12;
      /* THE PROPER DRIVEWAY (the King's word, 2026-10-14
       * ~01:34): "give every house the proper driveway they
       * deserve." The reach was 40 m, and the census it starved
       * was plain: nine pads stood 48 to 79 m from their nearest
       * station — within sight of the road, beyond the law's
       * reach, with no driveway at all. The reach is now 100 m.
       * The gentlest-station law is unchanged: a longer run
       * that climbs gentler beats a short wall, at household
       * scale as on the mountain — use what we can, build over
       * what is there, add what we need. */
      for (var rn2 in smithRoads) { var ests = smithRoads[rn2].stations; for (var eq = 0; eq < ests.length; eq++) { var es = ests[eq], edx = es.x - pkX, edz = es.z - pkZ, edist = Math.sqrt(edx * edx + edz * edz); if (edist > 100) continue; var esc = Math.abs(es.y - (pkY + 0.06)) / Math.max(edist, 2.5); if (esc < tScore) { tScore = esc; tgt = es; } } }
      if (tgt) {
        /* THE DRIVEWAY'S OWN SWITCHBACK: one house — the highest
         * of the High Benches — stands some 50 m above every
         * station in reach; even the gentlest straight drive is
         * a 50% pitch, a staircase wearing a driveway's name.
         * So where the best straight climb still exceeds 30%,
         * the drive bends once, traversing like the mountain
         * roads themselves: two legs through a bend point set
         * sideways by the length the climb needs, each leg at
         * 30% or gentler. The bend stands on whichever side's
         * ground lies closer to the drive's own height there. */
        var ddx = tgt.x - pkX, ddz = tgt.z - pkZ, dLen = Math.hypot(ddx, ddz) || 1;
        if (tScore > 0.30) {
          var need = Math.abs(tgt.y - (pkY + 0.06)) / 0.30, half = need / 2;
          var off = Math.sqrt(Math.max(half * half - (dLen / 2) * (dLen / 2), 0));
          if (off > 4 && off < 90) {
            var mxp = (pkX + tgt.x) / 2, mzp = (pkZ + tgt.z) / 2, midY = (pkY + 0.06 + tgt.y) / 2;
            var pxu = -ddz / dLen, pzu = ddx / dLen;
            var bA = [mxp + pxu * off, mzp + pzu * off], bB = [mxp - pxu * off, mzp - pzu * off];
            var bend = Math.abs(groundAt(bA[0], bA[1]) - midY) <= Math.abs(groundAt(bB[0], bB[1]) - midY) ? bA : bB;
            steppedPath(pkX, pkZ, bend[0], bend[1], 3.4, C.drive, 3.6);
            steppedPath(bend[0], bend[1], tgt.x, tgt.z, 3.4, C.drive, 3.6, tgt.y);
            driveMouths.push([tgt.x, tgt.z]);
          } else { steppedPath(pkX, pkZ, tgt.x, tgt.z, 3.4, C.drive, 3.6, tgt.y); driveMouths.push([tgt.x, tgt.z]); }
        } else { steppedPath(pkX, pkZ, tgt.x, tgt.z, 3.4, C.drive, 3.6, tgt.y); driveMouths.push([tgt.x, tgt.z]); }
      }
    }
    // walking path: parking pad -> front steps, lined with small yellow stones (the King's photos)
    steppedPath(pkX, pkZ, doorX, doorZ, 1.7, C.path, 2.6);
    var plen = Math.hypot(doorX - pkX, doorZ - pkZ), pn = Math.max(2, Math.floor(plen / 2.2));
    for (var i = 0; i <= pn; i++) {
      var t = i / pn, sx2 = pkX + (doorX - pkX) * t, sz2 = pkZ + (doorZ - pkZ) * t;
      var ox = -(doorZ - pkZ) / (plen || 1) * 1.25, oz = (doorX - pkX) / (plen || 1) * 1.25;
      BASE = M4(sx2 + ox, groundAt(sx2 + ox, sz2 + oz) + 0.02, sz2 + oz, 0, 0, 0);
      rock(solid, 0.3, 0, 0.1, 0, C.yellowStone);
      BASE = new T.Matrix4();
    }
    // a mailbox where the path meets the drive
    BASE = M4(pkX - rx * 2.2, groundAt(pkX - rx * 2.2, pkZ - rz * 2.2), pkZ - rz * 2.2, rec.ry, 0, 0);
    box(solid, 0.14, 1.05, 0.14, 0, 0.52, 0, C.woodDark);
    box(solid, 0.75, 0.4, 0.45, 0, 1.2, 0, R() < 0.5 ? 0x8a3030 : C.stoneDark);
    BASE = new T.Matrix4();
    rec.door = [doorX, doorZ]; rec.park = [pkX, pkZ];
  }
  /* THE APARTMENT'S DRIVE (the same sitting): a block keeps
   * its own lot — the strip and cars its builder lays — but
   * the lot stood 65 m from the road's end with no drive at
   * all. It is served like a house now: one drive from the
   * lot's front to the gentlest station within the same
   * 100 m reach, under the same law. */
  function serveApartment(rec) {
    if (ROADS_REJECTED) return;   // THE REJECTION: the lot stands; its drive does not
    var fx = Math.sin(rec.ry), fz = Math.cos(rec.ry);
    var lotX = rec.x + fx * (rec.d / 2 + 5.2), lotZ = rec.z + fz * (rec.d / 2 + 5.2);
    var lotY = groundAt(lotX, lotZ);
    var tgt = null, tScore = 1e12;
    for (var rn3 in smithRoads) { var ests2 = smithRoads[rn3].stations; for (var eq2 = 0; eq2 < ests2.length; eq2++) { var es2 = ests2[eq2], edx2 = es2.x - lotX, edz2 = es2.z - lotZ, edist2 = Math.sqrt(edx2 * edx2 + edz2 * edz2); if (edist2 > 100) continue; var esc2 = Math.abs(es2.y - (lotY + 0.06)) / Math.max(edist2, 2.5); if (esc2 < tScore) { tScore = esc2; tgt = es2; } } }
    if (tgt) { steppedP