<!-- RUBY-BACKUP · part 210 -->
2px 35px;background:transparent;border:2px solid #ff6666;color:#ff6666;font-size:16px;border-radius:6px;cursor:pointer;">Mourn</button>';
        }
      }, 1500);
    }
  }, 1800);
  unlockAchievement('Lost Their Prized Possession');
  codeStatus('lost: '+prized.name);
  /* the aftermath begins */
  setTimeout(function(){ startAftermath(); }, 5000);
}
function presentCrystal(){
  /* the twin crystal floats out, toward the player */
  var div = document.createElement('div');
  div.id = 'capsule-present';
  div.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;z-index:20000;background:rgba(5,5,20,0.92);display:flex;flex-direction:column;justify-content:center;align-items:center;color:#fff;font-family:Georgia,serif;text-align:center;';
  div.innerHTML = '<div style="font-size:14px;color:#888;margin-bottom:15px;">You never crossed the boundary.</div>'
    + '<div style="font-size:16px;color:#ffd700;margin-bottom:15px;">But the capsule flipped it to you.</div>'
    + '<div id="capsule-words" style="font-style:italic;font-size:18px;line-height:2;max-width:600px;min-height:180px;"></div>';
  document.body.appendChild(div);
  var words = [
    '"I do not know what it is yet."',
    '"But it is futuristic. It seems like it should be mine."',
    '"It makes so much sense to own this."',
    '"It looks like it has a reasonable chance of being good for me."',
    '<span style="color:#00ffff;">The twin crystal floats toward you.</span>',
    '<span style="color:#ff6666;">You did not cross the boundary. It crossed to you.</span>'
  ];
  var w = document.getElementById('capsule-words');
  var i = 0;
  var wt = setInterval(function(){
    if(i < words.length){
      w.innerHTML += '<div style="margin:12px 0;opacity:0;animation:fadein 1s forwards;">'+words[i]+'</div>';
      i++;
    }else{
      clearInterval(wt);
      setTimeout(function(){
        var d = document.getElementById('capsule-present');
        if(d) d.remove();
        FORBIDDEN_TOUCHED = true;
        try{ localStorage.setItem('ruby-forbidden-touched', '1'); }catch(e){}
        /* it gets added to their inventory — and they lose their prized possession */
        receiveTwinCrystal();
        /* the aftermath comes first. The valley. Then the court. */
      }, 2000);
    }
  }, 1800);
}
if(typeof PHONE_CALLERS==='undefined') var PHONE_CALLERS = [];
try{ placePhoneCallers(); }catch(e){}
/* deliver after months of play, when they are deep in their world */
setInterval(function(){
  try{
    if(CAPSULE_DELIVERED) return;
    if(typeof courtIsReady!=='function') return;
    if(!courtIsReady()) return;
    if(FORBIDDEN_TOUCHED) return;
    /* they are playing and playing, caught up in their world */
    /* 5% chance per check (every 30s) — it happens when it happens */
    if(Math.random() < 0.05){
      deliverCapsule();
    }
  }catch(e){}
}, 30000);
try{
  if(localStorage.getItem('ruby-capsule-delivered')==='1') CAPSULE_DELIVERED = true;
  if(localStorage.getItem('ruby-gold-mode')==='1'){ GOLD_MODE = true; setTimeout(function(){ goldenCity(); }, 3000); }
}catch(e){}
function checkForbiddenTouch(){
  if(FORBIDDEN_TOUCHED) return;
  if(!FORBIDDEN_OBJ) return;
  if(typeof mePos==='undefined') return;
  var px = mePos.x * 0.13, pz = mePos.z * 0.13;
  var fx = FORBIDDEN_OBJ.position.x, fz = FORBIDDEN_OBJ.position.z;
  var dist = Math.sqrt((px-fx)*(px-fx) + (pz-fz)*(pz-fz));
  if(dist < 2.0){
    /* they touch it */
    FORBIDDEN_TOUCHED = true;
    try{ localStorage.setItem('ruby-forbidden-touched', '1'); }catch(e){}
    forbiddenTouchSequence();
  }
}
function forbiddenTouchSequence(){
  var div = document.createElement('div');
  div.id = 'forbidden-touch';
  div.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;z-index:20000;background:rgba(5,5,20,0.95);display:flex;flex-direction:column;justify-content:center;align-items:center;color:#fff;font-family:Georgia,serif;text-align:center;';
  div.innerHTML = '<div style="font-size:16px;color:#888;margin-bottom:15px;">You reach out...</div>'
    + '<div id="touch-words" style="font-style:italic;font-size:18px;line-height:2;max-width:600px;min-height:200px;"></div>';
  document.body.appendChild(div);
  var words = [
    '"I do not know what it is yet."',
    '"But it is futuristic. It seems like it should be mine."',
    '"It makes so much sense to own this."',
    '"It looks like it has a reasonable chance of being good for me."',
    '<span style="color:#00ffff;">Your fingers close around the twin crystal.</span>',
    '<span style="color:#ff6666;">The lightning remembers you.</span>'
  ];
  var w = document.getElementById('touch-words');
  var i = 0;
  var wt = setInterval(function(){
    if(i < words.length){
      w.innerHTML += '<div style="margin:12px 0;opacity:0;animation:fadein 1s forwards;">'+words[i]+'</div>';
      i++;
    }else{
      clearInterval(wt);
      setTimeout(function(){
        var d = document.getElementById('forbidden-t