:root, :root[data-theme='dark'] {
  --bg: #1a1922;
  --side: #1a1922;
  --surface: #1f1e28;
  --hover: #252333;
  --line: rgba(255,255,255,.08);
  --text: #c2cad1;
  --text-strong: #e8edf2;
  --muted: #93999e;
  --faint: #72767a;
  --accent: #8276c9;
  --accent-soft: rgba(130, 118, 201, .16);
  --post: #4060f0;
  --get: #2ecc71;
  --code-bg: #12111a;
  --code-inline: #252333;
  --table-head: #22212c;
  --search: #252333;
  color-scheme: dark;
}
:root[data-theme='light'] {
  --bg: #ffffff;
  --side: #f7f7f8;
  --surface: #ffffff;
  --hover: #efeef6;
  --line: rgba(17,17,17,.08);
  --text: #3d4048;
  --text-strong: #1a1b20;
  --muted: #6b7280;
  --faint: #9aa0a6;
  --accent: #6f62c0;
  --accent-soft: rgba(111, 98, 192, .12);
  --post: #4060f0;
  --get: #1fa855;
  --code-bg: #16151d;
  --code-inline: #f1f0f5;
  --table-head: #f4f4f6;
  --search: #ffffff;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
html, body, .docs__side, .docs__main {
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.docs__side::-webkit-scrollbar,
.docs__main::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
button, a { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
a { text-decoration: none; }
h1, h2, h3 { color: var(--text-strong); letter-spacing: -0.02em; }

.docs {
  display: grid;
  grid-template-columns: 308px minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
}
.docs__side {
  height: 100%;
  padding: 16px 8px 24px;
  background: var(--side);
  border-right: 1px solid var(--line);
  overflow: auto;
}
.docs__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px 14px;
}
.docs__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-strong);
  font-weight: 500;
  font-size: 14px;
}
.docs__logo img { width: 22px; height: 22px; border-radius: 6px; }
.docs__tools { display: flex; align-items: center; gap: 8px; }
.docs__menu {
  width: 28px;
  height: 28px;
  display: none;
  place-items: center;
  color: var(--muted);
  border-radius: 8px;
}
.docs__menu:hover { background: var(--hover); color: var(--text); }
.docs__menu svg { width: 16px; height: 16px; }
.theme-toggle {
  width: 42px;
  height: 42px;
  padding: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(17, 17, 17, 0.52);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.theme-toggle:hover {
  color: #111;
  background: rgba(255, 255, 255, 0.85);
}
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle__sun { display: none; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(22, 24, 27, 0.6);
  color: rgba(255, 255, 255, 0.5);
}
:root[data-theme="dark"] .theme-toggle:hover {
  color: #fff;
  background: rgba(22, 24, 27, 0.85);
}
.docs__search {
  display: flex;
  align-items: center;
  height: 36px;
  margin: 0 8px 14px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--search);
  border: 1px solid var(--line);
}
.docs__search svg {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  color: var(--faint);
}
.docs__search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  font: inherit;
}
.docs__nav { display: flex; flex-direction: column; gap: 2px; }
.docs-nav__group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.docs__nav a,
.docs-nav__btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}
.docs__nav a:hover,
.docs-nav__btn:hover { background: var(--hover); color: var(--text); }
.docs__nav a.is-active {
  background: #252333;
  color: #8276c9;
}
:root[data-theme='light'] .docs__nav a.is-active {
  background: var(--hover);
  color: var(--accent);
}
.docs-nav__btn { justify-content: space-between; color: var(--muted); flex: 0 0 auto; }
.docs-nav__btn svg {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  margin-top: 0;
  opacity: .7;
  transform: rotate(-90deg);
  transition: transform .32s ease;
}
.docs-nav__group.is-open > .docs-nav__btn svg { transform: rotate(0deg); }
.docs-nav__list {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .32s ease;
}
.docs-nav__group.is-open > .docs-nav__list { grid-template-rows: 1fr; }
.docs-nav__clip {
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 12px;
}
.docs-nav__list a {
  min-height: 32px;
  padding-right: 8px;
}
.docs-badge {
  margin-left: auto;
  flex: 0 0 auto;
  align-self: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 18px;
}
.docs-badge.is-post { color: #fff; background: var(--post); }
.docs-badge.is-get { color: #fff; background: var(--get); }

.docs__main { position: relative; min-width: 0; height: 100%; overflow: auto; }
.docs__bar { display: none; }
.docs__scrim { display: none; }
.docs-page {
  display: none;
  max-width: 760px;
  margin: 0 48px;
  padding: 18px 0 32px;
}
.docs-page.is-active { display: block; }
.docs-page h1 {
  margin: 0;
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  color: var(--text);
}
.docs-page h1 + h1 { margin: 0 0 16px; }
.docs-page h2 {
  margin: 48px 0 16px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
}
.docs-page p { margin: 0 0 14px; }
.docs-page hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}
.docs-page code {
  padding: 2px 7px;
  border-radius: 8px;
  background: var(--code-inline);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}
.docs-code code {
  display: block;
  padding: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: inherit;
}
.docs-tablewrap {
  overflow: auto;
  margin: 16px 0 24px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.docs-table { width: 100%; border-collapse: collapse; }
.docs-table th,
.docs-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.docs-table th {
  background: var(--table-head);
  color: var(--muted);
  font-weight: 500;
}
.docs-note {
  margin: 18px 0;
  color: var(--text);
}
.docs-ep {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 18px;
}
.docs-method {
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  background: var(--post);
}
.docs-method.is-get { background: var(--get); }
.docs-code {
  margin: 12px 0 22px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--code-bg);
  border: 1px solid var(--line);
}
.docs-code__bar {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  color: var(--faint);
  font-size: 12px;
}
.docs-code__bar button { color: var(--text); }
.docs-code pre {
  margin: 0;
  padding: 0 14px 14px;
  overflow: auto;
  color: #d7dde6;
  font-size: 13px;
  line-height: 1.55;
  scrollbar-width: none;
}
.docs-code pre::-webkit-scrollbar { display: none; }
.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.docs-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.docs-card b { display: block; margin: 8px 0 4px; color: var(--text-strong); }
.docs-card p { margin: 0; color: var(--muted); }
.docs-card span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--hover);
  color: var(--accent);
  font-weight: 700;
  font-size: 11px;
}
.docs-enum { display: grid; gap: 8px; margin: 12px 0 20px; }
.docs-enum div {
  display: flex;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.docs-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  max-width: 760px;
  width: calc(100% - 96px);
  margin: 8px 48px 24px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--text);
}
.docs-next:hover { box-shadow: 0 1px 8px rgba(0,0,0,.12); }
.docs-next:focus { outline: none; }
.docs-next span { min-width: 0; }
.docs-next small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.docs-next svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.docs-next[hidden] { display: none !important; }
.docs-meta {
  max-width: 760px;
  margin: 0 48px;
  padding: 0 0 18px;
  color: var(--faint);
  font-size: 12px;
}
.docs-built {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 760px;
  margin: 0 48px;
  padding: 0 0 48px;
  color: var(--faint);
  font-size: 12px;
}
.docs-built a,
.docs-built button { color: var(--muted); }
.docs-built a:hover,
.docs-built button:hover { color: var(--text); }
:root[data-theme='light'] .docs-next { border-color: var(--line); }

@media (max-width: 920px) {
  .docs {
    display: flex;
    flex-direction: column;
  }
  .docs__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 0 0 56px;
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    z-index: 30;
  }
  .docs__bar .docs__menu { display: grid; }
  .docs__bar .docs__logo { flex: 1; min-width: 0; }
  .docs__bar .theme-toggle { width: 36px; height: 36px; border-radius: 11px; }
  .docs__bar .theme-toggle svg { width: 17px; height: 17px; }
  .docs__side .docs__brand { display: none; }
  .docs__main { flex: 1; min-height: 0; }
  .docs__side {
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 25;
    width: min(308px, 86vw);
    height: auto;
    transform: translateX(-110%);
    transition: transform .28s ease;
  }
  .docs.is-menu .docs__side { transform: none; }
  .docs__scrim {
    display: none;
    position: fixed;
    inset: 56px 0 0;
    z-index: 24;
    background: rgba(0,0,0,.45);
  }
  .docs.is-menu .docs__scrim { display: block; }
  .docs-page {
    margin: 0 16px;
    padding: 16px 0 28px;
    max-width: none;
  }
  .docs-page h1 { font-size: 26px; line-height: 1.25; }
  .docs-page h2 { font-size: 20px; margin-top: 32px; }
  .docs-next,
  .docs-meta,
  .docs-built {
    width: auto;
    max-width: none;
    margin-left: 16px;
    margin-right: 16px;
  }
  .docs-next span {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .docs-ep { flex-wrap: wrap; }
  .docs-code pre {
    white-space: pre-wrap;
    word-break: break-word;
  }
  .docs-tablewrap { margin-left: 0; margin-right: 0; }
}
