/* ==========================================================================
   赣石百科 · 响应式站点样式
   --------------------------------------------------------------------------
   设计语言：宣纸米白 + 墨色文字 + 赭石棕主色 + 黄蜡石金点缀
   移动优先，四档断点：640 / 900 / 1180 / 1440
   深浅色跟随系统，可用右上角按钮手动覆盖（localStorage: gs-theme）
   ========================================================================== */

/* ---------------------------------------------------------------- 1. 令牌 */
:root {
  --bg: #FAF7F2;
  --bg-alt: #F4EFE7;
  --surface: #FFFFFF;
  --surface-2: #FBF8F3;
  --ink: #2E2B27;
  --ink-soft: #6B635A;
  --ink-faint: #746B63;
  --primary: #8A5A3B;
  --primary-deep: #6E452B;
  --primary-wash: #F3E9E0;
  --accent: #C08A2E;
  --accent-wash: #FBF1DC;
  --line: #E8E0D5;
  --line-strong: #D8CCBB;
  --shadow-1: 0 1px 2px rgba(60, 45, 30, .05), 0 2px 8px rgba(60, 45, 30, .04);
  --shadow-2: 0 2px 6px rgba(60, 45, 30, .07), 0 12px 28px rgba(60, 45, 30, .08);
  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 20px;
  --wrap: 1180px;
  --wrap-narrow: 860px;
  --head-h: 62px;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong",
    "SimSun", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* 特异性必须为 0,1,1（高于自定义器 :root 的 0,1,0），
   否则自定义器在 wp_head 后输出的浅色 --bg/--bg-alt 会把暗色底色压回浅色，
   出现「浅底浅字」整个页面不可读。 */
html[data-theme="dark"] {
  --bg: #191715;
  --bg-alt: #21201D;
  --surface: #232120;
  --surface-2: #1E1C1A;
  --ink: #ECE6DD;
  --ink-soft: #B0A79A;
  --ink-faint: #A39A8E;
  --primary: #D9A177;
  --primary-deep: #E7B48D;
  --primary-wash: #2E2721;
  --accent: #E4C176;
  --accent-wash: #2E2A1D;
  --line: #34302B;
  --line-strong: #443E37;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, .35), 0 14px 32px rgba(0, 0, 0, .4);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; border: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, button, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }

::selection { background: var(--accent-wash); color: var(--ink); }

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

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 2px solid var(--bg-alt); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--primary); color: #fff; padding: 10px 18px;
  border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- 3. 布局 */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 18px;
}

main { display: block; min-height: 60vh; padding-bottom: 40px; }

.sec { margin: 44px auto 0; }
.sec + .sec { margin-top: 52px; }

/* ---------------------------------------------------------------- 4. 图标 */
.ico { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ico svg { width: 22px; height: 22px; display: block; }
.ico-xs svg { width: 15px; height: 15px; }
.ico-sm svg { width: 18px; height: 18px; }
.ico-lg svg { width: 32px; height: 32px; }

/* ---------------------------------------------------------------- 5. 头部 */
.site-head {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  height: var(--head-h);
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand { display: flex; align-items: center; gap: 9px; flex: none; }

.brand-mark {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--primary), var(--primary-deep));
  color: #FAF7F2;
  border-radius: 10px;
  font-family: var(--font-serif);
  font-size: 20px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(110, 69, 43, .28);
}

.brand-text { display: flex; align-items: baseline; gap: 1px; font-family: var(--font-serif); }
.brand-text b { font-size: 19px; letter-spacing: .5px; color: var(--ink); }
.brand-text i { font-size: 13px; font-style: normal; color: var(--primary); letter-spacing: 1px; }

.brand-tag {
  font-size: 11px; color: var(--ink-faint);
  padding: 2px 7px; border: 1px solid var(--line-strong);
  border-radius: 20px; margin-left: 4px; white-space: nowrap;
}

/* 导航 */
.nav { margin-left: auto; }

.nav-list { display: flex; align-items: center; gap: 2px; }

.nav-item { position: relative; }

.nav-link {
  display: block;
  padding: 8px 11px;
  font-size: 15px;
  color: var(--ink-soft);
  border-radius: 8px;
  white-space: nowrap;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-item:hover > .nav-link,
.nav-link[aria-current="page"] { color: var(--primary); background: var(--primary-wash); }

.nav-more {
  display: none;
  background: none; border: 0; padding: 0 2px;
  color: var(--ink-faint);
}
.nav-more svg { width: 14px; height: 14px; display: block; }

.sub {
  position: absolute; top: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 176px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  padding: 7px;
  opacity: 0; visibility: hidden;
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s;
}
.nav-item.has-sub:hover .sub,
.nav-item.has-sub:focus-within .sub {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.sub a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 11px; border-radius: 8px;
  font-size: 14.5px; color: var(--ink-soft);
}
.sub a:hover { background: var(--bg-alt); color: var(--primary); }
.sub-count { font-size: 12px; color: var(--ink-faint); }

.head-actions { display: flex; align-items: center; gap: 4px; flex: none; margin-left: 8px; }

.icon-btn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: none; border: 0; border-radius: 10px;
  color: var(--ink-soft);
  transition: background .18s var(--ease), color .18s var(--ease);
}
.icon-btn:hover { background: var(--bg-alt); color: var(--primary); }

/* 扩大触控热区到 ≥46px（WCAG 建议 44px+），不改变视觉尺寸 */
.icon-btn, .burger { position: relative; }
.icon-btn::after, .burger::after { content: ''; position: absolute; inset: -4px; }

#themeBtn .i-moon { display: none; }
[data-theme="dark"] #themeBtn .i-sun { display: none; }
[data-theme="dark"] #themeBtn .i-moon { display: block; }

.burger {
  display: none; width: 40px; height: 40px;
  background: none; border: 0; border-radius: 10px;
  padding: 11px 9px;
  flex-direction: column; justify-content: space-between;
}
.burger span {
  display: block; height: 2px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform .24s var(--ease), opacity .18s var(--ease);
}
body.nav-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-scrim {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(30, 22, 14, .42);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .25s var(--ease);
}
body.nav-open .nav-scrim { opacity: 1; }

/* ---------------------------------------------------------------- 6. 面包屑 */
.crumbs { margin-top: 20px; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--ink-faint); }
.crumb-item { display: flex; align-items: center; gap: 6px; max-width: 100%; }
.crumb-item + .crumb-item::before { content: "/"; color: var(--line-strong); }
.crumb-item a { color: var(--ink-soft); transition: color .16s; }
.crumb-item a:hover { color: var(--primary); }
.crumb-item:last-child span {
  color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 46vw;
}

/* ---------------------------------------------------------------- 7. 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  transition: background .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.btn-primary {
  background: linear-gradient(140deg, var(--primary), var(--primary-deep));
  color: #FAF7F2;
  box-shadow: 0 2px 10px rgba(110, 69, 43, .22);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 5px 16px rgba(110, 69, 43, .3); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink-soft); background: var(--surface); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-wash); }
.btn-sm { padding: 7px 15px; font-size: 14px; }

/* ---------------------------------------------------------------- 8. Hero */
.hero {
  position: relative;
  padding: 54px 0 46px;
  background:
    radial-gradient(1100px 460px at 12% -12%, var(--accent-wash) 0%, transparent 62%),
    radial-gradient(760px 400px at 92% 4%, var(--primary-wash) 0%, transparent 58%),
    linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -70px; bottom: -90px;
  width: 300px; height: 300px; border-radius: 50%;
  border: 1px solid var(--line-strong); opacity: .5;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }

.hero-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--primary);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 5px 13px; border-radius: 999px;
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(27px, 5.2vw, 46px);
  line-height: 1.24;
  letter-spacing: .5px;
  margin-bottom: 14px;
  max-width: 17em;
}

.hero-sub {
  font-size: clamp(14.5px, 1.7vw, 17px);
  color: var(--ink-soft);
  max-width: 44em;
  margin-bottom: 26px;
}

.hero-search {
  display: flex; gap: 9px;
  max-width: 620px;
  margin-bottom: 16px;
  position: relative;
}
.hero-search .ico {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--ink-faint); pointer-events: none;
}
.hero-search input {
  flex: 1; min-width: 0;
  padding: 13px 18px 13px 42px;
  font-size: 15.5px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: border-color .18s, box-shadow .18s;
}
.hero-search input::placeholder { color: var(--ink-faint); }
.hero-search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-wash);
}
.hero-search .btn { flex: none; }

.hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-bottom: 28px; }
.ht-k { font-size: 13px; color: var(--ink-faint); margin-right: 2px; }
.ht {
  font-size: 13.5px; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line);
  padding: 4px 12px; border-radius: 999px;
  transition: all .18s var(--ease);
}
.ht:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-wash); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hs { display: flex; flex-direction: column; }
.hs b { font-family: var(--font-serif); font-size: 25px; color: var(--primary); line-height: 1.2; }
.hs span { font-size: 13px; color: var(--ink-faint); }

/* ---------------------------------------------------------------- 9. 区块头 */
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 20px;
}
.sec-lead { display: flex; align-items: flex-start; gap: 11px; }
.sec-ico { color: var(--primary); margin-top: 3px; }
.sec-ico svg { width: 22px; height: 22px; }
.sec-title {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.6vw, 25px);
  letter-spacing: .5px;
}
.sec-sub { font-size: 13.5px; color: var(--ink-faint); margin-top: 3px; }
.sec-more {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 14px; color: var(--primary);
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  white-space: nowrap; flex: none;
  transition: border-color .18s;
}
.sec-more:hover { border-bottom-color: var(--primary); }

/* ---------------------------------------------------------------- 10. 栏目卡 */
.cat-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.cat-card {
  display: flex; flex-direction: column; gap: 7px;
  padding: 19px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  position: relative; overflow: hidden;
}
.cat-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--primary));
  transform: scaleY(0); transform-origin: top;
  transition: transform .28s var(--ease);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.cat-card:hover::before { transform: scaleY(1); }

.cc-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cc-name { font-family: var(--font-serif); font-size: 19px; font-weight: 700; letter-spacing: .5px; text-wrap: balance; }
.cc-count { font-size: 12.5px; color: var(--ink-faint); flex: none; }
.cc-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.cc-kids { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.cc-kid {
  font-size: 12px; color: var(--ink-faint);
  background: var(--bg-alt); border-radius: 5px; padding: 2px 7px;
}
.cc-go {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; color: var(--primary); margin-top: 5px;
}
.cc-go .ico { transition: transform .2s var(--ease); }
.cat-card:hover .cc-go .ico { transform: translateX(4px); }

/* ---------------------------------------------------------------- 11. 头条区 */
.lede { display: grid; gap: 20px; }

.lede-main {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: box-shadow .22s var(--ease), transform .22s var(--ease);
}
.lede-main:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.lm-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-alt); }
.lm-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.lede-main:hover .lm-media img { transform: scale(1.04); }
.lm-body { display: block; padding: 20px 22px 22px; }
.lm-cat {
  display: inline-block; font-size: 12px; color: var(--primary);
  background: var(--primary-wash); padding: 3px 10px; border-radius: 999px; margin-bottom: 11px;
}
.lm-title { font-family: var(--font-serif); font-size: clamp(19px, 2.6vw, 24px); line-height: 1.42; margin-bottom: 9px; }
.lm-desc { font-size: 14.5px; color: var(--ink-soft); line-height: 1.72; margin-bottom: 13px; }
.lm-meta { font-size: 12.5px; color: var(--ink-faint); }

.lede-list { display: flex; flex-direction: column; gap: 2px; }
.lede-list li + li { border-top: 1px solid var(--line); }
.lede-list a {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 2px;
  transition: color .16s;
}
.lede-list a:hover .ll-title { color: var(--primary); }
.ll-title { font-size: 15.5px; font-weight: 600; line-height: 1.5; transition: color .16s; }
.ll-meta { font-size: 12.5px; color: var(--ink-faint); }

/* ---------------------------------------------------------------- 12. 石种横滑 */
.species-row {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: 68%;
  gap: 13px;
  overflow-x: auto;
  padding: 4px 18px 16px;
  margin: 0 -18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.species-row::-webkit-scrollbar { display: none; }
.species-card {
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.species-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.sp-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt); }
.sp-img img { width: 100%; height: 100%; object-fit: cover; }
.sp-img.is-empty {
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 30px; color: var(--ink-faint);
  background: linear-gradient(150deg, var(--bg-alt), var(--primary-wash));
}
.sp-body { padding: 13px 15px 4px; display: flex; flex-direction: column; gap: 2px; }
.sp-body b { font-family: var(--font-serif); font-size: 17px; }
.sp-body span { font-size: 12.5px; color: var(--ink-faint); }
.sp-go { padding: 6px 15px 14px; color: var(--primary); display: flex; }

/* ---------------------------------------------------------------- 13. 地市网格 */
.city-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.city-grid-lg { gap: 12px; }
.city-card {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 15px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .2s var(--ease);
}
.city-card:hover { border-color: var(--primary); background: var(--primary-wash); transform: translateY(-2px); }
.city-name { font-family: var(--font-serif); font-size: 16.5px; font-weight: 700; letter-spacing: .5px; }
.city-go { color: var(--ink-faint); display: flex; transition: transform .2s var(--ease), color .2s; }
.city-card:hover .city-go { color: var(--primary); transform: translateX(3px); }

/* ---------------------------------------------------------------- 14. 榜单 */
.top-list { display: flex; flex-direction: column; gap: 2px; }
.top-item a {
  display: flex; align-items: flex-start; gap: 13px;
  padding: 13px 2px;
  border-top: 1px solid var(--line);
  transition: background .16s;
}
.top-item:first-child a { border-top: 0; }
.top-item a:hover { background: var(--bg-alt); }
.top-no {
  flex: none; width: 25px; height: 25px;
  display: grid; place-items: center;
  border-radius: 7px;
  font-size: 13px; font-weight: 700;
  background: var(--bg-alt); color: var(--ink-faint);
  margin-top: 1px;
}
.top-no.is-hot { background: linear-gradient(140deg, var(--accent), var(--primary)); color: #fff; }
.top-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.top-title { font-size: 15.5px; font-weight: 600; line-height: 1.5; }
.top-item a:hover .top-title { color: var(--primary); }
.top-meta { font-size: 12.5px; color: var(--ink-faint); }

/* ---------------------------------------------------------------- 15. 文章卡片 */
.grid { display: grid; gap: 16px; }
.grid-cards { grid-template-columns: 1fr; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.card-link { display: flex; flex-direction: column; height: 100%; }
.card-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-alt); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-media.is-empty {
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--bg-alt) 0%, var(--primary-wash) 100%);
}
.card-media.is-empty span {
  font-family: var(--font-serif); font-size: 24px; letter-spacing: 4px; color: var(--ink-faint); opacity: .55;
}
.card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 17px 17px; gap: 9px; }
.card-cat {
  align-self: flex-start;
  font-size: 11.5px; color: var(--primary);
  background: var(--primary-wash);
  padding: 3px 9px; border-radius: 999px;
}
.card-title { font-family: var(--font-serif); font-size: 17px; line-height: 1.48; letter-spacing: .2px; }
.card-desc {
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.68;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { margin-top: auto; display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-faint); }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

/* ---------------------------------------------------------------- 16. 列表页 */
.list-head { padding: 26px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.6vw, 33px);
  letter-spacing: 1px; margin-bottom: 9px;
}
.page-desc { font-size: 15px; color: var(--ink-soft); max-width: 46em; line-height: 1.75; }
.list-count { font-size: 13px; color: var(--ink-faint); margin-top: 12px; }
.list-count b { color: var(--primary); }

/* 分页 */
.pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 6px; margin: 36px 0 12px;
}
.pager-btn {
  min-width: 40px; height: 40px; padding: 0 13px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: all .18s var(--ease);
}
.pager-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-wash); }
.pager-btn.is-cur {
  background: linear-gradient(140deg, var(--primary), var(--primary-deep));
  border-color: transparent; color: #FAF7F2; font-weight: 700;
}
.pager-btn.is-off { opacity: .42; pointer-events: none; }
.pager-gap { color: var(--ink-faint); padding: 0 3px; }

/* ---------------------------------------------------------------- 17. 栏目页 */
.cat-hero {
  display: grid; gap: 20px;
  padding: 30px 0 26px;
}
.cat-title { font-family: var(--font-serif); font-size: clamp(26px, 4.2vw, 38px); letter-spacing: 1.5px; margin-bottom: 11px; }
.cat-sub { font-size: 15px; color: var(--ink-soft); max-width: 44em; line-height: 1.78; }
.cat-stats { display: flex; gap: 22px; margin-top: 16px; }
.cat-stat { font-size: 13px; color: var(--ink-faint); display: flex; flex-direction: column; }
.cat-stat b { font-family: var(--font-serif); font-size: 22px; color: var(--primary); }

.cat-hero-top {
  display: block; position: relative;
  border-radius: var(--radius-l); overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  aspect-ratio: 16 / 9;
  background: var(--bg-alt);
}
.cat-hero-top img { width: 100%; height: 100%; object-fit: cover; }
.cht-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 20px 17px;
  display: flex; flex-direction: column; gap: 6px;
  background: linear-gradient(180deg, transparent, rgba(20, 14, 8, .82));
  color: #fff;
}
.cht-k { font-size: 11.5px; opacity: .85; letter-spacing: 2px; }
.cht-t { font-family: var(--font-serif); font-size: 17px; line-height: 1.45; }

/* 石种卡片 */
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.spec-card {
  display: flex; flex-direction: column; gap: 0;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: all .2s var(--ease);
}
.spec-card:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.spec-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg-alt); }
.spec-img img { width: 100%; height: 100%; object-fit: cover; }
.spec-body { display: flex; flex-direction: column; gap: 2px; padding: 13px 14px 4px; }
.spec-name { font-family: var(--font-serif); font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.spec-count { font-size: 12.5px; color: var(--ink-faint); }
.spec-go { padding: 8px 14px 14px; color: var(--primary); display: flex; }

/* 胶囊组 */
.chips-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.cr-k { font-size: 13px; color: var(--ink-faint); margin-right: 2px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; font-size: 13.5px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: all .18s var(--ease);
}
.chip:hover, .chip.is-on { color: var(--primary); border-color: var(--primary); background: var(--primary-wash); }
.chip-n { font-size: 11.5px; color: var(--ink-faint); }

/* ---------------------------------------------------------------- 18. 文章页 */
.article { padding-top: 8px; }
.art-layout { display: grid; gap: 34px; }
.art-main { min-width: 0; }

.art-head { padding: 22px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.art-cat {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--primary);
  background: var(--primary-wash);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 14px;
}
.art-title {
  font-family: var(--font-serif);
  font-size: clamp(23px, 3.9vw, 35px);
  line-height: 1.34; letter-spacing: .6px;
  margin-bottom: 14px;
}
.art-lead {
  font-size: 15px; color: var(--ink-soft); line-height: 1.8;
  padding-left: 15px; border-left: 3px solid var(--accent);
  margin-bottom: 18px;
}
.art-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--ink-faint); }
.art-meta-i { display: inline-flex; align-items: center; gap: 5px; }

/* 目录 */
.toc-inline {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 18px;
  margin-bottom: 28px;
}
.toc-inline summary {
  cursor: pointer; font-size: 14.5px; font-weight: 700;
  color: var(--primary); display: flex; align-items: center; gap: 8px;
  list-style: none;
}
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline summary::before {
  content: ""; width: 5px; height: 5px; border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor; transform: rotate(45deg);
  margin-right: 2px; transition: transform .2s var(--ease);
}
.toc-inline[open] summary::before { transform: rotate(225deg); }
.toc-n { font-size: 12px; color: var(--ink-faint); font-weight: 400; }
.toc-list { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.toc-list li { font-size: 14px; }
.toc-list a {
  display: block; padding: 5px 0; color: var(--ink-soft);
  border-bottom: 1px solid transparent; transition: color .16s;
}
.toc-list a:hover { color: var(--primary); }
.toc-l3 { padding-left: 17px; }
.toc-l3 a { font-size: 13.5px; color: var(--ink-faint); }

/* 正文排版 */
.rich { font-size: 16.5px; line-height: 1.92; color: var(--ink); word-break: break-word; }
.rich > * + * { margin-top: 1.15em; }
.rich p { margin: 0; }
.rich h2 {
  font-family: var(--font-serif);
  font-size: clamp(19px, 2.7vw, 23px);
  letter-spacing: .5px;
  margin: 2em 0 .9em;
  padding-left: 13px;
  border-left: 4px solid var(--accent);
  line-height: 1.5;
}
.rich h3 {
  font-family: var(--font-serif);
  font-size: clamp(17px, 2.2vw, 19.5px);
  margin: 1.7em 0 .75em;
  color: var(--primary-deep);
  line-height: 1.55;
}
.rich h4 { font-size: 16.5px; margin: 1.5em 0 .6em; }
.rich strong, .rich b { font-weight: 700; color: var(--primary-deep); }
.rich em { font-style: italic; }
.rich a {
  color: var(--primary);
  border-bottom: 1px solid color-mix(in srgb, var(--primary) 38%, transparent);
  transition: background .16s;
}
.rich a:hover { background: var(--primary-wash); border-bottom-color: var(--primary); }
.rich ul, .rich ol { padding-left: 1.35em; margin: 1.1em 0; }
.rich ul { list-style: none; }
.rich ul > li { position: relative; margin-bottom: .55em; }
.rich ul > li::before {
  content: ""; position: absolute; left: -1.05em; top: .78em;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.rich ol { list-style: decimal; }
.rich ol > li { margin-bottom: .55em; padding-left: .2em; }
.rich li > ul, .rich li > ol { margin: .5em 0; }
.rich blockquote {
  margin: 1.5em 0; padding: 14px 18px;
  background: var(--surface-2);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  color: var(--ink-soft); font-size: 15.5px;
}
.rich figure { margin: 1.7em 0; }
.rich .pi {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius);
  background: var(--bg-alt);
  box-shadow: var(--shadow-1);
}
.rich figcaption {
  margin-top: 9px; font-size: 13px; color: var(--ink-faint);
  text-align: center; line-height: 1.6;
}
.rich hr { margin: 2.2em 0; border-top: 1px dashed var(--line-strong); }
.rich code {
  font-family: var(--font-mono); font-size: .9em;
  background: var(--bg-alt); padding: .12em .42em; border-radius: 5px;
}

/* 表格 */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.6em 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.table-wrap table { border-collapse: collapse; width: 100%; min-width: 460px; font-size: 14.5px; }
.table-wrap th, .table-wrap td {
  padding: 11px 14px; text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.table-wrap th {
  background: var(--bg-alt);
  font-weight: 700; color: var(--primary-deep);
}
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover { background: var(--surface-2); }

/* Gutenberg 表格块（文章正文里用块编辑器插的表格）沿用 .table-wrap 的视觉效果，
   避免正文表格只有 WP 核心的裸样式（内边距小、无表头底色、无悬浮高亮），
   与短代码表格（.table-wrap）风格统一。外框/限宽/横向滑动兜底在 style.css 的
   .rich .wp-block-table / .rich table 里已处理。 */
.rich .wp-block-table {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.rich .wp-block-table table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}
.rich .wp-block-table th,
.rich .wp-block-table td {
  padding: 11px 14px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.rich .wp-block-table th {
  background: var(--bg-alt);
  font-weight: 700; color: var(--primary-deep);
}
.rich .wp-block-table tr:last-child td { border-bottom: 0; }
.rich .wp-block-table tbody tr:hover { background: var(--surface-2); }
/* 表头不换行只在桌面开：手机列本就窄，nowrap 会把表头撑到整行宽，
   反把数据列挤成几像素导致文字竖排、表格横向溢出。手机允许表头换行。 */
@media (min-width: 768px) {
  .rich .wp-block-table th,
  .table-wrap th { white-space: nowrap; }
}

/* 标签 / 出处 */
.art-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 32px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.tag-pill {
  font-size: 13px; color: var(--ink-soft);
  background: var(--bg-alt); border-radius: 999px; padding: 5px 13px;
  transition: all .18s var(--ease);
}
.tag-pill:hover { background: var(--primary-wash); color: var(--primary); }
.art-source {
  margin-top: 18px; font-size: 13px; color: var(--ink-faint);
  background: var(--surface-2); border: 1px dashed var(--line-strong);
  border-radius: var(--radius-s); padding: 11px 15px; line-height: 1.7;
}
.art-source a { color: var(--primary); border-bottom: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); }

/* 上下篇 */
.pn { display: grid; grid-template-columns: 1fr; gap: 11px; margin-top: 30px; }
.pn-item {
  display: flex; flex-direction: column; gap: 5px;
  padding: 15px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .2s var(--ease);
}
.pn-item:not(.is-off):hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.pn-item.is-off { background: transparent; border-style: dashed; }
.pn-k { font-size: 12px; color: var(--ink-faint); }
.pn-t { font-size: 15px; font-weight: 600; line-height: 1.5; }
.pn-item:hover .pn-t { color: var(--primary); }
.pn-item.is-next { text-align: right; }

/* 相关阅读 */
.rel-block { margin-top: 42px; padding-top: 30px; border-top: 1px solid var(--line); }

/* 侧栏 */
.art-side { display: flex; flex-direction: column; gap: 16px; }
/* 吸顶组：前 3 个小工具跟随正文滚动；底部组正常流（滚到文章后半段才出现）。
   只有桌面端（侧栏是独立竖栏）才吸顶，窄屏退回单列时这两组就是普通块。 */
.side-sticky { display: flex; flex-direction: column; gap: 16px; }
.side-rest { display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1180px) {
  /* .art-side 必须撑满 grid 行高（即正文高度），.side-sticky 才能在整个正文
     长度范围内吸顶跟随；否则 sticky 被父级 .art-side 的自身高度（仅内容高）锁死，
     滚过侧栏高度就失效。 */
  .art-side { align-self: stretch; }
  .side-sticky { position: sticky; top: 20px; }
  /* 底部组推到底：让「观赏石知识库 / 联系我们」落在侧栏最底部（正文末尾），
     读者看到文章结尾时才自然出现；否则它们紧跟吸顶组后、一滚动就滚出视口消失。 */
  .side-rest { margin-top: auto; }
}
.side-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow-1);
}
.side-h {
  display: flex; align-items: center; gap: 7px;
  font-size: 15px; font-family: var(--font-serif);
  letter-spacing: .5px; margin-bottom: 11px;
  padding-bottom: 11px; border-bottom: 1px solid var(--line);
  color: var(--primary);
}
.side-cta h3 { font-size: 15px; margin-bottom: 8px; font-family: var(--font-serif); }
.side-cta p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; margin-bottom: 13px; }
.city-side { display: flex; flex-wrap: wrap; gap: 6px; }
.city-side a {
  font-size: 13px; color: var(--ink-soft);
  background: var(--bg-alt); border-radius: 7px; padding: 5px 11px;
  transition: all .18s;
}
.city-side a:hover { background: var(--primary-wash); color: var(--primary); }
.city-side a.is-on { background: var(--primary); color: #FAF7F2; }

/* 侧栏目录（桌面端显示） */
.art-side .toc-side { display: none; }
.side-toc { counter-reset: toc; }
.side-toc li { border-bottom: 1px dashed var(--line); }
.side-toc li:last-child { border-bottom: 0; }
.side-toc a {
  display: block; padding: 8px 0;
  font-size: 13.5px; color: var(--ink-soft); line-height: 1.55;
  transition: color .16s;
}
.side-toc a:hover { color: var(--primary); }
.side-toc .toc-l3 { padding-left: 13px; }
.side-toc .toc-l3 a { font-size: 12.5px; color: var(--ink-faint); }

/* 列表页条数（无独立标题区时） */
.list-count-flush { font-size: 13px; color: var(--ink-faint); padding: 14px 0 16px; }
.list-count-flush b { color: var(--primary); }

/* 静态页 */
.article-static .art-cat.is-city { background: var(--accent-wash); color: var(--primary-deep); }

/* ---------------------------------------------------------------- 19. 搜索页 */
.is-search .hero { display: none; }
.search-head { padding: 34px 0 22px; }
.search-head h1 { font-family: var(--font-serif); font-size: clamp(25px, 3.8vw, 34px); letter-spacing: 1px; margin-bottom: 9px; }
.search-head p { font-size: 15px; color: var(--ink-soft); line-height: 1.75; max-width: 46em; }
.search-head a { color: var(--primary); border-bottom: 1px solid color-mix(in srgb, var(--primary) 40%, transparent); }

.search-form { display: flex; gap: 9px; position: relative; max-width: 680px; margin-bottom: 18px; }
.search-form .ico { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }
.search-form input {
  flex: 1; min-width: 0;
  padding: 13px 18px 13px 44px;
  font-size: 15.5px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: border-color .18s, box-shadow .18s;
}
.search-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-wash); }

.search-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 20px; }
.st-k { font-size: 13px; color: var(--ink-faint); }
.st-btn {
  font-size: 13.5px; color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 15px;
  transition: all .18s var(--ease);
}
.st-btn:hover { border-color: var(--primary); color: var(--primary); }
.st-btn.is-on { background: var(--primary); border-color: var(--primary); color: #FAF7F2; font-weight: 600; }
.st-count { font-size: 13px; color: var(--ink-faint); margin-left: auto; }

.search-hots { margin-bottom: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.search-hots .st-k { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 11px; }
.search-results { min-height: 240px; }

.sr-item {
  display: flex; gap: 15px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.sr-item:first-child { border-top: 0; }
.sr-media {
  flex: none; width: 116px; aspect-ratio: 4 / 3;
  border-radius: var(--radius-s); overflow: hidden;
  background: var(--bg-alt);
}
.sr-media img { width: 100%; height: 100%; object-fit: cover; }
.sr-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sr-title { font-family: var(--font-serif); font-size: 17px; line-height: 1.5; }
.sr-item:hover .sr-title { color: var(--primary); }
.sr-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.68; }
.sr-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--ink-faint); }
.sr-cat { color: var(--primary); background: var(--primary-wash); padding: 2px 9px; border-radius: 999px; }
mark { background: var(--accent-wash); color: var(--primary-deep); padding: 0 3px; border-radius: 3px; font-weight: 600; }

/* ---------------------------------------------------------------- 20. 标签页 */
.tag-hero { padding: 30px 0 20px; display: flex; flex-direction: column; gap: 6px; }
.tag-hero .ico { color: var(--primary); }
.tag-hero h2 { font-family: var(--font-serif); font-size: clamp(23px, 3.4vw, 31px); letter-spacing: 1px; }
.tag-hero p { font-size: 14px; color: var(--ink-faint); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 22px; border-top: 1px solid var(--line); }
.tag-cloud-i {
  display: inline-flex; align-items: baseline; gap: 6px;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 15px;
  line-height: 1.4;
  transition: all .2s var(--ease);
}
.tag-cloud-i:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-wash); transform: translateY(-2px); }
.tci-n { font-size: 11px; color: var(--ink-faint); }

/* ---------------------------------------------------------------- 21. CTA / 空状态 / 404 */
.cta { margin-top: 56px; }
.cta-inner {
  display: flex; flex-direction: column; gap: 16px;
  padding: 28px 24px;
  background:
    radial-gradient(600px 240px at 88% 0%, var(--accent-wash), transparent 70%),
    linear-gradient(140deg, var(--primary-wash), var(--surface-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  text-align: left;
}
.cta-ico { color: var(--primary); }
.cta-ico svg { width: 27px; height: 27px; }
.cta-text h2 { font-family: var(--font-serif); font-size: clamp(19px, 2.7vw, 24px); letter-spacing: .5px; margin-bottom: 7px; }
.cta-text p { font-size: 14.5px; color: var(--ink-soft); line-height: 1.75; max-width: 42em; }
.cta .btn { align-self: flex-start; }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 11px;
  padding: 60px 20px; text-align: center;
  color: var(--ink-faint);
}
.empty-ico { color: var(--line-strong); }
.empty-text { font-size: 15px; }
.empty-hint { font-size: 13.5px; }

.notfound { text-align: center; padding: 56px 18px 70px; }
.nf-mark {
  font-family: var(--font-serif); font-size: clamp(72px, 16vw, 130px);
  line-height: 1; letter-spacing: 6px;
  background: linear-gradient(140deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.notfound h1 { font-family: var(--font-serif); font-size: clamp(21px, 3.2vw, 28px); margin-bottom: 11px; }
.notfound p { font-size: 15px; color: var(--ink-soft); max-width: 34em; margin: 0 auto 26px; line-height: 1.8; }
.nf-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------------------------------------------------------------- 22. 页脚 */
.site-foot {
  margin-top: 56px;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding: 44px 0 26px;
}
.foot-top { display: grid; gap: 30px; }
.foot-brand { display: flex; flex-direction: column; gap: 13px; }
.brand-lg .brand-mark { width: 40px; height: 40px; font-size: 23px; }
.brand-lg .brand-text b { font-size: 22px; }
.foot-blurb { font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; max-width: 34em; }
.foot-mail { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-faint); }
.foot-mail a { color: var(--primary); }
.foot-mail a:hover { border-bottom: 1px solid var(--primary); }

.foot-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 20px; }
.foot-col h3 {
  font-size: 13px; color: var(--ink-faint);
  letter-spacing: 2px; font-weight: 600; margin-bottom: 13px;
}
.foot-col ul { display: flex; flex-direction: column; gap: 9px; }
.foot-col a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--ink-soft);
  transition: color .16s;
}
.foot-col a:hover { color: var(--primary); }
.foot-cats { display: flex; flex-wrap: wrap !important; gap: 8px !important; }
.foot-cats li a {
  font-size: 13px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px;
}
.foot-cats li a:hover { border-color: var(--primary); }

.foot-bottom {
  margin-top: 34px; padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.foot-copy { font-size: 13px; color: var(--ink-soft); }
.foot-note { font-size: 12.5px; color: var(--ink-faint); line-height: 1.75; max-width: 52em; }

/* ---------------------------------------------------------------- 23. 工具 */
.to-top {
  position: fixed; right: 16px; bottom: 20px; z-index: 40;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--surface);
  color: var(--primary);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: var(--shadow-2);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .25s var(--ease);
}
.to-top.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--primary); color: #FAF7F2; border-color: var(--primary); }

.read-progress {
  position: fixed; top: 0; left: 0; z-index: 70;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  transition: width .1s linear;
}

/* 灯箱 */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: rgba(18, 13, 8, .92);
  padding: 22px;
  opacity: 0; transition: opacity .22s var(--ease);
}
.lightbox.is-on { opacity: 1; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: var(--radius-s); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.lightbox-close {
  position: absolute; top: 18px; right: 18px;
  width: 42px; height: 42px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .13); color: #fff;
  border: 0; border-radius: 50%;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .24); }
.rich .pi { cursor: zoom-in; }

/* ================================================================ 响应式 */

/* --- 平板竖屏 */
@media (min-width: 640px) {
  .wrap { padding: 0 24px; }
  .hero { padding: 66px 0 54px; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .cat-cards { grid-template-columns: repeat(2, 1fr); }
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
  .species-row { grid-auto-columns: 42%; padding-inline: 24px; margin-inline: -24px; }
  .city-grid { grid-template-columns: repeat(3, 1fr); }
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
  .lede-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 24px; }
  .lede-list li + li { border-top: 1px solid var(--line); }
  .pn { grid-template-columns: 1fr 1fr; }
  .cta-inner { flex-direction: row; align-items: center; padding: 32px 34px; }
  .cta-inner .cta-text { flex: 1; }
  .cta .btn { align-self: center; flex: none; }
  .foot-cols { grid-template-columns: repeat(3, 1fr); }
  .foot-bottom { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 28px; }
  .foot-copy { flex: none; }
  .crumbs { margin-top: 26px; }
  .list-head { padding: 34px 0 24px; }
}

/* --- 平板横屏 / 小桌面：导航展开 */
@media (min-width: 900px) {
  .grid-cards { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .cat-cards { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .city-grid { grid-template-columns: repeat(4, 1fr); }
  .city-grid-lg { grid-template-columns: repeat(4, 1fr); }
  .lede { grid-template-columns: 1.32fr 1fr; gap: 26px; align-items: start; }
  .lede-list { grid-template-columns: 1fr; }
  .species-row { grid-auto-columns: 27%; }
  .sec { margin-top: 54px; }
  .sec + .sec { margin-top: 64px; }
  .hero { padding: 74px 0 60px; }
  .foot-top { grid-template-columns: 1fr 1.5fr; gap: 46px; }
  .foot-cols { grid-template-columns: repeat(3, 1fr); }
}

/* --- 桌面：文章页双栏 + 侧栏吸顶 */
@media (min-width: 1180px) {
  .wrap { padding: 0 28px; }
  .article .art-layout { grid-template-columns: minmax(0, 1fr) 306px; gap: 44px; }
  /* 侧栏吸顶由内部 .side-sticky（前 3 个小工具）承担，见上方「侧栏」区块。
     这里不再把 .art-side 设为 align-self:start——它必须撑满 grid 行高，
     .side-sticky 才能在整个正文长度内吸顶跟随。 */
  .article-static .art-layout { grid-template-columns: minmax(0, 1fr) 288px; }
  .cat-hero { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 34px; padding: 40px 0 32px; }
  .cat-hero + .list-count-flush { padding-top: 4px; }
  .spec-grid { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .spec-card .spec-name { font-size: 16px; }
  .species-row { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; grid-template-columns: repeat(6, 1fr); margin-inline: 0; padding-inline: 0; }
  .grid-cards { grid-template-columns: repeat(3, 1fr); }
  .toc-inline { display: none; }
  .art-side .toc-side { display: block; }
  .rich { font-size: 17px; }
  .hero-stats { grid-template-columns: repeat(4, 1fr); max-width: 640px; }
}

/* --- 宽屏 */
@media (min-width: 1440px) {
  :root { --wrap: 1260px; }
  .grid-cards { gap: 22px; }
}

/* --- 移动端导航抽屉 */
@media (max-width: 899px) {
  .brand-tag { display: none; }
  .burger { display: flex; }
  /* 桌面端把图标推到右边的是 .nav 的 margin-left:auto；
     移动端 .nav 变成 fixed 抽屉后脱离文档流，图标就贴到了站名旁边，
     这里自己接管右推，并把三个图标稍微分开。 */
  .head-actions { margin-left: auto; gap: 8px; }
  /* 文章页布局在窄屏退回单列块级。基础规则 .art-layout 是 grid 且
     网格项默认 min-width:auto，正文里的宽表格（min-content 500px+）
     会把整页撑出横向滚动、右侧内容被裁掉。 */
  .article .art-layout,
  .article-static .art-layout { display: block; }

  .nav {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(84vw, 340px);
    z-index: 55;
    background: var(--bg);
    border-left: 1px solid var(--line);
    box-shadow: -18px 0 48px rgba(40, 28, 16, .18);
    padding: calc(var(--head-h) + 12px) 14px 28px;
    overflow-y: auto;
    transform: translateX(102%);
    transition: transform .3s var(--ease);
    margin-left: 0;
  }
  body.nav-open .nav { transform: translateX(0); }

  .nav-list { flex-direction: column; align-items: stretch; gap: 1px; }
  .nav-item { border-bottom: 1px solid var(--line); }
  .nav-item:last-child { border-bottom: 0; }
  .nav-item.has-sub { display: grid; grid-template-columns: 1fr auto; align-items: center; }

  .nav-link { padding: 14px 6px; font-size: 16px; border-radius: 8px; }
  .nav-item:hover > .nav-link, .nav-link[aria-current="page"] { background: transparent; }

  .nav-more { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; }
  .nav-more:hover { background: var(--bg-alt); }
  .nav-more svg { transition: transform .22s var(--ease); }
  .nav-item.is-open .nav-more svg { transform: rotate(180deg); }

  .sub {
    position: static; transform: none;
    opacity: 1; visibility: visible;
    grid-column: 1 / -1;
    display: none;
    background: var(--bg-alt);
    border: 0; border-radius: 10px;
    box-shadow: none;
    padding: 7px; margin: 0 0 9px;
    min-width: 0;
  }
  .nav-item.is-open .sub { display: block; }
  .nav-item.has-sub:hover .sub { transform: none; }
  .sub a { padding: 10px 12px; font-size: 15px; }

  .sr-item { flex-direction: column; gap: 11px; }
  .sr-media { width: 100%; aspect-ratio: 16 / 9; }
}

/* --- 超小屏微调 */
@media (max-width: 400px) {
  .hero-search { flex-direction: column; }
  .hero-search .btn { width: 100%; justify-content: center; }
  .search-form { flex-direction: column; }
  .search-form .btn { width: 100%; justify-content: center; }
  .spec-grid { grid-template-columns: 1fr; }
}

/* --- 大屏首字下沉等细节增强 */
@media (min-width: 900px) {
  .rich > p:first-of-type { font-size: 1.04em; }
}

/* --- 降低动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- 打印 */
@media print {
  .site-head, .site-foot, .to-top, .read-progress, .art-side, .pn, .rel-block,
  .cta, .toc-inline, .crumbs, .art-tags, .nav-scrim { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .article .art-layout { display: block; }
  .rich a { color: #000; border-bottom: 0; }
  .rich a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666; }
  .wrap { max-width: none; padding: 0; }
  .art-head { border-bottom: 1px solid #ccc; }
}
