/* Researcher 3D network — layout & theme (deep space / academic) */
/* HELL embed: graph fills space between global topbar + footer */

body.page-network{
  display:flex;
  flex-direction:column;
  min-height:100vh;
}

body.page-network > .network-page-graph-wrap{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  position:relative;
  isolation:isolate;
}

body.page-network .network-page-graph-wrap > .app{
  flex:1 1 auto;
  min-height:0;
}

body.page-network > .topbar{
  flex-shrink:0;
}

body.page-network > .footer{
  flex-shrink:0;
}

/* /network/ 专用：极薄单行版权，不把高度让给图谱 */
body.page-network > .footer.footer--network-min{
  margin-top:0;
  padding:4px 18px 5px;
  background:
    linear-gradient(to top, rgba(6,8,12,.94) 0%, rgba(8,10,14,.9) 100%);
  border-top:1px solid rgba(255,255,255,.06);
  box-shadow:none;
  text-align:center;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:0;
}

body.page-network > .footer.footer--network-min::before{
  display:none;
}

.footer--network-min__line{
  margin:0;
  padding:0;
  font-family:var(--sans,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif);
  font-size:10px;
  font-weight:400;
  letter-spacing:.05em;
  line-height:1.3;
  color:rgba(255,255,255,.4);
}

@media (max-width:720px){
  body.page-network > .footer.footer--network-min{
    margin-top:0;
    padding:4px 14px 5px;
  }
}

:root {
  --bg-deep: #020510;
  --bg-panel: rgba(10, 14, 28, 0.78);
  --border-subtle: rgba(100, 140, 200, 0.2);
  --text-primary: #e8edf5;
  --text-muted: rgba(200, 210, 230, 0.65);
  --accent: #7eb8ff;
  --danger: #f87171;
  --inst-mhh: #7ec8ff;
  --inst-dzl: #e8c547;
  --inst-item: #5ee0c5;
  --inst-twincore: #c9b4ff;
  --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  /* 顶栏：三行紧凑控制台；max 略大于内容行高，避免不必要内部滚动 */
  --header-max-h: min(104px, 24vh);
  --header-min-h: 54px;
  --footer-h: 26px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Root scroll: HELL 全站背景由 style.css 提供；图谱区域自带背景 */
html.hell-network{
  overflow-x:hidden;
}

body.page-network .network-page-graph-wrap{
  margin:0;
  font-family:ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",var(--font-sans);
  background:
    linear-gradient(135deg, rgba(50, 80, 180, 0.05), rgba(120, 60, 180, 0.03)),
    radial-gradient(
      circle at 50% 45%,
      rgba(20, 40, 90, 0.2) 0%,
      rgba(6, 12, 30, 0.9) 55%,
      rgba(2, 4, 10, 0.96) 100%
    );
  color:var(--text-primary);
  -webkit-font-smoothing:antialiased;
}

.app{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
}

/* Top bar — 第一层：左品牌 + 右主控同一行；第二层：搜索+筛选 */
.top-bar {
  flex: 0 1 auto;
  max-height: var(--header-max-h);
  min-height: var(--header-min-h);
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1px 8px 2px;
  background: linear-gradient(
    180deg,
    rgba(12, 20, 42, 0.82) 0%,
    rgba(6, 12, 28, 0.76) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(100, 140, 200, 0.18);
  box-shadow: 0 4px 24px rgba(0, 4, 16, 0.45);
  z-index: 10;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}

.top-bar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  min-width: 0;
}

/* 第一层：左右双栏，同一行、垂直居中；窄屏在 @media 内改为纵向堆叠 */
.top-bar__row--primary {
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  row-gap: 0;
  min-width: 0;
}

.top-bar__row--secondary {
  justify-content: flex-start;
  align-items: center;
  padding-top: 0;
  margin-top: 0;
  border-top: 1px solid rgba(80, 120, 180, 0.07);
  gap: 4px 6px;
}

.top-bar__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 0 6px;
  min-width: 0;
  flex: 1 1 auto;
  max-width: 100%;
  row-gap: 0;
}

.top-bar__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-primary);
  white-space: nowrap;
  line-height: 1.12;
}

.top-bar__tagline {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(140, 165, 205, 0.32);
  white-space: nowrap;
  line-height: 1.12;
}

.top-bar__stats {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px 4px;
  margin: 0;
  font-size: 0.54rem;
  letter-spacing: 0.03em;
  color: rgba(130, 158, 200, 0.42);
  line-height: 1.1;
}

.top-bar__stat strong {
  font-weight: 600;
  color: rgba(175, 198, 228, 0.58);
  font-variant-numeric: tabular-nums;
}

.top-bar__stat-sep {
  opacity: 0.3;
  user-select: none;
}

.top-bar__brand .top-bar__filter-summary {
  flex: 1 1 100%;
  min-width: 0;
  width: 100%;
}

.top-bar__filter-summary {
  margin: 0;
  padding: 0;
  max-width: 100%;
  font-size: 0.5rem;
  line-height: 1.1;
  letter-spacing: 0.015em;
  color: rgba(105, 138, 188, 0.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-bar__controls-primary {
  flex: 0 1 auto;
  min-width: 0;
  justify-content: flex-end;
}

.top-bar__row--primary .top-bar__controls-primary.filter-wrap--primary {
  flex-wrap: nowrap;
  flex-shrink: 1;
  max-width: min(100%, 720px);
  column-gap: clamp(3px, 0.8vw, 6px);
  row-gap: 4px;
}

.top-bar__row--primary .top-bar__controls-primary.filter-wrap--primary > .btn-reset-view,
.top-bar__row--primary .top-bar__controls-primary.filter-wrap--primary > label,
.top-bar__row--primary .top-bar__controls-primary.filter-wrap--primary > select {
  flex-shrink: 0;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1 1 160px;
  max-width: min(320px, 42vw);
}

.search-wrap__field {
  flex: 1;
  min-width: 0;
}

.search-wrap__field input {
  width: 100%;
}

.search-wrap label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.search-wrap input {
  width: 100%;
  padding: 2px 8px;
  font-size: 0.7rem;
  line-height: 1.25;
  min-height: 24px;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  background: rgba(6, 12, 28, 0.85);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-wrap input::placeholder {
  color: var(--text-muted);
}

.search-wrap input:focus {
  border-color: rgba(110, 176, 255, 0.55);
  box-shadow: 0 0 0 2px rgba(110, 176, 255, 0.15);
}

.filter-wrap {
  display: flex;
  align-items: center;
  gap: 4px 6px;
  flex-shrink: 0;
}

.filter-wrap--primary {
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: min(100%, 720px);
}

.filter-wrap--secondary {
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  gap: 3px 6px;
}

.filter-wrap__compact-label {
  font-size: 0.58rem;
  color: rgba(160, 185, 215, 0.55);
  white-space: nowrap;
  margin: 0;
  padding: 0;
}

.filter-wrap__slider-label {
  margin-left: 2px;
  font-size: 0.58rem;
}

.filter-wrap input[type="range"]#min-link-weight,
.filter-wrap input[type="range"]#max-links-per-node {
  width: 64px;
  max-height: 22px;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.filter-wrap__check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.58rem;
  color: rgba(160, 185, 215, 0.62);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.filter-wrap__check input {
  margin: 0;
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
  cursor: pointer;
}

.filter-wrap__slider-val {
  font-size: 0.56rem;
  color: rgba(155, 185, 220, 0.65);
  min-width: 0.85rem;
  font-variant-numeric: tabular-nums;
}

.btn-reset-view {
  padding: 2px 8px;
  min-height: 24px;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.2;
  color: rgba(185, 205, 235, 0.88);
  background: rgba(6, 12, 26, 0.82);
  border: 1px solid rgba(90, 130, 190, 0.22);
  border-radius: 5px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn-reset-view:hover {
  background: rgba(14, 22, 42, 0.9);
  border-color: rgba(120, 170, 230, 0.4);
}

/* 性能下拉右侧说明：可先于整块右栏换行被压缩（ellipsis）；桌面仍单行 */
.top-bar__perf-mode-hint {
  margin: 0 0 0 4px;
  padding: 0;
  font-size: 10px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
  max-width: min(200px, 22vw);
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  align-self: center;
}

.filter-wrap label:not(.filter-wrap__check) {
  font-size: 0.58rem;
  color: rgba(160, 185, 215, 0.55);
  white-space: nowrap;
}

.filter-wrap select {
  padding: 2px 20px 2px 6px;
  min-height: 24px;
  font-size: 0.62rem;
  line-height: 1.2;
  border: 1px solid rgba(90, 130, 190, 0.2);
  border-radius: 5px;
  background: rgba(5, 10, 22, 0.92);
  color: var(--text-primary);
  cursor: pointer;
  max-width: 148px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%2388a0c0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 7px center;
}

#institution-filter {
  max-width: min(200px, 28vw);
}

/* Main: cosmic backdrop + graph + overlays */
.main {
  flex: 1;
  position: relative;
  min-height: 0;
  display: flex;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.35);
}

.cosmic-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.cosmic-backdrop__gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 70% at 50% 40%, rgba(18, 32, 68, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(30, 50, 90, 0.2) 0%, transparent 45%);
}

.cosmic-backdrop__gradient-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(50, 80, 180, 0.06), rgba(120, 60, 180, 0.04)),
    radial-gradient(
      circle at 50% 45%,
      rgba(20, 40, 90, 0.22) 0%,
      transparent 58%
    );
  pointer-events: none;
}

.cosmic-backdrop__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  pointer-events: none;
}

.cosmic-backdrop__glow--blue {
  width: min(55vw, 520px);
  height: min(42vh, 380px);
  left: 8%;
  top: 22%;
  background: radial-gradient(
    circle,
    rgba(60, 110, 220, 0.14) 0%,
    rgba(40, 70, 160, 0.05) 45%,
    transparent 70%
  );
  opacity: 0.85;
}

.cosmic-backdrop__glow--violet {
  width: min(48vw, 440px);
  height: min(38vh, 320px);
  right: 4%;
  bottom: 12%;
  background: radial-gradient(
    circle,
    rgba(130, 80, 200, 0.1) 0%,
    rgba(90, 50, 150, 0.04) 50%,
    transparent 72%
  );
  opacity: 0.75;
}

.cosmic-backdrop__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 75% 65% at 50% 48%,
    transparent 38%,
    rgba(0, 2, 10, 0.2) 100%
  );
  pointer-events: none;
  z-index: 3;
}

.cosmic-backdrop__stars{
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image: radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 25% 65%, rgba(255, 255, 255, 0.65), transparent),
    radial-gradient(1.5px 1.5px at 42% 12%, rgba(200, 220, 255, 0.85), transparent),
    radial-gradient(1px 1px at 55% 88%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 68% 35%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1px 1px at 78% 72%, rgba(220, 230, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 88% 18%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 15% 45%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 33% 91%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 91% 55%, rgba(255, 255, 255, 0.5), transparent);
  background-size: 100% 100%;
}

/* 远处极淡星点：模拟视差深度（不参与交互） */
.cosmic-backdrop__depth-stars{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.45;
  z-index: 1;
}

.cosmic-backdrop__dust{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.14;
  z-index: 4;
}

#graph-container {
  position: absolute;
  inset: 0;
  z-index: 6;
}

.graph-tooltip {
  position: fixed;
  z-index: 50;
  max-width: 240px;
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(235, 242, 255, 0.95);
  pointer-events: none;
  background: rgba(8, 14, 32, 0.75);
  border: 1px solid rgba(130, 170, 230, 0.25);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 20px rgba(120, 170, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.12s ease;
}

.graph-tooltip[hidden] {
  opacity: 0;
  visibility: hidden;
}

.graph-tooltip:not([hidden]) {
  opacity: 1;
  visibility: visible;
}

/* Bottom-left institution legend / filter */
.institution-legend {
  position: absolute;
  left: 12px;
  bottom: calc(var(--footer-h) + 14px + var(--safe-bottom));
  z-index: 6;
  padding: 12px 14px 14px;
  min-width: 196px;
  max-width: min(280px, 42vw);
  border-radius: 14px;
  border: 1px solid rgba(110, 150, 210, 0.22);
  background: linear-gradient(145deg, rgba(10, 16, 34, 0.72) 0%, rgba(6, 10, 24, 0.58) 100%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  pointer-events: auto;
}

.institution-legend__toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(100, 140, 200, 0.12);
}

.institution-legend__all-btn {
  align-self: flex-start;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(200, 215, 245, 0.88);
  background: rgba(30, 48, 88, 0.45);
  border: 1px solid rgba(120, 160, 220, 0.28);
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.institution-legend__all-btn:hover {
  background: rgba(40, 62, 110, 0.55);
  border-color: rgba(150, 190, 255, 0.4);
}

.institution-legend__all-btn.is-active {
  color: rgba(248, 252, 255, 0.98);
  background: linear-gradient(145deg, rgba(55, 95, 165, 0.55) 0%, rgba(35, 58, 118, 0.62) 100%);
  border-color: rgba(130, 175, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(100, 160, 255, 0.15);
}

.institution-legend__stats {
  font-size: 0.65rem;
  line-height: 1.45;
  color: rgba(155, 180, 215, 0.72);
}

.institution-legend__hint {
  margin: 0 0 8px;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: rgba(130, 155, 195, 0.55);
}

.institution-legend__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.75rem;
  color: rgba(210, 220, 240, 0.85);
  line-height: 1.55;
  max-height: min(38vh, 320px);
  overflow-y: auto;
}

.institution-legend__list li.institution-legend__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  margin: 2px -4px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.12s ease,
    box-shadow 0.12s ease;
}

.institution-legend__item:hover {
  background: rgba(40, 60, 100, 0.35);
}

.institution-legend__item.is-active {
  background: rgba(55, 95, 165, 0.38);
  box-shadow: inset 0 0 0 1px rgba(120, 170, 255, 0.22);
}

.institution-legend__item .institution-legend__label {
  flex: 1;
  min-width: 0;
}

.institution-legend__more {
  opacity: 0.65;
  font-size: 0.68rem;
  margin-top: 6px;
  cursor: default;
}

.institution-legend__swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 12px currentColor, inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Frosted info card */
.info-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: calc(var(--footer-h) + 12px + var(--safe-bottom));
  width: min(340px, calc(100vw - 24px));
  max-height: min(520px, calc(100% - 72px));
  z-index: 8;
  display: flex;
  flex-direction: column;
  padding: 0;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.info-panel.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.info-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(120, 160, 220, 0.12);
}

.info-panel__name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.info-panel__close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.info-panel__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.info-panel__body {
  padding: 12px 16px 16px;
  overflow-y: auto;
  font-size: 0.875rem;
  line-height: 1.55;
}

.info-row {
  margin-bottom: 10px;
}

.info-row:last-child {
  margin-bottom: 0;
}

.info-row dt {
  margin: 0 0 2px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.info-row dd {
  margin: 0;
  color: var(--text-primary);
}

.info-panel__body dd a {
  color: var(--accent);
  word-break: break-all;
}

.info-panel__body .info-muted {
  font-weight: 400;
  font-size: 0.88em;
  color: var(--text-muted);
}

.info-panel__link {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(110, 176, 255, 0.35);
  border-radius: 8px;
  background: rgba(110, 176, 255, 0.08);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.info-panel__link:hover {
  background: rgba(110, 176, 255, 0.15);
  border-color: rgba(110, 176, 255, 0.55);
}

.info-panel__empty {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Bottom hint */
.hint-bar {
  flex: 0 0 var(--footer-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px calc(2px + var(--safe-bottom));
  font-size: 0.68rem;
  line-height: 1.25;
  color: var(--text-muted);
  background: rgba(5, 10, 20, 0.85);
  border-top: 1px solid var(--border-subtle);
  z-index: 10;
}

.hint-bar span {
  text-align: center;
}

/* Mobile: 顶栏可略增高，触控目标不小于约 36px */
@media (max-width: 720px) {
  :root {
    --header-max-h: min(200px, 42vh);
    --header-min-h: auto;
  }

  .top-bar {
    max-height: none;
    padding: 5px 8px 6px;
    gap: 3px;
    overflow: visible;
  }

  .top-bar__row--primary {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 6px 0;
  }

  .top-bar__row--primary .top-bar__controls-primary.filter-wrap--primary {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    max-width: none;
    column-gap: 6px;
  }

  .top-bar__brand {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .top-bar__stats {
    flex-wrap: wrap;
  }

  .top-bar__tagline {
    white-space: normal;
    max-width: 92vw;
    line-height: 1.35;
    font-size: 0.62rem;
  }

  .top-bar__filter-summary {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.56rem;
  }

  .top-bar__row--secondary {
    flex-direction: column;
    align-items: stretch;
    padding-top: 3px;
    gap: 5px;
  }

  .search-wrap {
    max-width: none;
    flex: 1 1 auto;
  }

  .search-wrap input {
    min-height: 34px;
    padding: 5px 10px;
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .filter-wrap--secondary {
    justify-content: flex-start;
  }

  .filter-wrap select {
    min-height: 34px;
    padding: 5px 24px 5px 9px;
    font-size: 0.72rem;
    max-width: none;
  }

  .btn-reset-view {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 0.7rem;
    line-height: 1.25;
  }

  .top-bar__perf-mode-hint {
    display: none;
  }

  .filter-wrap input[type="range"]#min-link-weight,
  .filter-wrap input[type="range"]#max-links-per-node {
    width: 88px;
    min-height: 28px;
  }

  #institution-filter {
    max-width: none;
    flex: 1 1 160px;
  }

  .institution-legend {
    left: 8px;
    bottom: calc(var(--footer-h) + 10px + var(--safe-bottom));
    min-width: 140px;
    padding: 8px 10px 10px;
    font-size: 0.7rem;
  }

  .institution-legend__list {
    font-size: 0.68rem;
  }

  /* 卡片改为底部抽屉式，图谱区域抬高，减少遮挡 */
  .info-panel {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: calc(var(--footer-h) + 8px + var(--safe-bottom));
    width: auto;
    max-height: min(34vh, 300px);
  }

  .main.main--panel-open #graph-container {
    bottom: min(36vh, 310px);
  }
}

@media (max-width: 480px) {
  .hint-bar {
    font-size: 0.68rem;
    line-height: 1.35;
  }
}

/* ---------- 首次进入：数据说明弹窗（HELL 深色毛玻璃 + 金边） ---------- */
.network-data-modal-root{
  position:fixed;
  inset:0;
  z-index:480;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:max(16px, env(safe-area-inset-top)) 16px 16px;
  pointer-events:none;
  opacity:1;
  transition:opacity 0.48s ease;
}

.network-data-modal-root.is-closing{
  opacity:0;
}

.network-data-modal-root.is-hidden{
  visibility:hidden;
}

.network-data-modal{
  pointer-events:auto;
  width:100%;
  max-width:420px;
  box-sizing:border-box;
  padding:22px 22px 18px;
  border-radius:18px;
  border:1px solid rgba(200,166,58,0.42);
  background:
    linear-gradient(155deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025));
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  box-shadow:
    0 24px 64px rgba(0,0,0,0.55),
    0 0 0 1px rgba(139,0,0,0.12) inset;
}

.network-data-modal__title{
  margin:0 0 14px;
  font-family:var(--serif, ui-serif, "Noto Serif SC", "Source Han Serif SC", serif);
  font-size:clamp(1.05rem, 2.8vw, 1.28rem);
  font-weight:700;
  line-height:1.35;
  color:rgba(255,255,255,0.94);
  letter-spacing:0.02em;
}

.network-data-modal__body{
  margin-bottom:18px;
}

.network-data-modal__label{
  margin:0 0 8px;
  font-size:12px;
  letter-spacing:0.12em;
  text-transform:uppercase;
  font-family:var(--mono, ui-monospace, monospace);
  color:rgba(200,166,58,0.78);
}

.network-data-modal__list{
  margin:0;
  padding-left:1.15em;
  font-size:13px;
  line-height:1.65;
  color:rgba(255,255,255,0.72);
}

.network-data-modal__ok{
  display:block;
  width:100%;
  margin:0;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid rgba(200,166,58,0.45);
  background:rgba(139,0,0,0.35);
  color:rgba(255,255,255,0.92);
  font-size:13px;
  font-weight:600;
  letter-spacing:0.08em;
  cursor:pointer;
  transition:background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.network-data-modal__ok:hover{
  background:rgba(139,0,0,0.5);
  border-color:rgba(212,175,55,0.55);
}

.network-data-modal__ok:active{
  transform:scale(0.98);
}

@media (max-width:720px){
  .network-data-modal{
    max-width:min(420px, calc(100vw - 28px));
    padding:18px 16px 14px;
  }

  .network-data-modal__title{
    font-size:1.05rem;
  }

  .network-data-modal__list{
    font-size:12.5px;
  }
}
