:root {
  --paper: #f3f1e8;
  --paper-2: #e9e6da;
  --ink: #14251f;
  --muted: #748079;
  --line: rgba(20, 43, 34, .14);
  --forest: #13251f;
  --lime: #c9f16f;
  --surface: #fffdf7;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.docs-header {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 72px;
  padding: 0 29px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(243,241,232,.92);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 205px; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--lime);
  background: var(--forest);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: -.06em;
}
.brand > span:last-child { display: grid; line-height: 1; }
.brand strong { font-size: 13px; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 8px; letter-spacing: .13em; }
.docs-search {
  width: min(420px, 35vw);
  height: 38px;
  margin-left: auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255,255,255,.48);
}
.docs-search svg { width: 15px; height: 15px; color: var(--muted); }
.docs-search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 10px; }
.back-link { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.back-link:hover { color: var(--ink); }
.docs-layout { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.docs-nav {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  padding: 25px 15px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: rgba(235,232,222,.5);
}
.nav-title { padding: 0 12px 17px; display: grid; gap: 5px; }
.nav-title span { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.nav-title strong { font-size: 14px; }
.docs-nav nav { display: grid; gap: 3px; }
.nav-group { margin-top: 14px; color: #929b95; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.nav-link {
  width: 100%;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  color: #617168;
  background: transparent;
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}
.nav-link:hover { color: var(--ink); background: rgba(255,255,255,.45); }
.nav-link.active { color: var(--forest); background: #fffdf7; box-shadow: 0 5px 15px rgba(22,42,34,.06); }
.nav-method { color: #4b8b65; font-family: ui-monospace, Consolas, monospace; font-size: 7px; font-weight: 800; }
.docs-main { width: min(1040px, 100%); padding: 55px 48px 80px; }
.doc-intro { padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.method-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; }
.method { padding: 5px 7px; border-radius: 5px; color: #2b704a; background: #ddf0e3; font-family: ui-monospace, Consolas, monospace; font-size: 8px; font-weight: 800; }
.method-row #docIndex { margin-left: auto; }
.doc-intro h1 { margin: 15px 0 8px; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.055em; }
.doc-intro p { max-width: 700px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.request-card { margin-top: 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.request-label { padding: 10px 14px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.request-url { min-height: 54px; padding: 0 14px; display: flex; align-items: center; gap: 3px; }
.request-url code { color: #707b74; font-family: ui-monospace, Consolas, monospace; font-size: 10px; }
.request-url strong { overflow: hidden; color: var(--forest); font-family: ui-monospace, Consolas, monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.request-url button { width: 31px; height: 31px; margin-left: auto; display: grid; place-items: center; border: 0; border-radius: 6px; color: var(--muted); background: var(--paper); cursor: pointer; }
.doc-grid { margin-top: 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.parameters, .console-card, .response-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.panel-title { min-height: 45px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-title span { font-size: 11px; font-weight: 700; }
.panel-title small { color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: .12em; }
#parameterList { padding: 7px 15px 13px; }
.param-row { padding: 10px 0; display: grid; grid-template-columns: minmax(80px, .6fr) 55px minmax(100px, 1fr); gap: 8px; align-items: start; border-bottom: 1px solid rgba(20,43,34,.08); font-size: 9px; }
.param-row:last-child { border-bottom: 0; }
.param-row code { color: #376b51; font-family: ui-monospace, Consolas, monospace; font-size: 9px; font-weight: 700; }
.param-type { color: var(--muted); font-size: 8px; }
.param-desc { color: #6e7b74; line-height: 1.5; }
.empty-params { padding: 30px 0; color: var(--muted); text-align: center; font-size: 9px; }
.request-inputs { padding: 13px 15px 5px; display: grid; gap: 8px; }
.request-inputs label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; }
.request-inputs input { height: 32px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; outline: 0; color: var(--ink); background: #faf8f2; font-size: 9px; }
.request-inputs input:focus { border-color: #6b9976; }
.request-inputs .no-inputs { padding: 15px 0; color: var(--muted); text-align: center; font-size: 9px; }
.run-button { width: calc(100% - 30px); height: 35px; margin: 5px 15px 15px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 6px; color: #eef5e8; background: var(--forest); font-size: 9px; font-weight: 700; cursor: pointer; }
.run-button:disabled { opacity: .55; cursor: wait; }
.run-button svg { width: 13px; height: 13px; }
.response-card { margin-top: 15px; }
.response-card pre { min-height: 230px; max-height: 520px; margin: 0; padding: 18px; overflow: auto; color: #d9e9dc; background: #10221b; font-family: ui-monospace, Consolas, monospace; font-size: 10px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.docs-notes { margin-top: 25px; padding: 21px; border-left: 3px solid #8bb676; background: rgba(255,253,247,.5); }
.docs-notes h2 { margin: 0 0 10px; font-size: 15px; }
.docs-notes p { margin: 7px 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.docs-notes code { padding: 2px 4px; border-radius: 3px; color: #387052; background: #e4ece2; font-family: ui-monospace, Consolas, monospace; font-size: 9px; }
.toast { position: fixed; z-index: 50; right: 18px; bottom: 18px; padding: 10px 13px; border-radius: 7px; color: white; background: var(--forest); font-size: 9px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 850px) {
  .docs-header { padding: 0 16px; }
  .brand { min-width: 0; }
  .docs-search { width: auto; flex: 1; }
  .back-link span { display: none; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; height: auto; max-height: 240px; padding: 13px; border-right: 0; border-bottom: 1px solid var(--line); }
  .nav-title { display: none; }
  .docs-nav nav { display: flex; flex-wrap: wrap; }
  .nav-group { width: 100%; margin-top: 4px; }
  .docs-main { padding: 35px 18px 55px; }
}

@media (max-width: 620px) {
  .docs-search { display: none; }
  .doc-grid { grid-template-columns: 1fr; }
  .request-url code { max-width: 50%; overflow: hidden; text-overflow: ellipsis; }
  .request-url strong { font-size: 9px; }
}
