/* ============================================================
   AlyCMS 前台样式（新版）
   主色与后台保持一致：#07c160（微信绿）
   布局：顶部通栏（LOGO+标题+菜单） / 左侧分类树 / 右侧主内容 / 页脚
   ============================================================ */

:root {
  --green: #07c160;
  --green-dark: #06ad56;
  --green-deep: #04914a;
  --green-bg: #e9f9f0;
  --green-bg-soft: #f3fbf7;
  --ink: #17251d;
  --ink-2: #40514a;
  --muted: #7b8a83;
  --line: #e4ebe7;
  --card: #ffffff;
  --page: #f5f8f6;
  --page-outer: #edf3ef;
  --bg: #e9edf5;        /* 框架外壳底色（与 pagex 一致） */
  --content-bg: #f4f6fb; /* 内容区底色（pagex .content 背景） */
  --hd-h: 60px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(23, 37, 29, 0.04), 0 8px 24px rgba(23, 37, 29, 0.06);
  --shadow-lg: 0 2px 6px rgba(23, 37, 29, 0.06), 0 16px 40px rgba(23, 37, 29, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

/* ============ 全局滚动条美化 ============ */
/* Chromium / Edge / Safari：自定义细圆角滚动条 */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(23, 37, 29, 0.18);
  border: 3px solid transparent; /* 透明边框 + padding-box：滑块更细、两侧留白 */
  border-radius: 999px;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(23, 37, 29, 0.34);
}

/* 主内容区 / 侧栏滚动条悬停时显示主题绿 */
.site-main::-webkit-scrollbar-thumb:hover,
.site-side::-webkit-scrollbar-thumb:hover {
  background-color: rgba(7, 193, 96, 0.55);
}

::-webkit-scrollbar-corner,
::-webkit-scrollbar-track-piece {
  background: transparent;
}

/* Firefox：只能用标准属性（放在 @supports 中，避免覆盖 Chromium 的 ::-webkit-scrollbar） */
@supports not selector(::-webkit-scrollbar) {
  * {
    scrollbar-width: thin;
    scrollbar-color: rgba(23, 37, 29, 0.24) transparent;
  }
}


body.site {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* ============ 应用外壳（照搬 pagex 框架）：100vh 满高 + 居中 1360 框 + 满宽顶栏 + 行布局（侧栏固定 / 内容内部滚动） ============ */
.site-page {
  position: relative; /* FAB 锚定到框架右下角 */
  height: 100vh;
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  box-shadow: 0 0 60px #14285014;
}

/* ============ 顶部通栏（固定框架顶部，占满框宽） ============ */
.site-header {
  flex: 0 0 60px;
  height: 60px; /* 显式高度：窄屏切换为文档流后 flex-basis 失效，仍保持顶栏高度 */
  z-index: 20;
  background: #fff;
  box-shadow: 0 1px #1428500f;
}

.hd-inner {
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  overflow: hidden;
}

.brand-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }

.brand-text {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--ink);
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }

.nav-link {
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover { color: var(--green-deep); background: var(--green-bg-soft); }

.nav-link.is-active {
  color: #fff;
  background: var(--green);
  font-weight: 500;
}

.hd-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }

.hd-search {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.hd-search:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(7, 193, 96, 0.12); }

.hd-search svg { width: 15px; height: 15px; fill: currentColor; flex: none; }

.hd-search input {
  border: none;
  outline: none;
  width: 130px;
  font-size: 13px;
  color: var(--ink);
  background: transparent;
}

.menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-btn svg { width: 19px; height: 19px; fill: var(--ink-2); }

/* ============ 主体行：填满框架剩余高度，左侧栏固定、右侧内容独立滚动 ============ */
.site-body {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
}

/* ---- 左侧分类树（固定框架：占满框架高度，分类常驻，自身可滚动） ---- */
.site-side {
  width: 232px;
  flex: 0 0 232px;
  overflow: auto;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 14px 12px 24px;
}

/* （side-head「文章分类」小标题已移除） */

.side-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.side-link:hover { background: var(--green-bg-soft); color: var(--green-deep); }

.side-link.is-active { background: var(--green-bg); color: var(--green-deep); font-weight: 600; }

.side-link.lv1 { font-weight: 500; color: var(--ink); }

.side-caret {
  margin-left: auto;
  width: 16px;
  height: 16px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: transform 0.18s;
}

.side-caret svg { width: 12px; height: 12px; fill: currentColor; }

.side-group.open > .side-link .side-caret { transform: rotate(90deg); }

.side-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.side-count {
  flex: none;
  font-size: 11px;
  color: var(--muted);
  background: var(--page);
  border-radius: 999px;
  padding: 0 7px;
  line-height: 18px;
}

.side-link.is-active .side-count { background: rgba(7, 193, 96, 0.16); color: var(--green-deep); }

.side-sub { display: none; padding-left: 14px; margin-left: 8px; border-left: 1px dashed var(--line); }

.side-group.open > .side-sub { display: block; }

.side-link.lv2 { font-size: 13px; padding: 6px 10px; }

.side-all { margin-bottom: 6px; }

/* ---- 右侧主内容（页脚置于本列末尾；本列在框架内独立滚动） ---- */
.site-main {
  flex: 1;
  min-width: 0;
  overflow: auto;
  background: var(--content-bg);
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
}

/* ============ 首页 Hero（精简：标题 + 搜索 + 统计） ============ */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, #0bbf6a 100%);
  border-radius: 16px;
  color: #fff;
  padding: 20px 36px 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.hero-title { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: 1px; line-height: 1.3; }

.hero-search {
  margin: 18px auto 0;
  max-width: 520px;
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 999px;
  padding: 3px 5px 3px 16px;
  box-shadow: 0 8px 24px rgba(4, 80, 44, 0.18);
}

.hero-search svg { width: 17px; height: 17px; fill: var(--muted); flex: none; }

.hero-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 8px 10px;
  color: var(--ink);
  background: transparent;
}

.hero-search button {
  flex: none;
  border: none;
  cursor: pointer;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  padding: 8px 22px;
  border-radius: 999px;
  transition: background 0.15s;
}

.hero-search button:hover { background: var(--green-dark); }

/* ============ 版块 ============ */
.sec { margin-top: 34px; }

.sec-head {
  display: flex;
  align-items: center; /* 副标题与标题垂直居中对齐 */
  gap: 12px;
  margin-bottom: 14px;
}

.sec-title { margin: 0; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }

.sec-title::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--green);
}

.sec-sub { font-size: 12.5px; color: var(--muted); }

.sec-more { margin-left: auto; font-size: 13px; color: var(--green-deep); }
.sec-more:hover { text-decoration: underline; }

/* ---- 友情链接（仅首页） ---- */
.sec-links { margin-bottom: 8px; }
.link-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.flink {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  font-size: 13.5px;
  color: var(--text);
  background: var(--card, #fff);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.flink:hover {
  color: var(--green-deep, #1a7f4b);
  border-color: var(--green, #2ba36b);
  box-shadow: 0 2px 8px rgba(43, 163, 107, .12);
}

/* ---- 文章列表（最新文章 / 列表页 / 搜索页共用） ---- */
.post-list { display: flex; flex-direction: column; gap: 12px; }

.post-item {
  display: flex;
  gap: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
}

.post-item:hover { box-shadow: var(--shadow-lg); border-color: #cdebd9; transform: translateY(-1px); }

.post-cover {
  width: 172px;
  height: 108px;
  flex: none;
  border-radius: 9px;
  overflow: hidden;
  background: var(--green-bg-soft);
}

.post-cover img { width: 100%; height: 100%; object-fit: cover; }

.post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* 标题行用 flex 居中，保证「排名角标 + 标题文字」垂直居中对齐，文字单行省略 */
.post-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.post-title > a {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.post-item:hover .post-title { color: var(--green-deep); }

.post-excerpt {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.post-meta .chip {
  color: var(--green-deep);
  background: var(--green-bg);
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 12px;
}

.post-meta .pm { display: inline-flex; align-items: center; gap: 4px; }

.post-meta svg { width: 13px; height: 13px; fill: currentColor; }

/* ---- 图文推荐（仅封面图 + 标题） ---- */
.rec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.rec-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.18s;
  display: flex;
  flex-direction: column;
}

.rec-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.rec-cover { aspect-ratio: 4 / 3; background: var(--green-bg-soft); overflow: hidden; }

.rec-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.rec-card:hover .rec-cover img { transform: scale(1.04); }

.rec-body { padding: 9px 12px 11px; }

/* 标题强制单行：超出隐藏并显示省略号，卡片高度整齐一致 */
.rec-title {
  display: block;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-card:hover .rec-title { color: var(--green-deep); }

/* ---- 列表排名角标（热门文章复用最新文章列表样式） ---- */
.post-cover { position: relative; }

.post-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 7px;
  background: rgba(23, 37, 29, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.post-rank.is-top { background: var(--green); }

/* 无封面文章的排名：标题行前置小方块（与标题文字同一 flex 行，垂直居中） */
.post-rank-inline {
  flex: none;
  min-width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 7px;
  background: var(--page);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.post-rank-inline.is-top { background: var(--green); color: #fff; }

/* ---- 空状态 ---- */
.empty {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
  padding: 56px 20px;
  color: var(--muted);
}

.empty-ico { width: 44px; height: 44px; fill: #c7d4ce; margin: 0 auto 10px; }

.empty-title { margin: 0 0 4px; font-size: 15px; color: var(--ink-2); font-weight: 500; }

.empty-desc { margin: 0; font-size: 13px; }

/* ---- 分页 ---- */
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; }

.pg {
  min-width: 76px;
  text-align: center;
  padding: 8px 16px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.pg:hover:not(.is-off) { border-color: var(--green); color: var(--green-deep); }

.pg.is-off { opacity: 0.45; cursor: default; }

.pg-info { font-size: 13px; color: var(--muted); }

/* ============ 文章详情页 ============ */
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }

.crumb a:hover { color: var(--green-deep); }

.crumb .sep { color: #c3cec9; }

/* 面包屑末项（文章标题）过长时单行省略，避免撑破布局 */
.crumb > :last-child { min-width: 0; max-width: min(60vw, 520px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.article-card {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 36px 44px 30px;
}

.post-head { border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 24px; }

.post-h1 { margin: 12px 0 10px; font-size: 26px; font-weight: 600; line-height: 1.45; }

.post-info { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }

.post-info .pm { display: inline-flex; align-items: center; gap: 5px; }

.post-info svg { width: 14px; height: 14px; fill: currentColor; }

.post-cover-fig { margin: 18px 0 0; border-radius: 12px; overflow: hidden; }

.post-cover-fig img { width: 100%; max-height: 420px; object-fit: cover; }

/* 正文：复用后台已排版的 HTML（含主题样式），宽度自适应、有最大阅读宽度 */
.post-body { font-size: 15px; line-height: 1.85; color: var(--ink); word-break: break-word; }

.post-body img { max-width: 100%; height: auto; border-radius: 8px; }

.post-body pre { overflow-x: auto; }

.post-foot { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; align-items: center; }

.back-top { margin-left: auto; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.back-top:hover { color: var(--green-deep); }
.back-top svg { width: 14px; height: 14px; fill: currentColor; }

/* 上一篇 / 下一篇 */
.adj { display: flex; gap: 14px; margin-top: 16px; }

.adj-item {
  flex: 1;
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.adj-item:hover { border-color: var(--green); box-shadow: var(--shadow); }

.adj-item.is-off { opacity: 0.5; }

.adj-label { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.adj-label svg { width: 13px; height: 13px; fill: currentColor; }

.adj-item.is-next .adj-label { justify-content: flex-end; }

.adj-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.adj-item.is-next .adj-title { text-align: right; }

/* 阅读进度条 */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 80; background: transparent; }
.progress span { display: block; height: 100%; width: 0; background: var(--green); }

/* ============ 搜索页 ============ */
.search-head {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
}

.search-head h1 { margin: 0; font-size: 20px; font-weight: 600; }

.search-head .kw { color: var(--green-deep); }

.search-head p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* ============ 404 ============ */
.nf { text-align: center; padding: 90px 20px; }

.nf-code { margin: 0; font-size: 64px; font-weight: 600; color: var(--green); line-height: 1; }

.nf-title { margin: 14px 0 6px; font-size: 18px; font-weight: 500; }

.nf-desc { margin: 0 0 24px; color: var(--muted); font-size: 13.5px; }

.nf-btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border-radius: 9px;
  padding: 9px 26px;
  font-size: 14px;
}

.nf-btn:hover { background: var(--green-dark); }

/* ============ 页脚（置于主内容列末尾，不添加背景色、不加分隔线、与正文零间隔） ============ */
.site-footer { margin-top: auto; border-top: 0; background: none; }

.ft-inner { padding: 20px 4px 4px; text-align: center; }

.ft-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }

.ft-brand .brand-mark { width: 28px; height: 28px; border-radius: 8px; }
.ft-brand .brand-mark img { width: 100%; height: 100%; }

.ft-links { margin: 12px 0 10px; display: flex; justify-content: center; gap: 6px 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }

.ft-links a:hover { color: var(--green-deep); }

.ft-legal { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 2; }

.ft-legal a { color: var(--muted); }
.ft-legal a:hover { color: var(--green-deep); text-decoration: underline; }

.ft-legal .dot { margin: 0 8px; color: #c3cec9; }

/* ============ 右侧悬浮按钮：在线客服 + 返回顶部（放在 1360 框架之外的右侧留白，不遮挡正文） ============ */
.fab-stack {
  position: fixed;
  left: auto;
  right: 8px;       /* 视口过窄、框架外放不下时贴视口右缘 */
  bottom: 32px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

/* 宽屏：按钮整体移到居中框架右侧留白区（框架半宽 680 + 间距 12），不压住正文 */
@media (min-width: 1480px) {
  .fab-stack { left: calc(50% + 692px); right: auto; }
}

.fab {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  box-shadow: 0 4px 16px rgba(23, 37, 29, 0.16);
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, color 0.16s;
}

.fab svg { width: 21px; height: 21px; fill: var(--ink-2); }

.fab:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.fab-kf svg { fill: var(--green); }

.fab-kf:hover, .fab-stack.panel-open .fab-kf { background: var(--green); }
.fab-kf:hover svg, .fab-stack.panel-open .fab-kf svg { fill: #fff; }

/* 返回顶部：滚动超过一屏才显示 */
.fab-top { opacity: 0; pointer-events: none; transform: translateY(8px); }

.fab-stack.scrolled .fab-top { opacity: 1; pointer-events: auto; transform: none; }

.fab-top:hover { background: var(--green); }
.fab-top:hover svg { fill: #fff; }

/* 客服面板 */
/* 客服面板：绝对定位在按钮左侧展开，避免把按钮撑到视口外 */
.fab-panel {
  position: absolute;
  right: calc(100% + 12px);
  bottom: 0;
  width: 232px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform-origin: bottom right;
  animation: fabPop 0.16s ease;
}

@keyframes fabPop {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.fab-panel-hd {
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--green) 0%, #0bbf6a 100%);
}

.fab-panel-bd { padding: 12px 14px 14px; }

.fab-contact {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 0 10px;
  text-align: left;
  padding: 9px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--green-bg-soft);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.fab-contact:hover { border-color: var(--green); background: var(--green-bg); }

.fab-contact-k { grid-column: 1; grid-row: 1; font-size: 12px; color: var(--muted); align-self: center; }
.fab-contact-v { grid-column: 2; grid-row: 1; font-size: 14px; font-weight: 600; color: var(--ink); }
.fab-contact-tip { grid-column: 2; grid-row: 2; font-size: 11px; color: var(--green-deep); }

.fab-note { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.fab-empty { margin: 4px 2px; font-size: 13px; color: var(--muted); line-height: 1.7; }

/* ============ 响应式 ============ */
@media (max-width: 1180px) {
  .hd-search input { width: 96px; }
  .site-side { width: 206px; flex: 0 0 206px; }
  .rec-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  /* 窄屏：退出应用外壳，恢复整页文档流（顶栏吸顶、内容随页面滚动） */
  body.site { height: auto; overflow: visible; }
  .site-page { max-width: none; box-shadow: none; height: auto; min-height: 100vh; display: block; overflow: visible; }

  .site-header { position: sticky; top: 0; height: 58px; flex: none; }
  .hd-inner { padding: 0 16px; gap: 14px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .brand-mark img { width: 100%; height: 100%; }
  .brand-text { font-size: 16px; }

  .site-nav { display: none; }
  .menu-btn { display: inline-flex; }
  .site-body { display: block; min-height: 0; overflow: visible; }
  .site-main { display: block; overflow: visible; padding: 16px 14px 28px; }

  /* 侧栏变为抽屉 */
  .site-side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 90;
    width: 264px;
    max-height: none;
    border-radius: 0 16px 16px 0;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-lg);
    padding-top: 18px;
  }

  body.nav-open .site-side { transform: translateX(0); }

  .nav-mask {
    position: fixed;
    inset: 0;
    z-index: 85;
    background: rgba(15, 26, 20, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
  }

  body.nav-open .nav-mask { opacity: 1; pointer-events: auto; }

  .hero { padding: 16px 18px 18px; }
  .hero-title { font-size: 20px; }
  .article-card { padding: 26px 22px 24px; }
  .post-h1 { font-size: 22px; }

  /* 悬浮按钮：移动端恢复视口固定、略缩小、贴近边缘 */
  .fab-stack { position: fixed; right: 12px; bottom: 16px; }
  .fab { width: 40px; height: 40px; }
  .fab svg { width: 19px; height: 19px; }
  .fab-panel { width: 216px; }
}

@media (max-width: 720px) {
  .hd-search { display: none; }
  .rec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-item { flex-direction: column; }
  .post-cover { width: 100%; height: 160px; }
  .adj { flex-direction: column; }
  .post-rank { top: 6px; left: 6px; }
}
