<!-- RUBY-BACKUP · part 225 -->
'<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 AND NEW PRODUCTS */
var GAME_VERSION = '1.0';
var PRODUCTS = [
  {name: 'Starship Skin: Gold', cost: 100, desc: 'Golden hull for your ship'},
  {name: 'Avatar Aura: Rainbow', cost: 150, desc: 'Rainbow glow'},
  {name: 'Pet: Phoenix', cost: 200, desc: 'A fiery companion'},
  {name: 'House: Sky Villa', cost: 300, desc: 'A home in the clouds'}
];
function checkUpdates(){
  codeStatus('game version '+GAME_VERSION+'. New products available — type "products"');
}
function showProducts(){
  loadCredits();
  var html = '<b style="color:#0ff">NEW PRODUCTS</b> (you have '+CREDITS+' credits)<br><br>';
  PRODUCTS.forEach(function(p, i){
    html += '<div style="margin:8px 0;padding:8px;border:1px solid #0ff;border-radius:5px;">'
      + '<b>'+p.name+'</b> — '+p.cost+' credits<br><small>'+p.desc+'</small><br>'
      + '<button onclick="buyProduct('+i+')" style="margin-top:5px;">BUY</button></div>';
  });
  var d = document.createElement('div');
  d.id = 'product-panel';
  d.style.cssText = 'position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10000;background:rgba(5,20,30,0.95);border:3px solid #0ff;border-radius:12px;padding:20px;color:#fff;max-width:400px;max-height:70%;overflow:auto;';
  d.innerHTML = html + '<br><button onclick="document.getElementById(\'product-panel\').remove()">CLOSE</button>';
  document.body.appendChild(d);
}
function buyProduct(idx){
  loadCredits();
  var p = PRODUCTS[idx];
  if(!p) return;
  if(CREDITS >= p.cost){
    CREDITS -= p.cost;
    try{ localStorage.setItem('ruby-credits', CREDI