<!-- RUBY-BACKUP · part 224 -->
fficer: 'Explain this. You cannot. The picture does not lie.'
    },
    {
      text: 'They grill you hard. Hours pass. The questions circle.',
      officer: 'You wanted the most modified jet. You needed the server core to power it. Admit it.'
    },
    {
      text: 'But you remember — the flare was an accident. You touched the core trying to STOP it, not cause it.',
      officer: '...',
      final: true
    }
  ];
  var s = stages[FLARE_CASE.stage];
  if(!s){
    endFlareCase();
    return;
  }
  var div = document.createElement('div');
  var existing = document.getElementById('quest-hud');
  if(existing) existing.remove();
  div.id = 'quest-hud';
  div.style.cssText = 'position:fixed;top:15%;left:50%;transform:translateX(-50%);z-index:9999;background:rgba(15,5,25,0.97);border:3px solid #ff3333;border-radius:12px;padding:20px 30px;color:#fff;font-family:Georgia,serif;max-width:85%;text-align:center;';
  div.innerHTML = '<div style="color:#ff6666;font-weight:bold;font-size:20px;margin-bottom:12px;">🌐 THE CONTINUUM SERVER FLARE</div>'
    + '<div style="font-size:14px;color:#888;margin-bottom:12px;">That night at the spaceport</div>'
    + '<div style="font-style:italic;font-size:16px;line-height:1.6;margin-bottom:12px;">'+s.text+'</div>'
    + '<div style="font-weight:bold;font-size:17px;color:#ffaaaa;margin-bottom:15px;">"'+s.officer+'"</div>'
    + (s.final
      ? '<button onclick="endFlareCase()" style="padding:10px 25px;background:#662222;color:#fff;border:1px solid #ff6666;border-radius:6px;cursor:pointer;">Tell the Truth</button>'
      : '<button onclick="flareNext()" style="padding:10px 25px;background:#442222;color:#fff;border:1px solid #ff6666;border-radius:6px;cursor:pointer;">Endure</button>');
  document.body.appendChild(div);
}
function flareNext(){
  FLARE_CASE.stage++;
  showFlareStage();
}
function endFlareCase(){
  FLARE_CASE.active = false;
  var div = document.getElementById('quest-hud');
  if(div){
    div.innerHTML = '<div style="color:#ffd700;font-weight:bold;font-size:22px;margin-bottom:15px;">🌐 VERDICT</div>'
      + '<div style="font-style:italic;font-size:16px;line-height:1.7;">'
      + 'You tell them: "I touched the core to STOP the flare."<br><br>'
      + 'Silence.<br><br>'
      + 'The senior officer nods slowly.<br>'
      + '"...We know. But we had to grill you hard.<br>'
      + 'The Apex Runner is yours. You earned it."<br><br>'
      + '<span style="color:#ffd700;">You were never guilty. Only tested.</span>'
      + '</div>'
      + '<div style="margin-top:20px;"><button onclick="document.getElementById(\'quest-hud\').remove()" style="padding:10px 25px;background:#664422;color:#fff;border:1px solid #ffd700;border-radius:6px;cursor:pointer;">Take Your Jet</button></div>';
  }
  unlockAchievement('Survived the Server Flare');
  earnPay(200, 'flare case cleared');
}
function courtCase(){
  var c = COURT_CASES[Math.floor(Math.random()*COURT_CASES.length)];
  var div = document.createElement('div');
  var existing = document.getElementById('quest-hud');
  if(existing) existing.remove();
  div.id = 'quest-hud';
  div.style.cssText = 'position:fixed;top:20px;left:50%;transform:translateX(-50%);z-index:9999;background:rgba(30,10,10,0.95);border:3px solid #ff4444;border-radius:10px;padding:15px 25px;color:#fff;font-family:Georgia,serif;text-align:center;max-width:85%;';
  div.innerHTML = '<div style="color:#ff6666;font-weight:bold;font-size:18px;">⚖️ COURT</div>'
    + '<div style="margin-top:10px;font-style:italic;">"'+c.claim+'"</div>'
    + '<div style="margin-top:10px;">What is the fallacy?</div>'
    + '<div style="margin-top:8px;font-size:13px;color:#aaa;">Type: court '+c.fallacy.toLowerCase().replace(/ /g,'')+'</div>';
  document.body.appendChild(div);
  window._courtAnswer = c.fallacy.toLowerCase().replace(/ /g,'');
  window._courtCorrect = c.correct;
  codeStatus('court is in session — identify the fallacy');
}
function courtAnswer(ans){
  if(window._courtAnswer && ans===window._courtAnswer){
    codeStatus('Correct! '+window._courtCorrect+'. Achievement unlocked.');
    unlockAchievement('Won a court case');
    earnPay(50, 'court victory');
    var d = document.getElementById('quest-hud');
    if(d) d.remove();
    window._courtAnswer = null;
  }else{
    codeStatus('Not quite. Try again.');
  }
}
/* WORK AND PAY — economy */
var CREDITS = 0;

/* CONTINUUM CURRENCY — the cosmic shield */
function showCurrency(){
  loadCredits();
  var div = document.createElement('div');
  div.id = 'currency-show';
  div.style.cssText = 'position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:20000;background:rgba(10,5,25,0.97);border:3px solid #d4af37;border-radius:12px;padding:25px 40px;color:#fff;font-family:Georgia,serif;text-align:center;max-width:85%;';
  /* coin visual — CSS cosmic shield */
  div.innerHTML = '<div style="font-size:14px;color:#888;letter-spacing:3px;margin-bottom:15px;">CONTINUUM CIRCULATION</div>'
    + 