/* ============================================================
   荣誉文凭 · 文书星图 — Honors Diploma Essay Atlas
   深空墨蓝 × 鎏金档案 · 2026-07-10 全面重写
   ============================================================ */

:root {
  --bg-deep: #070a14;
  --surface: #0a0e1a;
  --panel: rgba(13, 19, 36, 0.72);
  --panel-solid: #0d1324;
  --hairline: rgba(217, 180, 92, 0.16);
  --hairline-strong: rgba(217, 180, 92, 0.34);
  --gold: #d9b45c;
  --gold-soft: #b99647;
  --champagne: #f0e6cb;
  --ink-hi: #eef2fb;
  --ink: #c3cbdd;
  --ink-dim: #8791a8;
  --ink-faint: #5a6478;

  /* 9 大主题类别色 — 深色底校验通过（worst adjacent ΔE 21.4） */
  --t-jingsai: #4a80dd;   /* 竞赛科研 */
  --t-zhidu:   #c08a1f;   /* 制度资格 */
  --t-gonggong:#23a888;   /* 公共服务 */
  --t-yishu:   #d95548;   /* 艺术戏剧 */
  --t-xinli:   #8f7ae0;   /* 心理成长 */
  --t-tiyu:    #61a840;   /* 体育 */
  --t-xiezuo:  #c9599b;   /* 写作传媒 */
  --t-shuyuan: #cf6f22;   /* 书院自治 */
  --t-jishu:   #2f97b8;   /* 技术工程 */

  /* 章法五阶金坡（有序，浅→深） */
  --s-1: #efe2be;
  --s-2: #d9bc79;
  --s-3: #bd8f3a;
  --s-4: #96691c;
  --s-5: #6f4a10;

  --serif: "Songti SC", "STSongti-SC", STSong, SimSun, "Noto Serif SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;

  --ease-lux: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  scrollbar-color: rgba(217,180,92,.25) transparent;
}
::selection { background: rgba(217, 180, 92, 0.28); color: var(--champagne); }

/* ---------- 天幕 ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
#farStars { position: absolute; inset: 0; width: 100%; height: 100%; }
.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.nebula-a {
  width: 62vw; height: 62vw;
  left: -18vw; top: -28vw;
  background: radial-gradient(circle, rgba(74, 128, 221, 0.13), transparent 65%);
}
.nebula-b {
  width: 55vw; height: 55vw;
  right: -20vw; top: 8vh;
  background: radial-gradient(circle, rgba(143, 122, 224, 0.10), transparent 65%);
}
.nebula-c {
  width: 70vw; height: 46vw;
  left: 12vw; bottom: -24vw;
  background: radial-gradient(circle, rgba(192, 138, 31, 0.08), transparent 62%);
}

.app { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- 顶栏 ---------- */
.masthead {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  padding: 13px clamp(18px, 4vw, 48px) 10px;
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; flex: 1 1 360px; }
.brand-text { min-width: 0; }
.brand-mark {
  display: block;
  flex: none;
  border-radius: 50%;
  line-height: 0;
}
.brand-mark:focus-visible {
  outline: 2px solid var(--champagne);
  outline-offset: 4px;
}
.seal {
  display: block;
  width: 44px; height: 44px;
  border-radius: 50%;
  filter: drop-shadow(0 0 12px rgba(217, 180, 92, 0.35));
  animation: seal-breathe 7s ease-in-out infinite;
}
@keyframes seal-breathe {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(217,180,92,.25)); }
  50%      { filter: drop-shadow(0 0 16px rgba(217,180,92,.5)); }
}
.brand-text h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--champagne);
  text-shadow: 0 0 24px rgba(217, 180, 92, 0.25);
  white-space: nowrap;
}
.brand-text p {
  margin: 3px 0 0;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats { display: flex; gap: clamp(12px, 1.7vw, 22px); flex: none; }
.stat { text-align: center; }
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 700;
  color: var(--champagne);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat span { font-size: 9.5px; letter-spacing: 0.18em; color: var(--ink-dim); white-space: nowrap; }

.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.tools { position: relative; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(10, 14, 26, 0.6);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s;
}
.search:focus-within { border-color: var(--hairline-strong); box-shadow: 0 0 0 3px rgba(217,180,92,.08), 0 0 24px rgba(217,180,92,.12); }
.search svg { width: 15px; height: 15px; stroke: var(--ink-dim); fill: none; stroke-width: 2; flex: none; }
.search input {
  width: 132px;
  border: 0; outline: 0; background: transparent;
  color: var(--ink-hi); font-size: 13.5px; font-family: var(--sans);
}
.search input::placeholder { color: var(--ink-faint); }
.search kbd {
  font-size: 10px; color: var(--ink-faint);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 4px; padding: 1px 5px;
  font-family: var(--sans);
}
.search-pop {
  position: absolute;
  top: calc(100% + 10px); right: 0;
  width: min(430px, 92vw);
  max-height: 62vh;
  overflow: auto;
  background: var(--panel-solid);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
  z-index: 40;
  padding: 6px;
}
.sp-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px;
  border: 0; border-radius: 10px;
  background: transparent; cursor: pointer;
  font-family: var(--sans);
}
.sp-item:hover, .sp-item.focus { background: rgba(217, 180, 92, 0.08); }
.sp-item b { display: block; color: var(--ink-hi); font-size: 13.5px; font-weight: 600; }
.sp-item small { color: var(--ink-dim); font-size: 12px; display: block; margin-top: 2px; }
.sp-item .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.sp-empty { padding: 16px; color: var(--ink-dim); font-size: 13px; text-align: center; }
.about-toggle {
  appearance: none;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(10, 14, 26, 0.56);
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.about-toggle:hover,
.about-toggle[aria-expanded="true"] {
  color: var(--champagne);
  border-color: var(--hairline-strong);
  background: rgba(217, 180, 92, 0.08);
}

/* ---------- 紧凑口径切换 ---------- */
.scope-tabs {
  display: flex;
  flex: none;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(217, 180, 92, 0.18);
  border-radius: 999px;
  background: rgba(7, 10, 20, 0.7);
  backdrop-filter: blur(8px);
}
.scope-tabs button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 9px;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.25s, background 0.25s, box-shadow 0.25s;
}
.scope-tabs button:hover { color: var(--ink-hi); }
.scope-tabs button.on {
  color: var(--champagne);
  background: rgba(217, 180, 92, 0.14);
  box-shadow: inset 0 0 0 1px rgba(217, 180, 92, 0.2), 0 0 18px rgba(217, 180, 92, 0.08);
}
.scope-tabs small {
  margin-left: 3px;
  color: inherit;
  font-variant-numeric: tabular-nums;
  opacity: 0.78;
}

/* ---------- 主视图工具栏 ---------- */
.workspace-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  margin: 0 clamp(18px, 4vw, 48px);
  border-bottom: 1px solid rgba(217, 180, 92, 0.10);
}
.view-nav {
  position: relative;
  display: flex;
  grid-column: 2;
  justify-content: center;
  gap: clamp(3px, 1vw, 12px);
}
.view-nav button {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 7px 15px 9px;
  cursor: pointer;
  text-align: center;
  color: var(--ink-dim);
  transition: color 0.25s;
  position: relative;
}
.view-nav button b {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.28em;
  margin-right: -0.28em;
  font-weight: 600;
}
.view-nav button span { font-size: 8.5px; letter-spacing: 0.2em; opacity: 0.7; }
.view-nav button:hover { color: var(--ink); }
.view-nav button.on { color: var(--champagne); text-shadow: 0 0 18px rgba(217, 180, 92, 0.4); }
.nav-ember {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  box-shadow: 0 0 14px rgba(217, 180, 92, 0.7);
  transition: left 0.45s var(--ease-lux), width 0.45s var(--ease-lux);
}
.filter-toggle {
  grid-column: 3;
  justify-self: end;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--sans);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.filter-toggle:hover,
.filter-toggle.on {
  color: var(--champagne);
  border-color: var(--hairline);
  background: rgba(217, 180, 92, 0.06);
}
.filter-toggle > span { font-size: 11px; letter-spacing: 0.12em; }
.filter-toggle small { font-size: 9.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.filter-toggle i {
  width: 6px;
  height: 6px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s var(--ease-lux);
}
.filter-toggle.on i { transform: rotate(225deg) translate(-1px, -1px); }

/* ---------- 筛选栏 ---------- */
.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin: 0 clamp(18px, 4vw, 48px);
  padding: 9px 11px 8px;
  border-bottom: 1px solid rgba(217, 180, 92, 0.10);
  background: rgba(10, 14, 26, 0.42);
  backdrop-filter: blur(10px);
  transition: opacity 0.3s, visibility 0.3s;
}
.fgroup { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.flabel {
  font-size: 11px; letter-spacing: 0.28em;
  color: var(--ink-faint); margin-right: 4px;
  font-family: var(--serif);
}
.chip {
  appearance: none;
  font-family: var(--sans);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-dim);
  cursor: pointer;
  transition: all 0.25s;
  display: inline-flex; align-items: center; gap: 6px;
  line-height: 1.4;
}
.chip:hover { border-color: rgba(255, 255, 255, 0.25); color: var(--ink); }
.chip.on {
  border-color: var(--hairline-strong);
  background: rgba(217, 180, 92, 0.10);
  color: var(--champagne);
  box-shadow: 0 0 12px rgba(217, 180, 92, 0.15);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 6px currentColor; }
.chip small { opacity: 0.6; font-size: 10.5px; }
.chip.gap {
  border-style: dashed; cursor: default; opacity: 0.55;
}
.chip.gap:hover { border-color: rgba(255,255,255,0.10); color: var(--ink-dim); }
.freset {
  appearance: none; border: 0; background: transparent;
  color: var(--gold); font-size: 12px; cursor: pointer;
  letter-spacing: 0.1em; font-family: var(--sans);
  text-decoration: underline dotted;
}
.fcount { font-size: 12px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }

/* ---------- 舞台与视图 ---------- */
.stage { flex: 1; padding: 7px clamp(18px, 4vw, 48px) 14px; }
.view { display: none; animation: view-in 0.5s var(--ease-lux); }
.view.on { display: block; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* 星图 */
.galaxy-wrap {
  position: relative;
  height: max(540px, calc(100svh - 148px));
  border: 1px solid var(--hairline);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 50% 45%, rgba(20, 30, 58, 0.55), transparent 75%),
    var(--surface);
  box-shadow: inset 0 0 120px rgba(4, 6, 12, 0.8), 0 18px 60px rgba(0, 0, 0, 0.45);
}
#galaxy { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#galaxy.drag { cursor: grabbing; }
#galaxy.pointing { cursor: pointer; }
.galaxy-hint {
  position: absolute;
  left: 0; right: 0; bottom: 12px;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  pointer-events: none;
  text-shadow: 0 1px 8px rgba(0,0,0,.9);
}

/* 面板类视图 —— 贴合视口、内部自适应，默认全显不滚动 */
#viewStream.on, #viewCollege.on, #viewStructure.on {
  display: flex;
  height: max(430px, calc(100svh - 148px));
}
.panel {
  border: 1px solid var(--hairline);
  border-radius: 18px;
  background: var(--panel);
  backdrop-filter: blur(14px);
  padding: clamp(16px, 2.4vw, 28px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.4);
}
#viewStream .panel, #viewCollege .panel, #viewStructure .panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: 16px;
  flex: none;
}
.panel-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.3em;
  color: var(--champagne);
  font-weight: 700;
}
.panel-head p { margin: 6px 0 0; font-size: 12.5px; color: var(--ink-dim); }
.panel-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.panel-scope {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--gold-soft);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.legend { display: flex; flex-wrap: wrap; gap: 5px 14px; max-width: 560px; }
.lg-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--ink);
}
.lg-item i {
  width: 9px; height: 9px; border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.lg-item.sq i { border-radius: 2.5px; box-shadow: none; }
.college-head { display: block; }
#collegeLegend {
  width: 100%;
  max-width: none;
  flex-wrap: nowrap;
  gap: 14px;
  margin-top: 11px;
  padding: 0 0 5px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 180, 92, 0.2) transparent;
  touch-action: pan-x;
}
#collegeLegend .lg-item { flex: none; }
#collegeLegend::-webkit-scrollbar { height: 3px; }
#collegeLegend::-webkit-scrollbar-thumb { background: rgba(217, 180, 92, 0.2); border-radius: 999px; }
.chart-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
#streamBody svg { display: block; width: 100%; height: 100%; flex: 1; min-height: 0; }
.chart-body svg { display: block; width: 100%; height: auto; }

/* 流变 */
.stream-band { transition: opacity 0.3s; }
.stream-dim .stream-band { opacity: 0.25; }
.stream-dim .stream-band.hot { opacity: 1; }
.axis-label {
  font-family: var(--sans);
  fill: var(--ink-dim);
  font-size: 12px;
}
.axis-count { fill: var(--ink-faint); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.gap-note { fill: var(--ink-faint); font-size: 10.5px; letter-spacing: 0.14em; }
.band-label {
  font-family: var(--serif);
  font-size: 12.5px;
  paint-order: stroke;
  stroke: rgba(7, 10, 20, 0.85);
  stroke-width: 3px;
  letter-spacing: 0.1em;
}

/* 书院玫瑰与关键词观测 */
.college-workspace-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 180, 92, 0.22) transparent;
}
.rose-grid {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(9, minmax(104px, 1fr));
  grid-auto-rows: 172px;
  gap: 6px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 180, 92, 0.18) transparent;
}
.rose-card {
  --college-color: #d9b45c;
  --college-rgb: 217, 180, 92;
  --college-label: var(--champagne);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(var(--college-rgb), 0.28);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(var(--college-rgb), 0.14), rgba(var(--college-rgb), 0.035) 42%, rgba(7, 10, 20, 0.68) 68%),
    rgba(7, 10, 20, 0.76);
  padding: 6px 7px 5px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  transition: border-color 0.3s, transform 0.3s var(--ease-lux), box-shadow 0.3s;
}
.rose-card::after {
  content: "";
  position: absolute;
  inset: 0 16% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--college-color), transparent);
  opacity: 0.78;
}
.rose-card:hover {
  border-color: rgba(var(--college-rgb), 0.58);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45), 0 0 26px rgba(var(--college-rgb), 0.13);
}
.college-crest-zone {
  position: relative;
  width: 100%;
  height: 43px;
  flex: 0 0 auto;
  align-self: center;
  display: grid;
  place-items: center;
  border-bottom: 1px solid rgba(var(--college-rgb), 0.18);
  margin-inline: auto;
  margin-bottom: 1px;
}
.college-crest-zone::before {
  content: "";
  position: absolute;
  inset: 12% 16%;
  background: radial-gradient(circle, rgba(var(--college-rgb), 0.18), transparent 68%);
  filter: blur(8px);
  opacity: 0.72;
}
.college-beast {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: 40px;
  max-width: 92%;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  opacity: 0.94;
  pointer-events: none;
  user-select: none;
  transition: filter 0.35s, transform 0.45s var(--ease-lux);
}
.rose-card:hover .college-beast {
  filter: drop-shadow(0 5px 12px rgba(var(--college-rgb), 0.28));
  transform: translateY(-1px) scale(1.015);
}
.rose-chart-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 78px;
  min-height: 0;
  flex: 0 1 auto;
  align-self: center;
  display: grid;
  place-items: center;
  margin-inline: auto;
}
.rose-chart-shell::before {
  content: "";
  position: absolute;
  inset: 7%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(7, 10, 20, 0.92) 0 48%, rgba(7, 10, 20, 0.72) 62%, transparent 78%);
}
.rose-card h3 {
  position: relative;
  z-index: 1;
  margin: 1px 0 0;
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: 0.18em;
  margin-right: -0.18em;
  color: var(--college-label);
  font-weight: 600;
  text-shadow: 0 0 16px rgba(var(--college-rgb), 0.34);
}
.rose-card p { position: relative; z-index: 1; margin: 0; font-size: 9px; color: var(--ink-dim); white-space: nowrap; }
.rose-card p b { color: var(--ink); font-weight: 600; }
.rose-card svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  margin-inline: auto;
}

.college-insight-panel {
  margin-top: 12px;
  border: 1px solid rgba(217, 180, 92, 0.14);
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(74, 128, 221, 0.07), transparent 30%),
    rgba(7, 10, 20, 0.48);
}
.college-insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(217, 180, 92, 0.12);
  background: rgba(9, 13, 25, 0.76);
}
.college-insight-head > div:first-child { min-width: 0; }
.college-insight-head span {
  display: block;
  color: var(--gold-soft);
  font-size: 8px;
  letter-spacing: 0.24em;
}
.college-insight-head h3 {
  display: inline-block;
  margin: 2px 8px 0 0;
  color: var(--champagne);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.18em;
}
.college-insight-head p {
  display: inline;
  margin: 0;
  color: var(--ink-faint);
  font-size: 10px;
}
.college-insight-modes {
  display: flex;
  flex: none;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(7, 10, 20, 0.58);
}
.college-insight-modes button,
.structure-grouping button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  padding: 7px 11px;
  cursor: pointer;
  transition: color 0.25s, background 0.25s, box-shadow 0.25s;
}
.college-insight-modes button:hover,
.structure-grouping button:hover { color: var(--ink-hi); }
.college-insight-modes button.on,
.structure-grouping button.on {
  color: var(--champagne);
  background: rgba(217, 180, 92, 0.13);
  box-shadow: inset 0 0 0 1px rgba(217, 180, 92, 0.18);
}
.college-insight-body { padding: 12px; }

/* 章法 —— 只呈现叙事结构 */
.anatomy-panel-head {
  align-items: center;
  flex-wrap: nowrap;
  margin-bottom: 12px;
}
.anatomy-panel-head > div:first-child { min-width: 0; }
.anatomy-panel-head p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.anatomy-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 180, 92, 0.22) transparent;
}
.anatomy-summary {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(3, max-content) minmax(240px, 1fr);
  align-items: center;
  gap: 10px 22px;
  min-height: 45px;
  padding: 7px 12px;
  border: 1px solid rgba(217, 180, 92, 0.13);
  border-radius: 11px 11px 0 0;
  background: rgba(9, 13, 25, 0.94);
  backdrop-filter: blur(12px);
}
.anatomy-summary > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: 0;
}
.anatomy-summary > div + div {
  padding-left: 20px;
  border-left: 1px solid rgba(217, 180, 92, 0.12);
}
.anatomy-summary b {
  color: var(--champagne);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}
.anatomy-summary span {
  color: var(--ink-faint);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.anatomy-summary p {
  justify-self: end;
  margin: 0;
  color: var(--ink-faint);
  font-size: 9.5px;
  line-height: 1.45;
  text-align: right;
}
.trend-story {
  min-width: 0;
  padding: 11px 13px 10px;
}
.trend-story + .trend-story { border-left: 1px solid rgba(217, 180, 92, 0.11); }
.trend-story > span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.12em;
}
.trend-story > div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
}
.trend-story b,
.trend-story strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}
.trend-story b { color: var(--ink-dim); }
.trend-story strong { color: var(--champagne); }
.trend-story i {
  color: var(--ink-faint);
  font-size: 10px;
  font-style: normal;
}
.trend-story em {
  display: inline-block;
  margin-top: 4px;
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.trend-story em.up { color: #83c7b5; }
.trend-story em.down { color: #dfa07b; }
.trend-story small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 8.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.keyword-story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 10px;
  border: 1px solid rgba(217, 180, 92, 0.13);
  border-radius: 11px;
  overflow: hidden;
  background: rgba(7, 10, 20, 0.42);
}
.keyword-story-grid .trend-story {
  padding: 13px 14px 12px;
}
.keyword-story-grid .trend-story > span {
  margin-bottom: 7px;
  font-size: 10.5px;
}
.keyword-story-grid .trend-story b,
.keyword-story-grid .trend-story strong {
  font-size: 20px;
}
.keyword-story-grid .trend-story em { font-size: 11px; }
.keyword-story-grid .trend-story small {
  font-size: 10px;
  line-height: 1.45;
  white-space: normal;
}
.keyword-chart-card {
  border: 1px solid rgba(217, 180, 92, 0.13);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(7, 10, 20, 0.56);
}
.keyword-chart-card > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(217, 180, 92, 0.10);
}
.keyword-chart-card > header span {
  display: block;
  color: var(--gold-soft);
  font-size: 8.5px;
  letter-spacing: 0.22em;
}
.keyword-chart-card h4 {
  margin: 2px 0 0;
  color: var(--ink-hi);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.12em;
}
.keyword-chart-card > p {
  margin: 0;
  padding: 8px 14px 10px;
  border-top: 1px solid rgba(217, 180, 92, 0.09);
  color: var(--ink-faint);
  font-size: 10px;
  line-height: 1.5;
}
.keyword-line-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px 14px;
}
.keyword-line-legend span {
  display: flex !important;
  align-items: center;
  gap: 5px;
  color: var(--ink-dim) !important;
  font-size: 11px !important;
  letter-spacing: 0 !important;
}
.keyword-line-legend i {
  width: 22px;
  height: 0;
  border-top: 2px solid var(--series-color);
}
.keyword-line-legend small {
  color: var(--ink-faint);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.keyword-chart-scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 180, 92, 0.18) transparent;
}
.core-keyword-chart,
.delta-keyword-chart {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
}
.keyword-axis line {
  stroke: rgba(217, 180, 92, 0.11);
  stroke-width: 1;
}
.keyword-axis.zero line {
  stroke: rgba(217, 180, 92, 0.34);
  stroke-width: 1.4;
}
.keyword-axis text,
.keyword-year,
.delta-term,
.delta-value {
  fill: var(--ink-dim);
  font-family: var(--sans);
  font-size: 11px;
  text-anchor: end;
  dominant-baseline: central;
}
.keyword-year,
.delta-term,
.delta-value { text-anchor: middle; }
.keyword-series path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.keyword-series circle {
  fill: #0a0e1a;
  stroke: var(--series-color);
  stroke-width: 2.2;
}
.delta-bar rect { fill: #35a985; }
.delta-bar.fall rect { fill: #ca5b4f; }
.delta-value {
  fill: var(--ink);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.delta-term {
  fill: var(--ink-dim);
  font-size: 11px;
}
.change-callouts {
  display: grid;
  grid-template-columns: 190px 190px minmax(280px, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.change-callouts article,
.change-callouts > p {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid rgba(217, 180, 92, 0.12);
  border-radius: 10px;
  background: rgba(7, 10, 20, 0.42);
}
.change-callouts article {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px 8px;
}
.change-callouts article span {
  grid-column: 1 / -1;
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.12em;
}
.change-callouts article b {
  color: var(--champagne);
  font-family: var(--serif);
  font-size: 18px;
}
.change-callouts article strong {
  color: #83c7b5;
  font-size: 12px;
}
.change-callouts article:first-child strong { color: #dfa07b; }
.change-callouts article small {
  grid-column: 1 / -1;
  color: var(--ink-faint);
  font-size: 10px;
}
.change-callouts > p {
  color: var(--ink-dim);
  font-size: 10.5px;
  line-height: 1.6;
}
.change-callouts > p b { color: var(--ink); font-weight: 600; }
.cloud-atlas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid rgba(217, 180, 92, 0.13);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  overflow: hidden;
  background: rgba(217, 180, 92, 0.10);
}
.year-cloud-card {
  min-width: 0;
  height: 224px;
  padding: 9px 10px 7px;
  background:
    radial-gradient(circle at 50% 45%, rgba(74, 128, 221, 0.07), transparent 68%),
    rgba(7, 10, 20, 0.96);
  transition: background 0.25s;
}
.year-cloud-card:hover {
  background:
    radial-gradient(circle at 50% 45%, rgba(217, 180, 92, 0.09), transparent 66%),
    rgba(255, 255, 255, 0.015);
}
.year-cloud-card > header,
.year-cloud-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.year-cloud-card > header div { display: flex; align-items: baseline; gap: 3px; }
.year-cloud-card > header b {
  color: var(--champagne);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.06em;
}
.year-cloud-card > header span,
.year-cloud-card > header small {
  color: var(--ink-faint);
  font-size: 9.5px;
}
.year-cloud-card > footer {
  color: var(--ink-faint);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}
.year-cloud-card > footer > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.year-cloud-card > footer b { color: var(--ink); font-weight: 500; }
.cloud-rise { color: #83c7b5; }
.cloud-rise.quiet { color: var(--ink-faint); }
.word-cloud {
  display: block;
  width: 100%;
  height: 168px;
  overflow: visible;
}
.word-cloud text {
  font-family: "Hiragino Sans GB", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(7, 10, 20, 0.72);
  stroke-width: 1px;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 5px rgba(7, 10, 20, 0.7));
}
.cloud-empty {
  height: 168px;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  font-size: 11px;
}
.college-cloud-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 9px;
}
.college-cloud-card {
  position: relative;
  min-width: 0;
  min-height: 278px;
  overflow: hidden;
  padding: 11px;
  border: 1px solid rgba(var(--college-rgb), 0.25);
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 4%, rgba(var(--college-rgb), 0.14), transparent 36%),
    linear-gradient(160deg, rgba(var(--college-rgb), 0.045), rgba(7, 10, 20, 0.54));
}
.college-cloud-card::after {
  content: "";
  position: absolute;
  inset: 0 18% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--college-color), transparent);
  opacity: 0.75;
}
.college-cloud-card > header {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
}
.college-cloud-card > header img {
  width: 32px;
  height: 42px;
  flex: none;
  object-fit: contain;
}
.college-cloud-card h3 {
  margin: 0;
  color: var(--college-label);
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.18em;
}
.college-cloud-card p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 9.5px;
}
.college-cloud-card p b { color: var(--ink); font-weight: 500; }
.college-cloud-card .word-cloud { height: 174px; }
.college-cloud-card .cloud-empty { height: 174px; }
.college-distinctive {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding-top: 6px;
  border-top: 1px solid rgba(var(--college-rgb), 0.16);
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 8.5px;
  white-space: nowrap;
}
.college-distinctive small {
  flex: none;
  color: var(--college-label);
  font-size: 8px;
  letter-spacing: 0.08em;
}
.college-distinctive span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.college-distinctive b {
  color: var(--ink);
  font-weight: 500;
}
.structure-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--hairline);
}
.structure-legend { display: flex; flex-wrap: wrap; gap: 7px 16px; }
.structure-legend .lg-item { font-size: 13px; }
.structure-legend .lg-item b {
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.structure-grouping {
  display: flex;
  flex: none;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
}
.structure-grouping button { padding: 7px 12px; font-size: 11.5px; }
.structure-note {
  padding: 10px 0 7px;
  color: var(--ink-faint);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.structure-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1vh, 10px);
  min-height: 0;
}
.anatomy-row {
  margin-bottom: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  column-gap: 16px;
}
.anatomy-head {
  display: flex; flex-direction: column; align-items: flex-start;
  margin-bottom: 0; gap: 0; line-height: 1.15;
}
.anatomy-head b {
  font-family: var(--serif); font-size: 15px; color: var(--ink-hi);
  letter-spacing: 0.08em; font-weight: 600;
}
.anatomy-head span { font-size: 11px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.anatomy-bar {
  display: flex; gap: 2px;
  height: clamp(24px, 3.1vh, 30px);
  border-radius: 6px;
  overflow: hidden;
}
.anatomy-seg {
  position: relative;
  transition: flex-basis 0.7s var(--ease-lux), filter 0.2s;
  min-width: 2px;
}
.anatomy-seg:hover { filter: brightness(1.25); }
.anatomy-seg i {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 11.5px; font-weight: 600;
  color: rgba(7, 10, 20, 0.85);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.anatomy-seg.deep i { color: rgba(240, 230, 203, 0.92); }

/* ---------- 关于本站 ---------- */
html.about-open { overflow: hidden; }
.about-scrim {
  position: fixed;
  inset: 0;
  z-index: 84;
  background: rgba(4, 6, 12, 0.64);
  backdrop-filter: blur(4px);
  animation: fade-in 0.28s;
}
.about-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  width: min(520px, 100vw);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 180, 92, 0.10), transparent 38%),
    linear-gradient(160deg, #10172b, #090d19 62%);
  border-left: 1px solid var(--hairline);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.68);
  animation: about-in 0.42s var(--ease-lux);
}
@keyframes about-in {
  from { opacity: 0; transform: translateX(34px); }
}
.about-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--hairline);
}
.about-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--gold-soft);
  font-size: 9px;
  letter-spacing: 0.3em;
}
.about-head h2 {
  margin: 0;
  color: var(--champagne);
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: 0.12em;
}
.about-head button {
  appearance: none;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s;
}
.about-head button:hover { color: var(--champagne); border-color: var(--hairline-strong); }
.about-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 26px 44px;
}
.about-current {
  margin: 24px 0 4px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--hairline);
}
.about-current > span {
  display: block;
  color: var(--gold-soft);
  font-size: 10px;
  letter-spacing: 0.2em;
}
.about-current strong {
  display: block;
  margin: 5px 0 7px;
  color: var(--champagne);
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.1em;
}
.about-current p,
.about-section p,
.about-methods dd {
  margin: 0;
  color: var(--ink-dim);
  font-size: 12px;
  line-height: 1.75;
}
.about-section { padding: 20px 0 0; }
.about-section + .about-section { margin-top: 20px; border-top: 1px solid rgba(217, 180, 92, 0.10); }
.about-section h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.2em;
}
.about-section p + p { margin-top: 8px; }
.about-methods { margin: 0; }
.about-methods div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 8px 0;
}
.about-methods div + div { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.about-methods dt {
  color: var(--champagne);
  font-family: var(--serif);
  font-size: 11.5px;
}
.about-methods dd { margin: 0; }
.about-scope-link {
  margin-top: 12px !important;
  color: var(--gold-soft) !important;
}
.about-reading-link { margin-top: 12px !important; }
.about-reading-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--champagne);
  text-decoration: none;
  border-bottom: 1px solid rgba(217, 180, 92, 0.34);
  transition: color 0.2s, border-color 0.2s;
}
.about-reading-link a:hover {
  color: var(--ink-hi);
  border-color: var(--gold);
}
.about-reading-link a:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ---------- 浮签 ---------- */
.tooltip {
  position: fixed;
  z-index: 60;
  max-width: 300px;
  background: rgba(10, 14, 26, 0.92);
  border: 1px solid var(--hairline-strong);
  border-radius: 12px;
  padding: 11px 13px;
  pointer-events: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(217, 180, 92, 0.08);
  animation: tip-in 0.18s var(--ease-lux);
}
@keyframes tip-in { from { opacity: 0; transform: translateY(4px); } }
.tip-title {
  font-family: var(--serif);
  font-size: 14px; font-weight: 700;
  color: var(--champagne);
  margin: 0 0 4px;
}
.tip-meta { font-size: 11.5px; color: var(--ink-dim); margin: 0 0 6px; }
.tip-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.tip-tags span {
  font-size: 10.5px; padding: 2px 8px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12); color: var(--ink);
  display: inline-flex; align-items: center; gap: 5px;
}
.tip-tags span i { width: 6px; height: 6px; border-radius: 50%; }
.tip-abs {
  font-size: 11.5px; color: var(--ink-dim); line-height: 1.65; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tip-row { display: flex; justify-content: space-between; gap: 14px; font-size: 12px; margin: 2px 0; }
.tip-row b { color: var(--ink-hi); font-variant-numeric: tabular-nums; font-weight: 600; }
.tip-row .swatch { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.tip-row .swatch i { width: 8px; height: 8px; border-radius: 50%; }

/* ---------- 详情抽屉 ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(4, 6, 12, 0.55);
  backdrop-filter: blur(3px);
  animation: fade-in 0.3s;
}
@keyframes fade-in { from { opacity: 0; } }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(460px, 94vw);
  z-index: 80;
  background: linear-gradient(160deg, #10172b, #0a0e1a 60%);
  border-left: 1px solid var(--hairline);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.6);
  transform: translateX(100%);
  transition: transform 0.45s var(--ease-lux);
  display: flex;
}
.drawer.open { transform: none; }
.drawer-inner { flex: 1; overflow-y: auto; padding: 26px 26px 40px; }
.dw-close {
  appearance: none; border: 1px solid var(--hairline); background: transparent;
  color: var(--ink-dim); width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer; font-size: 15px; float: right;
  transition: all 0.25s;
}
.dw-close:hover { color: var(--champagne); border-color: var(--hairline-strong); }
.dw-kicker {
  font-size: 10.5px; letter-spacing: 0.34em; color: var(--gold-soft);
  margin: 4px 0 8px; font-family: var(--serif);
}
.dw-title {
  font-family: var(--serif);
  font-size: 23px; font-weight: 700; color: var(--champagne);
  margin: 0 0 12px; letter-spacing: 0.05em;
}
.dw-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.dw-chips span {
  font-size: 11.5px; padding: 4px 11px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10); color: var(--ink);
}
.dw-sec {
  font-family: var(--serif);
  font-size: 12px; letter-spacing: 0.34em; color: var(--ink-faint);
  margin: 24px 0 10px;
  display: flex; align-items: center; gap: 10px;
}
.dw-sec::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.dw-radar { display: flex; justify-content: center; }
.dw-radar svg { width: 240px; height: auto; }
.radar-axis { stroke: rgba(255, 255, 255, 0.07); }
.radar-ring { fill: none; stroke: rgba(255, 255, 255, 0.06); }
.radar-shape { fill: rgba(217, 180, 92, 0.14); stroke: var(--gold); stroke-width: 1.4; }
.radar-dot { fill: var(--gold); }
.radar-tick { font-size: 9.5px; fill: var(--ink-dim); font-family: var(--sans); }
.dw-struct { display: flex; flex-direction: column; gap: 7px; }
.dw-struct-row { display: grid; grid-template-columns: 58px 1fr 40px; align-items: center; gap: 10px; }
.dw-struct-row span { font-size: 11.5px; color: var(--ink-dim); }
.dw-struct-row em {
  font-style: normal; text-align: right; font-size: 11px;
  color: var(--ink-faint); font-variant-numeric: tabular-nums;
}
.dw-struct-track { height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.dw-struct-fill { height: 100%; border-radius: 4px; transition: width 0.8s var(--ease-lux); }
.dw-abs { font-size: 13.5px; line-height: 1.85; color: var(--ink); margin: 0; }
.dw-heads { list-style: none; margin: 0; padding: 0; }
.dw-heads li {
  font-size: 13px; color: var(--ink-dim);
  padding: 6px 0 6px 18px;
  border-left: 1px solid var(--hairline);
  position: relative;
}
.dw-heads li::before {
  content: ""; position: absolute; left: -3px; top: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold-soft); transform: translateY(-50%);
  box-shadow: 0 0 6px rgba(217, 180, 92, 0.5);
}
.dw-read {
  display: block; width: 100%;
  margin-top: 26px;
  padding: 13px;
  font-family: var(--serif);
  font-size: 15px; letter-spacing: 0.3em; text-indent: 0.3em;
  color: #14100a;
  background: linear-gradient(135deg, #e8cf8f, var(--gold) 55%, #b98f35);
  border: 0; border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(217, 180, 92, 0.25);
  transition: transform 0.25s var(--ease-lux), box-shadow 0.25s;
  font-weight: 700;
}
.dw-read:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(217, 180, 92, 0.4); }

/* ---------- 读文层 ---------- */
.reader {
  position: fixed; inset: 0; z-index: 90;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(24, 32, 58, 0.5), transparent 70%),
    var(--bg-deep);
  display: flex; flex-direction: column;
  animation: fade-in 0.35s;
}
.reader-bar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--hairline);
  background: rgba(7, 10, 20, 0.75);
  backdrop-filter: blur(12px);
}
.rd-back {
  appearance: none; background: transparent; border: 0;
  color: var(--gold); font-size: 14px; cursor: pointer;
  font-family: var(--serif); letter-spacing: 0.1em; padding: 4px 0;
}
.rd-back:hover { text-shadow: 0 0 12px rgba(217, 180, 92, 0.6); }
.rd-meta { flex: 1; text-align: center; font-size: 12.5px; color: var(--ink-dim); min-width: 0; }
.rd-meta b { color: var(--champagne); font-family: var(--serif); font-size: 14px; letter-spacing: 0.08em; }
.rd-nav { display: flex; gap: 8px; }
.rd-nav button {
  appearance: none; width: 34px; height: 34px;
  border: 1px solid var(--hairline); border-radius: 50%;
  background: transparent; color: var(--ink-dim);
  cursor: pointer; font-size: 15px;
  transition: all 0.25s;
}
.rd-nav button:hover:not(:disabled) { color: var(--champagne); border-color: var(--hairline-strong); }
.rd-nav button:disabled { opacity: 0.3; cursor: default; }
.reader-scroll { flex: 1; overflow-y: auto; }
.reader-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px clamp(20px, 5vw, 40px) 120px;
}
.rd-doc-title {
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 32px);
  color: var(--champagne);
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  font-weight: 700;
}
.rd-doc-sub {
  font-size: 12.5px; color: var(--ink-dim); letter-spacing: 0.14em;
  margin: 0 0 14px;
}
.rd-rule {
  border: 0; height: 1px; margin: 0 0 36px;
  background: linear-gradient(90deg, var(--gold), transparent 70%);
  opacity: 0.5;
}
.rd-body { font-family: var(--serif); font-size: 17px; line-height: 2.0; color: #d8deeb; }
.rd-body p { margin: 0 0 1.1em; text-indent: 2em; }
.rd-body p.rd-li { text-indent: 0; padding-left: 1.6em; margin-bottom: 0.35em; color: #c9d1e2; }
.rd-body h3 {
  font-size: 21px; color: var(--champagne);
  margin: 1.8em 0 0.8em; letter-spacing: 0.1em; font-weight: 700;
}
.rd-body h4 { font-size: 18px; color: var(--gold); margin: 1.5em 0 0.7em; letter-spacing: 0.08em; font-weight: 600; }
.rd-body h3::before { content: "❖ "; color: var(--gold-soft); font-size: 0.75em; }
.rd-loading {
  text-align: center; padding: 80px 0; color: var(--ink-dim);
  font-family: var(--serif); letter-spacing: 0.4em; font-size: 15px;
}
.rd-fin {
  text-align: center; margin-top: 60px; color: var(--ink-faint);
  font-family: var(--serif); letter-spacing: 0.6em; font-size: 13px;
}
.rd-fin::before, .rd-fin::after { content: " ─── "; letter-spacing: 0; color: var(--hairline-strong); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .masthead { flex-wrap: wrap; gap: 8px 16px; }
  .brand { flex: 1 1 55%; }
  .stats { order: 3; width: 100%; justify-content: center; gap: clamp(24px, 8vw, 72px); }
  .header-actions { margin-left: auto; }
  .cloud-atlas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .anatomy-summary { grid-template-columns: repeat(3, max-content) 1fr; gap: 8px 14px; }
  .anatomy-summary > div + div { padding-left: 12px; }
  .keyword-story-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keyword-story-grid .trend-story:nth-child(odd) { border-left: 0; }
  .keyword-story-grid .trend-story:nth-child(n + 3) { border-top: 1px solid rgba(217, 180, 92, 0.11); }
}
@media (max-width: 640px) {
  .masthead {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    padding: 10px 12px 7px;
  }
  .brand { width: 100%; gap: 10px; }
  .brand-text h1 { font-size: 19px; }
  .brand-text p { letter-spacing: 0.08em; font-size: 8.5px; }
  .seal { width: 38px; height: 38px; }
  .stats {
    order: initial;
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }
  .stat { display: flex; align-items: baseline; gap: 3px; }
  .stat b { display: inline; font-size: 16px; }
  .stat span { font-size: 8px; letter-spacing: 0.08em; }
  .header-actions { width: 100%; margin: 0; gap: 6px; }
  .scope-tabs button { padding: 5px 7px; font-size: 10px; }
  .tools { flex: 1; min-width: 0; }
  .search { width: 100%; }
  .search input { width: 100%; min-width: 0; }
  .search kbd { display: none; }
  .about-toggle { padding-inline: 8px; font-size: 9.5px; }
  .workspace-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0 10px;
  }
  .view-nav { grid-column: 1; gap: 0; }
  .view-nav button { padding: 6px 7px 8px; }
  .view-nav button b { font-size: 13.5px; letter-spacing: 0.12em; margin-right: -0.12em; }
  .view-nav button span { font-size: 7.5px; letter-spacing: 0.13em; }
  .filter-toggle { grid-column: 2; padding-inline: 6px; gap: 4px; }
  .filter-toggle small { display: none; }
  .filter-toggle.has-selection small { display: inline; font-size: 8px; }
  .galaxy-wrap { height: max(520px, calc(100svh - 181px)); border-radius: 14px; }
  .drawer { width: 100vw; border-left: 0; }
  .stage { padding: 6px 12px 18px; }
  .filters { margin: 0 10px; padding: 8px; max-height: 38svh; overflow: auto; }
  .about-head { padding: 20px 18px 16px; }
  .about-scroll { padding: 0 18px 36px; }
  .about-methods div { grid-template-columns: 1fr; gap: 3px; }
  #viewCollege.on,
  #viewStructure.on { height: max(520px, calc(100svh - 181px)); }
  #viewCollege .panel,
  #viewStructure .panel { padding: 13px 11px; border-radius: 14px; }
  .college-head { margin-bottom: 9px; }
  .college-head .legend { display: none; }
  .college-head p { font-size: 9.5px; line-height: 1.45; }
  .college-insight-panel { margin-top: 9px; }
  .college-insight-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }
  .college-insight-head p {
    display: block;
    margin-top: 2px;
    font-size: 9.5px;
  }
  .college-insight-modes { width: 100%; }
  .college-insight-modes button {
    flex: 1;
    padding: 7px 5px;
    font-size: 9.5px;
  }
  .college-insight-body { padding: 9px; }
  .anatomy-panel-head {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 9px;
  }
  .anatomy-panel-head p { white-space: normal; font-size: 10px; line-height: 1.45; }
  .anatomy-summary {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
  }
  .anatomy-summary > div {
    display: block;
    text-align: center;
  }
  .anatomy-summary > div + div { padding-left: 6px; }
  .anatomy-summary b { display: block; font-size: 14px; }
  .anatomy-summary span { display: block; font-size: 8.5px; }
  .anatomy-summary p {
    grid-column: 1 / -1;
    justify-self: stretch;
    padding-top: 6px;
    border-top: 1px solid rgba(217, 180, 92, 0.10);
    text-align: left;
    font-size: 8.5px;
  }
  .keyword-story-grid { grid-template-columns: 1fr; }
  .keyword-story-grid .trend-story + .trend-story {
    border-top: 1px solid rgba(217, 180, 92, 0.11);
    border-left: 0;
  }
  .keyword-chart-card > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .keyword-line-legend { justify-content: flex-start; }
  .core-keyword-chart,
  .delta-keyword-chart { min-width: 720px; }
  .change-callouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .change-callouts > p { grid-column: 1 / -1; }
  .cloud-atlas-grid { grid-template-columns: 1fr; }
  .year-cloud-card { height: 232px; }
  .year-cloud-card .word-cloud,
  .year-cloud-card .cloud-empty { height: 176px; }
  .college-cloud-grid { grid-template-columns: 1fr; }
  .college-cloud-card { min-height: 288px; }
  .college-cloud-card .word-cloud,
  .college-cloud-card .cloud-empty { height: 184px; }
  .structure-toolbar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .structure-legend { gap: 5px 9px; }
  .structure-grouping { align-self: stretch; }
  .structure-grouping button { flex: 1; }
  .anatomy-row { min-height: 38px; grid-template-columns: 66px 1fr; column-gap: 8px; }
  .anatomy-head b { font-size: 13px; }
  .anatomy-head span { font-size: 10px; }
  .anatomy-bar { height: 24px; }
  .anatomy-seg i { font-size: 10.5px; }
  .rose-grid {
    grid-template-columns: repeat(9, 118px);
    grid-auto-rows: 154px;
    padding-bottom: 4px;
  }
  .rose-card { min-height: 154px; }
  .college-crest-zone { height: 37px; }
  .college-beast { height: 34px; }
  .rose-chart-shell { max-width: 68px; }
  .rose-card h3 { font-size: 11.5px; }
  .rose-card p { font-size: 8.5px; }
  .rd-body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
