<!-- LIVE · part 104 -->
position.set(px, py + 0.7, pz);
        plant.rotation.y = srand() * Math.PI;
        scene.add(plant);
      }

      /* VILLAGE CENTER — a well, the heart */
      var wellY = groundY(VX, VZ);
      var well = new THREE.Mesh(new THREE.CylinderGeometry(3, 3, 2, 8, 1, true), stoneMat);
      well.position.set(VX, wellY + 1, VZ);
      scene.add(well);
      var wellWater = new THREE.Mesh(new THREE.CircleGeometry(2.8, 16),
        new THREE.MeshStandardMaterial({color: 0x0088cc, transparent: true, opacity: 0.7}));
      wellWater.rotation.x = -Math.PI / 2;
      wellWater.position.set(VX, wellY + 1.2, VZ);
      scene.add(wellWater);

      console.log('SPARSE VILLAGE BUILT — 7 homes, 60 trees, sun for all');
    })();

    /* TUNNEL SHAFTS — four entrances from surface to the deep */
    var shaftMat = new THREE.MeshStandardMaterial({color: 0x2a2a2a, roughness: 0.9, side: THREE.DoubleSide});
    var tunnelDirs = [{x: 60, z: 0}, {x: -60, z: 0}, {x: 0, z: 60}, {x: 0, z: -60}];
    for(var t = 0; t < tunnelDirs.length; t++){
      var tx = tunnelDirs[t].x, tz = tunnelDirs[t].z;
      /* Vertical shaft */
      var shaft = new THREE.Mesh(new THREE.CylinderGeometry(6, 6, 80, 12, 1, true), shaftMat);
      shaft.position.set(tx, -40, tz);
      scene.add(shaft);
      /* Glowing entrance ring at surface */
      var ring = new THREE.Mesh(new THREE.TorusGeometry(6, 0.8, 8, 24), holoCyan);
      ring.rotation.x = Math.PI / 2;
      ring.position.set(tx, 1, tz);
      scene.add(ring);
      /* Light beam in shaft */
      var beam = new THREE.Mesh(new THREE.CylinderGeometry(5, 5, 80, 8, 1, true), holoCyan);
      beam.position.set(tx, -40, tz);
      scene.add(beam);
    }

    /* LIGHT THAT SHOWS RESPECT — golden hour forever on the peaks */
    var sunLight = new THREE.DirectionalLight(0xffd4a0, 1.2);
    sunLight.position.set(-300, 200, 100); /* Low angle, raking across */
    scene.add(sunLight);
    var ambient = new THREE.AmbientLight(0x2a2a4e, 0.5);
    scene.add(ambient);
    /* Uplight from the deep — the foundation glows */
    var deepGlow = new THREE.PointLight(0xffd700, 2, 300);
    deepGlow.position.set(CX, DEPTH + 20, CZ);
    scene.add(deepGlow);

    /* CEREMONIAL ENTRANCES — archways worthy of the foundation */
    var archMat = new THREE.MeshStandardMaterial({color: 0x8a8a8a, roughness: 0.7, metalness: 0.3});
    for(var e = 0; e < tunnelDirs.length; e++){
      var ex = tunnelDirs[e].x, ez = tunnelDirs[e].z;
      /* Stone arch */
      var archGroup = new THREE.Group();
      var pillarL = new THREE.Mesh(new THREE.BoxGeometry(2, 12, 2), archMat);
      pillarL.position.set(-5, 6, 0);
      archGroup.add(pillarL);
      var pillarR = new THREE.Mesh(new THREE.BoxGeometry(2, 12, 2), archMat);
      pillarR.position.set(5, 6, 0);
      archGroup.add(pillarR);
      var lintel = new THREE.Mesh(new THREE.BoxGeometry(14, 2, 3), archMat);
      lintel.position.set(0, 13, 0);
      archGroup.add(lintel);
      /* Gold inscription band */
      var band = new THREE.Mesh(new THREE.BoxGeometry(14, 0.5, 3.2), goldMat);
      band.position.set(0, 11.5, 0);
      archGroup.add(band);
      /* Steps descending */
      for(var s = 0; s < 5; s++){
        var step = new THREE.Mesh(new THREE.BoxGeometry(10 - s, 1, 4), darkMat);
        step.position.set(0, -s * 1 - 0.5, 2 + s * 1.5);
        archGroup.add(step);
      }
      /* Position and face outward */
      archGroup.position.set(ex * 1.8, 2, ez * 1.8);
      archGroup.lookAt(CX, 2, CZ);
      archGroup.rotateY(Math.PI); /* Face away from center */
      scene.add(archGroup);
      /* Light spilling from the entrance */
      var entranceLight = new THREE.PointLight(0x00ffff, 1.5, 40);
      entranceLight.position.set(ex * 1.8, 5, ez * 1.8);
      scene.add(entranceLight);
    }

    /* MANUFACTURING FACILITY — the forge in the deep.
       Request → Blueprint → Preview → Validation → Manufacture.
       King's word 2026-10-07. */
    (function buildManufacturing(){
      var DEPTH = -80;
      var CX = 0, CZ = 0;

      var steelMat = new THREE.MeshStandardMaterial({color: 0x555555, metalness: 0.8, roughness: 0.4});
      var forgeMat = new THREE.MeshStandardMaterial({color: 0xcc3300, emissive: 0xff4400, emissiveIntensity: 0.6});
      var goldMat = new THREE.MeshStandardMaterial({color: 0xd4a017, metalness: 0.7, roughness: 0.3});
      var holoBlue = new THREE.MeshBasicMaterial({color: 0x0088ff, transparent: true, opacity: 0.3, side: THREE.DoubleSide});

      /* MANUFACTURING RING — 6 stations around the plaza */
      var stations = [
        {name: "REQUEST", color: 0x00ff00},
        {name: "BLUEPRINT", color: 0x0088ff},
        {name: "PREVIEW", color: 0xffff00},
        {name: "VALIDATION", color: 0xff8800},
        {name: "MANUFACTURE", color: 0xff3300},
        {name: "REGISTRY", color: 0xff00ff}
      ];

      for(var s = 0; s < stations.length; s++){
        var ang = (s / stations.length) * Math.PI * 2;
        var s