@font-face {
  font-family: "Fusion Pixel 12px SC";
  src: url("./assets/fusion-pixel-12px-proportional-zh_hans.otf.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  color-scheme: dark;
  --bg: #0b0d0c;
  --panel: #101310;
  --panel-2: #151915;
  --panel-3: #1a1f1a;
  --line: #2a302a;
  --line-soft: #202520;
  --text: #f2f4ef;
  --muted: #929a90;
  --faint: #626a61;
  --green: #a7ef77;
  --green-strong: #83cc53;
  --green-dim: #22361c;
  --orange: #f0a35a;
  --blue: #80b7ff;
  --sidebar: 264px;
  --topbar: 64px;
  --radius: 8px;
  --font: "Fusion Pixel 12px SC", "Microsoft YaHei", "PingFang SC", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.7; }
button, input { font: inherit; }
a { color: var(--green); text-decoration: none; }
a:hover { color: #c4ff9f; }
code, pre { font-family: var(--font); }
code { color: #d5ffc0; }
::selection { color: #071006; background: var(--green); }

.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 10px 14px; color: #071006; background: var(--green); border-radius: 4px; transition: top .15s ease; }
.skip-link:focus { top: 10px; }

.topbar { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--topbar); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(11, 13, 12, .96); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark, .brand-mini { display: inline-grid; place-items: center; color: #10200c; background: var(--green); font-weight: 700; box-shadow: inset -3px -3px 0 var(--green-strong); }
.brand-mark { width: 32px; height: 32px; font-size: 22px; border-radius: 6px; transform: skew(-8deg); }
.brand-name { font-size: 18px; letter-spacing: .02em; }
.brand-divider { width: 1px; height: 20px; background: var(--line); }
.brand-docs { color: var(--muted); font-size: 14px; }
.top-actions { display: flex; align-items: center; gap: 20px; }
.top-link { color: #c8cec6; font-size: 14px; }
.search-trigger { width: 260px; height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; background: var(--panel); cursor: pointer; }
.search-trigger:hover { border-color: #465044; background: var(--panel-2); }
.search-trigger svg, .search-input-wrap svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-trigger span { flex: 1; text-align: left; }
kbd { color: var(--faint); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; background: #0b0e0b; font-size: 12px; }
.mobile-menu { display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 5px; background: transparent; }
.mobile-menu span { display: block; width: 17px; height: 1px; margin: 4px auto; background: var(--text); }

.shell { min-height: 100vh; padding-top: var(--topbar); }
.sidebar { position: fixed; inset: var(--topbar) auto 0 0; z-index: 40; width: var(--sidebar); display: flex; flex-direction: column; padding: 28px 22px 18px 28px; overflow-y: auto; border-right: 1px solid var(--line); background: #0d100e; }
.sidebar nav { flex: 1; }
.nav-label { margin: 24px 0 8px; color: var(--faint); font-size: 11px; letter-spacing: .13em; }
.nav-label:first-child { margin-top: 0; }
.nav-link { position: relative; display: block; margin: 1px 0; padding: 6px 10px; color: var(--muted); border-radius: 4px; font-size: 14px; }
.nav-link:hover { color: var(--text); background: var(--panel-2); }
.nav-link.active { color: var(--green); background: var(--green-dim); }
.nav-link.active::before { position: absolute; left: 0; top: 11px; width: 3px; height: 9px; background: var(--green); content: ""; }
.sidebar-footer { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding: 12px 10px 0; color: var(--faint); border-top: 1px solid var(--line-soft); font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(167, 239, 119, .08); }

.content { position: relative; margin-left: var(--sidebar); }
article { width: min(820px, calc(100% - 330px)); margin-left: clamp(38px, 7vw, 116px); padding: 90px 0 100px; }
.doc-section { position: relative; margin: 0 0 108px; scroll-margin-top: 90px; }
.hero-section { padding-top: 6px; }
.eyebrow, .section-no { color: var(--green); font-size: 11px; letter-spacing: .13em; }
.section-no { margin-bottom: 10px; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 680px; margin-bottom: 24px; font-size: clamp(42px, 6vw, 72px); line-height: 1.05; letter-spacing: -.045em; }
h2 { margin-bottom: 14px; font-size: 34px; line-height: 1.2; letter-spacing: -.025em; }
h3 { margin: 34px 0 12px; font-size: 18px; }
p { color: var(--muted); }
.lead { max-width: 690px; margin-bottom: 30px; font-size: 19px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 43px; padding: 0 18px; border: 1px solid var(--line); border-radius: 5px; font-size: 14px; }
.button.primary { color: #10200c; border-color: var(--green); background: var(--green); box-shadow: 4px 4px 0 #304f22; }
.button.primary:hover { color: #10200c; transform: translate(1px, 1px); box-shadow: 3px 3px 0 #304f22; }
.button.secondary { color: var(--text); background: var(--panel); }
.button.secondary:hover { border-color: #4c574a; }

.endpoint-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 26px 0 38px; padding: 17px 18px; border: 1px solid #374034; border-left: 3px solid var(--green); border-radius: var(--radius); background: var(--panel); }
.endpoint-card div { display: grid; gap: 3px; min-width: 0; }
.endpoint-card code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-label { color: var(--faint); font-size: 11px; }
.copy-inline, .copy-code { color: var(--muted); border: 1px solid var(--line); border-radius: 4px; background: #0b0d0c; cursor: pointer; }
.copy-inline { padding: 7px 11px; }
.copy-inline:hover, .copy-code:hover { color: var(--text); border-color: #4b5549; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature { min-height: 150px; padding: 22px 22px 16px; border-right: 1px solid var(--line); }
.feature:last-child { border-right: 0; }
.feature-index { display: block; margin-bottom: 23px; color: var(--green); font-size: 11px; }
.feature strong { display: block; margin-bottom: 5px; }
.feature p { margin-bottom: 0; font-size: 13px; line-height: 1.55; }

.steps { padding: 0; margin: 32px 0; list-style: none; border-top: 1px solid var(--line); }
.steps li { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.step-no { display: grid; place-items: center; flex: 0 0 28px; height: 28px; color: #0d140a; border-radius: 4px; background: var(--green); font-size: 13px; }
.steps strong { display: block; margin-bottom: 4px; }
.steps p { margin: 0; font-size: 14px; }

.code-block { margin: 22px 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #080a09; }
.code-head { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 12px 0 16px; color: var(--faint); border-bottom: 1px solid var(--line-soft); background: var(--panel); font-size: 12px; }
.copy-code { padding: 4px 9px; font-size: 12px; }
pre { margin: 0; padding: 20px; overflow: auto; color: #dce3da; font-size: 13px; line-height: 1.75; tab-size: 2; }
pre code { color: inherit; }

.callout { display: grid; grid-template-columns: 145px 1fr; gap: 16px; margin: 22px 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); font-size: 13px; }
.callout strong { color: var(--green); }
.callout span { color: var(--muted); }
.callout.warning { border-left: 3px solid var(--orange); }
.callout.warning strong { color: var(--orange); }

.table-wrap { margin: 24px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 650px; font-size: 13px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--faint); background: var(--panel); font-weight: 400; }
td { color: var(--muted); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--text); }

.route-line { display: flex; align-items: center; gap: 12px; margin: 22px 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); }
.method { padding: 3px 7px; color: #0b1208; border-radius: 3px; background: var(--green); font-size: 11px; }
.method.get { color: #07101c; background: var(--blue); }

.tabs { margin-top: 24px; }
.tab-list { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tab { padding: 9px 15px; color: var(--muted); border: 0; border-bottom: 2px solid transparent; background: transparent; cursor: pointer; }
.tab.active { color: var(--green); border-color: var(--green); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.definition-grid { display: grid; grid-template-columns: repeat(2, 1fr); margin: 26px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.definition-grid > div { min-height: 128px; padding: 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.definition-grid > div:nth-child(2n) { border-right: 0; }
.definition-grid > div:nth-last-child(-n + 2) { border-bottom: 0; }
.definition-grid p { margin: 8px 0 0; font-size: 13px; }

.check-list { margin: 24px 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.check-list li { position: relative; padding: 15px 10px 15px 34px; color: var(--muted); border-bottom: 1px solid var(--line); }
.check-list li::before { position: absolute; left: 8px; color: var(--green); content: "[+]"; }

.faq-list { margin-top: 24px; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { position: relative; padding: 19px 36px 19px 0; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { position: absolute; right: 8px; color: var(--green); content: "+"; }
details[open] summary::after { content: "−"; }
details p { margin: 0; padding: 0 44px 20px 0; font-size: 14px; }

.toc { position: fixed; top: 112px; right: max(28px, calc((100vw - 1550px) / 2)); width: 180px; max-height: calc(100vh - 150px); overflow-y: auto; font-size: 12px; }
.toc > p { margin-bottom: 10px; color: var(--faint); }
.toc-links { display: grid; border-left: 1px solid var(--line); }
.toc-links a { padding: 5px 0 5px 13px; color: var(--faint); line-height: 1.4; }
.toc-links a:hover, .toc-links a.active { color: var(--green); }
.back-top { display: block; margin-top: 18px; color: var(--faint); }

.doc-footer { margin-top: 120px; padding-top: 30px; border-top: 1px solid var(--line); }
.doc-footer > div:first-child { display: flex; align-items: center; gap: 10px; }
.brand-mini { width: 24px; height: 24px; border-radius: 4px; }
.doc-footer p { margin: 10px 0 14px; font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; }

.search-modal[hidden] { display: none; }
.search-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: start center; padding-top: 12vh; }
.search-backdrop { position: absolute; inset: 0; border: 0; background: rgba(0, 0, 0, .72); cursor: default; }
.search-panel { position: relative; width: min(640px, calc(100vw - 32px)); max-height: 70vh; overflow: hidden; border: 1px solid #3a4338; border-radius: 10px; background: var(--panel); box-shadow: 0 24px 80px rgba(0, 0, 0, .5); }
.search-input-wrap { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search-input-wrap svg { flex: 0 0 20px; color: var(--green); }
.search-input { flex: 1; min-width: 0; color: var(--text); border: 0; outline: 0; background: transparent; }
.search-results { max-height: calc(70vh - 62px); padding: 8px; overflow-y: auto; }
.search-result { display: block; padding: 12px 13px; color: var(--text); border-radius: 5px; }
.search-result:hover, .search-result.selected { color: var(--text); background: var(--green-dim); }
.search-result strong { display: block; margin-bottom: 2px; }
.search-result span { color: var(--faint); font-size: 12px; }
.search-empty { padding: 30px; color: var(--muted); text-align: center; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 120; padding: 8px 14px; color: #0a1207; border-radius: 4px; background: var(--green); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .15s ease, transform .15s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  article { width: min(800px, calc(100% - 90px)); margin-left: 54px; }
  .toc { display: none; }
}

@media (max-width: 820px) {
  :root { --topbar: 58px; }
  .topbar { padding: 0 16px; }
  .top-actions .top-link, .search-trigger span, .search-trigger kbd { display: none; }
  .search-trigger { width: 38px; justify-content: center; padding: 0; }
  .brand-divider, .brand-docs { display: none; }
  .mobile-menu { display: block; order: -1; }
  .sidebar { width: min(310px, 82vw); transform: translateX(-102%); transition: transform .18s ease; box-shadow: 20px 0 60px rgba(0, 0, 0, .45); }
  body.menu-open .sidebar { transform: translateX(0); }
  .content { margin-left: 0; }
  article { width: auto; margin: 0; padding: 64px 20px 80px; }
  h1 { font-size: clamp(40px, 12vw, 60px); }
  h2 { font-size: 29px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .feature:last-child { border-bottom: 0; }
  .callout { grid-template-columns: 1fr; gap: 5px; }
  .definition-grid { grid-template-columns: 1fr; }
  .definition-grid > div, .definition-grid > div:nth-child(2n) { border-right: 0; border-bottom: 1px solid var(--line); }
  .definition-grid > div:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .definition-grid > div:last-child { border-bottom: 0; }
}

@media (max-width: 520px) {
  body { font-size: 15px; }
  .brand-name { font-size: 16px; }
  .top-actions { gap: 8px; }
  .doc-section { margin-bottom: 82px; }
  .endpoint-card { align-items: flex-end; }
  .endpoint-card code { font-size: 12px; }
  pre { padding: 16px; font-size: 12px; }
  th, td { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
