<!-- SOLID CITY · part 2833 -->
, 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) * 4.6 * p.s, dz = Math.sin(p.ll) * Math.sin(p.la) * 4.6 * p.s; d.position.set(p.x + dx * 0.92, p.y + 4.6 * p.s - 0.15, p.z + dz * 0.92); d.rotation.set(0, p.ry, 0); d.scale.setScalar(p.s); },
    function (c) { greens(c, 0.22, 0.12); });

  /* ——— BROADLEAF: the round green crowns ——— */
  var leafTrunkGeo = new T.CylinderGeometry(0.17, 0.3, 3.4, 7); leafTrunkGeo.translate(0, 1.7, 0);
  var leafCanGeo = new T.IcosahedronGeometry(2.4, 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.9 + R() * 0.8 }; });
  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);
  var leafCanopies = [];
  leafs.forEach(function (p) { leafCanopies.push({ x: p.x, z: p.z, y: p.y + 3.9 * p.s, s: p.s, ry: p.ry }); if (R() < 0.35) leafCanopies.push({ x: p.x + 1.6 * p.s, z: p.z + 0.8 * p.s, y: p.y + 3.1 * p.s, s: p.s * 0.66, ry: p.ry + 1 }); });
  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.82, p.s); },
    function (c) { greens(c, 0.19, 0.13); });

  /* ——— PINES: the dark spires ——— */
  var pineTrunkGeo = new T.CylinderGeometry(0.14, 0.24, 2.8, 6); pineTrunkGeo.translate(0, 1.4, 0);
  var pineConeGeo = new T.ConeGeometry(1.7, 4.6, 8); pineConeGeo.translate(0, 2.3, 0);
  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) { d.position.set(p.x, p.y + 2.5 * p.s, p.z); 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, p.y + 5.1 * p.s, p.z); d.rotation.set(0, p.ry + 0.4, 0); d.scale.setScalar(p.s * 0.62); },
    function (c) { greens(c, 0.10, 0.07); });

  /* ——— THE MONKEY PODS: umbrella crowns on short giants ——— */
  var podTrunkGeo = new T.CylinderGeometry(1.05, 1.45, 5.2, 9); podTrunkGeo.translate(0, 2.6, 0);
  var podCanGeo = new T.IcosahedronGeometry(1, 1);
  var pods = scatterGiants(hiTier ? 14 : 8, 80, function (x, z, h) { if (h < 3 || h > 120 || slope(x, z, h) > 0.5) return null; return { x: x, z: z, y: h, ry: R() * 6.28, cr: 10 + R() * 4.5 }; });
  counts.pods = pods.length; note('pods', pods, 14);
  instanced('pod-trunks', podTrunkGeo, lambert(0x5d4630), pods,
    function (d, p) { d.position.set(p.x, p.y - 0.15, p.z); d.rotation.set(0, p.ry, 0); d.scale.setScalar(1); }, null);
  instanced('pod-canopies', podCanGeo, lambert(0xffffff, { flatShading: true }), pods,
    function (d, p) { d.position.set(p.x, p.y + 7.6, p.z); d.rotation.set(0, p.ry, 0); d.scale.set(p.cr, p.cr * 0.30, p.cr); },
    function (c) { greens(c, 0.20, 0.10); });
  instanced('pod-crowns', podCanGeo, lambert(0xffffff, { flatShading: true }), pods,
    function (d, p) { d.position.set(p.x, p.y + 9.3, p.z); d.rotation.set(0, p.ry + 2, 0); d.scale.set(p.cr * 0.6, p.cr * 0.22, p.cr * 0.6); },
    function (c) { greens(c, 0.23, 0.10); });

  /* ——— THE BANYANS: pillars from the sky ——— */
  var banTrunkGeo = new T.CylinderGeometry(1.25, 1.7, 7.5, 10); banTrunkGeo.translate(0, 3.75, 0);
  var banCanGeo = new T.IcosahedronGeometry(1, 1);
  var banyans = scatterGiants(hiTier ? 8 : 5, 110, function (x, z, h) { if (h < 3 || h > 110 || slope(x, z, h) > 0.5) return null; return { x: x, z: z, y: h, ry: R() * 6.28, cr: 10 + R() * 3.5, ch: 10.5 + R() * 2 }; },
    [[-150, 700], [500, 500], [-700, -250], [1500, 900]]);
  counts.banyans = banyans.length; note('banyans', banyans, 8);
  instanced('banyan-trunks', banTrunkGeo, lambert(0x54432e), banyans,
    function (d, p) { d.position.set(p.x, p.y - 0.15, p.z); d.rotation.set(0, p.ry, 0); d.scale.setScalar(1); }, null);
  instanced('banyan-canopies', banCanGeo, lambert(0xffffff, { flatShading: true }), banyans,
    function (d, p) { d.position.set(p.x, p.y + p.ch, p.z); d.rotation.set