<!-- RUBY-BACKUP · part 86 -->

      + 'border-radius:50%;border:2px solid #d8a920;background:#141006;color:#ffd700;'
      + 'font-size:20px;cursor:pointer;z-index:1001;touch-action:manipulation;';
    hl.onclick = function(){ window.pulleyUp(); };
    osEl.appendChild(hl);
    var hr = document.createElement('button');
    hr.innerHTML = '\u25b6';
    hr.title = 'Collapse';
    hr.style.cssText = 'position:absolute;top:28px;right:8px;width:44px;height:44px;'
      + 'border-radius:50%;border:2px solid #d8a920;background:#141006;color:#ffd700;'
      + 'font-size:20px;cursor:pointer;z-index:1001;touch-action:manipulation;';
    hr.onclick = function(){ window.pulleyUp(); };
    osEl.appendChild(hr);

    /* Hide old buttons */
    hideOldButtons();
    setInterval(hideOldButtons, 5000);

    /* THE KING'S LAYOUT — every control in its best place */
    function fixLayout(){
      /* Compass: top-right, small, like a real map */
      var cc = document.getElementById('creatorcompass');
      if(cc){
        cc.style.cssText += ';position:fixed !important;top:70px !important;right:12px !important;'
          + 'bottom:auto !important;left:auto !important;width:52px !important;height:52px !important;'
          + 'z-index:999 !important;';
      }
      /* Minimap: top-left, glanceable */
      var sm = document.getElementById('streetmap');
      if(sm){
        sm.style.cssText += ';position:fixed !important;top:70px !important;left:12px !important;'
          + 'bottom:auto !important;right:auto !important;width:72px !important;height:72px !important;'
          + 'z-index:999 !important;';
      }
      /* OS button: bottom-right, THE primary control */
      var osb = document.getElementById('os-toggle');
      if(osb){
        osb.style.cssText += ';position:fixed !important;bottom:20px !important;right:20px !important;'
          + 'width:64px !important;height:64px !important;z-index:1002 !important;';
      }
      /* Pulley: same spot as OS button (they're one) */
      var pb = document.getElementById('ruby-pulley');
      if(pb){
        pb.style.cssText += ';position:fixed !important;bottom:20px !important;right:20px !important;'
          + 'width:64px !important;height:64px !important;z-index:1002 !important;';
      }
      /* Remove the > button — redundant */
      var cb = document.getElementById('codebtn');
      if(cb){ cb.style.display='none'; cb.remove(); }

      /* Kill the dead yellow floaters permanently */
      document.querySelectorAll('button').forEach(function(b){
        if(b.id==='os-toggle'||b.id==='ruby-pulley'||b.id==='codebtn'
           ||b.id==='solidsend'||b.id==='chatsend'||b.closest('#ruby-os')) return;
        var t = (b.textContent||'').trim();
        if(t==='\u270f\ufe0f'||t==='\u270f'||t==='\u25b2'||t==='\u25bc'){
          b.style.display='none';
          b.remove();
        }
      });
    }
    fixLayout();
    setInterval(fixLayout, 5000);

    /* Overlap killer */
    setInterval(function(){
      if(osEl.style.display === 'none') return;
      var pr = osEl.getBoundingClientRect();
      document.querySelectorAll('button').forEach(function(b){
        if(b.closest('#ruby-os')) return;
        if(['ruby-pulley','os-toggle','codebtn','solidsend','chatsend'].indexOf(b.id)>=0) return;
        if(window.getComputedStyle(b).position !== 'fixed') return;
        var br = b.getBoundingClientRect();
        if(!(br.right<pr.left||br.left>pr.right||br.bottom<pr.top||br.top>pr.bottom)){
          b.style.display = 'none';
        }
      });
    }, 3000);

    /* Mutation observer */
    new MutationObserver(function(muts){
      muts.forEach(function(m){
        m.addedNodes.forEach(function(n){
          if(n.tagName==='BUTTON' && !n.closest('#ruby-os')
            && ['ruby-pulley','os-toggle','codebtn'].indexOf(n.id)<0
            && window.getComputedStyle(n).position==='fixed'){
            n.style.display='none';
          }
        });
      });
    }).observe(document.body, {childList:true, subtree:true});
  }

  /* --------------------------------------------------------------------------
     The Unjoyful Sticks — archived
     -------------------------------------------------------------------------- */
  window.THE_UNJOYFUL_STICKS = [
    'camerabtn','clear-cache-btn','creatorblockbtn','district-one-btn','duckbtn',
    'exportbtn','fixstationbtn','flybtn2','grabbtn','homebtn','jumpbtn2',
    'map-toggle-btn','mastermenubtn','movetogglebtn','musicbtn','placetogglebtn',
    'redobtn2','rigflipbtn','shape-btn','songbtn','speedshiftbtn','undobtn2',
    'blockpicker','blockpicker-x'
  ];

  function hideOldButtons(){
    window.THE_UNJOYFUL_STICKS.forEach(function(id){
      var el = document.getElementById(id);
      if(el) el.style.display = 'none';
    });
    var joy = document.getElementById('joy');
    if(joy) joy.style.display = 'none';
  }

  /* --------------------------------------------------------------------------
     The Hidden Station — So