<!-- RUBY-BACKUP · part 486 -->
e!=='undefined'){
    if(typeof mePos!=='undefined'){
      MAT_MESH.position.set(mePos.x*0.13, 0, mePos.z*0.13);
    }
    scene.add(MAT_MESH);
    if(typeof playerMesh!=='undefined') playerMesh = MAT_MESH;
  }
  /* animation: graceful, composed, subtle power */
  var t = 0;
  MAT_ANIM = setInterval(function(){
    t += 0.1;
    if(!MAT_MESH) return;
    /* gentle sway, regal stillness */
    MAT_MESH.rotation.y = Math.sin(t*0.25)*0.15;
    MAT_MESH.position.y = Math.sin(t*0.6)*0.02;
    /* hair flows */
  }, 60);
  codeStatus('Matriarch — she leads with grace and strength');
}
function stopMatriarch(){
  if(MAT_ANIM){ clearInterval(MAT_ANIM); MAT_ANIM = null; }
}
function startReluctant(){
  stopSwift(); stopDancer(); stopStrider(); stopYoungKing(); stopUnimpressed(); stopSmugbug();
  if(typeof playerMesh!=='undefined' && playerMesh && typeof scene!=='undefined'){
    scene.remove(playerMesh);
  }
  REL_MESH = buildReluctant();
  if(REL_MESH && typeof scene!=='undefined'){
    if(typeof mePos!=='undefined'){
      REL_MESH.position.set(mePos.x*0.13, 0, mePos.z*0.13);
    }
    scene.add(REL_MESH);
    if(typeof playerMesh!=='undefined') playerMesh = REL_MESH;
  }
  var t = 0;
  REL_ANIM = setInterval(function(){
    t += 0.1;
    if(!REL_MESH) return;
    /* check if holding something (MOVE_HELD) */
    var holding = (typeof MOVE_HELD!=='undefined' && MOVE_HELD!==null);
    var rf = REL_MESH.getObjectByName('relface');
    if(holding){
      /* RELUCTANT: eye roll, looks at others, "I don't want to do this" */
      if(rf) rf.visible = true;
      /* looks toward others (rotates to face nearest) */
      REL_MESH.rotation.y = Math.sin(t*0.5)*0.6;
      /* heavy sigh — body sinks */
      REL_MESH.position.y = -0.02 + Math.sin(t*2)*0.01;
      REL_MESH.rotation.z = Math.sin(t*1.5)*0.05;
    }else{
      /* normal: just stands there */
      if(rf) rf.visible = false;
      REL_MESH.rotation.y = 0;
      REL_MESH.position.y = Math.sin(t*0.4)*0.015;
      REL_MESH.rotation.z = 0;
    }
  }, 80);
  codeStatus('Reluctant — pick something up and watch the look');
}
function stopReluctant(){
  if(REL_ANIM){ clearInterval(REL_ANIM); REL_ANIM = null; }
}
function startSmugbug(){
  stopSwift(); stopDancer(); stopStrider(); stopYoungKing(); stopUnimpressed();
  if(typeof playerMesh!=='undefined' && playerMesh && typeof scene!=='undefined'){
    scene.remove(playerMesh);
  }
  SB_MESH = buildSmugbug();
  SB_SCARED = false;
  if(SB_MESH && typeof scene!=='undefined'){
    if(typeof mePos!=='undefined'){
      SB_MESH.position.set(mePos.x*0.13, 0, mePos.z*0.13);
    }
    scene.add(SB_MESH);
    if(typeof playerMesh!=='undefined') playerMesh = SB_MESH;
  }
  var t = 0;
  SB_ANIM = setInterval(function(){
    t += 0.1;
    if(!SB_MESH) return;
    /* check if confronted: another player near, or tap */
    var confronted = SB_SCARED;
    /* TODO: proximity check would go here */
    if(!confronted){
      /* SMUG: confident sway, smirk, looks around at everyone */
      SB_MESH.rotation.y = Math.sin(t*0.3)*0.4;
      SB_MESH.position.y = Math.sin(t*0.8)*0.02;
      SB_MESH.rotation.z = 0;
      var ff = SB_MESH.getObjectByName('fearface');
      if(ff) ff.visible = false;
    }else{
      /* FEARFUL: trembling, wide eyes, funny panic like child seeing bug */
      SB_MESH.position.y = Math.abs(Math.sin(t*8))*0.06;
      SB_MESH.position.x += (Math.random()-0.5)*0.02;
      SB_MESH.rotation.z = Math.sin(t*10)*0.08;
      SB_MESH.rotation.y = Math.sin(t*3)*0.2;
      var ff2 = SB_MESH.getObjectByName('fearface');
      if(ff2) ff2.visible = true;
      /* auto-calm after 5 seconds */
      setTimeout(function(){ SB_SCARED = false; }, 5000);
    }
  }, 50);
  /* tap to confront (scare) */
  if(typeof renderer!=='undefined' && renderer.domElement){
    renderer.domElement.addEventListener('click', function(){
      if(CURRENT_AVATAR==='smugbug') SB_SCARED = true;
    });
  }
  codeStatus('Smugbug — smug till confronted. Tap to scare it.');
}
function stopSmugbug(){
  if(SB_ANIM){ clearInterval(SB_ANIM); SB_ANIM = null; }
  SB_SCARED = false;
}
function startUnimpressed(){
  stopSwift(); stopDancer(); stopStrider(); stopYoungKing();
  if(typeof playerMesh!=='undefined' && playerMesh && typeof scene!=='undefined'){
    scene.remove(playerMesh);
  }
  UI_MESH = buildUnimpressed();
  if(UI_MESH && typeof scene!=='undefined'){
    if(typeof mePos!=='undefined'){
      UI_MESH.position.set(mePos.x*0.13, 0, mePos.z*0.13);
    }
    scene.add(UI_MESH);
    if(typeof playerMesh!=='undefined') playerMesh = UI_MESH;
  }
  /* animation: slow blink, sigh, looks away */
  var t = 0;
  UI_ANIM = setInterval(function(){
    t += 0.1;
    if(!UI_MESH) return;
    var cycle = t % 15;
    if(cycle < 10){
      /* stands there, unimpressed, barely moves */
      UI_MESH.position.y = Math.sin(t*0.3)*0.01;
    }else if(cycle < 12){
      /* slow blink */
      UI_MESH.rotation.x = 0.05;
    }else if(cycle < 13.5)