<!-- RUBY-BACKUP · part 82 -->
-------------------------------------- */
  function makeButton(id, label, action){
    var cell = document.createElement('div');
    cell.style.cssText = 'display:flex;flex-direction:column;align-items:center;gap:2px;'
      + 'width:72px;flex-shrink:0;';

    var btn = document.createElement('button');
    btn.title = label;
    btn.innerHTML = '<img src="/ruby/buttons/'+id+'.webp" '
      + 'style="width:100%;height:100%;border-radius:50%;object-fit:cover;" draggable="false">';
    btn.style.cssText = 'width:56px;height:56px;min-width:56px;min-height:56px;'
      + 'border-radius:50%;padding:0;margin:0;border:2px solid #d8a920;background:#141006;'
      + 'cursor:pointer;flex-shrink:0;overflow:hidden;touch-action:manipulation;';

    btn.onclick = action;
    btn.addEventListener('touchend', function(e){
      e.preventDefault(); e.stopPropagation();
      try{ action(); }catch(err){}
    }, {passive:false});

    var lbl = document.createElement('div');
    lbl.textContent = label;
    lbl.style.cssText = 'color:#d8a920;font-size:15px;font-weight:bold;'
      + 'font-family:Georgia,\'Times New Roman\',serif;text-align:center;'
      + 'line-height:1.2;max-width:72px;letter-spacing:0.5px;';

    cell.appendChild(btn);
    cell.appendChild(lbl);
    return cell;
  }

  function makeHeader(text){
    var h = document.createElement('div');
    h.textContent = text;
    h.style.cssText = 'width:100%;text-align:center;color:#ffd700;'
      + 'font:16px Georgia,\'Times New Roman\',serif;letter-spacing:6px;'
      + 'margin:10px 0 6px 0;border-bottom:1px solid #d8a920;padding-bottom:6px;';
    return h;
  }

  /* --------------------------------------------------------------------------
     CORE buttons
     -------------------------------------------------------------------------- */
  /* GROUPED BY PURPOSE — the King's most-used first */
  var CORE = [
    /* MOVE — how you get around */
    ['p1-walker','Walk',           function(){ code('walk'); }, 'MOVE'],
    ['p1-bird','Fly',              function(){ code('fly'); }, 'MOVE'],
    ['p1-uparrow','Jump',          function(){ code('jump'); }, 'MOVE'],
    ['p1-house','Home',            function(){ code('home'); }, 'MOVE'],
    ['p1-link','Go',               function(){ code('go'); }, 'MOVE'],
    /* BUILD — make things */
    ['p1-temple','Build district', function(){ code('bam'); }, 'BUILD'],
    ['p1-plus','Create',           function(){ code('create'); }, 'BUILD'],
    ['p1-minus','Delete',          function(){ code('delete'); }, 'BUILD'],
    ['p1-cube','Shapes',           function(){ code('shapes'); }, 'BUILD'],
    ['p1-temple','Pyramid',        function(){ code('pyramid'); }, 'BUILD'],
    ['p3-flyv','Fly vertical', function(){ code('flyvertical'); }, 'ADMIN'],
    ['p3-sonic','Sonic boom',  function(){ code('sonicboom'); }, 'MOVE'],
    ['p3-launch','Launch',          function(){ code('launch'); }, 'MOVE'],
    ['p3-creator','Creator',       function(){ code('creator'); }, 'BUILD'],
    ['p3-creator','Creator Hall',  function(){ code('creatorhall'); }, 'WORLD'],
    /* SEE — view the world */
    ['p1-map','Map',               function(){ code('map'); }, 'SEE'],
    ['p1-camera','Camera',          function(){ code('camera'); }, 'SEE'],
    ['p1-sun','Day',               function(){ code('daycity'); }, 'SEE'],
    ['p1-moon','Night',            function(){ code('nightcity'); }, 'SEE'],
    ['p1-pin','Where am I',        function(){ code('whereami'); }, 'SEE'],
    /* MAP — the word-coordinate navigation */
    ['p1-map','Go heart',           function(){ code('go heart'); }, 'MAP'],
    ['p1-map','Go far dawn',        function(){ code('go far dawn'); }, 'MAP'],
    ['p1-map','Go far dusk',        function(){ code('go far dusk'); }, 'MAP'],
    ['p1-map','Go far crown',       function(){ code('go far crown'); }, 'MAP'],
    ['p1-map','Go far root',        function(){ code('go far root'); }, 'MAP'],
    ['p1-cube','Fill map',          function(){ code('fillmap'); }, 'MAP'],
    ['p1-cube','Solid block',       function(){ code('solidblock'); }, 'MAP'],
    ['p3-summon','Summon Solid',      function(){ code('solidavatar'); }, 'MAP'],
    ['p1-hamburger','Menu',       function(){ window.pulleyUp(); }, 'SYSTEM'],
    ['p1-palette','Render',         function(){ say('render options'); }, 'SEE'],
    /* TOUCH — interact */
    ['p1-hand','Grab',             function(){ code('grab'); }, 'TOUCH'],
    ['p1-speech','Chat',           function(){ toggleChat(); }, 'TOUCH'],
    ['p1-gt','Codes',              function(){ focusCode(); }, 'TOUCH'],
    ['p1-music','Music',           function(){ say('music'); }, 'TOUCH'],
    /* SYSTEM */
    ['p1-refresh','Refresh',       function(){ if(confirm('Refresh the map?')) location.reload(); }, 'SYSTEM'],
  ];

  /* --------------------------------------------------------------------------
     SOLID's tools
     -------------------------------------------------------------------------- */
  /*