<!-- SOLID CITY · part 2823 -->
(x, z) && R() > 0.45) return null;
    return { x: x, z: z, y: h, ry: R() * 6.28, s: 0.8 + R() * 0.5 };
  });
  counts.flowers = flowers.length; note('flowers', flowers);
  var stemGeo = new T.CylinderGeometry(0.012, 0.02, 0.34, 5); stemGeo.translate(0, 0.17, 0);
  instanced('flower-stems', stemGeo, sway(lambert(0x3d6b2f), '0.0'), flowers,
    function (d, p) { d.position.set(p.x, p.y - 0.02, p.z); d.rotation.set(0, p.ry, 0); d.scale.setScalar(p.s); }, null);
  var headGeo = new T.IcosahedronGeometry(0.06, 0);
  var PALETTE = [0xd84a5a, 0xe8b13c, 0x9a6ae0, 0xf2ead8, 0xe07ab0, 0xe2703a];
  instanced('flower-heads', headGeo, sway(lambert(0xffffff), '0.36'), flowers,
    function (d, p) { d.position.set(p.x, p.y + 0.36 * p.s, p.z); d.rotation.set(0, p.ry, 0); d.scale.setScalar(p.s); },
    function (c) { c.setHex(PALETTE[Math.floor(CR() * PALETTE.length)]); });

  /* ——— BUSHES: squashed crystal blobs of green ——— */
  var bushGeo = new T.IcosahedronGeometry(1, 1); bushGeo.scale(1, 0.62, 1); fbmDisplace(bushGeo, 0.9, 0.22, 2.9, 1);
  var bushes = scatter(hiTier ? 480 : 260, function (x, z, h) { if (h < 2.5 || h > 170 || slope(x, z, h) > 0.85) return null; return { x: x, z: z, y: h, ry: R() * 6.28, s: 0.5 + R() * 1.1 }; });
  counts.bushes = bushes.length; note('bushes', bushes);
  instanced('bushes', bushGeo, lambert(0xffffff, { flatShading: true }), bushes,
    function (d, p) { d.position.set(p.x, p.y + p.s * 0.3, p.z); d.rotation.set(0, p.ry, 0); d.scale.setScalar(p.s); },
    function (c) { greens(c, 0.16, 0.12); });

  /* ——— PALMS ———
   * Researched (USDA + Bishop Museum coconut data): the
   * niu stands 10–20 m (to 30), trunk Ø 20–30 cm swelling
   * to 40–50 at the base, crown spread 6.7–10 m, and it
   * CURVES — storm and shore wind bend it. Ours: an 11 m
   * trunk (Ø 0.32/0.52 at the foot), a 6.8 m crown, lean
   * to 0.18 rad — a young giant's proportions, world-fit. */
  var palmTrunkGeo = new T.CylinderGeometry(0.16, 0.26, 11, 7); palmTrunkGeo.translate(0, 5.5, 0); /* the palm's curve is its lean — the crown math follows the lean exactly, so no baked bend 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 = [], branches = [], leafSpawns = [];
  var UPV = new T.Vector3(0, 1, 0), DV = new T.Vector3();
  function branchTo(arr, bx2, by2, bz2, tx, ty, tz) {
    var dx = tx - bx2, dy = ty - by2, dz = tz - bz