<!-- SOLID CITY · part 3734 -->
ldLeft" type="button">L</button><button class="ctrl" data-action="shieldFront" type="button">F</button><button class="ctrl" data-action="shieldRight" type="button">R</button><button class="ctrl release" data-action="release" type="button">AI</button>
        </div>
      </section>
    </aside>
  </main>

  <footer class="console">
    <div class="crewline"><strong id="ownershipSummary">YOU 0 · AI 4</strong><span id="handoffText">All stations crewed. Independent control channels nominal.</span></div>
    <div class="console-actions"><button class="flat" id="eventBtn" type="button">EVENTS</button><button class="flat" id="statsBtn" type="button">STATS</button></div>
  </footer>
</div>

<div class="overlay" id="briefing">
  <div class="card">
    <p style="margin:0 0 8px;font:800 11px ui-monospace,monospace;color:var(--cyan)">MERIDIAN RUN · COMMAND BRIEFING</p>
    <h1>Break the blockade.<br>Bring the ship home.</h1>
    <p>Your AI crew already holds every station. Take only what you want: the helm, either four-gun battery, or defense. The crew continues fighting everywhere else.</p>
    <div class="brief-grid">
      <div class="brief"><b>One touch takes command</b><span>Ownership changes instantly. Other AI stations continue uninterrupted.</span></div>
      <div class="brief"><b>Two independent batteries</b><span>Battery A and B select and fire on different threats.</span></div>
      <div class="brief"><b>Arrival wins the mission</b><span>Keep moving toward Meridian Gate through four hostile waves.</span></div>
      <div class="brief"><b>Advice never overrides</b><span>AI warnings are visible, but your active station remains yours.</span></div>
    </div>
    <button class="deploy" id="deployBtn" type="button">DEPLOY WARSHIP</button>
      <a href="/city/" style="display:block;margin:14px auto 0;max-width:420px;color:#8a7a5a;font:600 12px/1.4 system-ui,sans-serif;text-decoration:underline">← back to Solid City</a>
  </div>
</div>

<div class="modal" id="statsModal" hidden>
  <div class="modal-panel">
    <div class="modal-head"><h2>Event-derived combat STATS</h2><button class="close" data-close="statsModal" type="button" aria-label="Close">×</button></div>
    <div class="stats-grid" id="statsGrid"></div>
    <div class="tables"><section><h3>BATTERY PERFORMANCE</h3><div id="batteryStats"></div><h3>METHOD</h3><p class="evidence">Every value is reduced from the in-session event ledger below. Shots are recorded per shell (four per salvo); hits only when a shell intersects a live threat; handoff latency is measured with <code>performance.now()</code>. No displayed number is simulated narration.</p></section><section><h3>RECENT EVIDENCE</h3><div class="log" id="statsLog"></div></section></div>
  </div>
</div>
<div class="modal" id="eventsModal" hidden>
  <div class="modal-panel"><div class="modal-head"><h2>Coordination & interference log</h2><button class="close" data-close="eventsModal" type="button" aria-label="Close">×</button></div><p class="evidence">Accepted ownership changes, safe handoffs, and any rejected stale, duplicated, delayed, disconnected, or overloaded commands appear here. AI advisories use a separate channel and cannot actuate human-held stations.</p><div class="log" id="coordLog"></div></div>
</div>
<div class="overlay" id="debrief" hidden><div class="card"><p style="margin:0 0 8px;font:800 11px ui-monospace,monospace;color:var(--cyan)" id="resultKicker">MISSION COMPLETE</p><h2 id="resultTitle">Meridian Gate reached.</h2><p id="resultText"></p><div class="stats-grid" id="resultStats"></div><button class="deploy" id="againBtn" type="button">FLY AGAIN</button></div></div>
      <a href="/city/?back=strike" style="display:inline-block;margin:10px 0 0 10px;padding:12px 22px;border:2px solid #c99a3a;border-radius:10px;color:#ffd27a;font:700 14px system-ui,sans-serif;text-decoration:none">← RETURN TO SOLID CITY</a>

<script>
(function(){
'use strict';
/* Reuse seam: ControlCoordination knows nothing about ships. Swarm can register
   unit tasks, Rescue can register protection/extraction, and Siege can register
   emplacements. The game only consumes claim/release/command/advisory events. */
class ControlCoordination{
  constructor(names,emit){this.emit=emit;this.tasks={};this.seen=new Set();this.queue=[];names.forEach(n=>this.tasks[n]={owner:'ai',epoch:1,status:'ACTIVE',claimedAt:0});this.connected=true;}
  claim(name){const t=this.tasks[name],start=performance.now();if(!t)return;t.owner='human';t.epoch++;t.status='ACTIVE';t.claimedAt=start;this.emit('ownership',{task:name,owner:'human',epoch:t.epoch});const latency=performance.now()-start;this.emit('handoff',{task:name,to:'human',latency:+latency.toFixed(2),epoch:t.epoch});return t.epoch;}
  release(name){const t=this.tasks[name];if(!t||t.owner!=='human')return;t.status='HANDOFF';const start=performance.now(),epoch=++t.epoch;this.emit('handoff_start',{task:name,to:'ai',epoch});setTimeout(()=>{if(t.epoch!==epoch||