<!-- SAGA · part 42 -->
Colors.length]);
    }

  }catch(e){}
}
if(typeof buildPeople === 'function'){ window._buildQueue.push(buildPeople); }















/* WORLD HEART — the crystal at the center of everything. 2026-10-04. */
function buildWorldHeart(){
  try{
    window._dynamics = window._dynamics || [];
    /* Massive crystal */
    var heart = new THREE.Mesh(new THREE.OctahedronGeometry(15, 0),
      new THREE.MeshStandardMaterial({
        color: 0xffd700, emissive: 0xaa7700, emissiveIntensity: 1,
        transparent: true, opacity: 0.9, roughness: 0.1, metalness: 0.3
      }));
    heart.position.set(0, 40, 0);
    scene.add(heart);
    /* Inner glow */
    var glow = new THREE.Mesh(new THREE.OctahedronGeometry(10, 0),
      new THREE.MeshBasicMaterial({color: 0xfff8dc, transparent: true, opacity: 0.6}));
    glow.position.set(0, 40, 0);
    scene.add(glow);
    /* Floating rings */
    for(var r = 0; r < 3; r++){
      (function(){
        var ring = new THREE.Mesh(new THREE.TorusGeometry(25 + r*10, 1, 8, 32),
          new THREE.MeshBasicMaterial({color: 0xd4a017, transparent: true, opacity: 0.5}));
        ring.position.set(0, 40, 0);
        ring.rotation.x = Math.PI/2 + r*0.3;
        scene.add(ring);
        window._dynamics.push(function(t){
          ring.rotation.z += 0.005 * (r+1);
        });
      })();
    }
    /* Pedestal */
    var ped = new THREE.Mesh(new THREE.CylinderGeometry(20, 25, 10, 8),
      new THREE.MeshStandardMaterial({color: 0x1a1a1a, roughness: 0.8}));
    ped.position.set(0, 5, 0);
    scene.add(ped);
    /* Pulse */
    window._dynamics.push(function(t){
      var pulse = 1 + Math.sin(t*2) * 0.1;
      heart.scale.set(pulse, pulse*1.2, pulse);
      heart.rotation.y += 0.01;
      heart.material.emissiveIntensity = 0.8 + Math.sin(t*2) * 0.4;
      glow.material.opacity = 0.4 + Math.sin(t*2) * 0.2;
    });
    /* Light beam to sky */
    var beam = new THREE.Mesh(new THREE.CylinderGeometry(3, 5, 500, 12),
      new THREE.MeshBasicMaterial({color: 0xffd700, transparent: true, opacity: 0.2, fog: false}));
    beam.position.set(0, 290, 0);
    scene.add(beam);
  }catch(e){}
}
if(typeof buildWorldHeart === 'function'){ window._buildQueue.push(buildWorldHeart); }

/* DYNAMIC RESOLUTION — adaptive pixel ratio for performance. 2026-10-04. */
(function(){
  var frameTimes = [];
  var lastT = performance.now();
  window._dynamics = window._dynamics || [];
  window._dynamics.push(function(){
    try{
      var now = performance.now();
      var dt = now - lastT;
      lastT = now;
      frameTimes.push(dt);
      if(frameTimes.length > 60) frameTimes.shift();
      if(frameTimes.length === 60){
        var avg = frameTimes.reduce(function(a,b){return a+b;}, 0) / 60;
        var fps = 1000 / avg;
        var pr = renderer.getPixelRatio();
        if(fps < 25 && pr > 0.6){
          renderer.setPixelRatio(Math.max(0.6, pr - 0.1));
        } else if(fps > 50 && pr < 1.25){
          renderer.setPixelRatio(Math.min(1.25, pr + 0.05));
        }
        frameTimes = [];
      }
    }catch(e){}
  });
})();

/* BRIDGE-TUNNEL HYBRID — Aqua-Line model. Bridge dives into tunnel. 2026-10-04. */
function buildAquaLine(){
  try{
    var concreteMat = new THREE.MeshStandardMaterial({color: 0x888888, roughness: 0.8});
    /* Bridge section: from shore */
    var bridge = new THREE.Mesh(new THREE.BoxGeometry(12, 3, 400), concreteMat);
    bridge.position.set(2900, 8, 500);
    scene.add(bridge);
    /* Pillars */
    for(var p = 0; p < 8; p++){
      var pillar = new THREE.Mesh(new THREE.CylinderGeometry(3, 4, 16, 8), concreteMat);
      pillar.position.set(2900, 0, 320 + p*50);
      scene.add(pillar);
    }
    /* Artificial island (Umihotaru) */
    var island = new THREE.Mesh(new THREE.CylinderGeometry(40, 45, 6, 16), concreteMat);
    island.position.set(2900, 2, 720);
    scene.add(island);
    var tower = new THREE.Mesh(new THREE.CylinderGeometry(8, 10, 30, 8), concreteMat);
    tower.position.set(2900, 18, 720);
    scene.add(tower);
    /* Tunnel portal — dives underwater */
    var portal = new THREE.Mesh(new THREE.BoxGeometry(16, 12, 4), concreteMat);
    portal.position.set(2900, 2, 745);
    scene.add(portal);
    var dark = new THREE.Mesh(new THREE.PlaneGeometry(12, 8),
      new THREE.MeshBasicMaterial({color: 0x000000}));
    dark.position.set(2900, 2, 747.1);
    dark.rotation.y = Math.PI;
    scene.add(dark);
  }catch(e){}
}
if(typeof buildAquaLine === 'function'){ window._buildQueue.push(buildAquaLine); }

/* TRANSITION BANDS — blend zones between districts, not hard borders. 2026-10-04. */
function buildTransitions(){
  try{
    /* Gradient strips where city meets forest, desert meets water, etc. */
    function blendZone(x1, z1, x2, z2, c1, c2){
      var dx = x2 - x1, dz = z2 - z1;
      var len = Math.sqrt(dx*dx + dz*dz);
      var segs = 10;
      for(var i = 0; i < segs; i++){
        var t = i / (segs - 1);
        var px = x1 + dx * t;
        var pz = z1 + dz *