/* ============================================================
 * bblabu Docs — 浅色毛玻璃二次元风格
 * 设计：浅色渐变 / 毛玻璃拟态 / 萌系吉祥物 / 动态交互
 * ============================================================ */

:root {
  /* 品牌主色 —— 柔和樱花粉 · 天空蓝 · 薰衣草紫 */
  --sakura: #ffb3d9;
  --sakura-deep: #ff8dc7;
  --sky: #7dd3fc;
  --sky-deep: #38bdf8;
  --violet: #c4b5fd;
  --violet-deep: #a78bfa;
  --mint: #6ee7b7;

  --grad-brand: linear-gradient(135deg, #ffb3d9 0%, #c4b5fd 50%, #7dd3fc 100%);
  --grad-soft: linear-gradient(135deg, rgba(255,179,217,.15), rgba(196,181,253,.12), rgba(125,211,252,.15));
  --grad-hero: linear-gradient(135deg, #fff0f7 0%, #f3f0ff 45%, #f0f9ff 100%);

  /* 中性色 —— 浅色（奶油白） */
  --bg: #fefcff;
  --bg-2: #fdf8ff;
  --surface: rgba(255, 255, 255, 0.85);
  --surface-2: rgba(255, 255, 255, 0.92);
  --surface-3: rgba(255, 255, 255, 0.95);
  --ink: #2d1f3d;
  --ink-2: #5b4a6f;
  --muted: #8b7a9e;
  --line: rgba(196, 181, 253, 0.2);
  --line-2: rgba(255, 179, 217, 0.3);
  --link: #d946ef;

  /* 语义色 */
  --green: #10b981;
  --amber: #f59e0b;
  --danger: #f43f5e;

  /* 阴影（柔和光晕） */
  --shadow-sm: 0 2px 12px rgba(196,181,253,.1), 0 1px 4px rgba(255,179,217,.08);
  --shadow-md: 0 8px 32px rgba(196,181,253,.12), 0 4px 12px rgba(255,179,217,.08);
  --shadow-lg: 0 24px 60px rgba(196,181,253,.18);
  --shadow-glow: 0 8px 32px rgba(255,179,217,.35);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --sidebar-w: 280px;
  --toc-w: 200px;

  color-scheme: light;
}

/* ---------- 深色主题（可选） ---------- */
[data-theme="dark"] {
  --bg: #1a1226;
  --bg-2: #221634;
  --surface: rgba(42, 28, 62, 0.9);
  --surface-2: rgba(50, 31, 75, 0.92);
  --surface-3: rgba(58, 37, 86, 0.95);
  --ink: #f5e8ff;
  --ink-2: #c8b8e0;
  --muted: #8a7ba5;
  --line: rgba(196, 181, 253, 0.25);
  --line-2: rgba(255, 179, 217, 0.4);
  --link: #f0abfc;
  --grad-hero: linear-gradient(135deg, #2d1b3d 0%, #2a1c4a 45%, #1f2c4a 100%);
  --shadow-sm: 0 2px 12px rgba(0,0,0,.3), 0 1px 4px rgba(196,181,253,.1);
  --shadow-md: 0 8px 32px rgba(0,0,0,.35);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
  --shadow-glow: 0 8px 32px rgba(255,179,217,.4);
  color-scheme: dark;
}

/* ---------- 基础 ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,179,217,.06), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(125,211,252,.06), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(196,181,253,.04), transparent 60%);
  font-family: "Zen Maru Gothic", "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .4s ease, color .4s ease;
  min-height: 100vh;
}
body.nav-open { overflow: hidden; }
a { color: var(--link); text-decoration: none; transition: color .2s ease; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 2px; }
code, pre, kbd { font-family: "SF Mono", "JetBrains Mono", ui-monospace, Consolas, monospace; }
::selection { background: rgba(255,179,217,.25); color: var(--ink); }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--sakura); }

/* ---------- 樱花飘落 ---------- */
.sakura-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none !important;
  overflow: hidden;
}
.petal {
  position: absolute; top: -30px;
  color: var(--sakura);
  text-shadow: 0 0 10px rgba(255,179,217,.4);
  animation: fall linear infinite;
  will-change: transform;
  opacity: 0.6;
  pointer-events: none !important;
}
[data-theme="dark"] .petal { color: var(--violet); text-shadow: 0 0 10px rgba(196,181,253,.4); }
@keyframes fall {
  0%   { transform: translate3d(0, -10vh, 0) rotate(0deg); }
  100% { transform: translate3d(15vw, 110vh, 0) rotate(720deg); }
}

/* ---------- 顶部栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
  transition: all .3s ease;
}
[data-theme="dark"] .topbar { background: rgba(26, 18, 38, 0.8); }
.topbar.scrolled { background: rgba(255, 255, 255, 0.9); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .topbar.scrolled { background: rgba(26, 18, 38, 0.95); }
.topbar.compact { transform: translateY(-100%); transition: transform .3s ease; }
.topbar-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px;
  padding: 12px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad-brand);
  display: grid; place-items: center;
  box-shadow: var(--shadow-glow);
  overflow: hidden;
  animation: bob 3s ease-in-out infinite;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(3deg); }
}
.brand-text strong { display: block; color: var(--ink); font-size: 16px; font-weight: 800; line-height: 1; }
.brand-text em { display: block; color: var(--sakura-deep); font-style: normal; font-size: 12px; font-weight: 700; line-height: 1; margin-top: 2px; }
.brand-text small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }

.topnav { display: flex; align-items: center; gap: 2px; flex: 1 1 auto; justify-content: center; }
.topnav a {
  padding: 6px 12px; border-radius: 8px;
  color: var(--ink-2); font-size: 13px; font-weight: 600;
  transition: all .2s ease;
}
.topnav a:hover { background: rgba(255,179,217,.1); color: var(--ink); text-decoration: none; }

.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); cursor: pointer;
  display: grid; place-items: center;
  transition: all .2s ease;
  backdrop-filter: blur(10px);
}
.icon-btn:hover { background: rgba(255,179,217,.1); color: var(--sakura-deep); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .icon-btn { background: var(--surface-2); }
.icon-btn .i-moon { display: none; }
[data-theme="dark"] .icon-btn .i-sun { display: none; }
[data-theme="dark"] .icon-btn .i-moon { display: block; }
.nav-toggle { display: none; }

.scroll-progress {
  position: absolute; bottom: 0; left: 0; height: 2px;
  background: var(--grad-brand);
  width: 0%; transition: width .1s linear;
  box-shadow: 0 0 8px rgba(255,179,217,.4);
}

/* ---------- 布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--toc-w);
  max-width: 1400px; margin: 0 auto;
  gap: 0;
  padding: 0 20px;
}
.page { padding: 8px 28px 60px; min-width: 0; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  position: sticky; top: 80px;
  align-self: start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding: 20px 12px 20px 0;
  scrollbar-width: thin;
}
.sidebar-inner { display: flex; flex-direction: column; gap: 14px; }

.mascot-card {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: var(--grad-hero);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255,255,255,.8);
  backdrop-filter: blur(10px);
}
[data-theme="dark"] .mascot-card { border-color: rgba(255,255,255,.1); }
.mascot-img {
  width: 56px; height: 56px; flex: 0 0 auto;
  border-radius: 50%;
  background: var(--grad-brand);
  cursor: pointer;
  transition: transform .3s ease;
  box-shadow: var(--shadow-glow);
  object-fit: cover;
}
.mascot-img:hover { transform: scale(1.08) rotate(-6deg); }
.mascot-bubble { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.mascot-bubble p { margin: 0 0 3px; }
.mascot-bubble strong { color: var(--sakura-deep); }
.mascot-tag {
  display: inline-block; margin-top: 3px;
  padding: 2px 8px; border-radius: 99px;
  background: rgba(255,179,217,.15);
  color: var(--sakura-deep);
  font-size: 10px; font-weight: 700;
}

.toc { display: flex; flex-direction: column; gap: 2px; }
.toc-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--ink-2); font-size: 13px; font-weight: 600;
  transition: all .2s ease;
  position: relative;
}
.toc-item .num {
  font-size: 10px; font-weight: 800;
  color: var(--muted);
  background: rgba(255,179,217,.1);
  padding: 2px 6px; border-radius: 6px;
  flex: 0 0 auto;
}
.toc-item:hover { background: rgba(255,179,217,.08); color: var(--ink); text-decoration: none; transform: translateX(2px); }
.toc-item.active {
  background: var(--grad-soft);
  color: var(--sakura-deep);
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--sakura);
}

.sidebar-foot {
  margin-top: auto; padding: 12px;
  background: rgba(255,179,217,.06);
  border-radius: var(--radius);
  font-size: 11px; color: var(--muted);
  border: 1px solid var(--line);
}
.sidebar-foot p { margin: 0 0 6px; }
.sidebar-foot .btn { width: 100%; justify-content: center; }
.sidebar-foot .side-cta { margin-bottom: 10px; }
.sidebar-foot .side-cta strong { display: block; font-size: 12px; color: var(--ink); margin-bottom: 2px; }
.sidebar-foot .side-cta a { font-size: 12px; font-weight: 600; }
.sidebar-foot .side-cta small { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.2fr 1fr;
  gap: 28px; align-items: center;
  padding: 40px 32px;
  margin: 20px 0 28px;
  background: var(--grad-hero);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.8);
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}
[data-theme="dark"] .hero { border-color: rgba(255,255,255,.08); }
.hero::before {
  content: "✦"; position: absolute;
  font-size: 180px; color: rgba(255,179,217,.06);
  top: -30px; right: -15px; pointer-events: none;
  animation: spin 25s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hero-badge {
  display: inline-block; padding: 4px 12px;
  background: rgba(255,255,255,.8);
  border: 1px solid var(--sakura);
  color: var(--sakura-deep);
  border-radius: 99px;
  font-size: 11px; font-weight: 700;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1; font-weight: 900;
  letter-spacing: -.5px;
  color: var(--ink);
}
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: grad-shift 6s ease infinite;
}
@keyframes grad-shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.hero-sub { margin: 0 0 20px; font-size: 15px; color: var(--ink-2); max-width: 500px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.hero-tags li {
  padding: 4px 10px; border-radius: 99px;
  background: rgba(255,255,255,.7);
  border: 1px solid var(--line);
  font-size: 11px; font-weight: 600; color: var(--ink-2);
  backdrop-filter: blur(8px);
}

[data-theme="dark"] .hero-tags li {
  background: rgba(42, 28, 62, 0.8);
  border-color: rgba(196, 181, 253, 0.3);
  color: var(--ink);
}

.hero-art {
  position: relative;
  display: grid; place-items: center;
  min-height: 320px;
}
.hero-mascot {
  width: 240px; height: 240px;
  border-radius: 50%;
  background: var(--grad-brand);
  box-shadow: var(--shadow-glow);
  animation: float 4s ease-in-out infinite;
  object-fit: cover;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50%      { transform: translateY(-12px) rotate(2deg); }
}
.float-card {
  position: absolute;
  background: rgba(255,255,255,.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-md);
  font-size: 12px;
  animation: drift 5s ease-in-out infinite;
  backdrop-filter: blur(10px);
}
[data-theme="dark"] .float-card { background: rgba(42,28,62,.9); }
.float-card .ic { font-size: 20px; }
.float-card strong { display: block; color: var(--ink); font-size: 12px; font-weight: 700; }
.float-card small { display: block; color: var(--muted); font-size: 10px; }
.float-card.c1 { top: 8%; left: 0; animation-delay: 0s; }
.float-card.c2 { top: 50%; right: 0; transform: translateY(-50%); animation-delay: 1.2s; }
.float-card.c3 { bottom: 6%; left: 10%; animation-delay: 2.4s; }
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-8px) rotate(1.5deg); }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { box-shadow: 0 10px 30px rgba(255,179,217,.4); color: #fff; }
.btn-ghost {
  background: rgba(255,255,255,.7);
  color: var(--ink);
  border-color: var(--line);
  backdrop-filter: blur(8px);
}
[data-theme="dark"] .btn-ghost { background: rgba(255,255,255,.06); }
.btn-ghost:hover { background: rgba(255,255,255,.9); color: var(--sakura-deep); }
.btn-mini { padding: 5px 10px; font-size: 11px; border-radius: 6px; }
.btn-sm { padding: 6px 12px; font-size: 11px; }

/* ---------- 文档区块 ---------- */
.doc-section {
  margin-top: 18px; padding: 28px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  backdrop-filter: blur(12px);
  scroll-margin-top: 80px;
  box-shadow: var(--shadow-sm);
}
.section-head { margin-bottom: 18px; }
.section-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.2; letter-spacing: -.3px;
  font-weight: 800;
  display: flex; align-items: center; gap: 10px;
}
.sec-emoji { font-size: .85em; filter: drop-shadow(0 2px 4px rgba(255,179,217,.2)); }
.section-head p { margin: 10px 0 0; color: var(--muted); font-size: 14px; max-width: 700px; }

.doc-section h3 {
  margin: 24px 0 10px; font-size: 17px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  color: var(--ink);
}
.doc-section h3::before {
  content: ""; width: 4px; height: 16px; border-radius: 4px;
  background: var(--grad-brand);
  flex: 0 0 auto;
}
.doc-section h4 { margin: 20px 0 6px; font-size: 14px; font-weight: 700; color: var(--ink); }
.doc-section p { color: var(--ink-2); font-size: 14px; }
.doc-section code { background: rgba(255,179,217,.1); padding: 2px 5px; border-radius: 4px; font-size: .85em; color: var(--sakura-deep); }
.doc-section ul, .doc-section ol { color: var(--ink-2); font-size: 14px; }

/* ---------- 购买后使用流程 ---------- */
.purchase-flow-section {
  padding: 26px;
  border-color: rgba(196, 181, 253, .28);
  background: linear-gradient(135deg, rgba(255,255,255,.94), rgba(243,240,255,.72), rgba(240,249,255,.72));
  box-shadow: 0 18px 48px rgba(125, 211, 252, .12), var(--shadow-sm);
}

.support-banner {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(125, 211, 252, .34);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 28px rgba(196, 181, 253, .12);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.support-banner::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--sky), var(--violet), var(--sakura));
}

.support-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(125,211,252,.18), rgba(196,181,253,.2));
  border: 1px solid rgba(255,255,255,.72);
  font-size: 22px;
  box-shadow: var(--shadow-sm);
}

.support-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  padding: 3px 9px;
  margin-bottom: 6px;
  border-radius: 99px;
  background: rgba(125, 211, 252, .14);
  color: var(--sky-deep);
  border: 1px solid rgba(125, 211, 252, .28);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2px;
}

.support-copy strong {
  display: block;
  color: var(--ink);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
  font-weight: 900;
}

.support-copy code {
  font-size: 1em;
  color: #fff;
  background: linear-gradient(135deg, var(--sakura-deep), var(--violet-deep));
  border-radius: 8px;
  padding: 3px 10px;
  box-shadow: 0 8px 20px rgba(167, 139, 250, .26);
}

.support-copy p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}

.purchase-panel {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(196, 181, 253, .3);
  background: rgba(255, 255, 255, .68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.purchase-panel-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
  text-align: left;
}

.purchase-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  background: var(--grad-brand);
  box-shadow: var(--shadow-glow);
  font-size: 23px;
}

.purchase-panel-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  font-weight: 900;
}

.purchase-panel-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.purchase-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  color: var(--ink-2);
}

.purchase-steps li {
  position: relative;
  min-height: 122px;
  padding: 16px 15px 15px 58px;
  border: 1px solid rgba(196, 181, 253, .26);
  border-radius: 14px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  text-align: left;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.purchase-steps li:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 179, 217, .64);
  box-shadow: var(--shadow-md);
}

.purchase-steps li::after {
  content: "";
  position: absolute;
  inset: auto 12px 0;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: linear-gradient(90deg, var(--sakura), var(--violet), var(--sky));
  opacity: .75;
}

.purchase-step-action {
  position: absolute;
  inset: 0;
  display: block;
  padding: 16px 15px 15px 58px;
  color: inherit;
  text-decoration: none;
}

.purchase-step-action:hover {
  text-decoration: none;
}

.purchase-step-action:hover .purchase-step-link {
  background: rgba(125, 211, 252, .16);
  color: var(--sakura-deep);
}

.purchase-steps .step-no {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  position: absolute;
  left: 15px;
  top: 17px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: var(--shadow-glow);
}

.purchase-steps strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.purchase-step-link {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(125, 211, 252, .1);
  border: 1px solid rgba(125, 211, 252, .2);
  color: var(--sky-deep);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.purchase-steps p {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.45;
}

.purchase-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(110, 231, 183, .32);
  background: linear-gradient(135deg, rgba(110,231,183,.11), rgba(255,255,255,.72));
}

.purchase-note strong {
  display: block;
  color: var(--green);
  font-size: 16px;
  font-weight: 900;
  white-space: nowrap;
}

.purchase-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

[data-theme="dark"] .purchase-flow-section {
  background: linear-gradient(135deg, rgba(42,28,62,.94), rgba(31,44,74,.72));
}

[data-theme="dark"] .support-banner {
  background: rgba(42, 28, 62, .84);
  border-color: rgba(125, 211, 252, .28);
}

[data-theme="dark"] .purchase-panel {
  background: rgba(42, 28, 62, .58);
  border-color: rgba(196, 181, 253, .26);
}

[data-theme="dark"] .purchase-steps li {
  background: rgba(58, 37, 86, .72);
}

[data-theme="dark"] .purchase-note {
  background: linear-gradient(135deg, rgba(16,185,129,.14), rgba(42,28,62,.72));
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* ---------- 图片网格 ---------- */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.image-grid.single {
  grid-template-columns: 1fr;
  max-width: 600px;
}

.image-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}

.image-grid img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform .3s ease;
}

.image-grid figure:hover img {
  transform: scale(1.02);
}

.image-grid figcaption {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  background: rgba(255,255,255,.5);
}

[data-theme="dark"] .image-grid figcaption {
  background: rgba(42,28,62,.5);
}

/* ---------- 元信息卡 ---------- */
.doc-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px; margin-top: 16px;
}
.doc-meta > div {
  padding: 12px 14px;
  background: rgba(255,179,217,.06);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .2s ease;
  backdrop-filter: blur(8px);
}
.doc-meta > div:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--sakura); }
.doc-meta dt { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.doc-meta dd { margin: 6px 0 0; color: var(--ink); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }

/* ---------- Callout ---------- */
.callout {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--radius);
  margin: 14px 0; border-left: 3px solid;
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.callout-ico { font-size: 18px; flex: 0 0 auto; line-height: 1; }
.callout strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 13px; }
.callout p { margin: 0; color: var(--ink-2); font-size: 13px; }
.callout-info { border-color: var(--sky); background: linear-gradient(135deg, rgba(125,211,252,.08), transparent); }
.callout-tip  { border-color: var(--green); background: linear-gradient(135deg, rgba(16,185,129,.08), transparent); }
.callout-warn { border-color: var(--amber); background: linear-gradient(135deg, rgba(245,158,11,.08), transparent); }

/* ---------- 步骤列表 ---------- */
.step-list {
  list-style: none; counter-reset: step;
  padding: 0; margin: 12px 0;
  display: grid; gap: 6px;
}
.step-list li {
  position: relative; padding: 10px 14px 10px 48px;
  background: rgba(255,179,217,.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-2);
  counter-increment: step;
  transition: all .2s ease;
  font-size: 13px;
}
.step-list li:hover { transform: translateX(3px); border-color: var(--sakura); }
.step-list li::before {
  content: counter(step);
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: var(--grad-brand);
  color: #fff; font-weight: 800; font-size: 12px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.step-list li b { color: var(--ink); }
.step-list li kbd, .doc-section kbd {
  display: inline-block;
  padding: 2px 6px; border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11px; font-family: inherit; font-weight: 600;
  color: var(--ink);
}

/* ---------- 下载面板 ---------- */
.download-panel {
  margin: 14px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.os-tabs {
  display: flex; gap: 0;
  background: rgba(255,179,217,.06);
  border-bottom: 1px solid var(--line);
}
.os-tab {
  flex: 1; padding: 10px 12px;
  border: none; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .2s ease;
  border-bottom: 2px solid transparent;
}
.os-tab:hover { color: var(--ink); background: rgba(255,179,217,.06); }
.os-tab.active {
  color: var(--sakura-deep);
  border-bottom-color: var(--sakura);
  background: rgba(255,179,217,.08);
}
.os-panel { display: none; padding: 16px; animation: fade-up .3s ease; }
.os-panel.active { display: block; }
.os-panel h3 { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.os-panel h3::before { display: none; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 下载卡 ---------- */
.dl-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.dl-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px;
  background: rgba(255,255,255,.8);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: all .25s ease;
  text-decoration: none;
  color: var(--ink);
  backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .dl-card { background: rgba(42,28,62,.8); }
.dl-card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,179,217,.1), transparent 60%);
  opacity: 0; transition: opacity .3s ease;
}
.dl-card:hover::before { opacity: 1; }
.dl-card:hover {
  transform: translateY(-4px);
  border-color: var(--sakura);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.dl-ic { font-size: 20px; }
.dl-card strong { font-size: 13px; font-weight: 700; color: var(--ink); }
.dl-card small { font-size: 11px; color: var(--muted); font-family: monospace; }
.dl-card em { font-size: 11px; color: var(--ink-2); font-style: normal; }

/* ---------- URL 卡片 ---------- */
.url-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px; margin: 14px 0;
}
.url-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .25s ease;
  backdrop-filter: blur(10px);
}
.url-card:hover {
  transform: translateY(-3px);
  border-color: var(--sakura);
  box-shadow: var(--shadow-md);
}
.url-card.primary {
  border-color: var(--sakura);
  background: linear-gradient(135deg, rgba(255,179,217,.08), rgba(196,181,253,.06));
}
.flag { font-size: 24px; flex: 0 0 auto; }
.url-card-body { flex: 1; min-width: 0; }
.url-card-body strong { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.url-card-body code {
  display: block; margin: 4px 0;
  font-size: 12px; color: var(--sakura-deep);
  background: rgba(255,179,217,.1);
  padding: 4px 8px; border-radius: 6px;
  word-break: break-all;
}
.url-card-body small { display: block; font-size: 11px; color: var(--muted); }

/* ---------- 插件卡 ---------- */
.plugin-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin: 14px 0;
}
.plugin-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .25s ease;
  backdrop-filter: blur(10px);
}
.plugin-card:hover {
  transform: translateY(-3px);
  border-color: var(--sakura);
  box-shadow: var(--shadow-md);
}
.pl-ic { font-size: 24px; display: block; margin-bottom: 8px; }
.plugin-card strong { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.plugin-card p { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.pl-btns { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 代码块 ---------- */
.code-block {
  position: relative;
  margin: 10px 0;
  background: rgba(45, 31, 61, .95);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.code-block pre {
  margin: 0; padding: 14px 16px;
  overflow-x: auto;
  font-size: 12px; line-height: 1.6;
  color: #e8dff5;
}
.code-block .copy-btn {
  position: absolute; top: 8px; right: 8px;
  padding: 4px 10px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  color: #fff; font-size: 10px; font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  z-index: 1;
}
.code-block .copy-btn:hover { background: rgba(255,255,255,.2); }

/* ---------- Q&A ---------- */
.qa {
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all .2s ease;
  background: var(--surface);
}
.qa:hover { border-color: var(--sakura); }
.qa summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
  transition: background .2s ease;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::before { content: "▸ "; color: var(--sakura); }
.qa[open] summary::before { content: "▾ "; }
.qa summary:hover { background: rgba(255,179,217,.06); }
.qa p { padding: 0 16px 12px; margin: 0; color: var(--ink-2); font-size: 13px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin: 14px 0; }
.doc-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.doc-section th {
  text-align: left;
  padding: 10px 12px;
  background: rgba(255,179,217,.08);
  border-bottom: 2px solid var(--line);
  font-weight: 700;
  color: var(--ink);
  font-size: 12px;
}
.doc-section td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.doc-section tr:hover td { background: rgba(255,179,217,.04); }

/* ---------- 列表 ---------- */
.doc-list {
  padding-left: 20px;
  margin: 8px 0;
}
.doc-list li { margin: 4px 0; }

/* ---------- Footer ---------- */
.page-foot {
  margin-top: 40px;
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.page-foot .heart { color: var(--sakura); }

/* ---------- 搜索浮层 ---------- */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,.3);
  backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.search-modal.active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.search-box {
  width: 90%; max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  backdrop-filter: blur(20px);
}
.search-box input {
  width: 100%; padding: 14px 16px;
  border: none; outline: none;
  background: transparent;
  font-size: 15px; color: var(--ink);
  font-family: inherit;
}
.search-box input::placeholder { color: var(--muted); }
.search-results {
  max-height: 320px; overflow-y: auto;
  border-top: 1px solid var(--line);
  transition: opacity 200ms ease, transform 200ms ease;
}
.search-results .hit {
  display: block; padding: 10px 16px;
  color: var(--ink-2); font-size: 13px;
  transition: background .15s ease;
  text-decoration: none;
}
.search-results .hit:hover { background: rgba(255,179,217,.08); }
.search-results .hit strong { display: block; color: var(--ink); font-size: 13px; margin-bottom: 2px; }
.search-results .hit span { font-size: 12px; color: var(--muted); }
.search-results mark { background: rgba(255,179,217,.3); color: var(--ink); border-radius: 2px; padding: 0 2px; }
.search-results .empty { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- 图片灯箱 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.8);
  display: none;
  align-items: center; justify-content: center;
  cursor: zoom-out;
  pointer-events: none;
}

.lightbox.active {
  display: flex !important;
  pointer-events: auto;
}

.lightbox img { max-width: 90%; max-height: 90%; border-radius: var(--radius); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  padding: 8px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 99px;
  font-size: 12px; font-weight: 600;
  opacity: 0; transition: all .3s ease;
  z-index: 400;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 右侧 ToC ---------- */
.right-toc {
  position: sticky; top: 80px;
  align-self: start;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  padding: 20px 0 20px 12px;
  font-size: 12px;
}
.right-toc h4 { margin: 0 0 10px; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.right-toc ul { list-style: none; padding: 0; margin: 0; }
.right-toc li { margin: 2px 0; }
.right-toc a {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 6px;
  color: var(--muted); font-size: 11px;
  transition: all .2s ease;
  text-decoration: none;
}
.right-toc a:hover { background: rgba(255,179,217,.08); color: var(--ink); text-decoration: none; }
.rtoc-emoji { font-size: 10px; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 1024px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed; left: -300px; top: 0; bottom: 0;
    width: 280px; z-index: 150;
    background: var(--surface);
    backdrop-filter: blur(20px);
    transition: left .3s ease;
    padding: 20px;
    border-right: 1px solid var(--line);
  }
  .sidebar.open { left: 0; }
  .sidebar-backdrop {
    position: fixed; inset: 0; z-index: 140;
    background: rgba(0,0,0,.3);
    opacity: 0; pointer-events: none;
    transition: opacity .3s ease;
  }
  .sidebar.open + .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .nav-toggle { display: grid; }
  .right-toc { display: none; }
  .topnav { display: none; }
  .hero { grid-template-columns: 1fr; padding: 28px 20px; }
  .hero-art { display: none; }
  .page { padding: 8px 16px 40px; }
  .doc-section { padding: 20px 18px; }
  .purchase-flow-section { padding: 18px; }
  .support-banner { grid-template-columns: 1fr; text-align: center; }
  .support-icon, .support-badge { margin-left: auto; margin-right: auto; }
  .support-banner .btn { justify-content: center; }
  .purchase-panel { padding: 18px; }
  .purchase-panel-head { justify-content: flex-start; }
  .purchase-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .purchase-note { align-items: flex-start; flex-direction: column; }
  .purchase-note strong { white-space: normal; }
  .purchase-note p { text-align: left; }
  .url-cards { grid-template-columns: 1fr; }
  .dl-grid { grid-template-columns: 1fr; }
  .plugin-cards { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar-inner { padding: 10px 16px; }
  .brand-text small { display: none; }
  .hero h1 { font-size: 24px; }
  .doc-meta { grid-template-columns: 1fr 1fr; }
  .purchase-panel-head { align-items: flex-start; }
  .purchase-mark { width: 42px; height: 42px; border-radius: 14px; }
  .purchase-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .purchase-steps li { min-height: 116px; }
}

@media (max-width: 420px) {
  .purchase-steps { grid-template-columns: 1fr; }
}

/* ---------- 链接列表样式 ---------- */
.doc-list a {
  color: var(--link);
  transition: color .2s ease;
}
.doc-list a:hover {
  color: var(--sakura-deep);
}

/* ---------- 滚动到顶部按钮 ---------- */
.to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--grad-brand);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-glow);
  opacity: 0; transform: translateY(20px);
  transition: all .3s ease;
  z-index: 100;
}
.to-top.visible { opacity: 1; transform: translateY(0); }
.to-top:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(255,179,217,.5); }
.to-top svg { width: 18px; height: 18px; }
