<!-- SOLID CITY · part 2130 -->
w._hyperBeams = [];
  window._hyperBeams.push(beam);

  // ---- BUOYS (channel markers) ----
  if (!window._hyperBuoys) window._hyperBuoys = [];
  for (var bi=0; bi<6; bi++) {
    var buX = -660 - bi*16, buZ = (bi%2 ? 95 : -95);
    var buM = new T.MeshLambertMaterial({color: bi%2 ? 0x3aa84a : 0xc84a3a});
    var buoy = new T.Mesh(new T.CylinderGeometry(1.6,2.2,4.5,8), buM);
    buoy.position.set(buX, -2, buZ); buoy.name = 'buoy';
    buoy.userData.ph = bi*1.3;
    root.add(buoy);
    var bl = new T.Mesh(new T.SphereGeometry(0.65,8,6), new T.MeshBasicMaterial({color: 0xffe8a0, transparent: true}));
    bl.position.set(buX, 0.9, buZ); bl.name = 'buoylight'; bl.userData.ph = bi*1.3;
    root.add(bl);
    window._hyperBuoys.push(buoy); window._hyperBuoys.push(bl);
  }

  // ---- FORKLIFTS ----
  var forkM = new T.MeshLambertMaterial({color: 0xe8b83a});
  [[-540,-40],[-520,30],[-550,95]].forEach(function(fp){
    box(3.2,2,2.2,forkM, fp[0],2,fp[1]);
    box(1.8,1.6,2,forkM, fp[0]-0.5,3.6,fp[1]); // cab
    box(0.4,3.4,2,steel, fp[0]+1.8,2.7,fp[1]); // mast
    box(2.2,0.25,1.6,steel, fp[0]+3,1.2,fp[1]); // forks
    // wheels
    box(0.8,0.8,0.4,darkM, fp[0]-1,1,fp[1]+1.2);
    box(0.8,0.8,0.4,darkM, fp[0]-1,1,fp[1]-1.2);
    box(0.8,0.8,0.4,darkM, fp[0]+1,1,fp[1]+1.2);
    box(0.8,0.8,0.4,darkM, fp[0]+1,1,fp[1]-1.2);
    solid(fp[0],fp[1],4.5,2.5,0,4);
  });

  // ---- PALLETS + CRATES + ROPE COILS ----
  var crateM = new T.MeshLambertMaterial({color: 0x8a6a48});
  for (var pi=0; pi<10; pi++) {
    var px3 = -560 + ((pi*37)%70), pz3 = -115 + ((pi*53)%230);
    if (Math.abs(pz3) < 20) pz3 += 40;
    box(2.2,0.3,2.2,crateM, px3,1.7,pz3);
    var ch = 1 + (pi%2);
    for (var cl=0; cl<ch; cl++) box(1.9,1.4,1.9,crateM, px3,2.6+cl*1.5,pz3);
    solid(px3,pz3,2.2,2.2,0,2+ch*1.5);
  }
  var ropeM = new T.MeshLambertMaterial({color: 0xa88a5a});
  [[-535,-70],[-515,60]].forEach(function(rp2){
    var coil = new T.Mesh(new T.TorusGeometry(1.2,0.45,8,18), ropeM);
    coil.position.set(rp2[0],2.1,rp2[1]); coil.rotation.x = Math.PI/2;
    root.add(coil);
    solid(rp2[0],rp2[1],2.4,2.4,0,2.5);
  });

  // harbor sign
  var hs = new T.Mesh(new T.PlaneGeometry(10,2.5),
    new T.MeshBasicMaterial({map: BM.sign('THE HARBOR')}));
  hs.position.set(-472,6,0); hs.rotation.y = Math.PI/2; root.add(hs);
}

export function createHyperCity(o){
  var T=o.THREE,P=o.position||{x:0,y:0,z:0};
  var root=new T.Group();root.name='hyper-city';root.position.set(P.x,P.y,P.z);
  var foot=[];
  var R=mulberry(1379);
  var PHI=1.6180339887;
  // materials
  var glassA=new T.MeshLambertMaterial({map:facadeTex(T),emissive:0x1a2a40,emissiveIntensity:0.35});
  var glassB=new T.MeshLambertMaterial({map:facadeTex(T,'rgba(30,50,80,0.5)'),emissive:0x16263c,emissiveIntensity:0.35});
  var steel=new T.MeshLambertMaterial({color:0x3a4048});
  var darkSteel=new T.MeshLambertMaterial({color:0x23272e});
  var gold=new T.MeshLambertMaterial({color:0xd8aa48,emissive:0x4a2e08,emissiveIntensity:0.7});
  var deckM=new T.MeshLambertMaterial({color:0x2c313a});
  var roadM=new T.MeshLambertMaterial({color:0x1e2228});
  var goldTrim=new T.MeshBasicMaterial({color:0xd8aa48});

  // ---- podium: the district platform (420 x 380), skirted ----
  var pod=new T.Mesh(new T.BoxGeometry(420,10,380),deckM);
  pod.position.y=-5;root.add(pod);
  var podRim=new T.Mesh(new T.BoxGeometry(424,1.2,384),steel);
  podRim.position.y=0.1;root.add(podRim);
  foot.push([0,0,424,384,-10,0.4,0]); // walkable top is implicit (podium); block below

  // ---- streets: grid avenues (visual strips on the podium) ----
  var i;
  for(i=-1;i<=1;i++){
    var av=new T.Mesh(new T.BoxGeometry(420,0.3,14),roadM);
    av.position.set(0,0.35,i*90);root.add(av);
    var av2=new T.Mesh(new T.BoxGeometry(14,0.3,380),roadM);
    av2.position.set(i*110,0.35,0);root.add(av2);
  }
  // streetlights along avenues
  var lampG=new T.CylinderGeometry(0.3,0.4,9,6);
  var lampM=new T.MeshLambertMaterial({color:0x444a54});
  var bulbM=new T.MeshBasicMaterial({color:0xffe8a0});
  for(i=-3;i<=3;i++){
    [-135,-45,45,135].forEach(function(z){
      var lx=i*60;
      if(Math.abs(lx)<25&&Math.abs(z)<25)return; // not in plaza
      var pole=new T.Mesh(lampG,lampM);pole.position.set(lx,4.5,z);root.add(pole);
      var bulb=new T.Mesh(new T.SphereGeometry(0.7,8,6),bulbM);bulb.position.set(lx,9.2,z);root.add(bulb);
      foot.push([lx,z,1,1,0,9,0]);
    });
    [-100,0,100].forEach(function(x){
      var lz=i*60;
      if(Math.abs(x)<25&&Math.abs(lz)<25)return;
      var pole2=new T.Mesh(lampG,lampM);pole2.position.set(x,4.5,lz);root.add(pole2);
      var bulb2=new T.Mesh(new T.SphereGeometry(0.7,8,6),bulbM);bulb2.position.set(x,9.2,lz);root.add(bulb2);
      foot.push([x,lz,1,1,0,9,0]);
    });
  }
  // planters
  var planterM=new T.MeshLambertMaterial({color:0x3a3226});
  var leafM=new T.MeshLambertMaterial({color:0x2e6a34});
  for(i=0;i<16;i++){
    var px=-180+R()*360, pz=-160+R()*320;
   