<!-- SAGA-SOLID · part 87 -->
00, 20);  /* Volcano area */
  cliffBoundary(-2000, 1920, 200, 20); /* Volcano area 2 */
  if(typeof say === 'function') say('Cliff boundaries raised');
}, 7000);

/* ===== MOUNTAIN BUILDER — lattice + fractal domes, unified. King's method 2026-10-06 ===== */
setTimeout(function buildMountains(){
  return; /* DISABLED 2026-10-06 — duplicate mountain code */
  var rockMat = new THREE.MeshStandardMaterial({color: 0x3a7a3a, roughness: 0.9}); /* GREEN */
  var seed = 12345;
  function rand(){ seed = (seed * 16807) % 2147483647; return (seed - 1) / 2147483646; }

  function makeDome(r, h, smooth){
    var g = new THREE.Group();
    /* Base — tapered cylinder */
    var baseH = h * 0.6;
    var base = new THREE.Mesh(new THREE.CylinderGeometry(r * 0.55, r, baseH, 20, 4), rockMat);
    base.position.y = baseH / 2;
    g.add(base);
    /* Dome top — sphere, smoother when smooth=1 */
    var domeR = r * 0.55;
    var dome = new THREE.Mesh(new THREE.SphereGeometry(domeR, 20, 14, 0, Math.PI*2, 0, Math.PI/2), rockMat);
    dome.position.y = baseH;
    if(smooth) dome.scale.y = 0.6; /* Flatter dome */
    g.add(dome);
    return g;
  }

  /* Lattice of primary mountains */
  var spacing = 800; /* Wider valleys */
  var primaries = [];
  for(var gx = -3600; gx <= 3600; gx += spacing){
    for(var gz = -3600; gz <= 3600; gz += spacing){
      var dc = Math.sqrt(gx*gx + gz*gz);
      if(dc < 600 || dc > 3400) continue; /* Closer — visible */
      var mx = gx + (rand()-0.5) * 350;
      var mz = gz + (rand()-0.5) * 350;
      var r = 80 + rand() * 100; /* Bigger */
      var h = 120 + rand() * 180; /* Taller */
      var m = makeDome(r, h, false);
      m.position.set(mx, 0, mz);
      m.rotation.y = rand() * Math.PI * 2;
      scene.add(m);
      primaries.push({x: mx, z: mz, r: r, h: h});
    }
  }

  /* Valleys preserved — no fractal fill. Space between mountains is sacred. */
  if(typeof say === 'function') say('Mountains built — valleys between');
}, 5000);

/* ===== GEOMETRIC PROTRUSIONS — on all mountains, flattened. King's order 2026-10-06 ===== */
setTimeout(function buildProtrusions(){
  return; /* DISABLED 2026-10-06 — fills valleys */
  var protrudeMat = new THREE.MeshStandardMaterial({color: 0x6a5a4a, roughness: 0.8, flatShading: true});
  var seed = 777;
  function rand(){ seed = (seed * 16807) % 2147483647; return (seed - 1) / 2147483646; }

  scene.traverse(function(obj){
    if(obj.isMesh && obj.geometry){
      var t = obj.geometry.type;
      /* Skip green lattice mountains — they're already perfect */
      if(obj.material && obj.material.color && obj.material.color.getHex() === 0x3a7a3a) return;
      if(t === 'ConeGeometry' || t === 'CylinderGeometry' || t === 'SphereGeometry'){
        obj.geometry.computeBoundingBox();
        var bb = obj.geometry.boundingBox;
        var h = bb.max.y - bb.min.y;
        var w = Math.max(bb.max.x - bb.min.x, bb.max.z - bb.min.z);
        if(h > 25 && w > 20){
          /* FLATTEN the mountain */
          obj.scale.y *= 0.55;
          /* Add geometric protrusions */
          var nProtrude = 4 + Math.floor(rand() * 4); /* 4-7 protrusions */
          for(var i = 0; i < nProtrude; i++){
            var ang = rand() * Math.PI * 2;
            var hgt = rand(); /* Height along mountain (0=base, 1=top) */
            var r = (w / 2) * (1 - hgt * 0.6); /* Radius at this height */
            var px = obj.position.x + Math.cos(ang) * r;
            var pz = obj.position.z + Math.sin(ang) * r;
            var py = obj.position.y + (hgt * h * 0.55) - h * 0.1;
            /* Geometric shape — box, angular */
            var pw = 8 + rand() * 20;
            var ph = 15 + rand() * 35;
            var pd = 8 + rand() * 20;
            var prot = new THREE.Mesh(new THREE.BoxGeometry(pw, ph, pd, 2, 3, 2), protrudeMat);
            /* Jitter vertices for ruggedness */
            var pp = prot.geometry.attributes.position;
            for(var v = 0; v < pp.count; v++){
              pp.setX(v, pp.getX(v) + (rand()-0.5) * 4);
              pp.setZ(v, pp.getZ(v) + (rand()-0.5) * 4);
            }
            prot.geometry.computeVertexNormals();
            prot.position.set(px, py, pz);
            prot.rotation.y = ang;
            prot.rotation.z = (rand()-0.5) * 0.3;
            /* Protrude outward */
            prot.translateX(pw * 0.3);
            scene.add(prot);
          }
        }
      }
    }
  });
  if(typeof say === 'function') say('Protrusions raised');
}, 9000);

window.__sagaExecMark('L7600');

/* ===== SOLID MOUNTAINS — Soul Print's code, King's order 2026-10-06 ===== */
window._mountains = []; /* CLEARED 2026-10-07 — stale mountain purge, King's word */
function solidifyTerrain(mountainMesh){
  mountainMesh.geometry.computeBoundingBox();
  mountainMesh.geometry.computeBoundingSphere();
  mountainMesh.castShadow = true;
  mountainMesh.receiveShadow = true;
  if(window._targets && !window._targets.includes(mountainMesh)){
    wi