/* =============================================================================
   羽见 · 江西观鸟社区 —— 界面样式
   排版参照「学习强国」：白底卡片 + 顶部栏目条 + 焦点图 + 金刚区 + 左文右图信息流
   主色生态绿（--brand），浅色为主；附带夜间模式（右上角可切换）
   ============================================================================= */
:root {
  --brand: #1F7A5A;          /* 生态绿：主色 */
  --brand-deep: #145C42;
  --brand-soft: #E8F5EF;
  --ink: #1A1A1A;
  --ink-2: #4A4A4A;
  --ink-3: #8A8F99;
  --ink-4: #B4B9C1;
  --bg: #F4F5F7;
  --card: #FFFFFF;
  --card-2: #FAFAFB;
  --line: #EDEEF2;
  --line-2: #E3E5EA;
  --green: #2E8B57;
  --hot: #D8232A;            /* 仅用于「国家一级」这类警示标签 */
  --amber: #C8871A;
  --sky: #2C6BD4;
  --shadow: 0 2px 10px rgba(20, 25, 40, .06);
  --shadow-s: 0 1px 4px rgba(20, 25, 40, .05);
  --r-s: 6px;
  --r-m: 8px;
  --r-l: 10px;
  --dock: 54px;
  --top: 96px;
}
[data-theme="dark"] {
  --brand: #4FBF8B;
  --brand-deep: #3AA374;
  --brand-soft: #17301F;
  --ink: #E9EBEF;
  --ink-2: #C3C8D0;
  --ink-3: #8C939D;
  --ink-4: #6E7681;
  --bg: #121212;
  --card: #1E1E1E;
  --card-2: #242424;
  --line: #2A2A2A;
  --line-2: #333333;
  --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  --shadow-s: 0 1px 4px rgba(0, 0, 0, .3);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 高度基准用 dvh（动态视口高度）。
   `height:100%` / `100vh` 在手机上会把「被地址栏、底部工具栏遮住的那一条」也算进去，
   于是 App 的真实底边落在屏幕可视区之外 —— 表现就是鸟博士面板的输入框、
   底部导航被系统工具栏压住或切掉，而且只在真机上出现，桌面预览完全看不到。
   dvh 会随工具栏显隐自动变化；不认识 dvh 的老浏览器自动回退到上面的 100%。 */
html, body { height: 100%; height: 100dvh; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #E9EBEE; color: var(--ink); overflow: hidden; -webkit-font-smoothing: antialiased;
}
[data-theme="dark"] body { background: #0B0B0B; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { display: block; }
a { color: inherit; }
.aurora { display: none; }

/* ---------------- 开屏页（Splash） ----------------
   它铺的是**「手机那块屏」**，不是整个浏览器窗口：
     · 手机上 `.app` 就是 100%×100% → 开屏页全屏；
     · 桌面浏览器上 `.app` 是居中的 430×940 手机外框（≥900px 时还有圆角与描边），
       所以这里必须用 `absolute` 而不是 `fixed` —— `fixed` 是按视口算的，
       会铺满整片窗口、连手机外框外面也一起盖住。
   `.app` 已经 `position: relative` + `overflow: hidden`，所以圆角裁切自动生效。

   ⚠️ **这里是纯静态的，不要加动效**（曾做过「图片缓慢推进 + 底部进度条走满 + 淡出」，
   按需求去掉了）：开屏图就安安静静铺满 2 秒，然后整块拿掉。
   停留时长由 app.js 控制（HOLD = 2s），改时间改那边。 */
html.sp-lock, html.sp-lock body { overflow: hidden; }
.splash {
  position: absolute; inset: 0; z-index: 90; overflow: hidden;
  background: #0C1613; display: grid; place-items: center;
}
.splash img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 手机外壳 */
.phone { position: relative; z-index: 1; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
@media (min-width: 900px) { .phone { padding: 20px; } }
.app {
  position: relative; width: 100%; height: 100%; max-width: 430px; max-height: 940px;
  display: flex; flex-direction: column; overflow: hidden; background: var(--bg);
}
@media (min-width: 900px) {
  .app { border-radius: 30px; box-shadow: 0 18px 50px rgba(20,30,45,.28), 0 0 0 9px #1b1d22; }
}
.layer { position: absolute; inset: 0; pointer-events: none; z-index: 20; }
.layer > * { pointer-events: auto; }
#sheetLayer { z-index: 40; }
#modalLayer { z-index: 50; }
#toastLayer { z-index: 70; pointer-events: none; }
#toastLayer > * { pointer-events: none; }
.homebar { display: none; }

/* 顶栏：白底 + 红色品牌 + 搜索 + 图标 */
.topbar { position: relative; z-index: 12; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, #1F7A5A, #7BD8A8 45%, #FFD98A); }
.topbar .tb-row { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 8px; }
.brand { display: flex; align-items: center; gap: 7px; flex: none; }
.brand .mark { width: 28px; height: 28px; border-radius: 8px; overflow: hidden; flex: none; }
.brand .txt b { display: block; font-size: 17px; font-weight: 800; color: var(--brand); letter-spacing: .3px; line-height: 1.1; }
.brand .txt span { display: none; }
.tb-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.iconbtn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); }
.iconbtn:active { background: var(--bg); }
.avatar-btn { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: var(--bg); border: 1px solid var(--line-2); }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* 栏目条（学习强国标志性） */
.channels { display: flex; gap: 20px; overflow-x: auto; padding: 0 14px 8px; background: var(--card); scrollbar-width: none; }
.channels::-webkit-scrollbar { display: none; }
.ch { position: relative; white-space: nowrap; font-size: 14.5px; color: var(--ink-3); padding: 4px 0 7px; flex: none; }
.ch.on { color: var(--ink); font-weight: 700; font-size: 16px; }
.ch.on::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0; width: 20px; height: 3px; border-radius: 2px; background: var(--brand); }

/* 内容区 */
.stage { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: calc(var(--dock) + 14px); }
.stage::-webkit-scrollbar { width: 0; }
.wrap { padding: 0 12px; }
.scroll-x { display: flex; gap: 10px; overflow-x: auto; padding: 0 12px 10px; scroll-snap-type: x mandatory; }
.scroll-x::-webkit-scrollbar { display: none; }

/* 排版 */
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
.display { letter-spacing: 0; }
.sec-title { display: flex; align-items: center; gap: 8px; padding: 14px 12px 8px; }
.sec-title h2 { font-size: 17px; font-weight: 700; }
.sec-title h2::before { content: ''; display: inline-block; width: 3px; height: 15px; background: var(--brand); border-radius: 2px; margin-right: 7px; vertical-align: -2px; }
.sec-title span { font-size: 11.5px; color: var(--ink-3); }
.sec-title .more { margin-left: auto; font-size: 12px; color: var(--ink-3); display: flex; align-items: center; gap: 1px; }
.muted { color: var(--ink-3); }
.tiny { font-size: 11.5px; color: var(--ink-3); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.ellip { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* 卡片 */
.card { background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow-s); overflow: hidden; }
.card.pad { padding: 13px; }
.card + .card { margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 12px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.chip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
/* 社区顶部那三个筛选项选中时用更深的底色（普通 chip 的浅绿在浅色照片上不够显眼） */
.chip.strong.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.tag { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 4px; font-size: 10.5px; background: var(--bg); color: var(--ink-3); }
.tag.lime { background: #E9F4EE; color: var(--green); }
.tag.amber { background: #FCF3E2; color: var(--amber); }
.tag.coral { background: #FDEDEE; color: var(--hot); }
[data-theme="dark"] .tag.coral { background: #3A1D1F; }
[data-theme="dark"] .tag.lime { background: #17281F; }
[data-theme="dark"] .tag.amber { background: #2C2416; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 40px; padding: 0 16px;
  border-radius: var(--r-s); font-size: 14px; font-weight: 600; background: var(--card); border: 1px solid var(--line-2); color: var(--ink-2); }
.btn:active { opacity: .8; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.ghost { background: transparent; border-color: var(--line-2); }
.btn.block { width: 100%; }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn[disabled] { opacity: .45; }

/* 焦点图（轮播） */
.hero { position: relative; flex: none; width: 92%; max-width: 400px; border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow-s); scroll-snap-align: start; }
.hero img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero .veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 2%, rgba(0,0,0,.24) 42%, rgba(0,0,0,0) 70%); }
.hero .body { position: absolute; left: 10px; right: 10px; bottom: 8px; color: #fff; }
.hero .body .kicker { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 3px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 700; }
.hero .body h3 { font-size: 15px; line-height: 1.4; margin: 5px 0 2px; }
.hero .body .sub { font-size: 11px; opacity: .8; }

/* 首页顶部轮播：一屏一张、居中吸附、自动翻页（JS 在 app.js 的 mountHeroCarousel） */
.hero-carousel { display: flex; gap: 10px; overflow-x: auto; padding: 10px 12px 2px; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hero-carousel::-webkit-scrollbar { display: none; }
.hero-carousel .hero { width: 100%; max-width: none; scroll-snap-align: center; }
.hero-dots { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 8px 0 2px; }
.hero-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: width .25s, background .25s; }
.hero-dots i.on { width: 16px; border-radius: 4px; background: var(--brand); }

/* 金刚区 */
.kk { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--card); border-radius: var(--r-m); margin: 10px 12px 0; padding: 14px 4px 6px; box-shadow: var(--shadow-s); }
.kk-item { display: flex; flex-direction: column; align-items: center; gap: 7px; padding-bottom: 12px; }
.kk-item .ico { width: 44px; height: 44px; display: grid; place-items: center; }
.kk-item .ico svg { filter: drop-shadow(0 2px 6px rgba(20,60,40,.14)); }
.kk-item span { font-size: 11.5px; color: var(--ink-2); }
.kk-item .ico.c1 { background: linear-gradient(135deg, #E4363C, #B81C22); }
.kk-item .ico.c2 { background: linear-gradient(135deg, #3E9E76, #1F7A5A); }
.kk-item .ico.c3 { background: linear-gradient(135deg, #5B8DEF, #2C6BD4); }
.kk-item .ico.c4 { background: linear-gradient(135deg, #E8A33A, #C8871A); }
.kk-item .ico.c5 { background: linear-gradient(135deg, #8F7BE8, #5B46C8); }
.kk-item .ico.c6 { background: linear-gradient(135deg, #4FB3C9, #217E93); }
.kk-item .ico.c7 { background: linear-gradient(135deg, #E97A56, #C9482A); }
.kk-item .ico.c8 { background: linear-gradient(135deg, #7BB662, #4A8434); }

/* 数据条 */
.stats { display: flex; background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow-s); overflow: hidden; }
.stats .s { flex: 1; text-align: center; padding: 12px 4px; position: relative; }
.stats .s + .s::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: var(--line); }
.stats .s b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.stats .s span { font-size: 11px; color: var(--ink-3); }

/* 信息流：左文右图（学习强国核心排版） */
.ai { display: flex; gap: 10px; padding: 12px 12px; background: var(--card); border-bottom: 1px solid var(--line); }
.ai:last-child { border-bottom: 0; }
.ai:active { background: var(--card-2); }
.ai .ai-txt { flex: 1; min-width: 0; }
.ai h4 { font-size: 15.5px; line-height: 1.42; font-weight: 600; }
.ai .meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.ai .meta .src { color: var(--ink-3); }
.ai .ai-thumb { width: 108px; height: 72px; border-radius: var(--r-s); overflow: hidden; flex: none; background: var(--bg); position: relative; }
.ai .ai-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ai .ai-thumb .dur { position: absolute; right: 4px; bottom: 4px; padding: 0 4px; border-radius: 3px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; }
.feed { background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow-s); overflow: hidden; margin: 0 12px; }

/* 视频三列 */
.vgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 10px 12px 14px; }
.vitem { border-radius: var(--r-s); overflow: hidden; background: var(--bg); position: relative; }
.vitem img { width: 100%; aspect-ratio: 3 / 2.1; object-fit: cover; }
.vitem .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.6); display: grid; place-items: center; color: #fff; }
.vitem .dur { position: absolute; right: 4px; bottom: 4px; padding: 0 4px; border-radius: 3px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; }
.vgrid-wrap { background: var(--card); border-radius: var(--r-m); margin: 0 12px; box-shadow: var(--shadow-s); }

/* 视频单列流式（「观鸟视频」频道）：一行一个，封面全宽 + 标题 / 元信息。
   封面源图 960×540，所以固定 16:9 铺满，不裁不拉、慢网也不会跳版。 */
.vlist { display: flex; flex-direction: column; gap: 12px; padding: 0 12px; }
.vlist .vitem { background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow-s); }
.vlist .vthumb { position: relative; }          /* 播放键与时长以封面为基准居中 / 贴角，不被下方文字块带偏 */
.vlist .vthumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.vlist .vitem .play { width: 46px; height: 46px; background: rgba(0,0,0,.35); }
.vlist .vitem .play svg { width: 19px; height: 19px; }
.vlist .vitem .dur { right: 8px; bottom: 8px; padding: 1px 6px; font-size: 11px; }
.vlist .vinfo { padding: 10px 12px 12px; }
.vlist .vinfo h4 { font-size: 15px; line-height: 1.45; font-weight: 600; }
.vlist .vinfo .tiny { margin-top: 6px; }

/* 通用列表 */
.list { background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow-s); overflow: hidden; margin: 0 12px; }
.line { display: flex; align-items: center; gap: 10px; padding: 12px 12px; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line:active { background: var(--card-2); }
.line .thumb { width: 54px; height: 54px; border-radius: var(--r-s); overflow: hidden; flex: none; background: var(--bg); }
.line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.line h4 { font-size: 14.5px; margin-bottom: 3px; }

/* 鸟种卡（图鉴） */
.bird-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px; }
.bird-card { position: relative; background: var(--card); border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow-s); }
.bird-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* 图鉴卡片：没有真实照片时的占位面（不给它配别的鸟的照片） */
.bird-card .ph.nophoto { aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: linear-gradient(140deg, var(--brand-soft), var(--surface-2)); color: var(--brand); }
.bird-card .ph.nophoto .ico { opacity: .55; }
.bird-card .ph.nophoto .fam { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.bird-card .ph.nophoto .note { font-size: 10.5px; color: var(--ink-3); }
.bird-card .badge { position: absolute; left: 6px; top: 6px; height: 19px; padding: 0 6px; border-radius: 3px; display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; color: #fff; background: rgba(0,0,0,.45); }
.bird-card .badge.p1 { background: var(--brand); }
.bird-card .badge.p2 { background: #E0A32E; }
.bird-card .info { padding: 8px 10px 10px; background: var(--card); position: static; }
.bird-card h4 { font-size: 15px; }
.bird-card .lat { font-size: 10.5px; color: var(--ink-3); font-style: italic; margin-top: 2px; }
/* 无限滚动：图鉴一屏最多 20 张缩略图（~400KB），直接加载，不做惰性等待 */
.bird-card img[data-src] { background: linear-gradient(100deg, var(--bg) 30%, var(--surface-2) 50%, var(--bg) 70%); background-size: 200% 100%; animation: dexShimmer 1.4s linear infinite; }
.bird-card img[data-bad="1"] { visibility: hidden; }
@keyframes dexShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
/* 加载中 / 已到底 */
.dex-more { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 12px 4px; font-size: 12.5px; color: var(--ink-3); }
.dex-more .spin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--brand); animation: dexSpin .7s linear infinite; }
.dex-more.end { padding: 18px 12px 6px; }
.dex-more.end::before, .dex-more.end::after { content: ''; width: 28px; height: 1px; background: var(--line); }
@keyframes dexSpin { to { transform: rotate(360deg); } }


/* 方形/圆形头像位：图片一律「填满 + 居中裁切」。
   以前「我的」页面的大头像容器没有给 img 定尺寸，浏览器就按原图尺寸渲染，
   再被 overflow:hidden 切掉右边和下边（只露出左上角）——顶栏是 cover 居中裁切，
   于是同一张头像在两个地方看起来完全不一样。 */
.avatar-slot { overflow: hidden; flex: none; background: var(--surface-2); }
.avatar-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 识别结果页「结果不对？」的反馈入口：贴在「最接近的参考照片」右侧。
   图标自己带圆形描边，所以这里**不加底色**（原来那枚红底圆按钮会喧宾夺主），
   只用琥珀色表示「可以反馈」，按住时轻微缩小给个反馈。 */
.fb-dot { flex: none; width: 26px; height: 26px; padding: 0; border: 0; background: none;
  color: var(--amber); display: grid; place-items: center; transition: transform .15s; }
.fb-dot:active { transform: scale(.9); }

/* 科普文章卡片的骨架屏（滚动加载时显示） */
.ai.sk-card { pointer-events: none; }
.ai.sk-card .ai-thumb { position: relative; }
.ai.sk-card .sk { background: linear-gradient(100deg, var(--bg) 30%, var(--surface-2) 50%, var(--bg) 70%); background-size: 200% 100%; animation: dexShimmer 1.4s linear infinite; border-radius: 6px; }
.ai.sk-card .ai-thumb .sk { height: 100%; border-radius: 0; }

/* 没有照片时的详情页头图占位（不拿别的鸟的照片顶上） */
.detail-hero .ph-empty { aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(140deg, var(--brand-soft), var(--surface-2)); color: var(--brand); opacity: .95; }
.detail-hero .ph-empty span { font-size: 12.5px; color: var(--ink-2); letter-spacing: .5px; }
/* 社区动态 */
.post { background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow-s); padding: 12px; margin: 0 12px 10px; }
.post .head { display: flex; align-items: center; gap: 9px; }
.post .head .ava { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--bg); flex: none; }
.post .head .ava img { width: 100%; height: 100%; object-fit: cover; }
.post .head b { font-size: 14px; display: block; }
.post .text { font-size: 15px; line-height: 1.68; margin: 10px 0 0; color: var(--ink); white-space: pre-wrap; }
.post .media { margin-top: 10px; border-radius: var(--r-s); overflow: hidden; }
.post .media img { width: 100%; max-height: 300px; object-fit: cover; }
.post .place { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 11.5px; color: var(--sky); }
/* 「相关活动」——动态与观鸟活动之间的双向入口，点了进活动详情 */
.post .act-link { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 9px; padding: 7px 10px;
  border-radius: var(--r-s); background: var(--brand-soft); color: var(--brand-deep);
  font-size: 11.5px; font-weight: 600; text-align: left; line-height: 1.5; }
.post .act-link svg { flex: none; }
.post .acts { display: flex; gap: 4px; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.post .acts button { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 15px; font-size: 12.5px; color: var(--ink-3); }
.post .acts button.on { color: var(--brand); }
/* 点赞：点过之后爱心要变成**红色实心**（收藏/其它按钮仍然是品牌绿描边） */
.post .acts button[data-act="like"].on { color: #E4363C; }
.post .acts button[data-act="like"].on svg { fill: currentColor; stroke: currentColor; }
.post .acts .spacer { flex: 1; }

/* 详情页 */
.detail-hero { position: relative; margin: 0; }
.detail-hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.detail-hero .veil { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.78) 2%, rgba(0,0,0,.22) 45%, rgba(0,0,0,.12) 75%); }
.detail-hero .info { position: absolute; left: 12px; right: 12px; bottom: 12px; color: #fff; }
.detail-hero h1 { font-size: 26px; }
.kv { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv:last-child { border-bottom: 0; }
.kv .k { width: 80px; flex: none; color: var(--ink-3); }
.kv .v { flex: 1; color: var(--ink-2); line-height: 1.6; }
.para { font-size: 15px; line-height: 1.85; color: var(--ink-2); margin: 0 0 12px; }
.feat { display: flex; gap: 8px; padding: 6px 0; font-size: 14px; line-height: 1.65; color: var(--ink-2); }
.feat .n { width: 18px; height: 18px; border-radius: 4px; background: var(--brand-soft); color: var(--brand); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; flex: none; margin-top: 3px; }
.months { display: flex; gap: 3px; }
.months i { flex: 1; height: 26px; border-radius: 4px; background: var(--bg); display: grid; place-items: center; font-size: 9.5px; color: var(--ink-3); font-style: normal; }
.months i.on { background: var(--brand); color: #fff; font-weight: 700; }
.credit { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-m); background: var(--bg); font-size: 11.5px; color: var(--ink-3); line-height: 1.65; }
.credit a { color: var(--sky); text-decoration: none; }

/* 音频播放条 */
/* 鸟种详情页曾经的「播放鸟鸣」音频条已整体移除 —— 音频素材是合成示例音、不是野外录音，
   不作为功能提供给用户（.recwave 声纹采集波形仍在用下面的 @keyframes wv）。 */
@keyframes wv { 0%,100% { height: 5px; } 50% { height: 19px; } }

/* 文章 */
.article-head { padding: 4px 0 0; }
.article-head h1 { font-size: 22px; line-height: 1.42; }
.article-cover { margin: 12px 0; }
.article-cover img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-m); }
.read-line { padding: 12px; border-radius: var(--r-m); background: var(--card); box-shadow: var(--shadow-s); border-left: 3px solid var(--brand); }
.read-line.speaking { background: var(--brand-soft); }
.sent { padding: 4px 6px; border-radius: 4px; }
.sent.on { background: var(--brand-soft); color: var(--brand-deep); }

/* 视频播放器 */
.vplayer { position: relative; background: #000; }
.vplayer .vstage { position: relative; display: block; background: #000; }
.vplayer video { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; display: block; }
/* 控制条改成视频**下方**的独立一条。原来它绝对定位压在画面底部，
   进度条加一整排按钮把视频下沿盖住了 —— 看起来就像「视频没显示全」。 */
.vplayer .ctrl { position: relative; padding: 10px 12px 12px; background: #14181a; color: #fff; }
.vplayer .bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,.3); position: relative; }
.vplayer .bar i { display: block; height: 100%; border-radius: 2px; background: var(--brand); }
.vplayer .row2 { display: flex; align-items: center; gap: 12px; margin-top: 8px; font-size: 12px; }
.vplayer .center { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 56px; height: 56px; border-radius: 50%; background: rgba(0,0,0,.42); border: 1.5px solid rgba(255,255,255,.75); display: grid; place-items: center; color: #fff; transition: opacity .22s ease; }
/* 播放中把中间的圆钮收起来：以前它一直在，只是图标从播放换成暂停，
   竖屏看着像「没在播」，横屏全屏时正好压在画面正中。
   pointer-events:none 让点击穿到下面的 <video>，所以点画面照样能暂停。 */
.vplayer .center.is-hidden { opacity: 0; pointer-events: none; }
/* 外链视频（B 站等）：跨域 iframe，控制权在对方播放器手里，这里只负责铺满 16:9 */
.vplayer .vframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }

/* 「来源：平台 · 作者」——列表卡片与播放页共用同一行 */
.vsrc { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.vsrc .ic { flex: none; opacity: .8; }
.vlist .vinfo .vsrc { margin-top: 6px; }

/* 表单 / 登录 */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.input { width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r-s); background: var(--card); border: 1px solid var(--line-2); color: var(--ink); outline: 0; font-size: 15px; }
.input:focus { border-color: var(--brand); }
textarea.input { height: auto; padding: 12px 14px; line-height: 1.7; resize: none; }
.auth-hero { text-align: center; padding: 14px 0 6px; }
.auth-hero .mascot { width: 120px; height: 120px; margin: 0 auto 4px; }
.auth-hero h1 { font-size: 26px; font-weight: 800; color: var(--brand); }
.auth-hero p { color: var(--ink-3); font-size: 12.5px; margin: 8px 0 0; }
.seg { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.seg button { flex: 1; height: 44px; font-size: 15px; color: var(--ink-3); position: relative; }
.seg button.on { color: var(--brand); font-weight: 700; }
.seg button.on::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); bottom: -1px; width: 34px; height: 3px; background: var(--brand); border-radius: 2px; }

/* 底部导航（白底，选中红） */
.dock {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 25; height: calc(var(--dock) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex; align-items: stretch; background: var(--card); border-top: 1px solid var(--line);
}
/* 底部导航：设计稿定的是「默认态用 60% 灰绿描边，选中态切主绿并加粗文字」。
   导航图标全部用 currentColor 画，所以只改这里的 color，图标与文字一起变色。
   尺寸走的是常见底栏的比例（条高 54 / 图标 26 / 字号 11），别再往回加大。 */
.dock .item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #A8BFB4; font-size: 11px; }
.dock .item .ico { height: 28px; display: grid; place-items: center; }
.dock .item.on { color: var(--brand); font-weight: 600; }
.dock .fab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--ink-3); font-size: 10.5px; }

/* 底部正中间的「识别」主按钮：5 个等宽槽位里的第 3 个正好居中 */
.dock .item.main { position: relative; }
.dock .item.main .ico { position: relative; }
.dock .item.main .fab-ai {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, calc(-50% - 9px));
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--lime), var(--brand)); color: #06140f;
  box-shadow: 0 4px 12px rgba(31,122,90,.4), 0 0 0 3px var(--card);
  font-style: normal; transition: transform .15s;
}
.dock .item.main:active .fab-ai { transform: translate(-50%, calc(-50% - 7px)) scale(.94); }
.dock .item.main span:last-child { color: var(--brand); font-weight: 700; }

/* 详情页返回键：吸顶悬浮，滚到哪儿都在（照片上是深色圆底 + 白图标，保证看得见） */
.backwrap { position: sticky; top: 0; height: 0; z-index: 28; pointer-events: none; }
.backwrap.roomy { height: 48px; }
.backfab {
  position: absolute; left: 12px; top: 8px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; pointer-events: auto;
  background: rgba(0, 0, 0, .44); color: #fff; border: 1px solid rgba(255, 255, 255, .34);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .26); backdrop-filter: blur(4px);
}
.backfab:active { background: rgba(0, 0, 0, .66); }

/* 悬浮记录按钮（学习强国式红色圆钮） */
.fab-record { position: absolute; right: 14px; bottom: calc(var(--dock) + 18px); z-index: 24; height: 44px; padding: 0 18px; border-radius: 22px;
  display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; font-weight: 600; font-size: 13.5px; box-shadow: 0 6px 16px rgba(31,122,90,.34); }

/* 鸟博士悬浮 */
.mascot-orb { position: absolute; width: 70px; height: 70px; z-index: 33; touch-action: none; cursor: grab; }
.mascot-orb.dragging { cursor: grabbing; }
.mascot-orb .halo { position: absolute; inset: -6px; border-radius: 50%; background: radial-gradient(circle, rgba(31,122,90,.26), transparent 70%); animation: pulse 2.6s infinite; }
@keyframes pulse { 0%,100% { transform: scale(.92); opacity: .9; } 60% { transform: scale(1.14); opacity: 0; } }
.mascot-orb svg { position: relative; width: 100%; height: 100%; filter: drop-shadow(0 4px 10px rgba(0,0,0,.22)); }
.mascot-orb .hint { position: absolute; right: 78px; top: 20px; white-space: nowrap; padding: 6px 10px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); box-shadow: var(--shadow); opacity: 0; transform: translateX(6px); transition: .25s; }
.mascot-orb .hint.on { opacity: 1; transform: none; }
.mascot-panel { position: absolute; left: 0; right: 0; bottom: 0; top: 22%; z-index: 45; display: flex; flex-direction: column;
  background: var(--card); border-radius: 14px 14px 0 0; box-shadow: var(--shadow); overflow: hidden; animation: sheetIn .28s ease-out; }
.mascot-panel .hd { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.mascot-panel .hd .av { width: 40px; height: 40px; border-radius: 12px; background: var(--bg); overflow: hidden; }
.mascot-panel .body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.bub { max-width: 84%; padding: 10px 12px; border-radius: 4px 14px 14px 14px; background: var(--card); font-size: 14px; line-height: 1.7; color: var(--ink-2); box-shadow: var(--shadow-s); }
.bub.me { align-self: flex-end; border-radius: 14px 4px 14px 14px; background: var(--brand); color: #fff; }
.bub b { color: var(--ink); }
.bub.me b { color: #fff; }
.bub .mini { display: flex; gap: 9px; align-items: center; margin-top: 9px; padding: 8px; border-radius: var(--r-s); background: var(--bg); }
.bub .mini img { width: 46px; height: 38px; border-radius: 6px; object-fit: cover; }
.chips-row { display: flex; gap: 7px; overflow-x: auto; padding: 9px 12px; border-top: 1px solid var(--line); background: var(--card); }
.chips-row::-webkit-scrollbar { display: none; }
.chat-in { display: flex; gap: 8px; padding: 9px 12px calc(9px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--card); }
.chat-in .input { height: 42px; }

/* 弹层 / 提示 */
.mask { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 84%; background: var(--card); border-radius: 14px 14px 0 0;
  display: flex; flex-direction: column; overflow: hidden; animation: sheetIn .28s ease-out; }
@keyframes sheetIn { from { transform: translateY(100%); } }
.sheet .grip { width: 36px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 9px auto 0; }
.sheet .hd { display: flex; align-items: center; padding: 10px 14px 8px; border-bottom: 1px solid var(--line); }
.sheet .hd h3 { font-size: 16.5px; }
.sheet .bd { padding: 12px 14px calc(16px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.modal { position: absolute; inset: 0; display: grid; place-items: center; padding: 26px; }
.modal .box { width: 100%; max-width: 320px; background: var(--card); border-radius: 12px; padding: 20px; text-align: center; animation: pop .22s ease-out; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.toast { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%); padding: 10px 16px; border-radius: 6px;
  background: rgba(0,0,0,.82); color: #fff; font-size: 13px; animation: tin .2s; max-width: 86%; text-align: center; }
@keyframes tin { from { transform: translate(-50%, 10px); opacity: 0; } }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-3); background: var(--card); border-radius: var(--r-m); margin: 0 12px; }
.empty .ico { width: 58px; height: 58px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); }
.sk { background: linear-gradient(100deg, #EEF0F3 30%, #F7F8FA 50%, #EEF0F3 70%); background-size: 220% 100%; animation: sk 1.2s infinite linear; border-radius: var(--r-m); }
@keyframes sk { from { background-position: 120% 0; } to { background-position: -20% 0; } }
[data-theme="dark"] .sk { background: linear-gradient(100deg, #242424 30%, #2E2E2E 50%, #242424 70%); background-size: 220% 100%; }

/* 学习强国式的小工具条 */
.notice { display: flex; align-items: center; gap: 8px; margin: 10px 12px 0; padding: 10px 12px; background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow-s); }
.notice .ico { width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.daycard { margin: 10px 12px 0; background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow-s); padding: 12px; border-left: 3px solid var(--brand); }
.daycard h3 { font-size: 15.5px; display: flex; align-items: center; gap: 6px; }
.daycard .body { display: flex; gap: 10px; margin-top: 10px; }
.daycard .body .fr { width: 104px; height: 78px; border-radius: var(--r-s); overflow: hidden; flex: none; }
.daycard .body .fr img { width: 100%; height: 100%; object-fit: cover; }

/* ===================== 生态主题点缀 ===================== */
.eco-strip { margin: 10px 12px 0; padding: 12px; border-radius: var(--r-m); position: relative; overflow: hidden;
  background: linear-gradient(120deg, #EAF7F0, #F5FBF7 58%, #FFF8EA); box-shadow: var(--shadow-s); }
.eco-strip h3 { font-size: 15px; display: flex; align-items: center; gap: 6px; color: var(--brand-deep); }
.eco-strip .row3 { display: flex; gap: 8px; margin-top: 10px; }
.eco-strip .it { flex: 1; background: rgba(255,255,255,.78); border-radius: 8px; padding: 9px 6px; text-align: center;
  border: 0; font: inherit; color: inherit; cursor: pointer; position: relative; transition: background .15s, transform .12s; }
.eco-strip .it:active { transform: scale(.975); background: #fff; }
.eco-strip .it svg { position: absolute; right: 5px; top: 6px; opacity: .32; }
.eco-strip .it b { display: block; font-size: 15px; color: var(--brand-deep); }
.eco-strip .it span { font-size: 10.5px; color: var(--ink-3); }
.eco-strip .birdfly { position: absolute; right: 10px; top: 8px; width: 42px; height: 42px; opacity: .5; }
[data-theme="dark"] .eco-strip { background: linear-gradient(120deg, #16281F, #1B2A22 58%, #2A2418); }
[data-theme="dark"] .eco-strip .it { background: rgba(255,255,255,.06); }
[data-theme="dark"] .eco-strip .it b { color: #7BD8A8; }
.leaf-decor { position: absolute; width: 54px; height: 54px; right: 4px; bottom: 2px; color: var(--brand); pointer-events: none; }
.daycard { position: relative; overflow: hidden; }
.stats { position: relative; overflow: hidden; }

/* ===================== 变量补齐（历史遗留：这几个名字在样式表里没定义过） ===================== */
:root {
  --surface-2: #F1F2F5;        /* 头像/缩略图占位底色 */
  --lime: #A8E063;             /* 强调用青柠绿（夜间模式可读性由主题块覆盖） */
  --lime-deep: #4E8C1B;
  --coral: #D8232A;            /* 警示红，与 --hot 同色，供内联样式复用 */
}
[data-theme="dark"] {
  --surface-2: #2A2A2A;
  --lime: #A8E063;
  --lime-deep: #7BC055;
  --coral: #FF6B6B;
}

/* ===================== 顶部状态横条（离线 / 有新版本） ===================== */
.netbar { position: fixed; left: 0; right: 0; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; padding-top: calc(9px + env(safe-area-inset-top)); font-size: 12.5px; font-weight: 600;
  background: #3B4252; color: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.18); }
.netbar[hidden] { display: none; }
.netbar .dot { width: 7px; height: 7px; border-radius: 50%; background: #FFB84D; flex: none; }
.netbar[data-tone="update"] { background: var(--brand); }
.netbar[data-tone="update"] .dot { background: #C8F07A; }
.netbar-btn { margin-left: auto; flex: none; height: 26px; padding: 0 12px; border-radius: 13px;
  background: rgba(255,255,255,.22); color: #fff; font-size: 12px; font-weight: 700; }
.netbar-btn:active { background: rgba(255,255,255,.34); }

/* ===================== 圆形得分环 ===================== */
.ring { --p: 0; width: 116px; height: 116px; margin: 6px auto 0; border-radius: 50%; flex: none;
  display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--line-2) 0); }
.ring::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--card); }
.ring b { position: relative; z-index: 1; font-size: 32px; font-weight: 800; letter-spacing: -.5px; line-height: 1; }
.ring span { position: relative; z-index: 1; font-size: 11.5px; color: var(--ink-3); }
.ring.small { width: 84px; height: 84px; margin: 0; }
.ring.small::after { inset: 7px; }
.ring.small b { font-size: 23px; }

/* ===================== 辨识挑战 ===================== */
.qprog { height: 6px; border-radius: 3px; background: var(--line); margin-top: 12px; overflow: hidden; }
.qprog i { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .3s ease; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; padding: 13px 14px;
  border: 1.5px solid var(--line-2); border-radius: var(--r-m); background: var(--card); transition: all .15s; }
.opt .k { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--bg); font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
.opt .t { font-size: 14.5px; line-height: 1.5; }
.opt:not([disabled]):active { border-color: var(--brand); background: var(--brand-soft); }
.opt.ok { border-color: var(--brand); background: var(--brand-soft); }
.opt.ok .k { background: var(--brand); color: #fff; }
.opt.bad { border-color: var(--coral); background: rgba(216,35,42,.07); }
.opt.bad .k { background: var(--coral); color: #fff; }
.opt.dim { opacity: .5; }
.opt[disabled] { cursor: default; }
.expl { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-m); background: var(--bg); border-left: 3px solid var(--brand); }
.expl b { font-size: 14px; color: var(--brand-deep); }
.expl.bad { border-left-color: var(--coral); }
.expl.bad b { color: var(--coral); }
[data-theme="dark"] .expl b { color: var(--brand); }
[data-theme="dark"] .expl.bad b { color: var(--coral); }

/* ===================== 成就徽章 ===================== */
.agrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 12px; }
.ach { background: var(--card); border-radius: var(--r-m); box-shadow: var(--shadow-s); padding: 12px 8px 10px;
  text-align: center; position: relative; overflow: hidden; }
.ach .aico { width: 46px; height: 46px; margin: 0 auto 7px; filter: grayscale(1); opacity: .42; }
.ach.on .aico { filter: none; opacity: 1; }
.ach b { font-size: 12.5px; display: block; line-height: 1.35; }
.ach .tiny { margin-top: 3px; font-size: 10.5px; }
.ach.on { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--brand-soft); }
.ach .aprog { height: 4px; border-radius: 2px; background: var(--line); margin-top: 7px; overflow: hidden; }
.ach .aprog i { display: block; height: 100%; background: var(--brand); border-radius: 2px; }
.ach.on .aprog i { background: var(--brand); }

/* ===================== 声纹采集 ===================== */
.recbox { display: flex; align-items: center; gap: 14px; }
.recbtn { width: 62px; height: 62px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); border: 2px solid var(--brand); transition: all .2s; }
.recbtn.on { background: var(--coral); color: #fff; border-color: var(--coral); animation: recpulse 1.4s infinite; }
@keyframes recpulse { 0%,100% { box-shadow: 0 0 0 0 rgba(216,35,42,.42); } 50% { box-shadow: 0 0 0 12px rgba(216,35,42,0); } }
.recwave { display: flex; align-items: flex-end; gap: 3px; height: 20px; margin-top: 8px; }
.recwave i { width: 3px; height: 5px; border-radius: 2px; background: var(--coral); animation: wv .8s infinite ease-in-out; }

/* ===================== 补充的按钮状态 ===================== */
.btn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.iconbtn.on { color: var(--coral); }
.iconbtn.on svg { fill: currentColor; }
audio { height: 38px; border-radius: var(--r-s); }
img[data-bad] { background: var(--surface-2); }
img[data-bad]::after { content: ''; }

/* =============================================================================
   本轮补充修正
   ============================================================================= */

/* 通用头像容器。
   原来只定义了 `.post .head .ava`，评论区的头像用的是光秃秃的 `.ava`——
   没有圆角、没有 overflow:hidden，图片直接溢出把旁边的文字压住了。 */
.ava {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  background: var(--bg); flex: none; display: grid; place-items: center;
}
.ava img { width: 100%; height: 100%; object-fit: cover; }

/* 返回键：去掉「按下 / 点过之后残留的灰圈」。
   · 触屏上 :hover / :active 很容易粘住不恢复，所以显式给回默认值并加过渡；
   · 点击后的焦点框只留给键盘导航（:focus-visible），鼠标/触摸不画。 */
.backfab { transition: background .18s ease, box-shadow .18s ease; }
.backfab:focus { outline: none; }
.backfab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: none) {
  .backfab:hover { background: rgba(0, 0, 0, .44); }
  .backfab:active { background: rgba(0, 0, 0, .60); }
}
/* 文字页（没有压在照片上的那些）改成浅色款：
   深色圆底 + 阴影落在白底页面上就是一个突兀的「灰色圆圈」。 */
.backwrap.roomy .backfab {
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line-2); box-shadow: 0 1px 4px rgba(0, 0, 0, .07);
}
.backwrap.roomy .backfab:focus-visible { outline-color: var(--brand); }
@media (hover: none) {
  .backwrap.roomy .backfab:hover { background: var(--card); }
  .backwrap.roomy .backfab:active { background: var(--surface-2); }
}
[data-theme="dark"] .backwrap.roomy .backfab { box-shadow: none; }

/* 鸟博士面板打开时，底部的标签栏和悬浮按钮让位（否则会在面板下方多出一条、很乱） */
body.mascot-open #dock,
body.mascot-open .fab-record { display: none; }

/* 但**不能只靠上面那条规则**。
   #mascotLayer 原来的 z-index 是 20，而底部导航 .dock 是 25、悬浮记录按钮是 24 ——
   也就是说整个鸟博士层其实画在导航栏**下面**，只是靠 display:none 硬撑。
   只要那条规则因为任何原因没生效（老缓存里的旧 app.js、脚本异常中断、
   以后新增的某条打开路径忘了加类），导航栏就会直接盖在面板的输入框上。
   把这一层抬到导航之上，从结构上杜绝这个可能：
     悬浮球/面板(30) > 底部导航(25)、悬浮记录(24)
     仍然低于 sheet(40) 与 modal(50)，所以弹层、确认框照常盖住鸟博士。 */
#mascotLayer { z-index: 30; }

/* 面板打开时导航已隐藏，输入框底部再留一点呼吸位 + 手机安全区 */
.mascot-panel .chat-in { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }

/* 顶栏的管理员标识 */
.brand .role-tag {
  font-size: 10px; font-weight: 700; line-height: 1; padding: 4px 6px; border-radius: 6px;
  background: var(--brand); color: #fff; margin-left: 7px; vertical-align: 2px;
}
.brand .role-tag.admin { background: linear-gradient(135deg, #E8A33A, #C8871A); }

/* 登录页的顶栏更干净：只留品牌，不要搜索 / 主题 / 静音 / 头像 */
.topbar.minimal .tb-actions { display: none; }

/* =============================================================================
   流畅度优化
   ============================================================================= */

/* 1) 视图切换时内容淡入。
      原来是整块 innerHTML「啪」一下替换，视觉上很生硬；
      加一个 140ms 的轻微淡入，切换就顺很多（不给 prefers-reduced-motion 的用户加）。 */
.stage.fade-in > *:not(.backwrap) { animation: contentIn .14s ease-out; }
@keyframes contentIn { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .stage.fade-in > *:not(.backwrap) { animation: none; }
  .mascot-orb .halo { animation: none; }
}

/* 2) 去掉返回键的 backdrop-filter。
      它是个 sticky 元素，滚动时每一帧都要重新计算「背景模糊」——
      低端机上这是掉帧的常见来源。半透明深色底本身已经足够清晰。 */
.backfab { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* 3) 悬浮球：SVG 上的 drop-shadow 滤镜在滚动与动画时开销不小，
      换成挂在球容器上的圆形阴影（球本来就是圆的）。 */
.mascot-orb svg { filter: none; }
.mascot-orb { border-radius: 50%; box-shadow: 0 3px 10px rgba(0, 0, 0, .18); }

/* 4) 光晕是无限动画，明确提到合成层，别让它参与布局重算 */
.mascot-orb .halo { will-change: transform, opacity; }

/* 5) 点击反馈：按下时立刻有一点形变/变色，让人「感觉到点到了」。
      很多「卡顿」其实是「点了没反馈」造成的错觉。 */
.btn { transition: transform .1s ease, background .15s ease, opacity .15s ease; }
.btn:active { transform: scale(.975); }
.chip { transition: background .15s ease, transform .1s ease, color .15s ease; }
.chip:active { transform: scale(.955); }
.kk-item { transition: transform .1s ease; }
.kk-item:active { transform: scale(.94); }
.line:active { background: var(--surface-2); }
.iconbtn:active { opacity: .62; }
.ai:active { background: var(--surface-2); }

/* 6) 滚动容器：让浏览器知道这里会滚动，滚动条不占位、惯性更顺 */
.stage { scrollbar-gutter: stable; }

/* 动态里的照片：原来只有 max-height，图片加载完成前高度是 0，
   加载完会「撑开」把下面的内容顶下去 —— 列表里看着就是一次跳动。
   给个固定宽高比，先把位置占住。 */
.post .media img { aspect-ratio: 4 / 3; }

/* =============================================================================
   AI 模块（DeepSeek 接入）
   —— 两种模式要在界面上一眼可辨：增强模式用品牌绿，兜底模式用中性灰。
   ============================================================================= */

/* 引擎状态条：说明当前走哪条通路 + 离线演示开关 */
.ai-strip {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 12px; padding: 11px 12px; border-radius: var(--r-s);
  background: var(--card); border: 1px solid var(--line-2);
}
.ai-strip .ttl { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.ai-strip .sub { font-size: 11px; color: var(--ink-3); margin-top: 3px; line-height: 1.6; }
.ai-strip.on {
  border-color: rgba(122, 186, 40, .45);
  background: linear-gradient(135deg, rgba(168, 224, 99, .13), rgba(111, 211, 232, .08));
}
.ai-strip.on .ttl { color: var(--brand-deep); }

/* 模式徽章 */
.ai-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; line-height: 1.35;
  padding: 5px 9px; border-radius: 999px; border: 1px solid transparent;
  background: var(--surface-2); color: var(--ink-3); border-color: var(--line-2);
}
.ai-badge.on { background: rgba(168, 224, 99, .22); color: var(--brand-deep); border-color: rgba(122, 186, 40, .42); }

/* 「AI 增强 / 离线演示」切换开关 */
.ai-switch {
  flex: none; font-size: 11.5px; font-weight: 700; padding: 7px 11px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--bg); color: var(--ink-3);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ai-switch.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.ai-switch:active { transform: scale(.96); }

/* AI 识图结果卡：左侧品牌色竖条，和下面「配色参考」明显区分开 */
.ai-result { border-left: 3px solid var(--brand); }

/* 「鸟博士正在思考」的三个跳动点 */
.typing { display: inline-flex; gap: 3px; vertical-align: middle; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); opacity: .35; animation: typingDot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes typingDot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; opacity: .6; } }

/* =============================================================================
   鸟蛋挑战（限时闯关）
   ============================================================================= */

/* 生命值：三颗红爱心，一条命一颗；扣掉的心淡下去（不删掉，让人看见「还剩几条」） */
.lives { display: inline-flex; gap: 3px; align-items: center; vertical-align: -2px; }
.lives .lv { display: inline-flex; opacity: .22; color: #E4363C; }
.lives .lv.on { opacity: 1; }
.lives .lv.on svg { fill: currentColor; }

/* 倒计时：右上角数字 + 下方一条随时间收缩的进度条。
   数字用等宽数字，读秒时不会左右跳动。 */
.game-clock {
  font-size: 15px; font-weight: 800; color: var(--brand-deep);
  font-variant-numeric: tabular-nums; flex: none;
}
.game-time { height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 10px; }
.game-time i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--lime));
  transition: width 1s linear;      /* 每秒平滑收缩，而不是硬跳 */
}

/* 评论发送键：原来是一整块写「发送」的按钮，现在是一枚朝上箭头的小方键
   （和聊天气泡里那颗发送键形态一致）。 */
.btn.send-btn { width: 50px; flex: none; height: 44px; padding: 0; display: grid; place-items: center; }

/* 排行榜里「我」那一行 */
.line.me-rank { background: linear-gradient(90deg, rgba(168,224,99,.22), transparent); border-radius: var(--r-s); }

/* 名次徽记的最小宽度，避免个位数和两位数混排时抖动 */
.line .thumb.rank { font-size: 13px; font-variant-numeric: tabular-nums; }

/* =============================================================================
   管理后台（仅 role='admin'）
   —— 与面向观鸟者的页面刻意区分开：信息密度更高、卡片更紧凑，
      但沿用同一套颜色变量，深色主题下也保持一致。
   ============================================================================= */

/* 欢迎区 */
.ahello {
  display: flex; gap: 12px; align-items: center; padding: 15px 14px;
  border-radius: var(--r-s); margin: 6px 0 14px;
  background: linear-gradient(135deg, rgba(168, 224, 99, .30), rgba(111, 211, 232, .18));
}
.ahello .mascot-mini { width: 52px; flex: none; }
.ahello .hi { font-size: 15.5px; }
.ahello .hi b { font-size: 17px; }
.ahello .tiny { margin-top: 4px; line-height: 1.6; }

/* 数据卡：一屏四张（两列两行）
   注意：`gap` 只管**同一个 .astats 内部**的行列间距。
   以前管理首页把 8 张卡分成两次 adminStatCards() 调用，成了两个相邻的 .astats ——
   「声纹记录 / 观鸟视频」和「评论 / 举报总数」之间就贴成 0 间距，而组内是 10px，看着就是没对齐。
   正确做法是**一组卡片一次调用**（grid 自己排 4 行），下面这条 + 只作兜底。 */
.astats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.astats + .astats { margin-top: 10px; }
/* 可点击的数据卡：整块可点，右上角给一个小箭头暗示「可以点进去看明细」 */
.astats .acard.tap { cursor: pointer; }
.astats .acard.tap:active { transform: scale(.985); }
.astats .acard .hd .go { margin-left: auto; display: inline-flex; align-items: center; color: var(--ink-3); }
.astats .acard {
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--r-s); padding: 12px 12px 11px;
}
.astats .acard .hd { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-3); }
.astats .acard b {
  display: block; font-size: 23px; line-height: 1.2; margin-top: 7px;
  font-variant-numeric: tabular-nums;   /* 数字等宽，几个卡并排时不会左右跳 */
}
.astats .acard .tiny { margin-top: 3px; line-height: 1.5; }
.astats .acard.warn { border-color: rgba(232, 163, 58, .48); background: rgba(232, 163, 58, .09); }

/* ---- 管理首页的数据可视化（零依赖：柱状图 / 横向条 / 环形图都用 CSS + 内联 SVG 画）---- */
.viz-card { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 13px 13px 11px; }
.viz-legend { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--ink-3); margin-bottom: 10px; }
.viz-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.viz-card .b1 { background: var(--brand); }
.viz-card .b2 { background: var(--lime-deep); }
.viz-card .b3 { background: #C8871A; }
.viz-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.viz-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.viz-stack { display: flex; align-items: flex-end; justify-content: center; gap: 2px; height: 66px; width: 100%; }
.viz-stack i { width: 5px; min-height: 2px; border-radius: 2px 2px 0 0; display: block; }
.viz-col > span { font-size: 10px; color: var(--ink-4); }
.viz-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.viz-row .k { width: 66px; flex: none; font-size: 12.5px; color: var(--ink-2); }
.viz-row .track { flex: 1; height: 8px; border-radius: 4px; background: var(--bg); overflow: hidden; }
.viz-row .track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--lime), var(--brand)); }
.viz-row b { width: 44px; flex: none; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.viz-row.tap { cursor: pointer; }
.viz-row.tap:active { opacity: .72; }
.viz-donut-wrap { display: flex; align-items: center; gap: 14px; }
.viz-donut { width: 88px; height: 88px; flex: none; }
.viz-donut text { font-size: 7.5px; fill: var(--ink); font-weight: 700; text-anchor: middle; }

/* 筛选标签条（横向可滑） */
.atabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; }
.atabs button {
  flex: none; height: 34px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--ink-3);
  font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px;
  transition: background .15s ease, color .15s ease, transform .1s ease;
}
.atabs button i { font-style: normal; font-size: 11px; opacity: .7; }
.atabs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.atabs button.on i { opacity: .9; }
.atabs button:active { transform: scale(.96); }

/* 搜索框 */
.asearch {
  display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--r-s); margin-bottom: 10px; color: var(--ink-3);
}
.asearch .input { flex: 1; height: 42px; border: none; background: transparent; padding: 0; }

/* 管理端列表行 */
.arow {
  display: flex; gap: 11px; align-items: center; padding: 11px; margin-bottom: 9px;
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-s);
}
.arow .thumb { width: 58px; height: 58px; border-radius: 10px; overflow: hidden; background: var(--surface-2); flex: none; }
.arow .thumb img { width: 100%; height: 100%; object-fit: cover; }
.arow.banned { opacity: .74; border-color: rgba(232, 99, 99, .35); }
.acts-col { display: flex; flex-direction: column; gap: 6px; flex: none; }
.acts-col .iconbtn { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); }
.iconbtn.danger { color: var(--coral); }

/* 待办清单 */
.atodo { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 2px 12px; }
.atodo > .row { padding: 11px 0; border-bottom: 1px dashed var(--line-2); }
.atodo > .row:last-child { border-bottom: none; }
.atodo .ico {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; background: var(--surface-2); color: var(--brand-deep);
}

/* 系统管理菜单 */
.amenu { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-s); overflow: hidden; }
.amenu button {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 13px 12px; text-align: left;
  background: transparent; border-bottom: 1px solid var(--line-2); color: var(--ink);
}
.amenu button:last-child { border-bottom: none; }
.amenu button:active { background: var(--surface-2); }
.amenu button .mi {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center; background: var(--surface-2); color: var(--brand-deep);
}
.amenu button b { display: block; font-size: 14px; }
.amenu button .tiny { display: block; margin-top: 2px; line-height: 1.5; }

/* 管理页标题 */
.ahead { display: flex; gap: 10px; align-items: center; margin: 6px 0 14px; }
.ahead h2 { font-size: 18px; }
.ahead .tiny { margin-top: 3px; line-height: 1.6; }

/* 登录页的演示账号 */
.demo-acc { margin-top: 18px; }
.demo-acc .hd {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; font-weight: 700; color: var(--ink-3); margin-bottom: 8px;
}
.demo-acc button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 11px 12px; margin-bottom: 8px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--r-s);
}
.demo-acc button:active { background: var(--surface-2); }
.demo-acc button b { display: block; font-size: 13.5px; }
.demo-acc button .tiny { display: block; margin-top: 2px; line-height: 1.5; }
.tag.admin-tag { background: linear-gradient(135deg, #E8A33A, #C8871A); color: #fff; border-color: transparent; }
