:root {
  /* 官方 lbs.amap.com 品牌令牌（一比一取值） */
  --brand-blue: #1a66ff;
  --brand-blue-dark: #1558d6;
  --text: #252b48;
  --muted: #909298;
  --surface: #fff;
  --page-bg: #f8f9fa;
  --line: #e1e1e1;
  --table-head: #f6f9ff;
  --info-border: #1a66ff;
  --info-bg: #fbfbfb;
  --warning-border: #ffa21a;
  --warning-bg: #fffcf7;
  --code-bg: #292c34;
  --radius-sm: 2px;
  --radius-md: 4px;
  --content-max: 1200px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: Consolas, SFMono-Regular, Menlo, "Liberation Mono", Courier, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--surface); font-family: var(--font-sans); font-size: 14px; line-height: 1.7; -webkit-font-smoothing: antialiased; }

/* 弹层打开时锁定背后页面滚动（:has 现代浏览器均支持；overflow:hidden 保留滚动位置不跳顶） */
body:has(.overlay:not(.hidden)) { overflow: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--brand-blue); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- 全局滚动条美化（WebKit / Blink / Firefox 通用） ----------
   细条 + 圆角半透明滑块，悬停加深；轨道透明不占视觉空间。
   文档侧边栏的自动隐藏行为在 docs/page.css 中以更高优先级覆盖，不受影响。 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(31, 42, 61, .16);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(31, 42, 61, .34);
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-corner {
  background: transparent;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(31, 42, 61, .25) transparent;
}
