<!-- SOLID CITY · part 2829 -->
here */
  var palmCrownGeo = new T.IcosahedronGeometry(2.6, 0); palmCrownGeo.scale(1.3, 0.30, 1.3); fbmDisplace(palmCrownGeo, 0.55, 0.2, 6.1, 1);
  var palms = scatter(hiTier ? 110 : 60, function (x, z, h) { if (h < 2.5 || h > 90 || slope(x, z, h) > 0.6) return null; return { x: x, z: z, y: h, ry: R() * 6.28, s: 0.85 + R() * 0.45, la: R() * 6.28, ll: 0.04 + R() * 0.14 }; });
  counts.palms = palms.length; note('palms', palms);
  var trunkMat = lambert(0x6e5136);
  instanced('palm-trunks', palmTrunkGeo, trunkMat, palms,
    function (d, p) { d.position.set(p.x, p.y - 0.1, p.z); d.rotation.set(Math.sin(p.la) * p.ll, p.ry, Math.cos(p.la) * p.ll); d.scale.setScalar(p.s); }, null);
  instanced('palm-crowns', palmCrownGeo, lambert(0xffffff, { flatShading: true }), palms,
    function (d, p) { var dx = Math.sin(p.ll) * Math.cos(p.la) * 11 * p.s, dz = Math.sin(p.ll) * Math.sin(p.la) * 11 * p.s; d.position.set(p.x + dx * 0.94, p.y + 11 * p.s - 0.2, p.z + dz * 0.94); d.rotation.set(0, p.ry, 0); d.scale.setScalar(p.s); },
    function (c) { greens(c, 0.22, 0.12); });

  /* ——— BROADLEAF ———
   * Researched (forestry allometry): a mature broadleaf
   * carries its crown at roughly 9–12× its trunk diameter
   * across, the crown WIDER THAN IT IS TALL in the open,
   * and no two crowns alike. The first build read as a
   * balloon on a stick (the King's photo): trunk too thin
   * (Ø 0.34 at the foot), crown a perfect ball. Now: trunk
   * Ø 0.6/0.96, crown Ø ~5.2·s flattened to 0.74 and broken
   * by position-hashed jitter, so each crown is its own. */
  var leafTrunkGeo = new T.CylinderGeometry(0.30, 0.48, 4.6, 8); leafTrunkGeo.translate(0, 2.3, 0); bendGeo(leafTrunkGeo, 0.42, 4.6);
  var leafCanGeo = new T.IcosahedronGeometry(2.6, 2);
  integrity.leafTear = fbmDisplace(leafCanGeo, 0.5, 0.34, 3.1, 1);
  var leafs = scatter(hiTier ? 150 : 85, function (x, z, h) { if (h < 3 || h > 150 || slope(x, z, h) > 0.7) return null; return { x: x, z: z, y: h, ry: R() * 6.28, s: 0.8 + R() * 0.7 }; });
  counts.leafs = leafs.length; note('leafs', leafs);
  instanced('leaf-trunks', leafTrunkGeo, trunkMat, leafs,
    function (d, p) { d.position.set(p.x, p.y - 0.1, p.z); d.rotation.set(0, p.ry, 0); d.scale.setScalar(p.s); }, null);
  /* THE LOBES — "filling spaces in between creating
   * dimensions of leaves and shapes" (the King's words):
   * every crown is a heart lobe where the bent trunk tops
   * out, plus 3–4 satellite lobes seeded through the
   * crown's ellipsoid, each its own fbm-broken leaf mass,
   * sky showing between them — the crown's volume FILLED
   * with leaf dimensions instead of one solid ball. */
  var leafCanopies = [];
  leafs.forEach(function (p) {
    var bx = Math.cos(p.ry) * 0.42 * p.s, bz = -Math.sin(p.ry) * 0.42 * p.s;
    var hx = p.x + bx, hz = p.z + bz, hy = p.y + 5.9 * p.s;
    leafCanopies.push({ x: hx, z: hz, y: hy, s: p.s, ry: p.ry });
    var nl = 3 + Math.floor(R() * 2);
    for (var li = 0; li < nl; li++) {
      var la2 = R() * Math.PI * 2, lr = (0.45 + R() * 0.4) * 2.6 * p.s;
      leafCanopies.push({ x: hx + Math.cos(la2) * lr, z: hz + Math.sin(la2) * lr, y: hy + (R() - 0.62) * 1.5 * p.s, s: p.s * (0.42 + R() * 0.2), ry: R() * 6.28 });
    }
  });
  instanced('leaf-canopies', leafCanGeo, lambert(0xffffff, { flatShading: true }), leafCanopies,
    function (d, p) { d.position.set(p.x, p.y, p.z); d.rotation.set(0, p.ry, 0); d.scale.set(p.s, p.s * 0.74, p.s); },
    function (c) { greens(c, 0.19, 0.13); });

  /* ——— PINES ———
   * Reason: high conifers run 20–40 m in life with the
   * crown starting a third up; at world scale ours stack
   * two cones over a 3.6 m trunk to ~11–13 m of spire. */
  var pineTrunkGeo = new T.CylinderGeometry(0.16, 0.28, 3.6, 7); pineTrunkGeo.translate(0, 1.8, 0); bendGeo(pineTrunkGeo, 0.2, 3.6);
  var pineConeGeo = new T.ConeGeometry(2.0, 5.4, 8); pineConeGeo.translate(0, 2.7, 0); fbmDisplace(pineConeGeo, 0.8, 0.10, 8.4, 1);
  var pines = scatter(hiTier ? 120 : 65, function (x, z, h) { if (h < 40 || h > 330 || slope(x, z, h) > 0.75) return null; return { x: x, z: z, y: h, ry: R() * 6.28, s: 0.9 + R() * 0.6 }; });
  counts.pines = pines.length; note('pines', pines);
  instanced('pine-trunks', pineTrunkGeo, trunkMat, pines,
    function (d, p) { d.position.set(p.x, p.y - 0.1, p.z); d.rotation.set(0, p.ry, 0); d.scale.setScalar(p.s); }, null);
  var pineMat = lambert(0xffffff, { flatShading: true });
  instanced('pine-cones-1', pineConeGeo, pineMat, pines,
    function (d, p) { var t1 = 3.1 / 3.6; d.position.set(p.x + Math.cos(p.ry) * 0.2 * t1 * t1 * p.s, p.y + 3.1 * p.s, p.z - Math.sin(p.ry) * 0.2 * t1 * t1 * p.s); d.rotation.set(0, p.ry, 0); d.scale.setScalar(p.s); },
    function (c) { greens(c, 0.10, 0.07); });
  instanced('pine-cones-2', pineConeGeo, pineMat, pines,
    function (d, p) { d.position.set(p.x + Math.cos(p.ry) * 0.2 * p.s, p.y + 6.6 * p.s, p.z - Math.sin(p.ry) * 0.2 * p.s); d.rotation.set(0, p.ry + 0.4, 0); d.sca