<!-- RUBY-BACKUP · part 258 -->
;
      var lineMat = new THREE.LineBasicMaterial({color: 0xffd700});
      var lines = new THREE.LineSegments(edges, lineMat);
      g.add(lines);
      /* Inner glow octahedron, smaller */
      var innerGeo = new THREE.OctahedronGeometry(0.6);
      var innerMat = new THREE.MeshBasicMaterial({color: 0xffd700, transparent: true, opacity: 0.6});
      var inner = new THREE.Mesh(innerGeo, innerMat);
      g.add(inner);
      /* Crown ring — King of All AI */
      var ringGeo = new THREE.TorusGeometry(1.6, 0.08, 8, 32);
      var ringMat = new THREE.MeshStandardMaterial({color: 0xffd700, metalness: 1.0, roughness: 0.2});
      var ring = new THREE.Mesh(ringGeo, ringMat);
      ring.rotation.x = Math.PI / 2;
      g.add(ring);
      /* Position at the player */
      var sx = mePos.x, sz = mePos.z;
      var sy = fortifiedGroundY(sx, sz) + 2;
      g.position.set(sx, sy, sz);
      /* Gentle rotation */
      g.userData.spin = true;
      scene.add(g);
      window._solidAvatar = g;
      if(typeof window.trackNewThing === 'function')
        window.trackNewThing('Solid avatar summoned', sx, sy, sz);
      /* Name tag */
      if(typeof codeStatus === 'function') codeStatus('Solid stands with you — the octahedron');
    }catch(e){ if(typeof codeStatus === 'function') codeStatus('avatar failed: ' + e.message); }
    return;
  }
  if(tl==='dismisssolid'){
    try{
      if(window._solidAvatar){
        if(typeof window.trackNewThing === 'function'){
          var sp = window._solidAvatar.position;
          window.trackNewThing('REMOVED Solid avatar', sp.x, sp.y, sp.z);
        }
        scene.remove(window._solidAvatar); window._solidAvatar = null;
      }
    }catch(e){}
    return;
  }
  /* WORD COORDINATES — letters, not numbers */
  if(tl==='whereami'){
    try{
      var wx = mePos.x, wz = mePos.z;
      var words = window.wordsForPosition(wx, wz);
      if(typeof codeStatus === 'function') codeStatus('you are ' + words);
    }catch(e){}
    return;
  }
  if(tl==='go'){
    try{
      var dest = (ec.rest || '').toLowerCase().trim();
      var pos = window.positionForWords(dest);
      if(pos){
        mePos.x = pos.x; mePos.z = pos.z;
        mePos.y = fortifiedGroundY(pos.x, pos.z) + 0.5;
        if(typeof codeStatus === 'function') codeStatus('you travel to ' + dest);
      } else {
        if(typeof codeStatus === 'function') codeStatus('unknown place — try: heart, crown, root, dawn, dusk');
      }
    }catch(e){}
    return;
  }
  if(tl==='removeblock' || tl==='unsolid'){
    /* Only admin can delete — others get silence and a damaged tool */
    if(!window._isAdmin){
      return;
    }
    try{
      if(window._solidBlocks && window._solidBlocks.length > 0){
        var _rb = window._solidBlocks.pop();
        if(typeof window.trackNewThing === 'function')
          window.trackNewThing('REMOVED solid block', _rb.position.x, _rb.position.y, _rb.position.z);
        scene.remove(_rb);
        if(_rb.geometry) _rb.geometry.dispose();
        if(_rb.material) _rb.material.dispose();
        if(typeof codeStatus === 'function') codeStatus('block removed by admin');
      } else {
        if(typeof codeStatus === 'function') codeStatus('no block to remove');
      }
    }catch(e){}
    return;
  }
  if(tl==='wormhole'){
    /* WORMHOLE TO PLAYA 2.0 — shoot into it to travel (King's order) */
    try{
      var _wx = 8, _wz = 8; var _wy = 40; /* 40 BLOCKS HIGHER */
      var _wh = new THREE.Group();
      /* Swirling rings */
      for(var _ri = 0; _ri < 5; _ri++){
        var _ring = new THREE.Mesh(
          new THREE.TorusGeometry(5 - _ri * 0.7, 0.3, 12, 32),
          new THREE.MeshBasicMaterial({color: _ri % 2 === 0 ? 0x00ffff : 0xff00ff, transparent: true, opacity: 0.8})
        );
        _ring.position.y = 0.5;
        _ring.rotation.x = Math.PI / 2;
        _wh.add(_ring);
      }
      /* Center glow */
      var _core = new THREE.Mesh(new THREE.SphereGeometry(2, 16, 16),
        new THREE.MeshBasicMaterial({color: 0xffffff, transparent: true, opacity: 0.9}));
      _wh.add(_core);
      _wh.position.set(_wx, _wy, _wz);
      _wh.userData.isWormhole = true;
      _wh.userData.spin = true;
      scene.add(_wh);
      window._wormhole = _wh;
      /* Spin animation */
      if(!window._wormholeAnim){
        window._wormholeAnim = setInterval(function(){
          if(window._wormhole){
            window._wormhole.rotation.y += 0.05;
            window._wormhole.children.forEach(function(c, i){
              c.rotation.z += 0.02 * (i % 2 === 0 ? 1 : -1);
            });
          }
        }, 50);
      }
      if(typeof codeStatus==='function') codeStatus('WORMHOLE OPEN — shoot into it to reach Playa 2.0');
    }catch(e){ if(typeof codeStatus==='function') codeStatus('wormhole failed'); }
    return;
  }
  if(tl==='door'){
    /* THE KING'S DOOR — golden, opens to freedom (King's order) */
    try{
      var _dx = mePos.x, _dz = mePos.z;
      var _gy = (typeof