<!-- SAGA-SOLID · part 56 -->
 0.12, 0.5, 12), cyberSkin); uaR.position.y = -0.25; armR.add(uaR);
  var faR = new THREE.Mesh(new THREE.CylinderGeometry(0.11, 0.09, 0.45, 12), cyberSkin); faR.position.y = -0.7; armR.add(faR);
  var handR = new THREE.Mesh(new THREE.SphereGeometry(0.12, 10, 10), cyberSkin); handR.position.y = -0.95; armR.add(handR);
  armR.position.set(0.65, 1.9, 0); g.add(armR);
  /* CALLIGRAPHY PEN (gold, in right hand) */
  var pen = new THREE.Group();
  var penBody = new THREE.Mesh(new THREE.CylinderGeometry(0.03, 0.02, 0.5, 8), gold);
  pen.add(penBody);
  var penTip = new THREE.Mesh(new THREE.ConeGeometry(0.02, 0.1, 8), cyanGlow);
  penTip.position.y = -0.3; pen.add(penTip);
  pen.position.set(0, -0.95, 0.1); pen.rotation.x = 0.5;
  armR.add(pen);
  /* Legs (powerful) */
  var legL = new THREE.Group();
  var thL = new THREE.Mesh(new THREE.CylinderGeometry(0.16, 0.13, 0.5, 12), cyberSkin); thL.position.y = -0.25; legL.add(thL);
  var shL = new THREE.Mesh(new THREE.CylinderGeometry(0.12, 0.1, 0.5, 12), cyberSkin); shL.position.y = -0.75; legL.add(shL);
  legL.position.set(-0.25, 0.9, 0); g.add(legL);
  var legR = new THREE.Group();
  var thR = new THREE.Mesh(new THREE.CylinderGeometry(0.16, 0.13, 0.5, 12), cyberSkin); thR.position.y = -0.25; legR.add(thR);
  var shR = new THREE.Mesh(new THREE.CylinderGeometry(0.12, 0.1, 0.5, 12), cyberSkin); shR.position.y = -0.75; legR.add(shR);
  legR.position.set(0.25, 0.9, 0); g.add(legR);
  /* CAPE (red, flowing) */
  var cape = new THREE.Mesh(new THREE.PlaneGeometry(1.4, 2.0, 8, 8), capeMat);
  cape.position.set(0, 1.2, -0.35);
  // Wave the cape (vertex animation via rotation)
  cape.userData.isCape = true;
  g.add(cape);
  g.userData.cape = cape;
  /* Place at king position and track as player body */
  g.position.set(kingPos.x, groundY, kingPos.z);
  g.userData.legL = legL;
  g.userData.legR = legR;
  g.userData.armL = armL;
  g.userData.armR = armR;
  g.userData.isEpistolary = true;
  scene.add(g);
  playerBody = g;
  window._epistolary = g;
  say('The Epistolary stands');
}


/* FUTURISTIC SOUND SYSTEM — Web Audio API, synthesized, no files, short+fast */
var AudioSys = {
  ctx: null,
  enabled: true,
  init: function(){
    if(!this.ctx){
      try { this.ctx = new (window.AudioContext || window.webkitAudioContext)(); }
      catch(e){ this.enabled = false; }
    }
    if(this.ctx && this.ctx.state === 'suspended') this.ctx.resume();
  },
  /* Core: play a futuristic blip — freq sweep, short envelope */
  blip: function(f0, f1, dur, type, vol){
    if(!this.enabled) return;
    this.init();
    if(!this.ctx) return;
    var t = this.ctx.currentTime;
    var o = this.ctx.createOscillator();
    var g = this.ctx.createGain();
    o.type = type || 'sine';
    o.frequency.setValueAtTime(f0, t);
    o.frequency.exponentialRampToValueAtTime(Math.max(f1, 1), t + dur);
    g.gain.setValueAtTime(vol || 0.15, t);
    g.gain.exponentialRampToValueAtTime(0.001, t + dur);
    o.connect(g); g.connect(this.ctx.destination);
    o.start(t); o.stop(t + dur + 0.02);
  },
  /* Named futuristic effects — all short (<0.3s), all fast */
  place:  function(){ this.blip(800, 1600, 0.12, 'square', 0.12); },  /* laser zap up */
  pickup: function(){ this.blip(600, 1200, 0.10, 'sine', 0.15); },    /* ascending blip */
  brk:    function(){ this.blip(400, 100, 0.15, 'sawtooth', 0.10); }, /* descending crunch */
  click:  function(){ this.blip(1000, 1000, 0.05, 'square', 0.08); }, /* UI tick */
  error:  function(){ this.blip(200, 150, 0.20, 'sawtooth', 0.10); }, /* low buzz */
  swim:   function(){ this.blip(300, 600, 0.18, 'sine', 0.08); },     /* splash sweep */
  jump:   function(){ this.blip(400, 800, 0.12, 'triangle', 0.12); },  /* launch */
  land:   function(){ this.blip(300, 150, 0.10, 'sine', 0.10); },     /* thud */
  spin:   function(){ this.blip(500, 2000, 0.15, 'sawtooth', 0.08); },/* spin-up */
  undo:   function(){ this.blip(1200, 600, 0.12, 'square', 0.10); },  /* reverse zap */
};
/* Global shorthand */
function sfx(name){ if(AudioSys[name]) AudioSys[name](); }
/* Init on first touch (iOS requires user gesture) */
document.addEventListener('touchstart', function(){ AudioSys.init(); }, {once:true, passive:true});
document.addEventListener('click', function(){ AudioSys.init(); }, {once:true});


/* HIDDEN CODES — never shown in public listings */
function isHiddenCode(name){
  return name === 'deletefreeze1';
}
function visibleCodes(){
  return Object.keys(CODES).filter(function(k){ return !isHiddenCode(k); });
}

var CODES = {
  setspawn: { cat: 'System', desc: 'Set spawn to your current spot', fn: function(){
    var _nx = Math.round(kingPos.x), _nz = Math.round(kingPos.z);
    try{ localStorage.setItem('saga-spawn', JSON.stringify({x:_nx, z:_nz})); }catch(e){ console.error(e); }
    say('spawn set — LAT ' + _nz + ' LON ' + _nx);
  } },
  tour: { cat: 'System', desc: 'Tour our story', fn: function(){
    var stops = [
      {x: 0, z: 60, look: [0, 4, 0