:root {
  --bg: #060910;
  --ink: #e8f2ff;
  --muted: #8ea0b8;
  --line: rgba(130, 176, 220, 0.22);
  --cyan: #5ce1ff;
  --cyan-dim: rgba(92, 225, 255, 0.14);
  --amber: #ffc56a;
  --violet: #9eb6ff;
  --no: #7d8da3;
  --danger: #ff8d7a;
  --panel: rgba(10, 16, 28, 0.86);
  --sans: "Avenir Next", "PingFang SC", "Noto Sans SC", sans-serif;
  --mono: "SF Mono", "ui-monospace", "Menlo", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(48, 110, 180, 0.28), transparent 60%),
    radial-gradient(700px 480px at 100% 100%, rgba(18, 70, 110, 0.2), transparent 55%),
    var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 170, 220, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 220, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 35%, #000 10%, transparent 78%);
}
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cyan); }

.shell {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100vh;
  position: relative;
}
.industry-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 18px;
  background: rgba(6, 10, 18, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.pick {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
}
.industry-bar select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: #0c1422;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
}
.current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-align: left;
}
.bar-end {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}
.bar-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.bar-actions > button,
.build-actions button {
  flex: 0 0 auto;
  border: 1px solid rgba(92, 225, 255, 0.75);
  background: rgba(62, 203, 255, 0.16);
  color: var(--cyan);
  border-radius: 8px;
  padding: 7px 12px;
  white-space: nowrap;
}
.stack {
  display: flex;
  flex: 1 0 100%;
  gap: 0;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
}
.stack li {
  min-width: 0;
  padding: 6px 16px 2px 0;
  color: var(--muted);
}
.stack li small { display: block; font-size: 11px; letter-spacing: 0.08em; }
.stack li b { display: block; color: var(--ink); font-size: 13px; font-weight: 600; }
.stack li[data-layer] { cursor: pointer; }
.stack li.on b { color: var(--cyan); }
.layer-picks { margin: 8px 0 12px; }
.kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.page {
  display: grid;
  grid-template-columns: 228px 1fr;
  min-height: 0;
}
.nav, .main { min-height: 0; overflow: auto; }
.nav {
  padding: 20px 14px 28px;
  border-right: 1px solid var(--line);
  background: rgba(6, 10, 18, 0.55);
}
.brand {
  margin: 0 0 2px;
  font-size: 16px;
  letter-spacing: 0.08em;
}
.brand-en {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 32px 20px 48px;
  text-align: center;
}
.gate h1 {
  margin: 8px 0 20px;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.gate-en {
  margin: 0;
  color: var(--amber);
  font-size: 12px;
  letter-spacing: 0.22em;
}
.gate-line {
  margin: 0 0 8px;
  max-width: 440px;
  color: var(--muted);
}
.gate-bar {
  width: min(280px, 72vw);
  height: 2px;
  margin: 28px 0 12px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}
.gate-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #8a6414, #f0c14a);
  animation: gate-fill 3s linear forwards;
}
@keyframes gate-fill { to { width: 100%; } }
.gate label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: min(320px, 86vw);
  margin: 0 auto 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}
.gate input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 14, 24, 0.85);
  color: var(--ink);
}
.gate button {
  margin-top: 6px;
  padding: 8px 28px;
  border: 1px solid rgba(232, 190, 84, 0.72);
  border-radius: 8px;
  background: rgba(232, 190, 84, 0.12);
  color: #f0d48a;
}
.gate-error { margin: 0 0 8px; color: var(--danger); font-size: 13px; }
.quiet { color: var(--muted); font-size: 12px; margin: 0 0 16px; }
.body-label {
  margin: 16px 8px 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.nav button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 7px 8px;
  border-radius: 8px;
}
.nav button small { float: right; color: var(--muted); font-size: 12px; }
.nav button.on {
  background: linear-gradient(90deg, rgba(92, 225, 255, 0.2), transparent);
  color: var(--cyan);
  box-shadow: inset 2px 0 0 var(--cyan);
}
.nav button.on small { color: var(--cyan); }
.sec { padding-left: 16px; font-size: 14px; }

.main { padding: 22px 28px 48px; }
h1 { margin: 0 0 8px; font-size: 28px; font-weight: 560; letter-spacing: 0.04em; }
.role { margin: 0 0 8px; color: var(--cyan); font-size: 13px; letter-spacing: 0.04em; }
.about, .content { margin: 0 0 8px; }
.serves { margin: 0; color: var(--muted); font-size: 13px; }

.subject {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.subject strong { font-size: 16px; font-weight: 560; }
.subject p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.card {
  background: rgba(12, 18, 32, 0.8);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.card.known {
  border-color: rgba(92, 225, 255, 0.92);
  background: linear-gradient(180deg, rgba(62, 203, 255, 0.24), rgba(8, 16, 28, 0.94));
  box-shadow: 0 0 26px rgba(62, 203, 255, 0.24);
}
.card.unknown {
  border-color: rgba(130, 176, 220, 0.16);
  background: rgba(12, 18, 32, 0.72);
}
.card.mixed {
  border-color: rgba(255, 197, 106, 0.88);
  box-shadow: 0 0 16px rgba(255, 197, 106, 0.18);
}
.card h2 { font-size: 16px; margin: 0 0 8px; }
.conclusion {
  margin: 0 0 10px;
  color: var(--ink);
}
.conclusion b { font-weight: 600; }
.models {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.model, .model-mini {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(6, 12, 22, 0.65);
}
.model.yes, .model-mini.yes {
  border-color: rgba(92, 225, 255, 0.9);
  background: rgba(62, 203, 255, 0.18);
}
.model.no { opacity: 0.82; }
.model-name, .model-mini { font-size: 13px; }
.model p, .clip {
  margin: 6px 0 0;
  font-size: 13px;
  color: #d5e4f5;
}
.fold .clip, .model-mini > .clip, .conclusion > .clip {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fold.open .clip {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.unfold {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cyan);
  font-size: 12px;
}
.proof { margin: 6px 0 0; font-size: 12px; word-break: break-all; }
.status {
  display: inline-block;
  margin-left: 8px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 12px;
  vertical-align: 1px;
}
.status.yes {
  background: #5ce1ff;
  color: #041018;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(92, 225, 255, 0.9);
}
.status.no { background: rgba(125, 141, 163, 0.15); color: var(--no); }
.status.split { background: rgba(255, 197, 106, 0.14); color: var(--amber); }
.status.back, .status.na { background: rgba(158, 182, 255, 0.12); color: var(--violet); }
.when-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(255, 197, 106, 0.1);
  color: var(--amber);
  font-size: 12px;
}
.abnormal { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.abnormal p { margin: 0 0 4px; }
.empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
}

.atlas {
  display: grid;
  grid-template-columns: 920px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.atlas-stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    radial-gradient(420px 220px at 50% 18%, rgba(92, 225, 255, 0.08), transparent 70%),
    rgba(8, 12, 22, 0.72);
  overflow: hidden;
  min-height: 720px;
}
.atlas-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 0;
}
.meters { display: flex; gap: 8px; flex-wrap: wrap; }
.meter {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}
.meter.on { color: var(--cyan); border-color: rgba(92, 225, 255, 0.7); }
.meter b { font-weight: 600; color: var(--ink); }
.field-host, #field-host {
  position: relative;
  height: 680px;
  cursor: grab;
}
.field-host canvas, #field-host canvas { display: block; width: 100%; height: 100%; }
.build-bar {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding-top: 4px;
}
.build-bar label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
#library-open {
  border-color: rgba(232, 190, 84, 0.75);
  background: rgba(232, 190, 84, 0.14);
  color: #fff4d8;
}
.library-back {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 18px 18px;
  background: rgba(3, 6, 12, 0.72);
}
.library.menu-dialog { width: min(1080px, 100%); }
.library.build-dialog { width: min(460px, 100%); }
.library {
  width: min(880px, 100%);
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0c1422;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}
.library-head, .library-tools { display: flex; align-items: center; gap: 12px; padding: 14px 16px 0; }
.library-head b { font-size: 16px; letter-spacing: 0.06em; }
.library-head span, .library-hit small, .library-l1-name small, .library-l2-name small { color: var(--muted); font-size: 12px; }
.library-head button.text {
  margin-left: auto;
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 12px;
}
.library-tools input {
  flex: 1;
  min-width: 0;
  background: rgba(8, 14, 24, 0.85);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
}
.library-modes { display: flex; gap: 6px; }
.library-modes button, .library-l1-name, .library-l2-name, .library-hit {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 8px;
}
.library-modes button { padding: 6px 10px; color: var(--muted); }
.library-modes button.on, .library-l1-name.on { color: #fff4d8; border-color: rgba(232, 190, 84, 0.75); background: rgba(232, 190, 84, 0.1); }
.library-body { overflow: auto; padding: 8px 0 0; }
.menu-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(200px, 1.05fr) minmax(240px, 1.3fr);
  min-height: 420px;
  max-height: calc(82vh - 108px);
}
.menu-col {
  overflow: auto;
  padding: 4px 8px 12px;
  border-right: 1px solid var(--line);
}
.menu-col:last-child { border-right: 0; }
.menu-col h3 {
  margin: 6px 8px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}
.menu-item b { font-weight: 560; }
.menu-item small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.menu-item.on { color: #fff4d8; background: rgba(232, 190, 84, 0.14); }
.menu-col .library-hit { margin: 0 0 4px; }
.build-form {
  display: grid;
  gap: 12px;
  padding: 16px;
}
.build-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.build-form input, .build-form select {
  width: 100%;
  background: rgba(8, 14, 24, 0.85);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 10px;
}
.build-actions { display: flex; justify-content: flex-end; }
.build-form button:disabled { opacity: 0.45; cursor: default; }
.build-float {
  position: fixed;
  z-index: 35;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: grid;
  gap: 2px;
  min-width: 240px;
  max-width: min(440px, calc(100% - 32px));
  padding: 10px 16px;
  border: 1px solid rgba(232, 190, 84, 0.55);
  border-radius: 12px;
  background: rgba(12, 20, 34, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  color: #fff4d8;
}
.build-float span, .build-float small { color: var(--muted); font-size: 12px; }
.build-float.done { border-color: rgba(92, 225, 255, 0.65); }
.build-float.error { border-color: rgba(255, 140, 140, 0.75); color: #ffd4d4; cursor: pointer; }
#build-note { margin: 0; color: var(--muted); font-size: 12px; }
.library-l1 { margin-bottom: 8px; }
.library-l1-name, .library-l2-name, .library-hit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 8px 10px;
}
.library-l2 { margin: 8px 0 8px 16px; }
.library-hit { margin-top: 6px; }
.library-hit b { font-weight: 600; }
.library-hit.on { border-color: rgba(92, 225, 255, 0.75); background: rgba(62, 203, 255, 0.1); }
.library-empty { margin: 6px 0 0 16px; color: var(--muted); font-size: 12px; }
.library-list { display: flex; flex-direction: column; gap: 6px; }
.build-bar input, .build-bar select, .compare-picks select {
  background: rgba(8, 14, 24, 0.85);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 8px;
}
.build-bar input { min-width: 148px; }
.build-bar button:disabled { opacity: 0.45; cursor: default; }
.bar-actions > button:disabled { opacity: 0.45; cursor: default; }
.build-bar button.text {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
#build-note { color: var(--muted); font-size: 12px; }
.compare-picks { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.compare-picks label { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.compare-picks select { max-width: 460px; }
.compare-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.atlas-stage.slim { min-height: 0; }
.atlas-stage.slim .atlas-head { flex-direction: column; align-items: stretch; padding: 12px 12px 0; }
.atlas-stage.slim .atlas-head .kicker { padding: 0 0 8px; }
.atlas-stage.slim .field-host { height: 460px; }
.globe-score {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -50%);
  max-width: 168px;
  padding: 8px 12px;
  border: 1px solid rgba(232, 190, 84, 0.38);
  border-radius: 14px;
  background: rgba(6, 14, 18, 0.62);
  text-align: center;
  pointer-events: none;
  color: #fff4d8;
}
.globe-score small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #e8c56a;
}
.globe-score b { display: block; margin-top: 2px; font-size: 28px; line-height: 1.05; }
.atlas-stage.slim .globe-score { max-width: 132px; padding: 6px 8px; }
.atlas-stage.slim .globe-score small { font-size: 10px; letter-spacing: 0.04em; }
.atlas-stage.slim .globe-score b { font-size: 22px; }
.fill-bars { display: grid; gap: 8px; margin: 8px 0 12px; }
.fill-bar span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.fill-bar b {
  display: block;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.fill-bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #147a66, #7dffe0);
}
.fill-bar.right i { background: linear-gradient(90deg, #6d4dff, #e4c8ff); }
.section-table-wrap { overflow-x: auto; margin-top: 8px; }
.section-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 12px; }
.section-table th, .section-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.section-table tbody th { white-space: normal; min-width: 108px; }
.section-table tr.detail td { white-space: normal; }
.section-table thead th { color: var(--muted); font-weight: 600; }
.section-table th small, .section-table td small { display: block; color: var(--muted); font-weight: 400; }
.section-table tbody.diff { background: rgba(255, 197, 106, 0.06); }
.section-table tbody.picked { outline: 1px solid rgba(92, 225, 255, 0.75); }
.section-table td.eye, .section-table th.eye { background: rgba(92, 225, 255, 0.08); }
.section-table .vs { margin: 0 4px; color: var(--muted); }
.section-table tr.detail td { background: rgba(4, 8, 16, 0.35); }
.compare-line { min-height: 1.4em; margin: 0; padding: 0 14px 12px; color: var(--muted); font-size: 13px; }
.compare-relation {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--panel);
}
.compare-relation h2 { margin: 4px 0 8px; font-size: 18px; }
.compare-relation p { margin: 0 0 6px; }
.compare-relation .conclusion.split { color: var(--amber); }
.compare-notes {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  background: var(--panel);
}
.compare-notes h2 { margin: 0 0 8px; font-size: 20px; }
.compare-notes h3 { margin: 4px 0 8px; font-size: 14px; color: var(--amber); font-weight: 600; }
.compare-notes p { margin: 0 0 8px; }
.compare-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px;
  margin: 10px 0 14px;
}
.compare-stats .stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.compare-stats .stat b {
  display: block;
  font-size: 26px;
  line-height: 1.1;
}
.compare-stats .stat span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}
.compare-stats .stat.gap {
  border-color: rgba(255, 197, 106, 0.72);
  background: rgba(255, 197, 106, 0.08);
}
.compare-stats .stat.gap b { color: var(--amber); }
.gap-list { list-style: none; margin: 0 0 12px; padding: 0; }
.gap-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.gap-list .nums { color: var(--muted); text-align: right; }
.gap-list .hot { color: var(--amber); }
.gap-line { color: var(--amber); }
.pair-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 8px;
}
.pair-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.pair-grid article.diff { border-color: rgba(255, 197, 106, 0.65); }
.pair-models { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 13px; }
.pair-models th, .pair-models td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.pair-models tr.diff { background: rgba(255, 197, 106, 0.08); }
.ring-label {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  color: #e7f2fb;
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 12px rgba(6, 12, 22, 0.9);
}
.ring-label small {
  margin-left: 6px;
  color: #8ea0b8;
  font-size: 11px;
}
.ring-label.title {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: #b9f3ff;
}
.ring-label.title.marketing { color: #e4c8ff; }
.ring-label.marketing { color: #ead8ff; }
.hover-tip {
  position: absolute;
  z-index: 3;
  padding: 4px 8px;
  border: 1px solid rgba(92, 225, 255, 0.45);
  border-radius: 8px;
  background: rgba(6, 12, 22, 0.88);
  color: #e8f2ff;
  font-size: 12px;
  pointer-events: none;
}
.robot {
  width: 100%;
  height: auto;
  display: block;
}
.node { cursor: pointer; }
.node circle { transition: r 0.15s ease; }
.node:hover circle, .node.on circle { r: 8; }
.node text {
  font-size: 11px;
  fill: #9fb4cc;
  font-family: var(--sans);
}
.detail {
  position: sticky;
  top: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 16px;
  min-height: 280px;
}
.detail h2 { margin: 6px 0; font-size: 20px; }
.verdict { margin: 0 0 8px; font-size: 15px; }
.detail .quiet { margin-bottom: 12px; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 14px;
  padding: 0 16px 14px;
  color: var(--muted);
  font-size: 12px;
}
.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.dot.yes { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.dot.split { background: var(--amber); }
.dot.no { background: var(--no); }
.dot.back { background: var(--violet); }

.cosmos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: stretch;
}
.cosmos-stage {
  position: relative;
  min-height: 720px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(520px 280px at 50% 42%, rgba(70, 120, 190, 0.16), transparent 70%),
    #070b14;
}
.cosmos-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 0;
}
.cosmos-bar button, .cosmos-rail button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
}
.cosmos-bar button.on, .cosmos-rail button.here {
  color: #fff4d8;
  border-color: rgba(232, 190, 84, 0.85);
  background: rgba(232, 190, 84, 0.1);
}
.cosmos-rail button.watch { color: var(--cyan); border-color: rgba(92, 225, 255, 0.55); }
.cosmos-sep { color: var(--muted); }
.cosmos-locate { margin-left: auto; color: #e8c56a; border-color: rgba(232, 190, 84, 0.55); }
.cosmos-locate:disabled { opacity: 0.45; cursor: default; }
.cosmos-caption {
  margin: 8px 16px 0;
  color: var(--muted);
  font-size: 13px;
}
.cosmos-host { position: relative; height: 640px; cursor: grab; }
.cosmos-host.armed { cursor: pointer; }
.cosmos-host canvas { display: block; width: 100%; height: 100%; }
.cosmos-label {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -130%);
  color: #d7e7f8;
  font-size: 12px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}
.cosmos-label.here { color: #ffe1a3; font-weight: 600; }
.cosmos-label.hub {
  z-index: 3;
  color: #fff6d0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-shadow: 0 0 10px rgba(255, 168, 46, 0.95), 0 1px 6px rgba(0, 0, 0, 0.95);
}
.cosmos-label.sub { transform: translate(-50%, -250%); }
.cosmos-label.tie { color: #9eb0c8; font-size: 11px; letter-spacing: 0; }
.cosmos-rail {
  overflow: auto;
  max-height: 720px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(8, 12, 22, 0.72);
}
.cosmos-rail button {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  border-radius: 12px;
  text-align: left;
  padding: 8px 10px;
}
.cosmos-rail button b, .cosmos-rail button small { display: block; }
.cosmos-rail button b { color: var(--ink); font-weight: 600; }
.cosmos-rail button small { color: var(--muted); font-size: 12px; }
.cosmos-rail button.here b, .cosmos-rail button.here small { color: #fff4d8; }
.cosmos-away, .cosmos-empty { color: #e8c56a; font-size: 13px; }
.cosmos-rel { margin: 0 0 8px; }
.cosmos-rel b { display: block; color: #fff4d8; font-size: 13px; font-weight: 600; }
.cosmos-rel small { color: #e8c56a; font-size: 12px; }
.net { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.net-head h1 { margin: 4px 0; font-size: 22px; }
.net-note { margin: 0; color: #e8c56a; }
.net-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-bottom: 18px;
}
.net-col h2 {
  position: sticky;
  top: 0;
  margin: 0 0 8px;
  padding: 6px 0;
  background: #070d16;
  font-size: 14px;
  letter-spacing: 0.08em;
}
.net-col h2 small { margin-left: 6px; color: var(--muted); font-weight: 500; }
.net-node, .rel-chip {
  margin: 0 0 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 14, 24, 0.72);
}
.net-node.built { border-color: rgba(120, 210, 170, 0.45); }
.net-node.here { border-color: rgba(232, 190, 84, 0.75); }
.net-node button, .rel-chip button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--ink);
}
.net-node b, .rel-chip b { display: block; font-size: 13px; }
.net-node small, .rel-chip span { color: var(--muted); font-size: 12px; }
.net-node.here b { color: #fff4d8; }
.net-node ul { margin: 6px 0 0; padding: 0; list-style: none; }
.net-node li button { color: #9fd7ff; font-size: 12px; line-height: 1.45; }
.rel-strip { margin-top: 10px; }
.rel-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rel-chip { margin: 0; max-width: 280px; }
.rel-chip a {
  display: block;
  margin-top: 4px;
  color: #9fd7ff;
  font-size: 11px;
  word-break: break-all;
}

@media (min-width: 1100px) {
  .models { grid-template-columns: repeat(4, 1fr); }
  .detail .models { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .atlas { grid-template-columns: 1fr; }
  .cosmos { grid-template-columns: 1fr; }
  .compare-stage { grid-template-columns: 1fr; }
  .pair-grid { grid-template-columns: 1fr; }
  .gap-list li { flex-direction: column; }
  .detail { position: static; }
}
@media (max-width: 1180px) {
  .bar-end { flex-wrap: wrap; }
}
@media (max-width: 720px) {
  .shell { height: auto; }
  .bar-end, .library-tools, .library-head { flex-wrap: wrap; }
  .menu-grid { grid-template-columns: 1fr; max-height: none; }
  .menu-col { border-right: 0; border-bottom: 1px solid var(--line); max-height: 240px; }
  .page { grid-template-columns: 1fr; }
  .net-board { grid-template-columns: 1fr; }
  .nav { border-right: 0; border-bottom: 1px solid var(--line); }
  .models { grid-template-columns: 1fr; }
  .atlas-stage { min-height: 0; }
}
