<!-- RUBY-BACKUP · part 169 -->
NTINUUM BUTTON — floating access */
setTimeout(function(){
  if(!document.getElementById('continuumBtn')){
    var b = document.createElement('button');
    b.id = 'continuumBtn';
    b.textContent = '\u221E';
    b.title = 'CONTINUUM';
    b.style.cssText = 'position:fixed;bottom:420px;right:14px;z-index:9999;width:46px;height:46px;background:#d8a920;color:#111;border:1px solid #d8a920;border-radius:50%;font-size:24px;line-height:1;padding:0;cursor:pointer;-webkit-tap-highlight-color:transparent;';
    b.onclick = function(){ showContinuum(); };
    document.body.appendChild(b);
  }
}, 3500);

/* EASY MODE — for older eyes and hands, no frustration */
var EASY_MODE = false;
function toggleEasy(){
  EASY_MODE = !EASY_MODE;
  try{ localStorage.setItem('ruby-easy', EASY_MODE?'1':'0'); }catch(e){}
  applyEasy();
  codeStatus(EASY_MODE ? 'easy mode on — bigger, simpler' : 'easy mode off');
}
function applyEasy(){
  var size = EASY_MODE ? '18px' : '12px';
  var pad = EASY_MODE ? '20px' : '12px';
  /* continuum/pad */
  var cont = document.getElementById('continuum');
  if(cont){
    cont.style.fontSize = size;
    cont.style.padding = pad;
    cont.style.maxWidth = EASY_MODE ? '90vw' : '350px';
  }
  /* desk */
  var desk = document.getElementById('controldesk');
  if(desk){
    desk.style.fontSize = size;
    desk.style.maxWidth = EASY_MODE ? '90vw' : '400px';
  }
  /* build codes */
  var bc = document.getElementById('buildcodes');
  if(bc){
    bc.style.fontSize = size;
    bc.style.maxWidth = EASY_MODE ? '90vw' : '500px';
  }
  /* avatars */
  var av = document.getElementById('avatars');
  if(av){
    av.style.fontSize = size;
  }
  /* make all buttons bigger in easy mode */
  var btns = document.querySelectorAll('#continuum button, #controldesk button, #buildcodes button');
  btns.forEach(function(b){
    b.style.fontSize = EASY_MODE ? '18px' : '12px';
    b.style.padding = EASY_MODE ? '12px 16px' : '4px 8px';
    b.style.margin = EASY_MODE ? '6px' : '2px';
  });
}
/* auto-apply on load */
setTimeout(function(){
  try{
    if(localStorage.getItem('ruby-easy')==='1'){
      EASY_MODE = true;
      applyEasy();
    }
  }catch(e){}
}, 4000);
/* re-apply when panels open */
var origShowCont = showContinuum;
showContinuum = function(){
  origShowCont();
  setTimeout(applyEasy, 100);
};
try{ window.showContinuum = showContinuum; }catch(e){}
function showContinuum(){
  loadPad();
  var c = document.getElementById('continuum');
  if(!c){
    c = document.createElement('div');
    c.id = 'continuum';
    c.style.cssText = 'position:fixed;bottom:10px;left:10px;z-index:9999;background:rgba(10,0,20,0.9);border:2px solid #ff00ff;border-radius:12px;padding:12px;color:#fff;font:12px monospace;max-width:350px;';
    document.body.appendChild(c);
  }
  c.style.display = c.style.display==='block' ? 'none' : 'block';
  if(c.style.display==='block') renderContinuum();
}
function renderContinuum(){
  var c = document.getElementById('continuum');
  if(!c) return;
  var html = '<b style="color:#f0f">CONTINUUM</b> <button onclick="showContinuum()">CLOSE</button><br><br>';
  /* your pad */
  html += '<b>Your Pad:</b><br>';
  if(DESK_PAD.length===0) html += '<i>empty — visit the Soliditronium dome to gather codes</i><br>';
  DESK_PAD.forEach(function(code){
    html += '<button onclick="runCodeByName(\''+code+'\')" style="margin:2px">'+code+'</button> ';
  });
  /* context-aware: suggest based on vicinity */
  html += '<br><br><b>Nearby suggests:</b><br>';
  var suggests = suggestForVicinity();
  if(suggests.length===0) html += '<i>move near objects to see suggestions</i>';
  suggests.forEach(function(s){
    html += '<button onclick="runCodeByName(\''+s.code+'\')" style="margin:2px;background:#303">'+s.code+' <small>('+s.why+')</small></button> ';
  });
  c.innerHTML = html;
}
function runCodeByName(code){
  /* run a code as if typed */
  if(typeof runLine==='function') runLine(code);
  else if(typeof handleCode==='function') handleCode(code);
  else if(typeof doCode==='function') doCode(code);
  else codeStatus('cannot run '+code);
}
function suggestForVicinity(){
  var out = [];
  if(typeof mePos==='undefined' || typeof stoneAt==='undefined') return out;
  var px = Math.round(mePos.x), pz = Math.round(mePos.z);
  var nearStone = false, nearConn = false, nearDome = false;
  for(var dx=-3; dx<=3; dx++){
    for(var dz=-3; dz<=3; dz++){
      if(stoneAt(px+dx, pz+dz, 0)) nearStone = true;
    }
  }
  /* near dome? */
  var ddx = mePos.x-25, ddz = mePos.z-25;
  if(Math.sqrt(ddx*ddx+ddz*ddz) < 8) nearDome = true;
  /* near a connection? (check CONN_LIST) */
  if(typeof CONN_LIST!=='undefined'){
    CONN_LIST.forEach(function(pos){
      if(Math.abs(pos.x-px)<3 && Math.abs(pos.z-pz)<3) nearConn = true;
    });
  }
  if(nearStone){
    out.push({code:'movemode', why:'stone nearby'});
    out.push({code:'fillgaps', why:'gaps nearby'});
  }
  if(nearConn){
    out.push({code:'conncolor', why:'connection n