<!-- RUBY-BACKUP · part 89 -->
nnounceGlory(txt);
          else window.marquee(txt, 'gold');
        });
      });
      document.getElementById('mq-close').addEventListener('click', function(){
        ed.style.display = 'none';
      });
    };
    /* WORD COMPASS — first letters of the directions, loads on start */
    function initWordCompass(){
      var compass = document.createElement('div');
      compass.id = 'word-compass';
      compass.style.cssText = 'position:fixed;bottom:120px;right:16px;width:100px;height:100px;'
        + 'z-index:1000;pointer-events:none;';
      /* C=crown(north, top), R=root(south, bottom), Da=dawn(east, right), Du=dusk(west, left) */
      /* Steel and tactical — cold metal, sharp, military */
      var steel = 'linear-gradient(180deg,#e8e8e8 0%,#a0a0a0 40%,#606060 60%,#c0c0c0 100%)';
      function steelLetter(txt, pos){
        return '<div style="position:absolute;'+pos+';'
          + 'font-family:monospace;font-size:16px;font-weight:bold;letter-spacing:1px;'
          + 'background:'+steel+';-webkit-background-clip:text;-webkit-text-fill-color:transparent;'
          + 'filter:drop-shadow(0 1px 2px rgba(0,0,0,0.8));">'
          + txt + '</div>';
      }
      compass.innerHTML =
        steelLetter('C', 'top:0;left:50%;transform:translateX(-50%);') +
        steelLetter('R', 'bottom:0;left:50%;transform:translateX(-50%);') +
        steelLetter('Da', 'top:50%;right:0;transform:translateY(-50%);') +
        steelLetter('Du', 'top:50%;left:0;transform:translateY(-50%);') +
        '<div style="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);'
        + 'width:6px;height:6px;background:#a0a0a0;'
        + 'clip-path:polygon(50% 0%,100% 50%,50% 100%,0% 50%);"></div>' +
        '<div style="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);'
        + 'width:44px;height:44px;border:1px solid rgba(160,160,160,0.4);"></div>';
      document.body.appendChild(compass);
      /* Also place giant letters at the map edges in 3D */
      setTimeout(function(){
        try{
          if(typeof THREE === 'undefined' || typeof scene === 'undefined') return;
          var edge = 950; /* near the map boundary */
          function makeLetter(txt, x, z, color){
            var cv = document.createElement('canvas');
            cv.width = 128; cv.height = 128;
            var ctx = cv.getContext('2d');
            ctx.fillStyle = color;
            ctx.font = 'bold 96px Georgia';
            ctx.textAlign = 'center';
            ctx.textBaseline = 'middle';
            ctx.shadowColor = color;
            ctx.shadowBlur = 20;
            ctx.fillText(txt, 64, 64);
            var tex = new THREE.CanvasTexture(cv);
            var mat = new THREE.SpriteMaterial({map: tex, transparent: true, depthTest: false});
            var spr = new THREE.Sprite(mat);
            spr.position.set(x, 50, z);
            spr.scale.set(30, 30, 1);
            scene.add(spr);
          }
          makeLetter('C', 0, -edge, '#c0c0c0');
          makeLetter('R', 0, edge, '#a0a0a0');
          makeLetter('Da', edge, 0, '#c0c0c0');
          makeLetter('Du', -edge, 0, '#a0a0a0');
        }catch(e){}
      }, 3000);
    }
    /* Load on start — the one code fits all */
    if(document.readyState === 'loading'){
      document.addEventListener('DOMContentLoaded', initWordCompass);
    } else {
      initWordCompass();
    }
    /* ADMIN COORDINATES — lat/long/height/depth near the compass, admin eyes only */
    (function adminCoords(){
      var readout = document.createElement('div');
      readout.id = 'admin-coords';
      readout.style.cssText = 'position:fixed;bottom:230px;right:16px;'
        + 'z-index:1000;pointer-events:none;display:none;'
        + 'font-family:monospace;font-size:11px;color:#a0a0a0;'
        + 'background:rgba(10,10,10,0.7);border:1px solid rgba(160,160,160,0.3);'
        + 'padding:6px 8px;letter-spacing:1px;';
      document.body.appendChild(readout);
      /* Update every 500ms */
      setInterval(function(){
        try{
          /* Admin only */
          if(!window._isAdmin){ readout.style.display = 'none'; return; }
          if(typeof mePos === 'undefined'){ readout.style.display = 'none'; return; }
          readout.style.display = 'block';
          var lat = mePos.z.toFixed(1);
          var lon = mePos.x.toFixed(1);
          var hgt = mePos.y.toFixed(1);
          var gnd = (typeof fortifiedGroundY === 'function') ? fortifiedGroundY(mePos.x, mePos.z) : 0;
          var dep = (mePos.y - gnd).toFixed(1);
          readout.innerHTML =
            'LAT ' + lat + '<br>' +
            'LON ' + lon + '<br>' +
            'HGT ' + hgt + '<br>' +
            'DEP ' + dep;
        }catch(e){}
      }, 500);
    })();
    /* SPATIAL AWARENESS — know where the King is and where Solid is, in code */
    window.whereIsKing = function(){
      try{
        if(typeof mePos === 'undefined') return null;
        return {x: mePos.x, y: mePos.y, z