/* ============================================================
   components.css — 三页共用的组件样式
   site-header / site-footer / button / tag / breed-card /
   section-head / section-icon / toc / toolbar
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 18px;
  background: var(--olive-deep);
  color: #fdf9ee;
  border-radius: 0 0 var(--r-xs) 0;
}
.skip-link:focus { left: 0; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

/* ---------------- 站头 ---------------- */
.site-header {
  position: relative;
  z-index: 20;
  height: var(--h-header);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--olive);
}
.logo-mark svg { width: 30px; height: 30px; }

.site-nav { margin-left: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-link {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--r-xs);
  font-size: 15.5px;
  color: var(--ink-2);
  white-space: nowrap;
  transition: color .18s ease, background-color .18s ease;
}
.nav-link:hover { color: var(--olive-deep); background: var(--olive-soft); }
.nav-link[aria-current="page"] { color: var(--ink); font-weight: 700; }
.nav-link[aria-current="page"]::after {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  margin: 5px auto 0;
  background: var(--olive);
  border-radius: 2px;
}

.header-search {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--ink-2);
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn--sand { background: var(--sand-2); border-color: #ded4ae; color: var(--olive-deep); }
.btn--sand:hover { background: var(--sand-2); }
.btn--solid { background: var(--olive); color: #fdf9ee; }
.btn--solid:hover { background: var(--olive-deep); }
.btn--ghost { background: transparent; border-color: rgba(69, 82, 36, .45); color: var(--olive-deep); }
.btn--ghost:hover { background: rgba(104, 120, 58, .12); }
.btn--text {
  padding: 0;
  border: 0;
  background: none;
  color: var(--olive-deep);
  font-weight: 600;
}
.btn--text:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------------- 分区标题 ---------------- */
.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}
.section-head__title {
  margin: 0;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink);
}
.section-head__aside { margin-left: auto; }

.section-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--olive-soft);
  color: var(--olive);
}
.section-icon svg { width: 17px; height: 17px; }

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  background: var(--olive-soft);
  color: var(--olive-deep);
  font-size: 12.5px;
  line-height: 1.6;
}
.tag--sand { background: #f0e4c6; color: #6a5320; }
.tag--outline { background: transparent; border: 1px solid var(--line-strong); color: var(--ink-3); }

/* ---------------- 品种卡 ---------------- */
.breed-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.breed-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}
.breed-card__media {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--sand);
}
.breed-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.breed-card__body { padding: 8px 13px 0; }
.breed-card__title {
  margin: 0 0 5px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink);
}
.breed-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.breed-card { position: relative; }
.breed-card__desc {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.58;
  color: var(--ink-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.breed-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

/* ---------------- 页脚 ---------------- */
.site-footer {
  margin-top: 0;
  border-top: 1px solid var(--line);
  padding: 22px 0 16px;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: start;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; }
.footer-brand .logo-mark { width: 30px; height: 30px; }
.footer-tagline { margin: 8px 0 0; max-width: 420px; font-size: 14px; color: var(--ink-3); }
.footer-cols {
  display: grid;
  grid-template-columns: auto minmax(200px, 300px);
  gap: 24px 56px;
}
.footer-col-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-3);
}
.footer-links a:hover { color: var(--olive-deep); text-decoration: underline; text-underline-offset: 3px; }
.footer-note { margin: 0; font-size: 13px; line-height: 1.8; color: var(--ink-3); }
.footer-bottom {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ---------------- 移动端导航 ---------------- */
@media (max-width: 900px) {
  .site-header { height: auto; min-height: 66px; }
  .header-inner { padding-block: 12px; flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; }
  .header-search { display: none; }
  .site-nav {
    order: 3;
    flex: 1 0 100%;
    margin-left: 0;
    display: none;
    padding-top: 10px;
    border-top: 1px solid var(--line);
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { padding: 11px 10px; font-size: 16px; }
  .nav-link[aria-current="page"]::after { display: none; }
  .nav-link[aria-current="page"] { background: var(--olive-soft); }
  .footer-top { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ---------------- 工具类 ---------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 窄屏不做两行截断：卡片里必须是完整摘要 */
@media (max-width: 640px) {
  .breed-card__desc {
    display: block;
    overflow: visible;
  }
}

/* ============================================================
   内页组件（category.html / detail.html）
   面包屑 / 页头 / 筛选工具条 / 分页 / 正文排版 / 目录 / 相关推荐
   ============================================================ */

/* ---------------- 面包屑 ---------------- */
.crumbs {
  padding: 16px 0 0;
  font-size: var(--fs-xs);
  color: var(--ink-3);
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs li + li::before { content: "/"; color: var(--muted); }
.crumbs a { color: var(--ink-3); }
.crumbs a:hover { color: var(--olive-deep); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current="page"] { color: var(--ink-2); }

/* ---------------- 内页页头 ---------------- */
.page-hero { padding: 14px 0 22px; border-bottom: 1px solid var(--line); }
.page-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
}
.page-hero__title {
  margin: 0 0 10px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-h1-inner);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.page-hero__lead { margin: 0; max-width: 640px; font-size: var(--fs-base); line-height: 1.8; color: var(--ink-2); }
.page-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------------- 筛选工具条 ---------------- */
.list-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  padding: 14px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.toolbar-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.toolbar-label { font-size: var(--fs-xs); color: var(--ink-3); }
.filter-btn {
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-2);
  font-size: var(--fs-sm);
  line-height: 1.6;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.filter-btn:hover { border-color: var(--olive); color: var(--olive-deep); }
.filter-btn.is-active { background: var(--olive); border-color: var(--olive); color: var(--ink-invert); }
.toolbar-meta { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.result-count { font-size: var(--fs-sm); color: var(--ink-3); }
.sort-select {
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-size: var(--fs-sm);
  cursor: pointer;
}
.sort-select:focus-visible { outline: 2px solid var(--olive); outline-offset: 2px; }

/* ---------------- 列表页网格与空状态 ---------------- */
.list-section { padding: 22px 0 26px; }
.breed-grid--list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.empty-state {
  margin: 18px 0 0;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
  text-align: center;
  font-size: var(--fs-base);
  color: var(--ink-3);
}

/* ---------------- 列表说明 ---------------- */
.list-description {
  padding: 24px 0 26px;
  border-top: 1px solid var(--line);
}
.list-description__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.list-description__title {
  margin: 0;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--ink);
}
.list-description p { margin: 0 0 12px; font-size: var(--fs-base); line-height: 1.9; color: var(--ink-2); }
.list-description p:last-child { margin-bottom: 0; }

/* ---------------- 下一站推荐 ---------------- */
.next-read { padding: 6px 0 30px; }
.next-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.next-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.next-card:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.next-card__media {
  flex: 0 0 auto;
  width: 92px;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--sand);
}
.next-card__media img { width: 100%; height: 100%; object-fit: cover; }
.next-card__title { display: block; margin: 0 0 4px; font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-size: var(--fs-h3); font-weight: 700; color: var(--ink); }
.next-card__desc { display: block; margin: 0; font-size: var(--fs-sm); line-height: 1.6; color: var(--ink-3); }

/* ---------------- 详情页 ---------------- */
.article-wrap {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 300px;
  gap: 44px;
  align-items: start;
  padding: 26px 0 34px;
}
.article-head { padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.article-head__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.85fr);
  gap: 36px;
  align-items: start;
}
.article-title {
  margin: 0 0 10px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-h1-inner);
  font-weight: 700;
  line-height: 1.22;
  color: var(--ink);
}
.article-lead { margin: 0; font-size: var(--fs-base); line-height: 1.85; color: var(--ink-2); }
.article-figure { margin: 0; border-radius: var(--r); overflow: hidden; background: var(--sand); }
.article-figure img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; max-height: 300px; }
.article-figure figcaption { padding: 8px 12px 0; font-size: var(--fs-xs); color: var(--ink-3); }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.spec-item {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
}
.spec-item__label { display: block; font-size: var(--fs-cap); color: var(--ink-3); }
.spec-item__value { display: block; margin-top: 2px; font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-size: 17px; font-weight: 700; color: var(--ink); }

/* 目录 */
.article-toc {
  position: sticky;
  top: 24px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}
.article-toc__title { margin: 0 0 8px; font-size: var(--fs-xs); letter-spacing: .08em; color: var(--ink-3); }
.article-toc ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.article-toc a {
  display: block;
  padding: 5px 8px;
  border-radius: var(--r-xs);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.article-toc a:hover { background: var(--olive-soft); color: var(--olive-deep); }
.article-toc a.is-active { background: var(--olive-soft); color: var(--olive-deep); font-weight: 700; }
.toc-toggle { display: none; }

/* 正文 */
.article-body { min-width: 0; }
.article-body > p.intro { margin: 0 0 18px; font-size: var(--fs-base); line-height: 1.9; color: var(--ink-2); }
.article-body section { margin-bottom: 28px; scroll-margin-top: 20px; }
.article-body h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 10px;
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}
.article-body h2 .h2-index {
  font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--olive);
}
.article-body p { margin: 0; font-size: var(--fs-md); line-height: 1.95; color: var(--ink-2); }

/* 侧栏 */
.article-aside { display: grid; gap: 16px; position: sticky; top: 24px; }
.aside-card {
  padding: 16px 18px;
  background: var(--sand);
  border-radius: var(--r);
}
.aside-card__title { margin: 0 0 8px; font-family:'PingFang SC','Microsoft YaHei','Noto Sans SC',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif; font-size: 17px; font-weight: 700; color: var(--ink); }
.aside-card p { margin: 0 0 10px; font-size: var(--fs-sm); line-height: 1.75; color: var(--ink-2); }
.aside-links { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.aside-links a { font-size: var(--fs-sm); color: var(--olive-deep); }
.aside-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 相关推荐 */
.related { padding: 26px 0 32px; border-top: 1px solid var(--line); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------------- 内页响应式 ---------------- */
@media (max-width: 1180px) {
  .article-wrap { grid-template-columns: 200px minmax(0, 1fr); gap: 28px; }
  .article-aside { position: static; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .breed-grid--list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .next-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .page-hero__inner { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .page-hero__title { font-size: 30px; }
  .toolbar-meta { margin-left: 0; width: 100%; justify-content: space-between; }
  .article-wrap { grid-template-columns: 1fr; padding-top: 18px; }
  .article-head__grid { grid-template-columns: 1fr; gap: 18px; }
  .article-aside { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-toc { position: static; }
  .related-grid { grid-template-columns: 1fr; }
  .list-description__inner { grid-template-columns: 1fr; gap: 14px; }
  .list-description p { font-size: var(--fs-base); }
  .breed-grid--list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .article-body h2 { font-size: 21px; }
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .next-card__media { width: 72px; }
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

/* 列表页：li 作为网格单元，article 撑满格高 */
.list-item { display: block; height: 100%; scroll-margin-top: 76px; }
.list-item > .breed-card { height: 100%; }

/* 标签点击等价于聚焦对应控件：给指针反馈 */
label.toolbar-label[for] { cursor: pointer; }

/* hidden 属性优先于组件自身的 display（筛选用它隐藏卡片） */
[hidden] { display: none !important; }

/* ── 数据对接补充（2026-11-13） ─────────────── */
/* 分页（列表页服务端分页） */
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0 6px;
  font-size: var(--fs-sm);
}
.pager a,
.pager span {
  min-width: 36px;
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  background: var(--surface);
  color: var(--ink);
  line-height: 1;
}
.pager a:hover { border-color: var(--olive); color: var(--olive-deep); }
.pager .pager-current {
  background: var(--olive);
  border-color: var(--olive);
  color: var(--ink-invert);
  font-weight: 700;
}
.pager .pager-dots { border: 0; background: none; color: var(--ink-3); }
.pager .pager-info {
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: var(--fs-xs);
  padding: 0 4px;
}

/* 筛选条改成服务端链接后，a 需要按按钮外观渲染 */
a.filter-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* 卡片媒体位若包了 <a>，需 block 才能撑满 */
.breed-card__media > a { display: block; width: 100%; height: 100%; }

/* 卡片标题/摘要截断，保证等高 */
.breed-card__title {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}
.breed-card__desc {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}
.category-card__desc {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}

/* 正文配图 */
.article-body .article-figure { margin: 20px 0; }
.article-body .article-figure img {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--r-sm);
}

/* 自定义目录时，正文占满右栏 */
.article-wrap--no-toc { grid-template-columns: minmax(0, 1fr) 300px; }

/* 页脚 ICP 链接 */
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1180px) {
  .article-wrap--no-toc { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .article-wrap--no-toc { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pager { gap: 6px; font-size: var(--fs-xs); }
  .pager a, .pager span { min-width: 32px; padding: 0 9px; }
  .pager .pager-info { width: 100%; padding: 6px 0 0; }
}
