<!-- SOLID CITY · part 1875 -->
6';levelBeat.hidden=false;
  }
  function showSummitChoice(){
    if(transitioning)return;transitioning=true;running=false;
    document.querySelector('#summitChoice').hidden=false;
    logH('summit · the heart is critical · the pair must choose');
  }
  function chooseSummit(choice){
    document.querySelector('#summitChoice').hidden=true;
    var sm=progression.summit;sm.choice=choice;sm.phase='shock';sm.shockT=0;sm.shockDone=false;
    transitioning=false;running=true;last=performance.now();
    burst(sm.prime.x,sm.prime.y,'#fff2a8',50);
    notify(0,choice==='together'?'TOGETHER':'HOLD THE LINE',1200);notify(1,choice==='together'?'TOGETHER':'HOLD THE LINE',1200);
    logH('summit · choice · '+choice);
  }
  function applyShockChoice(){
    var sm=progression.summit;if(!sm)return;
    if(sm.choice==='together'){damage(ships[0],0,70,'shockwave');damage(ships[1],1,70,'shockwave')}
    else{var i=sm.choice==='gold'?0:1;sacrificeShip(ships[i],i)}
  }
  function sacrificeShip(s,i){
    if(!s||!s.alive)return;
    s.hull=0;s.alive=false;s.sacrificed=true;s.respawn=1e9;s.vx=0;s.vy=0;
    burst(s.x,s.y,s.color,40);burst(s.x,s.y,'#fff2a8',24);
    notify(i,'HELD THE LINE',2000);notify(i?0:1,'THEY HELD THE LINE',2000);
    logH('summit · '+s.label+' held the line · absorbed the shockwave');
  }
  function summitVictory(){
    var sm=progression.summit,goldAlive=ships[0].alive,tealAlive=ships[1].alive,note;
    if(goldAlive&&tealAlive)note='GOLD AND TEAL · BOTH RETURNED. The double strike landed as one weapon, and the pair came home together.';
    else if(goldAlive)note='GOLD RETURNED · TEAL HELD THE LINE. One ship absorbed the shockwave so the other could come home.';
    else if(tealAlive)note='TEAL RETURNED · GOLD HELD THE LINE. One ship absorbed the shockwave so the other could come home.';
    else note='THE PAIR DID NOT RETURN. The shockwave took them both — the sky keeps their symmetry.';
    progression.summitResult={victory:goldAlive||tealAlive,outcome:goldAlive||tealAlive?'MISSION COMPLETE \u00B7 THE DOUBLE STRIKE':'FORMATION LOST \u00B7 THE SHOCKWAVE TOOK THEM',note:note};
    endRun(goldAlive||tealAlive?'victory':'defeat');
  }
  function drawPrime(ctx,p,e,scale){
    var sm=progression.summit,now=performance.now();
    ctx.save();ctx.translate(p.x,p.y);ctx.scale(scale,scale);
    if(sm&&sm.phase==='final'){
      var pulse=1+Math.sin(elapsed*6)*.12;
      ctx.save();ctx.scale(pulse,pulse);ctx.rotate(Math.PI/4);
      ctx.fillStyle='#fff7dd';ctx.shadowColor='#ffc84a';ctx.shadowBlur=26;
      ctx.fillRect(-16,-16,32,32);ctx.shadowBlur=0;
      ctx.strokeStyle='#44e1d0';ctx.lineWidth=2;ctx.strokeRect(-16,-16,32,32);ctx.restore();
      if(sm.winUntil&&now<sm.winUntil){
        var q=1-(sm.winUntil-now)/800,r=30+q*130;
        ctx.lineWidth=3;
        ctx.strokeStyle='#ffc84a';ctx.shadowColor='#ffc84a';ctx.shadowBlur=14;
        ctx.beginPath();ctx.arc(0,0,r,Math.PI*0.5,Math.PI*1.5);ctx.stroke();
        ctx.strokeStyle='#44e1d0';ctx.shadowColor='#44e1d0';
        ctx.beginPath();ctx.arc(0,0,r,-Math.PI*0.5,Math.PI*0.5);ctx.stroke();
        ctx.shadowBlur=0;
        ctx.strokeStyle='#ffffff';ctx.lineWidth=1;ctx.beginPath();ctx.arc(0,0,26,0,6.28);ctx.stroke();
      }else{
        ctx.strokeStyle='rgba(255,255,255,.25)';ctx.lineWidth=1;
        ctx.beginPath();ctx.arc(0,0,34+Math.sin(elapsed*3)*4,0,6.28);ctx.stroke();
      }
      ctx.restore();return;
    }
    ctx.rotate(e.a*0.4);
    ctx.fillStyle='#160a12';ctx.strokeStyle='#ff5b66';ctx.lineWidth=4;ctx.shadowColor='#ff2844';ctx.shadowBlur=22;
    ctx.beginPath();
    for(var i=0;i<6;i++){var a=i/6*6.283,hx=Math.cos(a)*52,hy=Math.sin(a)*52;if(i)ctx.lineTo(hx,hy);else ctx.moveTo(hx,hy)}
    ctx.closePath();ctx.fill();ctx.stroke();ctx.shadowBlur=0;
    ctx.rotate(-e.a*0.8);
    ctx.lineWidth=5;ctx.strokeStyle='#ffc84a';ctx.shadowColor='#ffc84a';ctx.shadowBlur=12;
    ctx.beginPath();ctx.arc(0,0,64,e.spin,e.spin+2.1);ctx.stroke();
    ctx.strokeStyle='#44e1d0';ctx.shadowColor='#44e1d0';
    ctx.beginPath();ctx.arc(0,0,64,-e.spin,-e.spin+2.1);ctx.stroke();
    ctx.shadowBlur=0;
    ctx.fillStyle='#ff8d62';ctx.beginPath();ctx.arc(0,0,10+Math.sin(elapsed*4)*3,0,6.28);ctx.fill();
    ctx.restore();
  }

  function begin(){intro.hidden=true;debrief.hidden=true;levelBeat.hidden=true;document.querySelector('#summitChoice').hidden=true;init();running=false;logH('mission launched · AI has Ship Two');showLevelBrief(1)}
  function formatTime(seconds){var n=Math.max(0,Math.floor(seconds));return String(Math.floor(n/60)).padStart(2,'0')+':'+String(n%60).padStart(2,'0')}
  function endRun(reason){if(!running)return;running=false;runEnding=true;var sn=level===6?progression.summitResult:null,victory=sn?sn.victory:reason!=='defeat',levelReached=Math.max(1,level),finalScore=metrics.kills*100+metrics.rescues*300+metrics.reunions*200+levelReached*1000;var isNewBest=finalScore>sessionBest.score;if(isNewBest){sessionBest={score:finalScore,kills: