/* ---------- 设计变量 ---------- */
:root {
  --bg: #f6f3ec;
  --surface: #fffdf8;
  --surface-2: #efebe1;
  --ink: #1d2a24;
  --ink-2: #47554d;
  --muted: #6f7a73;
  --line: #e2ddd0;
  --primary: #1f5c45;
  --primary-ink: #ffffff;
  --primary-soft: #dfeee6;
  --accent: #b9661c;
  --accent-soft: #f7e7d3;
  --lv0: #e9e5da;
  --lv1: #bcdccb;
  --lv2: #5fae88;
  --lv3: #17694a;
  --iucn-lc: #2e7d5b; --iucn-nt: #7c9a2a; --iucn-vu: #c79400; --iucn-en: #d9701a; --iucn-cr: #c8372d;
  --shadow: 0 1px 2px rgba(40, 50, 40, .06), 0 6px 20px rgba(40, 50, 40, .07);
  --radius: 16px;
  --tabbar-h: 60px;
  --serif: "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Noto Sans CJK SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111714;
    --surface: #1a221e;
    --surface-2: #222c27;
    --ink: #e9ede7;
    --ink-2: #c3ccc5;
    --muted: #93a098;
    --line: #2c3731;
    --primary: #74c7a0;
    --primary-ink: #0d1a14;
    --primary-soft: #1f3a2e;
    --accent: #e6a765;
    --accent-soft: #3a2c1c;
    --lv0: #252f2a;
    --lv1: #2f5544;
    --lv2: #46906d;
    --lv3: #86dcb2;
    --iucn-lc: #4fae85; --iucn-nt: #a3bf4c; --iucn-vu: #e0b530; --iucn-en: #ee8e3d; --iucn-cr: #ee5d52;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.7 var(--sans);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
main:focus { outline: none; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sci { font-style: italic; }
.nowrap { white-space: nowrap; }

/* ---------- 顶栏与导航 ---------- */
.topbar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
/* 毛玻璃放在伪元素上：直接加在 .topbar 会让里面 position:fixed 的底部导航失效 */
.topbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: 52px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; font: 700 19px/1 var(--serif); letter-spacing: .06em; color: var(--primary); }
.brand span { color: var(--ink); }
.icon-btn { margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-2); }
.icon-btn svg, .tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11.5px; color: var(--muted); }
.tabs a.on { color: var(--primary); font-weight: 600; }
.tabs a.on svg { stroke-width: 2.1; }

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .topbar-in { height: 64px; }
  .tabs { position: static; display: flex; gap: 4px; height: auto; padding: 0; background: none; border: 0; backdrop-filter: none; margin-left: 20px; }
  .tabs a { flex-direction: row; gap: 7px; font-size: 15px; padding: 8px 14px; border-radius: 999px; }
  .tabs a:hover { background: var(--surface-2); color: var(--ink); }
  .tabs a.on { background: var(--primary-soft); }
  .tabs svg { width: 19px; height: 19px; }
}

/* ---------- 通用组件 ---------- */
.page { padding-top: 20px; padding-bottom: 40px; }
.page-title { font: 700 26px/1.3 var(--serif); letter-spacing: .02em; }
@media (max-width: 899px) { .page-title:not(.keep) { display: none; } }   // 底部 tab 已经说明在哪一栏；数据说明页没有 tab，标题保留
.page-sub { color: var(--muted); margin-top: 4px; font-size: 14.5px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 12px; }
.sec-head h2 { font: 700 20px/1.3 var(--serif); }
.sec-head a { color: var(--primary); font-size: 14px; white-space: nowrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px; margin: 0 -16px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; white-space: nowrap;
}
.chip[aria-pressed="true"], .chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); font-weight: 600; }
@media (min-width: 900px) { .chips { flex-wrap: wrap; overflow: visible; padding: 0; margin: 0; } }

.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); }
.badge.p1 { background: #c8372d; color: #fff; }
.badge.p2 { background: var(--accent-soft); color: var(--accent); }
.badge.iucn { color: #fff; }
.iucn-LC { background: var(--iucn-lc); } .iucn-NT { background: var(--iucn-nt); } .iucn-VU { background: var(--iucn-vu); }
.iucn-EN { background: var(--iucn-en); } .iucn-CR { background: var(--iucn-cr); }
@media (prefers-color-scheme: dark) { .badge.iucn, .badge.p1 { color: #111; } .badge.p1 { background: var(--iucn-cr); } }

.search { position: relative; }
.search input {
  width: 100%; height: 48px; padding: 0 16px 0 44px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; appearance: none;
}
.search input::placeholder { color: var(--muted); }
.search svg { position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }

/* 月份条 */
.strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; }
.strip i { height: 18px; border-radius: 3px; background: var(--lv0); }
.strip i.l1 { background: var(--lv1); } .strip i.l2 { background: var(--lv2); } .strip i.l3 { background: var(--lv3); }
.strip i.now { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); position: relative; z-index: 1; }
/* eBird 实测条：同色阶、更薄，与手工条共用月份列 */
.mx-strips { display: grid; gap: 4px; min-width: 0; }
.strip.eb { gap: 2px; }
.strip.eb i { height: 9px; border-radius: 2px; }
.strip.eb i.now { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--muted); }

/* 月份柱状条：数量在上、月份在下分两行放，避免“1月 21”被读成日期；点柱子换月 */
.hs-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; margin-top: 12px; }
.hs-bar { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; padding: 2px 0 0; border: 0; background: none; font: inherit; }
.hs-bar b { font: 600 12.5px/1.2 var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hs-bar i { display: block; width: 100%; max-width: 26px; background: var(--lv1); border-radius: 4px 4px 0 0; }
.hs-bar span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hs-bar.top i { background: var(--lv2); }
.hs-bar.on i { background: var(--lv3); }
.hs-bar.on b, .hs-bar.on span { color: var(--primary); }
.hs-bar.on span { font-weight: 700; }

/* 鸟点页鸟种清单：密集网格，一屏能看完一个鸟点 */
.sp-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 2px; }
.sp-bar .search { flex: 1 1 200px; min-width: 180px; }
.sp-bar .chips { flex: 1 1 100%; }
.sp-group h3 { font: 600 12.5px/1.4 var(--sans); color: var(--muted); letter-spacing: .05em; margin: 16px 0 4px; padding-bottom: 5px; border-bottom: 1px solid var(--line); }
.sp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 12px; }
@media (min-width: 640px) { .sp-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .sp-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .sp-grid { grid-template-columns: repeat(5, 1fr); } }
.sp-grid a { display: flex; align-items: center; gap: 5px; min-height: 34px; font-size: 14.5px; color: var(--ink); }
.sp-grid a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-grid a:hover span { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.sp-grid .mk { font: 700 10.5px/1.55 var(--sans); font-style: normal; padding: 0 5px; border-radius: 6px; flex: none; }
.mk.p1 { background: var(--iucn-cr); color: #fff; }
.mk.p2 { background: var(--iucn-vu); color: #241a00; }
.mk.g { background: var(--lv2); color: #07150f; }
@media (min-width: 900px) { .hs-bars { gap: 7px; } .hs-bar i { max-width: 34px; } }
.eb-cap { font-size: 10.5px; line-height: 1.3; color: var(--muted); }
.eb-cap b { color: var(--accent); font-weight: 600; }
.strip-labels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 2px; margin-top: 4px; font-size: 10.5px; color: var(--muted); text-align: center; line-height: 1.2; }
.strip-labels b { color: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 14px; border-radius: 3px; background: var(--lv0); }
.legend .l1 { background: var(--lv1); } .legend .l2 { background: var(--lv2); } .legend .l3 { background: var(--lv3); }

/* ---------- 首页 ---------- */
.hero { padding: 26px 0 6px; }
.hero h1 { font: 700 30px/1.25 var(--serif); letter-spacing: .02em; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p { color: var(--ink-2); margin-top: 8px; max-width: 34em; }
.months { margin-top: 18px; }
.months .chip { min-width: 52px; justify-content: center; }
.months .chip.cur:not(.on) { border-color: var(--accent); color: var(--accent); }
@media (min-width: 900px) { .hero h1 { font-size: 40px; } .hero { padding-top: 44px; } }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pick { overflow: hidden; display: flex; flex-direction: column; }
.pick .ph { aspect-ratio: 16 / 10; background: var(--surface-2); position: relative; }
.pick .ph img { width: 100%; height: 100%; object-fit: cover; }
.pick .ph .badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 6px; }
.pick .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pick h3 { font: 700 19px/1.3 var(--serif); }
.pick h3 small { font: 400 13px var(--sans); color: var(--muted); margin-left: 6px; }
.where { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.where a { display: flex; align-items: center; gap: 6px; color: var(--ink-2); min-height: 28px; }
.where a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lv2); flex: none; }
.where a.best::before { background: var(--lv3); box-shadow: 0 0 0 3px var(--primary-soft); }
.where a span { color: var(--muted); font-size: 12.5px; }

.rows { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px; }
.row .thumb { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--surface-2); flex: none; }
.row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.row .t { min-width: 0; flex: 1; }
.row .t b { display: block; font-size: 16px; line-height: 1.35; }
.row .t span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .arrow { color: var(--muted); flex: none; font-size: 20px; padding-right: 4px; }

.site-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.site-card h3 { font: 700 17.5px/1.35 var(--serif); }
.site-card .meta { font-size: 13px; color: var(--muted); }
.site-card .names { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.site-card .names b { color: var(--primary); font-weight: 600; }
.site-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ---------- 首页"附近" ---------- */
.place-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.place-card h2 { font: 700 19px/1.3 var(--serif); margin: 0; }
.pickrow { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.pickrow label { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); }
.pickrow select { min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 14.5px; }
.linklike { border: 0; background: none; padding: 0 2px; min-height: 24px; color: var(--primary); font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
.near-card { padding: 13px 15px; display: flex; flex-direction: column; gap: 6px; }
.near-card .nr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; } .near-card .nr-top { color: inherit; }
.near-card h3 { font: 700 17px/1.35 var(--serif); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.near-card .km { flex: none; font-size: 13px; font-weight: 700; color: var(--primary); }
.near-card .meta { font-size: 13px; color: var(--muted); }
.near-card .names, .near-card .names a { font-size: 13.5px; color: var(--ink-2); }
.near-card .names a { text-decoration: underline; text-underline-offset: 2px; }
.near-card .names b { color: var(--primary); font-weight: 600; }
#near .chips { margin-top: 12px; }
@media (hover: hover) { .near-card { transition: transform .15s; } .near-card:hover { transform: translateY(-2px); } }

.note { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 12px; padding: 12px 14px; margin-top: 28px; }
.note a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 鸟种列表 ---------- */
.filters { display: flex; flex-direction: column; gap: 10px; margin: 16px 0 6px; }
.bird-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
@media (min-width: 640px) { .bird-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .bird-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .bird-grid { grid-template-columns: repeat(5, 1fr); } }
.bcard { overflow: hidden; position: relative; display: block; transition: transform .15s; }
@media (hover: hover) { .bcard:hover, .pick:hover, .row:hover, .site-card:hover { transform: translateY(-2px); } .pick, .row, .site-card { transition: transform .15s; } }
.bcard .ph { aspect-ratio: 4 / 3; background: var(--surface-2); }
.bcard .ph img { width: 100%; height: 100%; object-fit: cover; }
.bcard .body { padding: 9px 11px 11px; }
.bcard b { font: 700 16.5px/1.3 var(--serif); display: block; }
.bcard .en { font-size: 12px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcard .tags { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.bcard .fav-dot { position: absolute; top: 8px; right: 8px; color: #f5b82e; font-size: 18px; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.count { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- 鸟种详情 ---------- */
.crumb { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 14px; min-height: 40px; }
@media (max-width: 899px) { .crumb { display: none; } }   // 手机端有底部 tab，返回不必占一行
.bird-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bird-head h1 { font: 700 32px/1.2 var(--serif); letter-spacing: .03em; }
.bird-head .en { font-size: 17px; color: var(--ink-2); margin-top: 4px; }
.bird-head .tax { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.fav-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; flex: none; font-size: 22px; color: var(--muted); }
.fav-btn[aria-pressed="true"] { color: #e9a400; border-color: #e9a400; }
.head-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.gallery { margin: 16px -16px 0; position: relative; }
.gallery .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .track::-webkit-scrollbar { display: none; }
.gallery figure { margin: 0; flex: 0 0 100%; scroll-snap-align: center; }
.gallery .frame { aspect-ratio: 3 / 2; background: #0e1311; }
.gallery img { width: 100%; height: 100%; object-fit: contain; }
.gallery figcaption { padding: 8px 16px 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.gallery figcaption a { text-decoration: underline; text-underline-offset: 2px; }
.dots { display: flex; justify-content: center; gap: 7px; margin-top: 8px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; background: var(--line); position: relative; }
.dots button::after { content: ""; position: absolute; inset: -10px; }
.dots button.on { background: var(--ink); }
.gallery .nav { display: none; }
@media (min-width: 900px) {
  .gallery { margin: 18px 0 0; }
  .gallery .frame { border-radius: var(--radius); overflow: hidden; }
  .gallery figcaption { padding-left: 2px; }
  .gallery .nav { display: grid; place-items: center; position: absolute; top: calc(50% - 44px); width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; font-size: 20px; }
  .gallery .nav.prev { left: 12px; } .gallery .nav.next { right: 12px; }
}

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.fact { padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.fact span { display: block; font-size: 12px; color: var(--muted); }
.fact b { font-size: 15px; font-weight: 600; line-height: 1.4; display: block; }

/* 手机端：图 → 速览与日历 → 正文 → 资料表；桌面端分左右两栏 */
.detail { display: flex; flex-direction: column; }
.detail > .main, .detail > aside { display: contents; }
.detail .o1 { order: 1; } .detail .o2 { order: 2; } .detail .o3 { order: 3; } .detail .o4 { order: 4; }
@media (min-width: 900px) {
  .detail { display: grid; gap: 0 36px; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .85fr); align-items: start; }
  .detail > .main, .detail > aside { display: block; min-width: 0; }
}

.block { margin-top: 22px; }
.block > h2 { font: 700 19px/1.3 var(--serif); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.cal { padding: 14px; }
.cal-row + .cal-row { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.cal-row .hd { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.cal-row .hd a { font-weight: 600; color: var(--primary); font-size: 15px; }
.cal-row .hd span { color: var(--muted); font-size: 12.5px; text-align: right; }
.cal .legend { margin-top: 14px; }

details.sec { border-bottom: 1px solid var(--line); }
/* 多语名：语言名与词条两列对齐 */
.i18n { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 2px 0 10px; font-size: 13.5px; }
.i18n dt { color: var(--muted); }
.i18n dd { margin: 0; overflow-wrap: anywhere; }
details.sec summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 52px; font: 700 18px/1.3 var(--serif); }
details.sec summary::-webkit-details-marker { display: none; }
details.sec summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; margin-right: 6px; }
details.sec[open] summary::after { transform: rotate(-135deg); }
details.sec p { padding: 0 0 16px; color: var(--ink-2); text-align: justify; }
details.sec.tip { border: 0; background: var(--accent-soft); border-radius: var(--radius); padding: 0 14px; margin-top: 16px; }
details.sec.tip summary { color: var(--accent); }
details.sec.tip p { color: var(--ink); }

.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th, .table td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { width: 6.500em; color: var(--muted); font-weight: 400; }
.iucn-scale { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.iucn-scale span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; border: 1.5px solid var(--line); color: var(--muted); }
.iucn-scale span.on { border-color: transparent; color: #fff; }
@media (prefers-color-scheme: dark) { .iucn-scale span.on { color: #111; } }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 14.5px; font-weight: 600; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

/* ---------- 鸟点 ---------- */
.map { height: 44vh; min-height: 280px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); z-index: 0; }
.map.mini { height: 240px; min-height: 0; }
.sites-layout { display: grid; gap: 16px; margin-top: 14px; }
@media (min-width: 900px) {
  .sites-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; }
  .sites-layout .map { position: sticky; top: 84px; height: calc(100vh - 110px); order: 2; }
  .sites-layout .site-grid { grid-template-columns: 1fr; }
}
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #1f5c45; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); display: grid; place-items: center; }
.pin b { transform: rotate(45deg); color: #fff; font-size: 12px; font-weight: 700; }
.pin.hot { background: #c8782a; }
.pin.dim { background: #8d968f; }
.leaflet-container { font: inherit; }
.leaflet-popup-content { margin: 12px 14px; font-size: 14px; line-height: 1.5; color: #1d2a24; }
.leaflet-popup-content b { font-size: 15.5px; display: block; }
.leaflet-popup-content a { color: #1f5c45; font-weight: 600; display: inline-block; margin-top: 6px; }
.leaflet-popup-content span { color: #6f7a73; font-size: 12.5px; }

.site-hero { padding: 18px; background: linear-gradient(135deg, var(--primary-soft), var(--surface)); }
.site-hero h1 { font: 700 27px/1.3 var(--serif); }
.site-hero .meta { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.site-hero .best { margin-top: 12px; display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; }
.site-hero .best b { flex: none; color: var(--primary); }
.prose p { color: var(--ink-2); text-align: justify; }
.ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); }
.ul li + li { margin-top: 6px; }
.tagline { display: flex; flex-wrap: wrap; gap: 6px; }
.tagline span { font-size: 13.5px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }

.matrix { padding: 6px 12px 12px; }
.mx-head, .mx-row { display: grid; grid-template-columns: minmax(136px, 1.3fr) minmax(0, 2.6fr); gap: 10px; align-items: center; }
.mx-head { position: sticky; top: calc(52px + env(safe-area-inset-top)); background: var(--surface); padding: 8px 0 6px; z-index: 2; font-size: 11px; color: var(--muted); }
@media (min-width: 900px) { .mx-head { top: 64px; } }
.mx-row { padding: 7px 0; border-top: 1px solid var(--line); min-height: 48px; }
.mx-row .n { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mx-row .n img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); }
.mx-row .n b { font-size: 14.5px; font-weight: 600; line-height: 1.3; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-row .n small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-group { font: 700 14px var(--serif); color: var(--muted); padding: 16px 0 6px; }
.strip-labels.tight { margin: 0; }

/* ---------- 说明页 ---------- */
.about h2 { font: 700 19px/1.3 var(--serif); margin: 26px 0 8px; }
.about p, .about li { color: var(--ink-2); }
.about a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.credits { font-size: 12.5px; color: var(--muted); columns: 2 320px; column-gap: 28px; padding: 0; list-style: none; }
.credits li { break-inside: avoid; margin-bottom: 6px; }


@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- 全量名录 ---------- */
.noimg { display: grid; place-items: center; height: 100%; font-size: 12.5px; color: var(--muted); }
.badge.guide { background: var(--primary); color: var(--primary-ink); }
.selects { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.selects label { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.selects span { color: var(--muted); font-size: 13px; flex: none; }
.selects select { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 15px; }
@media (min-width: 900px) { .selects { max-width: 520px; } }
.btn.more { display: flex; width: 100%; max-width: 360px; margin: 22px auto 0; }
.gallery.basic .frame { aspect-ratio: auto; max-height: 70vh; display: grid; place-items: center; }
.gallery.basic img { width: auto; max-width: 100%; height: auto; max-height: 70vh; }
.ul-link { text-decoration: underline; text-underline-offset: 2px; color: var(--primary); }
.tagline a { font-size: 13.5px; padding: 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.dot { width: 14px; height: 14px; border-radius: 50%; background: #5b8fb0; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.hs-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.hs-list a { display: block; padding: 10px 12px; border-top: 1px solid var(--line); min-height: 44px; }
.hs-list a:first-child { border-top: 0; }
.hs-list b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.hs-list span { font-size: 12.5px; color: var(--muted); }
@media (min-width: 900px) { .sites-layout > div:last-child .site-grid { grid-template-columns: 1fr; } }

.badge.extra { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
