/* 星谱 · Star Atlas — Apple iOS / visionOS 毛玻璃质感视觉系统 */

:root {
  --void: #05060a;
  --void-2: #090b10;

  /* Apple iOS Dark Vibrancy / Liquid Glass Tokens */
  --ios-glass-bg: rgba(24, 26, 34, 0.52);
  --ios-glass-bg-dense: rgba(20, 22, 30, 0.66);
  --ios-glass-sheen: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.13) 0%,
    rgba(255, 255, 255, 0.04) 42%,
    rgba(255, 255, 255, 0.015) 100%
  );
  --ios-blur: blur(28px) saturate(185%);
  --ios-blur-heavy: blur(36px) saturate(195%);
  --ios-border: rgba(255, 255, 255, 0.16);
  --ios-border-subtle: rgba(255, 255, 255, 0.09);
  --ios-rim-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  --ios-shadow: 0 22px 54px rgba(0, 0, 0, 0.52), 0 4px 16px rgba(0, 0, 0, 0.28);

  --text-1: rgba(255, 255, 255, 0.96);
  --text-2: rgba(255, 255, 255, 0.66);
  --text-3: rgba(255, 255, 255, 0.42);
  --surface-fill: rgba(255, 255, 255, 0.08);
  --surface-fill-hover: rgba(255, 255, 255, 0.15);

  /* 语义微光点缀（Apple System Colors） */
  --ios-green: #34d399;
  --ios-green-bg: rgba(52, 211, 153, 0.16);
  --ios-amber: #fb923c;
  --ios-amber-bg: rgba(251, 146, 60, 0.16);
  --ios-blue: #60a5fa;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;

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

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--void);
  color: var(--text-1);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── 深空体积极光光幕（透过毛玻璃呈现苹果式色彩透射 Vibrancy） ── */
.cosmos-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 65% at 50% 45%, #0c1224 0%, #05060a 72%);
}

.aurora-shaft {
  position: absolute;
  inset: -18%;
  filter: blur(88px);
  opacity: 0.46;
  will-change: transform;
}

.shaft-cool {
  background:
    radial-gradient(ellipse 28% 58% at 24% 28%, rgba(34, 78, 186, 0.42) 0%, transparent 72%),
    radial-gradient(ellipse 18% 52% at 44% 18%, rgba(165, 216, 255, 0.16) 0%, transparent 70%);
  animation: driftCool 28s ease-in-out infinite alternate;
}

.shaft-warm {
  background:
    radial-gradient(ellipse 26% 54% at 78% 72%, rgba(166, 58, 52, 0.34) 0%, transparent 72%),
    radial-gradient(ellipse 18% 46% at 64% 80%, rgba(232, 111, 92, 0.18) 0%, transparent 70%);
  animation: driftWarm 34s ease-in-out infinite alternate;
}

.cosmos-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 45%, rgba(3, 4, 8, 0.7) 100%);
}

@keyframes driftCool {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 1.5%, 0) scale(1.04); }
}

@keyframes driftWarm {
  from { transform: translate3d(1.5%, 1%, 0) scale(1); }
  to   { transform: translate3d(-2%, -1.5%, 0) scale(1.05); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora-shaft { animation: none; }
}

#graph-container {
  position: fixed;
  inset: 0;
  z-index: 1;
}

/* ── 顶部上滑感应式毛玻璃导航抽屉 ── */
.top-sensor {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 22px;
  z-index: 22;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 7px;
  pointer-events: auto;
  transition: opacity 0.2s var(--ease-ios);
}

.top-handle {
  width: 52px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.16);
  transition: width 0.2s var(--ease-ios), background 0.2s;
}

.top-sensor:hover .top-handle {
  width: 72px;
  background: rgba(255, 255, 255, 0.48);
}

body.nav-open .top-sensor {
  opacity: 0;
  pointer-events: none;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  padding: 0 22px;
  z-index: 24;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(14, 16, 24, 0.5);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.015) 100%);
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
  border-bottom: 1px solid var(--ios-border-subtle);
  box-shadow: inset 0 -0.5px 0 rgba(255, 255, 255, 0.08), 0 12px 36px rgba(0, 0, 0, 0.36);
  transform: translateY(-105%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s var(--ease-ios), opacity 0.22s var(--ease-ios);
}

body.nav-open .top-nav {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-1);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.brand-glyph {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.8);
}

.owner-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.34);
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
}

.owner-badge:hover {
  background: rgba(52, 211, 153, 0.24);
  border-color: rgba(110, 231, 183, 0.55);
  color: #ffffff;
}

.owner-badge.hidden {
  display: none;
}

.nav-divider {
  width: 1px;
  height: 14px;
  background: var(--ios-border);
}

.nav-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.07em;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-shell {
  position: relative;
  display: flex;
  align-items: center;
  width: 244px;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--ios-border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
  transition: border-color 0.2s var(--ease-ios), background 0.2s var(--ease-ios), width 0.25s var(--ease-ios);
}

.search-shell:focus-within {
  width: 286px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
}

.search-ico {
  width: 13px;
  height: 13px;
  color: var(--text-3);
  flex-shrink: 0;
  margin-right: 7px;
}

#search-input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-1);
  font-family: var(--font-sans);
  font-size: 12.5px;
  outline: none;
}

#search-input::placeholder {
  color: var(--text-3);
}

#search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.kbd-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  border: 1px solid var(--ios-border);
  border-radius: 5px;
  padding: 1px 5px;
  margin-left: 6px;
  flex-shrink: 0;
}

.quiet-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--ios-border-subtle);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  transition: color 0.16s, border-color 0.16s, background 0.16s;
}

.quiet-toggle:hover {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.1);
}

.quiet-toggle:has(input:checked) {
  color: var(--text-1);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.quiet-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.quiet-toggle::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  transition: background 0.16s, box-shadow 0.16s;
}

.quiet-toggle:has(input:checked)::before {
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* ── 右下角纯无边框实时律动音乐条 + 流光磨砂弹窗卡（锁定极光冰蓝第一款设计） ── */
.bgm-bare {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  border: none;
  background: transparent;
  box-shadow: none;
  outline: none;
  cursor: pointer;
  opacity: 0.82;
  transition: opacity 0.18s var(--ease-ios), transform 0.18s var(--ease-ios);
}

.bgm-bare:hover,
.bgm-bare[aria-expanded="true"],
.bgm-bare.is-playing {
  opacity: 1;
}

.bgm-bare:hover {
  transform: scale(1.04);
}

.bgm-bare:active {
  transform: scale(0.96);
}

.nav-spectrum-canvas {
  width: 92px;
  height: 22px;
  display: block;
  filter: drop-shadow(0 0 8px rgba(147, 197, 253, 0.25));
}

/* 流光磨砂高颜值派悬浮唱片卡片（从右下角律动音乐条正上方弹出） */
.aura-player {
  --ap-accent: #93c5fd;
  position: fixed;
  bottom: 62px;
  right: 22px;
  width: 304px;
  z-index: 36;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: var(--ios-rim-highlight), 0 28px 72px rgba(0, 0, 0, 0.62);
  background: rgba(16, 18, 28, 0.52);
  transition: opacity 0.22s var(--ease-ios), transform 0.26s var(--ease-ios);
}

.aura-player.hidden {
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
}

/* Apple Music / AMLL 动态流体渐变底层（极光冰蓝第一款设计） */
.ap-mesh {
  position: absolute;
  inset: -24%;
  filter: blur(42px) saturate(165%);
  opacity: 0.64;
  will-change: transform;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 22% 24%, rgba(56, 130, 246, 0.52), transparent 58%),
    radial-gradient(circle at 80% 72%, rgba(139, 92, 246, 0.46), transparent 60%),
    radial-gradient(circle at 52% 90%, rgba(45, 212, 191, 0.34), transparent 55%);
}

/* 上层高饱和磨砂玻璃层 */
.ap-frost-layer {
  position: absolute;
  inset: 0;
  background: rgba(14, 16, 24, 0.44);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 45%, rgba(0, 0, 0, 0.12) 100%);
  backdrop-filter: blur(34px) saturate(195%);
  -webkit-backdrop-filter: blur(34px) saturate(195%);
  pointer-events: none;
}

.ap-content {
  position: relative;
  z-index: 2;
  padding: 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ap-close-btn {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.ap-close-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: var(--text-1);
}

.ap-close-float {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
}

/* 居中 Aura GLSL 能量光晕舞台 + 磨砂玻璃唱片 */
.ap-stage {
  position: relative;
  height: 174px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ap-aura-canvas {
  position: absolute;
  width: 196px;
  height: 196px;
  pointer-events: none;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.14));
}

.ap-disc {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.06) 36%, rgba(12, 14, 22, 0.72) 100%);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1.5px 2px rgba(255, 255, 255, 0.45), 0 14px 36px rgba(0, 0, 0, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.ap-disc-grooves {
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.03), inset 0 0 0 9px rgba(255, 255, 255, 0.09);
}

.ap-disc-core {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
}

.ap-disc-star {
  font-size: 12px;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.85);
}

/* 曲目名称 */
.ap-meta {
  text-align: center;
}

.ap-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 进度条与时间 */
.ap-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ap-time-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.ap-range {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  outline: none;
  cursor: pointer;
}

.ap-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.14s;
}

.ap-range::-webkit-slider-thumb:hover {
  transform: scale(1.22);
}

/* 播控主栏 */
.ap-controls {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 2px;
}

.ap-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.92);
  color: #090b10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff, 0 8px 22px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s var(--ease-ios), background 0.15s;
}

.ap-play-btn:hover {
  background: #ffffff;
  transform: scale(1.05);
}

.ap-play-btn:active {
  transform: scale(0.95);
}

.ap-play-btn .hidden {
  display: none;
}

.ap-vol-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap-vol-ico {
  color: var(--text-2);
  flex-shrink: 0;
}

.ap-vol-num {
  width: 29px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.pill-cta {
  height: 32px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #090b10;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 18px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: background 0.16s, transform 0.16s var(--ease-ios);
  white-space: nowrap;
}

.pill-cta:hover {
  background: #ffffff;
}

.pill-cta:active {
  transform: scale(0.96);
}

/* ── 底部左右编辑感 HUD（中央全留白） ── */
.bottom-hud {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 28px 24px;
  z-index: 15;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 20px;
  pointer-events: none;
}

.hud-col {
  pointer-events: auto;
}

.hud-left {
  max-width: 310px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-3);
  margin-bottom: 6px;
}

.hud-caption {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-2);
  font-weight: 400;
}

/* ── 左侧边缘 Apple iOS 毛玻璃呼出拉耳与浮层 ── */
.left-dock {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
}

.switcher-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.left-tab {
  padding: 14px 11px 14px 9px;
  border-radius: 0 16px 16px 0;
  border: 1px solid var(--ios-border);
  border-left: none;
  background: var(--ios-glass-bg);
  background-image: var(--ios-glass-sheen);
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
  color: var(--text-1);
  box-shadow: var(--ios-rim-highlight), 8px 14px 36px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: padding-left 0.2s var(--ease-ios), background 0.18s, border-color 0.18s;
}

.left-tab:hover,
.left-tab[aria-expanded="true"] {
  padding-left: 13px;
  background-color: rgba(34, 38, 52, 0.62);
  border-color: rgba(255, 255, 255, 0.28);
}

.left-tab-label {
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-1);
  line-height: 1;
}

.capsule-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffffff;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.55);
}

.capsule-icon {
  display: flex;
  flex-direction: column;
  gap: 2.5px;
  width: 11px;
  opacity: 0.72;
}

.capsule-icon span {
  display: block;
  height: 1.3px;
  width: 100%;
  background: var(--text-1);
  border-radius: 1px;
}

/* iOS 毛玻璃弹出星域菜单 */
.switcher-menu {
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(0);
  width: 242px;
  padding: 7px;
  border-radius: 18px;
  background: var(--ios-glass-bg-dense);
  background-image: var(--ios-glass-sheen);
  backdrop-filter: var(--ios-blur-heavy);
  -webkit-backdrop-filter: var(--ios-blur-heavy);
  border: 1px solid var(--ios-border);
  box-shadow: var(--ios-rim-highlight), var(--ios-shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: opacity 0.18s var(--ease-ios), transform 0.22s var(--ease-ios);
}

.switcher-menu.hidden {
  opacity: 0;
  transform: translateY(-50%) translateX(-10px) scale(0.98);
  pointer-events: none;
}

.menu-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-1);
  padding: 9px 11px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
  background: rgba(255, 255, 255, 0.9);
  color: #090b10;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.menu-item-left {
  display: flex;
  align-items: center;
  gap: 9px;
}

.menu-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

.menu-cnt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

/* 右下纯律动音乐条容器 */
.hud-right {
  justify-self: end;
  display: flex;
  align-items: center;
  transition: opacity 0.2s var(--ease-ios);
}

body.drawer-open .hud-right {
  opacity: 0;
  pointer-events: none;
}

.sector-link {
  border: none;
  background: transparent;
  padding: 2px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  text-align: left;
  transition: color 0.15s;
}

.sector-link .idx {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.sector-link:hover,
.sector-link.active {
  color: var(--text-1);
}

.sector-link.active .idx {
  color: #ffffff;
}

/* ── 右侧 Apple iOS / visionOS 深色通透毛玻璃阅读抽屉 ── */
.sheet {
  position: fixed;
  top: 70px;
  right: 18px;
  bottom: 18px;
  width: min(468px, calc(100vw - 36px));
  z-index: 30;
  border-radius: 22px;
  background: var(--ios-glass-bg-dense);
  background-image: var(--ios-glass-sheen);
  backdrop-filter: var(--ios-blur-heavy);
  -webkit-backdrop-filter: var(--ios-blur-heavy);
  color: var(--text-1);
  border: 1px solid var(--ios-border);
  box-shadow: var(--ios-rim-highlight), var(--ios-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.28s var(--ease-ios), opacity 0.22s var(--ease-ios);
}

.sheet.hidden {
  transform: translateX(calc(100% + 28px));
  opacity: 0;
  pointer-events: none;
}

.sheet-top {
  padding: 14px 18px;
  border-bottom: 1px solid var(--ios-border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.sheet-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sheet-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-2);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  padding: 2.5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-pill.is-public {
  color: var(--ios-green);
  background: var(--ios-green-bg);
}

.status-pill.is-private {
  color: var(--ios-amber);
  background: var(--ios-amber-bg);
}

.status-pill.is-owner-unlocked {
  color: #fda4af;
  background: rgba(253, 164, 175, 0.16);
}

.locked-panel {
  margin-top: 14px;
  padding: 22px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ios-border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.locked-panel-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 7px;
}

.locked-panel-desc {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-2);
}

.locked-panel-hint {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-3);
}

.status-pill.is-domain {
  color: var(--text-2);
  background: var(--surface-fill);
}

.sheet-close {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--ios-border-subtle);
  background: var(--surface-fill);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}

.sheet-close:hover {
  color: var(--text-1);
  background: var(--surface-fill-hover);
}

.sheet-head {
  padding: 18px 20px 14px;
}

.sheet-head h2 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.28;
  color: var(--text-1);
}

.sheet-summary {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.62;
  color: var(--text-2);
}

.sheet-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-item {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-2);
  background: var(--surface-fill);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 6px;
}

/* iOS 分段式毛玻璃操作栏 */
.sheet-actions {
  padding: 0 20px 14px;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 7px;
}

.btn-ink, .btn-outline {
  height: 33px;
  padding: 0 10px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s, transform 0.14s var(--ease-ios);
}

.btn-ink {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.9);
  color: #090b10;
  font-weight: 600;
  box-shadow: inset 0 1px 0 #ffffff;
}

.btn-ink:hover:not(:disabled) {
  background: #ffffff;
}

.btn-outline {
  border: 1px solid var(--ios-border-subtle);
  background: var(--surface-fill);
  color: var(--text-1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.btn-outline:hover:not(:disabled) {
  background: var(--surface-fill-hover);
  border-color: var(--ios-border);
}

.btn-ink:active:not(:disabled),
.btn-outline:active:not(:disabled) {
  transform: scale(0.97);
}

.btn-ink:disabled,
.btn-outline:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

/* 关联星链 */
.sheet-relations {
  padding: 12px 20px;
  border-top: 1px solid var(--ios-border-subtle);
  background: rgba(255, 255, 255, 0.025);
}

.sheet-relations.hidden {
  display: none;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-3);
  text-transform: uppercase;
}

.relations-list {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 78px;
  overflow-y: auto;
}

.rel-chip {
  font-family: var(--font-sans);
  font-size: 11.5px;
  line-height: 1.35;
  padding: 4px 10px;
  border-radius: 9px;
  background: var(--surface-fill);
  border: 1px solid var(--ios-border-subtle);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: var(--text-1);
  cursor: pointer;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.rel-chip .rel-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rel-chip:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.9);
  color: #090b10;
}

.rel-chip .rel-sub {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10px;
  flex-shrink: 0;
}

.rel-chip:hover .rel-sub {
  color: rgba(9, 11, 16, 0.6);
}

/* 文档正文阅读区 */
.sheet-body-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--ios-border-subtle);
}

.body-bar {
  padding: 10px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.body-path {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editorial-md {
  flex: 1;
  overflow-y: auto;
  padding: 4px 20px 24px;
  font-size: 13px;
  line-height: 1.72;
  color: rgba(255, 255, 255, 0.84);
}

.editorial-md h1, .editorial-md h2, .editorial-md h3 {
  color: var(--text-1);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 16px 0 8px;
}

.editorial-md h1 { font-size: 17px; }
.editorial-md h2 { font-size: 14.5px; padding-bottom: 5px; border-bottom: 1px solid var(--ios-border-subtle); }
.editorial-md h3 { font-size: 13.5px; }

.editorial-md p { margin: 8px 0; }
.editorial-md ul, .editorial-md ol { padding-left: 18px; margin: 8px 0; }
.editorial-md li { margin: 3px 0; }

.editorial-md code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: rgba(255, 255, 255, 0.09);
  color: #f8fafc;
  padding: 1.5px 5px;
  border-radius: 5px;
}

.editorial-md pre {
  background: rgba(8, 10, 16, 0.55);
  border: 1px solid var(--ios-border-subtle);
  border-radius: 12px;
  padding: 11px 13px;
  overflow-x: auto;
  margin: 10px 0;
}

.editorial-md pre code {
  background: transparent;
  padding: 0;
}

.editorial-md blockquote {
  border-left: 2px solid rgba(255, 255, 255, 0.45);
  padding-left: 12px;
  color: var(--text-2);
  margin: 10px 0;
}

.editorial-md table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 12px;
}

.editorial-md th, .editorial-md td {
  border: 1px solid var(--ios-border-subtle);
  padding: 6px 8px;
  text-align: left;
}

.editorial-md th {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
  color: var(--text-1);
}

.editorial-md a {
  color: var(--ios-blue);
  text-decoration: none;
}

.editorial-md a:hover {
  text-decoration: underline;
}

.editorial-md .wikilink-btn {
  display: inline;
  border: none;
  background: rgba(96, 165, 250, 0.14);
  color: #93c5fd;
  font-family: var(--font-sans);
  font-size: inherit;
  padding: 1px 6px;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.editorial-md .wikilink-btn:hover {
  background: rgba(96, 165, 250, 0.28);
  color: #ffffff;
}

/* 苹果式隐形极细滚动条 */
.editorial-md::-webkit-scrollbar,
.relations-list::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.editorial-md::-webkit-scrollbar-track,
.relations-list::-webkit-scrollbar-track {
  background: transparent;
}

.editorial-md::-webkit-scrollbar-thumb,
.relations-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.editorial-md::-webkit-scrollbar-thumb:hover,
.relations-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.36);
}

/* 极简悬停星名 iOS 毛玻璃微胶囊（几乎不占画布） */
.hover-pill {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  max-width: 240px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  background: rgba(28, 32, 44, 0.56);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 100%);
  backdrop-filter: blur(22px) saturate(185%);
  -webkit-backdrop-filter: blur(22px) saturate(185%);
  color: var(--text-1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34), 0 10px 26px rgba(0, 0, 0, 0.44);
  pointer-events: none;
  will-change: transform, opacity;
  transition: opacity 0.12s var(--ease-ios);
}

.hover-pill.hidden {
  opacity: 0;
  visibility: hidden;
}

.hp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

.hp-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 空搜索结果极简毛玻璃提示 */
.empty-state {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 18;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(24, 26, 36, 0.62);
  background-image: var(--ios-glass-sheen);
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
  border: 1px solid var(--ios-border);
  box-shadow: var(--ios-rim-highlight), 0 14px 36px rgba(0, 0, 0, 0.45);
  color: var(--text-2);
  font-size: 12.5px;
  pointer-events: none;
  transition: opacity 0.18s var(--ease-ios);
}

.empty-state kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-1);
  border: 1px solid var(--ios-border);
  border-radius: 4px;
  padding: 1px 5px;
  margin: 0 2px;
}

.empty-state.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Toast（iOS 灵动胶囊提示） */
.toast {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(28, 32, 44, 0.68);
  background-image: var(--ios-glass-sheen);
  backdrop-filter: var(--ios-blur);
  -webkit-backdrop-filter: var(--ios-blur);
  color: var(--text-1);
  border: 1px solid var(--ios-border);
  box-shadow: var(--ios-rim-highlight), 0 14px 36px rgba(0, 0, 0, 0.45);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  transition: opacity 0.18s var(--ease-ios), transform 0.18s var(--ease-ios);
}

.toast.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(-6px);
  pointer-events: none;
}

@media (max-width: 900px) {
  .hud-left, .nav-mono, .nav-divider { display: none; }
  .search-shell { width: 170px; }
  .search-shell:focus-within { width: 200px; }
}
