/* =========================================================
   site.css — 夜航手册共享外壳
   ========================================================= */

:root {
  --bg-night: #100C1C;
  --bg-glass: #1E1533;
  --grape: #6E3FA8;
  --grape-bright: #A77BE0;
  --red: #C92F4D;
  --mint: #2BE3B2;
  --gold: #F3B94F;
  --paper: #F6F0E6;
  --haze: #C8BEDA;
  --line: #46345F;

  --ink: var(--paper);
  --ink-soft: var(--haze);
  --ink-dim: #948AA8;

  --container-max: 1240px;
  --gutter: clamp(18px, 4vw, 48px);
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --font-display: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 220ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-night);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 520px at 82% -8%, rgba(110, 63, 168, 0.30), transparent 70%),
    radial-gradient(760px 460px at 6% 4%, rgba(201, 47, 77, 0.14), transparent 68%),
    radial-gradient(760px 620px at 50% 110%, rgba(43, 227, 178, 0.10), transparent 70%);
}
body > * { position: relative; z-index: 1; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--paper);
  text-wrap: balance;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: var(--grape-bright); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--mint); }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
::selection { background: var(--grape); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- skip link ---------- */
.site-skip {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translate(-50%, -160%);
  z-index: 200;
  padding: 12px 22px;
  background: var(--paper);
  color: var(--bg-night);
  font-weight: 700;
  font-size: 14px;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform var(--dur) var(--ease);
}
.site-skip:focus,
.site-skip:focus-visible {
  transform: translate(-50%, 0);
  color: var(--bg-night);
  outline: 3px solid var(--mint);
  outline-offset: 2px;
}

/* ---------- 布局基础 ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
}
.col { min-width: 0; }
main { display: block; }
.mono { font-family: var(--font-mono); font-size: 0.86em; letter-spacing: 0.04em; }

/* ---------- 滚动进度 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--grape-bright), var(--mint) 62%, var(--gold));
  z-index: 90;
  pointer-events: none;
  transition: transform 90ms linear;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(16, 12, 28, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.site-header[data-scrolled="true"] {
  background: rgba(16, 12, 28, 0.94);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

.utility-line {
  border-bottom: 1px dashed rgba(70, 52, 95, 0.9);
  background: linear-gradient(90deg, rgba(110, 63, 168, 0.16), rgba(43, 227, 178, 0.06) 60%, transparent);
}
.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.utility-chip { display: inline-flex; align-items: center; gap: 8px; }
.utility-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(43, 227, 178, 0.18);
  animation: soft-pulse 3.2s ease-in-out infinite;
}
.utility-meta { color: var(--ink-dim); white-space: nowrap; }
@keyframes soft-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(43, 227, 178, 0.18); }
  50% { opacity: 0.55; box-shadow: 0 0 0 6px rgba(43, 227, 178, 0.06); }
}

.header-bar { padding-block: 10px; }
.header-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(14px, 2.4vw, 36px);
}

/* 品牌区 */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  padding: 6px 4px;
  border-radius: var(--radius-md);
}
.brand-lockup:hover { color: var(--paper); }
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: linear-gradient(150deg, var(--grape), #45207a 70%);
  border: 1px solid rgba(167, 123, 224, 0.55);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: inset 0 1px 0 rgba(246, 240, 230, 0.18), 0 6px 18px rgba(0, 0, 0, 0.4);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(16px, 1.5vw, 19px);
  letter-spacing: 0.02em;
  color: var(--paper);
}
.brand-tagline {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  text-transform: uppercase;
}

/* 导航 */
.nav-drawer { min-width: 0; }
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 14px);
  flex-wrap: nowrap;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: 14.5px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.nav-index {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--line);
  letter-spacing: 0.06em;
  transition: color var(--dur) var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  background: var(--mint);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--dur) var(--ease);
}
.nav-link:hover {
  color: var(--paper);
  background: rgba(110, 63, 168, 0.22);
  border-color: rgba(167, 123, 224, 0.28);
}
.nav-link:hover .nav-index { color: var(--grape-bright); }
.nav-link:hover::after { transform: scaleX(0.32); }
.nav-link[aria-current="page"] {
  color: var(--paper);
  background: rgba(110, 63, 168, 0.28);
  border-color: rgba(167, 123, 224, 0.45);
}
.nav-link[aria-current="page"] .nav-index { color: var(--mint); }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }

.nav-drawer-foot { display: none; }

/* 头部操作区 */
.header-actions { display: flex; align-items: center; gap: 10px; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--grape), #52258c);
  color: var(--paper);
  border-color: rgba(167, 123, 224, 0.5);
  box-shadow: 0 8px 22px rgba(110, 63, 168, 0.42), inset 0 1px 0 rgba(246, 240, 230, 0.16);
}
.btn-primary:hover {
  color: var(--paper);
  background: linear-gradient(135deg, #8551c6, #61309f);
  box-shadow: 0 12px 30px rgba(110, 63, 168, 0.55), inset 0 1px 0 rgba(246, 240, 230, 0.24);
}
.btn-ghost {
  background: rgba(30, 21, 51, 0.6);
  color: var(--ink-soft);
  border-color: var(--line);
}
.btn-ghost:hover {
  color: var(--paper);
  border-color: var(--grape-bright);
  background: rgba(110, 63, 168, 0.22);
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #d99b2b);
  color: #241703;
  border-color: rgba(243, 185, 79, 0.6);
  box-shadow: 0 8px 22px rgba(243, 185, 79, 0.28);
}
.btn-gold:hover { color: #1a0f02; background: linear-gradient(135deg, #ffce6b, #e5a734); }

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(30, 21, 51, 0.7);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-toggle:hover { color: var(--paper); border-color: var(--grape-bright); }
.nav-toggle-bars { display: grid; gap: 4px; width: 18px; }
.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.site-header[data-open="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header[data-open="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.site-header[data-open="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 移动端导航 ---------- */
@media (max-width: 1080px) {
  .header-grid { grid-template-columns: auto auto; justify-content: space-between; }
  .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }

  .nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(400px, 88vw);
    padding: clamp(84px, 12vh, 120px) 26px 30px;
    background: linear-gradient(170deg, rgba(30, 21, 51, 0.99), rgba(16, 12, 28, 0.99));
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-left: 1px solid var(--line);
    box-shadow: -30px 0 70px rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 240ms var(--ease), visibility 240ms var(--ease);
    z-index: 120;
  }
  .site-header[data-open="true"] .nav-drawer {
    transform: translateX(0);
    visibility: visible;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link {
    justify-content: flex-start;
    padding: 14px 12px;
    font-size: 17px;
    border-bottom: 1px solid rgba(70, 52, 95, 0.55);
    border-radius: 0;
  }
  .nav-link::after { left: 12px; right: auto; width: 0; bottom: 6px; }
  .nav-link:hover::after { width: 26px; transform: none; }
  .nav-link[aria-current="page"]::after { width: 100%; transform: none; bottom: 0; opacity: 0.5; }
  .nav-index { font-size: 12px; }
  .nav-drawer-foot {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px dashed var(--line);
  }
  .nav-drawer-note {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--ink-dim);
  }
}

@media (max-width: 560px) {
  .utility-meta { display: none; }
  .utility-inner { justify-content: flex-start; min-height: 30px; }
  .brand-tagline { display: none; }
  .header-bar { padding-block: 8px; }
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: clamp(64px, 9vw, 120px);
  background:
    linear-gradient(180deg, rgba(30, 21, 51, 0.72), rgba(16, 12, 28, 0.98) 62%),
    repeating-linear-gradient(90deg, transparent 0 78px, rgba(70, 52, 95, 0.20) 78px 79px);
  border-top: 1px solid var(--line);
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--grape), var(--red) 34%, var(--mint) 70%, var(--gold));
  opacity: 0.85;
}
.footer-top { padding-block: clamp(44px, 6vw, 76px) clamp(32px, 4vw, 52px); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.4fr;
  gap: clamp(28px, 4vw, 64px);
}
.footer-col { min-width: 0; }
.footer-logo {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.01em;
  color: var(--paper);
  margin-bottom: 12px;
}
.footer-logo:hover { color: var(--mint); }
.footer-brand-line {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--haze);
  margin-bottom: 14px;
}
.footer-note {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-dim);
  max-width: 40ch;
  margin-bottom: 0;
}
.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(43, 227, 178, 0.09);
  border: 1px solid rgba(43, 227, 178, 0.3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: #9ff2d8;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(43, 227, 178, 0.2);
  animation: soft-pulse 3.4s ease-in-out infinite;
}
.footer-heading {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--grape-bright);
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.footer-links { display: grid; gap: 10px; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 15px;
  transition: color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.footer-links a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line);
  transition: background var(--dur) var(--ease);
  flex: 0 0 auto;
}
.footer-links a:hover { color: var(--mint); transform: translateX(3px); }
.footer-links a:hover::before { background: var(--mint); }
.footer-links-contact { gap: 12px; }
.footer-static {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  color: var(--ink-dim);
}
.footer-static::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line);
  flex: 0 0 auto;
}
.footer-meta {
  border-top: 1px solid var(--line);
  background: rgba(16, 12, 28, 0.75);
}
.footer-meta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  min-height: 56px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}
.footer-icp { color: var(--haze); }
.footer-version { color: var(--ink-dim); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-meta-inner { flex-direction: column; align-items: flex-start; gap: 6px; padding-block: 14px; }
}

/* ---------- 正文容器与章节标题 ---------- */
.page-shell { padding-top: clamp(36px, 5vw, 64px); }
.section { margin-block: clamp(48px, 7vw, 96px); }
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--grape-bright);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
}
.section-title {
  font-size: clamp(30px, 4.2vw, 50px);
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.section-note {
  font-size: 15.5px;
  color: var(--ink-soft);
  max-width: 46ch;
  line-height: 1.75;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  margin-bottom: clamp(20px, 3vw, 34px);
}
.breadcrumb-item { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--line);
}
.breadcrumb-item a { color: var(--haze); }
.breadcrumb-item a:hover { color: var(--mint); }
.breadcrumb-item[aria-current="page"] { color: var(--paper); }

/* ---------- 卡片与玻璃层 ---------- */
.paper-card {
  background: linear-gradient(175deg, #FBF6EC, var(--paper) 55%, #EDE4D5);
  color: #1A1327;
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 34px);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45), inset 0 1px 0 #fff;
  position: relative;
}
.paper-card h2, .paper-card h3, .paper-card h4 { color: #1A1327; }
.paper-card a { color: #5A2A96; }
.paper-card a:hover { color: #B02348; }
.paper-card .mono { color: #6A5C7E; }

.glass-panel {
  background: rgba(30, 21, 51, 0.62);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: inset 0 1px 0 rgba(246, 240, 230, 0.06);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.glass-panel:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 123, 224, 0.5);
  box-shadow: inset 0 1px 0 rgba(246, 240, 230, 0.1), 0 14px 34px rgba(0, 0, 0, 0.38);
}

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.6;
  border: 1px solid transparent;
  white-space: nowrap;
}
.tag-red { background: rgba(201, 47, 77, 0.16); color: #FF8BA1; border-color: rgba(201, 47, 77, 0.5); }
.tag-green { background: rgba(43, 227, 178, 0.14); color: #7BF0D2; border-color: rgba(43, 227, 178, 0.45); }
.tag-gold { background: rgba(243, 185, 79, 0.15); color: #FFD489; border-color: rgba(243, 185, 79, 0.45); }
.tag-purple { background: rgba(110, 63, 168, 0.24); color: #CFAFF4; border-color: rgba(167, 123, 224, 0.5); }

/* ---------- 图片容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background:
    linear-gradient(150deg, rgba(110, 63, 168, 0.35), rgba(16, 12, 28, 0.9)),
    repeating-linear-gradient(45deg, rgba(246, 240, 230, 0.04) 0 8px, transparent 8px 16px);
  aspect-ratio: 16 / 10;
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: linear-gradient(0deg, rgba(16, 12, 28, 0.92), transparent);
}

/* ---------- 标签页 ---------- */
.tabs { margin-block: 24px; }
.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.tab {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tab:hover { color: var(--paper); background: rgba(110, 63, 168, 0.24); }
.tab[aria-selected="true"] {
  color: var(--paper);
  background: rgba(110, 63, 168, 0.38);
  border-color: rgba(167, 123, 224, 0.6);
}
.tab-panel { padding-top: 20px; }
.tab-panel[hidden] { display: none; }

/* ---------- 显现与返回顶部 ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 320ms var(--ease), transform 320ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

.back-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(30, 21, 51, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur) var(--ease), color var(--dur) var(--ease);
}
.back-top[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { color: var(--paper); border-color: var(--grape-bright); }

/* ---------- 响应式网格辅助 ---------- */
@media (max-width: 900px) {
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  body { font-size: 16px; }
}
@media (max-width: 560px) {
  .grid-12 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .scroll-progress { transition: none; }
  .utility-dot, .status-dot { animation: none; }
  .glass-panel:hover, .btn:hover { transform: none; }
}
