<!-- SOLID CITY · part 3452 -->
bottom);ctx.lineTo(w,bottom);ctx.stroke();ctx.setLineDash([]);
    ctx.fillStyle='rgba(82,224,208,.65)';ctx.font='10px ui-monospace,monospace';ctx.fillText('CONVOY LANE K-9',12,top-10);
    var cx=convoyX*w,cy=.5*h;ctx.save();ctx.translate(cx,cy);ctx.fillStyle='#8fb9ba';ctx.beginPath();ctx.moveTo(18,0);ctx.lineTo(-10,-10);ctx.lineTo(-18,0);ctx.lineTo(-10,10);ctx.closePath();ctx.fill();ctx.fillStyle='#52e0d0';ctx.fillRect(-8,-2,20,4);ctx.restore();
    debris.forEach(function(o){var ox=o.x*w,oy=o.y*h,r=o.r*Math.min(w,h)*1.25;ctx.save();ctx.translate(ox,oy);ctx.rotate(o.angle);ctx.fillStyle='#332a27';ctx.strokeStyle=o.hp/o.max<.4?'#ff8b3d':'#b78468';ctx.lineWidth=1.5;ctx.beginPath();for(var k=0;k<7;k++){var a=k/7*Math.PI*2,rr=r*(.72+((k*3)%5)/12);var px=Math.cos(a)*rr,py=Math.sin(a)*rr;k?ctx.lineTo(px,py):ctx.moveTo(px,py)}ctx.closePath();ctx.fill();ctx.stroke();ctx.restore()});
    if(summit)drawSummit(w,h);
    particles.forEach(function(p){ctx.globalAlpha=Math.max(0,p.life);ctx.fillStyle='#ffc34d';ctx.fillRect(p.x*w,p.y*h,2,2);ctx.globalAlpha=1});
    drones.forEach(function(d){var x=d.x*w,y=d.y*h,sel=d.id===selectedId,human=d.owner==='HUMAN';ctx.save();ctx.translate(x,y);if(d.status==='DISABLED'){ctx.globalAlpha=.38;ctx.strokeStyle='#ff625f';ctx.beginPath();ctx.moveTo(-7,-7);ctx.lineTo(7,7);ctx.moveTo(7,-7);ctx.lineTo(-7,7);ctx.stroke();ctx.restore();return}if(d.pulse>0){ctx.globalAlpha=Math.min(1,d.pulse*2.5);ctx.strokeStyle=human?'#ffc34d':'#52e0d0';ctx.lineWidth=1.5;ctx.beginPath();ctx.arc(0,0,(.12-d.pulse*.06)*Math.min(w,h),0,Math.PI*2);ctx.stroke();ctx.globalAlpha=1}if(sel){ctx.strokeStyle='#ffc34d';ctx.lineWidth=2;ctx.beginPath();ctx.arc(0,0,17,0,Math.PI*2);ctx.stroke()}ctx.rotate(Math.atan2(d.vy,d.vx)||0);ctx.fillStyle=human?'#ffc34d':'#52e0d0';ctx.beginPath();ctx.moveTo(11,0);ctx.lineTo(-7,-6);ctx.lineTo(-3,0);ctx.lineTo(-7,6);ctx.closePath();ctx.fill();ctx.fillStyle='#dffefa';ctx.fillRect(-2,-2,5,4);ctx.restore();ctx.fillStyle=human?'#ffd786':'#a9f3eb';ctx.font='700 9px ui-monospace,monospace';ctx.fillText(d.name,x-12,y+22)});
  }

  function updateHUD(){
    var integrity=Math.round(drones.reduce(function(a,d){return a+Math.max(0,d.hp)},0)/12);document.getElementById('integrityValue').textContent=integrity+'%';document.getElementById('integrityValue').style.color=integrity<55?'var(--red)':'var(--green)';document.getElementById('progressFill').style.width=Math.min(100,progress)+'%';document.getElementById('progressText').textContent=Math.floor(Math.min(100,progress))+'% TO EXIT VECTOR';document.getElementById('phaseText').textContent='WAVE '+wave+' · '+(wave<4?'ESCALATING':'FINAL PRESSURE');document.getElementById('queueHealth').textContent='LOCAL · '+commandQueue.length+' QUEUED';
    if(summit){
      var labels={coalesce:'COALESCENCE',lattice:'THE LATTICE',strain:'STRAIN',choice:'THE CHOICE',collapse:'COLLAPSE',cage:'THE CAGE',breach:'BREACH',done:'SUMMIT'};
      var lt=labels[summit.phase]||'SUMMIT';
      if(summit.phase==='lattice')lt+=' · '+heldCount()+'/12';
      document.getElementById('phaseText').textContent=lt;
      var pct=summit.phase==='strain'?summit.charge:summit.phase==='cage'?summit.clearance:summit.phase==='collapse'?Math.min(100,summit.collapseT/6.18*100):summit.phase==='lattice'?heldCount()/12*100:100;
      document.getElementById('progressFill').style.width=Math.min(100,pct)+'%';
      document.getElementById('progressText').textContent=Math.floor(Math.min(100,pct))+'% '+(summit.phase==='cage'?'CONVOY CLEARANCE':summit.phase==='strain'?'LATTICE CHARGE':summit.phase==='collapse'?'COLLAPSE':'LATTICE');
    }
  }
  function updateMetrics(){document.getElementById('metricOrders').textContent=count('ORDER');document.getElementById('metricClaims').textContent=count('TAKEOVER');document.getElementById('metricCleared').textContent=count('CLEARED');document.getElementById('metricRejected').textContent=count('REJECTED')}
  function updateAllUI(){
    document.getElementById('activeOrder').textContent=activeOrder;document.querySelectorAll('.order-btn').forEach(function(b){b.classList.toggle('active',b.dataset.order===activeOrder)});
    var human=drones.filter(function(d){return d.owner==='HUMAN'&&d.status==='ACTIVE'}).length,active=drones.filter(function(d){return d.status==='ACTIVE'}).length;document.getElementById('humanCount').textContent=human;document.getElementById('aiCount').textContent=active-human;document.getElementById('statusLine').textContent=active+' ACTIVE';
    var d=drones.find(function(x){return x.id===selectedId});document.getElementById('selectedName').textContent=d?d.name+' · '+d.group:'No drone selected';document.getElementById('selectedOwner').textContent=d?(d.owner==='HUMAN'?'HUMAN · EPOCH '+d.epoch:'AI · TAP TO CLAIM'):'TAP TO CLAIM';
    var roster=document.getElementById('roster');roster.innerHTML='';drones.forEach(function(dr){var b=document.createElement('button');b.className='drone-tile '+(dr.owner==='HUMAN'?'human ':