<!-- RUBY-BACKUP · part 303 -->
)*sr));
          }
          var sgeo = new THREE.TubeGeometry(new THREE.CatmullRomCurve3(spts), 40, 0.12, 4, false);
          var sband = new THREE.Mesh(sgeo, goldLine);
          sband.name='phi-spiral-band'; scene.add(sband);
          ty += th;
          tw /= PHI;
          th /= PHI;
        }
        /* golden spiral crown */
        var crown = new THREE.Mesh(new THREE.ConeGeometry(tw*2, th*3, 8), goldMat);
        crown.position.set(150, ty+th*1.5, -100); crown.name='phi-crown'; scene.add(crown);
        /* 2. PHI GATES — archways over highways, golden rectangle proportions */
        var gateW = 21, gateH = 34; /* 34/21 = phi */
        for(var gg=0; gg<4; gg++){
          var gang2 = (gg/4)*Math.PI*2 + Math.PI/8;
          var gx2 = Math.cos(gang2)*200, gz2 = Math.sin(gang2)*200;
          var gpy2 = 10;
          try{ if(typeof fortifiedGroundY==='function') gpy2 = fortifiedGroundY(gx2, gz2); }catch(e){}
          /* two pillars */
          for(var gp=-1; gp<=1; gp+=2){
            var px = gx2 + (gang2%2? gp*gateW/2 : 0);
            var pz = gz2 + (gang2%2? 0 : gp*gateW/2);
            var pillar = new THREE.Mesh(new THREE.BoxGeometry(3, gateH, 3), goldMat);
            pillar.position.set(px, gpy2+gateH/2, pz);
            pillar.name='phi-gate-pillar'; scene.add(pillar);
          }
          /* lintel — golden rectangle */
          var lintel = new THREE.Mesh(new THREE.BoxGeometry(gateW+6, gateW/PHI, 4), goldMat);
          lintel.position.set(gx2, gpy2+gateH+gateW/(PHI*2), gz2);
          lintel.rotation.y = -gang2;
          lintel.name='phi-gate-lintel'; scene.add(lintel);
          /* engraved spiral on lintel */
          var lpts = [];
          for(var ls=0; ls<=30; ls++){
            var lt = ls/30;
            var lang = lt*Math.PI*3;
            var lr = 1+lt*4;
            lpts.push(new THREE.Vector3(gx2+Math.cos(lang)*lr, gpy2+gateH+gateW/(PHI*2), gz2+Math.sin(lang)*lr*0.3));
          }
          var lgeo = new THREE.TubeGeometry(new THREE.CatmullRomCurve3(lpts), 30, 0.08, 4, false);
          var lspiral = new THREE.Mesh(lgeo, goldLine);
          lspiral.name='phi-gate-spiral'; scene.add(lspiral);
        }
        /* 3. PHI PLAZA — golden rectangle extension, linework inlay */
        var ppy3 = 10;
        try{ if(typeof fortifiedGroundY==='function') ppy3 = fortifiedGroundY(-150, 150); }catch(e){}
        var pw = 55, pl = 89; /* 89/55 = phi */
        var plaza = new THREE.Mesh(new THREE.BoxGeometry(pw, 1, pl), goldMat);
        plaza.position.set(-150, ppy3+0.5, 150); plaza.name='phi-plaza'; scene.add(plaza);
        /* fibonacci spiral inlay — the linework */
        var fpts = [];
        var fa=0, fb=1;
        for(var fi=0; fi<8; fi++){
          var fr = fa*2;
          for(var fs=0; fs<=10; fs++){
            var ft = fs/10;
            var fang = ft*Math.PI/2 + fi*Math.PI/2;
            fpts.push(new THREE.Vector3(-150+Math.cos(fang)*fr, ppy3+1.1, 150+Math.sin(fang)*fr));
          }
          var nfab = fa+fb; fa=fb; fb=nfab;
        }
        var fgeo = new THREE.TubeGeometry(new THREE.CatmullRomCurve3(fpts), 80, 0.15, 4, false);
        var finlay = new THREE.Mesh(fgeo, holoMat);
        finlay.name='phi-plaza-spiral'; scene.add(finlay);
      }catch(e){}
    }, 30000);
    /* SOVEREIGN PALACE DISTRICT — extra fancy, Honolulu royal style, our gold */
    setTimeout(function(){
      try{
        var goldMat = new THREE.MeshStandardMaterial({color:0xffd700, metalness:0.95, roughness:0.15});
        var goldLeaf = new THREE.MeshStandardMaterial({color:0xffdf00, metalness:1.0, roughness:0.1});
        var koaMat = new THREE.MeshStandardMaterial({color:0x4a2c0a, roughness:0.6});
        var marbleMat = new THREE.MeshStandardMaterial({color:0xf5f5f0, roughness:0.3});
        var holoMat = new THREE.MeshBasicMaterial({color:0x00ffff, transparent:true, opacity:0.4});
        var glowMat = new THREE.MeshBasicMaterial({color:0xfff8dc});
        var ppy = 10;
        try{ if(typeof fortifiedGroundY==='function') ppy = fortifiedGroundY(-200, -100); }catch(e){}
        var PX = -200, PZ = -100;
        /* PALACE BASE — raised foundation */
        var pbase = new THREE.Mesh(new THREE.BoxGeometry(60, 6, 44), marbleMat);
        pbase.position.set(PX, ppy+3, PZ); pbase.name='palace-base'; scene.add(pbase);
        /* MAIN HALL — two stories */
        var hall1 = new THREE.Mesh(new THREE.BoxGeometry(50, 10, 36), goldMat);
        hall1.position.set(PX, ppy+11, PZ); hall1.name='palace-hall1'; scene.add(hall1);
        var hall2 = new THREE.Mesh(new THREE.BoxGeometry(46, 10, 32), goldLeaf);
        hall2.position.set(PX, ppy+21, PZ); hall2.name='palace-hall2'; scene.add(hall2);
        /* FOUR CORNER TOWERS — 60ft style */
        [[-25,-18],[25,-18],[-25,18],[25,18]].forEach(function(cn){
          var tower = new THREE.Mesh(new THREE.BoxGeometry(10, 32, 10), goldMat);
          tower.position.set(PX+cn[0], ppy+16, PZ+cn[1]); tower.name='