/* 蛇类百科 snake.qianlong.wiki —— 全站样式（从猫科百科改来，后面有蛇站专用段）。深色模式按系统设置或右上角按钮切换。 */
:root {
  color-scheme: light;
  --bg: #faf7f1; --bg2: #f2ede4; --card: #ffffff; --ink: #1d1a16; --ink2: #554e45; --ink3: #857c70; --line: #e5ddd0;
  --accent: #b5601b; --accent-ink: #8c4510; --accent-soft: #f6e6d4; --link: #9a4f12;
  --shadow: 0 1px 2px rgba(40, 28, 12, .06), 0 6px 22px rgba(40, 28, 12, .07);
  --shadow-hover: 0 2px 4px rgba(40, 28, 12, .08), 0 14px 34px rgba(40, 28, 12, .13);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Source Han Serif CN", "Songti SC", "STSong", "SimSun", serif;
  --sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", sans-serif;
  --r: 16px; --r-sm: 10px;
  /* IUCN 红色名录惯用色（总和文字标签一起出现） */
  --cr: #c8302a; --en: #e2701f; --vu: #d39e00; --nt: #86a821; --lc: #3f9a54; --dd: #8b8b8b; --ew: #6b2a59; --ex: #2b2b2b; --dom: #8a7a68;
  /* 谱系分类色（数据可视化技能的验证色板，固定顺序） */
  --s0: #2a78d6; --s1: #eb6834; --s2: #1baf7a; --s3: #eda100; --s4: #e87ba4; --s5: #008300; --s6: #6250d6; --s7: #e34948;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #13110f; --bg2: #1b1815; --card: #1f1b18; --ink: #efe9df; --ink2: #c2b8aa; --ink3: #8f8679; --line: #312c26;
    --accent: #e39a52; --accent-ink: #f0b57a; --accent-soft: #3a2817; --link: #f0b57a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 22px rgba(0, 0, 0, .35); --shadow-hover: 0 2px 4px rgba(0, 0, 0, .4), 0 14px 34px rgba(0, 0, 0, .5);
    --s0: #3987e5; --s1: #d95926; --s2: #199e70; --s3: #c98500; --s4: #d55181; --s5: #008300; --s6: #9085e9; --s7: #e66767;
    --ex: #9a9a9a; --dom: #a8977f;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #13110f; --bg2: #1b1815; --card: #1f1b18; --ink: #efe9df; --ink2: #c2b8aa; --ink3: #8f8679; --line: #312c26;
  --accent: #e39a52; --accent-ink: #f0b57a; --accent-soft: #3a2817; --link: #f0b57a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 22px rgba(0, 0, 0, .35); --shadow-hover: 0 2px 4px rgba(0, 0, 0, .4), 0 14px 34px rgba(0, 0, 0, .5);
  --s0: #3987e5; --s1: #d95926; --s2: #199e70; --s3: #c98500; --s4: #d55181; --s5: #008300; --s6: #9085e9; --s7: #e66767;
  --ex: #9a9a9a; --dom: #a8977f;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.3; margin: 0; letter-spacing: .01em; }
button { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; }
.sci { font-family: Georgia, "Times New Roman", var(--serif); font-style: italic; }
.muted { color: var(--ink3); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- 顶栏 ---------- */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 19px; white-space: nowrap; }
.brand svg { width: 28px; height: 28px; color: var(--accent); }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink2); text-decoration: none; padding: 6px 10px; border-radius: 999px; font-size: 15px; white-space: nowrap; }
.nav a:hover { background: var(--bg2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); font-weight: 600; }
.tools { display: flex; gap: 4px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; border: 0; background: transparent; color: var(--ink2); cursor: pointer; }
.icon-btn:hover { background: var(--bg2); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }
.if-dark { display: none; }
:root[data-theme="dark"] .if-dark { display: block; } :root[data-theme="dark"] .if-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .if-dark { display: block; } :root:not([data-theme="light"]) .if-light { display: none; } }
@media (max-width: 699px) {
  .top-in { height: auto; flex-wrap: wrap; gap: 0 8px; padding-top: 8px; }
  .brand { order: 1; flex: 1; font-size: 18px; }
  .tools { order: 2; }
  .nav { order: 3; flex-basis: 100%; margin: 4px -16px 0; padding: 0 12px 8px; }
}

/* ---------- 大图头 ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: #2a241d; }
.hero-img, .hero-img img, .hero-img .ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-img img { object-fit: cover; object-position: var(--focus, 50% 40%); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 8, 6, .05) 30%, rgba(10, 8, 6, .72) 100%); }
.hero-text { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: inherit; padding-bottom: 40px; }
.hero h1 { font-size: clamp(36px, 7vw, 68px); text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.hero-sub { font-size: clamp(15px, 2.2vw, 19px); margin: 6px 0 0; opacity: .95; text-shadow: 0 1px 8px rgba(0, 0, 0, .4); }
.hero-sub .sci { opacity: .95; }
.hero-sub .auth { opacity: .7; font-size: .85em; }
.hero-sum { max-width: 38em; margin: 12px 0 0; font-size: 16px; opacity: .92; text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }
.hero-home { min-height: min(78vh, 720px); }
.hero-home .hero-text { padding-bottom: 72px; }
.hero-detail { min-height: clamp(360px, 58vh, 620px); }
.kicker { text-transform: uppercase; letter-spacing: .2em; font-size: 13px; margin: 0 0 6px; opacity: .85; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; margin-bottom: 8px; opacity: .92; }
.crumbs a { color: #fff; text-decoration: none; } .crumbs a:hover { text-decoration: underline; color: #fff; }
.crumbs span { opacity: .6; }
.hero-credit { position: absolute; right: 12px; bottom: 6px; margin: 0; font-size: 11px; opacity: .72; max-width: 70%; text-align: right; line-height: 1.4; }
.hero-credit a { color: #fff; }
.hero-tag { position: absolute; right: 16px; bottom: 16px; color: #fff; font-size: 13px; text-decoration: none; background: rgba(0, 0, 0, .35); padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(6px); }
.hero-tag:hover { color: #fff; background: rgba(0, 0, 0, .55); }
.hero-search { display: flex; align-items: center; gap: 8px; max-width: 560px; margin-top: 22px; background: var(--card); border-radius: 999px; padding: 6px 6px 6px 18px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); color: var(--ink); }
.hero-search svg { width: 20px; height: 20px; color: var(--ink3); flex: none; }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--ink); padding: 8px 0; }
.hero-search button { border: 0; background: var(--accent); color: #fff; padding: 9px 20px; border-radius: 999px; cursor: pointer; font-weight: 600; }
.hero-search button:hover { filter: brightness(1.08); }
.hero-search.big { max-width: none; margin: 8px 0 24px; box-shadow: var(--shadow); border: 1px solid var(--line); }

/* ---------- 页头 ---------- */
.page-head { padding-top: 40px; padding-bottom: 12px; }
.page-head h1 { font-size: clamp(30px, 5vw, 44px); }
.lede { color: var(--ink2); font-size: 17px; max-width: 46em; margin: 10px 0 0; }

/* ---------- 卡片 ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 18px; }
.grid-sm { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .grid, .grid-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.card { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); color: var(--ink); }
.card-img { position: relative; }
.card-img img, .card-img .ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.card:hover .card-img img { filter: saturate(1.08); }
.card-img .iucn { position: absolute; left: 10px; top: 10px; }
.card-body { padding: 12px 14px 14px; }
.card h3 { font-size: 18px; }
.card-sub { margin: 2px 0 0; color: var(--ink2); font-size: 14px; line-height: 1.4; }
.card-meta { margin: 6px 0 0; color: var(--ink3); font-size: 13px; line-height: 1.4; }
.ph { display: grid; place-items: center; background: var(--bg2); color: var(--line); }
.ph svg { width: 40%; height: 40%; }

/* IUCN 标签 */
.iucn { display: inline-flex; align-items: center; gap: 5px; font: 700 12px/1 var(--sans); color: #fff; padding: 5px 8px; border-radius: 999px; letter-spacing: .03em; background: var(--dd); box-shadow: 0 1px 4px rgba(0, 0, 0, .18); white-space: nowrap; }
.iucn i { font-style: normal; font-weight: 500; opacity: .95; }
.iucn-cr { background: var(--cr); } .iucn-en { background: var(--en); } .iucn-vu { background: var(--vu); color: #2a2100; } .iucn-nt { background: var(--nt); color: #1c2600; }
.iucn-lc { background: var(--lc); } .iucn-dd { background: var(--dd); } .iucn-ew { background: var(--ew); } .iucn-ex { background: var(--ex); } .iucn-dom { background: var(--dom); }

/* ---------- 筛选 ---------- */
.filters { display: grid; gap: 10px; margin: 18px 0 26px; padding: 16px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.search-inline { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; background: var(--bg); }
.search-inline svg { width: 18px; height: 18px; color: var(--ink3); }
.search-inline input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; padding: 9px 0; color: var(--ink); min-width: 0; }
.chips { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips-label { flex: none; color: var(--ink3); font-size: 13px; width: 4.2em; }
.chip { flex: none; border: 1px solid var(--line); background: var(--bg); color: var(--ink2); border-radius: 999px; padding: 4px 12px; font-size: 14px; cursor: pointer; line-height: 1.6; }
.chip:hover { border-color: var(--accent); color: var(--ink); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.sort { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--ink3); font-size: 14px; }
.sort select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; margin-left: 4px; }
.count { color: var(--ink3); }
.empty { text-align: center; color: var(--ink3); padding: 40px 0; }
.lin-block { margin: 0 0 44px; }
.lin-title { font-size: 26px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lin-title small { font: 14px var(--sans); color: var(--ink3); }
.lin-desc { color: var(--ink2); margin: 6px 0 16px; max-width: 52em; }
.filtering .lin-block { display: none; }

/* ---------- 详情页 ---------- */
.detail { display: grid; gap: 28px; padding-top: 28px; padding-bottom: 40px; }
@media (min-width: 960px) { .detail { grid-template-columns: minmax(0, 1fr) 330px; gap: 48px; align-items: start; } .infobox { order: 2; position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; } .content { order: 1; } }
.infobox { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; font-size: 15px; scrollbar-width: thin; }
.infobox dl { margin: 0; display: grid; gap: 0; }
.infobox dl > div { display: grid; grid-template-columns: 4.6em 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.infobox dl > div:first-child { border-top: 0; }
.infobox dt { color: var(--ink3); }
.infobox dd { margin: 0; }
.ib-status { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.ib-status > div > b { display: block; font-size: 17px; }
.ib-status > div > span { color: var(--ink3); font-size: 13px; line-height: 1.5; }
.ib-status > .iucn { font-size: 14px; padding: 7px 10px; }
.ib-note { color: var(--ink3); font-size: 13px; margin: 8px 0 0; line-height: 1.6; }
.ib-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag { background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.reg { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; font-size: 12px; margin: 0 2px 2px 0; }
.iucn-scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; list-style: none; margin: 0 0 14px; padding: 0; }
.iucn-scale li { text-align: center; padding: 6px 0 4px; border-radius: 6px; background: var(--bg2); color: var(--ink3); line-height: 1.2; }
.iucn-scale li b { display: block; font-size: 12px; } .iucn-scale li span { font-size: 10px; }
.iucn-scale li.on { color: #fff; transform: scale(1.08); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.iucn-scale li.on.iucn-vu, .iucn-scale li.on.iucn-nt { color: #1f1a00; }
.iucn-scale li.on.iucn-lc { background: var(--lc); } .iucn-scale li.on.iucn-nt { background: var(--nt); } .iucn-scale li.on.iucn-vu { background: var(--vu); }
.iucn-scale li.on.iucn-en { background: var(--en); } .iucn-scale li.on.iucn-cr { background: var(--cr); } .iucn-scale li.on.iucn-ew { background: var(--ew); } .iucn-scale li.on.iucn-ex { background: var(--ex); }
.content { min-width: 0; }
.lead { font-size: 18px; color: var(--ink); }
.lead p:first-child::first-letter { font-family: var(--serif); font-size: 2.6em; float: left; line-height: 1; margin: 4px 8px 0 0; color: var(--accent); }
.toc { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 18px 0 8px; padding: 12px 14px; background: var(--bg2); border-radius: var(--r-sm); font-size: 14px; }
.toc b { color: var(--ink3); font-weight: 500; margin-right: 4px; }
.toc a { color: var(--ink2); text-decoration: none; padding: 2px 10px; border-radius: 999px; background: var(--card); }
.toc a:hover { color: var(--accent-ink); }
.sec { margin-top: 36px; }
.sec h2 { font-size: 24px; padding-bottom: 8px; margin-bottom: 12px; border-bottom: 2px solid var(--line); position: relative; }
.sec h2::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 44px; height: 2px; background: var(--accent); }
.sec p, .lead p { margin: 0 0 1em; }
.content p, .content li { font-size: 17px; line-height: 1.9; }
.sec ul { padding-left: 1.3em; }
.sec li { margin: .3em 0; }
.facts ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.facts li { background: var(--accent-soft); border-radius: var(--r-sm); padding: 12px 16px 12px 44px; position: relative; color: var(--ink); }
.facts li::before { content: "🐾"; position: absolute; left: 14px; top: 12px; }
.health ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.health li { border-left: 3px solid var(--en); background: var(--card); padding: 10px 14px; border-radius: 0 var(--r-sm) var(--r-sm) 0; box-shadow: var(--shadow); }
.health li b { display: block; }
.map img { border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); }
figure { margin: 0; }
figcaption { font-size: 14px; color: var(--ink2); margin-top: 6px; line-height: 1.6; }
figcaption small { display: block; color: var(--ink3); font-size: 12px; }
figcaption small a { color: var(--ink3); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr 1fr; gap: 10px; } }
.zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--r-sm); overflow: hidden; }
.zoom img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .3s; }
.zoom:hover img { transform: scale(1.04); }
.sources ol { padding-left: 1.4em; font-size: 14px; color: var(--ink2); }
.sources li { font-size: 14px !important; line-height: 1.6 !important; margin: .4em 0; word-break: break-word; }

/* 看大图 */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(8, 6, 4, .92); display: grid; grid-template-rows: 1fr auto; padding: 48px 12px 12px; }
.lb[hidden] { display: none; }
.lb img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; border-radius: 6px; }
.lb-cap { color: #e9e2d6; text-align: center; font-size: 14px; padding: 10px 40px 0; }
.lb-cap small { display: block; opacity: .7; } .lb-cap a { color: #e9e2d6; }
.lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.lb button:hover { background: rgba(255, 255, 255, .24); }
.lb button svg { width: 22px; height: 22px; }
.lb-x { top: 10px; right: 10px; } .lb-prev { left: 10px; top: 50%; } .lb-next { right: 10px; top: 50%; }

/* ---------- 首页 ---------- */
.home-sec { margin: 52px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sec-head h2 { font-size: clamp(24px, 3.4vw, 32px); }
.sec-head a, .link-btn { color: var(--accent-ink); text-decoration: none; font-size: 15px; background: none; border: 0; cursor: pointer; padding: 0; }
.lin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-top: 14px; }
@media (max-width: 520px) { .lin-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.lin-card { position: relative; border-radius: var(--r); overflow: hidden; text-decoration: none; color: #fff; box-shadow: var(--shadow); display: block; }
.lin-img img, .lin-img .ph { width: 100%; aspect-ratio: 3/2; object-fit: cover; transition: transform .4s; }
.lin-card:hover img { transform: scale(1.05); }
.lin-body { position: absolute; inset: auto 0 0 0; padding: 40px 14px 12px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .72)); }
.lin-body h3 { font-size: 20px; }
.lin-body p { margin: 2px 0 0; font-size: 13px; opacity: .9; line-height: 1.5; }
.lin-card:hover { color: #fff; }
.band { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 8px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr 1fr; } }
.stats a { text-align: center; padding: 18px 8px; text-decoration: none; color: var(--ink2); border-radius: var(--r-sm); }
.stats a:hover { background: var(--bg2); }
.stats b { display: block; font: 700 clamp(30px, 5vw, 44px)/1.1 var(--serif); color: var(--accent); }
.stats span { font-size: 14px; }
.fact-box { background: var(--accent-soft); border-radius: var(--r); padding: 26px 28px; font-size: 19px; font-family: var(--serif); position: relative; }
.fact-box p { margin: 0 0 8px; line-height: 1.8; }
.fact-box a { font-family: var(--sans); font-size: 15px; color: var(--accent-ink); }

/* ---------- 分类树 ---------- */
.tree-sf { margin: 22px 0 40px; }
.tree-sf > h2 { font-size: 28px; margin-bottom: 12px; }
.tree-sf > h2 small, .tree-lin h3 small { font: italic 15px Georgia, serif; color: var(--ink3); }
.tree-lin { border-left: 3px solid var(--accent); padding: 4px 0 8px 18px; margin: 0 0 26px 6px; }
.tree-lin h3 { font-size: 21px; }
.tree-lin > .muted { margin: 4px 0 10px; font-size: 15px; }
.tree-genus { margin: 10px 0 0 4px; }
.tree-genus h4 { font: 600 15px var(--sans); color: var(--ink2); margin-bottom: 6px; }
.tree-genus ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.tree-genus a { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 12px; padding: 6px 10px 6px 6px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.tree-genus a:hover { box-shadow: var(--shadow-hover); }
.tree-genus .mini, .tree-genus .ph { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; flex: none; }
.tree-genus a span { flex: 1; min-width: 0; line-height: 1.35; }
.tree-genus a span b { display: block; font-weight: 600; }
.tree-genus a span .sci { font-size: 13px; color: var(--ink3); }
.tree-genus .iucn { font-size: 11px; padding: 4px 6px; } .tree-genus .iucn i { display: none; }

/* ---------- 体型对比（横向区间条，平方根刻度） ---------- */
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 18px; font-size: 14px; color: var(--ink2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.sw-0 { background: var(--s0); } .sw-1 { background: var(--s1); } .sw-2 { background: var(--s2); } .sw-3 { background: var(--s3); }
.sw-4 { background: var(--s4); } .sw-5 { background: var(--s5); } .sw-6 { background: var(--s6); } .sw-7 { background: var(--s7); }
.bars { list-style: none; margin: 0; padding: 0; }
.bars a { display: grid; grid-template-columns: 7em 1fr 6.5em; gap: 12px; align-items: center; padding: 4px 8px; border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 14px; }
.bars a:hover, .bars a:focus-visible { background: var(--bg2); }
.bar-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { position: relative; height: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 10% 100%; }
.bar { position: absolute; top: 2px; bottom: 2px; border-radius: 4px; min-width: 6px; }
.bar-val { color: var(--ink2); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
@media (max-width: 520px) { .bars a { grid-template-columns: 5.5em 1fr 5.4em; gap: 8px; font-size: 13px; padding: 4px; } }

/* ---------- 保护现状 ---------- */
.stack { display: flex; gap: 2px; border-radius: 10px; overflow: hidden; margin: 10px 0 34px; min-height: 52px; }
.stack span { display: flex; align-items: center; justify-content: center; gap: 4px; color: #fff; font-size: 14px; padding: 0 6px; white-space: nowrap; min-width: 0; overflow: hidden; }
.stack span.iucn-vu, .stack span.iucn-nt { color: #1f1a00; }
.stack b { font-size: 20px; font-family: var(--serif); }
.stack .iucn-cr { background: var(--cr); } .stack .iucn-en { background: var(--en); } .stack .iucn-vu { background: var(--vu); } .stack .iucn-nt { background: var(--nt); } .stack .iucn-lc { background: var(--lc); }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { color: var(--ink3); font-weight: 500; background: var(--bg2); position: sticky; top: 0; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl.credits td { word-break: break-word; }
.note { color: var(--ink3); font-size: 14px; margin: 18px 0 40px; }

/* ---------- 搜索 ---------- */
.results { display: grid; gap: 10px; margin-bottom: 60px; }
.result { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: var(--r-sm); padding: 8px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.result:hover { box-shadow: var(--shadow-hover); color: var(--ink); }
.result img, .result .ph { width: 84px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; }
.result b { font-size: 17px; }
.result .k { font-size: 12px; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.result p { margin: 2px 0 0; font-size: 14px; color: var(--ink2); line-height: 1.5; }
.result mark { background: var(--accent-soft); color: inherit; border-radius: 3px; }

/* ---------- 详情页小组件 ---------- */
/* 国家保护级别：描边小印章，和 IUCN 色签分开 */
.seal { margin-left: auto; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 58px; border: 2px solid #b8322a; color: #b8322a; border-radius: 8px; font: 700 17px/1.1 var(--serif); text-decoration: none; transform: rotate(-6deg); flex: none; }
.seal small { font: 500 10px/1.2 var(--sans); letter-spacing: .05em; }
.seal:hover { color: #b8322a; background: rgba(184, 50, 42, .06); }
:root[data-theme="dark"] .seal { border-color: #e5726a; color: #e5726a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .seal { border-color: #e5726a; color: #e5726a; } }
.seal-inline { width: auto; height: auto; padding: 3px 8px; margin: 0; font-size: 15px; transform: rotate(-4deg); vertical-align: middle; }
.sub { font-size: 18px; margin: 18px 0 8px; }
.threats { padding-left: 1.2em; }
.faq details { background: var(--card); border-radius: var(--r-sm); box-shadow: var(--shadow); margin: 0 0 10px; padding: 0 16px; }
.faq summary { cursor: pointer; padding: 12px 0; font-weight: 600; list-style: none; position: relative; padding-right: 24px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 20px; color: var(--ink3); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 14px; }
.callout { margin: 30px 0 0; padding: 16px 18px; border-radius: var(--r-sm); background: var(--accent-soft); border-left: 4px solid var(--accent); }
.callout > b { display: block; margin-bottom: 4px; font-family: var(--serif); font-size: 17px; }
.callout p { margin: 0 0 .6em; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.prevnext a { background: var(--card); border-radius: var(--r-sm); box-shadow: var(--shadow); padding: 12px 16px; text-decoration: none; color: var(--ink); }
.prevnext a:last-child { text-align: right; }
.prevnext small { display: block; color: var(--ink3); font-size: 13px; }
.prevnext b { font-family: var(--serif); font-size: 18px; }
.lv { display: inline-flex; align-items: center; gap: 3px; }
.lv i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.lv i.on { background: var(--accent); }
.lv em { font-style: normal; color: var(--ink2); margin-left: 6px; font-size: 14px; }
.tag-alt { background: var(--bg2); color: var(--ink2); border: 1px solid var(--line); }
.reg small { margin-left: 3px; color: var(--ink3); }
code { font: 13px ui-monospace, Consolas, monospace; background: var(--bg2); padding: 1px 6px; border-radius: 4px; }
.china-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
@media (max-width: 520px) { .china-list { grid-template-columns: 1fr; } }
.china-item { display: flex; gap: 14px; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: var(--ink); }
.china-item:hover { box-shadow: var(--shadow-hover); color: var(--ink); }
.ci-img { width: 40%; flex: none; }
.ci-img img, .ci-img .ph { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.ci-body { padding: 12px 12px 12px 0; min-width: 0; }
.ci-body h3 { font-size: 18px; }
.ci-body h3 .sci { font: italic 13px Georgia, serif; color: var(--ink3); display: block; }
.ci-body p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; }

/* ---------- 其他 ---------- */
.btn { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; padding: 9px 20px; border-radius: 999px; font-weight: 600; }
.btn:hover { color: #fff; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent-ink); border: 1px solid var(--accent); }
.nf { text-align: center; padding: 80px 0; }
.nf svg { width: 90px; height: 90px; color: var(--accent); }
.nf h1 { font-size: 34px; margin: 12px 0; }
.foot { margin-top: 60px; border-top: 1px solid var(--line); background: var(--bg2); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding-top: 28px; padding-bottom: 40px; line-height: 1.8; }
.foot-in > div { max-width: 40em; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-content: flex-start; }
.foot nav a { color: var(--ink2); text-decoration: none; } .foot nav a:hover { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .top, .foot, .filters, .toc, .hero-search { display: none; } .hero { color: #000; min-height: 0 !important; } .hero-img, .hero-shade { display: none; } .crumbs a { color: #000; } }

/* 首页精选：固定 4 列（8 张正好两行），平板 3 列，手机 2 列 */
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ================= 11-14 上线前视觉审查后的修正（写在最后，同优先级覆盖前面的规则） ================= */
/* 筛选、搜索靠 hidden 属性隐藏卡片，原来被 .grid / .card 的 display 盖掉了 */
[hidden] { display: none !important; }

/* 颜色：浅色模式次要文字加深到 4.5:1 以上；橙底上的字深色模式改深色；EN、LC 色签加深；深色模式图片稍压暗 */
:root { --ink3: #6f665a; --on-accent: #fff; --en: #c4560f; --lc: #2f7d43; --img-dim: 1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ink3: #8f8679; --on-accent: #1d1206; --img-dim: .88; --s5: #3aa640; --s4: #e87ba4; } }
:root[data-theme="dark"] { --ink3: #8f8679; --on-accent: #1d1206; --img-dim: .88; --s5: #3aa640; --s4: #e87ba4; }
.chip.on, .hero-search button, .btn, .btn:hover { color: var(--on-accent); }
.hero-img img, .card-img img, .lin-img img, .zoom img, .ci-img img, .tree-genus .mini { filter: brightness(var(--img-dim)); }
.card:hover .card-img img { filter: brightness(1) saturate(1.08); }
.kicker, .crumbs { text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.crumbs { opacity: 1; }
.crumbs a { padding: 8px 0; margin: -8px 0; }

/* 详情页大图头：电脑上左边文字、右边照片（照片接近 3:2，基本不裁，字也不会压在脸上）；手机上照片在上、文字在下 */
.hero-detail { min-height: 0; display: grid; background: #221d18; }
.hero-detail .hero-img { position: relative; inset: auto; aspect-ratio: 4 / 3; height: auto; }
.hero-detail .hero-shade { display: none; }
.hero-detail .hero-text { min-height: 0; padding-top: 18px; padding-bottom: 14px; }
.hero-detail h1, .hero-detail .hero-sub, .hero-detail .hero-sum, .hero-detail .crumbs { text-shadow: none; }
.hero-detail .hero-sum { text-wrap: pretty; }
.hero-detail .hero-credit { position: static; max-width: none; text-align: left; padding: 0 16px 14px; opacity: .6; font-size: 12px; }
.hero-detail .hero-credit a { display: inline-block; padding: 4px 0; }
@media (min-width: 700px) { .hero-detail .hero-credit { padding: 0 28px 14px; } }
.hero-noimg { margin: 0; padding: 0 16px 14px; font-size: 12px; color: #fff; opacity: .6; }
@media (min-width: 700px) { .hero-noimg { padding: 0 28px 14px; } }
@media (min-width: 900px) { .hero-noimg { position: absolute; right: 18px; bottom: 12px; padding: 0; color: var(--ink3); opacity: 1; } }
@media (max-width: 899px) { .hero-detail .hero-img:has(.ph) { aspect-ratio: 16 / 7; } }
@media (min-width: 900px) {
  .hero-detail { grid-template-columns: minmax(380px, 38%) 1fr; grid-template-rows: 1fr auto; }
  .hero-detail .hero-img { grid-column: 2; grid-row: 1 / span 2; aspect-ratio: auto; height: clamp(400px, 64vh, 620px); }
  .hero-detail .hero-text { grid-column: 1; grid-row: 1; justify-content: center; max-width: none; margin: 0; padding: 40px 36px 20px max(28px, calc((100vw - 1200px) / 2 + 28px)); }
  .hero-detail .hero-credit { grid-column: 1; grid-row: 2; padding: 0 36px 20px max(28px, calc((100vw - 1200px) / 2 + 28px)); }
  .hero-detail h1 { font-size: clamp(38px, 3.8vw, 60px); }
}

/* 信息框不再吸顶（原来限高加框内滚动，下面的字段被截掉） */
@media (min-width: 960px) { .infobox { position: static; max-height: none; overflow: visible; } }
@media (max-width: 959px) { .infobox .ib-long { display: none; } }
.nw { white-space: nowrap; }
.ib-note { font-size: 14px; }
.iucn-scale li { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.iucn-scale li b { font-size: 13px; }
.iucn-scale li span { font-size: 11px; letter-spacing: -.04em; white-space: nowrap; }
.lv i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink3); }
.lv i.on { background: var(--accent); box-shadow: none; }
.reg { white-space: nowrap; font-size: 13px; padding: 1px 8px; }
.reg small { font-size: 1em; }

/* 正文和卡片：卡片里的学名、说明不再被 .content p 放大；说明行贴底对齐 */
.content .card-sub { font-size: 14px; line-height: 1.4; }
.content .card-meta { font-size: 13px; line-height: 1.4; }
.card-body { flex: 1; display: flex; flex-direction: column; }
.card-meta { margin-top: auto; padding-top: 6px; }
.lede, .lin-desc, .content p, .tree-lin > .muted { text-wrap: pretty; }
.tree-lin > .muted, .note { max-width: 52em; }
.tree-lin > .muted { color: var(--ink2); }
.toc { gap: 8px; }
.toc a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; }
.faq details[open] { padding-bottom: 14px; }
.faq details > :last-child { margin-bottom: 0; }
.faq summary { font-size: 17px; line-height: 1.6; }
.faq summary::after { top: 12px; line-height: 1.2; }
.zoom img { object-position: 50% 25%; }
figcaption small a, .foot-in > div a { white-space: nowrap; }
.tbl th { white-space: nowrap; }
.health .tbl td:first-child { width: 24%; }
.health .tbl td:nth-child(2) { min-width: 7em; width: 22%; }
.health > p.muted, .table-wrap + p { font-size: 14px; line-height: 1.7; margin-top: 12px; }
@media (max-width: 599px) {
  .health .tbl thead { display: none; }
  .health .tbl, .health .tbl tbody, .health .tbl tr, .health .tbl td { display: block; width: auto; min-width: 0; }
  .health .tbl tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .health .tbl tr:last-child { border-bottom: 0; }
  .health .tbl td { padding: 0; border: 0; font-size: 15px; line-height: 1.75; }
  .health .tbl td:nth-child(1) { font-size: 16px; margin-bottom: 4px; }
  .health .tbl td:nth-child(2):not(:empty)::before { content: "基因检测："; color: var(--ink3); }
  .health .tbl td:nth-child(2):empty { display: none; }
  .health .tbl td:nth-child(3) { color: var(--ink2); margin-top: 4px; }
}

/* 分类树：IUCN 小标签别被 flex:1 拉成长条 */
.tree-genus a > span:not(.iucn) { flex: 1; min-width: 0; line-height: 1.35; }
.tree-genus a .iucn { flex: none; }

/* 图片来源表：列宽别被压成一个字一列；电脑上表头吸顶，手机上每行排成三行的卡片 */
.tbl.credits td { word-break: normal; overflow-wrap: break-word; }
.tbl.credits td:nth-child(5) { overflow-wrap: anywhere; }
.tbl.credits th, .tbl.credits td:nth-child(-n+2), .tbl.credits td:nth-child(4) { white-space: nowrap; }
@media (min-width: 700px) { .table-wrap:has(.credits) { overflow: visible; } .tbl.credits th { top: 60px; z-index: 1; } }
@media (max-width: 640px) {
  .tbl.credits thead { display: none; }
  .tbl.credits, .tbl.credits tbody { display: block; }
  .tbl.credits tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl.credits td { padding: 0; border: 0; }
  .tbl.credits td:nth-child(2), .tbl.credits td:nth-child(4) { color: var(--ink3); text-align: right; }
  .tbl.credits td:nth-child(5) { grid-column: 1 / -1; font-size: 13px; white-space: normal; }
}

/* 体型对比：加刻度，去掉没意义的网格线 */
.bar-track { background: var(--bg2); }
.bars-axis { display: grid; grid-template-columns: 7em 1fr 6.5em; gap: 12px; padding: 0 8px 6px; font-size: 12px; color: var(--ink3); border-bottom: 1px solid var(--line); margin-bottom: 6px; position: sticky; top: 61px; background: var(--bg); z-index: 1; }
.axis-track { position: relative; height: 1.5em; }
.axis-track i { position: absolute; transform: translateX(-50%); font-style: normal; font-variant-numeric: tabular-nums; }
@media (max-width: 699px) { .bars-axis { position: static; } }
@media (max-width: 520px) { .bars-axis, .bars a { grid-template-columns: 6.3em 1fr 5.2em; gap: 8px; } .bars-axis { padding: 0 4px 6px; } .bars a { padding: 6px 4px; } }

/* 保护现状、中国页：分组标题和卡片之间留出距离 */
.lin-title + .grid, .lin-title + .china-list { margin-top: 16px; }
.wrap > .lin-block:first-child { margin-top: 24px; }
.stack i { font-style: normal; }
@media (max-width: 520px) { .stack span { flex-direction: column; gap: 0; line-height: 1.15; padding: 6px 2px; min-width: 2.6em; } .stack b { font-size: 18px; } .stack i { font-size: 12px; } .lin-title { font-size: 22px; } }
.stack .iucn-dd { background: var(--dd); }
.ci-body p { font-size: 14px; }
.ci-body p.muted { color: var(--ink2); }
@media (max-width: 520px) { .china-item { flex-direction: column; gap: 0; } .ci-img { width: 100%; } .ci-img img, .ci-img .ph { height: auto; aspect-ratio: 16 / 9; } .ci-body { padding: 12px 14px 14px; } }

/* 首页谱系卡：文字区加深，手机上只留谱系名和种数 */
.lin-body { padding: 48px 14px 12px; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .5) 40%, rgba(0, 0, 0, .82)); }
.lin-body h3, .lin-body p { text-shadow: 0 1px 6px rgba(0, 0, 0, .55); }
.lin-body p { opacity: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .lin-mem { display: none; } .lin-body { padding: 24px 12px 10px; } .lin-body h3 { font-size: 18px; } }

/* 筛选条：电脑上换行显示；手机上按钮加高到 40px、行名固定在左边、右边渐隐提示能滑 */
@media (min-width: 700px) { .chips { flex-wrap: wrap; overflow: visible; row-gap: 6px; } }
@media (max-width: 699px) {
  .chip { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; }
  .chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
  .chips-label { position: sticky; left: 0; z-index: 1; align-self: stretch; display: flex; align-items: center; background: var(--card); }
  .sort select { min-height: 40px; padding: 6px 12px; border-radius: 999px; }
  .filters { gap: 8px; }
}

/* 顶栏和小链接：手机上导航右边渐隐、点按区域够 40px */
.icon-btn { width: 40px; height: 40px; }
@media (max-width: 699px) {
  html { scroll-padding-top: 112px; }
  .nav { padding-right: 28px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
  .nav a { padding: 8px 11px; }
  .toc a { min-height: 40px; }
  .foot { margin-top: 32px; }
}
.foot nav { gap: 0 18px; }
.foot nav a { display: inline-block; padding: 8px 0; }
.sec-head a, .link-btn { padding: 8px 0; margin: -8px 0; }
.nf .btn { margin: 0 6px; }
input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; width: 18px; height: 18px; cursor: pointer; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='%23857c70' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px no-repeat; }

/* ================= 11-14 第二轮视觉审查后的修正 ================= */
/* 详情页底部的推荐卡片：.sec p 的外边距别盖到卡片里 */
.sec .card p { margin: 2px 0 0; }
.sec .card .card-meta { margin-top: auto; padding-top: 6px; }
/* 大图头副标题：学名、命名人不在中间断开 */
.hero-sub .sci, .hero-sub .auth { white-space: nowrap; }
.hero-detail .hero-sub { line-height: 1.5; }
/* 导语、注释末行别只剩一两个字（中文 pretty 不起作用，用 balance） */
.lede, .note { text-wrap: balance; }
.content li { text-wrap: pretty; }
/* 体型对比：单位统一 kg、右对齐；底轨深浅模式都看得见；刻度和条形用同一字号，列宽才对得上；手机上刻度吸顶、去掉挤在一起的 5 和 25 */
.bars-axis { font-size: 14px; }
.axis-track i, .bars-axis > span:last-child { font-size: 12px; }
.bars-axis > span:last-child { text-align: right; align-self: center; }
.bar-track { background: color-mix(in srgb, var(--ink) 7%, transparent); }
@media (max-width: 699px) { .bars-axis { position: sticky; top: 103px; } }
@media (max-width: 520px) { .bars-axis { font-size: 13px; } .axis-track .minor { display: none; } }
/* 图片来源表：电脑上给作者、原图两列定宽，别被一条特别长的作者名撑开 */
@media (min-width: 700px) { .tbl.credits th:nth-child(3) { width: 26%; } .tbl.credits th:nth-child(5) { width: 38%; } }
/* 中国页卡片说明最多 5 行，完整分布在详情页 */
.ci-body p.muted { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
/* 品种健康表：电脑上的列宽只在电脑上生效（原来盖住了手机的卡片排法） */
.health .tbl td:first-child, .health .tbl td:nth-child(2) { width: auto; min-width: 0; }
@media (min-width: 600px) { .health .tbl td:first-child { width: 24%; } .health .tbl td:nth-child(2) { min-width: 7em; width: 22%; } }
/* 筛选：选中的「全部」用浅底，真正选中的条件才是实心橙色 */
.chip.on[data-v=""] { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
/* 保护现状色条手机上每段至少放得下三个字 */
@media (max-width: 520px) { .stack span { min-width: 3.2em; } }
/* 手机导航：6 项一行放下，不再横滑（320 宽的小屏放不下时仍能滑） */
@media (max-width: 699px) {
  .nav { justify-content: space-between; gap: 0; padding: 0 8px 8px; -webkit-mask-image: none; mask-image: none; }
  .nav a { padding: 8px 7px; font-size: 14px; }
}


/* ================= 蛇类百科：在猫站样式上加的部分 ================= */
/* 主色换成橄榄绿，底色偏冷一点 */
:root { --bg: #f6f7f1; --bg2: #ecefe4; --line: #dde2d2; --accent: #4f6f2a; --accent-ink: #3c561d; --accent-soft: #e6eed8; --link: #44621f; --on-accent: #fff;
  --v4: #b3261e; --v3: #d4600f; --v2: #b58900; --v1: #3d7a4c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #111310; --bg2: #181b16; --card: #1c1f19; --line: #2c3227; --accent: #9cbf63; --accent-ink: #b5d683; --accent-soft: #263018; --link: #b5d683; --on-accent: #10160a; --v4: #e25b52; --v3: #ee8a45; --v2: #d9b23a; --v1: #6db57d; } }
:root[data-theme="dark"] { --bg: #111310; --bg2: #181b16; --card: #1c1f19; --line: #2c3227; --accent: #9cbf63; --accent-ink: #b5d683; --accent-soft: #263018; --link: #b5d683; --on-accent: #10160a; --v4: #e25b52; --v3: #ee8a45; --v2: #d9b23a; --v1: #6db57d; }
.hero { background: #1e221a; }
.hero-detail { background: #1b1f17; }
/* 毒性色签（总和文字一起出现，不只靠颜色） */
.venom { display: inline-flex; align-items: center; font: 700 12px/1 var(--sans); color: #fff; padding: 5px 9px; border-radius: 999px; letter-spacing: .04em; white-space: nowrap; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.venom-v4 { background: var(--v4); } .venom-v3 { background: var(--v3); } .venom-v2 { background: var(--v2); color: #231c00; } .venom-v1 { background: var(--v1); }
.card-img .venom { position: absolute; left: 10px; top: 10px; }
.legend .venom { font-size: 12px; }
/* 信息框顶部：毒性 */
.ib-venom { display: flex; align-items: center; gap: 12px; margin: -4px 0 10px; padding: 12px 14px; border-radius: var(--r-sm); color: #fff; }
.ib-venom.venom-v2 { color: #231c00; }
.ib-venom > b { font: 700 24px/1.1 var(--serif); }
.ib-venom > span { font-size: 14px; opacity: .92; flex: 1; }
.ib-venom .seal { margin-left: auto; border-color: currentColor; color: inherit; background: rgba(255, 255, 255, .12); }
.infobox .iucn { font-size: 12px; padding: 4px 8px; }
/* 急救提示 */
.callout.danger { background: color-mix(in srgb, var(--v4) 10%, var(--card)); border-left-color: var(--v4); }
.callout.danger > b { color: var(--v4); }
.home-alert { margin: 28px 0 0; }
.content > .callout.danger { margin: 18px 0 8px; }
/* 体长条按毒性着色 */
.vbar-v4 { background: var(--v4); } .vbar-v3 { background: var(--v3); } .vbar-v2 { background: var(--v2); } .vbar-v1 { background: var(--v1); }
.legend { gap: 8px 12px; }
/* 蛇科总表 */
.fam-tbl td:nth-child(2) { white-space: nowrap; }
.table-wrap:has(.fam-tbl) { margin-top: 8px; }
.sub .seal-inline { margin-right: 6px; }
h2 small.muted { font: 14px var(--sans); }

/* 11-14 蛇站：信息框底部的分布图 */
.ib-map { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.ib-map img { width: 100%; height: auto; border-radius: 8px; background: #fff; }
.ib-map figcaption { font-size: 13px; color: var(--ink2); margin-top: 6px; line-height: 1.5; }
.ib-map figcaption small { display: block; color: var(--ink3); font-size: 12px; margin-top: 2px; }

/* ===== 11-15 上线前视觉审查后的修改（蛇站） ===== */
/* 有序列表：急救页「该做的」七步等（prose() 认「1. 」开头的行） */
.sec:not(.sources) > ol, .lede ol, .callout ol { padding-left: 1.6em; margin: 0 0 1em; }
.sec:not(.sources) > ol > li, .callout ol > li { margin: .45em 0; }
.sec:not(.sources) > ol > li::marker { font-weight: 700; color: var(--accent-ink); }
.callout ul, .callout ol { padding-left: 1.3em; }
/* 「你知道吗」：猫站的爪印换成绿色圆点 */
.facts li { padding-left: 38px; }
.facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); left: 18px; top: 21px; }
/* 毒性色签对比度：浅色下橙色加深（白字 4.9:1）；深色下浅绿、橙色改深色字，红色加深（白字 4.9:1） */
:root { --v3: #b8530c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .venom-v1, :root:not([data-theme="light"]) .venom-v3,
  :root:not([data-theme="light"]) .result .k.venom-v1, :root:not([data-theme="light"]) .result .k.venom-v3 { color: #10160a; }
  :root:not([data-theme="light"]) .venom-v4, :root:not([data-theme="light"]) .result .k.venom-v4 { background: #c4453d; }
  :root:not([data-theme="light"]) .iucn-scale li:not(.on) { color: var(--ink2); }
}
:root[data-theme="dark"] .venom-v1, :root[data-theme="dark"] .venom-v3,
:root[data-theme="dark"] .result .k.venom-v1, :root[data-theme="dark"] .result .k.venom-v3 { color: #10160a; }
:root[data-theme="dark"] .venom-v4, :root[data-theme="dark"] .result .k.venom-v4 { background: #c4453d; }
:root[data-theme="dark"] .iucn-scale li:not(.on) { color: var(--ink2); }
/* IUCN 刻度条的小字别压扁 */
.iucn-scale li span { letter-spacing: 0; font-size: 10px; }
/* 信息框：体长说明紧跟在体长那行下面 */
.ib-sub { display: block; margin-top: 3px; font-size: 12px; line-height: 1.5; color: var(--ink3); }
/* 搜索结果：毒性小标签和卡片同色 */
.result .k.venom { color: #fff; font-weight: 700; letter-spacing: .02em; box-shadow: none; }
.result .k.venom-v4 { background: var(--v4); } .result .k.venom-v3 { background: var(--v3); } .result .k.venom-v2 { background: var(--v2); color: #231c00; } .result .k.venom-v1 { background: var(--v1); }
/* 列表筛选（电脑）：换行后的标签和第一行对齐 */
@media (min-width: 700px) {
  .chips { position: relative; padding-left: 4.6em; }
  .chips-label { position: absolute; left: 0; top: 0; height: 32px; display: flex; align-items: center; width: auto; }
}
/* 没有照片的科卡片：深色底配淡蛇形，盖上渐变和白字也不像坏图 */
.lin-img .ph { background: #3a4233; color: rgba(255, 255, 255, .16); }
/* 手机上科卡片也显示本站种数（第二行） */
@media (max-width: 520px) { .lin-mem { display: block; } .lin-mem .sep { display: none; } }
/* 保护页 IUCN 横条：说明、图例；太窄的段不写字 */
.stack-cap { font-size: 14px; color: var(--ink3); margin: 18px 0 6px; }
.stack { margin-bottom: 10px; }
.stack .narrow i { display: none; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; padding: 0; margin: 0 0 34px; font-size: 13px; color: var(--ink2); }
.stack-legend li { display: inline-flex; align-items: center; gap: 6px; }
/* 体型对比：单位改成「厘米」后值那栏加宽；手机上名字栏加宽到 7 个字，行高够 40px */
.bars-axis, .bars a { grid-template-columns: 7em 1fr 7.2em; }
@media (max-width: 520px) { .bars-axis, .bars a { grid-template-columns: 7.4em 1fr 6em; gap: 6px; } .bars a { padding: 9px 4px; } }
/* 毒蛇页：图鉴前的分隔标题 */
.sec-band { border-top: 1px solid var(--line); padding-top: 28px; margin: 44px 0 0; font-family: var(--serif); font-size: 26px; }
/* 链接别从中间断行 */
.home-alert a, .lin-desc a { white-space: nowrap; }
/* 中文正文不用 text-wrap: pretty（会让段落最后几行提前折行，右边出现缺口） */
.content p, .content li { text-wrap: wrap; }
/* 详情页大图头：英文名和学名分两行（中点不再孤零零挂在行尾），命名人不断开 */
.hero-detail .hsub-sep { display: block; height: 0; overflow: hidden; }
.hero-sub .auth { white-space: nowrap; }
/* 体型对比刻度字不折行 */
.axis-track i { white-space: nowrap; }
