/* ==========================================================================
   QQ飞车道具代码查询系统 · 前台样式（DeepSeek 风格 / 亮暗双主题）
   ========================================================================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

:root {
  --bg: #ffffff;
  --bg-2: #f7f8fa;
  --bg-3: #f1f3f7;
  --text: #0d0e12;
  --text-2: #5f6470;
  --text-3: #9aa1ad;
  --line: #e8eaee;
  --line-2: #f0f2f5;
  /* 页头 / 页脚 / 内容区统一的左右留白，保证三者左右边缘严格对齐 */
  --pad-x: 22px;
  /* 图片骨架屏（加载中） */
  --skeleton: rgba(148, 163, 184, .22);
  --skeleton-hi: rgba(148, 163, 184, .38);
  --card: #ffffff;
  --brand: #4d6bfe;
  --brand-2: #3a56e0;
  --brand-soft: rgba(77, 107, 254, .09);
  --brand-text: #ffffff;
  --ok: #10b981;
  --male: #2f80ed;
  --female: #eb4b8a;
  --none: #8a93a3;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 4px 14px rgba(16, 24, 40, .06);
  --shadow-md: 0 12px 34px rgba(16, 24, 40, .10);
  --shadow-lg: 0 30px 80px rgba(16, 24, 40, .18);
  --radius: 18px;
}

[data-theme="dark"] {
  --bg: #0f1115;
  --bg-2: #15181e;
  --bg-3: #1b1f27;
  --text: #f1f3f8;
  --text-2: #a2a9b6;
  --text-3: #6e7684;
  --line: #252a33;
  --line-2: #1c2129;
  /* 图片骨架屏（加载中，暗色下用白色系半透明） */
  --skeleton: rgba(255, 255, 255, .07);
  --skeleton-hi: rgba(255, 255, 255, .15);
  --card: #15181e;
  --brand: #6b86ff;
  --brand-2: #8098ff;
  --brand-soft: rgba(107, 134, 255, .15);
  --male: #5b9bff;
  --female: #ff6ba5;
  --none: #8b93a3;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .35);
  --shadow-md: 0 14px 38px rgba(0, 0, 0, .5);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .68);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color .22s ease, color .22s ease;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--brand-soft); }

/* ---------- 顶部 ---------- */
.hd {
  position: sticky; top: 0; z-index: 60;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease;
}
.hd.is-scrolled {
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom-color: var(--line);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .hd.is-scrolled {
    background: var(--bg);
    border-bottom-color: var(--line);
  }
}
.hd-in {
  max-width: 1560px; margin: 0 auto; height: 62px;
  padding: 0 var(--pad-x); display: flex; align-items: center; gap: 14px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16.5px; letter-spacing: -.2px; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, var(--brand), #8ba1ff);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 400; letter-spacing: -.5px;
  box-shadow: 0 5px 16px rgba(77, 107, 254, .32);
}
.logo-img { height: 32px; width: auto; border-radius: 8px; }
.hd-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
/* 飞车版本号胶囊（保留之前 brand 软底 + brand 文字的风格） */
.ver-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 14px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand);
  font-size: 13px; font-weight: 400; white-space: nowrap; letter-spacing: .1px;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  user-select: none;
}
.ver-pill:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(77, 107, 254, .18);
}
.ver-pill-val { font-weight: 400; font-variant-numeric: tabular-nums; }

/* API 文档入口（头部右侧） */
.api-link,
.act-link,
.maps-link {
  display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 13px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--text-2); font-size: 13px; font-weight: 400; white-space: nowrap;
  transition: color .18s ease, border-color .18s ease, background .18s ease,
              transform .18s ease, box-shadow .18s ease;
}
.api-link svg,
.act-link svg,
.maps-link svg { width: 15px; height: 15px; }
.api-link:hover,
.act-link:hover,
.maps-link:hover {
  color: var(--brand); border-color: var(--brand);
  transform: translateY(-1px); box-shadow: 0 4px 14px rgba(77, 107, 254, .16);
}
.api-link.on,
.act-link.on,
.maps-link.on { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* 汉堡按钮：默认隐藏，窄屏才出现（仍在头部最右；抽屉从左侧滑出，两者互不影响） */
.nav-toggle {
  display: none; width: 34px; height: 34px; flex: none; padding: 0; margin-left: auto;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  color: var(--text-2); cursor: pointer; align-items: center; justify-content: center;
  transition: color .18s ease, border-color .18s ease;
}
.nav-toggle:hover { color: var(--brand); border-color: var(--brand); }
.nav-toggle svg { width: 18px; height: 18px; }

/* 移动端导航抽屉（窄屏专用） */
.nav-drawer-mask {
  position: fixed; inset: 0; z-index: 90; background: rgba(15, 20, 30, .42);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.nav-drawer {
  position: fixed; top: 0; left: 0; z-index: 95; width: min(78vw, 300px); height: 100%;
  background: var(--card); border-right: 1px solid var(--line);
  box-shadow: 18px 0 50px rgba(16, 24, 40, .18);
  transform: translateX(-102%); visibility: hidden;
  transition: transform .24s cubic-bezier(.4, 0, .2, 1), visibility .24s;
  display: flex; flex-direction: column; overflow-y: auto;
  padding-bottom: env(safe-area-inset-bottom);
}
/* visibility 用离散插值：收起时全程保持 visible，滑完才隐藏 —— 既保留动画又不撑出横向滚动条 */
body.menu-open .nav-drawer { transform: none; visibility: visible; }
/* 桌面端根本不需要抽屉（头部控件本来就都显示着） */
@media (min-width: 641px) {
  .nav-drawer, .nav-drawer-mask { display: none; }
}
.nav-drawer-hd {
  display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px;
  border-bottom: 1px solid var(--line-2); flex: none;
}
.nav-drawer-hd b { font-size: 14.5px; font-weight: 500; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-drawer-x {
  margin-left: auto; width: 30px; height: 30px; flex: none; padding: 0;
  border: 1px solid var(--line); border-radius: 9px; background: transparent;
  color: var(--text-2); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
}
.nav-drawer-x svg { width: 16px; height: 16px; }
.nav-drawer-bd { padding: 12px 12px 24px; }
.nav-drawer-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 11px;
  color: var(--text-2); font-size: 14px; transition: background .16s ease, color .16s ease;
}
.nav-drawer-item svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-drawer-item:hover { background: var(--bg-3); color: var(--text); }
.nav-drawer-item.on { background: var(--brand-soft); color: var(--brand); }
.nav-drawer-sep { height: 1px; background: var(--line-2); margin: 10px 4px; }
.nav-drawer-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13.5px;
}
.nav-drawer-lb { color: var(--text-3); flex: none; }
.nav-drawer-val { color: var(--text-2); margin-left: auto; font-variant-numeric: tabular-nums; }
.nav-drawer-row .theme-pill { margin-left: auto; height: 32px; }
.nav-drawer-row .theme-opt { height: 26px; }

/* 日夜切换分段胶囊（参考「中文 / EN」分段样式，内部用图标） */
.theme-pill {
  display: inline-flex; align-items: center; height: 34px; padding: 3px;
  border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line);
  transition: background .25s ease, border-color .25s ease;
}
.theme-opt {
  width: 32px; height: 28px; padding: 0; border: none; background: transparent;
  color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  transition: background .25s ease, color .25s ease;
}
.theme-opt:hover { color: var(--text); }
.theme-opt.on {
  background: var(--text); color: var(--bg);
}
.theme-opt svg { width: 16px; height: 16px; }

/* ---------- 背景光晕（DeepSeek 官网风格：大面积不规则流动光斑，主特色多层光晕） ---------- */
.glow {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  overflow: hidden; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(138, 168, 255, .16) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 80% 20%, rgba(180, 190, 255, .12) 0%, transparent 50%),
    radial-gradient(ellipse 90% 70% at 60% 80%, rgba(200, 210, 255, .10) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(160, 200, 255, .10) 0%, transparent 45%),
    radial-gradient(ellipse 55% 45% at 92% 70%, rgba(190, 170, 255, .10) 0%, transparent 48%),
    radial-gradient(ellipse 65% 50% at 45% 8%,  rgba(120, 200, 255, .08) 0%, transparent 50%);
}
.glow i {
  position: absolute; display: block;
  filter: blur(80px);
  will-change: transform, opacity;
}
.glow .g1 {
  left: -10%; top: -15%; width: 70vw; height: 70vw;
  background: radial-gradient(closest-side, rgba(77, 107, 254, .55) 0%, transparent 65%);
  opacity: .35;
  border-radius: 40% 60% 55% 45% / 55% 45% 60% 40%;
  animation: drift-a 22s ease-in-out infinite alternate;
}
.glow .g2 {
  right: -15%; top: 5%; width: 55vw; height: 55vw;
  background: radial-gradient(closest-side, rgba(122, 162, 255, .45) 0%, transparent 60%);
  opacity: .28;
  border-radius: 55% 45% 40% 60% / 45% 55% 50% 50%;
  animation: drift-b 26s ease-in-out infinite alternate;
}
.glow .g3 {
  left: 35%; top: 35%; width: 45vw; height: 45vw;
  background: radial-gradient(closest-side, rgba(180, 190, 255, .40) 0%, transparent 60%);
  opacity: .22;
  border-radius: 45% 55% 60% 40% / 60% 40% 55% 45%;
  animation: drift-c 20s ease-in-out infinite alternate;
}
.glow .g4 {
  left: 5%; bottom: -10%; width: 50vw; height: 50vw;
  background: radial-gradient(closest-side, rgba(110, 180, 255, .35) 0%, transparent 55%);
  opacity: .25;
  border-radius: 50% 50% 45% 55% / 55% 45% 50% 50%;
  animation: drift-d 24s ease-in-out infinite alternate;
}
.glow .g5 {
  right: 5%; bottom: 20%; width: 35vw; height: 35vw;
  background: radial-gradient(closest-side, rgba(200, 180, 255, .32) 0%, transparent 55%);
  opacity: .20;
  border-radius: 60% 40% 55% 45% / 40% 60% 45% 55%;
  animation: drift-e 28s ease-in-out infinite alternate;
}
.glow .g6 {
  left: 55%; top: -14%; width: 40vw; height: 40vw;
  background: radial-gradient(closest-side, rgba(120, 200, 255, .36) 0%, transparent 60%);
  opacity: .22;
  border-radius: 50% 50% 60% 40% / 45% 55% 45% 55%;
  animation: drift-f 25s ease-in-out infinite alternate;
}
.glow .g7 {
  left: -8%; top: 42%; width: 34vw; height: 34vw;
  background: radial-gradient(closest-side, rgba(150, 190, 255, .34) 0%, transparent 60%);
  opacity: .20;
  border-radius: 55% 45% 50% 50% / 50% 55% 45% 50%;
  animation: drift-g 27s ease-in-out infinite alternate;
}
.glow .g8 {
  right: 16%; bottom: -14%; width: 30vw; height: 30vw;
  background: radial-gradient(closest-side, rgba(126, 140, 255, .36) 0%, transparent 58%);
  opacity: .20;
  border-radius: 45% 55% 45% 55% / 55% 45% 55% 45%;
  animation: drift-h 23s ease-in-out infinite alternate;
}
.glow .g9 {
  left: 30%; top: 64%; width: 26vw; height: 26vw;
  background: radial-gradient(closest-side, rgba(210, 190, 255, .32) 0%, transparent 60%);
  opacity: .16;
  border-radius: 60% 40% 50% 50% / 45% 55% 50% 50%;
  animation: drift-i 29s ease-in-out infinite alternate;
}
@keyframes drift-a { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(4vw, 6vh) rotate(8deg); } }
@keyframes drift-b { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(-5vw, 4vh) rotate(-10deg); } }
@keyframes drift-c { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(3vw, -5vh) rotate(12deg); } }
@keyframes drift-d { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(-4vw, -3vh) rotate(-8deg); } }
@keyframes drift-e { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(5vw, 3vh) rotate(10deg); } }
@keyframes drift-f { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(4vw, 5vh) rotate(-9deg); } }
@keyframes drift-g { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(3vw, -4vh) rotate(11deg); } }
@keyframes drift-h { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(-3vw, 4vh) rotate(-7deg); } }
@keyframes drift-i { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(5vw, -3vh) rotate(9deg); } }
[data-theme="dark"] .glow {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(77, 107, 254, .12) 0%, transparent 55%),
    radial-gradient(ellipse 70% 55% at 80% 20%, rgba(107, 134, 255, .10) 0%, transparent 50%),
    radial-gradient(ellipse 90% 70% at 60% 80%, rgba(107, 134, 255, .08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(77, 107, 254, .08) 0%, transparent 45%),
    radial-gradient(ellipse 55% 45% at 92% 70%, rgba(160, 120, 255, .08) 0%, transparent 48%),
    radial-gradient(ellipse 65% 50% at 45% 8%,  rgba(77, 160, 254, .07) 0%, transparent 50%);
}
[data-theme="dark"] .glow .g1 { opacity: .30; }
[data-theme="dark"] .glow .g2 { opacity: .24; }
[data-theme="dark"] .glow .g3 { opacity: .18; }
[data-theme="dark"] .glow .g4 { opacity: .22; }
[data-theme="dark"] .glow .g5 { opacity: .15; }
[data-theme="dark"] .glow .g6 { opacity: .18; }
[data-theme="dark"] .glow .g7 { opacity: .17; }
[data-theme="dark"] .glow .g8 { opacity: .17; }
[data-theme="dark"] .glow .g9 { opacity: .13; }

/* ---------- Hero ---------- */
.hero {
  padding: 74px 22px 30px; text-align: center; position: relative; z-index: 1;
}
.hero-in { max-width: 860px; margin: 0 auto; position: relative; }
.hero h1 {
  font-family: var(--font-title);   /* 大标题保留方圆体 */
  margin: 0 0 12px; font-size: clamp(30px, 4.4vw, 44px); line-height: 1.3;
  font-weight: 700; letter-spacing: .1em;
  font-variation-settings: "BEVL" 1;   /* 方体形态（无圆角）+ 字重走 wght 轴最大值 700 */
}
.hero h1 .t-char {
  display: inline-block;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .28s ease;
  transition-delay: calc(var(--i) * 30ms);
}
.hero h1:hover .t-char { transform: translateY(-8px); }
.hero-desc {
  margin: 0 auto 20px; max-width: 640px;
  color: var(--text-2); font-size: 14.5px; font-weight: 400;
  letter-spacing: .03em; line-height: 1.7;
}

/* ---------- 搜索框（DeepSeek 风格：毛玻璃背景 + 圆形搜索按钮） ---------- */
.search-box {
  display: flex; align-items: center; gap: 8px; text-align: left;
  background: color-mix(in srgb, var(--bg) 26%, transparent);
  -webkit-backdrop-filter: saturate(190%) blur(22px);
  backdrop-filter: saturate(190%) blur(22px);
  border: 1px solid rgba(140, 150, 170, .18);
  border-radius: 999px; padding: 7px 7px 7px 8px;
  box-shadow: 0 6px 26px rgba(20, 30, 60, .10), inset 0 1px 0 rgba(255, 255, 255, .35); transition: .18s;
}
[data-theme="dark"] .search-box {
  background: color-mix(in srgb, var(--bg) 22%, transparent);
  border-color: rgba(255, 255, 255, .12);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .search-box { background: color-mix(in srgb, var(--card) 60%, transparent); }
}
.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow-md);
}
.mode { position: relative; flex: none; }
.mode-btn {
  display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 16px;
  border: 0; background: var(--bg-2); border-radius: 999px; color: var(--text);
  font-size: 13.5px; font-weight: 400; white-space: nowrap; transition: .16s;
}
.mode-btn:hover { background: var(--bg-3); }
.mode-btn svg { width: 14px; height: 14px; opacity: .55; transition: transform .18s; }
.mode.open .mode-btn svg { transform: rotate(180deg); }
/* 精确搜索激活态：颜色加深 + 边框 */
.mode.is-exact .mode-btn {
  background: var(--brand-soft);
  color: var(--brand);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
}
.mode.is-exact .mode-btn svg { opacity: .8; }
.mode-menu {
  position: absolute; top: calc(100% + 10px); left: 0; width: 268px; z-index: 40;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; text-align: left;
}
.mode-menu button {
  width: 100%; border: 0; background: transparent; border-radius: 10px; padding: 10px 12px;
  text-align: left; display: block; color: var(--text); transition: .14s;
}
.mode-menu button:hover { background: var(--bg-2); }
.mode-menu button b { display: block; font-size: 13.5px; font-weight: 400; }
.mode-menu button small { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; line-height: 1.45; }
.mode-menu button.on { background: var(--brand-soft); }
.mode-menu button.on b { color: var(--brand); }
/* 搜索框里的输入框：用「容器内的 input」而不是只写 #kw，
   否则新页面（地图库用的 #mapKw）匹配不到，会退回浏览器默认样式 */
#kw,
.search-box input[type="text"] {
  flex: 1; min-width: 0; height: 44px; border: 0; background: transparent;
  color: var(--text); font-size: 15.5px; outline: none;
  padding: 0 4px 0 14px;   /* 左边给点内距，否则文字贴着胶囊边 */
}
#kw::placeholder,
.search-box input[type="text"]::placeholder { color: var(--text-3); }
.search-row { display: contents; }
.search-btn {
  flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: var(--brand); color: #fff;
  transition: .16s; display: inline-flex; align-items: center; justify-content: center;
}
.search-btn:hover { background: var(--brand-2); }
.search-btn:active { transform: scale(.94); }
.search-btn svg { width: 18px; height: 18px; }
.search-btn svg { width: 17px; height: 17px; }

.hot-row {
  margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center; justify-content: center; font-size: 13px; color: var(--text-3);
}
.hot-row .hot-label { margin-right: 2px; }
.chip {
  border: 1px solid var(--line); background: var(--bg-2); border-radius: 999px;
  padding: 5px 13px; font-size: 13px; color: var(--text-2); transition: .16s;
}
.chip:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* ---------- 主体 ---------- */
.main { max-width: 1560px; margin: 0 auto; padding: 26px var(--pad-x) 90px; }
.sec-head {
  display: flex; align-items: baseline; gap: 12px; margin: 4px 0 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap;
}
.sec-head h2 { margin: 0; font-size: 17px; font-weight: 400; letter-spacing: -.2px; }
.sec-head .count { color: var(--text-3); font-size: 13px; }
.sec-head .mode-tag {
  margin-left: auto; font-size: 12px; color: var(--brand); background: var(--brand-soft);
  padding: 3px 10px; border-radius: 999px; font-weight: 400;
}
.list-tools { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
.sec-head .mode-tag + .list-tools { margin-left: auto; }
.list-tools:not(:first-of-type) { margin-left: 0; }
.tool-dd { position: relative; }
.tool-btn {
  display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 13px;
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  color: var(--text); font-size: 12.5px; font-weight: 400; white-space: nowrap; transition: .15s;
}
.tool-btn:hover { border-color: var(--brand); color: var(--brand); }
.tool-btn svg { width: 13px; height: 13px; opacity: .55; transition: transform .18s; }
.tool-dd.open .tool-btn svg { transform: rotate(180deg); }
.tool-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 168px; z-index: 40;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; text-align: left; max-height: 62vh; overflow: auto;
}
.tool-menu button {
  width: 100%; border: 0; background: transparent; border-radius: 9px; padding: 8px 11px;
  text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: var(--text); transition: .13s; font-size: 13px; font-weight: 400;
}
.tool-menu button:hover { background: var(--bg-2); }
.tool-menu button b { font-weight: 400; }
.tool-menu button small { display: block; color: var(--text-3); font-size: 11.5px; margin-top: 1px; }
.tool-menu button.on { background: var(--brand-soft); color: var(--brand); }
.cat-menu { min-width: 240px; }
.cat-group {
  padding: 9px 11px 4px; font-size: 12px; color: var(--text-3); font-weight: 400;
  border-bottom: 1px solid var(--line-2); margin-bottom: 4px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.cat-group + .cat-sub { margin-top: 2px; }
.cat-total { font-size: 11px; }
.cat-menu button.cat-sub b { font-weight: 400; font-size: 12.5px; }
.cat-menu button .cat-n { color: var(--text-3); font-size: 11.5px; }
.cat-menu button.on .cat-n { color: var(--brand); }
.btn-clear {
  height: 32px; padding: 0 14px; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; color: var(--text-2); font-size: 12.5px; font-weight: 400; transition: .15s;
}
.btn-clear:hover { color: #d33; border-color: #d33; }

/* 杂项（无图道具）显示/隐藏按钮 */
.misc-btn .misc-n { margin-left: 3px; color: var(--text-3); font-size: 11.5px; }
.misc-btn.on { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.misc-btn.on .misc-n { color: var(--brand); }
.misc-btn[hidden] { display: none !important; }   /* .tool-btn 是 flex，需显式覆盖 hidden */

/* 列表：单行 6 个，响应式缩放 */
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
@media (max-width: 1400px) { .grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 1180px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 920px)  { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.thumb {
  position: relative; aspect-ratio: 4 / 3; background: var(--bg-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-bottom: 1px solid var(--line-2);
}
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }

/* 图片加载中：在「内容区」显示流光骨架，和「确实没有图（占位图）」区分开。
   background-clip: content-box 让 8px 的 padding 不着色，图片到了就自然盖住骨架。 */
.thumb img.is-loading,
.m-img img.is-loading {
  background-image: linear-gradient(100deg,
    var(--skeleton) 30%, var(--skeleton-hi) 50%, var(--skeleton) 70%);
  background-size: 220% 100%;
  background-clip: content-box;
  animation: imgShimmer 1.4s linear infinite;
}
@keyframes imgShimmer {
  from { background-position: 110% 0; }
  to   { background-position: -110% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .thumb img.is-loading, .m-img img.is-loading { animation: none; background-image: none; background-color: var(--skeleton); }
}
.thumb .badge-sex {  position: absolute; top: 10px; right: 10px; font-size: 11.5px; font-weight: 400;
  padding: 3px 9px; border-radius: 999px; color: #fff; backdrop-filter: blur(6px);
}
/* 悬停提示：仅在「查看详情」上出现；朴素样式（不美化），两行文本 */
.card-tip {
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 6;
  background: var(--card); color: var(--text); border: 1px solid var(--line);
  font-size: 12px; font-weight: 400; line-height: 1.55; text-align: left;
  padding: 6px 10px; border-radius: 6px; white-space: nowrap;
  pointer-events: none; opacity: 0; visibility: hidden; transition: opacity .16s;
}
.card-tip .tip-l1, .card-tip .tip-l2 { display: block; }
.c-foot:hover .card-tip { opacity: 1; visibility: visible; }
.c-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.c-name {
  font-size: 15px; font-weight: 400; letter-spacing: -.2px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.c-rows { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; }
.c-row { display: flex; gap: 8px; align-items: flex-start; }
.c-row .k { flex: none; width: 58px; color: var(--text-3); }
.c-row .v {
  flex: 1; min-width: 0; color: var(--text-2); line-height: 1.5;
  display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}
.c-row .v.clamp2 { -webkit-line-clamp: 2; }
.c-row .v.clamp1 { -webkit-line-clamp: 1; }
.c-row .v.strong { color: var(--text); font-weight: 400; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag {
  font-size: 11.5px; padding: 1.5px 8px; border-radius: 6px;
  background: var(--bg-3); color: var(--text-2);
}
.c-foot {
  position: relative; margin-top: auto; padding-top: 10px; display: flex; align-items: center;
  color: var(--brand); font-size: 12.5px; font-weight: 400; gap: 5px;
}
.c-foot svg { width: 13px; height: 13px; }

.sex-male { background: var(--male) !important; }
.sex-female { background: var(--female) !important; }
.sex-none { background: rgba(120, 128, 142, .82) !important; }

.more-wrap { text-align: center; margin-top: 32px; }
.btn-more {
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 999px; padding: 11px 34px; font-size: 14px; font-weight: 400;
  transition: .16s; box-shadow: var(--shadow-xs);
}
.btn-more:hover { border-color: var(--brand); color: var(--brand); }
.btn-more:disabled { opacity: .55; cursor: default; }

/* ---------- 分页 ---------- */
.pager {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 8px; margin-top: 34px;
}
.pager[hidden] { display: none !important; }
.pager.is-loading { opacity: .6; pointer-events: none; }
.pg-btn {
  height: 34px; min-width: 62px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text-2);
  font-size: 13px; font-weight: 400; transition: .15s;
}
.pg-btn:hover:not(:disabled) { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.pg-btn:disabled { opacity: .4; cursor: default; }
.pg-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.pg-btn.primary:hover:not(:disabled) { background: var(--brand-2); color: #fff; border-color: var(--brand-2); }
.pg-mid { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.pg-input {
  width: 62px; height: 34px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--text); text-align: center; font-size: 13px; outline: none;
  -moz-appearance: textfield;
}
.pg-input::-webkit-outer-spin-button, .pg-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pg-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.pg-info-num { margin-left: 6px; font-size: 12.5px; color: var(--text-3); }

/* ---------- 卡片右键菜单 ---------- */
.ctx-menu {
  position: fixed; z-index: 200; min-width: 168px; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); text-align: left;
}
.ctx-menu[hidden] { display: none !important; }
.ctx-label {
  padding: 6px 11px 7px; margin-bottom: 3px; font-size: 11.5px; color: var(--text-3);
  border-bottom: 1px solid var(--line-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px;
}
.ctx-menu button {
  width: 100%; border: 0; background: transparent; border-radius: 8px; padding: 8px 11px;
  text-align: left; color: var(--text); font-size: 13px; font-weight: 400; transition: .13s;
}
.ctx-menu button:hover { background: var(--brand-soft); color: var(--brand); }

.empty { text-align: center; padding: 68px 20px; color: var(--text-3); }
.empty .ico { font-size: 42px; margin-bottom: 12px; opacity: .7; }
.empty h3 { margin: 0 0 8px; color: var(--text-2); font-size: 16px; font-weight: 400; }
.empty p { margin: 0; font-size: 13.5px; }

.skeleton { background: var(--bg-2); border-radius: var(--radius); height: 330px; animation: sk 1.1s ease-in-out infinite; }
@keyframes sk { 0%, 100% { opacity: .55 } 50% { opacity: 1 } }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none !important; }
.modal-mask { position: absolute; inset: 0; background: rgba(10, 12, 18, .55); backdrop-filter: blur(4px); }
.modal-box {
  position: relative; width: 100%; max-width: 720px; max-height: 86vh; overflow: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-lg); animation: pop .2s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.985) } to { opacity: 1; transform: none } }
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 34px; height: 34px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--text-2);
  display: flex; align-items: center; justify-content: center; padding: 0; line-height: 0; transition: .15s;
}
.modal-close svg { width: 16px; height: 16px; display: block; }
.modal-close:hover { color: var(--text); background: var(--bg-2); opacity: .85; }
.modal-close:active { opacity: .6; }
.modal-body { display: grid; grid-template-columns: 200px 1fr; gap: 0; }
.m-left { padding: 16px; border-right: 1px solid var(--line-2); background: var(--bg-2); border-radius: 18px 0 0 18px; display: flex; align-items: center; }
.m-img {
  width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.m-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.m-right { padding: 18px 20px 20px; min-width: 0; }
.m-title { font-size: 18px; font-weight: 400; letter-spacing: -.3px; margin: 0 0 8px; line-height: 1.35; padding-right: 38px; }
.m-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.m-tags .tag { font-size: 12px; padding: 3px 10px; border-radius: 8px; }
.m-tags .tag.sex-male, .m-tags .tag.sex-female, .m-tags .tag.sex-none { color: #fff; }

.kv { display: flex; flex-direction: column; gap: 8px; }
.kv-item {
  border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px;
  background: var(--bg-2); display: flex; gap: 10px; align-items: flex-start;
}
.kv-item .kl { flex: none; width: 58px; color: var(--text-3); font-size: 12px; padding-top: 2px; }
.kv-item .kv2 { flex: 1; min-width: 0; font-size: 13px; color: var(--text); word-break: break-word; line-height: 1.6; white-space: pre-wrap; }
.copy {
  flex: none; border: 1px solid var(--line); background: var(--card); color: var(--text-2);
  border-radius: 8px; padding: 4px 10px; font-size: 12px; transition: .15s;
}
.copy:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.copy.ok { color: #fff; background: var(--ok); border-color: var(--ok); }

/* ---------- 页脚 ---------- */
.ft {
  border-top: 1px solid var(--line); background: var(--bg-2);
  padding: 30px 0;
}
.ft-in {
  max-width: 1560px; margin: 0 auto; padding: 0 var(--pad-x);
  display: flex; gap: 24px;
  align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.ft-left { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
.ft-left .ft-copy { color: var(--text); font-size: 13.5px; }
.ft-left a { color: var(--text-2); }
.ft-left a:hover { color: var(--brand); }
.ft-right { display: flex; align-items: center; }
.socials { display: flex; align-items: center; gap: 18px; }
.social { position: relative; width: 24px; height: 24px; display: flex;
  align-items: center; justify-content: center; color: var(--text-2); transition: .16s; }
.social:hover { color: var(--brand); transform: translateY(-2px); }
.social svg { width: 24px; height: 24px; }
.ft-beian-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.ft-slash { display: inline-flex; align-items: center; color: var(--text-3); }
.ft-slash svg { width: 13px; height: 13px; display: block; }
/* 页脚里的 .qr-pop 只作为内容源（JS 取它的内容塞进居中弹层），本身不显示 */
.qr-pop { display: none; }
.qr-wrap { position: relative; display: inline-flex; }
button.social { border: 0; background: none; padding: 0; cursor: pointer; -webkit-appearance: none; }

/* ---------- 二维码弹层：水平垂直居中 + 自适应屏幕 ---------- */
.qr-modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.qr-modal[hidden] { display: none; }
.qr-modal-mask {
  position: absolute; inset: 0; background: rgba(10, 12, 18, .52);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); cursor: pointer;
}
.qr-modal-box {
  position: relative; z-index: 1; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px 22px 22px; box-shadow: var(--shadow-lg);
  text-align: center; width: 100%; max-width: 300px;
  max-height: calc(100vh - 40px); overflow-y: auto;
}
.qr-modal-close {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px;
  border: 0; border-radius: 50%; background: transparent; color: var(--text-3);
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .16s;
}
.qr-modal-close:hover { background: var(--bg-2); color: var(--text); }
.qr-modal-close svg { width: 16px; height: 16px; }
/* 二维码图片：宽度自适应，最小不低于 150px，最大不超过屏宽 */
.qr-modal-body img {
  width: 100%; max-width: 210px; min-width: 150px; height: auto; aspect-ratio: 1 / 1;
  object-fit: contain; border-radius: 10px; background: #fff; display: block; margin: 0 auto;
}
.qr-modal-body .qr-ph {
  width: 100%; max-width: 210px; min-height: 150px; margin: 0 auto; aspect-ratio: 1 / 1;
  border-radius: 10px; background: var(--bg-2); color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; text-align: center; padding: 16px; line-height: 1.6;
}
.qr-modal-body .qr-tip { font-size: 14.5px; color: var(--text); margin-top: 15px; font-weight: 500; }
.qr-modal-body .qr-num { font-size: 12.5px; color: var(--text-3); margin-top: 5px; word-break: break-all; }
@media (max-width: 420px) {
  .qr-modal { padding: 14px; }
  .qr-modal-box { padding: 26px 16px 18px; border-radius: 16px; }
  .qr-modal-body img, .qr-modal-body .qr-ph { max-width: 190px; min-width: 0; }
}

/* ---------- 提示条 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 20px); z-index: 200;
  background: var(--text); color: var(--bg); padding: 11px 22px; border-radius: 999px;
  font-size: 13.5px; font-weight: 400; opacity: 0; transition: .22s; pointer-events: none;
  box-shadow: var(--shadow-lg); max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.announce {
  /* 元素本身要比视口窄（留出左右边距），否则**背景色会贴到屏幕边缘** ——
     只写 padding 是不够的，那只缩进文字、不缩背景。
     用 calc 减掉两倍留白，这样外边界和 .main 的外边界对齐。 */
  max-width: calc(1560px - 2 * var(--pad-x));
  width: calc(100% - 2 * var(--pad-x));
  margin: 16px auto 0; padding: 11px 18px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand); font-size: 13.5px;
  display: flex; align-items: flex-start; gap: 9px;
  box-sizing: border-box;
}
/* 文字要能收缩 + 换行：
   flex item 默认 min-width:auto 会撑到内容宽度，长公告在手机端会顶出容器。
   min-width:0 才允许它缩到容器内，word-break 保证长串（英文/链接）也能断行。 */
.announce-text {
  flex: 1; min-width: 0;
  line-height: 1.7; word-break: break-word; overflow-wrap: anywhere;
}
.announce > svg { margin-top: 3px; }   /* 多行时图标对齐第一行，而不是垂直居中 */

.go-top {
  position: fixed; right: 26px; bottom: 30px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--text-2);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
  opacity: 0; visibility: hidden; transition: .2s; z-index: 70;
}
.go-top.show { opacity: 1; visibility: visible; }
.go-top:hover { color: var(--brand); border-color: var(--brand); }
.go-top svg { width: 18px; height: 18px; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .modal-body { grid-template-columns: 1fr; }
  .m-left { border-right: 0; border-bottom: 1px solid var(--line-2); border-radius: 18px 18px 0 0; padding: 16px; display: block; }
  .m-img { max-width: 200px; margin: 0 auto; }
  .m-right { padding: 16px 18px 18px; }
  .ft-in { flex-direction: column; gap: 18px; align-items: flex-start; }
  .ft-left, .ft-right { width: 100%; }
}
@media (max-width: 640px) {
  :root { --pad-x: 12px; }
  .hd-in { height: 56px; gap: 8px; }
  .logo { min-width: 0; }
  .logo-text {
  font-family: var(--font-title); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* 窄屏：头部右侧控件全部收进抽屉，只留 Logo + 汉堡按钮 */
  .hd-right { display: none; }
  .nav-toggle { display: inline-flex; }
  .ver-pill { height: 28px; padding: 0 10px; font-size: 11px; }
  .ver-pill .ver-pill-label { display: none; }   /* 窄屏只留版本号，避免头部拥挤 */
  .theme-pill { height: 28px; padding: 2px; }
  .theme-opt { width: 28px; height: 24px; padding: 0; font-size: 12px; }
  .api-link, .act-link, .maps-link { height: 28px; padding: 0 10px; font-size: 12px; }
  .hero { padding: 44px 14px 22px; }
  .hero p { font-size: 14px; margin-bottom: 26px; }
  .search-box { flex-wrap: wrap; border-radius: 20px; padding: 8px 8px 8px 10px; gap: 8px; }
  .mode { width: 100%; }
  .mode-btn { width: 100%; justify-content: space-between; height: 36px; }
  .mode-menu { width: 100%; }
  .search-row { width: 100%; display: flex; align-items: center; gap: 8px; }
  #kw { flex: 1; min-width: 0; height: 40px; text-align: left; padding: 0 4px; font-size: 15px; }
  .search-btn { flex: none; width: 40px; height: 40px; border-radius: 50%; }
  .main { padding: 20px 14px 70px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card { border-radius: 14px; }
  .thumb { aspect-ratio: 1 / 1; }
  .c-body { padding: 12px; }
  .c-name { font-size: 13.5px; }
  .c-rows { gap: 3px; font-size: 11.5px; }
  .c-row .k { width: 52px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-box { max-height: 90vh; border-radius: 18px 18px 0 0; padding-top: env(safe-area-inset-top); }
  .modal-close { top: max(12px, env(safe-area-inset-top)); right: 12px; width: 38px; height: 38px; }
  .modal-body { grid-template-columns: 1fr; }
  .m-left { border-right: 0; border-bottom: 1px solid var(--line-2); border-radius: 18px 18px 0 0; padding: 16px; display: block; }
  .m-img { max-width: 180px; margin: 0 auto; }
  .m-right { padding: 16px 16px 18px; }
  .m-title { font-size: 16px; padding-right: 44px; }
  .go-top { right: 14px; bottom: 18px; }
  .ft { padding: 26px 0; }
}


/* ==========================================================================
   API 文档页（入口 /doc/）
   ========================================================================== */
.doc-main { max-width: 980px; }
.doc-banner {
  border-radius: 14px; padding: 13px 16px; margin-bottom: 18px; font-size: 14px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2);
}
.doc-banner.err { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .28); color: #c0392b; }
[data-theme="dark"] .doc-banner.err { color: #fca5a5; }

.doc-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow-xs);
}
.doc-card > h3 {
  margin: 0 0 14px; font-size: 17px; font-weight: 500; letter-spacing: -.2px;
  padding-left: 11px; position: relative;
}
.doc-card > h3::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 15px; border-radius: 3px; background: var(--brand);
}
.doc-card > h4 { margin: 20px 0 10px; font-size: 14.5px; font-weight: 500; color: var(--text); }
.doc-p { margin: 10px 0; font-size: 14px; color: var(--text-2); line-height: 1.8; }
.doc-p b, .doc-p strong { font-weight: 500; color: var(--text); }
.doc-note { font-size: 13px; color: var(--text-3); margin-top: 12px; line-height: 1.9; }
.doc-foot { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 10px 0 30px; }

.doc-code {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 11px;
  padding: 12px 15px; overflow-x: auto; margin: 4px 0 6px;
}
.doc-code code { font-size: 13.5px; color: var(--brand); word-break: break-all; }

.doc-pre {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; overflow-x: auto; margin: 8px 0 14px;
  font-size: 12.5px; line-height: 1.75;
}
.doc-pre code { font-family: Consolas, Monaco, 'Courier New', monospace; color: var(--text); }

.doc-card code {
  font-family: Consolas, Monaco, 'Courier New', monospace; font-size: .92em;
  background: var(--bg-3); border-radius: 5px; padding: 1px 5px; color: var(--text);
}
.doc-pre code, .doc-code code { background: none; padding: 0; }

.doc-table-wrap { overflow-x: auto; margin: 4px 0 10px; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.doc-table th {
  text-align: left; padding: 10px 12px; background: var(--bg-2); color: var(--text-2);
  font-weight: 500; font-size: 13px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.doc-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; color: var(--text-2); line-height: 1.75; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td b { color: var(--text); font-weight: 500; }

.doc-ul { margin: 8px 0; padding-left: 20px; }
.doc-ul li { font-size: 13.5px; color: var(--text-2); line-height: 1.95; }

/* 安全警示块（例如「不要把密钥写进 URL」） */
.doc-warn {
  margin: 12px 0; padding: 12px 15px; border-radius: 12px; font-size: 13.5px; line-height: 1.8;
  background: rgba(245, 158, 11, .10); border: 1px solid rgba(245, 158, 11, .28); color: #8a6100;
}
.doc-warn b { font-weight: 500; color: #8a6100; }
.doc-warn code { background: rgba(245, 158, 11, .14); }
[data-theme="dark"] .doc-warn { color: #fcd34d; border-color: rgba(251, 191, 36, .3); }
[data-theme="dark"] .doc-warn b { color: #fcd34d; }

/* 「补充说明」里的 Markdown 输出 */
.doc-note-card .md-h1, .doc-note-card .md-h2 { font-size: 17px; font-weight: 500; margin: 4px 0 12px; padding-left: 11px; position: relative; }
.doc-note-card .md-h1::before, .doc-note-card .md-h2::before {
  content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 15px; border-radius: 3px; background: var(--brand);
}
.doc-note-card .md-h3 { font-size: 15px; font-weight: 500; margin: 16px 0 8px; }
.doc-note-card .md-h4 { font-size: 14px; font-weight: 500; margin: 14px 0 6px; color: var(--text-2); }
.doc-note-card .md-p { margin: 10px 0; font-size: 14px; color: var(--text-2); line-height: 1.85; }
.doc-note-card .md-ul, .doc-note-card .md-ol { margin: 8px 0; padding-left: 22px; }
.doc-note-card .md-ul li, .doc-note-card .md-ol li { font-size: 13.5px; color: var(--text-2); line-height: 1.95; }
.doc-note-card .md-pre { background: var(--bg-3); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; font-size: 12.5px; margin: 10px 0; }
.doc-note-card .md-pre code { font-family: Consolas, Monaco, 'Courier New', monospace; }
.doc-note-card .md-table-wrap { overflow-x: auto; margin: 10px 0; }
.doc-note-card .md-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.doc-note-card .md-table th { text-align: left; padding: 9px 12px; background: var(--bg-2); color: var(--text-2); font-weight: 500; border-bottom: 1px solid var(--line); }
.doc-note-card .md-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); color: var(--text-2); }
.doc-note-card a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 640px) {
  .doc-card { padding: 17px 15px; border-radius: 14px; }
  .doc-card > h3 { font-size: 16px; }
  .doc-table th, .doc-table td { padding: 8px 10px; font-size: 12.5px; }
  .doc-pre { font-size: 11.5px; padding: 12px; }
  .doc-code { padding: 10px 12px; }
  .doc-code code { font-size: 12.5px; }
}

/* ==========================================================================
   活动中心（/act/）
   ========================================================================== */
.act-main { max-width: 1560px; }
.act-sec { margin-bottom: 40px; }
.act-head { margin-bottom: 14px; }

/* 筛选标签 */
.act-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.act-tab {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px; border-radius: 999px;
  font-size: 13px; font-family: inherit; line-height: inherit; color: var(--text-2);
  background: var(--card); border: 1px solid var(--line); cursor: pointer;
  text-decoration: none; transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.act-tab:hover { color: var(--brand); border-color: var(--brand); }
.act-tab.on { color: var(--brand-text); background: var(--brand); border-color: var(--brand); }
.act-tab .n { font-size: 11.5px; opacity: .7; }
.act-tab.on .n { opacity: .9; }
/* 前端切换用 hidden 属性控制显隐（卡片是 flex，得显式覆盖） */
.act-card[hidden], .act-news[hidden] { display: none !important; }

/* 卡片网格：一行五个 */
.act-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.act-card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.act-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }

/* 缩略图 + 遮罩（提高另存为的门槛） */
.act-thumb {
  position: relative; aspect-ratio: 16 / 10; background: var(--bg-2); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
/* 封面图：用 background-image 而不是 <img>
   —— 右键菜单里没有「图片另存为」，防下载比 <img> + 遮罩干净，也少一层 DOM。
   background-color 兜底，图没加载出来时是浅灰而不是破图。 */
.act-cover {
  position: absolute; inset: 0; z-index: 1;
  background-color: var(--bg-2);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  -webkit-user-select: none; user-select: none;
  -webkit-user-drag: none;
}
.act-cover.is-failed::after {
  content: '图片加载失败';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 13px;
  background: var(--bg-2);
}
.act-noimg { color: var(--text-3); font-size: 13px; }

/* 左上角状态标签 */
.act-badge {
  position: absolute; top: 8px; left: 8px; z-index: 3; font-size: 11.5px; font-weight: 400;
  padding: 3px 9px; border-radius: 999px; color: #fff; backdrop-filter: blur(6px);
}
.act-badge-ongoing { background: rgba(16, 185, 129, .92); }
.act-badge-ending  { background: rgba(239, 68, 68, .92); }
.act-badge-soon    { background: rgba(77, 107, 254, .92); }
.act-badge-ended   { background: rgba(120, 128, 140, .9); }
.act-badge-unknown { background: rgba(150, 156, 166, .85); }

/* 右上角剩余时间 */
.act-remain {
  position: absolute; top: 8px; right: 8px; z-index: 3; font-size: 11.5px;
  padding: 3px 9px; border-radius: 999px; color: #fff; background: rgba(15, 20, 30, .55);
  backdrop-filter: blur(6px); white-space: nowrap;
}

/* 卡片正文 */
.act-body { padding: 12px 13px 8px; flex: 1; }
.act-name {
  margin: 0 0 8px; font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 时间行：前面一个时钟图标，和图标的距离跟着对齐（不写死两行高度，标题一行时就不会空一大截） */
.act-time {
  display: flex; align-items: flex-start; gap: 5px;
  font-size: 12px; color: var(--text-3); line-height: 1.6;
}
.act-time svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.act-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 13px 12px; margin-top: 4px;
}
.act-cat {
  font-size: 11.5px; color: var(--brand); background: var(--brand-soft);
  padding: 3px 9px; border-radius: 6px; white-space: nowrap;
}
.act-go {
  display: inline-flex; align-items: center; gap: 3px; font-size: 12.5px; color: var(--text-2);
  text-decoration: none; white-space: nowrap; transition: color .18s ease;
}
.act-go:hover { color: var(--brand); }
.act-go svg { width: 13px; height: 13px; }

/* 资讯列表 */
.act-news { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); }
.act-news li + li { border-top: 1px solid var(--line-2); }
.nt-link { display: flex; align-items: center; gap: 10px; padding: 13px 16px; text-decoration: none; transition: background .16s ease; }
.nt-link:hover { background: var(--bg-2); }
.nt-cat { flex: none; font-size: 11.5px; color: var(--brand); background: var(--brand-soft); padding: 2px 8px; border-radius: 5px; }
.nt-tag { flex: none; font-size: 11.5px; color: var(--text-2); background: var(--bg-3); padding: 2px 8px; border-radius: 5px; }
.nt-title { flex: 1; min-width: 0; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-link:hover .nt-title { color: var(--brand); }
.nt-date { flex: none; font-size: 12.5px; color: var(--text-3); }
.nt-arrow { flex: none; width: 15px; height: 15px; color: var(--text-3); }
.nt-link:hover .nt-arrow { color: var(--brand); }

.act-empty { padding: 46px 16px; text-align: center; color: var(--text-3); font-size: 13.5px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.act-empty .dim { font-size: 12.5px; opacity: .8; }
.act-src { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--text-3); line-height: 1.9; }
.act-off { padding: 80px 16px; text-align: center; }
.act-off h2 { font-size: 19px; font-weight: 400; margin: 0 0 10px; }
.act-off p { color: var(--text-3); font-size: 14px; margin: 0 0 22px; }
.act-off .btn { display: inline-block; padding: 9px 22px; border-radius: 10px; background: var(--brand); color: var(--brand-text); text-decoration: none; font-size: 14px; }

@media (max-width: 1240px) { .act-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 980px)  { .act-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .act-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 手机端一行一个：挤成两列时，左上角状态标签会和右上角剩余时间撞在一起 */
@media (max-width: 640px)  {
  .act-grid { grid-template-columns: 1fr; gap: 14px; }
  .act-name { font-size: 13.5px; }
  .act-body { padding: 11px 12px 4px; }
  .act-foot { padding: 9px 12px 11px; }
  .nt-tag { display: none; }
  .nt-title { font-size: 13.5px; }
  .nt-date { font-size: 12px; }
  .nt-link { padding: 12px 13px; }
}

/* ==================== 地图库 ==================== */
.maps-main { padding-top: 6px; }
.maps-hero { margin-bottom: 4px; }
.maps-hero h1 {
  font-family: var(--font-title);   /* 大标题保留方圆体 */ font-size: 34px; }

/* 一行 6 个（轩要求），窄屏逐级降列 */
.map-grid {
  /* 顶部留点空间，第一行卡片的 hover 提示才不会被裁掉 */
  padding-top: 6px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
/* 卡片：毛玻璃（和搜索框 / 头部同款质感 —— 半透明底 + backdrop-blur） */
.map-card {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 16px 16px 14px; min-height: 108px;
  /* 纯半透明底（不用 backdrop-filter，448 个模糊层会拖死手机）。
     透明度从 88% 降到 62%，这样"半透明"是真的能看出来的；
     再配一条内亮边，做出磨砂玻璃的观感。 */
  background: color-mix(in srgb, var(--card) 62%, transparent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34);
  border: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
  border-radius: 14px;
  text-align: left; font-family: inherit; color: inherit;
  cursor: pointer; width: 100%;
  /* 注意：这里不能 overflow:hidden —— hover 提示要露到卡片外面去。
     另外也不能用 content-visibility:auto，它会 contain:paint 把溢出内容裁掉。 */
  overflow: visible;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.map-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent;
  background: color-mix(in srgb, var(--card) 97%, transparent);
}
.map-card:active { transform: translateY(-1px); }
.map-card.is-copied { border-color: var(--brand); }

.map-name {
  width: 100%; font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.map-code {
  font-size: 13px; color: var(--text-2); line-height: 1.4; word-break: break-all;
  font-family: var(--font-mono);
}
.map-cat {
  display: inline-flex; align-items: center; margin-top: auto;
  padding: 3px 10px; border-radius: 999px; font-size: 11.5px; line-height: 1.6;
  color: var(--brand); background: var(--brand-soft);
}

/* hover 提示沿用首页 .card-tip 的视觉（白底细边、12px），
   但首页那个是浮在触发元素上方的，这里整张卡可点，所以改成**卡片内居中**。 */
/* hover 提示：显示在卡片**外部上方**（原来压在卡片中央，挡住内容） */
.map-card .card-tip {
  left: 50%;
  bottom: calc(100% + 7px);
  top: auto;
  transform: translateX(-50%);
  box-shadow: var(--shadow-md);
  z-index: 30;   /* 要盖过后绘制的相邻卡片 */
}
.map-card:hover .card-tip { opacity: 1; visibility: visible; }
/* 触屏没有 hover，就别指望提示，直接靠点击反馈 */
@media (hover: none) {
  .map-card .card-tip { display: none; }
}

/* 关键：卡片自己是 display:flex，会盖掉 [hidden] 的 display:none —— 不加这条，筛选/分页都不生效 */
.map-card[hidden] { display: none !important; }

@media (max-width: 1500px) { .map-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1240px) { .map-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 980px)  { .map-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 分页（前缀 mpg- 避开首页已有的 .pg-* ） */
.map-pager { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 20px 0 4px; }
.map-pager[hidden] { display: none !important; }
.mpg-btn {
  min-width: 36px; height: 36px; padding: 0 11px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--text-2);
  font-size: 13px; font-family: inherit; line-height: 1; transition: .16s;
}
.mpg-btn:hover:not(:disabled) { color: var(--brand); border-color: var(--brand); }
.mpg-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.mpg-btn:disabled { opacity: .4; cursor: not-allowed; }
.mpg-gap { color: var(--text-3); font-size: 13px; padding: 0 2px; }
.mpg-info { font-size: 12.5px; color: var(--text-3); margin-right: 6px; }
@media (max-width: 640px)  {
  .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .map-card { padding: 13px 13px 12px; min-height: 96px; border-radius: 12px; }
  .map-name { font-size: 13.5px; }
  .map-code { font-size: 12px; }
  .maps-hero h1 { font-size: 26px; }
}

/* hover 提示下方的小三角，指向卡片 */
.map-card .card-tip::after {
  content: ""; position: absolute; left: 50%; top: 100%;
  width: 0; height: 0; margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--card);
}
