<!-- RUBY-BACKUP · part 465 -->
ight: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>'
    + '<div style="width:120px;height:120px;margin:0 auto 20px;border-radius:50%;background:radial-gradient(circle at 40% 40%, #2a1a4a 0%, #1a0f2e 40%, #0a0515 100%);border:4px solid #d4af37;box-shadow:0 0 30px #d4af37, inset 0 0 20px rgba(212,175,55,0.3);display:flex;align-items:center;justify-content:center;position:relative;">'
    + '<div style="font-size:40px;">🌀</div>'
    + '<div style="position:absolute;width:100%;height:100%;border-radius:50%;border:2px dashed rgba(212,175,55,0.5);animation:spin 10s linear infinite;"></div>'
    + '</div>'
    + '<div style="font-size:32px;color:#ffd700;font-weight:bold;">'+CREDITS+'</div>'
    + '<div style="font-size:14px;color:#888;margin-top:5px;">credits in circulation</div>'
    + '<div style="margin-top:15px;font-size:12px;color:#666;font-style:italic;">The cosmic shield backs every credit.<br>Gold filigree. Galaxy core. Lightning sealed.</div>'
    + '<div style="margin-top:20px;"><button onclick="document.getElementById(\'currency-show\').remove()" style="padding:10px 30px;background:transparent;border:2px solid #d4af37;color:#d4af37;border-radius:6px;cursor:pointer;">Close</button></div>'
    + '<style>@keyframes spin{to{transform:rotate(360deg);}}</style>';
  document.body.appendChild(div);
}
/* currency watermark on credit displays */
function currencyNote(){
  codeStatus('credits bear the cosmic shield — Continuum circulation');
}
function loadCredits(){
  try{ CREDITS = parseInt(localStorage.getItem('ruby-credits')||'0'); }catch(e){ CREDITS = 0; }
}
function earnPay(amount, reason){
  loadCredits();
  CREDITS += amount;
  try{ localStorage.setItem('ruby-credits', CREDITS.toString()); }catch(e){}
  codeStatus('+'+amount+' credits ('+reason+') — total: '+CREDITS);
}
function showCredits(){
  loadCredits();
  codeStatus('you have '+CREDITS+' credits');
}
var JOBS = [
  {title: 'Tower Inspector', pay: 30, desc: 'Check 5 towers for damage'},
  {title: 'Street Sweeper', pay: 20, desc: 'Clean the ancestral streets'},
  {title: 'Farm Hand', pay: 25, desc: 'Help harvest at rural counties'},
  {title: 'Tribal Helper', pay: 35, desc: 'Assist with cyborg hut maintenance'},
  {title: 'Playground Monitor', pay: 15, desc: 'Watch the kids play'},
  {title: 'Spaceport Crew', pay: 50, desc: 'Guide ships to landing pads'}
];
function doJob(){
  var job = JOBS[Math.floor(Math.random()*JOBS.length)];
  codeStatus('job: '+job.title+' — '+job.desc+'. Working...');
  setTimeout(function(){
    earnPay(job.pay, job.title);
    unlockAchievement('Worked as '+job.title);
  }, 3000);
}
/* SOCIAL / INFLUENCER — prizes for loving the game */
var INFLUENCE = 0;
function loadInfluence(){
  try{ INFLUENCE = parseInt(localStorage.getItem('ruby-influence')||'0'); }catch(e){ INFLUENCE = 0; }
}
function shareJoy(){
  loadInfluence();
  INFLUENCE += 10;
  try{ localStorage.setItem('ruby-influence', INFLUENCE.toString()); }catch(e){}
  codeStatus('you shared joy! Influence: '+INFLUENCE);
  if(INFLUENCE >= 100 && INFLUENCE < 110){
    unlockAchievement('Influencer — 100 influence');
    earnPay(200, 'influencer prize');
    codeStatus('PRIZE! You are an influencer. 200 credits.');
  }
}
function inviteFriend(){
  loadInfluence();
  INFLUENCE += 25;
  try{ localStorage.setItem('ruby-influence', INFLUENCE.toString()); }catch(e){}
  codeStatus('friend invited! +25 influence. Total: '+INFLUENCE);
  unlockAchievement('Brought a friend');
}
/* UPDATES 