<!-- SOLID CITY · part 2848 -->
latforms above the max.
   Adds: collision (userData.footprint), a radar marker 'OVERLOOK', a Hyper Controller stop,
   and a Watch (GRAND TOUR) caption. */
(function () {
'use strict';
if (!window.SC || !SC.api) return;
var A = SC.api, S = A.S;
var POS = { x: 750, z: -1600 }, NAME = 'Mira\u2019s Overlook';
var M = { state: 'idle', group: null, wait: 3.5, said: false, gy: 22 };
function sampleGround() {
  var g = (typeof groundAt === 'function') ? groundAt : null;
  if (!g) return 22;
  var max = -1000, x, z, h;
  for (var i = -1; i <= 1; i++) for (var j = -1; j <= 1; j++) {
    x = POS.x + i * 16; z = POS.z + j * 16;
    try { h = g(x, z); } catch (e) { h = 22; }
    if (h > max) max = h;
  }
  return max;
}
function addBox(cx, cz, w, d, rot, y0, y1) {
  var nx = Math.max(1, Math.ceil(w / 2.5)), nz = Math.max(1, Math.ceil(d / 2.5)), cw = w / nx, cd = d / nz, c = Math.cos(rot), s = Math.sin(rot);
  var hx = cw / 2 * Math.abs(c) + cd / 2 * Math.abs(s), hz = cw / 2 * Math.abs(s) + cd / 2 * Math.abs(c);
  for (var i = 0; i < nx; i++) for (var j = 0; j < nz; j++) {
    var ox = -w / 2 + cw * (i + 0.5), oz = -d / 2 + cd * (j + 0.5), lx = cx + ox * c + oz * s, lz = cz - ox * s + oz * c;
    A.solids.push({ x0: POS.x + lx - hx, x1: POS.x + lx + hx, z0: POS.z + lz - hz, z1: POS.z + lz + hz, y0: M.gy + y0, y1: M.gy + y1, overlookMira: true });
  }
}
function collide(ud) { (ud.footprint || []).forEach(function (b) { addBox(b[0], b[1], b[2], b[3], b[6] || 0, b[4], b[5]); }); }
function hyperStop() {
  var H = window.CityHyper; if (!H || !H.pois || H.pois.some(function (p) { return p.id === 'overlook-mira'; })) return;
  H.pois.push({ id: 'overlook-mira', name: NAME, short: 'OVERLOOK', x: POS.x, z: POS.z, stand: { x: POS.x, z: POS.z + 40 },
    alias: 'mira overlook strategist tactical deck sighting monolith crimson',
    text: 'Mira\u2019s Overlook, east of the Ancestral Roads: a tactical deck in crimson geometry, and a sighting stone aimed at the southern rings. Win through decisions.' });
  if (H.regrid) H.regrid();
}
function watchStop() {
  var W = window.CityWatch, r = W && W.routes && W.routes.grand; if (!r || r._overlookMira) return;
  var orig = r.build; r._overlookMira = true;
  r.build = function () {
    var w = orig.apply(this, arguments), at = Math.min(3, w.length);
    w.splice(at, 0, { x: POS.x + 80, z: POS.z + 60, y: M.gy + 90, v: 110, cap: { cap: 'MIRA\u2019S OVERLOOK', sub: 'tactical deck \u00b7 crimson geometry \u00b7 east of the roads', say: 'Mira\u2019s Overlook: a tactical deck in crimson geometry, east of the Ancestral Roads.' }, agl: false });
    return w;
  };
}
function load() {
  M.state = 'loading';
  M.gy = sampleGround() + 2;
  var p; try { p = import('/city/overlook-mira.js?v=20261011a'); } catch (e) { p = Promise.reject(e); }
  p.then(function (mod) {
    var make = mod.createOverlookMira || mod.default;
    var g = make({ THREE: A.T, position: { x: POS.x, y: M.gy, z: POS.z } });
    A.world.add(g); M.group = g; M.state = 'ready';
    collide(g.userData || {}); hyperStop(); watchStop();
  }).catch(function (e) { M.state = 'failed'; try { console.warn('[city] Mira overlook skipped:', e && e.message); } catch (x) {} });
}
function update(dt) {
  if (M.state === 'idle') { if (A.isBuilt && !A.isBuilt()) return; M.wait -= dt; if (M.wait <= 0) load(); return; }
  if (M.state !== 'ready' || document.hidden) return;
  var c = A.camera.position, d = Math.hypot(c.x + A.origin.x - POS.x, c.z + A.origin.z - POS.z);
  M.group.visible = d < 6000;
  if (d < 1500 && M.group.userData.update) try { M.group.userData.update(S.t); } catch (e) {}
  if (S.mode === 'walk') {
    var pd = Math.hypot(S.p.x - POS.x, S.p.z - POS.z);
    if (pd < 50 && !M.said) { M.said = true; if (window.CityHyper && CityHyper.narrate) CityHyper.narrate('<b>Mira\u2019s Overlook</b>: a tactical deck in crimson geometry, with a sighting stone aimed at the southern rings. Win through decisions.', 8); }
    else if (pd > 150) M.said = false;
  }
}
function radar(g, blip, fl) { if (M.state === 'ready') blip(POS.x, POS.z, '#ff2a40', fl ? 3 : 5, fl ? '' : 'OVERLOOK'); }
window.CityOverlookMira = { update: update, radar: radar, pos: POS, state: function () { return M.state; }, group: function () { return M.group; } };
})();


===== FILE: public/city/overlook-mira.js =====
/* SOLID CITY — MIRA'S OVERLOOK (2026-10-11, Builder B)
 * Tactical deck east of the Ancestral Roads. Ground-level rectangular deck
 * (walkable), crimson geometric inlay (triangles/grid), one angled sighting
 * monolith aimed at the southern rings. Restrained, geometric.
 * Local frame: ground at y = 0. Self-contained ES module.
 *
 *   import { createOverlookMira } from '/city/overlook-mira.js';
 *   const g = createOverlookMira({ THREE, position: {x, y, z} });
 *   // g.userData: footprint, update(t)
 */
export function createOverlookMira(o) {
  var T = o.THREE, P = o.position || { x: 0, y: 0, z: 0 };
  var root = new T.Group(); root.