<!-- SOLID CITY · part 2880 -->
demo storefronts.' });
  if (H.regrid) H.regrid();
}
function watchStop() {
  var W = window.CityWatch, r = W && W.routes && W.routes.grand; if (!r || r._qcrown) return;
  var orig = r.build; r._qcrown = true;
  r.build = function () {
    var w = orig.apply(this, arguments);
    w.push({ x: POS.x, z: POS.z, y: M.gy + 120, v: 200, cap: { cap: 'QUADRANT CROWN', sub: 'Four towers, enterable', say: 'Quadrant Crown: four towers you can walk into — lobbies, stairs, elevators, skybridges, and little demo shops.' }, agl: false });
    return w;
  };
}
function loadShops() {
  try {
    return fetch('/city/quadrant-crown-shops.json?v=20261011a').then(function (r) { return r.ok ? r.json() : { stores: [] }; }).catch(function () { return { stores: [] }; });
  } catch (e) { return Promise.resolve({ stores: [] }); }
}
function load() {
  M.state = 'loading';
  M.gy = sampleGround();
  var shopsP = loadShops();
  var modP; try { modP = import('/city/quadrant-crown.js?v=20261011a'); } catch (e) { modP = Promise.reject(e); }
  Promise.all([modP, shopsP]).then(function (res) {
    var mod = res[0], shops = res[1];
    var make = mod.createQuadrantCrown || mod.default;
    var g = make({ THREE: A.T, position: { x: POS.x, y: M.gy, z: POS.z }, shops: shops });
    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] QuadrantCrown skipped:', e && e.message); } catch (x) {} });
}
function update(dt) {
  if (M.state === 'idle') { M.wait -= dt; if (M.wait <= 0) load(); return; }
  if (M.state !== 'ready' || !M.group) return;
  try { M.group.userData.update(S.t, dt, A); } catch (e) {}
}
function radar(rg, blip, flying, sc, ax, az) {
  if (M.state !== 'ready') return;
  try {
    var dx = POS.x - ax, dz = POS.z - az, d = Math.sqrt(dx * dx + dz * dz) * sc;
    if (d < rg) blip(dx * sc / (d || 1), dz * sc / (d || 1), 0xd8a833, 'QUADRANT CROWN');
  } catch (e) {}
}
function standY(x, z) {
  if (M.state !== 'ready' || !M.group) return -1000;
  var fl = M.group.userData.standFloors; if (!fl) return -1000;
  var best = -1000;
  for (var i = 0; i < fl.length; i++) {
    var f = fl[i];
    var inside = x > POS.x + f.x0 && x < POS.x + f.x1 && z > POS.z + f.z0 && z < POS.z + f.z1;
    if (inside && S.p.y > M.gy + f.y - 3 && M.gy + f.y > best) best = M.gy + f.y;
  }
  return best;
}
function actHere(x, z) {
  if (M.state !== 'ready' || !M.group || !M.group.userData.actHere) return null;
  try { return M.group.userData.actHere(x, z); } catch (e) { return null; }
}
function boardElevator(x, z) {
  if (M.state !== 'ready' || !M.group || !M.group.userData.boardElevator) return false;
  try { return M.group.userData.boardElevator(x, z); } catch (e) { return false; }
}
window.CityQuadrantCrown = { update: update, radar: radar, pos: POS, standY: standY, actHere: actHere, boardElevator: boardElevator, state: function () { return M.state; } };
})();


===== FILE: public/city/quadrant-crown-shops.json =====
{"district":"quadrant-crown","note":"Demo storefronts only — no real payments. Visual/display configuration.","stores":[{"id":"qc-cmd-1","name":"THE WAR ROOM","products":["Tactical Charts","Brass Compasses","Signal Flags"],"tower":"command","type":"maps"},{"id":"qc-cmd-2","name":"IRON RATIONS","products":["Field Bread","Smoked Meats","Canteens"],"tower":"command","type":"provisions"},{"id":"qc-int-1","name":"THE QUIET LENS","products":["Spyglasses","Code Wheels","Star Charts"],"tower":"intelligence","type":"optics"},{"id":"qc-int-2","name":"CIRCUIT & QUILL","products":["Glow Tablets","Cipher Keys","Ink Cells"],"tower":"intelligence","type":"tech"},{"id":"qc-liv-1","name":"THE WARM HEARTH","products":["Kona Coffee","Sweet Bread","Island Tea"],"tower":"living","type":"cafe"},{"id":"qc-liv-2","name":"PETAL & VINE","products":["Orchids","Lei Flowers","Herb Bundles"],"tower":"living","type":"florist"},{"id":"qc-fro-1","name":"THE LONG TRAIL","products":["Trail Boots","Canvas Packs","Rope Coils"],"tower":"frontier","type":"outfitter"},{"id":"qc-fro-2","name":"STRANGE HARBOR","products":["Star Shells","Old Coins","Carved Bone"],"tower":"frontier","type":"curios"}]}

===== FILE: public/city/quadrant-crown.js =====
/* QUADRANT CROWN — four enterable towers (Command, Intelligence, Living, Frontier).
   The King's lightweight directive: maximum sophistication, minimum weight.
   One shared tower factory, selective interiors (lobby + floor 2), demo storefronts,
   walkable stairs, rideable elevators, two walkable bridges. No Medusa, no new DB.
   Exports createQuadrantCrown({THREE, position, shops}). */
export function createQuadrantCrown(o) {
  var T = o.THREE, P = o.position || { x: 0, y: 0, z: 0 };
  var SHOPS = o.shops || { stores: [] };
  var root = new T.Group(); root.name = 'quadrant-crown';
  root.position.set(P.x, P.y || 0, P.z);

  var FH = 8, W = 36, D = 36, FLOORS = 12, TH = FLOORS * FH; // 96m
