/* ═══════════════════════════════════════════════════════════════════════════
   Host shared foundation (wwwroot/styles.css) — single surface for portal+ops
   Cascade order:
     1) :root tokens
     2) html/body viewport shell (overflow-x:clip, 100dvh, width 100%)
     3) media defaults + object-fit helpers
     4) body.portal-shell  → narrow reading (account/legal)
     5) base components (.out / pre / table-wrap / main)
     6) body.admin-ops     → full-bleed Looking Glass density
     7) feature blocks (map, health, tabs…)
     8) ops-ui-clean1      → final ops chrome (wins mid-cascade density)
     9) body.admin-ops.portal-shell last → reading wins over ops density
   Never CSS `zoom`. Never 100vw / 98vw / fixed 1760 main caps.
   Marketing lives at web/thehiddenshow (separate CSS) — not this file.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  color-scheme: dark;
  --bg: #0b1220;
  --card: #121a2b;
  --text: #e7eefc;
  --muted: #8fa3c1;
  --accent: #3dd6c6;
  --warn: #f0c14b;
  --err: #ff6b7a;
  --line: #243049;
  --term: #0a0f18;
  /* Shell scale — rem/%/dvh only (no 100vw scrollbar gutter smash) */
  --shell-max: 92rem;
  --shell-pad: clamp(0.75rem, 2.2vw, 1.5rem);
  --portal-max: 48rem;
  --portal-max-wide: 56rem;
  --portal-type: max(15px, 0.95rem);
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --text-xs: clamp(0.72rem, 0.7rem + 0.15vw, 0.8rem);
  --text-sm: clamp(0.82rem, 0.78rem + 0.2vw, 0.92rem);
  --text-base: clamp(0.92rem, 0.88rem + 0.25vw, 1.05rem);
  --text-lg: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  --radius: 10px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 100%;
  line-height: 1.45;
}
*, *::before, *::after { box-sizing: border-box; }
html {
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  color: var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, #1a2744, var(--bg));
  font-size: var(--text-base);
}
/* Never stretch media — height:auto default; object-fit when both axes forced */
img, video, svg, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}
img.cover, video.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
img.contain, video.contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.media-frame {
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  border-radius: var(--radius);
  background: var(--term);
}
.media-frame > img,
.media-frame > video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
/* Portal page shell (account / legal / shared) — human product pages, not ops density */
body.portal-shell {
  font-size: 100%;
  line-height: 1.55;
  letter-spacing: normal;
  --shell-pad: clamp(1rem, 3vw, 1.75rem);
  --portal-type: max(15px, 0.98rem);
  --portal-max: 42rem;
  --portal-max-wide: 48rem;
  background:
    radial-gradient(circle at 12% 0%, rgba(61, 214, 198, 0.07), transparent 28rem),
    radial-gradient(circle at 90% 8%, rgba(243, 201, 95, 0.05), transparent 22rem),
    linear-gradient(180deg, #070b12 0%, #090e16 100%);
}
body.portal-shell main.shell,
main.shell {
  width: min(100% - 2 * var(--shell-pad), var(--portal-max));
  max-width: 100%;
  margin: var(--space-5) auto var(--space-6);
  padding: 1.5rem clamp(1.15rem, 3vw, 1.75rem) 1.4rem;
  box-sizing: border-box;
  min-width: 0;
}
body.portal-shell main.shell.wide {
  width: min(100% - 2 * var(--shell-pad), var(--portal-max-wide));
}
body.portal-shell,
body.portal-shell main.shell {
  font-size: var(--portal-type, max(15px, 0.95rem));
}
body.portal-shell h1 {
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.75rem);
  line-height: 1.25;
  margin-bottom: 0.45rem;
}
body.portal-shell h2 {
  font-size: clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
  margin: 1.35rem 0 0.5rem;
  line-height: 1.3;
}
body.portal-shell h3 {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
  margin: 0.85rem 0 0.4rem;
  color: var(--text);
  font-weight: 650;
}
body.portal-shell p {
  max-width: 100%;
  line-height: 1.6;
}
body.portal-shell ul,
body.portal-shell ol {
  padding-left: 1.25rem;
  max-width: 100%;
  line-height: 1.6;
}
body.portal-shell li {
  margin: 0.25rem 0;
}
body.portal-shell code {
  overflow-wrap: anywhere;
  word-break: break-word;
}
body.portal-shell pre,
body.portal-shell .out,
body.portal-shell pre.out {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0.75rem 0.85rem;
}
body.portal-shell .table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.65rem 0 1rem;
}
body.portal-shell .table-wrap > table {
  width: max-content;
  min-width: 100%;
  max-width: none;
}
body.portal-shell table,
body.portal-shell table.data-table {
  font-size: 0.95rem;
}
body.portal-shell label {
  margin: 0.65rem 0;
  font-size: 0.95rem;
}
body.portal-shell input,
body.portal-shell select,
body.portal-shell textarea {
  /* iOS: under 16px forces focus-zoom smash */
  font-size: max(16px, 0.9rem);
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
}
body.portal-shell button,
body.portal-shell .btn-link {
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  margin-top: 0.75rem;
  border-radius: 8px;
}
body.portal-shell .row button,
body.portal-shell .row .btn-link {
  margin-top: 0;
}
body.portal-shell .form-block {
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
  border-radius: 10px;
  min-width: 0;
  max-width: 100%;
}
body.portal-shell .small {
  font-size: 0.9rem;
}
body.portal-shell .who {
  font-size: 1.1rem;
}
body.portal-shell .portal-footer {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  line-height: 1.6;
}
body.portal-shell blockquote {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  max-width: 100%;
}
body.portal-shell blockquote p {
  margin: 0;
  line-height: 1.55;
}
/* iOS: inputs under 16px force focus-zoom smash (ops + portal) */
body.admin-ops input,
body.admin-ops select,
body.admin-ops textarea {
  font-size: max(16px, 0.9rem);
}
.top {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .5rem .75rem;
  padding: .9rem 1.25rem; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.25);
  width: 100%; max-width: 100%; box-sizing: border-box;
}
.badge {
  margin-left: .5rem; font-size: .75rem; padding: .15rem .45rem;
  border: 1px solid var(--accent); color: var(--accent); border-radius: 999px;
}
.iso { color: var(--warn); font-size: .85rem; }
/* Default main — portal main.shell / admin-ops main override width later */
main {
  width: min(100% - 2 * var(--shell-pad), 68.75rem); /* ~1100px reading default */
  max-width: 100%;
  margin: 1.5rem auto;
  padding: 0 var(--shell-pad);
  box-sizing: border-box;
  min-width: 0;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.25rem; box-shadow: 0 10px 40px rgba(0,0,0,.35); margin-bottom: 1rem;
  max-width: 100%; min-width: 0;
}
.hidden { display: none !important; }
label { display: block; margin: .6rem 0; color: var(--muted); font-size: .9rem; }
input, select {
  display: block; width: 100%; margin-top: .3rem; padding: .65rem .75rem;
  border-radius: 8px; border: 1px solid var(--line); background: var(--term); color: var(--text);
  max-width: 100%; box-sizing: border-box;
}
input.inline { display: inline-block; width: auto; min-width: min(180px, 100%); max-width: 100%; margin: 0; }
button {
  margin-top: .9rem; padding: .65rem 1rem; border: 0; border-radius: 8px;
  background: var(--accent); color: #04221f; font-weight: 700; cursor: pointer;
}
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); margin-top: .9rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.err { color: var(--err); white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; min-width: 0; }
.out,
pre.out {
  background: var(--term); border: 1px solid var(--line); border-radius: 8px;
  padding: .75rem; overflow: auto; white-space: pre-wrap;
  font-family: ui-monospace, Consolas, monospace; font-size: .85rem; max-height: 320px;
  max-width: 100%; min-width: 0; box-sizing: border-box;
  overflow-wrap: anywhere; word-break: break-word;
}
.out.short { max-height: 80px; }
.term-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; align-items: center; min-width: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; min-width: 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; min-width: 0; }
.grid > * { min-width: 0; }
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }
.tile {
  display: block; text-decoration: none; color: inherit; text-align: left;
  border: 1px solid var(--line); border-radius: 10px; padding: 1rem; background: var(--term);
  width: 100%; max-width: 100%; cursor: pointer; font: inherit; box-sizing: border-box;
}
button.tile { appearance: none; }
.tile:hover { border-color: var(--accent); }
.tile.action h2 { color: var(--accent); margin-bottom: .4rem; }
.tile-kicker { font-size: .7rem; letter-spacing: .08em; color: var(--warn); margin-bottom: .35rem; }
.tile-link { display: inline-block; margin-top: .75rem; color: var(--accent); font-weight: 700; font-size: .9rem; }
.grid.secondary { grid-template-columns: 1fr 1fr; opacity: .95; }
.btn-link {
  display: inline-block; margin-top: .9rem; padding: .65rem 1rem;
  color: var(--accent); text-decoration: none; border: 1px solid var(--line); border-radius: 8px;
}
/* <button class="btn-link"> inherits button { background: accent } — accent-on-accent was invisible.
   Keep anchor.btn-link as outline accent; force solid CTA labels on real buttons. */
button.btn-link {
  background: var(--accent);
  color: #04221f;
  font-weight: 700;
  border: 0;
  text-decoration: none;
  cursor: pointer;
}
button.btn-link:hover {
  filter: brightness(1.06);
}
button.btn-link:disabled {
  opacity: 0.55;
  cursor: wait;
  filter: none;
}
.who { font-weight: 700; font-size: 1.05rem; }
ol.muted { color: var(--muted); line-height: 1.55; }
/* Tables: local horizontal scroll; never force page width */
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  min-width: 0;
  margin: .5rem 0 1rem;
  -webkit-overflow-scrolling: touch;
}
.table-wrap > table {
  width: max-content;
  min-width: 100%;
  max-width: none;
}
table { width: 100%; border-collapse: collapse; font-size: .9rem; max-width: 100%; }
th, td {
  text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere; word-break: break-word;
}
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; min-width: 0; }
.row button { margin-top: 0; }
a { color: var(--accent); }
pre {
  background: var(--term); padding: .6rem; border-radius: 6px;
  overflow-x: auto; max-width: 100%; min-width: 0; box-sizing: border-box;
  white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word;
}
h1, h2, h3 { margin-top: 0; max-width: 100%; }
h1 { font-size: var(--text-xl); line-height: 1.2; }
.tab-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(61,214,198,.08); }
.tab-panel { animation: none; min-width: 0; max-width: 100%; }
nav.row { gap: .35rem; }
nav.row button { font-size: .8rem; padding: .45rem .7rem; }

/* ---------- body.admin-ops: full-bleed ops console (density layer) ---------- */
/* No CSS `zoom` — skews map pointer math. Density via type size + edge pad only. */
/* Shell width finalized in ops-ui-clean block near EOF (full-bleed). */
body.admin-ops {
  --ops-gap: .25rem;
  /* type size finalized in ops-ui-clean (12px); token kept for mid-cascade components */
  font-size: 12px;
}
body.admin-ops main {
  /* full-bleed — do not reintroduce 1760px / 98vw / 92rem caps */
  width: 100%;
  max-width: none;
  margin: .2rem 0 .65rem;
  padding: 0;
  box-sizing: border-box;
  min-width: 0;
}
body.admin-ops .top {
  padding: .22rem .4rem;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(8px);
  background: rgba(8,12,20,.88);
}
body.admin-ops .top-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}
body.admin-ops .badge.world-chip {
  border-color: var(--warn);
  color: var(--warn);
  font-family: ui-monospace, Consolas, monospace;
}
body.admin-ops .badge.muted-badge {
  border-color: var(--line);
  color: var(--muted);
  font-weight: 500;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.admin-ops .card {
  padding: .65rem .75rem;
  border-radius: 8px;
  margin-bottom: .55rem;
}
body.admin-ops h1 { font-size: 1.15rem; margin-bottom: .3rem; }
body.admin-ops h2 { font-size: .98rem; margin-bottom: .25rem; }
body.admin-ops h3 { font-size: .88rem; margin: .4rem 0 .25rem; color: var(--muted); font-weight: 600; }
body.admin-ops label { margin: .35rem 0; font-size: .8rem; }
body.admin-ops input,
body.admin-ops select {
  padding: .45rem .55rem;
  border-radius: 6px;
  /* Keep iOS 16px floor (do not reintroduce bare .85rem under max(16px) guard) */
  font-size: max(16px, .85rem);
}
body.admin-ops button {
  margin-top: .55rem;
  padding: .45rem .75rem;
  border-radius: 6px;
  font-size: .82rem;
}
body.admin-ops button.secondary { margin-top: .55rem; }
body.admin-ops button.tiny {
  margin-top: 0;
  padding: .25rem .55rem;
  font-size: .75rem;
  font-weight: 600;
}
body.admin-ops button:disabled {
  opacity: .55;
  cursor: wait;
}
body.admin-ops .btn-link {
  margin-top: 0;
  padding: .45rem .75rem;
  font-size: .82rem;
}
body.admin-ops .out {
  padding: .55rem .65rem;
  font-size: .78rem;
  line-height: 1.4;
  max-height: 280px;
  border-radius: 6px;
}
body.admin-ops .out.short { max-height: 96px; }
body.admin-ops .out.tall { max-height: 360px; }
body.admin-ops .grid { gap: .75rem; margin: .65rem 0; }
body.admin-ops .row { gap: .4rem; }
body.admin-ops .row button,
body.admin-ops .row .btn-link { margin-top: 0; }
body.admin-ops .term-bar { gap: .75rem; align-items: flex-start; }
body.admin-ops .actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
body.admin-ops .world-label {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  margin: 0;
}
body.admin-ops .world-select {
  min-width: 160px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: .8rem;
}
body.admin-ops .sticky-bar {
  position: sticky;
  top: var(--ops-header-h, 2.15rem);
  z-index: 30;
  background: rgba(18,26,43,.96);
  backdrop-filter: blur(6px);
  border-color: #2c3a55;
}
body.admin-ops .tab-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: .3rem;
  margin-top: .2rem;
  padding-top: .2rem;
  border-top: 1px solid var(--line);
  overflow-x: auto;
}
body.admin-ops .tab-nav .tab-btn {
  margin-top: 0;
  font-size: .68rem;
  padding: .18rem .4rem;
  letter-spacing: .01em;
  white-space: nowrap;
}
body.admin-ops .tab-nav .tab-btn.active {
  box-shadow: inset 0 -2px 0 var(--accent);
}
body.admin-ops .ctx-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .55rem;
}
body.admin-ops .ctx-strip.compact { margin: .35rem 0 .55rem; }
body.admin-ops .chip {
  font-size: .72rem;
  font-family: ui-monospace, Consolas, monospace;
  padding: .2rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: rgba(61,214,198,.06);
}
body.admin-ops .chip.muted-chip {
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
}
body.admin-ops .panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem;
  margin-bottom: .45rem;
}
body.admin-ops .panel-head.tight {
  margin: .35rem 0 .3rem;
  align-items: center;
}
body.admin-ops .panel-head h2,
body.admin-ops .panel-head h3 { margin: 0; }
body.admin-ops .form-block {
  background: rgba(0,0,0,.18);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .65rem .75rem;
}
body.admin-ops .form-block h3 { margin-top: 0; }
body.admin-ops .controls-row {
  margin-top: .55rem;
  padding-top: .45rem;
}
body.admin-ops .msg {
  margin-top: .5rem;
  border-left: 3px solid var(--line);
}
body.admin-ops .msg.msg-ok {
  border-left-color: var(--accent);
  color: #b8f5ee;
}
body.admin-ops .msg.msg-err {
  border-left-color: var(--err);
  color: #ffb3bb;
}
body.admin-ops .msg.msg-info {
  border-left-color: var(--warn);
  color: #f5e0a8;
}
body.admin-ops .msg:empty { display: none; }

/* Living world stat cards */
body.admin-ops .sim-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  margin: .5rem 0 .75rem;
}
@media (max-width: 720px) {
  body.admin-ops .sim-stats { grid-template-columns: 1fr 1fr; }
}
body.admin-ops .stat-card {
  background: var(--term);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .65rem;
}
body.admin-ops .stat-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: .25rem;
}
body.admin-ops .stat-value {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
body.admin-ops .stat-value.small-val { font-size: .85rem; font-weight: 600; }
body.admin-ops .stat-value.on { color: var(--accent); }
body.admin-ops .stat-value.off { color: var(--warn); }

/* Alpha multiplayer — denser 6-up stat grid + textarea */
body.admin-ops #alpha-stats {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  body.admin-ops #alpha-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body.admin-ops #alpha-stats { grid-template-columns: 1fr 1fr; }
}
body.admin-ops textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-top: .25rem;
  padding: .45rem .55rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--term);
  color: var(--text);
  font-family: ui-monospace, Consolas, monospace;
  font-size: max(16px, .8rem);
  resize: vertical;
  min-height: 4.5rem;
}
body.admin-ops textarea:disabled {
  opacity: .55;
  cursor: not-allowed;
}
body.admin-ops #alpha-overview-strip {
  align-items: center;
  margin-bottom: .55rem;
}
body.admin-ops #alpha-overview-strip .tiny {
  margin-left: .15rem;
}

/* Toast — inset-bound only (never 100vw / left:0+right:0 full-bleed gutter smash) */
.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: auto;
  z-index: 100;
  width: fit-content;
  max-width: min(420px, calc(100% - 2rem));
  box-sizing: border-box;
  padding: .65rem .9rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #152033;
  color: var(--text);
  font-size: .85rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.toast.toast-ok { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(61,214,198,.25); }
.toast.toast-err { border-color: var(--err); color: #ffc9cf; }
.toast.toast-info { border-color: var(--warn); }

body.admin-ops table { font-size: .82rem; }
body.admin-ops th, body.admin-ops td { padding: .35rem .4rem; }
/* Bot honeypot — off-screen, not display:none (some bots skip display:none only) */
body.admin-ops .hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Posture + nav tools + overview dashboard */
body.admin-ops .posture-banner {
  margin: .45rem 0 .35rem;
  padding: .55rem .75rem;
  border-radius: 8px;
  border: 1px solid var(--warn);
  background: rgba(240,193,75,.08);
  color: var(--text);
  font-size: .85rem;
  line-height: 1.4;
}
body.admin-ops .posture-banner.ok {
  border-color: var(--accent);
  background: rgba(61,214,198,.07);
}
body.admin-ops .posture-banner.warn {
  border-color: var(--warn);
  background: rgba(240,193,75,.08);
}
body.admin-ops .posture-banner a { font-weight: 700; color: var(--accent); }
body.admin-ops .sec-checklist {
  margin: .4rem 0 0;
  padding-left: 0;
  list-style: none;
  line-height: 1.55;
  font-size: .88rem;
}
body.admin-ops .sec-checklist .check-ok { color: var(--accent); }
body.admin-ops .sec-checklist .check-warn { color: var(--warn); }
body.admin-ops .sec-posture { margin-bottom: .75rem; }
body.admin-ops .stat-value.on,
body.admin-ops #sec-2fa-state.on,
body.admin-ops #dash-2fa { letter-spacing: .02em; }
body.admin-ops #dash-2fa { font-size: .95rem; }

/* Looking Glass — health board */
body.admin-ops .health-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .65rem;
  margin: .65rem 0 .85rem;
}
@media (max-width: 1100px) {
  body.admin-ops .health-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body.admin-ops .health-grid { grid-template-columns: 1fr; }
}
body.admin-ops .health-cluster {
  background: var(--term);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .55rem .7rem;
  min-height: 0;
  box-shadow: inset 0 0 24px rgba(61, 214, 198, 0.04);
}
body.admin-ops .health-cluster-title {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: .35rem;
}
body.admin-ops .health-cluster-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: .25rem;
  word-break: break-word;
}
body.admin-ops .health-cluster-value.breath-full { color: var(--accent); }
body.admin-ops .health-cluster-value.breath-thin { color: var(--warn); }
body.admin-ops .health-cluster-value.breath-flat,
body.admin-ops .health-cluster-value.breath-paused { color: var(--warn); opacity: .95; }
body.admin-ops .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .45rem;
}
body.admin-ops .chip.chip-ok {
  border-color: var(--accent);
  color: var(--accent);
}
body.admin-ops .chip.chip-warn {
  border-color: var(--warn);
  color: var(--warn);
}
body.admin-ops .tiny-out {
  margin: .4rem 0 0;
  max-height: 5.5rem;
  overflow: auto;
  font-size: .78rem;
  padding: .4rem .5rem;
}
body.admin-ops .inhabitants-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: .75rem;
  margin: .65rem 0;
}
@media (max-width: 900px) {
  body.admin-ops .inhabitants-grid { grid-template-columns: 1fr; }
}
body.admin-ops .inhabit-pane { margin: 0; }
body.admin-ops td.row-actions {
  white-space: nowrap;
}
body.admin-ops td.row-actions button.tiny {
  margin: 0 0.25rem 0.15rem 0;
  display: inline-block;
}
body.admin-ops .nav-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: .35rem 0 .45rem;
}
body.admin-ops .tab-search {
  width: min(280px, 100%);
  margin: 0;
  padding: .4rem .65rem;
  font-size: .85rem;
}
body.admin-ops .nav-hint { opacity: .85; }
body.admin-ops .tab-btn.tab-hidden { display: none !important; }
body.admin-ops .quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .5rem;
  margin: .65rem 0 .85rem;
}
@media (max-width: 900px) {
  body.admin-ops .quick-grid { grid-template-columns: 1fr 1fr; }
}
body.admin-ops .quick-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
  margin: 0;
  padding: .7rem .75rem;
  text-align: left;
  background: var(--term);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
}
body.admin-ops .quick-tile:hover { border-color: var(--accent); }
body.admin-ops .quick-tile .qk {
  font-weight: 700;
  color: var(--accent);
  font-size: .92rem;
}
body.admin-ops #ov-dash {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: .75rem;
}
@media (max-width: 900px) {
  body.admin-ops #ov-dash { grid-template-columns: 1fr 1fr; }
}
body.admin-ops .help-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  padding: 1rem;
}
body.admin-ops .help-modal.hidden { display: none !important; }
body.admin-ops .help-card {
  max-width: 520px;
  width: 100%;
  margin: 0;
}
body.admin-ops .help-list {
  margin: .5rem 0 0;
  padding-left: 1.1rem;
  line-height: 1.55;
}
body.admin-ops .inline-check {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  white-space: nowrap;
}
body.admin-ops .inline-check input {
  width: auto;
  margin: 0;
  display: inline-block;
}
body.admin-ops #sim-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  body.admin-ops #sim-stats { grid-template-columns: 1fr 1fr; }
}
body.admin-ops code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .8em;
  color: var(--accent);
}


/* Dual health + sparklines + node table (Looking Glass) */
body.admin-ops .dual-health-labels {
  display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .75rem;
}
body.admin-ops .chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin: .75rem 0 1rem;
}
@media (max-width: 720px) {
  body.admin-ops .chart-grid { grid-template-columns: 1fr; }
}
body.admin-ops .chart-card {
  background: var(--term);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem .65rem;
}
body.admin-ops .chart-card canvas {
  width: 100%;
  height: 72px;
  display: block;
}
body.admin-ops table.data-table { font-size: .82rem; }
body.admin-ops tr.row-down td { color: var(--err); }
body.admin-ops tr.row-up td:first-child { color: var(--accent); }
body.admin-ops .health-cluster-value.small-val { font-size: 1.15rem; }

/* Looking Glass severity + danger UI */

/* Tab groups: Glass · Fabric · People · Platform — horizontal band (ops-ui densifies further) */
body.admin-ops .tab-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: .3rem .4rem;
  align-items: center;
  overflow-x: auto;
  padding-bottom: .1rem;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
body.admin-ops .tab-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .25rem;
  min-width: 0;
  flex: 0 0 auto;
}
body.admin-ops .tab-group-label {
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-left: 0;
  flex: 0 0 auto;
}
body.admin-ops .tab-group-btns {
  display: flex;
  flex-wrap: nowrap;
  gap: .15rem;
}
body.admin-ops .tab-group[data-group="glass"] .tab-group-label { color: var(--accent); }
body.admin-ops .tab-group[data-group="fabric"] .tab-group-label { color: #9b7bff; }
body.admin-ops .tab-group[data-group="people"] .tab-group-label { color: #f0c14b; }
body.admin-ops .tab-group[data-group="platform"] .tab-group-label { color: #8fa3c1; }
body.admin-ops .tab-group-hidden { display: none; }
body.admin-ops .tab-btn.tab-hidden { display: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
button.danger {
  background: transparent;
  color: var(--err);
  border: 1px solid var(--err);
  margin-top: .55rem;
}
button.danger:hover { background: rgba(255,107,122,.12); }
button.danger.tiny { margin-top: 0; padding: .2rem .45rem; font-size: .72rem; }
button.is-busy { cursor: wait !important; opacity: .75; }
button:disabled { cursor: not-allowed; opacity: .55; }
body.admin-ops button:disabled { cursor: not-allowed; }

body.admin-ops .badge.world-chip {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(61,214,198,.08);
}
body.admin-ops .chip.chip-err {
  border-color: var(--err);
  color: var(--err);
}
body.admin-ops .chip.chip-world {
  border-color: #9b7bff;
  color: #c4b0ff;
}
body.admin-ops .chip.chip-host {
  border-color: var(--accent);
  color: var(--accent);
}

/* Severity status bar — inline pills (never min-height cards) */
body.admin-ops .glass-status-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: .25rem;
  margin: .1rem 0 .15rem;
  overflow-x: auto;
}
body.admin-ops .sev-pill {
  flex: 0 1 auto;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--term);
  padding: .12rem .4rem;
  min-height: 0;
  box-shadow: none;
}
body.admin-ops .sev-pill .sev-label {
  font-size: .58rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
}
body.admin-ops .sev-pill .sev-value {
  font-size: .78rem;
  font-weight: 700;
  margin-top: 0;
}
body.admin-ops .sev-pill.ok { border-color: rgba(61,214,198,.55); box-shadow: none; }
body.admin-ops .sev-pill.ok .sev-value { color: var(--accent); }
body.admin-ops .sev-pill.warn { border-color: rgba(240,193,75,.55); }
body.admin-ops .sev-pill.warn .sev-value { color: var(--warn); }
body.admin-ops .sev-pill.err { border-color: rgba(255,107,122,.65); box-shadow: none; }
body.admin-ops .sev-pill.err .sev-value { color: var(--err); }
body.admin-ops .sev-pill .sev-detail { display: none; font-size: .65rem; color: var(--muted); }

body.admin-ops .health-cluster.ok { border-color: rgba(61,214,198,.4); }
body.admin-ops .health-cluster.warn { border-color: rgba(240,193,75,.5); }
body.admin-ops .health-cluster.err { border-color: rgba(255,107,122,.55); }
body.admin-ops .health-cluster-value.breath-flat,
body.admin-ops .health-cluster-value.breath-paused { color: var(--err); }

body.admin-ops .posture-banner.err {
  border-color: var(--err);
  color: var(--err);
  background: rgba(255,107,122,.08);
}
body.admin-ops .pulse-stale {
  border-color: var(--err) !important;
  color: var(--err) !important;
}
body.admin-ops .incident-rail {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  margin: .5rem 0 .75rem;
  padding: .5rem .65rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,.2);
}
body.admin-ops .incident-rail .ir-title {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: .35rem;
}

/* Confirm modal */
#confirm-modal {
  position: fixed; inset: 0; z-index: 10050;
  background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
#confirm-modal.hidden { display: none !important; }
#confirm-modal .confirm-card {
  max-width: 440px; width: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.55);
}
#confirm-modal .confirm-card h3 { margin: 0 0 .5rem; color: var(--text); font-size: 1.05rem; }
#confirm-modal .confirm-body {
  color: var(--muted); font-size: .9rem; white-space: pre-wrap; margin: 0 0 .85rem; line-height: 1.45;
}
#confirm-modal .confirm-actions { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
#confirm-modal .confirm-actions button { margin-top: 0; }
#confirm-modal.danger-mode .confirm-card { border-color: rgba(255,107,122,.45); }
body.admin-ops .tab-nav {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: .35rem;
  padding-bottom: .25rem;
}
body.admin-ops .tab-nav .tab-btn { flex: 0 0 auto; white-space: nowrap; }
body.admin-ops .toast.toast-err { border-color: var(--err); color: var(--err); }
body.admin-ops .toast.toast-info { border-color: var(--accent); color: var(--accent); }
body.admin-ops .realm-armed {
  border: 1px solid var(--err);
  color: var(--err);
  padding: .25rem .5rem;
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 700;
}

/* ── Map · GPS (Looking Glass) ───────────────────────────────── */
.map-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .65rem;
  margin: .35rem 0 .5rem;
}
.map-tog { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); font-size: .8rem; margin: 0; cursor: pointer; }
.map-tog input { width: auto; margin: 0; display: inline-block; }
.map-zoom-btns { display: inline-flex; gap: .25rem; align-items: center; }
.map-zoom-btns button { min-width: 1.85rem; }
.map-zoom-chip {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .72rem;
  min-width: 3.2rem;
  text-align: center;
}
.map-shell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: radial-gradient(ellipse at 40% 30%, #12203a 0%, #070b12 70%);
  box-shadow: inset 0 0 0 1px rgba(61,214,198,.06), 0 12px 40px rgba(0,0,0,.35);
}
.map-viewport {
  position: relative;
  width: 100%;
  /* Admin density overrides height via body.admin-ops --ops-chrome-budget */
  height: min(70vh, 720px);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.map-viewport.dragging { cursor: grabbing; }
.map-stage {
  position: absolute;
  left: 0; top: 0;
  /* width/height set by JS to preserve basemap aspect (no stretch) */
  width: 1600px;
  height: 1013px;
  transform-origin: 0 0;
  will-change: transform;
}
.map-basemap {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  max-width: none !important;
  z-index: 0;
  /* Stage is aspect-locked to plate in JS; fill matches UV pins */
  object-fit: fill;
  object-position: center;
  pointer-events: none;
  image-rendering: auto;
  filter: saturate(1.05) contrast(1.04);
  background: #0a1520;
}
.map-legacy-basemap { opacity: 0; }
.map-image-layers {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}
.map-image-layer {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  max-width: none !important;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}
.map-tile-layer {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  user-select: none;
}
.map-tile {
  position: absolute;
  display: block;
  max-width: none !important;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}
.map-overlay {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2;
}
.map-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}
.map-hud-tl,
.map-hud-tr,
.map-hud-bl,
.map-hud-br {
  position: absolute;
  max-width: 42%;
  padding: .35rem .5rem;
  border-radius: 6px;
  background: rgba(6, 10, 18, .72);
  border: 1px solid rgba(36, 48, 73, .85);
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.35;
  backdrop-filter: blur(4px);
}
.map-hud-tl { top: .5rem; left: .5rem; color: var(--accent); font-weight: 600; letter-spacing: .04em; }
.map-hud-tr { top: .5rem; right: .5rem; text-align: right; }
.map-hud-bl { bottom: .5rem; left: .5rem; }
.map-hud-br { bottom: .5rem; right: .5rem; text-align: right; font-family: ui-monospace, Consolas, monospace; }
.map-compass {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.map-compass .n { color: var(--warn); font-size: .72rem; }
.map-compass .ring {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; color: var(--muted);
  background: rgba(10,15,24,.55);
}
.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  border: 0;
  padding: 0;
  background: transparent;
  z-index: 2;
}
.map-marker .dot {
  display: block;
  width: 10px; height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 8px rgba(0,0,0,.4);
}
.map-marker .label {
  display: none;
  position: absolute;
  left: 50%; top: 11px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: .62rem;
  font-weight: 600;
  padding: .12rem .35rem;
  border-radius: 4px;
  background: rgba(8,12,20,.9);
  color: var(--text);
  border: 1px solid var(--line);
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0,0,0,.6);
}
.map-marker:hover .label,
.map-marker.selected .label,
.map-overlay.show-labels .map-marker.place .label { display: block; }
.map-marker.place .dot {
  width: 9px; height: 9px;
  background: #9eb4d4;
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 10px rgba(158,180,212,.35);
}
/* Kind-tinted place pins (from DistrictMapAtlas.kind) */
.map-marker.place.kind-metro .dot { width: 12px; height: 12px; background: #f0c14b; box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 12px rgba(240,193,75,.45); }
.map-marker.place.kind-fob .dot { background: #ff7a59; }
.map-marker.place.kind-harbor .dot { background: #4aa3ff; }
.map-marker.place.kind-edge .dot { background: #c084fc; }
.map-marker.place.kind-town .dot { background: #5eead4; }
.map-marker.place.kind-ops .dot { background: #fbbf24; }
.map-marker.place.kind-tower .dot { background: #67e8f9; width: 8px; height: 8px; border-radius: 2px; }
.map-marker.place.kind-outpost .dot { background: #d4a574; }
.map-marker.place.kind-airgap .dot { background: #a78bfa; }
.map-marker.place.kind-overlay .dot { background: #f472b6; }
.map-marker.place.kind-wan .dot { width: 7px; height: 7px; background: #64748b; opacity: .85; }
.map-marker.denizen .dot { background: #3dd6c6; }
.map-marker.precision-site .dot {
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 0 5px rgba(61,214,198,.12), 0 0 8px rgba(0,0,0,.35);
}
.map-marker.precision-exact .dot {
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 0 4px rgba(134,239,172,.2), 0 0 10px rgba(134,239,172,.32);
}
.map-marker.precision-route .dot {
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 0 5px rgba(122,224,255,.16), 0 0 12px rgba(122,224,255,.65);
}
.map-marker.denizen.home .dot {
  background: #86efac;
  box-shadow: 0 0 0 2px rgba(0,0,0,.45), 0 0 8px rgba(134,239,172,.4);
}
.map-marker.human .dot {
  width: 12px; height: 12px;
  background: #f0c14b;
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 10px rgba(240,193,75,.45);
}
.map-marker.cluster .dot {
  width: auto; min-width: 22px; height: 22px; border-radius: 999px;
  background: rgba(61,214,198,.2); color: var(--accent);
  border: 1px solid var(--accent);
  font-size: .65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 .35rem;
  box-shadow: 0 0 0 2px rgba(0,0,0,.4);
}
.map-legend { display: flex; flex-wrap: wrap; gap: .55rem .75rem; margin: .45rem 0 .25rem; }
.map-leg::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: .3rem; vertical-align: middle;
}
.map-leg-place::before { background: #9eb4d4; }
.map-leg-metro::before { background: #f0c14b; }
.map-leg-fob::before { background: #ff7a59; }
.map-leg-harbor::before { background: #4aa3ff; }
.map-leg-denizen::before { background: #3dd6c6; }
.map-leg-human::before { background: #f0c14b; }
.map-leg-cluster::before { background: rgba(61,214,198,.5); border: 1px solid #3dd6c6; border-radius: 2px; }
body.admin-ops .card#tab-map,
body.admin-ops #tab-map.card { max-width: none; }
/* Shell width owned by body.admin-ops main token above */

.map-trails {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}
.map-trails .corridor {
  stroke: rgba(148, 163, 184, 0.55);
  stroke-width: 0.35;
  stroke-linecap: round;
  fill: none;
}
.map-trails .corridor.road {
  stroke: rgba(251, 191, 36, 0.65);
  stroke-width: 0.45;
}
.map-trails .corridor.backbone {
  stroke: rgba(56, 189, 248, 0.5);
  stroke-width: 0.3;
  stroke-dasharray: 1.2 0.8;
}
.map-trails .corridor.down {
  stroke: rgba(248, 113, 113, 0.55);
  stroke-dasharray: 0.6 0.6;
}
.map-marker.infra .dot {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: #67e8f9;
  box-shadow: 0 0 0 1px rgba(0,0,0,.5);
}
.map-marker.infra.kind-tower .dot { background: #22d3ee; width: 8px; height: 8px; }
.map-marker.infra.kind-ap .dot { background: #a78bfa; border-radius: 50%; }
.map-marker.infra.kind-router .dot { background: #fb923c; border-radius: 2px; }
.map-marker.infra.down .dot { background: #f87171; opacity: .9; }
.map-trails .trail {
  stroke: rgba(61, 214, 198, 0.55);
  stroke-width: 0.35;
  stroke-dasharray: 1.2 0.8;
  fill: none;
}
.map-trails .trail.blocked {
  stroke: rgba(255, 107, 122, 0.65);
  stroke-dasharray: 0.6 0.6;
}
.map-trails .route-plan {
  stroke: rgba(122, 224, 255, 0.46);
  stroke-width: 0.28;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 0.9 0.55;
  fill: none;
}
.map-trails .route-plan.blocked {
  stroke: rgba(255, 107, 122, 0.58);
  stroke-dasharray: 0.45 0.42;
}
.map-trails .route-hop {
  fill: rgba(122, 224, 255, 0.72);
  stroke: rgba(5, 9, 15, 0.9);
  stroke-width: 0.08;
}
.map-trails .route-hop.current { fill: #f0c14b; }
.map-trails .route-hop.next { fill: #86efac; }
.map-marker.traveler .dot {
  width: 11px; height: 11px;
  background: #7ae0ff;
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 12px rgba(122,224,255,.65);
  animation: map-pulse 1.4s ease-in-out infinite;
}
@keyframes map-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: .85; }
}
.map-leg-traveler::before { background: #7ae0ff; }
.map-leg-route::before { background: rgba(122, 224, 255, 0.46); border-radius: 1px; }
.map-leg-hood::before { background: rgba(240, 193, 75, 0.55); border-radius: 2px; }
.map-leg-parcel::before { background: rgba(148, 163, 184, 0.7); border-radius: 1px; }

/* Stage‑2 spatial footprints (SVG viewBox 0–100) */
.map-spatial .spatial-hood {
  fill: rgba(240, 193, 75, 0.08);
  stroke: rgba(240, 193, 75, 0.45);
  stroke-width: 0.12;
}
.map-spatial .spatial-street {
  fill: rgba(148, 163, 184, 0.12);
  stroke: rgba(148, 163, 184, 0.55);
  stroke-width: 0.08;
}
.map-spatial .spatial-block {
  fill: rgba(61, 214, 198, 0.06);
  stroke: rgba(61, 214, 198, 0.4);
  stroke-width: 0.1;
  stroke-dasharray: 0.4 0.25;
}
.map-spatial .spatial-parcel {
  fill: rgba(158, 180, 212, 0.14);
  stroke: rgba(158, 180, 212, 0.55);
  stroke-width: 0.06;
}
.map-marker.place.kind-neighborhood .dot {
  width: 11px; height: 11px;
  background: #f0c14b;
  box-shadow: 0 0 0 2px rgba(0,0,0,.5), 0 0 10px rgba(240,193,75,.35);
}
.map-marker.place.kind-parcel .dot {
  width: 6px; height: 6px;
  background: #94a3b8;
  box-shadow: 0 0 0 1px rgba(0,0,0,.5);
}
.map-marker.place.kind-street .dot {
  width: 5px; height: 5px;
  background: #cbd5e1;
  border-radius: 1px;
}
.map-marker.place.kind-block .dot {
  width: 8px; height: 8px;
  background: rgba(61,214,198,.85);
  border-radius: 2px;
}
.map-marker.place.kind-building .dot {
  width: 10px; height: 10px;
  background: #e2e8f0;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.55);
}
.map-marker.scenario-anchor {
  z-index: 3;
}
.map-marker.scenario-anchor .dot {
  width: 8px; height: 8px;
  background: #f472b6;
  border-radius: 1px;
  transform: rotate(45deg);
  box-shadow: 0 0 0 2px rgba(0,0,0,.6), 0 0 10px rgba(244,114,182,.55);
}
.map-marker.scenario-anchor.selected .dot {
  background: #fdf2f8;
}
.map-marker.cpe .dot {
  width: 9px; height: 9px;
  background: #34d399;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 8px rgba(52,211,153,.45);
}
.map-marker.cpe.down .dot {
  background: #ff6b7a;
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 12px rgba(255,107,122,.65);
  animation: map-pulse 1.1s ease-in-out infinite;
}
.map-marker.tech-job .dot {
  width: 12px; height: 12px;
  background: #fbbf24;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(0,0,0,.55), 0 0 10px rgba(251,191,36,.5);
}
.map-leg-building::before { background: #e2e8f0; border-radius: 2px; }
.map-leg-anchor::before { background: #f472b6; border-radius: 1px; transform: rotate(45deg); }
.map-leg-cpe::before { background: #34d399; border-radius: 2px; }
.map-leg-cpe-down::before { background: #ff6b7a; border-radius: 2px; }

/* ═══════════════════════════════════════════════════════════════════════════
   Admin UI clean-up pass — human-usable Looking Glass (ops-ui-clean1)
   Calm hierarchy, grouped tools, readable type. No CSS zoom.
   ═══════════════════════════════════════════════════════════════════════════ */
body.admin-ops {
  --ops-gap: .35rem;
  --ops-radius: 8px;
  --ops-sticky-bg: rgba(12, 18, 30, .97);
  --ops-header-h: 2.5rem;
  /* Real chrome above map: header + dense sticky + panel/controls */
  --ops-chrome-budget: 14.5rem;
  /* Shared horizontal frame so header / sticky / panels align */
  --ops-frame-x: clamp(0.55rem, 1.4vw, 1rem);
  --shell-max: 100%;
  --ops-edge: var(--ops-frame-x);
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: .005em;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  min-height: 100dvh;
}
/* Full-width ops main — framing is on chrome/panels, not random main gutters */
body.admin-ops main {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  min-width: 0;
}
body.admin-ops #dash {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}
/* Account / legal: reading shell — not ops density (mid-cascade) */
body.admin-ops.portal-shell {
  font-size: 100%;
  line-height: 1.55;
  letter-spacing: normal;
  --shell-pad: clamp(1rem, 3vw, 1.75rem);
  --portal-type: max(15px, 0.95rem);
  --ops-edge: var(--shell-pad);
}
body.admin-ops.portal-shell main.shell {
  width: min(100% - 2 * var(--shell-pad), var(--portal-max));
  max-width: 100%;
  margin: var(--space-5) auto var(--space-6);
  padding: 1.5rem clamp(1.15rem, 3vw, 1.75rem) 1.4rem;
  box-sizing: border-box;
  min-width: 0;
  font-size: var(--portal-type, max(15px, 0.95rem));
}
body.admin-ops.portal-shell main.shell.wide {
  width: min(100% - 2 * var(--shell-pad), var(--portal-max-wide));
}
body.admin-ops.portal-shell main.shell.card {
  padding: 1.5rem clamp(1.15rem, 3vw, 1.75rem) 1.4rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}
body.admin-ops.portal-shell .form-block {
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
  border-radius: 10px;
  min-width: 0;
  max-width: 100%;
}
body.admin-ops.portal-shell .doc-foot,
body.admin-ops.portal-shell .portal-footer {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.6;
}
body.admin-ops .top {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: .4rem var(--ops-frame-x);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 12, 20, .96);
  min-height: var(--ops-header-h);
  box-sizing: border-box;
  align-items: center;
}
body.admin-ops .brand-title {
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text);
}
body.admin-ops .badge.soft {
  border-color: var(--line);
  color: var(--muted);
  font-weight: 600;
}
body.admin-ops .iso {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  opacity: .9;
}

/* Login — superseded by final LOGIN GATE pack at EOF (web-fit10) */
body.admin-ops .login-card {
  max-width: 28rem;
  width: min(100%, 28rem);
  margin: 2.5rem auto 2rem;
  padding: 1.5rem 1.55rem 1.25rem;
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
}

/* Sticky chrome — full-width frame under header (no floating rounded island) */
body.admin-ops .sticky-bar.card,
body.admin-ops .sticky-bar {
  position: sticky;
  top: var(--ops-header-h);
  z-index: 30;
  width: 100%;
  max-width: 100%;
  margin: 0;
  max-height: min(28vh, 12rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: .4rem var(--ops-frame-x) .45rem;
  background: var(--ops-sticky-bg);
  border-radius: 0 !important;
  box-shadow: none !important;
  border: 0;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}
body.admin-ops .term-bar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: .25rem .5rem;
  margin-bottom: .15rem;
  min-width: 0;
}
body.admin-ops .term-bar > div:first-child {
  min-width: 0;
  overflow: hidden;
}
body.admin-ops .who {
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.admin-ops .term-bar .muted.small,
body.admin-ops .term-bar #session-meta {
  font-size: .65rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.admin-ops .term-bar .actions {
  flex: 0 0 auto;
  gap: .3rem;
  align-items: center;
}
body.admin-ops .term-bar .actions button,
body.admin-ops .term-bar .actions .btn-link {
  margin-top: 0;
  padding: .22rem .5rem;
  font-size: .72rem;
}
body.admin-ops .world-label {
  font-size: .65rem;
}
body.admin-ops .world-select {
  min-width: 8.5rem;
  font-size: .72rem;
  padding: .2rem .35rem;
}
/* Chips: one horizontal scroll band, not a multi-row slab */
body.admin-ops .ctx-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: .22rem;
  margin: .05rem 0 .15rem;
  padding: .12rem 0;
  border-top: 1px solid rgba(36,48,73,.55);
  border-bottom: 1px solid rgba(36,48,73,.4);
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
body.admin-ops .chip {
  flex: 0 0 auto;
  font-size: .62rem;
  padding: .08rem .32rem;
  border-radius: 999px;
  line-height: 1.25;
}
body.admin-ops .posture-banner {
  margin: .12rem 0 .15rem !important;
  padding: .2rem .4rem !important;
  font-size: .7rem !important;
  line-height: 1.3 !important;
}
/* Severity: inline pills (not min-height cards) */
body.admin-ops .glass-status-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: .25rem;
  margin: .1rem 0 .15rem;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
body.admin-ops .sev-pill {
  flex: 0 1 auto;
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem .35rem;
  padding: .12rem .4rem;
  border-radius: 999px;
  min-height: 0;
  box-shadow: none;
}
body.admin-ops .sev-pill .sev-label {
  font-size: .58rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .85;
  margin: 0;
  line-height: 1.2;
}
body.admin-ops .sev-pill .sev-value {
  font-size: .78rem;
  font-weight: 700;
  margin-top: 0;
  line-height: 1.2;
}
body.admin-ops .sev-pill .sev-detail {
  display: none; /* title/tooltip only — saves a full row of chrome */
}
body.admin-ops .nav-tools {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .3rem .45rem;
  margin: .1rem 0 .08rem;
  min-width: 0;
}
body.admin-ops .tab-search {
  flex: 1 1 120px;
  max-width: 180px;
  margin: 0;
  padding: .18rem .4rem;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(0,0,0,.25);
  color: var(--text);
  font-size: .72rem;
}
body.admin-ops .nav-help {
  margin: 0;
}
body.admin-ops .nav-help summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  color: var(--muted);
}
body.admin-ops .nav-help summary::-webkit-details-marker { display: none; }
body.admin-ops .nav-help[open] summary { color: var(--accent); }
body.admin-ops .nav-hint {
  margin: .35rem 0 0;
  max-width: 36rem;
  line-height: 1.45;
}
body.admin-ops .nav-hint kbd {
  font-family: ui-monospace, Consolas, monospace;
  font-size: .78em;
  padding: .05rem .3rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0,0,0,.3);
}

/* Tab nav — one horizontal scroll band (groups never stack tall) */
body.admin-ops .tab-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: .3rem .4rem;
  margin-top: .12rem;
  padding: .2rem 0 0;
  border-top: 1px solid var(--line);
  align-items: center;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
body.admin-ops .tab-group {
  background: rgba(0,0,0,.16);
  border: 1px solid rgba(36,48,73,.85);
  border-radius: 6px;
  padding: .12rem .28rem .14rem;
  min-width: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: .28rem;
}
body.admin-ops .tab-group-label {
  font-size: .52rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 0;
  display: block;
  flex: 0 0 auto;
  opacity: .9;
}
body.admin-ops .tab-group-btns {
  display: flex;
  flex-wrap: nowrap;
  gap: .15rem;
}
body.admin-ops .tab-nav .tab-btn {
  margin-top: 0;
  font-size: .68rem;
  font-weight: 600;
  padding: .18rem .4rem;
  border-radius: 5px;
  border: 1px solid transparent;
  background: rgba(255,255,255,.03);
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
}
body.admin-ops .tab-nav .tab-btn:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,.05);
}
body.admin-ops .tab-nav .tab-btn.active {
  color: var(--text);
  border-color: rgba(61,214,198,.45);
  background: rgba(61,214,198,.1);
  box-shadow: none;
}

/* Panel content — same horizontal frame as sticky/header */
body.admin-ops .tab-panel.card {
  width: auto;
  max-width: none;
  margin: .55rem var(--ops-frame-x) 1rem;
  padding: .75rem .85rem .85rem;
  border-radius: 10px;
  box-sizing: border-box;
  border-radius: var(--ops-radius);
  box-sizing: border-box;
}
body.admin-ops .panel-head {
  margin-bottom: .4rem;
  padding-bottom: .3rem;
  border-bottom: 1px solid rgba(36,48,73,.7);
  align-items: center;
}
body.admin-ops .panel-head h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
}
body.admin-ops h3 {
  font-size: .92rem;
  margin: .75rem 0 .4rem;
  color: var(--text);
  font-weight: 650;
}
body.admin-ops .form-block {
  border-radius: 10px;
  padding: .75rem .85rem;
  margin-bottom: .55rem;
}
body.admin-ops button {
  margin-top: .4rem;
  border-radius: 8px;
  font-weight: 600;
}
body.admin-ops button.secondary {
  margin-top: .4rem;
}
body.admin-ops button.tiny {
  margin-top: 0;
  padding: .28rem .55rem;
  font-size: .75rem;
  border-radius: 6px;
}
body.admin-ops .row button,
body.admin-ops .actions button {
  margin-top: 0;
}
body.admin-ops .out,
body.admin-ops pre.out {
  font-size: .8rem;
  line-height: 1.45;
  padding: .65rem .75rem;
  border-radius: 8px;
  max-height: 320px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  background: rgba(0,0,0,.28);
  border: 1px solid var(--line);
}
body.admin-ops .out.short { max-height: 120px; }
body.admin-ops .out.tall { max-height: 420px; }
body.admin-ops .out.tiny-out { max-height: 88px; font-size: .75rem; }
body.admin-ops .table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: .45rem 0 .75rem;
}
body.admin-ops .table-wrap > table {
  width: max-content;
  min-width: 100%;
  max-width: none;
}
body.admin-ops table.data-table,
body.admin-ops table {
  font-size: .84rem;
  margin: 0;
}
/* Grid/flex ancestors must shrink so local scroll wins over page smash */
body.admin-ops .card,
body.admin-ops .form-block,
body.admin-ops .tab-panel,
body.admin-ops .inhabit-pane {
  min-width: 0;
  max-width: 100%;
}
body.admin-ops .grid > * {
  min-width: 0;
}
body.admin-ops table th {
  text-align: left;
  padding: .45rem .55rem;
  color: var(--muted);
  font-weight: 650;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.2);
}
body.admin-ops table td {
  padding: .4rem .55rem;
  border-bottom: 1px solid rgba(36,48,73,.55);
  vertical-align: top;
}
body.admin-ops .incident-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .5rem;
  margin: .55rem 0 .85rem;
  padding: .5rem .65rem;
  border-radius: 8px;
  background: rgba(0,0,0,.2);
  border: 1px solid var(--line);
}
body.admin-ops .incident-rail .ir-title {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: .35rem;
}
body.admin-ops .ctx-strip.compact {
  margin: 0 0 .75rem;
  padding: .4rem 0;
  gap: .35rem;
}
body.admin-ops .health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: .75rem;
  margin: .75rem 0 1rem;
}
body.admin-ops .health-cluster {
  background: rgba(0,0,0,.22);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem .7rem;
  min-height: 0;
}
body.admin-ops .health-cluster-title {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
}
body.admin-ops .health-cluster-value {
  font-size: 1.25rem;
  font-weight: 700;
  margin: .25rem 0 .15rem;
}

/* Map controls — View always on; Layers + Block ops collapsed (less chrome over plate) */
body.admin-ops .map-lead {
  display: none;
}
body.admin-ops #tab-map > .panel-head .muted {
  display: none;
}
body.admin-ops #tab-map > .panel-head {
  margin-bottom: .35rem;
}
body.admin-ops #tab-map > .panel-head h2 {
  font-size: 1rem;
}
body.admin-ops .map-controls {
  display: flex;
  flex-direction: column;
  gap: .2rem !important;
  margin: 0 0 .4rem !important;
  padding: .3rem .4rem !important;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,.18);
}
body.admin-ops .map-toolbar-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: .25rem .35rem !important;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
body.admin-ops .map-group-label {
  flex: 0 0 auto;
  min-width: 3.2rem;
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
body.admin-ops .map-fold {
  border-top: 1px solid rgba(36,48,73,.55);
  margin: 0;
  padding: 0;
}
body.admin-ops .map-fold-summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .28rem .15rem;
}
body.admin-ops .map-fold-summary::-webkit-details-marker { display: none; }
body.admin-ops .map-fold-summary::before {
  content: "▸ ";
  color: var(--accent);
  font-size: .75em;
}
body.admin-ops .map-fold[open] > .map-fold-summary::before {
  content: "▾ ";
}
body.admin-ops .map-fold[open] > .map-fold-summary {
  color: var(--text);
  margin-bottom: .2rem;
}
body.admin-ops .map-fold .map-toolbar-row {
  padding-bottom: .2rem;
}
body.admin-ops .map-toggles,
body.admin-ops .map-view-tools,
body.admin-ops .map-ops-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .2rem .3rem;
  flex: 1 1 auto;
  min-width: 0;
}
body.admin-ops .map-view-tools {
  flex-wrap: nowrap;
  overflow-x: auto;
}
body.admin-ops .map-tog {
  font-size: .66rem !important;
  color: var(--text);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(36,48,73,.9);
  border-radius: 999px;
  padding: .08rem .32rem .08rem .22rem !important;
  white-space: nowrap;
  flex: 0 0 auto;
}
body.admin-ops .map-tog input {
  margin: 0 .18rem 0 0;
  vertical-align: middle;
}
body.admin-ops .map-ops-row {
  padding-top: 0;
  border-top: 0;
}
body.admin-ops .map-viewport {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  /* Prefer usable map box — not a tall black slab */
  height: clamp(320px, calc(100dvh - var(--ops-chrome-budget) - 4.5rem), 66dvh);
  border-radius: 8px;
  overflow: hidden;
  background: #05080f;
}
body.admin-ops .map-shell {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
body.admin-ops #tab-map.card,
body.admin-ops .tab-panel.card {
  min-width: 0;
  max-width: none;
  width: 100%;
}
body.admin-ops .map-legend {
  gap: .3rem .55rem;
  margin: .3rem 0 .2rem;
  padding: .15rem 0;
  color: var(--muted);
  font-size: .7rem;
}
body.admin-ops #map-detail {
  margin-top: .3rem;
  min-height: 2.25rem;
  max-height: 4.5rem;
}

/* Grid forms less cramped */
body.admin-ops .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: .85rem;
  margin: .75rem 0;
}
body.admin-ops .controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin-top: .65rem;
  padding-top: .55rem;
  border-top: 1px solid rgba(36,48,73,.55);
}
body.admin-ops .controls-row input.inline,
body.admin-ops .controls-row select {
  margin: 0;
  min-width: 8rem;
}

@media (max-width: 900px) {
  body.admin-ops {
    --ops-header-h: 2.35rem;
    --ops-chrome-budget: 15.5rem;
    --ops-edge: .3rem;
  }
  body.admin-ops main {
    width: 100%;
    max-width: none;
    padding: 0 var(--ops-edge);
  }
  body.admin-ops .sticky-bar {
    top: var(--ops-header-h);
    max-height: min(26vh, 10rem);
  }
  body.admin-ops .term-bar { flex-wrap: wrap; }
  body.admin-ops .tab-group { flex: 0 0 auto; }
  body.admin-ops .map-viewport {
    height: clamp(260px, calc(100dvh - var(--ops-chrome-budget)), 100dvh);
  }
  body.admin-ops .login-card {
    margin: 1.25rem auto;
    width: min(100% - 1rem, 440px);
  }
}

@media (max-height: 800px) {
  body.admin-ops {
    --ops-chrome-budget: 13.25rem;
  }
  body.admin-ops .sticky-bar {
    max-height: min(20vh, 8rem);
    padding: .18rem .3rem .22rem;
  }
  body.admin-ops .term-bar #session-meta { display: none; }
  body.admin-ops .map-viewport {
    height: clamp(240px, calc(100dvh - var(--ops-chrome-budget)), 100dvh);
  }
}

@media (max-height: 640px) {
  body.admin-ops {
    --ops-chrome-budget: 11rem;
  }
  body.admin-ops .ctx-strip { display: none; }
  body.admin-ops .glass-status-bar { display: none; }
  body.admin-ops .nav-tools .nav-help { display: none; }
  body.admin-ops .map-viewport {
    height: clamp(200px, calc(100dvh - var(--ops-chrome-budget)), 100dvh);
  }
}

/* ── Map / tall-tool tabs: collapse sticky so the plate owns the browser ── */
body.admin-ops[data-tab="tab-map"],
body.admin-ops[data-tab="tab-fabric"],
body.admin-ops[data-tab="tab-live"] {
  /* header + dense sticky (term+tabs) + panel head + map control rows */
  --ops-chrome-budget: 12.75rem;
}
body.admin-ops[data-tab="tab-map"] .sticky-bar .ctx-strip,
body.admin-ops[data-tab="tab-map"] .sticky-bar .glass-status-bar,
body.admin-ops[data-tab="tab-map"] .sticky-bar .nav-tools,
body.admin-ops[data-tab="tab-map"] .sticky-bar .posture-banner {
  display: none;
}
body.admin-ops[data-tab="tab-map"] .sticky-bar {
  max-height: none;
  padding: .18rem .35rem .2rem;
  margin-bottom: .25rem;
}
body.admin-ops[data-tab="tab-map"] .term-bar {
  margin-bottom: .08rem;
}
body.admin-ops[data-tab="tab-map"] .term-bar #session-meta {
  display: none;
}
body.admin-ops[data-tab="tab-map"] .tab-nav {
  margin-top: .08rem;
  padding-top: .12rem;
}
body.admin-ops[data-tab="tab-map"] .map-viewport {
  /* Majority of 100dvh after chrome — no artificial 920px cap */
  height: clamp(340px, calc(100dvh - var(--ops-chrome-budget)), 100dvh);
}
body.admin-ops[data-tab="tab-map"] #tab-map.card {
  padding: .3rem .4rem .4rem;
  margin-top: .2rem;
  margin-bottom: .25rem;
}
body.admin-ops[data-tab="tab-map"] #tab-map .panel-head {
  margin-bottom: .2rem;
  padding-bottom: .15rem;
}
body.admin-ops[data-tab="tab-map"] #tab-map .panel-head h2 {
  font-size: .92rem;
}
body.admin-ops[data-tab="tab-map"] #tab-map .panel-head .muted {
  display: none;
}
body.admin-ops[data-tab="tab-map"] .map-legend {
  margin: .2rem 0 .1rem;
}
body.admin-ops[data-tab="tab-map"] #map-detail {
  min-height: 1.75rem;
  max-height: 3.5rem;
}

body.admin-ops .map-follow-grid {
  align-items: stretch;
  margin-top: .55rem;
}

body.admin-ops #follow-denizen,
body.admin-ops #demo-story-feed,
body.admin-ops #scenario-placement {
  min-height: 12rem;
  white-space: pre-wrap;
}

body.admin-ops .map-scenario-fold {
  margin-top: .55rem;
}

/* Prefer-reduced-motion for portal/admin chrome */
@media (prefers-reduced-motion: reduce) {
  body.admin-ops *,
  body.admin-ops *::before,
  body.admin-ops *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 520px) {
  body.admin-ops .top {
    padding: .2rem .3rem;
  }
  body.admin-ops .brand-title {
    font-size: .82rem;
  }
  body.admin-ops .controls-row input.inline,
  body.admin-ops .controls-row select {
    min-width: min(8rem, 100%);
    flex: 1 1 auto;
  }
  body.admin-ops .term-bar { flex-wrap: wrap; }
  .toast {
    right: .65rem;
    left: auto;
    bottom: .65rem;
    max-width: min(420px, calc(100% - 1.3rem));
  }
}

/* ── Portal cascade win (account / legal) — last so ops density never smashes reading ── */
body.admin-ops.portal-shell {
  font-size: 100%;
  line-height: 1.55;
  letter-spacing: normal;
  --shell-pad: clamp(1rem, 3vw, 1.75rem);
  --portal-type: max(15px, 0.95rem);
  --shell-max: var(--portal-max-wide);
}
body.admin-ops.portal-shell main.shell {
  width: min(100% - 2 * var(--shell-pad), var(--portal-max));
  max-width: 100%;
  margin: var(--space-5) auto var(--space-6);
  padding: 1.5rem clamp(1.15rem, 3vw, 1.75rem) 1.4rem;
  box-sizing: border-box;
  min-width: 0;
  font-size: var(--portal-type, max(15px, 0.95rem));
}
body.admin-ops.portal-shell main.shell.wide {
  width: min(100% - 2 * var(--shell-pad), var(--portal-max-wide));
}
body.admin-ops.portal-shell main.shell.card {
  padding: 1.5rem clamp(1.15rem, 3vw, 1.75rem) 1.4rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}
body.admin-ops.portal-shell h1 {
  font-size: clamp(1.35rem, 1.15rem + 0.9vw, 1.75rem);
  line-height: 1.25;
  margin-bottom: 0.45rem;
}
body.admin-ops.portal-shell h2 {
  font-size: clamp(1.1rem, 1.02rem + 0.4vw, 1.3rem);
  margin: 1.35rem 0 0.5rem;
  color: var(--text);
  font-weight: 700;
}
body.admin-ops.portal-shell h3 {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
  margin: 0.85rem 0 0.4rem;
  color: var(--text);
  font-weight: 650;
}
body.admin-ops.portal-shell label {
  margin: 0.65rem 0;
  font-size: 0.95rem;
}
body.admin-ops.portal-shell input,
body.admin-ops.portal-shell select,
body.admin-ops.portal-shell textarea {
  font-size: max(16px, 0.9rem);
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
}
body.admin-ops.portal-shell button,
body.admin-ops.portal-shell .btn-link {
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  margin-top: 0.75rem;
  border-radius: 8px;
}
body.admin-ops.portal-shell .row button,
body.admin-ops.portal-shell .row .btn-link {
  margin-top: 0;
}
body.admin-ops.portal-shell .out,
body.admin-ops.portal-shell pre,
body.admin-ops.portal-shell pre.out {
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0.75rem 0.85rem;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow-x: auto;
}
body.admin-ops.portal-shell .out.short {
  max-height: 140px;
}
body.admin-ops.portal-shell .form-block {
  padding: 0.9rem 1rem;
  margin-bottom: 0.85rem;
  border-radius: 10px;
  min-width: 0;
  max-width: 100%;
}
body.admin-ops.portal-shell .table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0.65rem 0 1rem;
}
body.admin-ops.portal-shell .table-wrap > table {
  width: max-content;
  min-width: 100%;
  max-width: none;
}
body.admin-ops.portal-shell table,
body.admin-ops.portal-shell table.data-table {
  font-size: 0.95rem;
}
body.admin-ops.portal-shell .small {
  font-size: 0.9rem;
}
body.admin-ops.portal-shell .who {
  font-size: 1.1rem;
}
body.admin-ops.portal-shell .doc-foot,
body.admin-ops.portal-shell .portal-footer {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.6;
}
body.admin-ops.portal-shell code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ═══ FINAL GUARDS — 16px form floor + map height sanity ═══ */
body.admin-ops input,
body.admin-ops select,
body.admin-ops textarea,
body.admin-ops .tab-search,
body.admin-ops .world-select,
body.admin-ops .login-form input {
  font-size: max(16px, 0.9rem) !important;
}
body.admin-ops .map-viewport {
  height: clamp(300px, calc(100dvh - var(--ops-chrome-budget, 14.5rem) - 4rem), 64dvh) !important;
  max-height: calc(100dvh - var(--ops-header-h, 2.5rem) - 8rem);
}
body.admin-ops[data-tab="tab-map"] {
  --ops-chrome-budget: 11rem;
}
body.admin-ops[data-tab="tab-map"] .map-viewport {
  height: clamp(340px, calc(100dvh - 11.5rem), 68dvh) !important;
  max-height: calc(100dvh - 9rem);
}
body.admin-ops .world-select {
  min-width: min(160px, 100%);
}
body.admin-ops .controls-row input.inline,
body.admin-ops .controls-row select {
  min-width: min(8rem, 100%);
}

/* ═══════════════════════════════════════════════════════════════════════════
   APP FRAME + LOGIN GATE (web-fit12) — aligned chrome, no floating islands
   ═══════════════════════════════════════════════════════════════════════════ */

/* Signed-in: block layout, panels share --ops-frame-x with header */
body.admin-ops:has(#dash:not(.hidden)) main {
  display: block !important;
  align-items: stretch !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Signed-out: centered gate only */
body.admin-ops main:has(#login:not(.hidden)) {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: calc(100dvh - var(--ops-header-h, 2.5rem));
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 1.5rem var(--ops-frame-x, .75rem) 2.5rem;
  box-sizing: border-box;
}

/* Map / panels: never bleed past frame */
body.admin-ops .map-shell,
body.admin-ops .map-viewport,
body.admin-ops .table-wrap {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
body.admin-ops .tab-panel.card {
  width: auto !important;
  margin-left: var(--ops-frame-x) !important;
  margin-right: var(--ops-frame-x) !important;
  max-width: none !important;
}
body.admin-ops #tab-map.card {
  /* Map tab uses full width between frame pads */
  padding: .55rem .65rem .7rem;
}

/* Soften chrome while signed out (world/role chips look “ops broken”) */
body.admin-ops:has(#dash.hidden) .top .badge.world-chip,
body.admin-ops:has(#dash.hidden) .top .badge.muted-badge {
  opacity: .55;
}

body.admin-ops #login.login-card,
body.admin-ops .login-card {
  width: min(100%, 28rem);
  max-width: 28rem;
  margin: 1.75rem auto 0;
  padding: 1.65rem 1.7rem 1.35rem !important;
  border-radius: 14px !important;
  border: 1px solid rgba(61, 214, 198, 0.18);
  background: rgba(18, 26, 43, 0.96);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 18px 50px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

body.admin-ops .login-card h1 {
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.65rem) !important;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 0.4rem !important;
  color: var(--text);
  line-height: 1.2;
}

body.admin-ops .login-card .lead {
  margin: 0 0 1.15rem !important;
  font-size: 0.95rem !important;
  line-height: 1.55 !important;
  color: var(--muted);
  max-width: 38ch;
}

body.admin-ops .login-form {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 100%;
}

body.admin-ops .login-form label {
  display: block;
  margin: 0.55rem 0 0 !important;
  font-size: 0.88rem !important;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

body.admin-ops .login-form input {
  display: block;
  width: 100% !important;
  max-width: 100%;
  margin-top: 0.35rem !important;
  padding: 0.7rem 0.8rem !important;
  border-radius: 9px !important;
  border: 1px solid var(--line) !important;
  background: var(--term) !important;
  color: var(--text) !important;
  font-size: max(16px, 1rem) !important;
  line-height: 1.3;
  box-sizing: border-box;
}

body.admin-ops .login-form input:focus {
  outline: 2px solid rgba(61, 214, 198, 0.55);
  outline-offset: 1px;
  border-color: rgba(61, 214, 198, 0.65) !important;
}

body.admin-ops .login-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin-top: 1.1rem !important;
}

body.admin-ops .login-actions button,
body.admin-ops .login-form button[type="submit"] {
  margin-top: 0 !important;
  padding: 0.65rem 1.25rem !important;
  font-size: 0.95rem !important;
  font-weight: 700;
  border-radius: 9px !important;
  min-height: 2.6rem;
}

body.admin-ops .login-actions .btn-link {
  margin-top: 0 !important;
  padding: 0.55rem 0.85rem !important;
  font-size: 0.88rem !important;
  border-radius: 8px;
}

body.admin-ops .login-card .sso-row {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(36, 48, 73, 0.85);
}

body.admin-ops .login-card .sso-row .row {
  gap: 0.5rem;
  margin-top: 0.35rem;
}

body.admin-ops .login-card #login-err,
body.admin-ops .login-card .err {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 107, 122, 0.08);
  border: 1px solid rgba(255, 107, 122, 0.28);
  font-size: 0.88rem;
  min-height: 0;
}

body.admin-ops .login-card #login-err:empty,
body.admin-ops .login-card .err:empty {
  display: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

body.admin-ops .login-foot {
  margin: 1.15rem 0 0 !important;
  padding-top: 0.85rem !important;
  border-top: 1px solid rgba(36, 48, 73, 0.85);
  font-size: 0.8rem !important;
  line-height: 1.55 !important;
  color: var(--muted);
}

/* Account / claim / recover portal shell (comfort scale) */
body.admin-ops.portal-shell main.shell {
  width: min(100% - 2 * var(--shell-pad), 28rem) !important;
  max-width: 28rem !important;
  margin: 2rem auto 2.5rem !important;
  padding: 1.65rem 1.7rem 1.35rem !important;
  border-radius: 14px !important;
}

/* Account hub needs room for dual-face doors + two-column cards */
body.admin-ops.portal-shell main.shell.account-shell {
  width: min(100% - 2 * var(--shell-pad), 42rem) !important;
  max-width: 42rem !important;
}
body.admin-ops.portal-shell main.shell.account-shell:has(#panel:not(.hidden)) {
  width: min(100% - 2 * var(--shell-pad), 48rem) !important;
  max-width: 48rem !important;
}

body.admin-ops.portal-shell main.shell.wide {
  width: min(100% - 2 * var(--shell-pad), 56rem) !important;
  max-width: 56rem !important;
}

body.admin-ops.portal-shell main.shell h1 {
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.65rem) !important;
  margin-bottom: 0.45rem !important;
}

body.admin-ops.portal-shell main.shell label {
  font-size: 0.88rem !important;
  font-weight: 600;
}

body.admin-ops.portal-shell main.shell input,
body.admin-ops.portal-shell main.shell select,
body.admin-ops.portal-shell main.shell textarea {
  font-size: max(16px, 1rem) !important;
  padding: 0.7rem 0.8rem !important;
  border-radius: 9px !important;
}

/* Standalone card actions (not in a flex row) */
body.admin-ops.portal-shell main.shell button {
  margin-top: 0.85rem !important;
  padding: 0.65rem 1.2rem !important;
  font-size: 0.95rem !important;
  border-radius: 9px !important;
  min-height: 2.55rem;
  line-height: 1.2;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

/* Row / bar / table buttons must sit on one baseline (override forced margin-top) */
body.admin-ops.portal-shell main.shell .row button,
body.admin-ops.portal-shell main.shell .row .btn-link,
body.admin-ops.portal-shell main.shell .login-actions button,
body.admin-ops.portal-shell main.shell .login-actions .btn-link,
body.admin-ops.portal-shell main.shell .account-actions button,
body.admin-ops.portal-shell main.shell .account-actions .btn-link,
body.admin-ops.portal-shell main.shell .account-bar button,
body.admin-ops.portal-shell main.shell .sso-row .row .btn-link,
body.admin-ops.portal-shell main.shell td button,
body.admin-ops.portal-shell main.shell button.tiny {
  margin-top: 0 !important;
}

body.admin-ops.portal-shell main.shell .btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 2.55rem;
  line-height: 1.2;
  padding: 0.55rem 1rem !important;
  border-radius: 9px;
  margin-top: 0;
}
body.admin-ops.portal-shell main.shell button.btn-link {
  color: #04221f !important;
  background: var(--accent) !important;
  border: 0 !important;
  font-weight: 700 !important;
}
body.admin-ops.portal-shell main.shell .account-actions button.btn-link {
  min-width: min(100%, 16rem);
  text-align: center;
}
body.admin-ops.portal-shell main.shell .account-actions button.secondary {
  color: var(--text) !important;
  background: transparent !important;
  border: 1px solid var(--line) !important;
  font-weight: 600 !important;
}

body.admin-ops.portal-shell main.shell button.tiny {
  min-height: 2rem !important;
  padding: 0.3rem 0.65rem !important;
  font-size: 0.78rem !important;
  font-weight: 600;
  border-radius: 7px !important;
}

/* Sign-in gate only: strip card chrome (do not flatten signed-in account cards) */
body.admin-ops.portal-shell main.shell .form-block.account-gate,
body.admin-ops.portal-shell main.shell .form-block.login-form {
  margin-top: 0.35rem;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

/* Signed-in account cards — real surfaces again */
body.admin-ops.portal-shell main.shell .account-card.form-block {
  margin: 0 !important;
  padding: 1rem 1.05rem 1.05rem !important;
  border: 1px solid rgba(100, 130, 170, 0.28) !important;
  background: rgba(12, 18, 28, 0.5) !important;
  border-radius: 10px !important;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
body.admin-ops.portal-shell main.shell .account-card h3 {
  margin: 0 0 0.35rem !important;
  font-size: 1rem !important;
  color: var(--text) !important;
  font-weight: 700;
}
body.admin-ops.portal-shell main.shell .account-card > button {
  margin-top: 0.85rem !important;
}

@media (max-width: 520px) {
  body.admin-ops #login.login-card,
  body.admin-ops .login-card {
    margin-top: 1rem;
    padding: 1.25rem 1.15rem 1.1rem !important;
  }
  body.admin-ops .login-actions {
    flex-direction: column;
    align-items: stretch;
  }
  body.admin-ops .login-actions button,
  body.admin-ops .login-actions .btn-link {
    width: 100%;
    text-align: center;
  }
}

/* Session lifecycle — login revoke-others + account session chrome (alpha-portal21) */
body.admin-ops label.check,
body.admin-ops .login-revoke-opt,
body.admin-ops.portal-shell label.check,
body.admin-ops.portal-shell .login-revoke-opt {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.55rem;
  margin: 0.85rem 0 0.45rem !important;
  font-weight: 400 !important;
  cursor: pointer;
  line-height: 1.4;
  width: 100%;
  max-width: 100%;
}
body.admin-ops label.check input[type="checkbox"],
body.admin-ops .login-revoke-opt input[type="checkbox"],
body.admin-ops.portal-shell label.check input[type="checkbox"],
body.admin-ops.portal-shell .login-revoke-opt input[type="checkbox"] {
  width: 1.1rem !important;
  min-width: 1.1rem !important;
  max-width: 1.1rem !important;
  height: 1.1rem !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
  accent-color: var(--accent, #5eead4);
  align-self: center;
}
body.admin-ops.portal-shell label.check span,
body.admin-ops.portal-shell .login-revoke-opt span {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 400;
  line-height: 1.35;
}
/* Keep Sign in + invite + recover on one readable row (desktop) */
body.admin-ops.portal-shell .login-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-top: 0.95rem;
}
body.admin-ops.portal-shell .login-actions button,
body.admin-ops.portal-shell .login-actions .btn-link {
  margin-top: 0 !important;
  width: auto;
  flex: 0 1 auto;
}
body.admin-ops.portal-shell .account-alpha-note {
  margin: 0 0 0.75rem;
  color: var(--muted, #9dafc6);
}
@media (max-width: 520px) {
  body.admin-ops.portal-shell .login-actions {
    flex-direction: column;
    align-items: stretch;
  }
  body.admin-ops.portal-shell .login-actions button,
  body.admin-ops.portal-shell .login-actions .btn-link {
    width: 100%;
    text-align: center;
  }
}
body.admin-ops.portal-shell .account-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(100, 130, 170, 0.22);
}
body.admin-ops.portal-shell .account-bar > div {
  min-width: 0;
  flex: 1 1 auto;
}
body.admin-ops.portal-shell .account-bar .who {
  margin: 0 0 0.15rem;
}
body.admin-ops.portal-shell #session-meta {
  margin: 0;
}
body.admin-ops.portal-shell .account-bar button {
  flex: 0 0 auto;
  margin-top: 0 !important;
}
body.admin-ops.portal-shell #sess-table code {
  font-size: 0.78em;
}
body.admin-ops.portal-shell #sess-table td:last-child {
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
  width: 1%;
}
body.admin-ops.portal-shell .account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-top: 0.85rem;
}
body.admin-ops.portal-shell .account-actions button {
  flex: 0 1 auto;
}

/* ── Human status banners (ops + account) ── */
.status-banner,
body.admin-ops .status-banner,
body.admin-ops div.msg {
  display: block;
  font-family: inherit;
  font-size: var(--text-sm);
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  max-height: none;
  overflow: visible;
  padding: 0.65rem 0.85rem;
  margin: 0.5rem 0 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(18, 26, 43, 0.85);
  color: var(--text);
}
.status-banner.hidden,
div.msg.hidden { display: none !important; }
.status-banner.status-ok,
.status-banner.msg-ok,
div.msg.msg-ok {
  border-color: rgba(61, 214, 198, 0.45);
  background: rgba(61, 214, 198, 0.08);
  color: #b8fff6;
}
.status-banner.status-err,
.status-banner.msg-err,
div.msg.msg-err {
  border-color: rgba(255, 107, 122, 0.5);
  background: rgba(255, 107, 122, 0.1);
  color: #ffc9cf;
}
.status-banner.status-info,
div.msg.msg-info {
  border-color: rgba(143, 163, 193, 0.4);
  background: rgba(143, 163, 193, 0.08);
}
.account-hero { margin-bottom: 0.85rem; }
.account-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #42d8c8;
}
.account-top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 0.65rem;
}
.account-section-nav {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  padding: 0.45rem 0;
  background: linear-gradient(180deg, rgba(6, 10, 16, 0.96), rgba(6, 10, 16, 0.88));
  border-bottom: 1px solid rgba(100, 130, 160, 0.25);
  backdrop-filter: blur(6px);
}
.account-section-nav .sec-nav-btn {
  border: 1px solid rgba(100, 130, 160, 0.35);
  background: rgba(16, 24, 36, 0.85);
  color: #b7c6da;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  min-height: 2rem;
}
.account-section-nav .sec-nav-btn:hover {
  border-color: rgba(66, 216, 200, 0.45);
  color: #e8fffc;
}
.account-section-nav .sec-nav-btn.active {
  border-color: rgba(66, 216, 200, 0.55);
  background: rgba(42, 120, 110, 0.35);
  color: #e8fffc;
}
#install-card, #worlds-card, #settings-grid, #advanced-card {
  scroll-margin-top: 3.5rem;
}

/* ═══ Shared modern portal chrome (claim · recover · legal · account) ═══ */
body.portal-shell .portal-topnav,
body.admin-ops.portal-shell .portal-topnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin: 0 0 1rem;
  padding: 0.55rem 0.15rem 0.75rem;
  border-bottom: 1px solid rgba(100, 130, 160, 0.28);
}
body.portal-shell .portal-topnav .portal-brand,
body.admin-ops.portal-shell .portal-topnav .portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #e8f0ff;
  font-weight: 750;
  letter-spacing: 0.02em;
}
body.portal-shell .portal-topnav .portal-mark {
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 50%;
  border: 1px solid rgba(66, 216, 200, 0.5);
  color: #42d8c8;
  font-size: 0.65rem;
  font-weight: 900;
}
body.portal-shell .portal-topnav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.85rem;
  font-size: 0.86rem;
}
body.portal-shell .portal-topnav-links a {
  color: #9eb2cc;
  text-decoration: none;
}
body.portal-shell .portal-topnav-links a:hover,
body.portal-shell .portal-topnav-links a[aria-current="page"] {
  color: #9ef0e6;
}
body.portal-shell .sec-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
}
body.portal-shell .sec-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.22rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(100, 140, 170, 0.35);
  color: #a8bdd4;
  background: rgba(12, 20, 30, 0.55);
}
body.portal-shell .sec-chip.ok {
  border-color: rgba(66, 216, 200, 0.4);
  color: #9ef0e6;
}
body.portal-shell .sec-chip.warn {
  border-color: rgba(230, 180, 90, 0.45);
  color: #f0d090;
}
body.portal-shell .portal-step-list {
  margin: 0.65rem 0 0 1.1rem;
  padding: 0;
  color: #c5d2e4;
  line-height: 1.5;
  font-size: 0.92rem;
}
body.portal-shell .pw-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #8a9bb0;
}
body.portal-shell .pw-hint.ok { color: #8ceda8; }
body.portal-shell .pw-hint.bad { color: #ff9a90; }
body.portal-shell .legal-doc {
  max-width: 48rem;
}
body.portal-shell .legal-doc h1 {
  margin-top: 0.25rem;
}
body.portal-shell .legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  margin: 0 0 1rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(100, 130, 160, 0.28);
  background: rgba(8, 14, 22, 0.55);
  font-size: 0.85rem;
}
body.portal-shell .legal-toc a {
  color: #9ef0e6;
  text-decoration: none;
}
body.portal-shell .legal-toc a:hover { text-decoration: underline; }
body.portal-shell button.primary-cta {
  background: linear-gradient(180deg, #2a9d8f 0%, #1a7068 100%);
  border: 1px solid rgba(66, 216, 200, 0.55);
  color: #f0fffc;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  cursor: pointer;
  min-height: 2.7rem;
}
body.portal-shell button.primary-cta:disabled {
  opacity: 0.65;
  cursor: wait;
}
.account-hero .lead {
  margin-top: 0.35rem;
  max-width: 36rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: #b7c6da;
}
.account-hero .lead strong { color: var(--text); font-weight: 700; }
.account-h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}
/* Primary install CTA */
body.admin-ops.portal-shell button.primary-cta,
body.portal-shell button.primary-cta {
  background: linear-gradient(180deg, #2a9d8f 0%, #1a7068 100%);
  border: 1px solid rgba(66, 216, 200, 0.55);
  color: #f0fffc;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  cursor: pointer;
  min-height: 2.75rem;
}
body.admin-ops.portal-shell button.primary-cta:hover:not(:disabled) {
  filter: brightness(1.08);
}
body.admin-ops.portal-shell button.primary-cta:disabled {
  opacity: 0.65;
  cursor: wait;
}
.install-hero {
  border: 1px solid rgba(66, 216, 200, 0.35) !important;
  background:
    linear-gradient(145deg, rgba(18, 48, 44, 0.55), rgba(8, 14, 22, 0.92)) !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.install-hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}
.install-hero-head h2 {
  margin: 0;
  font-size: 1.35rem;
}
.install-step-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: rgba(66, 216, 200, 0.18);
  color: #9ef0e6;
  border: 1px solid rgba(66, 216, 200, 0.35);
}
.install-lead { max-width: 40rem; }
.install-steps {
  margin: 0.65rem 0 1rem 1.15rem;
  padding: 0;
  color: #d0dcec;
  line-height: 1.55;
  font-size: 0.95rem;
}
.install-steps li { margin: 0.25rem 0; }
.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin: 0.5rem 0 0.65rem;
}
.install-ok-note {
  border-left: 3px solid rgba(66, 216, 200, 0.5);
  padding-left: 0.65rem;
  color: #b8e8d8 !important;
}
.install-preview {
  margin: 1rem 0 0 1.1rem;
  padding: 0;
  line-height: 1.5;
}
.login-links {
  margin-top: 0.65rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.account-advanced {
  margin: 1rem 0 0.5rem;
  border: 1px solid rgba(100, 120, 150, 0.28);
  border-radius: 10px;
  padding: 0.55rem 0.85rem 0.85rem;
  background: rgba(6, 10, 16, 0.4);
}
.account-advanced > summary {
  cursor: pointer;
  font-weight: 650;
  color: #a8c0d8;
  padding: 0.35rem 0;
  list-style: none;
}
.account-advanced > summary::-webkit-details-marker { display: none; }
.account-advanced > summary::before {
  content: "▸ ";
  color: #42d8c8;
}
.account-advanced[open] > summary::before { content: "▾ "; }
.account-advanced .account-card { margin-top: 0.75rem; }
.mfa-secret {
  word-break: break-all;
  font-size: 0.88rem;
  user-select: all;
}
/* Bot honeypot — off-screen */
body.portal-shell .hp-field,
body.admin-ops .hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.account-gate .totp-field.hidden { display: none !important; }
body.admin-ops.portal-shell .legal-doc h2 {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  color: var(--text);
}
body.admin-ops.portal-shell .legal-doc p,
body.admin-ops.portal-shell .legal-doc li {
  color: #c5d0e0;
  line-height: 1.6;
}
.account-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin: 0.75rem 0;
}
@media (min-width: 720px) {
  .account-grid { grid-template-columns: 1fr 1fr; }
}
.account-card h3 { margin-top: 0; }
.account-card .muted.small { margin-top: 0; margin-bottom: 0.65rem; }
.account-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.account-actions { margin-top: 0.75rem; gap: 0.5rem; flex-wrap: wrap; }
.sso-row { margin-top: 0.75rem; }

/* Product dual-door world hub (account portal) */
.account-worlds-card { grid-column: 1 / -1; }
.world-hub {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.world-door-card {
  border: 1px solid rgba(100, 130, 170, 0.35);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  background: rgba(12, 18, 28, 0.55);
  min-width: 0;
}
.world-door-card.door-rpg { border-color: rgba(90, 180, 120, 0.45); }
.world-door-card.door-corp { border-color: rgba(100, 160, 220, 0.5); }
.world-door-card.door-lab { border-color: rgba(180, 160, 90, 0.4); }
.world-door-card.is-enrolled { box-shadow: inset 0 0 0 1px rgba(120, 200, 150, 0.25); }
.door-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin: 0 0 0.45rem;
}
.door-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(80, 100, 140, 0.35);
  margin: 0;
  line-height: 1.15;
  min-height: 1.45rem;
  box-sizing: border-box;
}
.door-rpg .door-badge { background: rgba(50, 120, 80, 0.4); color: #b8f0c8; }
.door-corp .door-badge { background: rgba(40, 90, 150, 0.45); color: #b8d8ff; }
.door-lab .door-badge { background: rgba(120, 100, 40, 0.4); color: #f0e0a0; }
.door-name { margin: 0 0 0.25rem; font-size: 1.08rem; line-height: 1.25; font-weight: 700; }
.door-slug { margin: 0 0 0.4rem; }
.door-title { margin: 0 0 0.25rem; }
.door-tagline { margin: 0.1rem 0 0.4rem; font-size: 0.94rem; line-height: 1.45; color: #c5d2e4; }
.door-terminal {
  margin: 0.35rem 0 0.15rem !important;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #a8bbd2;
}
.door-terminal code {
  font-size: 0.88em;
  padding: 0.08rem 0.3rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.28);
}
.door-status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0.2rem 0 0.45rem;
}
.door-status {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  line-height: 1.15;
  min-height: 1.4rem;
  box-sizing: border-box;
}
.door-status-enrolled { background: rgba(40, 140, 80, 0.35); color: #c8f5d4; }
.door-status-open { background: rgba(90, 100, 120, 0.35); color: #c8d0dc; }
.door-status-suspended { background: rgba(160, 60, 60, 0.4); color: #ffc8c8; }
.door-how { margin: 0.35rem 0; font-size: 0.88rem; }
.door-how summary {
  cursor: pointer;
  color: #9ab0cc;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.6rem;
}
.door-how summary::-webkit-details-marker { display: none; }
.door-how summary::before {
  content: "▸";
  font-size: 0.75rem;
  opacity: 0.8;
  line-height: 1;
}
.door-how[open] summary::before { content: "▾"; }
.door-honesty, .door-terminal { margin: 0.4rem 0 0; line-height: 1.35; }
.world-hub-foot { margin-top: 0.75rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   Looking Glass God View — world-operations shell (god-view1)
   ═══════════════════════════════════════════════════════════════════════════ */
body.admin-ops:not(.portal-shell) {
  --god-top-h: 3.5rem;
  --god-scope-h: 8.75rem;
  --god-rail-w: 248px;
  --god-bg: #070b12;
  --god-panel: #0d1421;
  --god-panel-raised: #111b2b;
  --god-line: #22304a;
  --god-line-soft: rgba(67, 87, 121, .36);
  --god-cyan: #64e3d5;
  --god-blue: #78a9ff;
  --god-violet: #a88cff;
  --god-amber: #f2c96d;
  --god-red: #ff7d8a;
  font-size: 14px;
  line-height: 1.48;
  background:
    radial-gradient(circle at 72% -20%, rgba(62, 101, 163, .14), transparent 38rem),
    linear-gradient(180deg, #080d16 0%, var(--god-bg) 34rem);
}

body.admin-ops:not(.portal-shell) .top {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: var(--god-top-h);
  padding: .58rem 1rem;
  border-bottom-color: var(--god-line);
  background: rgba(6, 10, 17, .96);
  backdrop-filter: blur(18px);
}

body.admin-ops .top-left {
  gap: .55rem;
}

body.admin-ops .brand-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(100, 227, 213, .6);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(100, 227, 213, .16), rgba(120, 169, 255, .06));
  color: var(--god-cyan);
  font: 800 .68rem/1 ui-monospace, Consolas, monospace;
  letter-spacing: .08em;
  box-shadow: inset 0 0 18px rgba(100, 227, 213, .05);
}

body.admin-ops .brand-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

body.admin-ops .brand-title {
  font-size: .98rem;
  letter-spacing: .025em;
}

body.admin-ops .brand-subtitle {
  margin-top: .2rem;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

body.admin-ops .top .badge {
  padding: .2rem .45rem;
  font-size: .6rem;
  letter-spacing: .07em;
}

body.admin-ops .iso {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .34rem .62rem;
  border: 1px solid rgba(242, 201, 109, .34);
  border-radius: 999px;
  background: rgba(242, 201, 109, .07);
  color: var(--god-amber);
}

body.admin-ops .iso-dot {
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

body.admin-ops:not(.portal-shell) .sticky-bar.card,
body.admin-ops:not(.portal-shell) .sticky-bar {
  top: var(--god-top-h);
  z-index: 50;
  min-height: var(--god-scope-h);
  max-height: none;
  padding: .62rem 1rem .58rem;
  overflow: visible;
  border-bottom: 1px solid var(--god-line);
  background: rgba(9, 14, 24, .96);
  backdrop-filter: blur(16px);
}

body.admin-ops .scope-kicker,
body.admin-ops .sidebar-kicker,
body.admin-ops .panel-kicker {
  display: block;
  margin: 0 0 .18rem;
  color: #7589aa;
  font-size: .61rem;
  font-weight: 800;
  letter-spacing: .115em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.admin-ops .sticky-bar .term-bar {
  margin-bottom: .4rem;
  align-items: flex-end;
}

body.admin-ops .sticky-bar .who {
  font-size: .93rem;
}

body.admin-ops .sticky-bar .ctx-strip {
  float: left;
  width: calc(100% - 26rem);
  margin: 0;
  padding: .32rem 0 0;
  border: 0;
  flex-wrap: wrap;
  overflow: visible;
}

body.admin-ops .sticky-bar .glass-status-bar {
  float: right;
  width: auto;
  max-width: 25rem;
  margin: .25rem 0 0;
  overflow: visible;
  justify-content: flex-end;
}

body.admin-ops .sticky-bar::after {
  content: "";
  display: block;
  clear: both;
}

body.admin-ops .sticky-bar .posture-banner {
  clear: both;
  margin: .35rem 0 0 !important;
  padding: .35rem .55rem !important;
  border-radius: 7px;
}

body.admin-ops .sticky-bar .chip {
  border-radius: 5px;
  padding: .18rem .42rem;
  font-size: .66rem;
  background: rgba(17, 27, 43, .72);
}

body.admin-ops .sticky-bar .sev-pill {
  padding: .25rem .48rem;
  border-radius: 6px;
  background: rgba(17, 27, 43, .72);
}

body.admin-ops .ops-workspace {
  display: grid;
  grid-template-columns: var(--god-rail-w) minmax(0, 1fr);
  width: 100%;
  min-height: calc(100dvh - var(--god-top-h) - var(--god-scope-h));
}

body.admin-ops .ops-sidebar {
  position: sticky;
  top: calc(var(--god-top-h) + var(--god-scope-h));
  align-self: start;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--god-top-h) - var(--god-scope-h));
  padding: 1rem .72rem .8rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--god-line);
  background: rgba(8, 13, 22, .94);
  box-sizing: border-box;
  scrollbar-width: thin;
}

body.admin-ops .sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 .4rem .6rem;
}

body.admin-ops .sidebar-kicker {
  margin: 0;
}

body.admin-ops .live-indicator {
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  color: #90a0b9;
  font-size: .63rem;
}

body.admin-ops .live-indicator > span {
  width: .4rem;
  height: .4rem;
  border-radius: 50%;
  background: var(--god-cyan);
  box-shadow: 0 0 8px rgba(100, 227, 213, .75);
}

body.admin-ops .ops-sidebar .nav-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .35rem;
  margin: 0 0 .65rem;
}

body.admin-ops .ops-sidebar .tab-search {
  width: 100%;
  max-width: none;
  min-height: 2.15rem;
  padding: .45rem .58rem;
  border-radius: 7px;
  font-size: .75rem;
  box-sizing: border-box;
}

body.admin-ops .ops-sidebar .nav-help {
  display: grid;
  place-items: center;
  min-width: 2.15rem;
  border: 1px solid var(--god-line);
  border-radius: 7px;
}

body.admin-ops .ops-sidebar .nav-help summary {
  padding: .4rem;
}

body.admin-ops .ops-sidebar .nav-hint {
  position: fixed;
  left: calc(var(--god-rail-w) - .75rem);
  z-index: 80;
  width: 18rem;
  padding: .7rem;
  border: 1px solid var(--god-line);
  border-radius: 8px;
  background: #0c1422;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .42);
}

body.admin-ops .ops-sidebar .tab-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: .75rem;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
}

body.admin-ops .ops-sidebar .tab-group {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.admin-ops .ops-sidebar .tab-group-label {
  margin: 0 .42rem .26rem;
  color: #7184a5 !important;
  font-size: .58rem;
  letter-spacing: .12em;
}

body.admin-ops .ops-sidebar .tab-group-btns {
  display: flex;
  flex-direction: column;
  gap: .12rem;
}

body.admin-ops .ops-sidebar .tab-nav .tab-btn {
  display: grid;
  grid-template-columns: 1.35rem minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-height: 2.25rem;
  margin: 0;
  padding: .42rem .5rem;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #9eacc2;
  font-size: .77rem;
  font-weight: 600;
  text-align: left;
}

body.admin-ops .ops-sidebar .tab-nav .tab-btn:hover {
  border-color: var(--god-line-soft);
  background: rgba(120, 169, 255, .06);
}

body.admin-ops .ops-sidebar .tab-nav .tab-btn.active {
  border-color: rgba(100, 227, 213, .3);
  background:
    linear-gradient(90deg, rgba(100, 227, 213, .13), rgba(100, 227, 213, .035));
  color: #e8fffc;
  box-shadow: inset 2px 0 0 var(--god-cyan);
}

body.admin-ops .nav-glyph {
  display: inline-grid;
  place-items: center;
  color: #7188aa;
  font: 700 .9rem/1 ui-monospace, Consolas, monospace;
}

body.admin-ops .tab-btn.active .nav-glyph {
  color: var(--god-cyan);
}

body.admin-ops .sidebar-boundary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: .75rem;
  padding-top: .7rem;
  border-top: 1px solid var(--god-line-soft);
}

body.admin-ops .sidebar-boundary span {
  padding: .28rem .16rem;
  border: 1px solid var(--god-line-soft);
  color: #70819e;
  font-size: .48rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-align: center;
}

body.admin-ops .sidebar-boundary span:nth-child(1) { border-color: rgba(120, 169, 255, .26); }
body.admin-ops .sidebar-boundary span:nth-child(2) { border-color: rgba(242, 201, 109, .28); }
body.admin-ops .sidebar-boundary span:nth-child(3) { border-color: rgba(168, 140, 255, .3); }

body.admin-ops .ops-canvas {
  min-width: 0;
  padding: 0;
}

body.admin-ops .ops-canvas .tab-panel.card {
  width: auto;
  margin: 1rem clamp(.8rem, 1.8vw, 1.6rem) 2rem;
  padding: clamp(.9rem, 1.5vw, 1.25rem);
  border: 1px solid var(--god-line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(17, 27, 43, .92), rgba(12, 19, 31, .96));
  box-shadow: 0 14px 40px rgba(0, 0, 0, .16);
}

body.admin-ops .ops-canvas .panel-head {
  min-height: 2.9rem;
  margin-bottom: .75rem;
  padding-bottom: .65rem;
}

body.admin-ops .ops-canvas .panel-head h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: .005em;
}

body.admin-ops .ops-canvas h3 {
  font-size: .96rem;
}

body.admin-ops .ops-canvas .small {
  font-size: .78rem;
}

body.admin-ops .ops-canvas .ctx-strip {
  flex-wrap: wrap;
  overflow: visible;
  gap: .35rem;
  padding: .5rem 0 .65rem;
  border-top: 0;
}

body.admin-ops .ops-canvas .ctx-strip .chip {
  padding: .26rem .46rem;
  border-radius: 5px;
  font-size: .68rem;
  background: rgba(5, 10, 18, .38);
}

body.admin-ops #tab-overview #ov-dash,
body.admin-ops #tab-overview #quick-grid,
body.admin-ops #tab-overview .ov-realm-line {
  display: none;
}

body.admin-ops .ops-canvas .health-cluster,
body.admin-ops .ops-canvas .form-block,
body.admin-ops .ops-canvas .stat-card,
body.admin-ops .ops-canvas .chart-card {
  border-color: var(--god-line-soft);
  background: rgba(6, 11, 19, .42);
}

body.admin-ops .workspace-local-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: -.15rem 0 .8rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--god-line-soft);
}

body.admin-ops .workspace-local-nav a,
body.admin-ops .workspace-local-nav button {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  margin: 0;
  padding: .35rem .62rem;
  border: 1px solid var(--god-line-soft);
  border-radius: 7px;
  background: rgba(7, 12, 21, .52);
  color: #aab8cd;
  font-size: .72rem;
  font-weight: 650;
  text-decoration: none;
}

body.admin-ops .workspace-local-nav a:hover,
body.admin-ops .workspace-local-nav button:hover {
  border-color: rgba(100, 227, 213, .42);
  color: var(--god-cyan);
}

body.admin-ops .entity-boundary-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem 1rem;
  margin: 0 0 .85rem;
  padding: .55rem .7rem;
  border: 1px solid rgba(168, 140, 255, .22);
  border-radius: 8px;
  background: rgba(168, 140, 255, .045);
  color: #91a1b9;
  font-size: .7rem;
}

body.admin-ops .entity-boundary-note strong {
  color: #c7bbff;
  font-size: .64rem;
  letter-spacing: .09em;
  text-transform: uppercase;
}

body.admin-ops .entity-boundary-note span {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
}

body.admin-ops .entity-dot {
  display: inline-block;
  width: .48rem;
  height: .48rem;
  border-radius: 50%;
}

body.admin-ops .entity-dot.denizen { background: var(--god-cyan); }
body.admin-ops .entity-dot.human { background: var(--god-amber); }
body.admin-ops .entity-dot.service { background: var(--god-violet); }

body.admin-ops #denizen-census,
body.admin-ops #denizen-dossier-zone,
body.admin-ops #denizen-life {
  scroll-margin-top: calc(var(--god-top-h) + var(--god-scope-h) + 1rem);
}

body.admin-ops[data-tab="tab-map"] .ops-canvas #tab-map.card {
  margin: .65rem .8rem 1rem;
}

body.admin-ops[data-tab="tab-map"] .sticky-bar .ctx-strip,
body.admin-ops[data-tab="tab-map"] .sticky-bar .glass-status-bar {
  display: flex;
}

body.admin-ops[data-tab="tab-map"] .sticky-bar .posture-banner {
  display: block;
}

body.admin-ops[data-tab="tab-map"] .map-viewport {
  height: clamp(360px, calc(100dvh - var(--god-top-h) - var(--god-scope-h) - 9.5rem), 74dvh);
}

@media (max-width: 1100px) {
  body.admin-ops:not(.portal-shell) {
    --god-rail-w: 218px;
  }

  body.admin-ops .sticky-bar .ctx-strip {
    width: 100%;
  }

  body.admin-ops .sticky-bar .glass-status-bar {
    float: left;
    justify-content: flex-start;
    max-width: 100%;
  }
}

@media (max-width: 820px) {
  body.admin-ops:not(.portal-shell) {
    --god-scope-h: 9.5rem;
  }

  body.admin-ops .ops-workspace {
    display: block;
  }

  body.admin-ops .ops-sidebar {
    position: sticky;
    top: calc(var(--god-top-h) + var(--god-scope-h));
    z-index: 40;
    display: block;
    width: 100%;
    height: auto;
    padding: .45rem .6rem;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--god-line);
  }

  body.admin-ops .sidebar-head,
  body.admin-ops .sidebar-boundary,
  body.admin-ops .ops-sidebar .nav-help {
    display: none;
  }

  body.admin-ops .ops-sidebar .nav-tools {
    display: block;
    float: left;
    width: 11rem;
    margin: 0 .5rem 0 0;
  }

  body.admin-ops .ops-sidebar .tab-search {
    min-height: 2rem;
  }

  body.admin-ops .ops-sidebar .tab-nav {
    flex-direction: row;
    gap: .35rem;
    width: max-content;
  }

  body.admin-ops .ops-sidebar .tab-group {
    display: flex;
    align-items: center;
    width: auto;
  }

  body.admin-ops .ops-sidebar .tab-group-label {
    display: none;
  }

  body.admin-ops .ops-sidebar .tab-group-btns {
    flex-direction: row;
  }

  body.admin-ops .ops-sidebar .tab-nav .tab-btn {
    display: inline-flex;
    width: auto;
    min-height: 2rem;
    padding: .35rem .55rem;
  }

  body.admin-ops .ops-sidebar .nav-glyph {
    margin-right: .35rem;
  }

  body.admin-ops .ops-canvas .tab-panel.card {
    margin: .65rem .55rem 1.5rem;
  }
}

@media (max-width: 560px) {
  body.admin-ops:not(.portal-shell) {
    --god-top-h: 3.2rem;
    --god-scope-h: 10rem;
  }

  body.admin-ops .top .badge.soft,
  body.admin-ops .top .muted-badge,
  body.admin-ops .brand-subtitle {
    display: none;
  }

  body.admin-ops .iso {
    padding: .3rem .45rem;
    font-size: .58rem;
  }

  body.admin-ops:not(.portal-shell) .sticky-bar.card,
  body.admin-ops:not(.portal-shell) .sticky-bar {
    padding: .45rem .55rem;
  }

  body.admin-ops .sticky-bar .term-bar {
    align-items: flex-start;
  }

  body.admin-ops .sticky-bar .ctx-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  body.admin-ops .sticky-bar .glass-status-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  body.admin-ops .entity-boundary-note {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Mobile support guardrail — keep every Host page usable at phone widths.
   Applies after portal/admin specializations so it can catch late desktop drift. */
@media (max-width: 640px) {
  html,
  body {
    max-width: 100%;
    overflow-x: clip;
  }

  body.portal-shell main.shell,
  main.shell {
    width: min(100% - 1rem, var(--portal-max));
    margin: 0.75rem auto 1.25rem;
    padding: 1rem 0.85rem;
  }

  body.portal-shell main.shell.wide {
    width: min(100% - 1rem, var(--portal-max-wide));
  }

  body.portal-shell h1 {
    font-size: clamp(1.18rem, 1rem + 4vw, 1.55rem);
  }

  body.portal-shell h2 {
    font-size: clamp(1.02rem, 0.94rem + 2.4vw, 1.22rem);
  }

  body.portal-shell p,
  body.portal-shell li,
  body.portal-shell label,
  body.portal-shell .small {
    overflow-wrap: anywhere;
  }

  body.portal-shell .row,
  body.portal-shell .actions,
  body.portal-shell .term-bar {
    align-items: stretch;
    flex-direction: column;
  }

  body.portal-shell button,
  body.portal-shell .btn-link,
  body.portal-shell input,
  body.portal-shell select,
  body.portal-shell textarea {
    width: 100%;
    max-width: 100%;
  }

  .account-grid,
  .grid,
  .grid.secondary,
  .health-grid,
  .inhabitants-grid,
  .quick-grid,
  #ov-dash,
  #sim-stats,
  .chart-grid {
    grid-template-columns: 1fr !important;
  }

  .table-wrap,
  .out,
  pre,
  table,
  .ctx-strip,
  .glass-status-bar {
    max-width: 100%;
  }

  body.admin-ops:not(.portal-shell) {
    --god-top-h: 3.4rem;
    --god-scope-h: 10rem;
    font-size: 0.86rem;
  }

  body.admin-ops .top {
    position: sticky;
    top: 0;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-height: 0;
    padding: 0.45rem 0.55rem;
  }

  body.admin-ops .top-left,
  body.admin-ops .actions,
  body.admin-ops .term-bar {
    min-width: 0;
    width: 100%;
  }

  body.admin-ops .brand-title {
    font-size: 0.9rem;
  }

  body.admin-ops .sticky-bar,
  body.admin-ops .sticky-bar.card {
    position: static;
    margin: 0.5rem;
    padding: 0.5rem;
  }

  body.admin-ops .sticky-bar .ctx-strip,
  body.admin-ops .sticky-bar .glass-status-bar,
  body.admin-ops .ops-sidebar,
  body.admin-ops .tab-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.admin-ops .ops-sidebar {
    position: sticky;
    top: 0;
    padding: 0.4rem 0.5rem;
  }

  body.admin-ops .ops-sidebar .nav-tools {
    width: min(9rem, 45vw);
  }

  body.admin-ops .ops-canvas .tab-panel.card,
  body.admin-ops .card {
    margin: 0.5rem;
    padding: 0.65rem;
    border-radius: 10px;
  }

  body.admin-ops .world-label,
  body.admin-ops .world-select,
  body.admin-ops .inline {
    width: 100%;
    min-width: 0;
  }

  body.admin-ops .map-viewport,
  body.admin-ops[data-tab="tab-map"] .map-viewport {
    height: clamp(240px, 58svh, 520px) !important;
  }
}

@media (max-width: 420px) {
  body.portal-shell main.shell,
  main.shell {
    width: min(100% - 0.75rem, var(--portal-max));
    padding: 0.85rem 0.7rem;
  }

  body.admin-ops .top .brand-mark {
    width: 1.7rem;
    height: 1.7rem;
  }

  body.admin-ops .nav-glyph,
  body.admin-ops .top .badge {
    display: none;
  }

  body.admin-ops .ops-sidebar .tab-nav .tab-btn {
    min-height: 1.85rem;
    padding: 0.3rem 0.42rem;
    font-size: 0.72rem;
  }
}

/* Denizen Watch / World Map repair — final cascade authority. */
body.admin-ops .workspace-status {
  position: sticky;
  top: calc(var(--god-top-h) + var(--god-scope-h) + .35rem);
  z-index: 45;
  margin: .45rem clamp(.8rem, 1.8vw, 1.6rem) -.4rem;
  padding: .45rem .65rem;
  border: 1px solid var(--god-line);
  border-radius: 8px;
  background: rgba(11, 19, 32, .96);
  color: var(--muted);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
}
body.admin-ops .workspace-status.err {
  border-color: rgba(255, 125, 138, .5);
  color: #ffadb5;
}
body.admin-ops .workspace-status.info {
  border-color: rgba(100, 227, 213, .3);
  color: var(--god-cyan);
}
body.admin-ops #denizen-filters #denizen-page-status {
  margin-left: auto;
}
body.admin-ops #denizen-dossier-zone .panel-head .row {
  justify-content: flex-end;
  flex-wrap: wrap;
}
body.admin-ops #dossier-job-select {
  max-width: min(28rem, 45vw);
}
body.admin-ops .dossier-surface {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  min-height: 22rem;
  padding: .75rem;
  border: 1px solid var(--god-line-soft);
  border-radius: 9px;
  background: rgba(5, 10, 18, .58);
}
body.admin-ops .dossier-card {
  min-width: 0;
  padding: .8rem;
  border: 1px solid var(--god-line-soft);
  border-radius: 8px;
  background: rgba(13, 22, 36, .72);
}
body.admin-ops .dossier-card h5 {
  margin: 0 0 .55rem;
  color: #dce7f5;
  font-size: .83rem;
}
body.admin-ops .dossier-card p {
  margin: .35rem 0 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
body.admin-ops .dossier-summary {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
}
body.admin-ops .dossier-summary h5 {
  margin-bottom: .2rem;
  font-size: 1rem;
}
body.admin-ops .dossier-status {
  padding: .3rem .55rem;
  border: 1px solid rgba(100, 227, 213, .32);
  border-radius: 999px;
  color: var(--god-cyan);
  font-size: .7rem;
  font-weight: 700;
  text-transform: capitalize;
}
body.admin-ops .dossier-facts {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
}
body.admin-ops .dossier-fact {
  display: flex;
  min-width: 0;
  padding: .55rem .65rem;
  flex-direction: column;
  border: 1px solid var(--god-line-soft);
  border-radius: 7px;
  background: rgba(7, 13, 23, .58);
}
body.admin-ops .dossier-fact strong {
  margin-top: .2rem;
  overflow: hidden;
  color: #d9e5f3;
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.admin-ops .dossier-label,
body.admin-ops .dossier-message-meta {
  color: #8191a7;
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
body.admin-ops .dossier-intent {
  color: var(--god-cyan);
  font-size: .82rem;
}
body.admin-ops .ocean-grid {
  display: grid;
  gap: .42rem;
  margin-top: .65rem;
}
body.admin-ops .ocean-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1fr) minmax(5rem, 1.4fr) 2rem;
  align-items: center;
  gap: .5rem;
  color: #b8c5d7;
  font-size: .68rem;
}
body.admin-ops .ocean-row meter {
  width: 100%;
  accent-color: var(--god-cyan);
}
body.admin-ops .dossier-job {
  display: flex;
  gap: .2rem;
  padding: .55rem 0;
  flex-direction: column;
  border-top: 1px solid var(--god-line-soft);
}
body.admin-ops .dossier-job:first-of-type {
  border-top: 0;
}
body.admin-ops .dossier-conversations {
  grid-column: 1 / -1;
}
body.admin-ops .dossier-message {
  width: fit-content;
  max-width: min(86%, 42rem);
  margin: .55rem 0;
  padding: .58rem .7rem;
  border: 1px solid var(--god-line-soft);
  border-radius: 8px 8px 8px 2px;
  background: rgba(5, 12, 22, .75);
}
body.admin-ops .dossier-message.from-player {
  margin-left: auto;
  border-color: rgba(100, 227, 213, .28);
  border-radius: 8px 8px 2px 8px;
  background: rgba(48, 128, 123, .12);
}
body.admin-ops .dossier-message p {
  white-space: pre-wrap;
}
body.admin-ops .dossier-empty {
  display: flex;
  grid-column: 1 / -1;
  min-height: 12rem;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  flex-direction: column;
  color: var(--muted);
  text-align: center;
}
body.admin-ops .dossier-empty strong {
  color: #dce7f5;
}
body.admin-ops .dossier-empty.error strong {
  color: #ffadb5;
}
body.admin-ops .dossier-empty-line {
  color: var(--muted);
  font-style: italic;
}
body.admin-ops .dossier-comms {
  white-space: pre-line;
}
body.admin-ops .dossier-compose {
  margin-top: .75rem;
  padding-top: .65rem;
  border-top: 1px solid var(--god-line-soft);
}
body.admin-ops .dossier-compose > label {
  display: block;
  margin-bottom: .4rem;
  color: #aebdd0;
  font-size: .7rem;
  font-weight: 650;
}
body.admin-ops .dossier-compose #dossier-message-reply {
  flex: 1 1 20rem;
}
body.admin-ops .dossier-reply-options {
  margin-top: .4rem;
}
body.admin-ops #denizen-table-tbody tr.selected td {
  background: rgba(100, 227, 213, .08);
}
body.admin-ops #denizen-table-tbody tr.selected td:first-child {
  box-shadow: inset 3px 0 var(--god-cyan);
}
body.admin-ops #world-map-plate,
body.admin-ops #world-map-follow,
body.admin-ops #world-map-scenario,
body.admin-ops #world-map-truth {
  scroll-margin-top: calc(var(--god-top-h) + var(--god-scope-h) + 1rem);
}

@media (min-width: 821px) {
  body.admin-ops[data-tab="tab-map"] {
    --god-scope-h: 5.25rem;
  }
  body.admin-ops[data-tab="tab-map"] .sticky-bar .ctx-strip,
  body.admin-ops[data-tab="tab-map"] .sticky-bar .glass-status-bar,
  body.admin-ops[data-tab="tab-map"] .sticky-bar .posture-banner {
    display: none !important;
  }
  body.admin-ops[data-tab="tab-map"] .sticky-bar.card,
  body.admin-ops[data-tab="tab-map"] .sticky-bar {
    min-height: var(--god-scope-h);
    padding-bottom: .35rem;
  }
}

@media (max-width: 640px) {
  body.admin-ops #denizen-filters #denizen-page-status {
    margin-left: 0;
  }
  body.admin-ops #dossier-job-select {
    max-width: 100%;
  }
  body.admin-ops .dossier-surface,
  body.admin-ops .dossier-facts {
    grid-template-columns: 1fr;
  }
  body.admin-ops .dossier-summary,
  body.admin-ops .dossier-conversations,
  body.admin-ops .dossier-facts {
    grid-column: 1;
  }
  body.admin-ops .workspace-status {
    position: static;
    margin: .5rem;
  }
}
