<!-- SOLID CITY · part 2064 -->
ft:50%;bottom:118px;transform:translateX(-50%);z-index:60;background:rgba(10,8,12,.92);border:1px solid #d8a833;color:#f2e8d5;padding:10px 18px;border-radius:12px;font:14px Georgia,serif;letter-spacing:1px;pointer-events:none;opacity:0;transition:opacity .3s;max-width:86vw;text-align:center';
      document.body.appendChild(toastEl);
    }
    toastEl.textContent = msg;
    toastEl.style.opacity = '1';
    clearTimeout(toastT);
    toastT = setTimeout(function () { toastEl.style.opacity = '0'; }, 3600);
  }

  function api() { return (window.SC && SC.api) || null; }

  function apply(want) {
    var a = api();
    if (!a || !a.avatar || !window.createHero || !window.THREE) return false;
    var av = a.avatar;
    if (want && !hero) {
      hero = window.createHero(window.THREE);
      hero.name = 'the-hero-avatar';
      av.add(hero);
    }
    av.children.forEach(function (c) { if (c !== hero) c.visible = !want; });
    if (hero) hero.visible = want;
    on = want;
    try { localStorage.setItem(KEY, want ? '1' : '0'); } catch (e) {}
    return true;
  }

  function toggle() {
    var now = !on;
    if (apply(now)) {
      toast(now ? '⚡ THE HERO — avatar set. The Octahedron rides at your heart.' : 'The Hero rests — your own form returns.');
    } else {
      toast('The Hero is still being forged — one moment.');
      setTimeout(toggle, 1200);
    }
  }

  function update(dt) {
    if (!hero || !on) return;
    var t = performance.now() / 1000;
    try { hero.userData.update(dt, t); } catch (e) {}
    var a = api(); if (!a || !a.avatar) return;
    var p = a.avatar.position;
    if (lastPos && dt > 0) {
      var sp = Math.hypot(p.x - lastPos.x, p.z - lastPos.z) / dt;
      var k = Math.min(1, sp / 6);
      bobPh += dt * (4 + sp * 1.35);
      hero.position.y = Math.abs(Math.sin(bobPh)) * 0.05 * k;
      hero.rotation.x = 0.055 * k;
    }
    lastPos = { x: p.x, z: p.z };
  }

  window.CityHeroAvatar = {
    toggle: toggle,
    update: update,
    state: function () { return { on: on, forged: !!hero }; }
  };

  function boot() {
    var want = false;
    try { want = localStorage.getItem(KEY) === '1'; } catch (e) {}
    if (window.__heroCodeWanted) { want = true; window.__heroCodeWanted = false; }
    if (want && !apply(true)) setTimeout(function () { apply(true); }, 1600);
  }
  setTimeout(boot, 1200);
})();


===== FILE: public/city/hidden-ship-place.js =====
/* Solid City — places THE KING'S HIDDEN SHIP (public/city/hidden-ship.js) in a mountain cave.
   Lazy: imported after the city is built; any import/build error is caught and the city carries on.
   DELIBERATELY HIDDEN: no radar blip, no Hyper POI, no Watch caption, no narration.
   Only collision (so he can walk in) and the ship itself. The King holds the riddle.
   The placer adapts to terrain at runtime. */
(function () {
'use strict';
if (!window.SC || !SC.api) return;
var A = SC.api, S = A.S;
var POS = { x: 2800, z: -600 };
var M = { state: 'idle', group: null, wait: 5.0, gy: 22 };
function sampleGround() {
  var g = (typeof groundAt === 'function') ? groundAt : null;
  if (!g) return 22;
  var max = -1000, h;
  [[0,0],[120,0],[-120,0],[0,120],[0,-120]].forEach(function (p) {
    try { h = g(POS.x + p[0], POS.z + p[1]); } 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, hiddenShip: 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 load() {
  M.state = 'loading';
  M.gy = sampleGround() + 2;
  var p; try { p = import('/city/hidden-ship.js?v=20261011a'); } catch (e) { p = Promise.reject(e); }
  p.then(function (mod) {
    var make = mod.createHiddenShip || 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 || {});
  }).catch(function (e) { M.state = 'failed'; try { console.warn('[city] Hidden ship 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 < 1200 &