<!-- RUBY-BACKUP · part 351 -->
A_GEO.dot, new T.MeshBasicMaterial({color:color||0xffd700, transparent:true, opacity:0.5, side:T.DoubleSide}));
  d.rotation.x = -Math.PI/2; d.position.y = 0.02; g.add(d);
  return g;
}

/* ROUNDED — no shape corners, everything smooth like the reference shoes */
function roundedBox(w, h, d, r){
  r = Math.min(r||0.01, Math.min(w,h,d)/2.1);
  var s = new T.Shape();
  var x = -w/2, y = -h/2;
  s.moveTo(x+r, y);
  s.lineTo(x+w-r, y); s.quadraticCurveTo(x+w, y, x+w, y+r);
  s.lineTo(x+w, y+h-r); s.quadraticCurveTo(x+w, y+h, x+w-r, y+h);
  s.lineTo(x+r, y+h); s.quadraticCurveTo(x, y+h, x, y+h-r);
  s.lineTo(x, y+r); s.quadraticCurveTo(x, y, x+r, y);
  var g = new T.ExtrudeGeometry(s, {depth:d-2*r, bevelEnabled:true, bevelThickness:r, bevelSize:r, bevelSegments:3});
  g.translate(0, 0, -(d-2*r)/2);
  return g;
}

/* PROVOLTA as the player's body — warrior.glb */

/* WHITE TABLE — built together, pearl lesson from PROVOLTA */

/* INTRICATE WHITE TABLE — designed together, piece by piece */
function buildIntricateTable(x, z){
  if(typeof scene==='undefined') return;
  var g = new THREE.Group();
  /* materials — pearl white family */
  var pearl = new THREE.MeshStandardMaterial({color: 0xf5f3ee, metalness: 0.35, roughness: 0.22});
  var pearlDark = new THREE.MeshStandardMaterial({color: 0xe8e4da, metalness: 0.3, roughness: 0.3});
  var goldTrim = new THREE.MeshStandardMaterial({color: 0xd4af37, metalness: 0.9, roughness: 0.2});
  var shadow = new THREE.MeshStandardMaterial({color: 0xd0ccc0, metalness: 0.2, roughness: 0.4});

  /* === TABLETOP — layered with inlay === */
  /* main slab */
  var topMain = new THREE.Mesh(new THREE.BoxGeometry(3.2, 0.12, 2.2), pearl);
  topMain.position.y = 1.15; topMain.userData.permanent = true; g.add(topMain);
  /* inlay border — thin gold frame on top surface */
  var inlayLong1 = new THREE.Mesh(new THREE.BoxGeometry(2.9, 0.02, 0.06), goldTrim);
  inlayLong1.position.set(0, 1.22, 0.95); inlayLong1.userData.permanent = true; g.add(inlayLong1);
  var inlayLong2 = inlayLong1.clone(); inlayLong2.position.z = -0.95; g.add(inlayLong2);
  var inlayShort1 = new THREE.Mesh(new THREE.BoxGeometry(0.06, 0.02, 1.9), goldTrim);
  inlayShort1.position.set(1.42, 1.22, 0); inlayShort1.userData.permanent = true; g.add(inlayShort1);
  var inlayShort2 = inlayShort1.clone(); inlayShort2.position.x = -1.42; g.add(inlayShort2);
  /* inner inlay — second thinner frame */
  var inner1 = new THREE.Mesh(new THREE.BoxGeometry(2.5, 0.015, 0.03), pearlDark);
  inner1.position.set(0, 1.215, 0.75); inner1.userData.permanent = true; g.add(inner1);
  var inner2 = inner1.clone(); inner2.position.z = -0.75; g.add(inner2);
  var inner3 = new THREE.Mesh(new THREE.BoxGeometry(0.03, 0.015, 1.5), pearlDark);
  inner3.position.set(1.22, 1.215, 0); inner3.userData.permanent = true; g.add(inner3);
  var inner4 = inner3.clone(); inner4.position.x = -1.22; g.add(inner4);
  /* beveled under-edge */
  var bevel = new THREE.Mesh(new THREE.BoxGeometry(2.9, 0.08, 1.9), pearlDark);
  bevel.position.y = 1.05; bevel.userData.permanent = true; g.add(bevel);

  /* === APRON — the skirt under the tabletop with carved detail === */
  var apronF = new THREE.Mesh(new THREE.BoxGeometry(2.6, 0.25, 0.08), pearl);
  apronF.position.set(0, 0.88, 0.92); apronF.userData.permanent = true; g.add(apronF);
  var apronB = apronF.clone(); apronB.position.z = -0.92; g.add(apronB);
  var apronL = new THREE.Mesh(new THREE.BoxGeometry(0.08, 0.25, 1.84), pearl);
  apronL.position.set(1.3, 0.88, 0); apronL.userData.permanent = true; g.add(apronL);
  var apronR = apronL.clone(); apronR.position.x = -1.3; g.add(apronR);
  /* carved diamonds on apron — small rotated boxes */
  for(var di=-1; di<=1; di++){
    var dia = new THREE.Mesh(new THREE.BoxGeometry(0.12, 0.12, 0.02), goldTrim);
    dia.position.set(di*0.8, 0.88, 0.97);
    dia.rotation.z = Math.PI/4;
    dia.userData.permanent = true; g.add(dia);
    var dia2 = dia.clone(); dia2.position.z = -0.97; g.add(dia2);
  }

  /* === LEGS — turned, in stacked sections like a lathe === */
  var legX = [-1.35, 1.35], legZ = [-0.9, 0.9];
  legX.forEach(function(lx){
    legZ.forEach(function(lz){
      /* foot — wide base */
      var foot = new THREE.Mesh(new THREE.CylinderGeometry(0.14, 0.18, 0.1, 12), pearlDark);
      foot.position.set(lx, 0.05, lz); foot.userData.permanent = true; g.add(foot);
      /* gold ring above foot */
      var ring1 = new THREE.Mesh(new THREE.CylinderGeometry(0.11, 0.11, 0.04, 12), goldTrim);
      ring1.position.set(lx, 0.12, lz); ring1.userData.permanent = true; g.add(ring1);
      /* lower taper */
      var lower = new THREE.Mesh(new THREE.CylinderGeometry(0.09, 0.11, 0.3, 12), pearl);
      lower.position.set(lx, 0.29, lz); lower.userData.permanent = true; g.add(lower);
      /* bulb — the turned swell */
      var bulb = new THREE.Mesh(new THREE.SphereGeometry(0.13, 14, 12), pearl);
      bulb.position.set(lx, 0.5, lz); bulb.scale.y = 1.3;
      b