<!-- RUBY-BACKUP · part 518 -->
 new THREE.MeshStandardMaterial({map:tex}));
          var sd=Math.sqrt(ex[2]*ex[2]+ex[3]*ex[3]);
          var sh=10+Math.sin(sd*0.02)*4+Math.sin(sd*0.05+1.3)*2;
          sign.position.set(ex[2], sh+6, ex[3]);
          sign.name='overhead-sign';
          g.add(sign);
          // gantry posts
          [-6,6].forEach(function(off){
            var gp=new THREE.Mesh(new THREE.CylinderGeometry(0.3,0.3,8,8), poleMat2);
            gp.position.set(ex[2]+off, sh+2, ex[3]);
            gp.name='gantry-post';
            g.add(gp);
          });
          var beam=new THREE.Mesh(new THREE.BoxGeometry(14,0.5,0.5), poleMat2);
          beam.position.set(ex[2], sh+6, ex[3]);
          beam.name='gantry-beam';
          g.add(beam);
        });
        // on/off ramps — connect highways to ground
        [[100,50],[-100,-50],[50,-100],[-50,100]].forEach(function(pt){
          var rampCurve=new THREE.CatmullRomCurve3([
            new THREE.Vector3(pt[0], 10, pt[1]),
            new THREE.Vector3(pt[0]*1.2, 5, pt[1]*1.2),
            new THREE.Vector3(pt[0]*1.4, 0.5, pt[1]*1.4)
          ]);
          var rampGeo=new THREE.TubeGeometry(rampCurve, 16, 3, 8, false);
          rampGeo.scale(1, 0.3, 1);
          var ramp=new THREE.Mesh(rampGeo, new THREE.MeshStandardMaterial({color:0x1a1a1a, roughness:0.9}));
          ramp.name='onramp';
          g.add(ramp);
        });
      }catch(e){}
    })();
    /* TUNNELS — highways pierce the high ground */
    (function(){
      try{
        var tunMat = new THREE.MeshStandardMaterial({color:0x2a2a2a, roughness:0.7, side:THREE.DoubleSide});
        var portMat = new THREE.MeshStandardMaterial({color:0x8b7355, roughness:0.8});
        var tunLightMat = new THREE.MeshBasicMaterial({color:0xffee88});
        // tunnel locations: where highways meet high terrain
        var tunnels = [
          {x: 300, z: 100, dir: 0.5},
          {x: -250, z: -200, dir: 2.1},
          {x: 150, z: -350, dir: 1.2},
          {x: -400, z: 300, dir: 3.8}
        ];
        tunnels.forEach(function(t, ti){
          var td = Math.sqrt(t.x*t.x + t.z*t.z);
          var th = 10 + Math.sin(td*0.02)*4 + Math.sin(td*0.05+1.3)*2;
          // tunnel tube (through the hill)
          var tunLen = 40;
          var tunGeo = new THREE.CylinderGeometry(6, 6, tunLen, 16, 1, true, 0, Math.PI);
          var tun = new THREE.Mesh(tunGeo, tunMat);
          // orient along direction
          tun.rotation.z = Math.PI/2;
          tun.rotation.y = t.dir;
          tun.position.set(t.x, th+2, t.z);
          tun.name = 'tunnel-'+ti;
          g.add(tun);
          // entrance portals (both ends)
          [-1, 1].forEach(function(s){
            var px = t.x + Math.cos(t.dir)*s*tunLen/2;
            var pz = t.z + Math.sin(t.dir)*s*tunLen/2;
            // stone portal frame
            var portal = new THREE.Mesh(new THREE.TorusGeometry(7, 1.2, 8, 16, Math.PI), portMat);
            portal.position.set(px, th+2, pz);
            portal.rotation.y = t.dir + Math.PI/2;
            portal.name = 'tunnel-portal-'+ti+'-'+s;
            g.add(portal);
            // lights inside
            for(var li=1; li<=3; li++){
              var lx = t.x + Math.cos(t.dir)*s*(tunLen/2 - li*8);
              var lz = t.z + Math.sin(t.dir)*s*(tunLen/2 - li*8);
              var lamp = new THREE.Mesh(new THREE.SphereGeometry(0.5, 8, 8), tunLightMat);
              lamp.position.set(lx, th+7, lz);
              lamp.name = 'tunnel-light';
              g.add(lamp);
            }
          });
          // hill over the tunnel
          var hill = new THREE.Mesh(new THREE.SphereGeometry(20, 12, 8),
            new THREE.MeshStandardMaterial({color:0x2d5016, roughness:1}));
          hill.scale.set(1.5, 0.8, 1);
          hill.position.set(t.x, th-2, t.z);
          hill.name = 'tunnel-hill-'+ti;
          g.add(hill);
        });
      }catch(e){}
    })();
    /* SPACE AGE — the future rises along the highways */
    (function(){
      try{
        var bldMat = new THREE.MeshStandardMaterial({color:0x1a1a2e, metalness:0.8, roughness:0.3});
        var glassMat = new THREE.MeshStandardMaterial({color:0x00ffff, emissive:0x00ffff, emissiveIntensity:0.4, transparent:true, opacity:0.7});
        var glowMat = new THREE.MeshBasicMaterial({color:0xff00ff});
        // futuristic districts at highway intersections
        var districts = [
          {x: 200, z: 200, size: 1.5},
          {x: -300, z: 150, size: 1.2},
          {x: 150, z: -300, size: 1.3},
          {x: -200, z: -250, size: 1.0},
          {x: 400, z: -100, size: 1.4},
          {x: -400, z: -100, size: 1.1}
        ];
        districts.forEach(function(d, di){
          var gy = fortifiedGroundY(d.x, d.z);
          var n = Math.floor(8 * d.size);
          for(var i=0; i<n; i++){
            var bx = d.x + (Math.random()-0.5)*120*d.size;
            var bz = d.z + (Math.random()-0.5)*120*d.size;
            // skip if on highway
     