/* ============ 叙世者宇宙 全局样式(暖黑 × 金 × 衬线) ============ */
:root {
  --hud-fg: #f3e9d2;
  --hud-dim: #9c8d70;
  --accent: #d4a95a;
  --accent-warm: #e8c98a;
  --panel-bg: rgba(18, 15, 10, 0.55);
  --panel-border: rgba(212, 169, 90, 0.22);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  font-size: 15px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0c0c10;
  color: var(--hud-fg);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.hidden { display: none !important; }

/* ============ 星球标签层 ============ */
#labels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}
.planet-label {
  position: absolute;
  transform: translate(-50%, -140%);
  padding: 3px 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  color: #f7edd8;
  background: rgba(18, 15, 10, 0.62);
  border: 1px solid rgba(212, 169, 90, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.planet-label.show { opacity: 1; }
.planet-label .industry {
  color: var(--hud-dim);
  margin-left: 6px;
  font-size: 11px;
}

/* ============ 顶部 HUD ============ */
#hud-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  z-index: 20;
  background: linear-gradient(to bottom, rgba(12, 12, 16, 0.75), rgba(12, 12, 16, 0));
}
.hud-left { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
/* 标题(参考 GALAXIA 版式):第一行小号英文大写、大字距;
   第二行中文"叙世者 · 从一次对话,到一个世界",两端撑满、总宽与英文行对齐 */
.logo {
  display: inline-block;
  color: #f3e9d2;
  text-shadow: none;
}
.logo-en {
  display: block;
  font-family: "Didot", "Bodoni MT", "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.38em;
  margin-right: -0.38em; /* 抵消行尾字距,使块宽=文字实宽,中文行才能真正对齐 */
  white-space: nowrap;
}
.logo-cn {
  display: block;
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 400;
  color: var(--hud-dim);
  text-align: justify;
  text-align-last: justify; /* 两端对齐撑满,与英文行同宽 */
  text-justify: inter-character;
}
/* 客户数不在标题区展示 */
.client-count { display: none; }
.client-count { font-size: 12px; color: var(--hud-dim); white-space: nowrap; }

.hud-center {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 560px;
  justify-content: center;
}
.search-box { position: relative; flex: 1; max-width: 320px; }
#search-input {
  width: 100%;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--hud-fg);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#search-input:focus { border-color: rgba(212, 169, 90, 0.55); }
#search-input::placeholder { color: #6d6249; }
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(14, 12, 8, 0.92);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 30;
}
.search-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.search-item:hover, .search-item.active { background: rgba(212, 169, 90, 0.14); }
.search-item .ind { color: var(--hud-dim); font-size: 11px; }
.search-empty { padding: 10px 12px; font-size: 12px; color: var(--hud-dim); }

#industry-filter {
  padding: 7px 10px;
  font-size: 13px;
  color: var(--hud-fg);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  outline: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#industry-filter option { background: #12100a; }

.hud-right { display: flex; gap: 8px; }
.hud-btn {
  padding: 7px 12px;
  font-size: 12px;
  color: var(--hud-fg);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.hud-btn:hover { border-color: rgba(212, 169, 90, 0.55); color: #fff; }
.hud-btn.on { border-color: var(--accent); color: var(--accent); }

/* ============ 视角预设 ============ */
/* 视角导航:移至左下角(快捷键提示上方) */
#view-presets {
  position: fixed;
  bottom: 150px;
  left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 20;
}
/* 纯文字按钮:去底框,与下方快捷键提示同一条左边线对齐 */
.preset-btn {
  padding: 2px 0;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-align: left;
  color: var(--hud-dim);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
}
.preset-btn:hover { color: #fff; }
.preset-btn.active { color: var(--accent); }

/* ============ 快捷键提示 ============ */
#shortcuts {
  position: fixed;
  left: 18px;
  bottom: 16px;
  font-size: 11px;
  line-height: 1.9;
  color: var(--hud-dim);
  z-index: 20;
  user-select: none;
}
.sc-title { font-size: 10px; letter-spacing: 0.2em; color: #6d6249; margin-bottom: 2px; }
#shortcuts kbd {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  margin-right: 6px;
  text-align: center;
  font-family: inherit;
  font-size: 10px;
  color: var(--hud-fg);
  background: rgba(212, 169, 90, 0.1);
  border: 1px solid rgba(212, 169, 90, 0.25);
  border-radius: 4px;
}

/* ============ 参数面板 ============ */
#params-panel {
  position: fixed;
  top: 62px;
  right: 14px;
  z-index: 25;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  border-radius: 10px;
}
#params-panel .lil-gui {
  --background-color: rgba(14, 12, 8, 0.88);
  --title-background-color: rgba(28, 23, 14, 0.9);
  --widget-color: rgba(120, 96, 52, 0.35);
  --hover-color: rgba(160, 128, 70, 0.4);
  --focus-color: rgba(212, 169, 90, 0.5);
  --number-color: #e8c98a;
  --string-color: #d4a95a;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* ============ 详情层 ============ */
#detail-layer {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 90px 5vw 40px;
  pointer-events: none;
}
#detail-back {
  position: absolute;
  top: 70px;
  right: 5vw;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--hud-fg);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
  z-index: 16;
}
#detail-back:hover { border-color: rgba(212, 169, 90, 0.55); color: #fff; }

#detail-panel {
  width: min(560px, 92vw);
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  background: rgba(14, 12, 8, 0.58);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  overflow: hidden;
}
#detail-layer.open #detail-panel { opacity: 1; transform: translateY(0); }

.detail-head { padding: 22px 26px 12px; }
.detail-head h1 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f7edd8;
  text-shadow: 0 0 24px rgba(212, 169, 90, 0.35);
}
.detail-meta {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--hud-dim);
  line-height: 1.7;
}
.detail-meta .ind-tag {
  display: inline-block;
  margin-right: 10px;
  padding: 1px 10px;
  font-size: 11px;
  color: var(--accent);
  border: 1px solid rgba(212, 169, 90, 0.4);
  border-radius: 999px;
}

.detail-tabs {
  display: flex;
  gap: 4px;
  padding: 0 26px;
  border-bottom: 1px solid rgba(212, 169, 90, 0.14);
}
.tab-btn {
  padding: 10px 16px;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--hud-dim);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s ease;
}
.tab-btn:hover { color: var(--hud-fg); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.detail-body {
  padding: 18px 26px 26px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.9;
}
.detail-body::-webkit-scrollbar { width: 6px; }
.detail-body::-webkit-scrollbar-thumb { background: rgba(212, 169, 90, 0.25); border-radius: 3px; }

/* 故事时间线 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(212, 169, 90, 0.5), rgba(212, 169, 90, 0.06));
}
.tl-item { position: relative; margin-bottom: 22px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -21px; top: 7px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #0c0c10;
  border: 2px solid var(--accent);
  box-shadow: 0 0 10px rgba(212, 169, 90, 0.6);
}
.tl-year { font-size: 12px; letter-spacing: 0.15em; color: var(--accent-warm); }
.tl-title {
  margin: 2px 0 6px;
  font-family: var(--serif);
  font-size: 15.5px;
  font-weight: 600;
  color: #f7edd8;
}
.tl-text { color: #c9bda0; font-size: 13.5px; }
.tl-concept { margin-top: 8px; color: #a89a7d; }
.tl-tags { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tl-tags span {
  padding: 2px 9px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--hud-dim);
  border: 1px solid rgba(212, 169, 90, 0.22);
  border-radius: 999px;
}
.tl-credits { margin-top: 10px; font-size: 12px; color: var(--hud-dim); letter-spacing: 0.06em; }
/* 北极印记:已被永久封存的故事 */
.tl-arctic {
  margin-top: 8px;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: #9fd8c8;
}
.pane-placeholder { color: var(--hud-dim); letter-spacing: 0.06em; }
/* 档案页头部:星址 + 相识计时 */
.detail-coord {
  display: block;
  margin-top: 8px;
  font-family: "Didot", "Bodoni MT", Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.detail-since { display: block; margin-top: 3px; font-size: 11px; color: var(--hud-dim); letter-spacing: 0.1em; }

/* 内部层底部信息:星址 + 相识计时(安静的小字,不抢星球的戏) */
#interior-info {
  position: fixed;
  left: 50%;
  bottom: 38px;
  transform: translateX(-50%);
  text-align: center;
  z-index: 15;
  pointer-events: none;
}
.ii-coord {
  font-family: "Didot", "Bodoni MT", Georgia, "Times New Roman", serif;
  font-size: 12px;
  letter-spacing: 0.26em;
  color: var(--accent);
  opacity: 0.9;
}
.ii-since {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--hud-dim);
}

/* 成篇文章 */
.article-title {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  color: #f7edd8;
}
.article-p { margin-bottom: 14px; color: #d3c7a8; text-align: justify; }
.article-p:first-of-type::first-letter {
  float: left;
  margin: 4px 8px 0 0;
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  color: var(--accent);
}

/* 服务方案 */
.phase-card {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: rgba(212, 169, 90, 0.06);
  border: 1px solid rgba(212, 169, 90, 0.16);
  border-radius: 10px;
}
.phase-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.phase-name {
  font-family: var(--serif);
  font-size: 14.5px;
  font-weight: 600;
  color: #f7edd8;
}
.phase-duration {
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--accent-warm);
  border: 1px solid rgba(232, 201, 138, 0.35);
  border-radius: 999px;
  padding: 1px 10px;
}
.phase-card ul { list-style: none; }
.phase-card li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 4px;
  font-size: 13px;
  color: #c9bda0;
}
.phase-card li::before {
  content: "✦";
  position: absolute;
  left: 0;
  font-size: 10px;
  color: var(--accent);
}

/* ============ 调试信息 ============ */
#debug-info {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 40;
  max-width: 420px;
  max-height: 50vh;
  overflow: auto;
  padding: 12px 14px;
  font-size: 11px;
  line-height: 1.6;
  color: #d8c89a;
  background: rgba(10, 9, 6, 0.85);
  border: 1px solid rgba(212, 169, 90, 0.3);
  border-radius: 8px;
  white-space: pre-wrap;
}

/* ============ WebGL 上下文丢失 ============ */
#gl-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 12, 16, 0.9);
}
.gl-box {
  padding: 32px 44px;
  text-align: center;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  background: var(--panel-bg);
}
.gl-box h2 { font-size: 18px; color: var(--accent-warm); margin-bottom: 10px; }
.gl-box p { font-size: 13px; color: var(--hud-dim); }

/* ============ 加载层 ============ */
#loading {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0c0c10;
  transition: opacity 0.8s ease;
}
#loading.fade { opacity: 0; pointer-events: none; }
.loading-inner { text-align: center; }
.loading-logo {
  display: inline-block;
  color: #f7edd8;
  text-shadow: 0 0 30px rgba(212, 169, 90, 0.35);
  margin-bottom: 22px;
}
.loading-logo .logo-en { font-size: 26px; }
.loading-logo .logo-cn { font-size: 16px; }
.loading-bar {
  width: 220px;
  height: 2px;
  margin: 0 auto 12px;
  background: rgba(212, 169, 90, 0.15);
  border-radius: 2px;
  overflow: hidden;
}
#loading-progress {
  width: 10%;
  height: 100%;
  background: linear-gradient(90deg, #a8854a, #e8c98a);
  border-radius: 2px;
  transition: width 0.4s ease;
}
#loading-text { font-size: 12px; color: var(--hud-dim); letter-spacing: 0.2em; }

/* ============ HUD 隐藏模式 ============ */
body.hud-hidden #hud-top,
body.hud-hidden #view-presets,
body.hud-hidden #shortcuts,
body.hud-hidden #params-panel,
body.hud-hidden #year-nav { display: none !important; }

/* ============ 底部年份导航(轨道节点,叙世者金色系) ============ */
#year-nav {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 26px;
  z-index: 20;
}
.year-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  transition: transform 0.2s ease;
}
.year-dot {
  position: relative;
  width: 22px; height: 22px;
  border-radius: 50%;
  /* 微型发光星球:6px 暖金实心核 + 两层柔和光晕(radial-gradient,总直径约 22px) */
  background:
    radial-gradient(circle, rgba(217, 192, 138, 0.5) 0%, rgba(217, 192, 138, 0.18) 45%, rgba(217, 192, 138, 0) 70%);
  transition: all 0.2s ease;
}
.year-dot::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #d9c08a;
  box-shadow: 0 0 6px rgba(217, 192, 138, 0.9), 0 0 14px rgba(217, 192, 138, 0.4);
  transition: all 0.2s ease;
}
.year-num {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--hud-fg);          /* 米金 #f3e9d2 */
  opacity: 0.55;
  transition: all 0.2s ease;
}
/* 悬停:放大 1.3、光晕增强 */
.year-node:hover { transform: scale(1.3); }
.year-node:hover .year-dot {
  background:
    radial-gradient(circle, rgba(217, 192, 138, 0.75) 0%, rgba(217, 192, 138, 0.3) 45%, rgba(217, 192, 138, 0) 70%);
}
.year-node:hover .year-dot::after {
  background: #d4a95a;
  box-shadow: 0 0 10px rgba(212, 169, 90, 1), 0 0 22px rgba(212, 169, 90, 0.6);
}
.year-node:hover .year-num { color: var(--accent); opacity: 1; }
/* 相机当前所在年份:点更大更亮 */
.year-node.active .year-dot {
  transform: scale(1.25);
  background:
    radial-gradient(circle, rgba(212, 169, 90, 0.85) 0%, rgba(212, 169, 90, 0.35) 45%, rgba(212, 169, 90, 0) 70%);
}
.year-node.active .year-dot::after {
  background: #d4a95a;
  box-shadow: 0 0 10px rgba(212, 169, 90, 1), 0 0 24px rgba(212, 169, 90, 0.7);
}
.year-node.active .year-num { color: var(--accent); opacity: 1; }

/* ============ 选中态名字牌 ============ */
#name-plate {
  position: fixed;
  left: 50%;
  bottom: 76px;
  transform: translateX(-50%) translateY(12px);
  z-index: 22;
  min-width: 300px;
  max-width: 86vw;
  padding: 16px 44px 14px;
  text-align: center;
  background: rgba(14, 12, 8, 0.66);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#name-plate.on { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
#np-close {
  position: absolute;
  top: 8px; right: 10px;
  width: 26px; height: 26px;
  font-size: 14px; line-height: 1;
  color: var(--hud-dim);
  background: none;
  border: 1px solid var(--panel-border);
  border-radius: 50%;
  cursor: pointer;
}
#np-close:hover { color: var(--accent); border-color: rgba(212, 169, 90, 0.45); }
.np-name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.12em;
  color: #f7edd8;
}
.np-meta {
  margin-top: 6px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--hud-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 星址:这颗星的专属坐标(由星位反推,终身不变) */
.np-coord {
  margin-top: 8px;
  font-family: "Didot", "Bodoni MT", Georgia, "Times New Roman", serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent);
  opacity: 0.85;
}
/* 相识计时:metAt 驱动的永续滚动钟 */
.np-since {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--hud-dim);
}
.np-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: center;
}
.np-btn-primary {
  padding: 8px 18px;
  font-family: var(--serif);
  font-size: 13.5px;
  letter-spacing: 0.15em;
  color: #ffe9bd;
  background: rgba(212, 169, 90, 0.18);
  border: 1px solid rgba(212, 169, 90, 0.5);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.np-btn-primary:hover { background: rgba(212, 169, 90, 0.32); box-shadow: 0 0 18px rgba(212, 169, 90, 0.35); }
.np-btn-ghost {
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--hud-dim);
  background: none;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  cursor: pointer;
}
.np-btn-ghost:hover { color: var(--accent); border-color: rgba(212, 169, 90, 0.45); }

/* ============ 交叉淡切遮罩 ============ */
#veil {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: #0c0c10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
#veil.on { opacity: 0.92; pointer-events: auto; }

/* ============ 内部层返回按钮 ============ */
#interior-back {
  position: fixed;
  top: 70px;
  right: 5vw;
  z-index: 25;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--hud-fg);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#interior-back:hover { border-color: rgba(212, 169, 90, 0.55); color: #fff; }

/* ============ 节点占位内容卡 ============ */
#node-card {
  position: fixed;
  right: 5vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 26;
  width: min(340px, 86vw);
  padding: 26px 28px;
  background: rgba(14, 12, 8, 0.72);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
}
#node-card h3 {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}
#node-card p {
  font-size: 13px;
  line-height: 2;
  color: #c9bda0;
}
#node-card-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  font-size: 15px; line-height: 1;
  color: var(--hud-dim);
  background: none;
  border: 1px solid var(--panel-border);
  border-radius: 50%;
  cursor: pointer;
}
#node-card-close:hover { color: var(--accent); border-color: rgba(212, 169, 90, 0.45); }

/* ============ 详情层底部:进入星球按钮 ============ */
.detail-foot {
  padding: 0 26px 22px;
}
#detail-enter {
  width: 100%;
  padding: 12px 0;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: 0.2em;
  color: var(--accent);
  background: rgba(212, 169, 90, 0.08);
  border: 1px solid rgba(212, 169, 90, 0.4);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
#detail-enter:hover {
  background: rgba(212, 169, 90, 0.18);
  color: #ffe9bd;
  box-shadow: 0 0 24px rgba(212, 169, 90, 0.25);
}

/* 内部层节点标签:无底框的纯文字,淡淡落在小星系上(常显,悬停提亮) */
.node-label {
  font-family: var(--serif);
  letter-spacing: 0.15em;
  transition: opacity 0.15s ease;
  background: none;
  border: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
  font-size: 12px;
  transform: translate(-50%, -50%);
  text-shadow: 0 0 10px rgba(12, 12, 16, 0.85);
}

/* ============ 响应式 ============ */
@media (max-width: 860px) {
  :root { font-size: 14px; }
  #hud-top { flex-wrap: wrap; padding: 10px 12px; gap: 8px; }
  .hud-left { width: 100%; justify-content: space-between; }
  .hud-center { order: 3; width: 100%; max-width: none; }
  .search-box { max-width: none; }
  .logo { font-size: 17px; }
  #view-presets { bottom: 16px; left: 12px; flex-direction: row; flex-wrap: wrap; }
  #shortcuts { display: none; }
  #params-panel { top: auto; bottom: 12px; right: 8px; max-height: 55vh; }
  #detail-layer { padding: 120px 4vw 20px; align-items: flex-end; }
  #detail-panel { width: 100%; max-height: 62vh; }
  #detail-back { top: auto; bottom: 12px; right: 4vw; }
  .detail-head h1 { font-size: 21px; }
}
