<!-- RUBY-BACKUP · part 483 -->
/
  var head = new THREE.Mesh(new THREE.SphereGeometry(0.17, 18, 18), skin);
  head.position.y = 1.75;
  group.add(head);
  /* hair — long, flowing */
  var hair = new THREE.Mesh(new THREE.SphereGeometry(0.19, 18, 18, 0, Math.PI*2, 0, Math.PI*0.6), hairM);
  hair.position.y = 1.78;
  hair.rotation.x = -0.3;
  group.add(hair);
  var hairBack = new THREE.Mesh(new THREE.BoxGeometry(0.25, 0.5, 0.1), hairM);
  hairBack.position.set(0, 1.5, -0.15);
  group.add(hairBack);
  /* circlet — gold */
  var circlet = new THREE.Mesh(new THREE.TorusGeometry(0.18, 0.025, 8, 20), gold);
  circlet.rotation.x = Math.PI/2 - 0.15;
  circlet.position.y = 1.85;
  group.add(circlet);
  var gem = new THREE.Mesh(new THREE.SphereGeometry(0.035, 10, 10),
    new THREE.MeshStandardMaterial({color: 0xff0066, emissive: 0xff0066, emissiveIntensity: 1.0}));
  gem.position.set(0, 1.86, 0.17);
  group.add(gem);
  /* eyes — warm, knowing */
  [-1,1].forEach(function(s){
    var eye = new THREE.Mesh(new THREE.SphereGeometry(0.028, 10, 10), dark);
    eye.position.set(s*0.065, 1.77, 0.15);
    group.add(eye);
  });
  /* gentle smile */
  var smile = new THREE.Mesh(new THREE.TorusGeometry(0.05, 0.012, 8, 14, Math.PI), dark);
  smile.position.set(0, 1.7, 0.15);
  smile.rotation.z = Math.PI;
  group.add(smile);
  /* arms — graceful */
  [-1,1].forEach(function(s){
    var arm = new THREE.Mesh(new THREE.CylinderGeometry(0.05, 0.05, 0.45, 8), skin);
    arm.position.set(s*0.28, 1.25, 0);
    arm.rotation.z = s*0.15;
    group.add(arm);
    var bracelet = new THREE.Mesh(new THREE.TorusGeometry(0.06, 0.015, 8, 12), gold);
    bracelet.position.set(s*0.31, 1.1, 0);
    bracelet.rotation.x = Math.PI/2;
    group.add(bracelet);
  });
  return group;
}

/* GENERIC AVATARS — simple orb, persona in the name */
var GEN_MESH = null, GEN_ANIM = null;
function buildRobot(accentColor){
  /* REAL PERSON — ordinary, but the future is here in the graphics */
  var g = new THREE.Group();
  /* skin — enhanced, lifelike */
  var skin = new THREE.MeshPhysicalMaterial({
    color: 0xd4a574, roughness: 0.45,
    clearcoat: 0.3, clearcoatRoughness: 0.4
  });
  var cloth = new THREE.MeshStandardMaterial({
    color: new THREE.Color(accentColor), roughness: 0.85
  });
  var dark = new THREE.MeshStandardMaterial({color: 0x1a1a1a, roughness: 0.35});
  var hairMat = new THREE.MeshStandardMaterial({color: 0x2a1a0a, roughness: 0.75});
  /* subtle future sheen — rim light on skin */
  var sheen = new THREE.MeshStandardMaterial({
    color: 0xffffff, transparent: true, opacity: 0.06,
    emissive: new THREE.Color(accentColor), emissiveIntensity: 0.08
  });
  /* head — real */
  var head = new THREE.Mesh(new THREE.SphereGeometry(0.14, 32, 32), skin);
  head.position.y = 1.55; head.scale.set(0.95, 1.1, 0.98); g.add(head);
  var headSheen = new THREE.Mesh(new THREE.SphereGeometry(0.145, 24, 24), sheen);
  headSheen.position.y = 1.55; headSheen.scale.set(0.95, 1.1, 0.98); g.add(headSheen);
  /* hair */
  var hair = new THREE.Mesh(new THREE.SphereGeometry(0.145, 24, 24, 0, Math.PI*2, 0, Math.PI*0.55), hairMat);
  hair.position.y = 1.57; g.add(hair);
  /* eyes */
  [-1,1].forEach(function(s){
    var white = new THREE.Mesh(new THREE.SphereGeometry(0.028, 16, 16),
      new THREE.MeshStandardMaterial({color: 0xffffff, roughness: 0.15}));
    white.position.set(0.045, 1.57, s*0.06); g.add(white);
    var pupil = new THREE.Mesh(new THREE.SphereGeometry(0.013, 12, 12), dark);
    pupil.position.set(0.055, 1.57, s*0.06); g.add(pupil);
    /* catchlight — the future is in the eyes */
    var catch_ = new THREE.Mesh(new THREE.SphereGeometry(0.005, 8, 8),
      new THREE.MeshBasicMaterial({color: 0xffffff}));
    catch_.position.set(0.062, 1.575, s*0.06); g.add(catch_);
  });
  /* nose, mouth */
  var nose = new THREE.Mesh(new THREE.ConeGeometry(0.018, 0.04, 12), skin);
  nose.position.set(0.1, 1.53, 0); nose.rotation.z = -Math.PI/2; g.add(nose);
  var mouth = new THREE.Mesh(new THREE.BoxGeometry(0.015, 0.008, 0.05),
    new THREE.MeshStandardMaterial({color: 0x8a4a3a, roughness: 0.5}));
  mouth.position.set(0.095, 1.48, 0); g.add(mouth);
  /* neck */
  var neck = new THREE.Mesh(new THREE.CylinderGeometry(0.05, 0.06, 0.1, 18), skin);
  neck.position.y = 1.42; g.add(neck);
  /* torso — ordinary clothes */
  var torso = new THREE.Mesh(new THREE.CylinderGeometry(0.14, 0.17, 0.55, 24), cloth);
  torso.position.y = 1.1; g.add(torso);
  /* arms */
  [-1,1].forEach(function(s){
    var upper = new THREE.Mesh(new THREE.CylinderGeometry(0.045, 0.04, 0.3, 16), cloth);
    upper.position.set(0, 1.2, s*0.22); g.add(upper);
    var fore = new THREE.Mesh(new THREE.CylinderGeometry(0.04, 0.035, 0.28, 16), skin);
    fore.position.set(0, 0.92, s*0.23); g.add(fore);
    var hand = new THREE.Mesh(new THREE.SphereGeometry(0.05, 16, 16), skin);
    hand.position.set(0, 0.76, s*0.24); hand.scale.set(0.9, 1.2, 0.9); g.add(hand);
    /* fingers — subtle */
    for(var f=0; f<4; f++){
