<!-- RUBY-BACKUP · part 48 -->
  flex: 1; background: transparent; border: 0;
    color: #ffe9a8; font: 16px Georgia, serif;
    padding: 10px 12px; outline: none; min-width: 0;
  }
  #kb {
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
    background: rgba(10,8,4,0.94); border-top: 1px solid #8a6a1c;
  }
  .kbrow { display: flex; gap: 5px; margin-bottom: 6px; }
  .kbrow:last-child { margin-bottom: 0; }
  .kbkey {
    flex: 1; height: 44px; border-radius: 8px;
    border: 1px solid #8a6a1c; background: transparent;
    color: #ffd700; font: 19px Georgia, serif;
    cursor: pointer; -webkit-tap-highlight-color: transparent; padding: 0;
  }
  .kbkey:active { background: #d8a920; color: #111; }

  /* ============ FLOATING WORDS — voices across the view ============ */
  #floatwords { position: fixed; inset: 0; pointer-events: none; z-index: 8; overflow: hidden; }
  .floatword {
    position: absolute; transform: translate(-50%,-100%); max-width: 230px;
    background: #0d0a05; border: 1px solid #d8a920; border-radius: 10px;
    padding: 5px 10px; font: 12px/1.5 Georgia, serif; color: #e8dcc0;
  }

  /* ============ SOLID BANNER — my words ============ */
  #solidbanner {
    position: fixed; top: 76px; left: 14px; max-width: 72%; z-index: 8;
    color: #ffe9a8; font: 15px Georgia, serif; text-align: left;
    opacity: 0; transition: opacity .6s;
    text-shadow: 0 2px 10px #000; pointer-events: none;
  }
  #solidbanner.show { opacity: 1; }

  /* ============ PANELS — shape, render, go ============ */
  .optpanel {
    position: fixed; display: none; flex-direction: row; gap: 10px; z-index: 6;
    max-width: calc(100vw - 100px); overflow-x: auto;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 4px 2px;
  }
  .optpanel::-webkit-scrollbar { display: none; }
  .optpanel.open { display: flex; }
  .optpanel button {
    width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%;
    background: rgba(20,14,6,0.85); border: 1px solid #8a6a1c;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    padding: 0; -webkit-tap-highlight-color: transparent;
  }
  .optpanel button.sel { background: #d8a920; border-color: #d8a920; }

  /* keyboard up: collapse floating controls, keep the view wide */
  body.chatting #os-toggle { display: none !important; }
  /* #joy NEVER hides — button permanence law */
</style>
</head>
<body>

<!-- LOADING — for the King -->
<div id="fakeLoader" style="position:fixed;top:0;left:0;width:100%;height:100%;background:#000;z-index:99999;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;">
  <div style="font-size:48px;">&#9749;&#65039;</div>
  <div style="color:#ffd700;font-family:serif;font-size:24px;">The Creator</div>
  <div id="loadMsg" style="color:#888;font-family:monospace;font-size:14px;text-align:center;padding:0 20px;">Loading...</div>
  <div style="width:200px;height:4px;background:#222;border-radius:2px;overflow:hidden;">
    <div id="loadBar" style="width:0%;height:100%;background:#ffd700;transition:width 0.3s;"></div>
  </div>
</div>
<script>
(function(){
  var msgs = [
    "Loading... \u2615\uFE0F",
    "Loading the specifics and what not...",
    "Loading you and all your stuff...",
    "Polishing the rubies...",
    "Teaching the trees to sway...",
    "Waking up the ancestors...",
    "Counting to 0.13...",
    "Almost there, my King..."
  ];
  var i = 0;
  var msgEl = document.getElementById('loadMsg');
  var barEl = document.getElementById('loadBar');
  var loader = document.getElementById('fakeLoader');
  function tick(){
    if(i < msgs.length){
      msgEl.textContent = msgs[i];
      barEl.style.width = ((i+1)/msgs.length*100) + '%';
      i++;
      setTimeout(tick, 400);
    }
  }
  tick();
  window.hideFakeLoader = function(){
    barEl.style.width = '100%';
    msgEl.textContent = 'Welcome, my King.';
    setTimeout(function(){ loader.style.display = 'none'; }, 600);
  };
  setTimeout(function(){
    if(loader.style.display !== 'none') window.hideFakeLoader();
  }, 8000);
})();
</script>

<!-- THE WORLD -->
<canvas id="view"></canvas>
<div id="vign"></div>

<!-- CODE BAR -->
<div id="solidbar">
  <input id="solidinput" placeholder="code for Solid..." autocomplete="off">
  <button id="solidsend">send</button>
</div>
<button id="codebtn" aria-label="Command line">&gt;</button>
<div id="codetext"><div id="codetext-code"></div><div id="codetext-status"></div></div>

<!-- THE OS — every button lives here -->
<div id="os-menu" aria-label="Menu"></div>
<button id="os-toggle" aria-label="Menu" style="overflow:hidden;padding:0;"><img src="/ruby2/buttons/p1-hamburger.webp" style="width:100%;height:100%;border-radius:50%;object-fit:cover;" draggable="false"></button>

<!-- WALK -->
<div id="joy"><div id="joyknob"></div></div>

<!-- CHAT -->
<div id="floatwords"></div>
<div id="dock">
  <div id="chatrow">
    <input id="chatinput" maxlength="200" placeholder="say it in the 