<!-- SOLID CITY · part 31 -->
collar (back)', B(0.46, 0.22, 0.13), COL.red, 0, 1.62, -0.16);
  [-1, 1].forEach(function (s) {
    body.add('mantle pad ' + s, B(0.28, 0.14, 0.42), COL.red, 0.38 * s, 1.5, 0);
    body.add('high collar side ' + s, B(0.13, 0.2, 0.3), COL.red, 0.22 * s, 1.63, -0.03);
  });
  const bodyGeo = take(body, 'body');

  /* ---- gold + glow parts (one mesh, MeshBasic vertex colours: lit-looking gold trim, red visor) ---- */
  const glow = new Parts(T, true);
  glow.add('visor', B(0.27, 0.13, 0.13), GLOW.red, 0, 1.8, 0.14);
  // circlet crown: band + five points + red jewel
  glow.add('circlet band', new T.CylinderGeometry(0.205, 0.205, 0.13, 8), GLOW.gold, 0, 1.995, 0, 0, Math.PI / 8, 0);
  for (let i = 0; i < 5; i++) {
    const a = (i / 5) * Math.PI * 2, h = i === 0 ? 0.22 : 0.16;
    glow.add('crown point ' + (i + 1), new T.ConeGeometry(0.075, h, 4), GLOW.gold, Math.sin(a) * 0.15, 2.06 + h / 2, Math.cos(a) * 0.15);
  }
  glow.add('crown jewel', new T.OctahedronGeometry(0.075, 0), GLOW.red, 0, 2.0, 0.21);
  [-1, 1].forEach(function (s) {
    glow.add('mantle gold edge ' + s, B(0.3, 0.13, 0.44), GLOW.gold, 0.38 * s, 1.6, 0);
    glow.add('cape clasp ' + s, B(0.13, 0.13, 0.13), GLOW.gold, 0.2 * s, 1.48, -0.13);
  });
  glow.add('belt', B(0.63, 0.13, 0.35), GLOW.gold, 0, 0.82, 0);
  glow.add('robe hem', new T.CylinderGeometry(0.46, 0.46, 0.13, 6), GLOW.gold, 0, 0.42, 0, 0, Math.PI / 6, 0);
  const glowGeo = take(glow, 'glow');

  /* ---- limbs (pivot at shoulder / hip, hanging down — like citizens.js limbGeo) ---- */
  const armP = new Parts(T);
  armP.add('arm', B(0.14, 0.68, 0.14), COL.black, 0, -0.33, 0);
  armP.add('gold cuff', B(0.17, 0.13, 0.17), COL.gold, 0, -0.58, 0);
  armP.add('gauntlet', B(0.15, 0.13, 0.15), COL.redDeep, 0, -0.72, 0);
  const armGeo = take(armP, 'arm (x2)');
  const legP = new Parts(T);
  legP.add('leg', B(0.19, 0.74, 0.19), COL.black, 0, -0.37, 0);
  legP.add('boot', B(0.22, 0.16, 0.28), COL.gun, 0, -0.66, 0.03);
  legP.add('boot gold band', B(0.23, 0.13, 0.23), COL.gold, 0, -0.52, 0);
  const legGeo = take(legP, 'leg (x2)');

  /* ---- cape (pivot at the shoulders; sways on its own) ---- */
  const capeP = new Parts(T);
  capeP.add('cape', B(0.66, 1.3, 0.13), COL.red, 0, -0.65, 0);
  capeP.add('cape lining stripe', B(0.13, 1.2, 0.13), COL.redDeep, 0, -0.62, -0.02);
  capeP.add('cape gold hem', B(0.7, 0.13, 0.15), COL.gold, 0, -1.28, 0);
  const capeGeo = take(capeP, 'cape');

  /* ---- chest sigil (textured front face) ---- */
  const sigG = B(0.3, 0.3, 0.13), uv = sigG.attributes.uv;
  for (let i = 0; i < uv.count; i++) if (Math.floor(i / 4) !== 4) uv.setXY(i, 0.004, 0.004);
  sigG.computeBoundingBox(); const ss = new T.Vector3(); sigG.boundingBox.getSize(ss);
  allPieces.push({ name: 'chest sigil P', part: 'sigil', dims: [ss.x, ss.y, ss.z].map(function (v) { return +v.toFixed(3); }), min: +Math.min(ss.x, ss.y, ss.z).toFixed(3) });

  /* ---- aura ring at the feet (torus tube 0.14 thick) ---- */
  const auraG = new T.TorusGeometry(0.58, 0.07, 4, 28);
  auraG.computeBoundingBox(); const as = new T.Vector3(); auraG.boundingBox.getSize(as);
  allPieces.push({ name: 'aura ring', part: 'aura', dims: [as.x, as.y, as.z].map(function (v) { return +v.toFixed(3); }), min: +Math.min(as.x, as.y, as.z).toFixed(3) });

  /* ---- materials ---- */
  const bodyMat = curve(new T.MeshLambertMaterial({ vertexColors: true }));
  const glowMat = curve(new T.MeshBasicMaterial({ vertexColors: true }));
  const sigTex = sigilTexture(T);
  const sigMat = curve(new T.MeshBasicMaterial({ map: sigTex }));
  const auraMat = new T.MeshBasicMaterial({ color: new T.Color(0xffcc33).convertSRGBToLinear(), transparent: true, opacity: 0.55, blending: T.AdditiveBlending, depthWrite: false });

  const g = new T.Group(); g.name = 'King Playa avatar';
  const bodyM = new T.Mesh(bodyGeo, bodyMat); bodyM.name = 'body'; g.add(bodyM);
  const glowM = new T.Mesh(glowGeo, glowMat); glowM.name = 'regalia'; g.add(glowM);
  const sigil = new T.Mesh(sigG, sigMat); sigil.name = 'sigil'; sigil.position.set(0, 1.27, 0.2); g.add(sigil);
  const aura = new T.Mesh(auraG, auraMat); aura.name = 'aura'; aura.rotation.x = Math.PI / 2; aura.position.y = 0.08; aura.renderOrder = 2; g.add(aura);
  const cape = new T.Mesh(capeGeo, bodyMat); cape.name = 'cape'; cape.position.set(0, 1.56, -0.24); cape.rotation.x = 0.1; g.add(cape);

  const limbs = [];
  [-1, 1].forEach(function (s) {
    const arm = new T.Mesh(armGeo, bodyMat); arm.position.set(0.38 * s, 1.48, 0); arm.name = 'arm' + s; g.add(arm);
    const leg = new T.Mesh(legGeo, bodyMat); leg.position.set(0.15 * s, 0.76, 0); leg.name = 'leg' + s; g.add(leg);
    limbs.push(arm, leg);   // [armL, legL, armR, legR] — citizens.js order
  });

  // self-driven touches: cape flows with the stride, aura breathes (no per-frame hook needed)
  cape.onBeforeRender = function () { const stride = Math.abs(limbs[1].rotation.x); cape.rotation.x = 0.1 + stride * 0.35 + Math.sin(