<!-- SOLID CITY · part 86 -->
bject-fit:cover;border-radius:8px;border:1px solid #e8c36a;flex:0 0 84px;background:#000}',
'#cap-res .cr-m{flex:1;min-width:0}#cap-res .cr-i{font-size:11.5px;color:#d9c79b;word-wrap:break-word}',
'#cap-res .cr-b{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}',
'#cap-res .cr-b a,#cap-res .cr-b button{min-height:44px;min-width:64px;display:inline-flex;align-items:center;justify-content:center;padding:0 10px;border-radius:10px;border:1px solid #e8c36a;background:rgba(0,0,0,.4);color:#f6dc8e;font:800 11px system-ui,sans-serif;letter-spacing:.1em;text-decoration:none;cursor:pointer}',
/* scaffold */
'.cap-scaf{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;overflow:visible}',
'.cap-scaf path,.cap-scaf line,.cap-scaf rect{fill:none;vector-effect:non-scaling-stroke;stroke-dasharray:1;stroke-dashoffset:1;animation:capDraw .55s cubic-bezier(.6,0,.2,1) forwards}',
'.cap-scaf .g{stroke:#e8c36a;stroke-width:1.6}.cap-scaf .r{stroke:#e3122c;stroke-width:1.2;opacity:.85}',
'.cap-scaf circle{fill:#e3122c;stroke:#e8c36a;stroke-width:.6;vector-effect:non-scaling-stroke;opacity:0;animation:capPop .25s ease-out forwards}',
'#cap-panel .cap-scaf{animation:capSettle .5s ease-out 1.1s forwards}',
'@keyframes capDraw{to{stroke-dashoffset:0}}@keyframes capPop{from{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes capSettle{to{opacity:.4}}',
'#cap-frame{position:absolute;inset:0;z-index:60;pointer-events:none}',
'#cap-flash{position:absolute;inset:0;z-index:61;pointer-events:none;background:#fff;opacity:0}',
'#cap-flash.go{animation:capFlash .45s ease-out}',
'@keyframes capFlash{0%{opacity:.9}100%{opacity:0}}',
'#cap-toast{position:absolute;z-index:62;left:50%;top:calc(64px + env(safe-area-inset-top));transform:translate(-50%,-8px);max-width:calc(100% - 24px);padding:10px 16px;border-radius:12px;border:1px solid #e8c36a;background:rgba(10,4,6,.92);color:#f6dc8e;font:700 13px system-ui,sans-serif;opacity:0;transition:opacity .25s,transform .25s;pointer-events:none;text-align:center}',
'#cap-toast.show{opacity:1;transform:translate(-50%,0)}',
'@media (max-width:600px){#cap-panel{left:0;right:0;bottom:0;width:auto;max-width:none;max-height:78vh;border-radius:16px 16px 0 0;border-width:2px 0 0;padding-bottom:calc(12px + env(safe-area-inset-bottom))}}',
'@media (min-width:601px) and (max-height:500px){#cap-panel{left:auto;right:calc(8px + env(safe-area-inset-right));top:8px;bottom:8px;max-height:none;width:380px}#cap-panel .cp-sizes{grid-template-columns:1fr 1fr 1fr}}',
'@media (prefers-reduced-motion:reduce){.cap-scaf path,.cap-scaf line,.cap-scaf rect{animation-duration:.01s!important}.cap-scaf circle{animation-duration:.01s!important}}',
/* auto-fade: fade the whole HUD, never the 3D world (citizen name tags are in-world sprites) */
'body.hud-idle #sc-hud>*{opacity:0!important;transition:opacity .6s ease!important}',
'body.hud-idle #sc-hud,body.hud-idle #sc-hud *{pointer-events:none!important}',
/* the AI VIEW button never fades away: it stays faintly visible and tappable */
'body.hud-idle #sc-hud>#sc-dock{opacity:1!important}',
'body.hud-idle #sc-dock>*:not(#ai-view-btn){opacity:0!important;transition:opacity .6s ease!important}',
'body.hud-idle #sc-dock #ai-view-btn{opacity:.45!important;pointer-events:auto!important;transition:opacity .6s ease!important}'
].join('\n');
document.head.appendChild(css);

/* ---------- scaffold svg ---------- */
var NS = 'http://www.w3.org/2000/svg';
function scaffold(cls, dense) {
  var s = document.createElementNS(NS, 'svg'); s.setAttribute('class', 'cap-scaf ' + (cls || '')); s.setAttribute('viewBox', '0 0 100 100'); s.setAttribute('preserveAspectRatio', 'none'); s.setAttribute('aria-hidden', 'true');
  var n = 0;
  function ln(x1, y1, x2, y2, c, delay) { var l = document.createElementNS(NS, 'line'); l.setAttribute('x1', x1); l.setAttribute('y1', y1); l.setAttribute('x2', x2); l.setAttribute('y2', y2); l.setAttribute('class', c); l.setAttribute('pathLength', '1'); l.style.animationDelay = (delay != null ? delay : (n++ * 0.04)) + 's'; s.appendChild(l); }
  function dot(x, y, delay) { var c = document.createElementNS(NS, 'circle'); c.setAttribute('cx', x); c.setAttribute('cy', y); c.setAttribute('r', '1.1'); c.style.transformOrigin = x + 'px ' + y + 'px'; c.style.animationDelay = delay + 's'; s.appendChild(c); }
  var i = 1.2, o = 98.8;
  // poles rise from the ground up, then ledgers, then red cross braces, then joints
  [i, 33.6, 66.4, o].forEach(function (x, k) { if (!dense && (k === 1 || k === 2)) return; ln(x, o, x, i, 'g', k * 0.07); });
  var ys = dense ? [o, 75, 50, 25, i] : [o, 50, i];
  ys.forEach(function (y, k) { ln(i, y, o, y, 'g', 0.25 + k * 0.08); });
  for (var k = 0; k < ys.length - 1; k++) { var a = ys[k], b = ys[k + 1]; if (dense) { ln(i, a, 33.6, b, 'r', 0.55 + k * 0.05); ln(66.4, a, o, b, 'r', 0.58 + k * 0.05); } else ln(k % 2 ? o : i, a, k % 2 ? i : o, b, 'r', 0.55 + k * 0.06); }
  ys.fo