/* Network hosts (SotB Ch.3): shared map (net_host_core.js), Generators → Server builder
   (net_host_builder.js) and the live-table host card, map popup and twist popup (net_host_table.js).
   Effects respect html[data-motion] like the rest of the site. */
:root {
  --nh-barrier: #38bdf8;
  --nh-sentry: #fbbf24;
  --nh-gate: #c084fc;
  --nh-lethal: #f87171;
  --nh-open: #4ade80;
  --nh-line: rgba(103, 232, 249, 0.28);
  --nh-glow: rgba(45, 212, 191, 0.35);
}

/* ── Map ── */
.nh-map {
  position: relative;
  font-size: 0.86rem;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border-soft, #1e2d45);
  background:
    linear-gradient(rgba(45, 212, 191, 0.045) 1px, transparent 1px) 0 0 / 100% 18px,
    linear-gradient(90deg, rgba(45, 212, 191, 0.035) 1px, transparent 1px) 0 0 / 18px 100%,
    radial-gradient(120% 80% at 0% 0%, rgba(45, 212, 191, 0.08), transparent 60%),
    var(--bg-deep, #070b12);
  overflow-x: auto;
  min-width: 0;
}
.nh-map.alert-1 { border-color: rgba(251, 191, 36, 0.5); }
.nh-map.alert-2 { border-color: rgba(248, 113, 113, 0.65); box-shadow: inset 0 0 24px rgba(248, 113, 113, 0.12); }
.nh-map.is-down { filter: grayscale(0.7); }
.nh-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--link, #67e8f9);
  padding-left: 2px;
}
.nh-link-glyph { font-size: 1.05rem; }
.nh-core {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 6px 0 2px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--accent, #2dd4bf);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.16), rgba(45, 212, 191, 0.03));
  box-shadow: 0 0 14px var(--nh-glow);
  position: relative;
}
.nh-core::before {
  content: "";
  position: absolute;
  left: 14px;
  top: -8px;
  height: 8px;
  border-left: 1px dashed var(--nh-line);
}
.nh-core[role="button"] { cursor: pointer; }
.nh-core.is-selected { outline: 2px solid var(--gold, #fbbf24); outline-offset: 2px; }
.nh-core-name { font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; font-size: 0.86rem; }
.nh-core-diff { font-size: 0.78rem; color: var(--text-muted); }
.nh-dice { color: #a855f7; letter-spacing: 1px; font-size: 0.82rem; }
.nh-dice-none { color: var(--text-muted); }
.nh-locked { margin: 10px 0 0 22px; color: var(--text-muted); font-style: italic; }

.nh-tree { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; }
.nh-tree.nh-root { padding-left: 14px; }
.nh-tree::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 18px;
  border-left: 1px solid var(--nh-line);
}
.nh-tree.nh-root::before { left: 14px; }
.nh-branch { position: relative; padding-top: 6px; }
.nh-branch::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 22px;
  width: 13px;
  border-top: 1px solid var(--nh-line);
}
.nh-tree.nh-root > .nh-branch::before { left: 0; width: 10px; }
.nh-tree.nh-root > .nh-branch { padding-left: 12px; }
.nh-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.nh-ice-stack { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0; }
.nh-ice-stack.is-empty { min-width: 0; }
.nh-noice { font-size: 0.7rem; color: var(--text-dim, #5c708a); font-family: var(--mono); padding: 0 4px; }
.nh-ice-link { width: 8px; border-top: 1px solid var(--nh-line); display: inline-block; }

.nh-ice {
  --c: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: inherit;
  font-size: 0.74rem;
  line-height: 1.1;
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid var(--c);
  color: var(--text);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  white-space: nowrap;
  max-width: 100%;
}
button.nh-ice { cursor: pointer; }
button.nh-ice:hover { background: color-mix(in srgb, var(--c) 26%, transparent); }
.nh-ice.t-barrier { --c: var(--nh-barrier); }
.nh-ice.t-sentry { --c: var(--nh-sentry); }
.nh-ice.t-code-gate { --c: var(--nh-gate); }
.nh-ice.is-unknown { --c: #94a3b8; border-style: dashed; }
.nh-ice.is-lethal { box-shadow: 0 0 0 1px var(--nh-lethal), 0 0 10px rgba(248, 113, 113, 0.45); }
.nh-ice.is-selected { outline: 2px solid var(--gold, #fbbf24); outline-offset: 1px; }
.nh-ice-glyph { color: var(--c); font-size: 0.8rem; }
.nh-ice-name { overflow: hidden; text-overflow: ellipsis; max-width: 12em; }
.nh-ice-str {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--c);
  border-left: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  padding-left: 4px;
}
.nh-ice-state { font-family: var(--mono); font-size: 0.66rem; color: var(--text-muted); }
.nh-ice.s-down { opacity: 0.62; }
.nh-ice.s-down .nh-ice-name { text-decoration: line-through; }
.nh-ice.s-off { opacity: 0.45; filter: grayscale(1); }
.nh-ice.s-gone { opacity: 0.35; filter: grayscale(1); }
.nh-ice.s-gone .nh-ice-name { text-decoration: line-through; }

.nh-node {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  font: inherit;
  text-align: left;
  color: var(--text);
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--border, #2a3d5c);
  background: var(--bg-card, #152033);
  min-width: 0;
  max-width: 100%;
}
button.nh-node { cursor: pointer; }
button.nh-node:hover { border-color: var(--accent); }
.nh-node.k-gate {
  border-style: double;
  border-width: 3px;
  border-color: rgba(56, 189, 248, 0.45);
  background: repeating-linear-gradient(135deg, rgba(56, 189, 248, 0.07) 0 6px, transparent 6px 12px), var(--bg-card);
}
.nh-node.is-masked { border-style: dashed; color: var(--text-muted); font-style: italic; }
.nh-node.is-hidden-gm { border-style: dashed; border-color: rgba(251, 191, 36, 0.55); }
.nh-node.is-clear .nh-node-icon { color: var(--accent); }
.nh-node.is-open {
  border-color: var(--nh-open);
  background: linear-gradient(90deg, rgba(74, 222, 128, 0.18), rgba(74, 222, 128, 0.04)), var(--bg-card);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.28);
}
.nh-node.is-selected { outline: 2px solid var(--gold, #fbbf24); outline-offset: 2px; }
.nh-node-icon { color: var(--link); font-size: 0.9rem; }
.nh-node.is-open .nh-node-icon { color: var(--nh-open); }
.nh-node-name { font-weight: 600; overflow-wrap: anywhere; }
.nh-node-val { color: var(--gold, #fbbf24); font-size: 0.6rem; letter-spacing: 1px; }
.nh-tag-hidden {
  display: inline-block;
  font-size: 0.62rem;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px dashed rgba(251, 191, 36, 0.7);
  color: var(--gold, #fbbf24);
  font-style: normal;
}
.nh-runners { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.nh-runner-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  font-style: normal;
  padding: 1px 7px;
  border-radius: 999px;
  color: #04131a;
  background: var(--accent, #2dd4bf);
  box-shadow: 0 0 8px var(--nh-glow);
}
.nh-runner-pill.is-locked { background: var(--nh-lethal); }
.nh-trace-n {
  display: inline-grid;
  place-items: center;
  min-width: 14px;
  height: 14px;
  border-radius: 50%;
  font-size: 0.6rem;
  background: #7f1d1d;
  color: #fff;
}
html[data-motion="full"] .nh-runner-pill { animation: nh-blink 2.4s ease-in-out infinite; }
@keyframes nh-blink {
  0%, 100% { box-shadow: 0 0 6px var(--nh-glow); }
  50% { box-shadow: 0 0 14px rgba(45, 212, 191, 0.7); }
}

.nh-pips { display: inline-flex; gap: 3px; vertical-align: middle; }
.nh-pips i { width: 8px; height: 8px; border-radius: 2px; border: 1px solid var(--text-muted); }
.nh-pips.is-dmg i.on { background: var(--gold, #fbbf24); border-color: var(--gold, #fbbf24); }
.nh-pips.is-trace i { border-radius: 50%; border-color: var(--nh-lethal); }
.nh-pips.is-trace i.on { background: var(--nh-lethal); }
.nh-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 2px; background: var(--text-muted); }
.nh-dot.t-barrier { background: var(--nh-barrier); }
.nh-dot.t-sentry { background: var(--nh-sentry); }
.nh-dot.t-code-gate { background: var(--nh-gate); }
.nh-dot.is-lethal { box-shadow: 0 0 0 1px var(--nh-lethal); }

.nh-alert-chip {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--accent);
  color: var(--accent);
}
.nh-alert-chip.a-1 { border-color: var(--nh-sentry); color: var(--nh-sentry); }
.nh-alert-chip.a-2 { border-color: var(--nh-lethal); color: #fff; background: rgba(248, 113, 113, 0.35); }
html[data-motion="full"] .nh-alert-chip.a-2 { animation: nh-alarm 1s steps(2, jump-none) infinite; }
@keyframes nh-alarm {
  50% { background: rgba(248, 113, 113, 0.08); }
}

/* Shared small buttons in builder / panel */
.nhb .btn-mini, .nh-panel .btn-mini { min-height: 26px; padding: 2px 8px; font-size: 0.76rem; }
.nhb .btn-danger-quiet, .nh-panel .btn-danger-quiet { color: var(--text-muted); }
.nhb .btn-danger-quiet:hover, .nh-panel .btn-danger-quiet:hover { border-color: var(--danger); color: var(--danger); }
.nh-panel .btn.is-on { border-color: var(--accent); color: var(--accent); background: rgba(45, 212, 191, 0.12); }

/* ── Builder (Generators → Server builder) ── */
.gen-panel-intro { margin: 0 0 14px; max-width: 70ch; }
.nhb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.nhb-main, .nhb-side { display: grid; gap: 14px; min-width: 0; }
.nhb-side { position: sticky; top: calc(var(--header-h, 56px) + 12px); max-height: calc(100vh - var(--header-h, 56px) - 24px); overflow-y: auto; padding-right: 2px; }
.nhb .card { margin: 0; }
.nhb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); gap: 8px 10px; }
.nhb-grid label, .nhb-block { display: flex; flex-direction: column; gap: 3px; font-size: 0.8rem; color: var(--text-muted); min-width: 0; }
.nhb-block { margin-top: 8px; }
.nhb-wide { grid-column: 1 / -1; }
.nhb-grid input, .nhb-grid select, .nhb-block textarea, .nhb-block input { width: 100%; min-width: 0; box-sizing: border-box; }
.nhb-check { flex-direction: row !important; align-items: center; gap: 6px !important; }
.nhb-check input { width: auto !important; }
.nhb-seed { display: flex; gap: 4px; }
.nhb-seed input { flex: 1; font-family: var(--mono); text-transform: uppercase; }
.nhb-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.nhb-actions select { max-width: 100%; }
.nhb-theme-blurb { margin: 8px 0 0; }
.nhb-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.nhb-head .card-title { margin: 0; }
.nhb-head-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.nhb-sysop { margin: 10px 0 0; border: 1px solid var(--border-soft); border-radius: 8px; padding: 8px 10px 10px; }
.nhb-sysop legend { font-size: 0.8rem; color: var(--text-muted); padding: 0 4px; }
.nhb-sysop .hint { margin: 6px 0 0; }

.nhb-node {
  margin: 0 0 6px calc(var(--depth, 0) * 18px);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--nh-line);
  border-radius: 8px;
  background: var(--bg-panel, #111a28);
}
.nhb-node.k-gate { border-left-color: var(--nh-barrier); }
.nhb-node.is-selected { border-color: var(--gold, #fbbf24); }
.nhb-node[open] { background: var(--bg-card); }
.nhb-node-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 7px 10px; cursor: pointer; list-style: none; }
.nhb-node-sum::-webkit-details-marker { display: none; }
.nhb-node-sum::after { content: "▸"; margin-left: auto; color: var(--text-muted); }
.nhb-node[open] > .nhb-node-sum::after { content: "▾"; }
.nhb-node-icon { color: var(--link); }
.nhb-node-title { font-weight: 600; overflow-wrap: anywhere; }
.nhb-node-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; font-size: 0.76rem; }
.nhb-node-body { padding: 4px 10px 10px; }
.nhb-ice-title { margin: 10px 0 4px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.nhb-ice-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 6px; }
.nhb-ice-row { border: 1px solid var(--border-soft); border-radius: 6px; padding: 6px 8px; background: var(--bg-deep); }
.nhb-ice-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nhb-ice-n { font-family: var(--mono); font-size: 0.72rem; color: var(--text-muted); }
.nhb-row-tools { margin-left: auto; display: inline-flex; gap: 3px; }
.nhb-ice-text { margin: 5px 0 0; font-size: 0.78rem; color: var(--text-muted); }
.nhb-ice-custom { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); gap: 6px 8px; margin-top: 6px; }
.nhb-ice-custom label { display: flex; flex-direction: column; gap: 2px; font-size: 0.76rem; color: var(--text-muted); }
.nhb-ice-custom .nhb-block { grid-column: 1 / -1; margin: 0; }
.nhb-add-ice { width: 100%; max-width: 420px; }
.nhb-node-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.nhb-twist { border: 1px solid var(--border-soft); border-left: 3px solid var(--gold, #fbbf24); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }

.nhb-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; }
.nhb-band { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; border: 1px solid currentColor; }
.nhb-band.b-0 { color: var(--accent); }
.nhb-band.b-1 { color: var(--link); }
.nhb-band.b-2 { color: var(--nh-sentry); }
.nhb-band.b-3, .nhb-band.b-4 { color: var(--nh-lethal); }
.nhb-meter { height: 8px; border-radius: 4px; background: var(--bg-deep); border: 1px solid var(--border-soft); overflow: hidden; }
.nhb-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--nh-sentry), var(--nh-lethal)); }
.nhb-meter-cap { margin: 4px 0 8px; font-size: 0.82rem; }
.nhb-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; margin: 0 0 10px; font-size: 0.82rem; }
.nhb-facts dt { color: var(--text-muted); }
.nhb-facts dd { margin: 0; }
.nhb-runsheet { width: 100%; font-size: 0.8rem; }
.nhb-runsheet th { text-align: left; font-weight: 600; color: var(--text-muted); }
.nhb-status { min-height: 1.2em; margin: 8px 0 0; font-size: 0.82rem; color: var(--accent); }
.nhb-status.is-bad { color: var(--danger); }
.nhb-send-box, .nhb-import-box { margin-top: 10px; display: grid; gap: 8px; padding: 10px; border: 1px solid var(--border-soft); border-radius: 8px; }
.nhb-send-box[hidden], .nhb-import-box[hidden] { display: none; }
.nhb-send-box label { display: flex; flex-direction: column; gap: 3px; font-size: 0.8rem; color: var(--text-muted); }
.nhb-sub-title { margin: 14px 0 6px; font-size: 0.9rem; }
.nhb-saved-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.nhb-saved-list li { display: flex; gap: 4px; }
.nhb-saved-load {
  flex: 1;
  min-width: 0;
  text-align: left;
  font: inherit;
  font-size: 0.82rem;
  color: var(--text);
  background: var(--bg-deep);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 5px 8px;
  cursor: pointer;
}
.nhb-saved-load:hover { border-color: var(--accent); }

@media (max-width: 1100px) {
  .nhb { grid-template-columns: minmax(0, 1fr); }
  .nhb-side { position: static; max-height: none; overflow: visible; order: -1; }
  .nhb-side .nhb-analysis, .nhb-side .nhb-export { order: 2; }
}
@media (max-width: 720px) {
  .nhb-node { margin-left: calc(var(--depth, 0) * 10px); }
  .nh-ice-name { max-width: 8.5em; }
}

/* ── Live table: host card ── */
.tracker-card.nh-card {
  cursor: pointer;
  border-color: rgba(103, 232, 249, 0.55);
  background:
    linear-gradient(rgba(45, 212, 191, 0.05) 1px, transparent 1px) 0 0 / 100% 14px,
    linear-gradient(160deg, rgba(56, 189, 248, 0.12), transparent 55%),
    var(--bg-card);
}
.tracker-card.nh-card:hover, .tracker-card.nh-card:focus-visible { border-color: var(--accent); box-shadow: 0 0 16px var(--nh-glow); outline: none; }
.tracker-card.nh-card.is-prep { border-style: dashed; opacity: 0.8; }
.tracker-card.nh-card.alert-2 { border-color: rgba(248, 113, 113, 0.75); }
.tracker-card.nh-card.is-crashed { filter: grayscale(0.7); }
.nh-card-main { padding: 10px 12px; display: grid; gap: 4px; }
.nh-card-top { display: flex; align-items: center; gap: 6px; }
.nh-card-top .nh-alert-chip { margin-left: auto; }
.nh-card-kicker { font-family: var(--mono); font-size: 0.7rem; color: var(--link); letter-spacing: 0.08em; text-transform: uppercase; }
.nh-card-name { font-weight: 700; font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.nh-card-owner { font-size: 0.76rem; color: var(--text-muted); }
.nh-card-diff { font-size: 0.78rem; color: var(--text-muted); }
.nh-card-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 0.78rem; color: var(--text-muted); }
.nh-card-stats b { color: var(--text); }
.nh-card-runners { display: flex; flex-wrap: wrap; gap: 3px; }

/* ── Live table: map popup ── */
.nh-panel { position: fixed; inset: 0; z-index: 345; display: grid; place-items: center; padding: 16px; }
.nh-panel[hidden] { display: none; }
.nh-panel-scrim { position: absolute; inset: 0; background: rgba(2, 6, 12, 0.72); backdrop-filter: blur(2px); }
.nh-panel-card {
  position: relative;
  width: min(1180px, 100%);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid rgba(103, 232, 249, 0.45);
  background: var(--bg-panel, #111a28);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(45, 212, 191, 0.12);
  overflow: hidden;
}
#nh-panel-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
html[data-motion="full"] .nh-panel:not([hidden]) .nh-panel-card { animation: nh-boot 0.26s ease-out; }
@keyframes nh-boot {
  from { opacity: 0; transform: scale(0.97); clip-path: inset(0 0 100% 0); }
  to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}
html[data-motion="reduced"] .nh-panel:not([hidden]) .nh-panel-card { animation: nh-fade 0.15s ease-out; }
@keyframes nh-fade { from { opacity: 0; } }
body.nh-panel-open { overflow: hidden; }
.nh-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.12), transparent 70%);
}
.nh-panel-titles { flex: 1; min-width: 200px; }
.nh-panel-titles h3 { margin: 2px 0; font-size: 1.15rem; }
.nh-panel-titles small { color: var(--text-muted); font-size: 0.78rem; }
.nh-panel-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-muted); }
.nh-panel-x { min-width: 40px; }
.nh-gmbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  padding: 8px 14px;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(251, 191, 36, 0.05);
}
.nh-toggle { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.nh-stepper { display: inline-flex; align-items: center; gap: 4px; }
.nh-stepper b { min-width: 1.2em; text-align: center; }
.nh-seg { display: inline-flex; gap: 2px; }
.nh-seg .btn { min-height: 28px; padding: 2px 8px; font-size: 0.76rem; }
.nh-panel-scroll { overflow-y: auto; padding: 12px 14px 14px; min-height: 0; flex: 1; display: grid; gap: 12px; align-content: start; }
.nh-panel-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.nh-panel-detail {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  position: sticky;
  top: 0;
  max-height: 70vh;
  overflow-y: auto;
}
.nh-detail-head { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; }
.nh-detail-head strong { display: block; font-size: 1rem; }
.nh-detail-head small { color: var(--text-muted); font-size: 0.76rem; }
.nh-detail-head .nh-node-icon { font-size: 1.4rem; line-height: 1; }
.nh-lines { margin: 6px 0; font-size: 0.84rem; line-height: 1.45; }
.nh-warn { color: var(--nh-lethal); font-weight: 600; }
.nh-loot { color: var(--gold, #fbbf24); }
.nh-gmnote { color: var(--text-muted); }
.nh-sysop { font-size: 0.82rem; margin: 8px 0; padding: 6px 8px; border-radius: 6px; background: rgba(168, 85, 247, 0.08); border: 1px solid rgba(168, 85, 247, 0.3); }
.nh-commands { font-size: 0.82rem; margin: 6px 0; }
.nh-commands ul { margin: 3px 0 0; padding-left: 18px; }
.nh-ice-title { margin: 10px 0 4px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.nh-ice-details { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: nhice; }
.nh-ice-detail { border: 1px solid var(--border-soft); border-radius: 7px; padding: 6px 8px; background: var(--bg-deep); counter-increment: nhice; }
.nh-ice-detail.is-selected { border-color: var(--gold, #fbbf24); }
.nh-ice-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.nh-ice-detail-head::before { content: counter(nhice); font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); }
.nh-ice-st { font-size: 0.74rem; color: var(--text-muted); }
.nh-ice-detail.s-up .nh-ice-st { color: var(--accent); }
.nh-ice-lines { margin: 5px 0 0; font-size: 0.8rem; line-height: 1.4; color: var(--text-muted); }
.nh-ice-lines strong { color: var(--text); }
.nh-tools { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; align-items: center; }
.nh-tools .btn { min-height: 30px; padding: 3px 10px; font-size: 0.8rem; }
.nh-move { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 10px; font-size: 0.78rem; }
.nh-dice-btn { border-color: rgba(168, 85, 247, 0.55) !important; }
.nh-dice-btn:hover { color: #d8b4fe !important; }

.nh-block { border: 1px solid var(--border-soft); border-radius: 10px; padding: 10px 12px; background: var(--bg-card); }
.nh-block h4 { margin: 0 0 6px; font-size: 0.9rem; }
.nh-block h4 .muted { font-weight: 400; font-size: 0.76rem; }
.nh-runner-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.nh-runner-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 0.82rem; padding: 4px 0; border-bottom: 1px dashed var(--border-soft); }
.nh-runner-row:last-child { border-bottom: 0; }
.nh-runner-row.is-locked .nh-runner-name { color: var(--nh-lethal); }
.nh-runner-name { font-weight: 700; min-width: 7em; }
.nh-runner-at { color: var(--link); }
.nh-runner-trace small { color: var(--text-muted); }
.nh-runner-tools { margin-left: auto; display: inline-flex; flex-wrap: wrap; gap: 3px; }
.nh-add-runner { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 8px; }
.nh-add-runner input { flex: 1 1 140px; min-width: 0; }
.nh-twist-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nh-twist-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; border-radius: 7px; border: 1px solid var(--border-soft); border-left: 3px solid var(--gold, #fbbf24); }
.nh-twist-row.is-fired { border-left-color: var(--nh-lethal); background: rgba(248, 113, 113, 0.06); }
.nh-twist-row > div { flex: 1; min-width: 0; }
.nh-twist-row p { margin: 3px 0 0; font-size: 0.8rem; color: var(--text-muted); }
.nh-log ul { list-style: none; margin: 0; padding: 0; font-size: 0.78rem; font-family: var(--mono); display: grid; gap: 2px; max-height: 180px; overflow-y: auto; }
.nh-log li.is-gm { color: var(--text-muted); }
.nh-panel-foot { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px; border-top: 1px solid var(--border-soft); }
.nh-panel-foot .btn-danger-quiet { margin-left: auto; }

@media (max-width: 860px) {
  .nh-panel { padding: 0; place-items: end stretch; }
  .nh-panel-card { width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 14px 14px 0 0; }
  .nh-panel-grid { grid-template-columns: minmax(0, 1fr); }
  .nh-panel-detail { position: static; max-height: none; }
  html[data-motion="full"] .nh-panel:not([hidden]) .nh-panel-card { animation: nh-rise 0.24s ease-out; }
}
@keyframes nh-rise { from { transform: translateY(40px); opacity: 0; } }
html[data-motion="off"] .nh-panel-card { animation: none !important; }

/* ── Twist popup ── */
.nh-twist-pop {
  position: fixed;
  inset: 0;
  z-index: 420;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 2, 4, 0.7);
}
.nh-twist-card {
  width: min(520px, 100%);
  padding: 20px 22px 18px;
  border-radius: 12px;
  border: 1px solid var(--nh-lethal);
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 3px),
    linear-gradient(160deg, rgba(248, 113, 113, 0.18), transparent 60%),
    var(--bg-panel, #111a28);
  box-shadow: 0 0 40px rgba(248, 113, 113, 0.35), 0 20px 60px rgba(0, 0, 0, 0.6);
  text-align: center;
}
.nh-twist-kicker { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nh-lethal); }
.nh-twist-title { position: relative; margin: 8px 0 10px; font-size: 1.6rem; text-transform: uppercase; letter-spacing: 0.04em; }
.nh-twist-text { margin: 0 0 16px; line-height: 1.5; }
html[data-motion="full"] .nh-twist-card { animation: nh-twist-in 0.5s cubic-bezier(0.2, 1.4, 0.4, 1); }
html[data-motion="full"] .nh-twist-title::before,
html[data-motion="full"] .nh-twist-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
}
html[data-motion="full"] .nh-twist-title::before { color: #22d3ee; animation: nh-glitch 0.9s steps(2, jump-none) 3; clip-path: inset(0 0 55% 0); }
html[data-motion="full"] .nh-twist-title::after { color: #f472b6; animation: nh-glitch 0.9s steps(2, jump-none) 3 reverse; clip-path: inset(50% 0 0 0); }
@keyframes nh-twist-in {
  0% { transform: scale(0.6) skewX(8deg); opacity: 0; }
  60% { transform: scale(1.04) skewX(-2deg); opacity: 1; }
  100% { transform: none; }
}
@keyframes nh-glitch {
  0% { transform: translate(-3px, 1px); opacity: 0.9; }
  50% { transform: translate(3px, -1px); opacity: 0.7; }
  100% { transform: none; opacity: 0; }
}
html[data-motion="reduced"] .nh-twist-card { animation: nh-fade 0.2s ease-out; }

/* ── Add → Host tab ── */
.nh-gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.nh-gen-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 0.8rem; color: var(--text-muted); }
.nh-gen-preview { margin-top: 10px; display: grid; gap: 8px; font-size: 0.86rem; max-height: 42vh; overflow-y: auto; }
.nh-paste { margin-top: 14px; }
.nh-paste summary { cursor: pointer; color: var(--text-muted); font-size: 0.84rem; }

/* "Who rolls?" picker for host rolls (table.js checkWithCard, inside #check-modal) */
.nh-choose-skill { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 0.8rem; color: var(--text-muted); }
.check-opt-btn.nh-suggested { border-color: var(--accent); box-shadow: 0 0 10px var(--nh-glow); }

/* "How a run works" guide in the host popup */
.nh-howto { border: 1px solid rgba(251, 191, 36, 0.35); border-radius: 10px; padding: 8px 12px; background: rgba(251, 191, 36, 0.05); font-size: 0.84rem; }
.nh-howto summary { cursor: pointer; font-weight: 700; color: var(--gold, #fbbf24); }
.nh-howto ol { margin: 8px 0 2px; padding-left: 20px; display: grid; gap: 6px; line-height: 1.45; }
.nh-howto em { font-style: normal; color: var(--link); }
