<!-- SAGA3 · part 37 -->
wMat = new THREE.MeshStandardMaterial({color: 0xffffff, roughness: 0.3});
    var greenMat = new THREE.MeshStandardMaterial({color: 0x1a5a1a, roughness: 0.9});

    /* Mountain ranges around the map edges — creating enclosure and depth */
    var ranges = [
      /* North range */
      {x: -4000, z: -6000, w: 3000, h: 400},
      {x: 0, z: -6500, w: 4000, h: 500},
      {x: 4000, z: -6000, w: 3000, h: 450},
      /* South range */
      {x: -4000, z: 6000, w: 3000, h: 380},
      {x: 0, z: 6500, w: 4000, h: 480},
      {x: 4000, z: 6000, w: 3000, h: 420},
      /* East range */
      {x: 6000, z: -3000, w: 2500, h: 350},
      {x: 6500, z: 0, w: 3000, h: 450},
      {x: 6000, z: 3000, w: 2500, h: 380},
      /* West range */
      {x: -6000, z: -3000, w: 2500, h: 400},
      {x: -6500, z: 0, w: 3000, h: 480},
      {x: -6000, z: 3000, w: 2500, h: 360}
    ];

    for(var r = 0; r < ranges.length; r++){
      (function(){
        var rx = ranges[r].x, rz = ranges[r].z;
        var rw = ranges[r].w, rh = ranges[r].h;
        /* Multiple peaks per range for natural look */
        var peaks = 5 + Math.floor(Math.random() * 3);
        for(var p = 0; p < peaks; p++){
          var px = rx + (Math.random() - 0.5) * rw;
          var pz = rz + (Math.random() - 0.5) * rw * 0.5;
          var ph = rh * (0.7 + Math.random() * 0.5);
          var pw = 200 + Math.random() * 200;
          /* Mountain */
          var mtn = new THREE.Mesh(new THREE.ConeGeometry(pw, ph, 7), rockMat);
          mtn.position.set(px, ph/2, pz);
          scene.add(mtn);
          /* Snow cap */
          var capH = ph * 0.3;
          var capW = pw * 0.35;
          var cap = new THREE.Mesh(new THREE.ConeGeometry(capW, capH, 7), snowMat);
          cap.position.set(px, ph - capH/2, pz);
          scene.add(cap);
          /* Green base */
          var base = new THREE.Mesh(new THREE.SphereGeometry(pw * 1.2, 12, 8), greenMat);
          base.scale.y = 0.2;
          base.position.set(px, 0.13, pz);
          scene.add(base);
        }
      })();
    }

    /* Enhance Ahupua'a peaks — make them HUGE (Hawaiian scale) */
    /* Mauna Kea is 4207m — let's make these feel that massive */

  }catch(e){}
}
if(typeof buildMassiveMountains === 'function'){ try{ buildMassiveMountains(); }catch(e){} }

/* SCENIC — stretched, bent mountains with lakes and rivers. National Geographic. 2026-10-04. */
function buildScenic(){
  try{
    window._dynamics = window._dynamics || [];
    var rockMat = new THREE.MeshStandardMaterial({color: 0x3a3a3a, roughness: 0.95});
    var snowMat = new THREE.MeshStandardMaterial({color: 0xffffff, roughness: 0.3});
    var waterMat = new THREE.MeshStandardMaterial({color: 0x0088cc, transparent: true, opacity: 0.7});
    var greenMat = new THREE.MeshStandardMaterial({color: 0x1a5a1a, roughness: 0.9});

    /* Curved mountain chain — stretched and bent */
    function mountainChain(cx, cz, length, bend, height){
      var segments = 12;
      for(var i = 0; i < segments; i++){
        var t = i / (segments - 1);
        /* Bend the chain */
        var bx = cx + (t - 0.5) * length;
        var bz = cz + Math.sin(t * Math.PI) * bend;
        var ph = height * (0.7 + Math.random() * 0.5);
        var pw = 150 + Math.random() * 100;
        var mtn = new THREE.Mesh(new THREE.ConeGeometry(pw, ph, 7), rockMat);
        mtn.position.set(bx, ph/2, bz);
        scene.add(mtn);
        /* Snow cap */
        var cap = new THREE.Mesh(new THREE.ConeGeometry(pw*0.35, ph*0.3, 7), snowMat);
        cap.position.set(bx, ph - ph*0.15, bz);
        scene.add(cap);
      }
    }

    /* Lakes in valleys */
    function lake(x, z, r){
      var lk = new THREE.Mesh(new THREE.CircleGeometry(r, 24), waterMat);
      lk.rotation.x = -Math.PI/2;
      lk.position.set(x, 0.4, z);
      scene.add(lk);
      /* Shoreline */
      var shore = new THREE.Mesh(new THREE.RingGeometry(r, r+5, 24),
        new THREE.MeshStandardMaterial({color: 0xd4b896, roughness: 1}));
      shore.rotation.x = -Math.PI/2;
      shore.position.set(x, 0.35, z);
      scene.add(shore);
      /* Gentle waves */
      var ph = Math.random() * 10;
      window._dynamics.push(function(t){
        waterMat.opacity = 0.6 + Math.sin(t * 0.8 + ph) * 0.15;
      });
    }

    /* Rivers connecting */
    function river(x1, z1, x2, z2){
      var len = Math.sqrt((x2-x1)*(x2-x1) + (z2-z1)*(z2-z1));
      var rv = new THREE.Mesh(new THREE.PlaneGeometry(12, len), waterMat);
      rv.rotation.x = -Math.PI/2;
      rv.position.set((x1+x2)/2, 0.38, (z1+z2)/2);
      rv.rotation.z = Math.atan2(x2-x1, z2-z1);
      scene.add(rv);
    }

    /* Build scenic areas */
    /* North — curved chain with lakes */
    mountainChain(-2000, -4000, 3000, 800, 350);
    lake(-2000, -3500, 120);
    lake(-1500, -3200, 80);
    river(-2000, -3500, -1500, -3200);

    /* South — bent range */
    mountainChain(2000, 4000, 3500, -600, 400);
    lake(2000, 3500, 150);
    river(200