/* ==========================================================================
   聚合地图 · 全站视觉系统（2026 重写版）
   说明：本文件负责全站框架、导航、首页、分类、搜索、内容页与页脚。
        各工具内部组件样式在 tools.css 中，通过统一的 CSS 变量继承本设计体系。
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
  --brand: #0e7c66;
  --brand-2: #14b8a6;
  --brand-3: #0a5c4d;
  --brand-ink: #062e27;
  --brand-soft: #e6f6f1;
  --accent: var(--brand);
  --accent-soft: var(--brand-soft);
  --gold: #f59e0b;

  --bg: #f4f7f5;
  --bg-2: #eef3f0;
  --panel: #ffffff;
  --panel-2: #fbfdfc;
  --fg: #13211d;
  --fg-2: #35463f;
  --muted: #6b7d76;
  --muted-2: #93a19b;
  --line: #e3eae6;
  --line-strong: #d2ddd7;
  --hover: #eef5f2;
  --code-bg: #f2f6f4;

  --sidebar-w: 256px;
  --topbar-h: 68px;
  --rail-w: 300px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;

  --shadow-xs: 0 1px 2px rgba(13, 45, 37, .04);
  --shadow-sm: 0 2px 6px rgba(13, 45, 37, .05), 0 12px 28px -22px rgba(13, 45, 37, .28);
  --shadow-md: 0 18px 44px -28px rgba(13, 45, 37, .38);
  --shadow-lg: 0 32px 70px -40px rgba(4, 40, 32, .45);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  color-scheme: light;
}

[data-theme="dark"] {
  --brand: #2dd4bf;
  --brand-2: #5eead4;
  --brand-3: #99f6e4;
  --brand-ink: #042f2a;
  --brand-soft: #0d2f2a;
  --accent: var(--brand);
  --accent-soft: var(--brand-soft);

  --bg: #070f0d;
  --bg-2: #0a1512;
  --panel: #0e1a17;
  --panel-2: #101f1b;
  --fg: #e7f1ed;
  --fg-2: #c1d2cb;
  --muted: #8ba39b;
  --muted-2: #6c847c;
  --line: #1b2c27;
  --line-strong: #263a33;
  --hover: #14241f;
  --code-bg: #0b1714;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .35), 0 16px 34px -24px rgba(0, 0, 0, .8);
  --shadow-md: 0 22px 50px -30px rgba(0, 0, 0, .9);
  --shadow-lg: 0 40px 80px -40px rgba(0, 0, 0, .95);
  color-scheme: dark;
}

/* ---------- 2. 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 18px);
}

html, body { margin: 0; padding: 0; width: 100%; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(20, 184, 166, .10), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(14, 124, 102, .07), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  color: var(--fg);
  font: 15.5px/1.75 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; }
::selection { background: rgba(20, 184, 166, .25); }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -60px;
  z-index: 999;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* ---------- 3. 顶栏 ---------- */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--topbar-h);
  z-index: 120;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  transition: border-color .2s, box-shadow .2s, background .25s;
}
.topbar.scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--panel) 94%, transparent);
  box-shadow: 0 10px 30px -26px rgba(10, 40, 33, .5);
}
@supports not (background: color-mix(in srgb, #fff 80%, transparent)) {
  .topbar { background: var(--panel); }
}
.topbar-inner {
  height: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--fg-2);
  font-size: 15px;
  transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.menu-toggle { display: none; }
.menu-toggle:hover,
.theme-toggle:hover {
  background: var(--brand-soft);
  border-color: color-mix(in srgb, var(--brand) 25%, var(--line));
  color: var(--brand);
}
.theme-toggle:active { transform: scale(.94); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  min-width: 0;
}
.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  font-size: 18px;
  background: linear-gradient(140deg, var(--brand-3) 0%, var(--brand) 48%, var(--brand-2) 100%);
  box-shadow: 0 8px 18px -8px rgba(14, 124, 102, .75), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  pointer-events: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong {
  font-size: 17.5px;
  font-weight: 800;
  letter-spacing: .5px;
  color: var(--fg);
  white-space: nowrap;
}
.brand-text em {
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 1.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  white-space: nowrap;
}

.top-search {
  flex: 1 1 520px;
  max-width: 640px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--hover);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.top-search i { color: var(--muted-2); font-size: 14px; flex: 0 0 auto; }
.top-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 13.5px;
  color: var(--fg);
}
.top-search input::placeholder { color: var(--muted-2); }
.top-search kbd {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted-2);
  font: 10.5px/1.4 var(--mono);
}
.top-search:focus-within {
  background: var(--panel);
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 13%, transparent);
}

.top-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  margin-left: auto;
}
.top-links a {
  padding: 8px 11px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  transition: background .16s, color .16s;
}
.top-links a:hover { background: var(--hover); color: var(--brand); }

/* 桌面端顶栏：品牌对齐侧栏，搜索框对齐内容区，快捷导航与主题按钮靠右 */
@media (min-width: 1025px) {
  .topbar-inner {
    max-width: none;
    margin: 0;
    padding: 0 22px 0 0;
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr) auto auto;
    column-gap: 16px;
  }
  .brand { padding-left: 22px; }
  .top-search {
    justify-self: start;
    width: calc(100% - 18px);
    max-width: 680px;
    margin-left: 18px;
    margin-top: 10px;
  }
  .top-links { justify-self: end; margin-left: 0; }
  .theme-toggle { justify-self: end; }
}

/* ---------- 4. 侧栏 ---------- */
.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  z-index: 110;
  display: flex;
  flex-direction: column;
  padding: 12px 13px 10px;
  background: color-mix(in srgb, var(--panel) 72%, transparent);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform .26s cubic-bezier(.4, 0, .2, 1), background .25s, border-color .25s;
}
@supports not (background: color-mix(in srgb, #fff 80%, transparent)) {
  .sidebar { background: var(--panel); }
}
.side-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  padding-bottom: 14px;
}
.side-scroll::-webkit-scrollbar { width: 6px; }
.side-scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

.side-nav { display: flex; flex-direction: column; gap: 2px; }

.sidebar .side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 4px 9px;
  border-radius: 11px;
  color: var(--fg-2);
  font-size: 13.5px;
  transition: background .16s, color .16s;
}
.sidebar .side-link:hover { background: var(--hover); color: var(--brand); }
.sidebar nav a.side-link.on {
  background: linear-gradient(135deg, #0a5c4d 0%, #0e7c66 100%);
  color: #ffffff;
  font-weight: 650;
  box-shadow: 0 8px 18px -14px rgba(10, 60, 50, .9);
}
.sidebar nav a.side-link.on:hover { color: #fff; }
.sidebar nav a.side-link.on .side-ico {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}
.sidebar nav a.side-link.on .side-count {
  background: rgba(255, 255, 255, .2);
  color: #fff;
}
.side-ico {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--hover);
  color: var(--muted);
  font-size: 13px;
  transition: background .16s, color .16s;
}
.sidebar .side-link:hover .side-ico { background: var(--panel); color: var(--brand); }
.sidebar .side-link.on .side-ico {
  background: linear-gradient(140deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(14, 124, 102, .8);
}
.side-txt {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-count {
  flex: 0 0 auto;
  min-width: 26px;
  padding: 0 6px;
  border-radius: 20px;
  background: var(--hover);
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.sidebar .side-link.on .side-count { background: var(--panel); color: var(--brand); }

.side-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 9px 4px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.side-title em {
  font-style: normal;
  letter-spacing: 0;
  color: var(--muted-2);
  font-size: 10px;
}

.side-card {
  position: relative;
  margin: 20px 2px 6px;
  padding: 17px 16px 15px;
  border-radius: 15px;
  overflow: hidden;
  background:
    radial-gradient(180px 120px at 100% 0%, rgba(94, 234, 212, .35), transparent 70%),
    linear-gradient(150deg, #0a4a3e 0%, #0e7c66 60%, #14b8a6 130%);
  color: #fff;
  box-shadow: 0 18px 34px -24px rgba(6, 46, 39, .8);
}
.side-card-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .16);
  font-size: 13px;
}
.side-card strong { display: block; font-size: 13.5px; font-weight: 700; }
.side-card p { margin: 5px 0 11px; font-size: 11.5px; line-height: 1.65; color: rgba(255, 255, 255, .72); }
.side-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .16);
  font-size: 11.5px;
  font-weight: 600;
  transition: background .16s;
}
.side-card a:hover { background: rgba(255, 255, 255, .28); }

.sidebar-foot {
  flex: 0 0 auto;
  display: flex;
  gap: 4px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.sidebar-foot a {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 11.5px;
  transition: background .16s, color .16s;
}
.sidebar-foot a:hover { background: var(--hover); color: var(--brand); }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(4, 20, 16, .48);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s, visibility .24s;
  backdrop-filter: blur(2px);
}
body.nav-open .overlay { opacity: 1; visibility: visible; }

/* ---------- 5. 内容区 ---------- */
main.content {
  width: auto;
  max-width: none;
  min-height: calc(100vh - var(--topbar-h));
  margin: 0 0 0 var(--sidebar-w);
  padding: calc(var(--topbar-h) + 30px) 34px 0;
  box-sizing: border-box;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
main.content > * { max-width: 1560px; }

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
  gap: 28px;
  align-items: start;
  max-width: 1560px;
}
.page-main { min-width: 0; }

/* ---------- 6. 页面标题 / 面包屑 ---------- */
.page-head {
  position: relative;
  margin-bottom: 22px;
  padding: 22px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(620px 220px at 100% 0%, color-mix(in srgb, var(--brand) 10%, transparent), transparent 65%),
    var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.page-head::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--brand) 22%, transparent);
  pointer-events: none;
}
.page-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.5;
}
.page-crumb a { color: var(--muted); }
.page-crumb a:hover { color: var(--brand); }
.page-crumb i { font-size: 9px; color: var(--muted-2); }
.page-crumb span { color: var(--fg-2); }

.page-head h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1.35;
  color: var(--fg);
}
.page-head h1 > i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 19px;
}
.page-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 13px;
  object-fit: contain;
  background: var(--hover);
  padding: 7px;
}
.page-icon-mask {
  width: 28px;
  height: 28px;
  background-color: var(--icon-color, var(--brand));
  -webkit-mask: var(--icon) no-repeat center / contain;
  mask: var(--icon) no-repeat center / contain;
  display: inline-block;
  flex: 0 0 auto;
}
.page-head .page-sub {
  max-width: 920px;
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.8;
}
.page-head-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.crumb-count {
  margin-left: 4px;
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11.5px;
  font-style: normal;
}

/* ---------- 7. 首页 Hero ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 40px;
  align-items: center;
  margin-bottom: 22px;
  padding: 52px 52px 50px;
  border-radius: 26px;
  overflow: hidden;
  color: #eafff9;
  background:
    radial-gradient(720px 420px at 88% 6%, rgba(94, 234, 212, .30), transparent 65%),
    radial-gradient(560px 360px at 4% 96%, rgba(245, 158, 11, .16), transparent 60%),
    linear-gradient(135deg, #04241f 0%, #073f36 42%, #0a5c4d 74%, #0e7c66 100%);
  box-shadow: 0 34px 70px -44px rgba(4, 36, 31, .9);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(720px 420px at 70% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(720px 420px at 70% 30%, #000 20%, transparent 78%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 2; min-width: 0; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 30px;
  background: rgba(255, 255, 255, .07);
  color: rgba(234, 255, 249, .82);
  font-size: 11.5px;
  letter-spacing: .4px;
  backdrop-filter: blur(6px);
}
.hero-eyebrow i { color: #5eead4; }
.hero-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -1px;
  color: #fff;
}
.hero-title span {
  background: linear-gradient(100deg, #5eead4 0%, #a7f3d0 45%, #fcd34d 110%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-sub {
  max-width: 620px;
  margin: 0 0 26px;
  color: rgba(226, 250, 244, .74);
  font-size: 14px;
  line-height: 1.85;
}
.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  height: 56px;
  padding: 0 8px 0 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .09);
  backdrop-filter: blur(12px);
  transition: background .18s, border-color .18s, box-shadow .18s;
}
.hero-search i { color: rgba(234, 255, 249, .62); font-size: 16px; }
.hero-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: 0;
  color: #fff;
  font-size: 14.5px;
}
.hero-search input::placeholder { color: rgba(220, 250, 242, .55); }
.hero-search button {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #3b2503;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .5px;
  box-shadow: 0 10px 22px -12px rgba(245, 158, 11, .9);
  transition: transform .16s, box-shadow .16s;
}
.hero-search button:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(245, 158, 11, .95); }
.hero-search:focus-within {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(94, 234, 212, .6);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, .14);
}
.hero-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  font-size: 12px;
  color: rgba(220, 250, 242, .55);
}
.hero-tags a {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 20px;
  color: rgba(234, 255, 249, .84);
  transition: background .16s, border-color .16s;
}
.hero-tags a:hover { background: rgba(255, 255, 255, .14); border-color: rgba(94, 234, 212, .5); }

/* Hero 右侧工具地图 */
.hero-map {
  position: relative;
  z-index: 2;
  min-height: 320px;
  display: grid;
  place-items: center;
}
.map-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 380px;
  transform: rotate(-2deg);
}
.map-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(10px);
  box-shadow: 0 16px 26px -24px rgba(0, 0, 0, .7);
  transition: background .2s, transform .2s, border-color .2s;
  animation: mapFloat 6s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * -.9s);
}
.map-card:hover {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(94, 234, 212, .45);
  transform: translateY(-3px);
}
@keyframes mapFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.map-card i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: rgba(94, 234, 212, .16);
  color: #5eead4;
  font-size: 13px;
}
.map-card b { display: block; font-size: 12.5px; font-weight: 600; color: #f0fffb; }
.map-card em {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 10px;
  color: rgba(220, 250, 242, .5);
  font-variant-numeric: tabular-nums;
}
.map-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, #fbbf24, #f59e0b);
  color: #3b2503;
  font-size: 19px;
  box-shadow: 0 0 0 9px rgba(245, 158, 11, .18), 0 18px 30px -12px rgba(245, 158, 11, .8);
}
.map-pin::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(251, 191, 36, .6);
  animation: pinPulse 2.6s ease-out infinite;
}
@keyframes pinPulse {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* ---------- 8. 数据条 ---------- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}
.stat-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: var(--shadow-xs);
}
.stat-item strong {
  font-size: 26px;
  font-weight: 850;
  letter-spacing: -1px;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-item span { color: var(--muted); font-size: 12.5px; }
.stat-item em { margin-left: auto; color: var(--muted-2); font-style: normal; font-size: 11px; }

/* ---------- 9. 分类区块 / 工具卡片 ---------- */
.cat-block { margin-bottom: 42px; scroll-margin-top: calc(var(--topbar-h) + 24px); }
.cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.cat-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cat-ico {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 16px;
}
.cat-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.2px;
  white-space: nowrap;
}
.cat-count {
  padding: 2px 9px;
  border-radius: 20px;
  background: var(--hover);
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}
.more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 12px;
  background: var(--panel);
  transition: border-color .16s, color .16s, background .16s;
}
.more i { font-size: 9px; transition: transform .16s; }
.more:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.more:hover i { transform: translateX(2px); }

.content .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 11px;
}
.content .card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: transform .18s cubic-bezier(.4, 0, .2, 1), border-color .18s, box-shadow .18s, background .18s;
}
.content .card::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s;
}
.content .card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
  box-shadow: var(--shadow-sm);
  background: var(--panel-2);
}
.content .card:hover::before { transform: scaleX(1); }

.card-rank-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-bottom-left-radius: 12px;
  color: #fff;
  font-size: 11px;
  z-index: 2;
}
.card-rank-badge-1 { background: linear-gradient(145deg, #fbbf24, #f59e0b); }
.card-rank-badge-2 { background: linear-gradient(145deg, #94a3b8, #64748b); }
.card-rank-badge-3 { background: linear-gradient(145deg, #d97706, #b45309); }

.content .card-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--hover);
  overflow: hidden;
  transition: background .18s, transform .18s;
}
.content .card-icon img { width: 26px; height: 26px; object-fit: contain; }
.content .card-icon i { font-size: 18px; }
.content .card-icon .tool-icon-mask { width: 24px; height: 24px; }
.content .card:hover .card-icon { background: var(--brand-soft); transform: scale(1.04); }

.content .card-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 1px;
}
.content .card-name {
  display: block;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.content .card-desc {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 10. 首页全部工具索引 / SEO 文本 ---------- */
.all-tools {
  margin: 52px 0 40px;
  padding: 30px 30px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}
.sec-head { margin-bottom: 22px; }
.sec-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -.3px;
}
.sec-head h2 i { color: var(--brand); font-size: 18px; }
.sec-head p { margin-top: 5px; color: var(--muted); font-size: 13px; }

.index-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px 32px;
}
.index-group h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--fg);
}
.index-group h3 i { color: var(--brand); font-size: 12px; }
.index-group h3 a:hover { color: var(--brand); }
.index-links { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.index-links a {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.9;
  transition: color .14s;
}
.index-links a:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

.seo-block {
  margin-bottom: 44px;
  padding: 28px 30px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 60%, transparent);
}
.seo-block h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 750;
  color: var(--fg-2);
}
.seo-block p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.95;
}
.seo-block p:last-child { margin-bottom: 0; }

/* ---------- 11. 分类页 ---------- */
.cat-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(560px 240px at 92% -20%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    var(--panel);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.cat-hero-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.cat-hero-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 19px;
  background: linear-gradient(140deg, var(--brand-3), var(--brand) 55%, var(--brand-2));
  color: #fff;
  font-size: 26px;
  box-shadow: 0 16px 30px -18px rgba(14, 124, 102, .85);
}
.cat-hero h1 { margin: 0 0 5px; font-size: clamp(23px, 2.5vw, 30px); font-weight: 850; letter-spacing: -.5px; }
.cat-hero p { max-width: 720px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.cat-hero-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11.5px;
}
.cat-hero-meta span b { color: var(--brand); font-weight: 700; }
.cat-hero-meta i { color: var(--brand); font-size: 11px; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filter-chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.filter-chips .chip {
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  transition: all .16s;
}
.filter-chips .chip:hover { border-color: var(--brand); color: var(--brand); }
.filter-chips .chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(14, 124, 102, .9);
}
.cat-sort { display: flex; gap: 6px; }
.cat-sort a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  transition: all .16s;
}
.cat-sort a:hover { color: var(--brand); border-color: var(--brand); }
.cat-sort a.on { background: var(--brand-soft); border-color: transparent; color: var(--brand); font-weight: 600; }
.cat-sort i { font-size: 10px; }

/* ---------- 12. 搜索页 ---------- */
.search-box-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px 0 18px;
  height: 56px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: border-color .16s, box-shadow .16s;
}
.search-box-inner i { color: var(--muted-2); }
.search-box-inner input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 15px;
}
.search-box-inner button {
  height: 42px;
  padding: 0 24px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 650;
  font-size: 13.5px;
}
.search-box-inner:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 12%, transparent);
}
.content mark {
  padding: 0 3px;
  border-radius: 4px;
  background: rgba(245, 158, 11, .24);
  color: inherit;
}

/* ---------- 13. 正文 / 详情页 ---------- */
.article {
  padding: 34px 38px 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.art-title {
  margin: 0 0 10px;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 850;
  line-height: 1.4;
  letter-spacing: -.5px;
}
.art-meta {
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 12.5px;
}
.art-h2 {
  margin: 30px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--brand);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.5;
}
.art-body {
  color: var(--fg-2);
  font-size: 15.5px;
  line-height: 2.05;
  word-break: break-word;
}
.art-body p { margin: 0 0 1em; }
.art-body h2, .art-body h3 { margin: 1.6em 0 .7em; line-height: 1.5; color: var(--fg); }
.art-body h2 { font-size: 19px; }
.art-body h3 { font-size: 16.5px; }
.art-body a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.art-body ul, .art-body ol { margin: 0 0 1em; padding-left: 1.5em; }
.art-body li { margin-bottom: .35em; }
.art-body blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-left: 4px solid var(--brand-2);
  border-radius: 0 10px 10px 0;
  background: var(--brand-soft);
  color: var(--fg-2);
}
.art-body img { border-radius: 12px; margin: 1em auto; }
.art-body table {
  width: 100%;
  margin: 1.2em 0;
  border-collapse: collapse;
  font-size: 14px;
}
.art-body th, .art-body td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.art-body th { background: var(--hover); font-weight: 650; }
.art-body pre {
  margin: 1em 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--code-bg);
  overflow-x: auto;
  font: 13px/1.7 var(--mono);
}
.art-body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--code-bg);
  font: .92em/1.6 var(--mono);
}
.art-body pre code { padding: 0; background: transparent; }

.content .art-section {
  margin-bottom: 18px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-xs);
}
.content .art-section > h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -.2px;
}
.content .art-section > h2 i { color: var(--brand); font-size: 15px; }
.content .art-section h3 { font-size: 15px; font-weight: 700; }
.content .art-section p { color: var(--fg-2); }

/* ---------- 14. 右侧信息栏 ---------- */
.page-rail {
  position: sticky;
  top: calc(var(--topbar-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.rail-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-xs);
}
.rail-info {
  background:
    radial-gradient(240px 140px at 100% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%),
    var(--panel);
}
.rail-info-head { display: flex; align-items: center; gap: 12px; }
.rail-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--hover);
  overflow: hidden;
}
.rail-icon img { width: 28px; height: 28px; object-fit: contain; }
.rail-icon i { font-size: 20px; }
.rail-icon .tool-icon-mask { width: 26px; height: 26px; }
.rail-info-txt { min-width: 0; }
.rail-info-txt h3 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rail-info-txt a { color: var(--brand); font-size: 11.5px; }
.rail-facts { list-style: none; margin: 14px 0 15px; display: flex; flex-direction: column; gap: 7px; }
.rail-facts li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.rail-facts i { width: 14px; color: var(--brand); font-size: 11px; text-align: center; }
.rail-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  font-size: 11.5px;
  transition: all .16s;
}
.rail-cta:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

.rail-card h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 11px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--fg-2);
}
.rail-card h4 i { color: var(--gold); font-size: 12px; }
.rail-list { list-style: none; display: flex; flex-direction: column; gap: 1px; }
.rail-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12.5px;
  transition: background .14s, color .14s;
}
.rail-list a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-list a i { font-size: 9px; opacity: 0; transition: opacity .14s; }
.rail-list a:hover { background: var(--hover); color: var(--brand); }
.rail-list a:hover i { opacity: 1; }
.rail-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 9px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  color: var(--brand);
  font-size: 11.5px;
}
.rail-hot { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.rail-hot a { display: flex; align-items: center; gap: 9px; padding: 6px 4px; border-radius: 7px; font-size: 12.5px; color: var(--muted); }
.rail-hot a:hover { color: var(--brand); background: var(--hover); }
.rail-hot em {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--hover);
  color: var(--muted-2);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
}
.rail-hot li:nth-child(1) em { background: #fef3c7; color: #b45309; }
.rail-hot li:nth-child(2) em { background: #e2e8f0; color: #475569; }
.rail-hot li:nth-child(3) em { background: #ffedd5; color: #c2410c; }
.rail-safe p { margin: 0 0 10px; color: var(--muted); font-size: 11.5px; line-height: 1.75; }
.rail-safe a { color: var(--brand); font-size: 11.5px; }

/* ---------- 15. 列表 / 字母导航 / 国家卡片 ---------- */
.content .list {
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.content .list li { border-bottom: 1px solid var(--line); }
.content .list li:last-child { border-bottom: 0; }
.content .list li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-size: 14px;
  transition: background .14s, color .14s;
}
.content .list li a i { color: var(--muted-2); font-size: 10px; }
.content .list li a:hover { background: var(--hover); color: var(--brand); }
.content .list li a:hover i { color: var(--brand); transform: translateX(2px); }

.content .alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 18px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.content .alpha-nav a {
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12.5px;
  transition: all .14s;
}
.content .alpha-nav a:hover { background: var(--hover); color: var(--brand); }
.content .alpha-nav a.on { background: var(--brand); color: #fff; }

.na-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 11px;
}
.na-card {
  display: flex;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  transition: transform .16s, border-color .16s, box-shadow .16s;
}
.na-card:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: var(--shadow-sm); }
.na-flag { width: 44px; height: 32px; flex: 0 0 auto; border-radius: 5px; overflow: hidden; background: var(--hover); display: grid; place-items: center; }
.na-flag img { width: 100%; height: 100%; object-fit: cover; }
.na-flag i { color: var(--muted-2); font-size: 14px; }
.na-body { min-width: 0; flex: 1 1 auto; }
.na-name { display: block; font-size: 14px; font-weight: 650; }
.na-sub { display: block; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.na-meta { display: flex; gap: 10px; margin-top: 5px; color: var(--muted-2); font-size: 11px; }
.na-meta i { font-size: 10px; }
.na-code { padding: 0 5px; border-radius: 4px; background: var(--hover); font-size: 10px; letter-spacing: .5px; }

/* 汉字网格：指定中文字体，避免生僻字被彩色字体渲染成浅色 */
.content .hanzi-zi,
.content .hanzi-big-text {
  color: var(--fg);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}
.content .hanzi-zi { font-weight: 600; }
.content .hanzi-grid {
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
}
.content .hanzi-cell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.content .hanzi-cell:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  transform: translateY(-2px);
}

/* 分类标签条：取消旧版固定高度与内部滚动，改为自然换行 */
.page-main > nav[class$="-cats"],
.page-main > div[class$="-cats"] {
  max-height: none !important;
  overflow: visible !important;
}

/* ---------- 16. 分页 / 空状态 ---------- */
.content .pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 32px 0 8px;
}
.content .pager a,
.content .pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--fg-2);
  font-size: 12.5px;
  transition: all .14s;
}
.content .pager a:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.content .pager a.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.content .pager .pg-dot { border: 0; background: transparent; padding: 0 2px; color: var(--muted-2); }
.content .pager .pg-jump { border: 0; background: transparent; padding: 0 6px; color: var(--muted); font-size: 12px; gap: 5px; }
.content .pager .pg-input {
  width: 54px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--fg);
  text-align: center;
  font-size: 12px;
}

.content .empty-box {
  padding: 64px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}
.content .empty-box i { display: block; margin-bottom: 14px; color: var(--line-strong); font-size: 46px; }
.content .empty-box p { margin: 0; font-size: 13.5px; }

/* ---------- 17. 收藏页 ---------- */
.fav-page-list { display: flex; flex-direction: column; gap: 10px; }
.fav-page-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}
.fav-page-link { display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0; }
.fav-page-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.fav-page-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.fav-page-del {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.fav-page-del:hover { border-color: #ef4444; color: #ef4444; background: rgba(239, 68, 68, .08); }
.fav-page-actions { display: flex; justify-content: flex-end; margin-top: 6px; }
.fav-page-clear {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12.5px;
}
.fav-page-clear:hover { border-color: #ef4444; color: #ef4444; }

/* ---------- 18. 页脚 ---------- */
footer.foot {
  margin: 48px 0 0 var(--sidebar-w);
  padding: 46px 34px 26px;
  background: #071a15;
  color: #c9ded7;
  text-align: left;
  font-size: 13px;
}
[data-theme="dark"] footer.foot { background: #050d0b; border-top: 1px solid var(--line); }
.foot-inner {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) repeat(3, minmax(0, 1fr));
  gap: 38px;
  max-width: 1560px;
  margin: 0 auto;
}
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand .brand-text strong { color: #f1fffa; }
.foot-brand .brand-text em { color: rgba(201, 222, 215, .45); }
.foot-brand p { max-width: 460px; color: rgba(201, 222, 215, .6); font-size: 12.5px; line-height: 1.9; }
.foot-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.foot-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 20px;
  color: rgba(201, 222, 215, .68);
  font-size: 11px;
}
.foot-badges i { color: #2dd4bf; font-size: 10px; }
.foot-col h5 {
  margin: 0 0 13px;
  color: #f1fffa;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.foot-col a {
  display: block;
  width: fit-content;
  margin-bottom: 8px;
  color: rgba(201, 222, 215, .62);
  font-size: 12.5px;
  transition: color .14s, transform .14s;
}
.foot-col a:hover { color: #5eead4; transform: translateX(2px); }
.foot-col a i { font-size: 9px; }
.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1560px;
  margin: 36px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.foot-bottom p { margin: 0; color: rgba(201, 222, 215, .4); font-size: 11.5px; }
.foot-bottom a { color: rgba(201, 222, 215, .62); }
.foot-bottom a:hover { color: #5eead4; }

/* ---------- 19. 浮动操作 / 移动底栏 ---------- */
.float-bar {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.float-bar .fb-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  transition: background .14s, color .14s;
}
.float-bar .fb-btn:hover { background: var(--brand-soft); color: var(--brand); }
.float-bar .fb-btn.on { background: var(--brand); color: #fff; }
.float-bar .fb-top { display: none; }
.float-bar .fb-top.show { display: grid; }
.fb-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  line-height: 16px;
  text-align: center;
}
.like-fly {
  position: absolute;
  left: 50%;
  top: -6px;
  color: #ef4444;
  font-size: 13px;
  font-weight: 700;
  animation: likeFly .9s ease-out forwards;
  pointer-events: none;
}
@keyframes likeFly {
  0% { opacity: 1; transform: translate(-50%, 0) scale(.8); }
  100% { opacity: 0; transform: translate(-50%, -30px) scale(1.15); }
}

.mobile-tabs { display: none; }

/* ---------- 20. 响应式 ---------- */
@media (max-width: 1380px) {
  .content .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* 桌面端为右侧浮动操作条预留空间，避免遮挡右栏 */
@media (min-width: 1301px) {
  main.content { padding-right: 88px; }
}

@media (max-width: 1200px) {
  :root { --sidebar-w: 236px; --rail-w: 270px; }
  .top-links { display: none; }
  .top-search { max-width: none; }
  .hero { gap: 28px; padding: 42px 38px; }
  .hero-map { min-height: 280px; }
  .page-layout { gap: 20px; }
}

@media (max-width: 1300px) {
  .page-layout { grid-template-columns: minmax(0, 1fr); }
  .page-rail { display: none; }
}

@media (max-height: 1100px) {
  .side-card { display: none; }
}
@media (max-width: 1024px) {
  .side-card { display: block; }
  :root { --sidebar-w: 268px; }
  .menu-toggle { display: inline-flex; }
  .sidebar {
    transform: translateX(-102%);
    box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .7);
    background: var(--panel);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  main.content {
    margin-left: 0;
    padding: calc(var(--topbar-h) + 20px) 18px 0;
  }
  footer.foot { margin-left: 0; padding: 38px 20px 22px; }
  .hero { grid-template-columns: 1fr; }
  .hero-map { display: none; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --topbar-h: 60px; }
  body { font-size: 15px; }
  .topbar-inner { padding: 0 12px; gap: 9px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; font-size: 16px; }
  .brand-text strong { font-size: 16px; }
  .brand-text em { display: none; }
  .top-search { display: none; }
  .theme-toggle { margin-left: auto; width: 36px; height: 36px; }

  main.content { padding: calc(var(--topbar-h) + 14px) 13px 0; }
  .hero { padding: 30px 22px 28px; border-radius: 20px; margin-bottom: 16px; }
  .hero-title { font-size: 27px; letter-spacing: -.5px; }
  .hero-sub { font-size: 13px; margin-bottom: 20px; }
  .hero-search { height: 48px; border-radius: 13px; padding-left: 13px; }
  .hero-search button { height: 36px; padding: 0 15px; font-size: 12.5px; }
  .hero-tags { gap: 6px; font-size: 11px; }
  .hero-tags a { padding: 3px 8px; }

  .stat-strip { gap: 8px; margin-bottom: 28px; }
  .stat-item { padding: 13px 14px; gap: 7px; flex-wrap: wrap; }
  .stat-item strong { font-size: 21px; }
  .stat-item span { font-size: 11px; }
  .stat-item em { display: none; }

  .page-head { padding: 18px 17px 19px; border-radius: 16px; }
  .page-head h1 { font-size: 21px; gap: 9px; }
  .page-head h1 > i { width: 36px; height: 36px; border-radius: 11px; font-size: 16px; }
  .page-icon { width: 38px; height: 38px; }
  .page-sub { font-size: 12.5px; }

  .cat-block { margin-bottom: 30px; }
  .cat-head h2 { font-size: 17px; }
  .cat-ico { width: 34px; height: 34px; border-radius: 10px; }
  .cat-count { display: none; }
  .more { padding: 6px 10px; font-size: 11px; }

  .content .grid { grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); gap: 8px; }
  .content .card { padding: 11px; gap: 9px; border-radius: 12px; }
  .content .card-icon { width: 36px; height: 36px; border-radius: 10px; }
  .content .card-icon img { width: 22px; height: 22px; }
  .content .card-name { font-size: 13px; }
  .content .card-desc { display: none; }

  .cat-hero { padding: 20px; gap: 16px; border-radius: 16px; }
  .cat-hero-icon { width: 50px; height: 50px; border-radius: 15px; font-size: 21px; }
  .cat-hero h1 { font-size: 22px; }
  .cat-hero p { font-size: 12px; }
  .cat-hero-meta span { padding: 5px 10px; font-size: 10.5px; }

  .toolbar { gap: 10px; }
  .filter-chips { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .filter-chips .chip { flex: 0 0 auto; }
  .cat-sort { width: 100%; }
  .cat-sort a { flex: 1 1 0; justify-content: center; }

  .all-tools { padding: 22px 17px 18px; border-radius: 16px; margin: 34px 0 28px; }
  .sec-head h2 { font-size: 18px; }
  .index-groups { grid-template-columns: 1fr; gap: 18px; }
  .seo-block { padding: 20px 17px; border-radius: 16px; }
  .seo-block p { font-size: 12px; }

  .article { padding: 22px 17px 24px; border-radius: 16px; }
  .art-title { font-size: 22px; }
  .art-body { font-size: 15px; line-height: 1.95; }
  .content .art-section { padding: 18px 16px; border-radius: 15px; }

  .search-box-inner { height: 48px; border-radius: 13px; padding-left: 13px; }
  .search-box-inner button { height: 36px; padding: 0 16px; }

  .na-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .na-card { padding: 10px; gap: 8px; border-radius: 11px; }
  .na-flag { width: 34px; height: 24px; }
  .na-sub, .na-meta { display: none; }

  footer.foot { margin-top: 34px; padding: 30px 18px calc(72px + env(safe-area-inset-bottom)); }
  .foot-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-brand p { font-size: 12px; }
  .foot-bottom { margin-top: 22px; }
  .foot-bottom p { font-size: 10.5px; }

  .float-bar { display: none; }
  .mobile-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
  }
  .mobile-tabs a,
  .mobile-tabs button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 10.5px;
  }
  .mobile-tabs i { font-size: 16px; }
  .mobile-tabs a.on,
  .mobile-tabs a:hover,
  .mobile-tabs button:hover { color: var(--brand); background: var(--brand-soft); }
}

@media (max-width: 420px) {
  .content .grid { grid-template-columns: 1fr 1fr; }
  .content .card-icon { width: 34px; height: 34px; }
  .cat-hero-meta { display: none; }
}

/* ---------- 21. 暗色细节 ---------- */
[data-theme="dark"] .hero {
  background:
    radial-gradient(720px 420px at 88% 6%, rgba(45, 212, 191, .22), transparent 65%),
    radial-gradient(560px 360px at 4% 96%, rgba(245, 158, 11, .10), transparent 60%),
    linear-gradient(135deg, #031712 0%, #042720 45%, #063a30 100%);
}
[data-theme="dark"] .side-card {
  background:
    radial-gradient(180px 120px at 100% 0%, rgba(45, 212, 191, .28), transparent 70%),
    linear-gradient(150deg, #052e27 0%, #075c4c 60%, #0a7c68 130%);
}
[data-theme="dark"] .rail-hot li:nth-child(1) em { background: rgba(245, 158, 11, .18); color: #fbbf24; }
[data-theme="dark"] .rail-hot li:nth-child(2) em { background: rgba(148, 163, 184, .18); color: #cbd5e1; }
[data-theme="dark"] .rail-hot li:nth-child(3) em { background: rgba(249, 115, 22, .18); color: #fdba74; }
[data-theme="dark"] .chip.on { color: #04231d; }
[data-theme="dark"] .content .card:hover { background: var(--panel); }

/* ---------- 22. 打印 ---------- */
@media print {
  .topbar, .sidebar, .page-rail, .float-bar, .mobile-tabs, .foot, .overlay { display: none !important; }
  main.content { margin: 0; padding: 0; }
  .page-head, .article, .art-section { box-shadow: none; border: 0; padding: 0; }
  body { background: #fff; }
}
