<!-- RUBY-BACKUP · part 398 -->
*0.96), energy, 0, 1.02, 0);
  P(new T.BoxGeometry(3.5, 0.5, L*0.94), darkM, 0, 1.35, 0);
  [-3.4, -1.2, 1.2, 3.4].forEach(function(pz){
    [-1, 1].forEach(function(sd){
      var hp = P(new T.CylinderGeometry(0.42, 0.42, 0.3, 6), energy, sd*1.85, 0.75, pz);
      hp.rotation.z = Math.PI/2;
      var hr = P(new T.CylinderGeometry(0.5, 0.5, 0.12, 6), chrome, sd*1.82, 0.75, pz);
      hr.rotation.z = Math.PI/2;
    });
  });
  /* upper — dark mesh base: toe low, heel high */
  P(new T.BoxGeometry(3.2, 1.6, 4.2), darkM, 0, 2.3, 2.8);
  P(new T.BoxGeometry(3.2, 2.6, 3.0), darkM, 0, 2.8, 0.2);
  P(new T.BoxGeometry(3.0, 4.6, 2.6), darkM, 0, 3.8, -2.6);
  /* chrome armor plates — angled, both flanks */
  [[2.2, 1.4, 0.5], [0.4, 1.8, 0.35], [-1.6, 2.2, 0.5], [-3.0, 3.2, 0.6]].forEach(function(pl){
    [-1, 1].forEach(function(sd){
      var ap = P(new T.BoxGeometry(0.18, 2.0, 2.2), chrome, sd*1.62, pl[1]+1.2, pl[0]);
      ap.rotation.x = pl[2]*0.4; ap.rotation.z = sd*-0.12;
    });
  });
  /* chrome toe cap */
  var tc = P(new T.CylinderGeometry(1.65, 1.65, 3.1, 12, 1, false, 0, Math.PI), chrome, 0, 2.2, 4.6);
  tc.rotation.z = Math.PI/2; tc.rotation.y = Math.PI/2;
  /* galaxy windows — the starfield panels */
  [-1, 1].forEach(function(sd){
    P(new T.BoxGeometry(0.1, 1.5, 2.0), galax, sd*1.68, 3.4, 1.2);
    P(new T.BoxGeometry(0.1, 1.9, 1.4), galax, sd*1.60, 4.4, -2.4);
  });
  /* blue energy veins along the flanks */
  [-1, 1].forEach(function(sd){
    var v1 = P(new T.BoxGeometry(0.08, 0.16, 5.2), energy, sd*1.70, 2.35, 0.6); v1.rotation.x = 0.1;
    var v2 = P(new T.BoxGeometry(0.08, 0.14, 2.6), energy, sd*1.66, 5.6, -2.5); v2.rotation.x = -0.25;
  });
  /* tongue — rising spine with energy strip */
  var tn = P(new T.BoxGeometry(1.5, 4.4, 0.5), darkM, 0, 4.6, 1.15); tn.rotation.x = -0.38;
  var ts = P(new T.BoxGeometry(0.34, 4.0, 0.12), energy, 0, 4.65, 1.32); ts.rotation.x = -0.38;
  /* laces — six rungs with steel eyelets */
  for(var li=0; li<6; li++){
    var ly = 3.1 + li*0.62, lz = 1.78 - li*0.30;
    var lc = P(new T.CylinderGeometry(0.09, 0.09, 2.3, 8), darkM, 0, ly, lz);
    lc.rotation.z = Math.PI/2;
    [-1, 1].forEach(function(sd){
      var ey = P(new T.TorusGeometry(0.16, 0.06, 8, 12), steel, sd*1.15, ly, lz);
      ey.rotation.y = Math.PI/2;
    });
  }
  /* tall armored collar with glowing rim */
  P(new T.CylinderGeometry(1.55, 1.75, 2.2, 12), chrome, 0, 6.4, -2.6);
  P(new T.TorusGeometry(1.55, 0.14, 8, 16), energy, 0, 7.5, -2.6).rotation.x = Math.PI/2;
  /* heel reactor — the round blue engine */
  var rc = P(new T.CylinderGeometry(0.85, 0.85, 0.35, 16), chrome, 1.75, 3.0, -3.4);
  rc.rotation.z = Math.PI/2;
  var rg = P(new T.CylinderGeometry(0.62, 0.62, 0.4, 16), energy, 1.75, 3.0, -3.4);
  rg.rotation.z = Math.PI/2;
  var rc2 = P(new T.CylinderGeometry(0.5, 0.5, 0.3, 12), chrome, -1.72, 2.2, -3.2);
  rc2.rotation.z = Math.PI/2;
  var rg2 = P(new T.CylinderGeometry(0.36, 0.36, 0.34, 12), energy, -1.72, 2.2, -3.2);
  rg2.rotation.z = Math.PI/2;
  return g;
}
var monumentShoes = [];
function persistShoes(){
  try{ if(typeof monumentShoes!=='undefined' && monumentShoes) localStorage.setItem('ruby-shoes-v1', JSON.stringify(monumentShoes.map(function(k){ return {x:k.position.x, y:k.position.y, z:k.position.z, r:k.rotation.y}; }))); }catch(e){}
}
function spawnShoe(x, z, ry){
  var sh = buildShoe();
  sh.position.set(x, groundY(x, z), z);
  sh.rotation.y = ry||0;
  scene.add(sh);
  if(typeof monumentShoes==='undefined' || !monumentShoes) monumentShoes = [];
  monumentShoes.push(sh);
  persistShoes();
  return sh;
}
function loadShoes(){
  var ks = [];
  try{ ks = JSON.parse(localStorage.getItem('ruby-shoes-v1')||'[]'); }catch(e){}
  ks.forEach(function(k){
    var sh = spawnShoe(k.x, k.z, k.r);
    if(sh && typeof k.y==='number' && isFinite(k.y)) sh.position.y = k.y;
  });
}
function showBrain(){
  var st2 = document.getElementById('codetext-status');
  if(!st2) return;
  st2.innerHTML = '<div style="color:#ffd700;letter-spacing:2px;margin-bottom:4px;">BRAIN — every code</div>' +
    BRAIN.map(function(b){ return '<div style="padding:2px 0;"><b style="color:#ffd700;">'+escapeHtml(b[0])+'</b> — '+escapeHtml(b[1])+'</div>'; }).join('');
  st2.style.whiteSpace = 'normal'; st2.style.opacity = '1'; st2.style.pointerEvents = 'auto';
  if(codeT) clearTimeout(codeT);
}
function showDid(){
  if(!didLog.length){ codeStatus('nothing yet — build something'); return; }
  var st2 = document.getElementById('codetext-status');
  if(!st2) return;
  st2.innerHTML = didLog.map(function(e,i){
    return '<div onclick="didPick('+i+')" style="padding:2px 0;cursor:pointer;">'+(i+1)+'. '+escapeHtml(e.line)+' \u2014 '+escapeHtml(e.res)+'</div>';
  }).join('');
  st2.style.whiteSpace = 'normal'; st2.style.opacity = '1'; st2.style.pointerEvents = 'auto';
  if(codeT) clearTimeout(codeT);
}
var didAnchorLine = null, awaitingDidAnchor = false;
function didPick(i){
  var e = didLog[i];
