:root {
  --bg: #08070f;
  --bg-2: #0d0b18;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --text: #ece9f7;
  --muted: #9c96b3;
  --primary: #a78bfa;
  --primary-2: #7c5cff;
  --accent: #fbbf24;
  --green: #34d399;
  --radius: 18px;
  --container: 1120px;
  --scroll-thumb: rgba(255, 255, 255, 0.18);
  --scroll-thumb-hover: rgba(167, 139, 250, 0.65);
  color-scheme: dark;
}

* { box-sizing: border-box; }

/* 背景图比容器更宽，横向出血到视口边距，禁止横向滚动 */
html { overflow-x: clip; }

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}

/* ── 滚动条 ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover);
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-corner { background: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(600px 400px at 15% 8%, rgba(124, 92, 255, 0.16), transparent 60%),
    radial-gradient(700px 500px at 85% 20%, rgba(167, 139, 250, 0.1), transparent 60%),
    radial-gradient(500px 400px at 50% 100%, rgba(251, 191, 36, 0.05), transparent 60%),
    linear-gradient(180deg, #08070f, #0a0814 60%, #08070f);
}

.i { width: 1.35em; height: 1.35em; display: block; flex: none; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: #c4b5fd; }
img { max-width: 100%; height: auto; display: block; }
code, pre { font-family: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace; }

.container { width: min(var(--container), 100% - 48px); margin-inline: auto; }
.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* ── 顶栏 ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(8, 7, 15, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 18px; letter-spacing: 0.2px; }
.brand img { border-radius: 8px; }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a { color: var(--muted); font-size: 14.5px; }
.nav a:hover, .nav a.active { color: var(--text); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 10px; width: 38px; height: 38px; font-size: 17px; cursor: pointer; }

/* ── 按钮 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 20px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: #efeaff;
  background: rgba(124, 92, 255, 0.14);
  border-color: rgba(178, 152, 255, 0.62);
  box-shadow: inset 0 0 24px rgba(124, 92, 255, 0.22), 0 4px 14px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(12px);
}
.btn-primary:hover {
  color: #fff;
  background: rgba(124, 92, 255, 0.26);
  border-color: rgba(205, 186, 255, 0.85);
  box-shadow: inset 0 0 30px rgba(124, 92, 255, 0.3), 0 6px 18px rgba(0, 0, 0, 0.3);
}
.btn-ghost { border-color: var(--border); background: var(--panel); color: var(--text); }
.btn-ghost:hover { background: var(--panel-2); color: var(--text); }
.btn-sm { height: 34px; padding: 0 15px; font-size: 13px; }

/* ── Hero ── */
.hero { padding: clamp(72px, 9vw, 108px) 0 clamp(40px, 5vw, 56px); position: relative; }
.hero .container { position: relative; z-index: 3; }
.eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: 0.08em;
  color: var(--primary); text-transform: uppercase;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 999px; padding: 5px 14px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.5rem, 7.2vw, 5.2rem); line-height: 1.08; margin: 0 0 26px; letter-spacing: -0.03em; text-wrap: balance; }
.grad { background: linear-gradient(100deg, #c4b5fd, #a78bfa 45%, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 18px; color: var(--muted); max-width: 520px; margin: 0 0 30px; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 26px; list-style: none; padding: 0; margin: 36px 0 0; color: var(--muted); font-size: 13.5px; }
.hero-facts li::before { content: "✦"; color: var(--primary); margin-right: 7px; }

.hero-shot { margin: 0; position: relative; }
.hero-shot::before {
  content: ""; position: absolute; inset: -14% -10% -18%; z-index: -1;
  background: radial-gradient(closest-side, rgba(124, 92, 255, 0.28), transparent 72%);
  filter: blur(8px);
}
.hero-shot img {
  border-radius: 16px; border: 1px solid var(--border); width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(167, 139, 250, 0.08);
  transition: transform 0.25s ease-out;
}
/* 首屏背景图：模糊 + 压暗，让压在上面的文字可读；点左下角按钮看清晰原图 */
.qs-media { position: relative; border-radius: 16px; overflow: hidden; }
/* 文字区的压暗层：从页面底色渐隐到透明，只跟随图片，不会在页面上切出一条横线 */
.qs-media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg,
    var(--bg) 0%,
    color-mix(in srgb, var(--bg) 58%, transparent) 26%,
    transparent 50%,
    transparent 82%,
    var(--bg) 100%);
}
.qs-media img {
  display: block; --bg-blur: 3.5px;
  filter: blur(var(--bg-blur)) brightness(0.78);
  transform: scale(1.02);
  transition: filter 0.7s ease, opacity 0.7s ease;
}
.qs-media:hover img { --bg-blur: 2px; }
.qs-media img.shot-blur { --bg-blur: 18px; opacity: 0.4; }
.qs-media img.shot-blur.is-loaded { filter: blur(3.5px) brightness(0.78); opacity: 1; }

.shot-zoom {
  position: relative; z-index: 3;
  margin-top: 22px;
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px; cursor: pointer;
  font-size: 13px; color: var(--text);
  background: rgba(12, 10, 22, 0.72); border: 1px solid var(--border-strong);
  border-radius: 999px; backdrop-filter: blur(10px);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.shot-zoom:hover { border-color: var(--primary); background: rgba(20, 17, 33, 0.9); }

/* 放大查看 */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  place-items: center; padding: 40px;
  background: rgba(4, 3, 10, 0.92); backdrop-filter: blur(8px);
}
.lightbox.open { display: grid; }
.lightbox img {
  max-width: min(1280px, 100%); max-height: 86vh;
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7);
}
.lightbox-close {
  position: absolute; top: 22px; right: 22px; width: 40px; height: 40px;
  display: grid; place-items: center; cursor: pointer; color: var(--text);
  font-size: 20px; line-height: 1; border-radius: 50%;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-strong);
}
.lightbox-close:hover { border-color: var(--primary); }
body.lightbox-open { overflow: hidden; }

/* 只有指针真的在动时才上 3D 变换：静态不经过 GPU 重采样，图片保持像素级清晰 */
.hero-shot.tilting img {
  will-change: transform;
  transform: perspective(1400px) rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg));
}
.shot-blur { filter: blur(18px); opacity: 0.45; }
.shot-blur.is-loaded { filter: none; opacity: 1; transition: filter 0.7s ease, opacity 0.7s ease; }

.hero-shot figcaption, .world-shot figcaption, .gallery figcaption {
  margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center;
}

/* ── 板块 ── */
.section { padding: clamp(52px, 5.6vw, 68px) 0; }
.section-head { max-width: 760px; margin-bottom: 30px; }
.section-head h2, .section h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.25; margin: 0 0 14px; letter-spacing: -0.01em; }
.section-sub, .prose-lead { color: var(--muted); font-size: 17px; }
.prose-lead { margin: 0; }

.quote {
  margin: 28px 0 0; padding: 22px 26px; border-left: 3px solid var(--primary);
  background: var(--panel); border-radius: 0 14px 14px 0; color: var(--muted); font-size: 15.5px;
}

.grid { display: grid; gap: 18px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  display: block; background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.32s ease, background 0.4s ease;
}
.card:hover { transform: translateY(-3px); border-color: rgba(167, 139, 250, 0.35); background: linear-gradient(180deg, rgba(167,139,250,0.07), rgba(255,255,255,0.02)); }
.card h3 { margin: 0 0 8px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.feature-icon {
  width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 18px;
  border-radius: 13px; color: #c4b5fd;
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.2), rgba(167, 139, 250, 0.05));
  border: 1px solid rgba(167, 139, 250, 0.22);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.feature-icon .i { width: 21px; height: 21px; }
.card:hover .feature-icon { color: #ddd6fe; border-color: rgba(196, 181, 253, 0.4); }

/* ── 群视界 ── */
.world-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.world-shot { margin: 0; }
.world-shot img { border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.world-copy p { color: var(--muted); }
.checked { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 14px; }
.checked li { position: relative; padding-left: 30px; font-size: 14.5px; }
.checked li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 6px; background: rgba(52, 211, 153, 0.12); color: var(--green); font-size: 12px; display: grid; place-items: center; }
.checked li strong { display: block; color: var(--text); font-weight: 600; }
.checked li span { color: var(--muted); }
.link-row { margin-top: 18px; }
.text-link { font-size: 14.5px; font-weight: 600; }
.text-link:hover { text-decoration: underline; }

/* ── chips / 代码 ── */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { font-size: 13.5px; color: var(--muted); border: 1px solid var(--border); background: var(--panel); border-radius: 999px; padding: 6px 14px; }
#quickstart { margin-top: -470px; padding-top: 0; }
.quickstart-grid { position: relative; display: block; z-index: 1; }
.qs-shot img {
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.75) 14%, #000 32%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.75) 14%, #000 32%);
}
.qs-shot { position: relative; z-index: 1; width: 120%; margin: 0 0 0 -10%; }
.qs-shot figcaption { text-align: left; max-width: 46%; }
.qs-code {
  position: relative; z-index: 2; width: max-content; max-width: 100%;
  margin: -44% 0 0 auto; padding: 26px 28px 28px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}
.qs-code .eyebrow { margin-bottom: 16px; }
.qs-code h2 { margin-bottom: 20px; }
.qs-code .muted.small { max-width: 54ch; margin: 14px 0 0; text-wrap: pretty; }
.qs-code pre.code { font-size: 12.5px; padding: 18px 20px; white-space: pre; overflow-x: auto; }
.qs-notes-title {
  position: relative; z-index: 2; text-align: center; margin: 26px 0 0;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted);
}
.qs-notes {
  position: relative; z-index: 2;
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 32px;
  margin: 6px 0 0; font-size: 13px; color: var(--muted);
}
.qs-notes li::before { content: "✓"; color: var(--green); margin-right: 9px; }
.code-card { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #0b0913; margin: 24px 0 16px; }
.code-bar {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 14px;
  background: rgba(255, 255, 255, 0.03); border-bottom: 1px solid var(--border);
}
.code-dots { display: inline-flex; gap: 6px; }
.code-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.code-dots i:nth-child(1) { background: rgba(248, 113, 113, 0.55); }
.code-dots i:nth-child(2) { background: rgba(251, 191, 36, 0.5); }
.code-dots i:nth-child(3) { background: rgba(52, 211, 153, 0.5); }
.code-lang { font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

pre.code {
  position: relative;
  background: #0b0913; border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px; overflow-x: auto; font-size: 13.5px; line-height: 1.75;
  margin: 24px 0 14px; color: #d8d3ea;
}
pre.code code { background: none; padding: 0; }
.code-card pre.code { margin: 0; border: 0; border-radius: 0; background: transparent; }
.code-card pre.code code { background: none; }
.note-card { align-self: start; }
.note-card h3 { margin-bottom: 14px; }
.note-card .checked { margin: 0; }

/* ── 截图墙 ── */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.gallery figure { margin: 0; position: relative; perspective: 1000px; }
.gallery img {
  border-radius: 14px; border: 1px solid var(--border); width: 100%;
  aspect-ratio: 16 / 10; object-fit: cover; object-position: top center;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  transform: translateY(var(--lift, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.2s ease-out, border-color 0.25s ease;
  will-change: transform;
}
.gallery figure:hover img { --lift: -3px; border-color: rgba(167, 139, 250, 0.35); }
/* 指针落点的柔光，跟着 --mx / --my 走；高度对齐 16:10 的图，不盖住图注 */
.gallery figure::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 16 / 10;
  border-radius: 14px; pointer-events: none; opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.09), transparent 62%);
  transition: opacity 0.25s ease;
}
.gallery figure:hover::after { opacity: 1; }
.gallery figcaption { display: flex; align-items: baseline; gap: 10px; text-align: left; }
.shot-no { font-size: 11.5px; letter-spacing: 0.1em; color: rgba(167, 139, 250, 0.75); font-variant-numeric: tabular-nums; }

/* 滚动淡入：类由 app.js 在首屏之外的元素上添加，无 JS 时内容照常显示 */
.reveal { opacity: 0; translate: 0 20px; transition: opacity 0.6s ease, translate 0.6s cubic-bezier(0.2, 0.7, 0.3, 1); }
.reveal-in { opacity: 1; translate: 0 0; }

.doc-card { display: flex; flex-direction: column; }
.doc-card .text-link { margin-top: auto; padding-top: 14px; }

/* ── 联邦示意 ── */
.plug-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.plug-visual { margin: 0; }
.plug-diagram {
  display: grid; grid-template-columns: 1fr 68px 1fr; align-items: center; gap: 0;
  padding: 26px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
}
.plug-node {
  display: grid; gap: 2px; padding: 16px 12px; border-radius: 12px;
  background: rgba(167, 139, 250, 0.07); border: 1px solid rgba(167, 139, 250, 0.2); text-align: center;
}
.plug-node strong { font-size: 14.5px; }
.plug-node span { font-size: 12px; color: var(--muted); }
.plug-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin: 0 auto 6px; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.16); }
.plug-wire { position: relative; height: 2px; background: repeating-linear-gradient(90deg, rgba(167, 139, 250, 0.7) 0 6px, transparent 6px 12px); }
.plug-wire::after {
  content: ""; position: absolute; right: -1px; top: -3px; width: 8px; height: 8px;
  border-top: 2px solid rgba(167, 139, 250, 0.8); border-right: 2px solid rgba(167, 139, 250, 0.8);
  transform: rotate(45deg);
}
.plug-wire-label {
  position: absolute; left: 50%; top: -26px; transform: translateX(-50%);
  font-size: 11.5px; color: var(--muted); white-space: nowrap;
}
.plug-visual figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); text-align: center; }

/* ── CTA 横幅 ── */
.cta-band { padding: 72px 0; }
.cta-band-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
  background: linear-gradient(120deg, rgba(124, 92, 255, 0.2), rgba(167, 139, 250, 0.06));
  border: 1px solid rgba(167, 139, 250, 0.25); border-radius: 22px; padding: 40px 44px;
}
.cta-band h2 { margin: 0 0 8px; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cta-band p { margin: 0; color: var(--muted); }

/* ── 页脚 ── */
.site-footer { border-top: 1px solid var(--border); padding: 52px 0 40px; margin-top: 24px; background: rgba(0, 0, 0, 0.25); }
.footer-inner { display: flex; flex-direction: column; gap: 34px; }
.footer-top { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: start; }
.footer-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 17px; }
.footer-brand img { border-radius: 8px; }
.footer-brand p { margin: 2px 0 0; font-weight: 400; font-size: 12.5px; color: var(--muted); letter-spacing: 0.02em; }
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap: 32px; }
.footer-cols h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.footer-cols a { display: block; color: #cfc9e4; font-size: 13.5px; margin-bottom: 9px; }
.footer-cols a:hover { color: var(--primary); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-top: 22px; border-top: 1px solid var(--border);
}
.footer-note { margin: 0; color: var(--muted); font-size: 12.5px; }
.footer-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

/* ── Wiki ── */
.wiki-shell {
  display: grid; grid-template-columns: 240px minmax(0, 1fr) 200px;
  gap: 44px; width: min(1240px, 100% - 48px); margin: 40px auto 60px; align-items: start;
}
.wiki-side { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 6px; }
.search { display: block; margin-bottom: 22px; }
.search span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: 0.04em; }
.search input {
  width: 100%; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); padding: 0 12px; font-size: 13.5px; outline: none;
}
.search input:focus { border-color: rgba(167, 139, 250, 0.5); }
.side-group { margin-bottom: 20px; }
.side-title { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.side-link { display: block; padding: 6px 10px; margin-left: -10px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.side-link:hover { color: var(--text); background: var(--panel); }
.side-link.active { color: var(--text); background: rgba(167, 139, 250, 0.12); font-weight: 600; }

.wiki-main { min-width: 0; }
.breadcrumb { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.wiki-title { font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin: 0 0 6px; line-height: 1.2; }
.wiki-source { margin: 0 0 26px; }
.wiki-source a { color: var(--muted); }
.wiki-source a:hover { color: var(--primary); }

.wiki-toc { position: sticky; top: 88px; font-size: 13px; }
.toc-title { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.wiki-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.wiki-toc li { margin: 0; }
.wiki-toc a { display: block; padding: 4px 0 4px 14px; color: var(--muted); border-left: 1px solid transparent; margin-left: -1px; }
.wiki-toc a:hover, .wiki-toc a.active { color: var(--text); border-left-color: var(--primary); }

/* ── 正文排版 ── */
.prose { font-size: 15.5px; line-height: 1.85; color: #dcd7ec; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--text); line-height: 1.3; scroll-margin-top: 90px; }
.prose h1 { font-size: 1.9rem; margin: 0 0 18px; }
.prose h2 { font-size: 1.45rem; margin: 2.4em 0 0.8em; padding-top: 1.1em; border-top: 1px solid var(--border); }
.prose h3 { font-size: 1.15rem; margin: 1.9em 0 0.6em; }
.prose h4 { font-size: 1rem; margin: 1.6em 0 0.5em; }
.prose p { margin: 0 0 1.1em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(167, 139, 250, 0.4); }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin: 0.3em 0; }
.prose li > p { margin: 0; }
.prose blockquote { margin: 1.4em 0; padding: 12px 18px; border-left: 3px solid var(--primary); background: var(--panel); color: var(--muted); border-radius: 0 10px 10px 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { background: rgba(167, 139, 250, 0.12); border: 1px solid rgba(167, 139, 250, 0.16); padding: 1px 6px; border-radius: 6px; font-size: 0.88em; }
.prose pre { background: #0b0913; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; overflow-x: auto; font-size: 13px; line-height: 1.7; margin: 1.4em 0; position: relative; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose img { border-radius: 12px; border: 1px solid var(--border); margin: 1.4em auto; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.2em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.4em 0; font-size: 14px; }
.table-wrap { overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--panel-2); color: var(--text); }
.prose tr:nth-child(even) td { background: rgba(255, 255, 255, 0.02); }
.prose details { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin: 1em 0; }
.prose summary { cursor: pointer; color: var(--text); }

.page-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }
.page-nav a { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 15px; max-width: 48%; }
.page-nav a span { font-size: 12px; color: var(--muted); font-weight: 400; }
.page-nav .next { text-align: right; margin-left: auto; }

.copy-btn {
  position: absolute; top: 8px; right: 8px; font-size: 12px; color: var(--muted);
  background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 7px;
  padding: 3px 9px; cursor: pointer; opacity: 0; transition: opacity 0.15s;
}
pre:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--text); }

/* ── 文档页补充 ── */
.prose div[align="center"] { margin: 0 0 1.4em; }
.prose div[align="center"] > h1 { font-size: 1.6rem; }
.prose div[align="center"] > p { margin: 0.4em 0; }
.prose div[align="center"] blockquote {
  border-left: 0; border: 1px solid rgba(167, 139, 250, 0.22);
  background: rgba(167, 139, 250, 0.06); border-radius: 14px;
  padding: 18px 22px; text-align: center; color: #cfc9e4;
}
.prose div[align="center"] img { margin-inline: auto; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45); }
.prose sub { color: var(--muted); font-size: 12.5px; }

.side-toggle {
  display: none; width: 100%; align-items: center; justify-content: space-between;
  height: 40px; padding: 0 14px; margin-bottom: 14px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--text);
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
}
.side-toggle-icon { color: var(--muted); transition: transform 0.2s ease; }
.side-toggle[aria-expanded="true"] .side-toggle-icon { transform: rotate(180deg); }

/* 回到顶部 */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
  color: var(--text); background: rgba(20, 17, 33, 0.86);
  border: 1px solid var(--border); backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.to-top svg { display: block; }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: rgba(167, 139, 250, 0.5); background: rgba(30, 25, 48, 0.95); }
.to-top.show:hover { transform: translateY(-2px); }

:focus-visible { outline: 2px solid rgba(167, 139, 250, 0.75); outline-offset: 2px; border-radius: 6px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ── 响应式 ── */
@media (max-width: 1080px) {
  .wiki-shell { grid-template-columns: 220px minmax(0, 1fr); }
  .wiki-toc { display: none; }
}
@media (max-width: 940px) {
  .world-grid { grid-template-columns: 1fr; gap: 36px; }
  #quickstart { margin-top: 0; padding-top: 0; }
  .qs-shot { width: 100%; margin: 0; }
  .qs-shot img { -webkit-mask-image: none; mask-image: none; }
  .qs-shot figcaption { max-width: none; text-align: center; }
  .qs-code { width: 100%; margin: 26px 0 0; padding: 0; background: none; border: 0; box-shadow: none; }
  .hero { padding: 56px 0; }
  .hero-shot img { transform: none; }
  .cards-3, .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    flex-direction: column; gap: 4px; padding: 14px 24px 20px;
    background: rgba(8, 7, 15, 0.98); border-bottom: 1px solid var(--border);
  }
  .nav.open { display: flex; }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .wiki-shell { grid-template-columns: 1fr; gap: 0; }
  .wiki-side { position: static; max-height: none; padding: 0; margin-bottom: 18px; }
  .side-toggle { display: inline-flex; }
  .side-inner { display: none; padding-bottom: 4px; }
  .side-inner.open { display: block; }
  .side-link { display: inline-block; margin: 0 6px 6px 0; border: 1px solid var(--border); }
  .side-group { margin-bottom: 12px; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .plug-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 620px) {
  .container { width: calc(100% - 32px); }
  .cards-3, .cards-4, .gallery { grid-template-columns: 1fr; }
  .cta-band-inner { padding: 28px 24px; }
  .hero-facts { gap: 6px 14px; }
  .wiki-shell { width: calc(100% - 32px); margin-top: 24px; }
  .page-nav { flex-direction: column; }
  .page-nav a { max-width: 100%; }
  .page-nav .next { text-align: left; }
  .section { padding: 48px 0; }
  .hero { padding: 48px 0 40px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .plug-diagram { grid-template-columns: 1fr 40px 1fr; padding: 18px 12px; }
  .plug-node { padding: 12px 6px; }
  .to-top { right: 14px; bottom: 14px; }
}
