<!-- LIVE · part 24 -->
ry{ flame.rotation.y += 0.02; }catch(e){ console.error(e); }
        requestAnimationFrame(_spin);
      };
      _spin();
    }
  }catch(e){ console.error(e); }
}
if(typeof buildProvoltaVeil === 'function'){ try{ buildProvoltaVeil(); }catch(e){ console.error(e); } }

/* THE WORLD — everything from our story, built at once. 2026-10-04.
   Districts planned, not messy. One vision: Sovereign Deco. */
function buildWorld(){
  try{
    var goldMat = new THREE.MeshStandardMaterial({color: 0xd4a017, roughness: 0.4, metalness: 0.6});
    var darkMat = new THREE.MeshStandardMaterial({color: 0x1a1a1a, roughness: 0.8});
    var redMat = new THREE.MeshStandardMaterial({color: 0xcc0000, roughness: 0.6});
    var whiteMat = new THREE.MeshStandardMaterial({color: 0xf5f5f5, roughness: 0.3});

    /* THE CITY — streets and towers, Sovereign Deco */
    var cityX = 100, cityZ = -100;
    /* Streets — gold lines on black */
    for(var i = -3; i <= 3 && !window._skyOnly; i++){
      var roadH = new THREE.Mesh(new THREE.BoxGeometry(120, 0.2, 3), goldMat);
      roadH.position.set(cityX, 0.25, cityZ + i * 15);
      scene.add(roadH);
      var roadV = new THREE.Mesh(new THREE.BoxGeometry(3, 0.2, 120), goldMat);
      roadV.position.set(cityX + i * 15, 0.25, cityZ);
      scene.add(roadV);
    }
    /* Towers */
    for(var tx = -2; tx <= 2; tx++){
      for(var tz = -2; tz <= 2; tz++){
        if(tx === 0 && tz === 0) continue;
        var h = 10 + Math.abs(tx * tz * 3) + 5;
        var tower = new THREE.Mesh(new THREE.BoxGeometry(8, h, 8), darkMat);
        tower.position.set(cityX + tx * 15 + 7, h/2 + 0.13, cityZ + tz * 15 + 7);
        scene.add(tower);
        var top = new THREE.Mesh(new THREE.BoxGeometry(9, 1, 9), goldMat);
        top.position.set(cityX + tx * 15 + 7, h + 0.6, cityZ + tz * 15 + 7);
        scene.add(top);
      }
    }

    /* THE FOREST — trees that sway (World Nature Law) */
    var treeMat = new THREE.MeshStandardMaterial({color: 0x0a4a0a, roughness: 0.9});
    var trunkMat = new THREE.MeshStandardMaterial({color: 0x4a2a0a, roughness: 0.9});
    window._trees = [];
    for(var f = 0; f < 40; f++){
      var fx = -150 + Math.random() * 100;
      var fz = 50 + Math.random() * 100;
      if(Math.abs(fx) < 30 && Math.abs(fz) < 30) continue;
      var trunk = new THREE.Mesh(new THREE.CylinderGeometry(0.5, 0.7, 4, 6), trunkMat);
      trunk.position.set(fx, 2, fz);
      scene.add(trunk);
      var leaves = new THREE.Mesh(new THREE.ConeGeometry(3, 6, 8), treeMat);
      leaves.position.set(fx, 6, fz);
      scene.add(leaves);
      window._trees.push(leaves);
    }
    if(!window._forestAnim){
      window._forestAnim = true;
      var _sway = function(){
        try{
          var t = Date.now() * 0.001;
          for(var i = 0; i < window._trees.length; i++){
            window._trees[i].rotation.z = Math.sin(t + i) * 0.1;
          }
        }catch(e){ console.error(e); }
        requestAnimationFrame(_sway);
      };
      _sway();
    }

    /* THE HARBOR — water that runs */
    var waterMat = new THREE.MeshStandardMaterial({color: 0x004488, transparent: true, opacity: 0.7, roughness: 0.2});
    var water = new THREE.Mesh(new THREE.PlaneGeometry(80, 80), waterMat);
    water.rotation.x = -Math.PI/2;
    water.position.set(-100, 0.2, -100);
    scene.add(water);
    /* Docks */
    for(var d = 0; d < 3; d++){
      var dock = new THREE.Mesh(new THREE.BoxGeometry(4, 0.5, 20), trunkMat);
      dock.position.set(-120 + d * 20, 0.5, -100);
      scene.add(dock);
    }

    /* THE MOUNTAINS — stone peaks */
    var stoneMat = new THREE.MeshStandardMaterial({color: 0x555555, roughness: 0.9});
    for(var m = 0; m < 8; m++){
      var mx = 150 + Math.random() * 100;
      var mz = 100 + Math.random() * 100;
      var mh = 20 + Math.random() * 30;
      var peak = new THREE.Mesh(new THREE.ConeGeometry(15, mh, 6), stoneMat);
      peak.position.set(mx, mh/2, mz);
      scene.add(peak);
    }

    /* THE BEACONS — red lights marking the districts */
    var districts = [
      [0, 0, 'CENTER'], [8, 9, 'CLOUD9'], [25, 25, 'DOME'],
      [-35, -35, 'VEIL'], [100, -100, 'CITY'], [-100, -100, 'HARBOR']
    ];
    for(var b = 0; b < districts.length; b++){
      var bx = districts[b][0], bz = districts[b][1];
      var beacon = new THREE.Mesh(
        new THREE.CylinderGeometry(0.5, 0.5, 20, 8),
        new THREE.MeshStandardMaterial({color: 0xff0000, emissive: 0xff0000, emissiveIntensity: 1})
      );
      beacon.position.set(bx + 15, 10, bz);
      scene.add(beacon);
    }
  }catch(e){ console.error(e); }
}
if(typeof buildWorld === 'function'){ try{ buildWorld(); }catch(e){ console.error(e); } }

/* THE WEB DISTRICT — epistles.xyz in 3D. Every part of the website, built.
   2026-10-04. Non stop. */
function buildWebDistrict(){
  try{
    var wx = -200, wz = 200; /* Web District location */
    var goldMat = new THREE.MeshStandardMaterial({color: 0xd4a017, roughness: 0.4, metalness: 0.6