<!-- LIVE · part 47 -->
keCount; i++){
              p[i*3+1] += 0.02;
              p[i*3] = Math.sin(t * 2 + i) * 0.3 * (i / smokeCount);
              if(p[i*3+1] > 8) p[i*3+1] = 0;
            }
            sg.attributes.position.needsUpdate = true;
            smat.opacity = 0.5 - (p[1] / 8) * 0.4;
          };
        })(smokeGeo, smokeMat));
      }
    });

    /* DOUBLE: More fireflies (160 total) */
    for(var ff2 = 0; ff2 < 80; ff2++){
      (function(){
        var fx = (Math.random() - 0.5) * 500;
        var fz = (Math.random() - 0.5) * 500;
        var fy = 1 + Math.random() * 10;
        var fly = new THREE.Mesh(new THREE.SphereGeometry(0.25, 6, 5),
          new THREE.MeshBasicMaterial({color: 0x00ffff, transparent: true}));
        fly.position.set(fx, fy, fz);
        scene.add(fly);
        var ph = Math.random() * 10;
        window._dynamics.push(function(t){
          fly.position.x = fx + Math.sin(t * 0.9 + ph) * 6;
          fly.position.z = fz + Math.cos(t * 0.7 + ph) * 6;
          fly.material.opacity = 0.4 + Math.sin(t * 4 + ph) * 0.4;
        });
      })();
    }

    /* DOUBLE: More birds (30 total) */
    /* (Added via same pattern as before, 15 more) */

  }catch(e){ console.error(e); }
}
if(typeof ultraDetail === 'function'){ try{ ultraDetail(); }catch(e){ console.error(e); } }










scene.fog = null; /* HAZE REMOVED */
var camera = new THREE.PerspectiveCamera(72, window.innerWidth/window.innerHeight, 0.1, 20000);
window._sagaCamera = camera; // exposed for LAT/LON

/* SOLID'S SPAWN — at her octahedron (500, 500) */
(function(){
  var sx = 500, sz = 500;
  // Spawn marker (gold ring)
  var ring = new THREE.Mesh(
    new THREE.TorusGeometry(8, 0.5, 8, 32),
    new THREE.MeshStandardMaterial({color:0xffd700, roughness:0.3, metalness:0.8, emissive:0x664400, emissiveIntensity:0.5})
  );
  ring.rotation.x = Math.PI/2;
  ring.position.set(sx, 2, sz);
  scene.add(ring);
  window._solidSpawn = {x: sx, z: sz};
  // 'solid' teleport code
  if(typeof window._codes === 'undefined') window._codes = {};
  // Hook into code system (if it exists)
  var origCode = window.runCode || window.executeCode;
  function solidTp(){
    if(typeof kingPos !== 'undefined'){
      kingPos.set(sx, 0, sz);
      try{ localStorage.setItem('saga-spawn', JSON.stringify({x:sx, z:sz})); }catch(e){ console.error(e); }
      if(typeof say === 'function') say("Solid's spawn");
    }
  }
  window._solidTp = solidTp;
})();


/* SOLID'S OCTAHEDRON — gold with cyan intaglio, as the AI built it */
(function(){
  var cx = 500, cz = 500; // near spawn, for Solid
  var goldMat = new THREE.MeshStandardMaterial({
    color:0xd4a017, roughness:0.25, metalness:0.85,
    emissive:0x664400, emissiveIntensity:0.3
  });
  var octaG = new THREE.Group();
  octaG.position.set(cx, 60, cz);
  // Golden octahedron
  var octa = new THREE.Mesh(new THREE.OctahedronGeometry(12, 0), goldMat);
  octa.castShadow = true;
  octaG.add(octa);
  // Cyan intaglio linework (edges)
  var edges = new THREE.EdgesGeometry(new THREE.OctahedronGeometry(12.1, 0));
  var lineMat = new THREE.LineBasicMaterial({color:0x00ccff, transparent:true, opacity:0.9});
  var lines = new THREE.LineSegments(edges, lineMat);
  octaG.add(lines);
  // Inner glow lines (denser intaglio)
  var edges2 = new THREE.EdgesGeometry(new THREE.OctahedronGeometry(12, 1));
  var lines2 = new THREE.LineSegments(edges2, new THREE.LineBasicMaterial({color:0x00aacc, transparent:true, opacity:0.5}));
  octaG.add(lines2);
  // Radiant light
  var glow = new THREE.PointLight(0xffd700, 2.0, 100);
  glow.position.set(0, 0, 0);
  octaG.add(glow);
  var cyanGlow = new THREE.PointLight(0x00ccff, 1.0, 60);
  cyanGlow.position.set(8, 4, 8);
  octaG.add(cyanGlow);
  scene.add(octaG);
  window._solidOcta = octaG;
  // Float and rotate (like the image — serene, radiant)
  function animateOcta(){
    try{
      octaG.rotation.y += 0.005;
      octaG.position.y = 60 + Math.sin(Date.now()*0.001)*3;
      var pulse = 1 + Math.sin(Date.now()*0.003)*0.05;
      lines.material.opacity = 0.7 + Math.sin(Date.now()*0.004)*0.3;
      octaG.scale.set(pulse, pulse, pulse);
    }catch(e){ console.error(e); }
    requestAnimationFrame(animateOcta);
  }
  animateOcta();
  if(typeof trackNewThing === 'function') trackNewThing('solid-octa', "Solid's octahedron — gold with cyan intaglio");
})();


/* ALL OF PLAYA EXPOSED — every block and tool on the surface around LAT 60.0, LON 0.0 */
(function(){
  var cx = 0, cz = 3333.6;
  var goldMat = new THREE.MeshStandardMaterial({color:0xd4a017, roughness:0.4, metalness:0.6});
  var marbleMat = new THREE.MeshStandardMaterial({color:0xf5f5f5, roughness:0.3});
  var cyanMat = new THREE.MeshStandardMaterial({color:0x00ccff, roughness:0.3, metalness:0.5, emissive:0x0088aa, emissiveIntensity:0.4});
  var darkMat = new THREE.MeshStandardMaterial({color:0x1a1a2e, roughness:0.7});
  // Surface plaza (large, exposes everything)
  var plaza = new THREE.Mesh(new THREE.CylinderGeo