<!-- RUBY-BACKUP · part 450 -->
x 25px;background:transparent;border:2px solid #ffd700;color:#ffd700;border-radius:6px;cursor:pointer;">Continue</button>';
      }
      codeStatus('Continuum released — the 2 minutes have passed');
    }
  }, 1000);
  codeStatus('Continuum sunk to max — locked for 2 minutes. No alternative.');
}
/* prevent changes while locked */
var _origPadAdd = null;
function guardContinuum(){
  /* this runs on pad add attempts */
  if(CONTINUUM_LOCKED){
    codeStatus('Continuum is locked — the paradox holds it. No alternative.');
    return true;
  }
  return false;
}

/* THE COURT WAITS — months of playing first */
function monthsPlayed(){
  try{
    var first = localStorage.getItem('ruby-first-play');
    if(!first){
      localStorage.setItem('ruby-first-play', Date.now().toString());
      return 0;
    }
    return (Date.now() - parseInt(first)) / (30*24*60*60*1000);
  }catch(e){ return 0; }
}
function courtIsReady(){
  return monthsPlayed() >= 2;
}
/* boundary respected — they never cross it. The capsule comes to them. */
/* old proximity check disabled */
function courtNotReady(){
  var m = monthsPlayed();
  var remaining = Math.max(0, 2 - m);
  var days = Math.ceil(remaining * 30);
  codeStatus('the court has not convened yet — '+days+' days of playing remain');
}

/* THE FORBIDDEN THING — futuristic, seems like it should be theirs */
var FORBIDDEN_TOUCHED = false;
function buildForbiddenThing(x, y, z){
  var g = new THREE.Group();
  /* futuristic — sleek, glowing, beautiful */
  var chrome = new THREE.MeshStandardMaterial({color: 0xc0c0ff, metalness: 0.95, roughness: 0.1});
  var glowCyan = new THREE.MeshBasicMaterial({color: 0x00ffff, transparent: true, opacity: 0.6});
  var glowViolet = new THREE.MeshBasicMaterial({color: 0x8844ff, transparent: true, opacity: 0.5});
  /* the core — a floating twin crystal */
  var crystal1 = new THREE.Mesh(new THREE.OctahedronGeometry(0.3), chrome);
  crystal1.position.set(-0.25, 1.5, 0);
  g.add(crystal1);
  var crystal2 = new THREE.Mesh(new THREE.OctahedronGeometry(0.3), chrome);
  crystal2.position.set(0.25, 1.5, 0);
  g.add(crystal2);
  /* twin lightning arcs between them */
  for(var i=0; i<3; i++){
    var arc = new THREE.Mesh(new THREE.TorusGeometry(0.25, 0.02, 8, 20, Math.PI), glowCyan);
    arc.position.set(0, 1.5, 0);
    arc.rotation.z = (i * Math.PI / 3);
    g.add(arc);
  }
  /* halo — it looks GOOD, inviting */
  var halo = new THREE.Mesh(new THREE.TorusGeometry(0.8, 0.05, 10, 40), glowViolet);
  halo.position.y = 1.5;
  halo.rotation.x = Math.PI/2;
  g.add(halo);
  /* pedestal — like it was made for someone */
  var ped = new THREE.Mesh(new THREE.CylinderGeometry(0.5, 0.7, 1.0, 12), chrome);
  ped.position.y = 0.5;
  g.add(ped);
  /* warning signs — small, easy to ignore */
  var signMat = new THREE.MeshBasicMaterial({color: 0xff0000});
  for(var s=0; s<4; s++){
    var sign = new THREE.Mesh(new THREE.PlaneGeometry(0.6, 0.3), signMat);
    var ang = (s / 4) * Math.PI * 2;
    sign.position.set(Math.cos(ang)*1.5, 0.8, Math.sin(ang)*1.5);
    sign.lookAt(0, 0.8, 0);
    g.add(sign);
  }
  g.position.set(x, y, z);
  /* animation — it pulses, calls to you */
  var t = 0;
  var anim = setInterval(function(){
    t += 0.03;
    crystal1.rotation.y += 0.02;
    crystal2.rotation.y -= 0.02;
    crystal1.position.y = 1.5 + Math.sin(t*2)*0.1;
    crystal2.position.y = 1.5 + Math.cos(t*2)*0.1;
    halo.rotation.z += 0.01;
    var pulse = 0.5 + Math.sin(t*3)*0.2;
    glowCyan.opacity = pulse;
  }, 50);
  g.userData.anim = anim;
  g.userData.isForbidden = true;
  return g;
}
var FORBIDDEN_OBJ = null;
function placeForbiddenThing(){
  if(typeof scene==='undefined') return;
  if(FORBIDDEN_OBJ) return;
  /* at the peak of lost souls area */
  FORBIDDEN_OBJ = buildForbiddenThing(60, 0, -60);
  scene.add(FORBIDDEN_OBJ);
  codeStatus('something glimmers at the peak... futuristic. It looks like it should be yours.');
}

/* THE CAPSULE — the boundary is never crossed. It comes to them. */
var CAPSULE_DELIVERED = false;
function buildDeliveryCapsule(x, y, z){
  var g = new THREE.Group();
  /* a golden capsule — like the Soliditronium capsule */
  var gold = new THREE.MeshStandardMaterial({color: 0xffd700, metalness: 0.9, roughness: 0.2});
  var glass = new THREE.MeshStandardMaterial({color: 0xaaccff, transparent: true, opacity: 0.3});
  /* capsule body */
  var body = new THREE.Mesh(new THREE.CapsuleGeometry(0.4, 0.8, 8, 16), gold);
  body.position.y = 1.0;
  g.add(body);
  /* glass window — you can see inside */
  var window_ = new THREE.Mesh(new THREE.PlaneGeometry(0.5, 0.6), glass);
  window_.position.set(0, 1.0, 0.41);
  g.add(window_);
  /* inside: the twin crystal, glowing */
  var chrome = new THREE.MeshStandardMaterial({color: 0xc0c0ff, metalness: 0.95, roughness: 0.1});
  var crystal = new THREE.Mesh(new THREE.OctahedronGeometry(0.2), chrome);
  crystal.position.set(0, 1.0, 0);
  g.add(crystal);
  var innerGlow = new THREE.Mesh(new THREE