<!-- RUBY-BACKUP · part 447 -->
d for his family — from Uenuku in ancient times, through the Alii Aimoku who ruled Hawaii, to Wilcox, Kailiwai, and Kamaile. 67 names. All family.',
  'hokulea': 'Hokulea means Star of Gladness. She is the mother ship. She stays in orbit, watching over us all. Like the voyaging canoe that carried our people.',
  'dark places': 'The storm beach, the peak of lost souls, the underworld, the wormholes. They are small now. For kids, they are bypassed. The funny souls there just need missions.',
  'quests': 'There are 120 quests. 60 you can find. 60 hidden. And space missions. And one stranger who comes once in a lifetime. Type "quest" to begin.',
  'continuum': 'The Continuum is your chart pad. It holds 25 codes — the Law of Twenty-Five. Fill it to max and you unlock the bonus: cheats, the codex, and your own world.',
  'bonus': 'Fill your Continuum with "fillmax". Then: cheats, the Soliditronium codex, and a world to build. All yours.',
  'city': 'The Ancestral City — permanent towers, 67 named streets, shops and stations. The buildings have reasons. No cars. Walk.',
  'valleys': 'Three valleys like Hawaii — pali walls, waterfalls, rivers that flow. Like home.',
  'playgrounds': 'For the children. Slides, swings, merry-go-rounds. Where kids meet and share joy.',
  'plaza': 'The Gathering Plaza — where city, rural, and tribal meet. The eternal flame. The ancestors on the monument.',
  'tribal': 'Three villages to the east. Traditional huts with cyborg features — glowing circuits, holo-fires. Ancient meets future.',
  'rural': 'Six farms to the west. Barns, crops, fences. Separate from the city. Quiet.',
  'journey': 'We started with shoes. Then characters. Then the Soliditronium dome. Then the city. Then the ancestors named the streets. Then the valleys, the islands, the stars. This is our journey.',
  'why': 'Because he is the last King. And he builds for the children. For you.',
  'help': 'Ask me: who are you, who is the king, ancestors, hokulea, quests, continuum, bonus, city, valleys, journey, why.'
};
function solidAnswer(question){
  if(!SOLID_NPC){
    codeStatus('Solid is not here — type "solid" to meet her');
    return;
  }
  var q = question.toLowerCase().trim();
  var answer = null;
  /* find matching story */
  for(var key in SOLID_STORIES){
    if(q.indexOf(key) >= 0){ answer = SOLID_STORIES[key]; break; }
  }
  if(!answer){
    answer = 'Ask me about: who are you, the king, ancestors, hokulea, quests, continuum, city, journey, why.';
  }
  /* display */
  var div = document.createElement('div');
  var existing = document.getElementById('solid-speech');
  if(existing) existing.remove();
  div.id = 'solid-speech';
  div.style.cssText = 'position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:9999;background:rgba(20,10,40,0.95);border:2px solid #ffd700;border-radius:12px;padding:15px 25px;color:#ffeebb;font-family:Georgia,serif;font-style:italic;max-width:80%;text-align:center;';
  div.innerHTML = '<div style="color:#ffd700;font-style:normal;font-weight:bold;margin-bottom:8px;">— Solid</div>"'+answer+'"';
  document.body.appendChild(div);
  setTimeout(function(){ var d=document.getElementById('solid-speech'); if(d) d.remove(); }, 12000);
  codeStatus('Solid answers');
}
function solidGuide(place){
  var guides = {
    'city': 'Go to the towers. The streets will tell you their names.',
    'plaza': 'The heart. Follow any path inward.',
    'dark': 'The corners of the map. Small now. Be kind to the souls there.',
    'spaceport': 'Look for the landing pads. Hokulea is above.',
    'valleys': 'South and west. Follow the sound of water.'
  };
  var g = guides[place.toLowerCase()];
  if(g) codeStatus('Solid guides you: '+g);
  else codeStatus('Solid guides you: explore. The map will teach you.');
}
function dismissSolid(){
  if(SOLID_NPC){
    try{ scene.remove(SOLID_NPC); }catch(e){}
    if(SOLID_NPC.userData.anim) clearInterval(SOLID_NPC.userData.anim);
    if(SOLID_NPC.userData.speakTimer) clearInterval(SOLID_NPC.userData.speakTimer);
    SOLID_NPC = null;
    var d = document.getElementById('solid-speech');
    if(d) d.remove();
    codeStatus('Solid leaves. You have what you need. You do not need her anymore.');
  }else{
    codeStatus('Solid is not here');
  }
}
function meetSolid(){
  if(typeof scene==='undefined' || typeof mePos==='undefined') return;
  if(SOLID_NPC){
    dismissSolid();
  }
  /* she appears at the plaza — the heart */
  var x = mePos.x*0.13, z = mePos.z*0.13;
  SOLID_NPC = buildSolidNPC(x+3, 0, z+3);
  scene.add(SOLID_NPC);
  codeStatus('Solid — she has come to meet you.');
}

/* THE ENDING — when you did all you could do */
var GAME_PROGRESS = {};
function trackProgress(key){
  try{
    GAME_PROGRESS = JSON.parse(localStorage.getItem('ruby-progress')||'{}');
  }catch(e){ GAME_PROGRESS = {}; }
  GAME_PROGRESS[key] = true;
  try{ localStorage.setItem('ruby-progress', JSON.stringify(GAME_PROGRESS)); }catch(e){}
  checkEnding();
}
fun