/* ============================================================
   星渊 · 宇宙主题样式 —— 宏大 · 浩渺 · 神秘
   ============================================================ */
:root {
  --bg: #030512;
  --panel: rgba(10, 16, 38, 0.72);
  --panel-border: rgba(120, 160, 255, 0.16);
  --ink: #dfe8ff;
  --ink-dim: #8fa3cc;
  --accent: #7fb8ff;
  --accent2: #c9a2ff;
  --gold: #ffd9a0;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.hidden { display: none !important; }

/* ---------------- 开场 ---------------- */
#hero {
  position: fixed; inset: 0; z-index: 100;
  background: radial-gradient(ellipse at 50% 120%, #131c45 0%, #070b1f 45%, #02030a 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: opacity 1.4s ease, transform 1.4s ease;
}
#hero.leaving { opacity: 0; transform: scale(1.6); pointer-events: none; }
.hero-stars, .hero-stars::before, .hero-stars::after {
  position: absolute; inset: -100%;
  background-image:
    radial-gradient(1px 1px at 20% 30%, #fff, transparent),
    radial-gradient(1px 1px at 60% 70%, #cdd8ff, transparent),
    radial-gradient(1.5px 1.5px at 80% 20%, #fff, transparent),
    radial-gradient(1px 1px at 35% 85%, #ffe9c4, transparent),
    radial-gradient(1px 1px at 90% 55%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 10% 60%, #cdd8ff, transparent);
  background-size: 400px 400px;
  content: "";
  animation: warp 60s linear infinite;
}
.hero-stars.s2 { background-size: 260px 260px; animation-duration: 38s; opacity: 0.7; }
.hero-stars.s3 { background-size: 620px 620px; animation-duration: 95s; opacity: 0.4; }
@keyframes warp { to { transform: translateY(400px); } }
.hero-inner { position: relative; text-align: center; padding: 0 24px; animation: heroIn 2s ease both; }
@keyframes heroIn { from { opacity: 0; transform: translateY(24px); } }
.hero-logo { font-size: 28px; color: var(--gold); text-shadow: 0 0 24px var(--gold); animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.55; text-shadow: 0 0 42px var(--gold); } }
.hero-title {
  font-size: clamp(56px, 10vw, 118px); font-weight: 200; letter-spacing: 0.32em; margin: 12px 0 4px;
  background: linear-gradient(180deg, #fff 20%, #9db9ff 70%, #5a76c9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 80px rgba(127, 184, 255, 0.35);
}
.hero-sub { letter-spacing: 0.5em; font-size: clamp(10px, 1.6vw, 14px); color: var(--ink-dim); }
.hero-quote {
  max-width: 560px; margin: 34px auto 0; color: #aebbdf; font-size: 14px; line-height: 2;
  font-style: italic; opacity: 0.85;
}
#enter-btn {
  margin-top: 44px; padding: 15px 58px; border-radius: 999px;
  border: 1px solid rgba(159, 190, 255, 0.45); color: #e8f0ff;
  font-size: 16px; letter-spacing: 0.45em; text-indent: 0.45em;
  background: linear-gradient(135deg, rgba(127,184,255,0.12), rgba(201,162,255,0.12));
  backdrop-filter: blur(6px);
  transition: all 0.45s ease; position: relative; overflow: hidden;
}
#enter-btn:hover {
  box-shadow: 0 0 42px rgba(127, 184, 255, 0.45), inset 0 0 24px rgba(127, 184, 255, 0.15);
  border-color: rgba(190, 214, 255, 0.9); transform: translateY(-2px);
}
.hero-tip { margin-top: 26px; font-size: 12px; color: var(--ink-dim); letter-spacing: 0.1em; }
/* 作者署名：由核心 JS 动态注入（非静态节点，删 HTML 无效） */
.author-credit {
  position: absolute; left: 0; right: 0; bottom: 20px; z-index: 2;
  text-align: center; font-size: 12px; letter-spacing: 0.06em;
  color: rgba(174, 187, 223, 0.62); pointer-events: auto;
}
.author-credit a {
  color: var(--gold); text-decoration: none;
  border-bottom: 1px solid rgba(255, 217, 160, 0.4);
}
.author-credit a:hover { filter: brightness(1.15); }

/* ---------------- 顶栏 ---------------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  background: linear-gradient(180deg, rgba(3,5,18,0.85), rgba(3,5,18,0));
  pointer-events: none;
}
#topbar > * { pointer-events: auto; }
.brand { font-size: 18px; letter-spacing: 0.3em; font-weight: 300; color: #e8f0ff; }
.brand-star { color: var(--gold); text-shadow: 0 0 12px var(--gold); }
#nav { display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 999px; padding: 4px; backdrop-filter: blur(14px); }
.nav-btn {
  padding: 7px 20px; border-radius: 999px; font-size: 14px; letter-spacing: 0.15em;
  color: var(--ink-dim); transition: all 0.3s;
}
.nav-btn:hover { color: var(--ink); }
.nav-btn.active {
  color: #081020; background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 18px rgba(127, 184, 255, 0.5); font-weight: 600;
}
.audio-ctl { display: flex; gap: 8px; }
.audio-btn {
  display: flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--panel-border); backdrop-filter: blur(14px);
  font-size: 12px; color: var(--ink-dim); transition: all 0.3s;
}
.audio-btn i { font-style: normal; }
.audio-btn.on { color: var(--gold); border-color: rgba(255, 217, 160, 0.35); }
.audio-btn.on i { animation: noteBob 1.6s ease-in-out infinite; display: inline-block; }
@keyframes noteBob { 50% { transform: translateY(-2px) rotate(-8deg); } }

/* ---------------- 页面容器 ---------------- */
.page { position: fixed; inset: 0; display: none; }
.page.visible { display: block; }
#scene-container, #scene-container canvas { position: absolute; inset: 0; }
#label-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.label-leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.label-leader { stroke: rgba(159, 190, 255, 0.34); stroke-width: 1; stroke-dasharray: 2 3; }

/* 星体标签 */
.body-label {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 11px; letter-spacing: 0.2em; color: rgba(220, 232, 255, 0.9);
  text-shadow: 0 0 8px rgba(0,0,0,0.9), 0 0 20px rgba(127,184,255,0.5);
  white-space: nowrap; transition: opacity 0.3s, color 0.2s, text-shadow 0.2s;
  padding: 3px 5px; line-height: 1; border-radius: 5px;
}
/* 真实比例下：星体按真实半径缩到亚像素级时球体即不可见（不存在任何人工放大/星点）。
   名称标签居中落在轨道线上的星体位置，仅作名称锚点随轨道移动——不绘制任何人工标记。 */
.body-label.struct {
  color: rgba(160, 200, 255, 0.66); font-size: 10px; letter-spacing: 0.12em;
  padding: 4px 7px; background: rgba(3, 7, 20, 0.52); border: 1px solid rgba(127,184,255,0.12);
}
.body-label.struct-asteroid { color: rgba(231, 205, 158, 0.82); border-color: rgba(231,205,158,0.18); }
.body-label.struct-kuiper { color: rgba(159, 202, 255, 0.78); }
.body-label.struct-oort { color: rgba(139, 177, 224, 0.72); border-color: rgba(139,177,224,0.16); }
.struct-leader-asteroid { stroke: rgba(231, 205, 158, 0.3); stroke-dasharray: 2 3; }
/* 名称与区域标签均可点击：星体进入跟随，区域切换到对应尺度。 */
.body-label { pointer-events: auto; cursor: pointer; }
.body-label:hover { color: #fff; text-shadow: 0 0 10px rgba(0,0,0,1), 0 0 26px rgba(160,200,255,0.95); }
.body-label.followed { color: var(--gold); text-shadow: 0 0 10px #000, 0 0 22px rgba(255,217,160,0.8); }
#solar-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-size: 12px; letter-spacing: 0.2em; color: var(--ink-dim);
  background: var(--panel); padding: 8px 22px; border-radius: 999px;
  border: 1px solid var(--panel-border); backdrop-filter: blur(10px);
  transition: opacity 2s; pointer-events: none; z-index: 5;
}
#solar-hint.fade { opacity: 0; }

/* ---------------- 控制面板 ---------------- */
#control-panel {
  position: absolute; top: 74px; left: 16px; z-index: 10;
  width: 284px; max-height: calc(100% - 110px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 18px; padding: 16px; backdrop-filter: blur(16px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
  transition: width 0.35s ease, padding 0.35s ease, border-radius 0.35s ease;
}
#control-panel::-webkit-scrollbar { width: 4px; }
#control-panel::-webkit-scrollbar-thumb { background: rgba(127,184,255,0.3); border-radius: 4px; }
#control-panel.collapsed {
  width: fit-content; width: -webkit-fit-content;
  padding: 8px 12px; overflow: hidden; cursor: pointer;
  border-radius: 999px; display: flex; align-items: center; gap: 6px;
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 28px;
}
#control-panel.collapsed .panel-header {
  justify-content: flex-start; gap: 8px; width: auto;
}
.panel-header-title { font-size: 12px; letter-spacing: 0.25em; color: var(--ink-dim); white-space: nowrap; }
.panel-content { transition: opacity 0.3s ease, transform 0.35s ease; opacity: 1; transform: scaleY(1); transform-origin: top; }
#control-panel.collapsed .panel-content { position: absolute; visibility: hidden; opacity: 0; pointer-events: none; transform: scaleY(0); }
.panel-toggle {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  border: 1px solid var(--panel-border); background: rgba(127,184,255,0.08);
  color: var(--ink-dim); display: grid; place-items: center;
  transition: all 0.3s; font-size: 14px; line-height: 1;
}
.panel-toggle:hover { border-color: var(--gold); color: var(--gold); background: rgba(127,184,255,0.14); }
#control-panel.collapsed .panel-toggle { width: 24px; height: 24px; font-size: 13px; }
.panel-sec { margin-bottom: 16px; }
.panel-title { font-size: 12px; letter-spacing: 0.25em; color: var(--ink-dim); margin-bottom: 8px; }
.panel-hint { font-size: 11px; color: var(--ink-dim); line-height: 1.7; margin-top: 8px; opacity: 0.8; }
.real-scale-control {
  padding: 12px; border: 1px solid rgba(127,184,255,0.16); border-radius: 12px;
  background: rgba(3, 7, 22, 0.38);
}
.real-scale-heading, .real-scale-label, .scale-ticks { display: flex; align-items: center; justify-content: space-between; }
.real-scale-heading .panel-title { margin-bottom: 0; }
.scale-reset {
  color: var(--accent); font-size: 10px; letter-spacing: 0.08em; padding: 4px 7px;
  border: 1px solid rgba(127,184,255,0.24); border-radius: 6px; transition: color 0.2s, border-color 0.2s;
}
.scale-reset:hover { color: #fff; border-color: rgba(127,184,255,0.55); }
.real-scale-label { margin-top: 12px; color: #b8c6e4; font-size: 11px; }
.real-scale-label output { color: var(--gold); font-variant-numeric: tabular-nums; }
#real-scale-slider { width: 100%; height: 20px; accent-color: var(--gold); }
.scale-ticks { margin-top: -4px; color: rgba(143,163,204,0.66); font-size: 9px; font-variant-numeric: tabular-nums; }
.real-scale-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 10px; }
.real-scale-grid span { min-width: 0; padding: 7px 5px; border-radius: 8px; background: rgba(127,184,255,0.07); }
.real-scale-grid small { display: block; color: var(--ink-dim); font-size: 9px; white-space: nowrap; }
.real-scale-grid b {
  display: block; margin-top: 3px; color: #e8f0ff; font-size: 10px; font-weight: 500;
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.real-scale-formula { margin-top: 9px; }
.real-structure-note { margin-top: 7px; color: rgba(143,163,204,0.68); font-size: 9px; line-height: 1.55; }
.zoom-row { display: flex; align-items: center; gap: 8px; }
.zoom-row input[type="range"] { flex: 1; accent-color: var(--accent); height: 20px; }
.zoom-ico {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--panel-border); color: var(--ink-dim);
  font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center;
  transition: all 0.25s;
}
.zoom-ico:hover { color: var(--gold); border-color: rgba(255,217,160,0.5); }
.view-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.view-preset, .reset-view {
  border: 1px solid var(--panel-border); color: var(--ink-dim); border-radius: 8px;
  min-height: 30px; padding: 6px 8px; font-size: 11px; transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.view-preset:hover, .reset-view:hover { color: var(--ink); border-color: rgba(127,184,255,0.42); background: rgba(127,184,255,0.08); }
.view-preset.active { color: var(--gold); border-color: rgba(255,217,160,0.38); background: rgba(255,217,160,0.08); }
.view-preset:disabled { opacity: 0.34; cursor: not-allowed; background: transparent; }
.reset-view { width: 100%; margin-top: 6px; color: var(--accent); }
.mode-row { display: flex; gap: 6px; }
.mode-btn {
  flex: 1; padding: 8px 0; border-radius: 10px; font-size: 13px;
  border: 1px solid var(--panel-border); color: var(--ink-dim); transition: all 0.3s;
}
.mode-btn:hover { color: var(--ink); border-color: rgba(127,184,255,0.4); }
.mode-btn.active {
  color: #081020; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 14px rgba(127, 184, 255, 0.4);
}
.speed-val { color: var(--gold); letter-spacing: 0; float: right; }
#speed-slider { width: 100%; accent-color: var(--accent); height: 20px; }
.time-readout {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-bottom: 3px; font-variant-numeric: tabular-nums;
}
.time-readout time { color: #edf3ff; font-size: 13px; letter-spacing: 0.03em; }
.time-readout span { color: rgba(143,163,204,0.72); font-size: 9px; white-space: nowrap; }
.time-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 4px; }
.time-actions button {
  min-height: 28px; padding: 5px 3px; border: 1px solid var(--panel-border); border-radius: 7px;
  color: var(--ink-dim); font-size: 10px; transition: color 0.2s, border-color 0.2s, background 0.2s, transform 0.2s;
}
.time-actions button:hover { color: #fff; border-color: rgba(127,184,255,0.45); background: rgba(127,184,255,0.08); }
.time-actions #time-play[aria-pressed="true"] { color: var(--gold); border-color: rgba(255,217,160,0.4); background: rgba(255,217,160,0.08); }
.ephemeris-note { margin-top: 7px; color: rgba(143,163,204,0.62); font-size: 9px; line-height: 1.5; }
.switch-row { display: flex; gap: 18px; }
.switch { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-dim); cursor: pointer; }
.switch input { display: none; }
.switch i {
  width: 34px; height: 18px; border-radius: 999px; background: rgba(255,255,255,0.12);
  position: relative; transition: background 0.3s; flex-shrink: 0;
}
.switch i::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  border-radius: 50%; background: #cdd8f5; transition: transform 0.3s;
}
.switch input:checked + i { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.switch input:checked + i::after { transform: translateX(16px); background: #081020; }

#body-list, #structure-list { display: flex; flex-wrap: wrap; gap: 6px; }
.body-chip {
  padding: 5px 12px; border-radius: 999px; font-size: 12px;
  border: 1px solid var(--panel-border); color: var(--ink-dim); transition: all 0.25s;
}
.body-chip:hover { color: var(--gold); border-color: rgba(255,217,160,0.5); box-shadow: 0 0 10px rgba(255,217,160,0.2); }
.body-chip.active { color: #081020; background: var(--gold); border-color: var(--gold); box-shadow: 0 0 12px rgba(255,217,160,0.32); }
.structure-chip { color: rgba(159, 202, 255, 0.84); }
.structure-chip[data-id="asteroid"] { color: rgba(231, 205, 158, 0.9); }
.structure-chip:disabled { opacity: 0.34; cursor: not-allowed; }
button:active:not(:disabled) { transform: translateY(1px) scale(0.985); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

#stop-follow {
  width: 100%; padding: 9px; border-radius: 10px; font-size: 13px;
  background: rgba(255, 120, 120, 0.12); border: 1px solid rgba(255, 120, 120, 0.35);
  color: #ffb0a8; transition: all 0.3s;
}
#stop-follow:hover { background: rgba(255, 120, 120, 0.22); }

/* ---------------- 观测读数 ---------------- */
#observation-hud {
  position: absolute; right: 18px; bottom: 18px; z-index: 7; width: 250px;
  padding: 12px 13px 11px; border: 1px solid rgba(127,184,255,0.16); border-radius: 14px;
  background: rgba(5, 10, 26, 0.68); backdrop-filter: blur(14px);
  box-shadow: 0 10px 34px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.035);
  transition: opacity 0.25s ease, transform 0.25s ease;
  font-variant-numeric: tabular-nums; pointer-events: none;
}
#observation-hud header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
#observation-hud header span { color: var(--accent); font-size: 10px; letter-spacing: 0.2em; }
#quality-status { color: rgba(143,163,204,0.72); font-size: 9px; font-weight: 400; }
#observation-hud dl { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; }
#observation-hud dl div { min-width: 0; }
#observation-hud dt { color: rgba(143,163,204,0.65); font-size: 9px; }
#observation-hud dd { margin-top: 2px; overflow: hidden; color: #e5edff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.scene-ruler { display: flex; align-items: center; gap: 9px; margin-top: 10px; color: rgba(201,218,250,0.78); font-size: 9px; }
.scene-ruler i {
  position: relative; display: block; width: 72px; height: 7px;
  border-right: 1px solid rgba(201,218,250,0.72); border-bottom: 1px solid rgba(201,218,250,0.72); border-left: 1px solid rgba(201,218,250,0.72);
}
.scene-ruler i::after { content: ""; position: absolute; left: 50%; bottom: 0; height: 3px; border-left: 1px solid rgba(201,218,250,0.55); }

/* ---------------- 星体详情卡片 ---------------- */
#body-card {
  position: absolute; top: 74px; right: 16px; z-index: 10;
  width: min(360px, calc(100vw - 32px)); max-height: calc(100% - 110px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: 20px; padding: 22px; backdrop-filter: blur(18px);
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.06);
  animation: cardIn 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.2);
}
#body-card::-webkit-scrollbar { width: 4px; }
#body-card::-webkit-scrollbar-thumb { background: rgba(127,184,255,0.3); border-radius: 4px; }
@keyframes cardIn { from { opacity: 0; transform: translateX(30px) scale(0.96); } }
#card-close, #ds-modal-close {
  position: absolute; top: 12px; right: 14px; font-size: 14px; color: var(--ink-dim);
  width: 30px; height: 30px; border-radius: 50%; transition: all 0.3s;
}
#card-close:hover, #ds-modal-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
.card-type { font-size: 11px; letter-spacing: 0.3em; color: var(--accent); }
#body-card h2 { font-size: 26px; font-weight: 500; letter-spacing: 0.1em; margin: 4px 0 0; }
.card-en { font-size: 12px; color: var(--ink-dim); letter-spacing: 0.12em; margin-bottom: 12px; }
#card-photo-wrap {
  margin: 0 0 12px; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(159, 190, 255, 0.22);
  box-shadow: 0 6px 24px rgba(0,0,0,0.45), 0 0 30px rgba(127,184,255,0.08);
}
#card-photo { width: 100%; height: auto; display: block; }
#card-photo-cap {
  font-size: 10px; color: var(--ink-dim); padding: 6px 10px;
  background: rgba(127,184,255,0.06); letter-spacing: 0.05em; line-height: 1.5;
}
.card-desc { font-size: 13px; line-height: 1.9; color: #c2cfea; text-align: justify; user-select: text; }
.card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.stat { background: rgba(127, 184, 255, 0.07); border: 1px solid rgba(127,184,255,0.1); border-radius: 10px; padding: 8px 10px; }
.stat-k { font-size: 10px; color: var(--ink-dim); letter-spacing: 0.15em; }
.stat-v { font-size: 12px; color: #e8f0ff; margin-top: 3px; line-height: 1.5; }
.card-facts-wrap ul { list-style: none; }
.card-facts-wrap li {
  font-size: 12px; color: #b8c6e4; line-height: 1.7; padding-left: 16px; position: relative; margin-bottom: 6px;
}
.card-facts-wrap li::before { content: "✦"; position: absolute; left: 0; color: var(--gold); font-size: 9px; top: 4px; }

/* ---------------- 深空板块 ---------------- */
.ds-page {
  overflow-y: auto; padding: 96px 5vw 60px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(60, 40, 120, 0.18), transparent 55%),
    radial-gradient(ellipse at 85% 30%, rgba(30, 70, 140, 0.15), transparent 50%),
    var(--bg);
}
.ds-page::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 15% 25%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(200,215,255,0.6), transparent),
    radial-gradient(1.4px 1.4px at 45% 80%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 85% 15%, rgba(255,233,196,0.6), transparent),
    radial-gradient(1px 1px at 30% 55%, rgba(255,255,255,0.45), transparent);
  background-size: 500px 500px;
}
.ds-head { text-align: center; margin-bottom: 40px; }
.ds-head h2 {
  font-size: clamp(34px, 5vw, 54px); font-weight: 200; letter-spacing: 0.5em; text-indent: 0.5em;
  background: linear-gradient(180deg, #fff, #8fa8e8); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ds-head p { color: var(--ink-dim); margin-top: 10px; font-size: 14px; letter-spacing: 0.2em; }
.ds-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px; max-width: 1400px; margin: 0 auto; position: relative;
}
.ds-card {
  border-radius: 18px; overflow: hidden; cursor: pointer;
  background: rgba(10, 16, 38, 0.6); border: 1px solid var(--panel-border);
  transition: transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2), box-shadow 0.45s, border-color 0.45s;
  animation: cardUp 0.7s ease both;
}
@keyframes cardUp { from { opacity: 0; transform: translateY(28px); } }
.ds-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(159, 190, 255, 0.45);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(127, 184, 255, 0.12);
}
.ds-card canvas { width: 100%; height: auto; display: block; }
.ds-info { padding: 14px 16px 16px; }
.ds-info h3 { font-size: 17px; font-weight: 500; letter-spacing: 0.08em; }
.ds-en { font-size: 11px; color: var(--ink-dim); margin-top: 2px; letter-spacing: 0.1em; }
.ds-type { font-size: 11px; color: var(--accent); margin-top: 6px; letter-spacing: 0.12em; }

/* ---------------- 深空弹窗 ---------------- */
#ds-modal {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(2, 4, 12, 0.82); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity 0.35s;
}
#ds-modal.open { opacity: 1; }
.ds-modal-box {
  position: relative; width: min(880px, 100%); max-height: 92vh; overflow-y: auto;
  background: rgba(10, 16, 38, 0.95); border: 1px solid rgba(159, 190, 255, 0.25);
  border-radius: 22px; box-shadow: 0 30px 90px rgba(0,0,0,0.7), 0 0 60px rgba(127,184,255,0.1);
  transform: scale(0.94) translateY(16px); transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}
#ds-modal.open .ds-modal-box { transform: none; }
.ds-modal-canvas-wrap { border-radius: 22px 22px 0 0; overflow: hidden; position: relative; background: #050818; aspect-ratio: 16 / 10; }
#ds-modal-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-card img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; display: block; }
.ds-card-fallback {
  width: 100%; aspect-ratio: 8 / 5; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #16203f 0%, #050818 70%);
  color: var(--ink-dim); font-size: 14px; letter-spacing: 0.08em;
}
.ds-photo-cap {
  position: absolute; left: 14px; top: 14px; max-width: 62%;
  font-size: 10px; color: rgba(223, 232, 255, 0.85); letter-spacing: 0.05em;
  background: rgba(5, 8, 22, 0.6); border: 1px solid var(--panel-border);
  border-radius: 8px; padding: 4px 10px; backdrop-filter: blur(8px); z-index: 4;
}
/* 统一的底部导航条：永远固定在头图区底部，布局一致、不随图片漂移 */
.ds-stage-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px 14px;
  min-height: 58px;
  background: linear-gradient(to top, rgba(3, 5, 14, 0.92), rgba(3, 5, 14, 0));
}
.ds-thumbs {
  flex: 0 0 auto; display: flex; justify-content: center; align-items: center; gap: 6px; overflow-x: auto;
  padding: 2px 6px; max-width: 100%; min-height: 42px;
  scrollbar-width: thin; scrollbar-color: var(--panel-border) transparent;
}
.ds-thumbs::-webkit-scrollbar { height: 4px; }
.ds-thumbs::-webkit-scrollbar-thumb { background: var(--panel-border); border-radius: 4px; }
.ds-thumbs img {
  flex: none; width: 56px; height: 38px; object-fit: cover; border-radius: 7px; cursor: pointer;
  border: 1px solid transparent; opacity: 0.6; transition: all 0.25s;
}
.ds-thumbs img:hover { opacity: 1; }
.ds-thumbs img.active { border-color: var(--gold); opacity: 1; box-shadow: 0 0 10px rgba(255, 217, 160, 0.45); }
/* 移动端：缩略图条占满宽度并可横向滚动 */
@media (max-width: 760px) {
  .ds-stage-bar { flex-wrap: wrap; padding-bottom: 50px; }
  .ds-thumbs { max-width: 100%; }
}
.band-btn.active {
  color: #081020; font-weight: 600; border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}
.ds-modal-body { padding: 20px 26px 26px; }
.ds-modal-body h2 { font-size: 24px; font-weight: 500; letter-spacing: 0.1em; margin-top: 4px; }
.ds-sec { margin-top: 18px; }
.ds-era {
  font-size: 14px; line-height: 1.9; color: var(--gold);
  background: linear-gradient(90deg, rgba(255,217,160,0.08), transparent);
  border-left: 3px solid rgba(255, 217, 160, 0.5);
  padding: 10px 14px; border-radius: 0 10px 10px 0;
}
.scale-bar { position: relative; height: 74px; margin: 6px 4px 0; }
.scale-track {
  position: absolute; left: 0; right: 0; top: 34px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(127,184,255,0.15), rgba(127,184,255,0.5), rgba(201,162,255,0.5));
}
.scale-mark { position: absolute; top: 0; transform: translateX(-50%); text-align: center; }
.scale-mark i {
  display: block; width: 9px; height: 9px; border-radius: 50%; margin: 31px auto 4px;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
}
.scale-mark.main i { width: 14px; height: 14px; margin-top: 28px; background: var(--gold); box-shadow: 0 0 14px var(--gold); }
.scale-mark span { font-size: 10px; color: var(--ink-dim); line-height: 1.4; display: block; white-space: nowrap; }
.scale-mark.main span { color: var(--gold); font-size: 11px; }
.scale-note { font-size: 11px; color: var(--ink-dim); margin-top: 4px; opacity: 0.8; }
.ds-facts { list-style: none; }
.ds-facts li {
  font-size: 13px; color: #b8c6e4; line-height: 1.8; padding-left: 18px; position: relative; margin-bottom: 8px;
}
.ds-facts li::before { content: "✦"; position: absolute; left: 0; top: 2px; color: var(--accent2); font-size: 10px; }

/* ---------------- 移动端 ---------------- */
@media (max-width: 760px) {
  #topbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .brand { font-size: 15px; }
  #nav { order: 3; width: 100%; justify-content: space-between; }
  .nav-btn { flex: 1; padding: 7px 0; font-size: 13px; }
  .audio-btn span { display: none; }
  .audio-btn { padding: 7px 10px; }
  #control-panel {
    top: auto; bottom: 12px; left: 12px; right: auto; width: auto;
    max-width: calc(100% - 24px); max-height: 42vh; padding: 12px; border-radius: 16px;
  }
  .real-scale-grid b { font-size: 9px; }
  #control-panel.collapsed {
    width: auto; right: auto; border-radius: 999px;
  }
  #control-panel.collapsed .panel-toggle { width: 40px; height: 40px; }
  .view-preset, .reset-view, .body-chip { min-height: 38px; }
  .time-actions button { min-height: 36px; }
  .zoom-ico { width: 34px; height: 34px; }
  .panel-sec { margin-bottom: 12px; }
  #body-card {
    top: 108px; right: 12px; left: 12px; width: auto; max-height: 44vh; padding: 16px;
  }
  #observation-hud { right: 12px; bottom: 12px; width: min(238px, calc(100vw - 24px)); }
  body.body-card-open #observation-hud { opacity: 0; transform: translateY(8px); }
  #solar-hint { bottom: auto; top: 108px; font-size: 11px; width: max-content; max-width: 90vw; }
  .ds-grid { grid-template-columns: 1fr; }
  .ds-page { padding: 120px 16px 40px; }
  .card-stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  #observation-hud, .body-label, #control-panel, .panel-content { transition-duration: 0.01ms; }
}
