/* =============================================================
   宠仔 CHONGZAI — 前台样式
   设计令牌：中国红 + 米白 + 金；正文以浅色为主，红色只用于品牌与强调
   ============================================================= */

:root {
  --brand: #C82026;
  --brand-dark: #A71920;
  --brand-soft: #FBE9E7;
  --brand-tint: #FDF3F1;
  --bg: #FFF8F5;
  --bg-alt: #F2E9E3;
  --gold: #D5A35B;
  --gold-soft: #F7EDDC;
  --ink: #292524;
  --ink-2: #5C504A;
  --ink-3: #8B7C74;
  --line: #EADFD7;
  --line-strong: #DCCCC1;
  --white: #FFFFFF;
  --ok: #2F7A55;
  --warn: #A9601C;
  --danger: #B3261E;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(41, 37, 36, .05);
  --shadow: 0 14px 34px -22px rgba(97, 50, 34, .38);
  --shadow-lg: 0 26px 60px -30px rgba(97, 50, 34, .45);

  --font: "PingFang SC", "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-num: "SF Pro Display", "DIN Alternate", var(--font);

  --container: 1200px;
  --header-h: 72px;
}

*,
*::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: var(--font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.35em; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; }

:focus-visible {
  outline: 3px solid rgba(200, 32, 38, .45);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 10px;
  transition: top .2s;
}
.skip-link:focus { top: 0; color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  background: linear-gradient(90deg, #F7EDE7, #FBF3EE);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 38px; }
.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-left .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }
.topbar-left span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 14px; flex: none; }
.topbar-right a { color: var(--ink-2); }
.topbar-right a:hover { color: var(--brand); }

/* ---------------- 头部导航 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 252, 250, .96);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header.is-stuck { box-shadow: 0 10px 30px -24px rgba(80, 40, 24, .55); }
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img, .brand .logo-mark { width: 40px; height: 40px; border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: .02em; }
.brand-en { font-size: 10px; letter-spacing: .22em; color: var(--ink-3); font-weight: 600; }
.brand:hover .brand-name { color: var(--brand); }

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: 6px; }
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 10px 13px; border-radius: 10px;
  color: var(--ink); font-size: 15px; font-weight: 500; white-space: nowrap;
}
.nav-link:hover { background: var(--brand-tint); color: var(--brand); }
.nav-link .icon { width: 16px; height: 16px; opacity: .6; transition: transform .18s; }
.nav-item:hover > .nav-link,
.nav-item:focus-within > .nav-link,
.nav-item.is-open > .nav-link { color: var(--brand); background: var(--brand-tint); }
.nav-item:hover > .nav-link .icon,
.nav-item:focus-within > .nav-link .icon,
.nav-item.is-open > .nav-link .icon { transform: rotate(180deg); }
.nav-link.is-current { color: var(--brand); font-weight: 700; }
.nav-link.is-current::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px;
  height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--brand), var(--gold));
}
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 208px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s, transform .16s, visibility .16s;
}
.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-item.is-open .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown a {
  display: block; padding: 9px 12px; border-radius: 9px;
  color: var(--ink-2); font-size: 14.5px;
}
.nav-dropdown a:hover { background: var(--brand-tint); color: var(--brand); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }
.header-search { display: flex; align-items: center; background: #FBF4EF; border: 1px solid var(--line); border-radius: 999px; padding: 4px 4px 4px 14px; }
.header-search input {
  border: 0; background: transparent; width: 150px; height: 32px; color: var(--ink); outline: none;
}
.header-search input::placeholder { color: var(--ink-3); }
.header-search button {
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.header-search button:hover { background: var(--brand-dark); }
.header-search .icon { width: 17px; height: 17px; }
.menu-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  background: #fff; border-radius: 12px; color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-toggle .icon { width: 22px; height: 22px; }

/* ---------------- 移动端抽屉 ---------------- */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(33, 25, 21, .45);
  opacity: 0; visibility: hidden; transition: .2s; z-index: 100;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(86vw, 360px);
  background: #FFFCFA; z-index: 101; transform: translateX(100%);
  transition: transform .24s ease; display: flex; flex-direction: column;
  box-shadow: -20px 0 50px -30px rgba(0,0,0,.5);
}
body.drawer-open .drawer { transform: translateX(0); }
body.drawer-open .drawer-mask { opacity: 1; visibility: visible; }
body.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-close { width: 38px; height: 38px; border: 1px solid var(--line); background: #fff; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.drawer-body { padding: 12px 12px 24px; overflow-y: auto; flex: 1; }
.drawer-search { display: flex; gap: 8px; margin: 6px 6px 14px; }
.drawer-search input { flex: 1; height: 42px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; }
.drawer-search button { height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; cursor: pointer; }
.drawer-group { border-bottom: 1px solid var(--line); }
.drawer-link, .drawer-sub a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 12px; color: var(--ink); font-size: 16px; border-radius: 8px;
}
.drawer-link:hover, .drawer-sub a:hover { background: var(--brand-tint); color: var(--brand); }
.drawer-sub { padding: 0 0 8px 12px; }
.drawer-sub a { font-size: 14.5px; color: var(--ink-2); padding: 9px 12px; }
.drawer-foot { padding: 16px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3); }

/* ---------------- 通用按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font-size: 15px; font-weight: 600; cursor: pointer; transition: .16s;
  white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 22px -14px rgba(200, 32, 38, .8); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: #fff; border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft { background: var(--brand-tint); color: var(--brand); }
.btn-soft:hover { background: var(--brand-soft); color: var(--brand-dark); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  background:
    radial-gradient(900px 380px at 88% -10%, #FBEAE2 0%, rgba(251, 234, 226, 0) 60%),
    linear-gradient(168deg, #FFF8F5 0%, #FBF0E8 62%, #F8ECE3 100%);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto -10% -60% -10%; height: 240px;
  background: radial-gradient(closest-side, rgba(213, 163, 91, .18), transparent);
}
.hero-inner {
  display: grid; grid-template-columns: 1.08fr .92fr; gap: 40px; align-items: center;
  padding: 56px 0 64px; position: relative; z-index: 1;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid #F0DCCF; color: var(--brand);
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.hero-kicker .icon { width: 15px; height: 15px; }
.hero h1 {
  font-size: clamp(30px, 4.2vw, 46px); line-height: 1.28; margin: 18px 0 14px;
  letter-spacing: -.02em;
}
.hero h1 em {
  font-style: normal; color: var(--brand); position: relative; white-space: nowrap;
}
.hero h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .06em; height: .28em;
  background: linear-gradient(90deg, rgba(213, 163, 91, .34), rgba(213, 163, 91, .12));
  border-radius: 3px; z-index: -1;
}
.hero-lead { color: var(--ink-2); font-size: 16.5px; max-width: 34em; margin-bottom: 22px; }
.hero-facts { display: flex; gap: 22px; margin-top: 22px; flex-wrap: wrap; }
.hero-fact { font-size: 13px; color: var(--ink-3); }
.hero-fact strong { display: block; font-size: 20px; color: var(--ink); font-family: var(--font-num); }
.hero-art { position: relative; }
.hero-art img { width: 100%; filter: drop-shadow(0 26px 40px rgba(120, 60, 40, .14)); }
.hero-badge {
  position: absolute; right: 6%; bottom: 8%;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; box-shadow: var(--shadow); font-size: 13px; color: var(--ink-2);
  display: flex; align-items: center; gap: 10px; max-width: 240px;
}
.hero-badge .icon { width: 22px; height: 22px; color: var(--gold); flex: none; }
.hero-badge b { color: var(--ink); display: block; font-size: 14px; }

/* 大搜索框 */
.search-hero { display: flex; gap: 10px; max-width: 560px; }
.search-field {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 14px;
  padding: 0 14px; height: 54px; box-shadow: var(--shadow-sm);
}
.search-field .icon { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.search-field input { flex: 1; border: 0; outline: none; height: 100%; background: transparent; font-size: 15.5px; color: var(--ink); }
.search-hero .btn { height: 54px; border-radius: 14px; padding: 0 26px; font-size: 16px; }
.quick-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--ink-3); align-items: center; }
.quick-tags a {
  color: var(--ink-2); background: rgba(255,255,255,.7); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px;
}
.quick-tags a:hover { color: var(--brand); border-color: #EBCFC8; background: #fff; }

/* ---------------- 区块 ---------------- */
.section { padding: 54px 0; }
.section--tight { padding: 38px 0; }
.section--alt { background: linear-gradient(180deg, #FFF8F5, #FBF1EA); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-title { font-size: clamp(22px, 2.6vw, 28px); letter-spacing: -.01em; }
.section-title small { display: block; font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: .08em; margin-bottom: 6px; text-transform: uppercase; }
.section-desc { color: var(--ink-2); font-size: 14.5px; margin-top: 6px; max-width: 46em; }
.section-more { font-size: 14px; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.section-more .icon { width: 16px; height: 16px; }
.section-more:hover { gap: 10px; }

/* ---------------- 分类入口 ---------------- */
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.entry-card {
  position: relative; display: flex; gap: 20px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 28px; overflow: hidden; transition: .18s;
}
.entry-card::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 170px; height: 170px;
  border-radius: 50%; background: var(--bg-alt); opacity: .55;
}
.entry-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #E6CFC3; }
.entry-icon {
  width: 60px; height: 60px; border-radius: 18px; flex: none;
  display: grid; place-items: center; background: var(--brand-tint); color: var(--brand);
}
.entry-icon .icon { width: 30px; height: 30px; }
.entry-icon--gold { background: var(--gold-soft); color: #9A6E2F; }
.entry-body { position: relative; z-index: 1; }
.entry-body h3 { font-size: 20px; margin-bottom: 4px; }
.entry-body p { color: var(--ink-2); font-size: 14px; margin: 0 0 8px; }
.entry-meta { font-size: 12.5px; color: var(--ink-3); }
.entry-meta b { color: var(--brand); font-weight: 700; }

/* ---------------- 文章卡片 ---------------- */
.card-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); }
.card-grid--2 { grid-template-columns: repeat(2, 1fr); }
.card-grid--4 { grid-template-columns: repeat(4, 1fr); }

.post-card {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: .18s; height: 100%;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #E7D2C6; }
.post-cover { position: relative; aspect-ratio: 16 / 10; background: var(--bg-alt); overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-cover img { transform: scale(1.03); }
.post-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.post-cat {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-size: 12px; font-weight: 600; color: var(--brand);
  background: var(--brand-tint); padding: 3px 9px; border-radius: 999px; margin-bottom: 9px;
}
.post-title { font-size: 17px; line-height: 1.5; margin-bottom: 8px; }
.post-title a { color: var(--ink); }
.post-card:hover .post-title a { color: var(--brand); }
.post-summary { font-size: 14px; color: var(--ink-2); line-height: 1.7; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-3); margin-top: auto; flex-wrap: wrap; }
.post-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
.post-badge {
  position: absolute; left: 12px; top: 12px; z-index: 1;
  background: rgba(255, 255, 255, .94); color: var(--brand); font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; border: 1px solid rgba(200,32,38,.15);
}
.post-badge--demo { color: var(--ink-3); border-color: var(--line); }

.post-card--wide { flex-direction: row; }
.post-card--wide .post-cover { width: 44%; aspect-ratio: auto; flex: none; }
.post-card--wide .post-body { padding: 22px 24px; }
.post-card--wide .post-title { font-size: 21px; }
.post-card--wide .post-summary { -webkit-line-clamp: 3; }

.empty-state {
  background: #fff; border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 46px 24px; text-align: center; color: var(--ink-3);
}
.empty-state .icon { width: 34px; height: 34px; color: var(--gold); margin-bottom: 10px; }
.empty-state h3 { font-size: 17px; color: var(--ink); margin-bottom: 6px; }
.empty-state p { font-size: 14px; margin: 0; }

/* ---------------- 品种卡片 ---------------- */
.breed-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.breed-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .18s;
}
.breed-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.breed-cover { aspect-ratio: 3 / 3.2; background: var(--bg-alt); }
.breed-cover img { width: 100%; height: 100%; object-fit: cover; }
.breed-body { padding: 14px 16px 16px; }
.breed-body h3 { font-size: 16px; margin-bottom: 2px; }
.breed-en { font-size: 11.5px; letter-spacing: .06em; color: var(--ink-3); text-transform: uppercase; margin-bottom: 8px; }
.breed-tags { display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); }
.breed-tags span { background: #FBF3EE; border-radius: 6px; padding: 2px 7px; }

/* ---------------- 工具卡 ---------------- */
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tool-card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 20px; transition: .18s; height: 100%;
}
.tool-card:hover { border-color: #E6CFC3; box-shadow: var(--shadow); transform: translateY(-2px); }
.tool-icon { width: 46px; height: 46px; border-radius: 13px; background: var(--gold-soft); color: #96682C; display: grid; place-items: center; margin-bottom: 14px; }
.tool-icon .icon { width: 24px; height: 24px; }
.tool-card h3 { font-size: 16.5px; color: var(--ink); margin-bottom: 6px; }
.tool-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.65; margin: 0 0 12px; }
.tool-link { font-size: 13px; font-weight: 600; color: var(--brand); display: inline-flex; align-items: center; gap: 5px; }
.tool-link .icon { width: 14px; height: 14px; }

/* ---------------- FAQ ---------------- */
.faq-list { display: grid; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: 15.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 20px; color: var(--brand); line-height: 1; flex: none;
  transition: transform .2s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 20px 18px; color: var(--ink-2); font-size: 14.5px; }
.faq-answer p:last-child { margin-bottom: 0; }

/* ---------------- 专题 ---------------- */
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.topic-card {
  position: relative; display: block; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff; padding: 22px; transition: .18s;
}
.topic-card:hover { border-color: #E6CFC3; box-shadow: var(--shadow); }
.topic-card h3 { font-size: 18px; margin-bottom: 6px; color: var(--ink); }
.topic-card p { font-size: 13.5px; color: var(--ink-2); margin-bottom: 12px; }
.topic-count { font-size: 12px; color: var(--ink-3); }
.topic-card .icon { position: absolute; right: 18px; top: 18px; width: 26px; height: 26px; color: var(--gold); opacity: .55; }

/* ---------------- 面包屑 ---------------- */
.breadcrumb { padding: 18px 0 0; font-size: 13px; color: var(--ink-3); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li { display: flex; align-items: center; gap: 6px; }
.breadcrumb li:not(:last-child)::after { content: "/"; color: var(--line-strong); }
.breadcrumb a { color: var(--ink-2); }
.breadcrumb a:hover { color: var(--brand); }
.breadcrumb [aria-current="page"] { color: var(--ink-3); }

/* ---------------- 栏目页 ---------------- */
.page-head { padding: 22px 0 30px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 12px; }
.page-head .lead { color: var(--ink-2); font-size: 16px; max-width: 52em; }
.page-head-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); margin-top: 14px; }
.chip-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 14px;
}
.chip:hover { border-color: #E6CFC3; color: var(--brand); }
.chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip .count { font-size: 12px; opacity: .75; }

.layout-with-aside { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; align-items: start; }
.aside-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.aside-card + .aside-card { margin-top: 18px; }
.aside-card h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.aside-card h3 .icon { width: 17px; height: 17px; color: var(--gold); }
.aside-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.aside-list a { color: var(--ink-2); font-size: 14px; display: block; }
.aside-list a:hover { color: var(--brand); }
.aside-list .meta { font-size: 12px; color: var(--ink-3); }

/* ---------------- 分页 ---------------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.page-link {
  min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 14px;
}
.page-link:hover { border-color: var(--brand); color: var(--brand); }
.page-link.is-current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.page-link.is-disabled { opacity: .45; pointer-events: none; }
.page-ellipsis { color: var(--ink-3); padding: 0 4px; }
.page-info { width: 100%; text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }

/* ---------------- 文章详情 ---------------- */
.article-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 44px; align-items: start; padding-bottom: 20px; }
.article-head { padding: 10px 0 22px; }
.article-head h1 { font-size: clamp(26px, 3.6vw, 38px); line-height: 1.34; margin: 12px 0 14px; }
.article-summary { font-size: 17px; color: var(--ink-2); line-height: 1.8; border-left: 3px solid var(--gold); padding-left: 16px; margin-bottom: 20px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 13.5px; color: var(--ink-3); padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.article-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; }
.article-meta .icon { width: 15px; height: 15px; }
.article-meta strong { color: var(--ink); font-weight: 600; }
.article-cover { margin: 22px 0 8px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-alt); }
.article-cover img { width: 100%; }
.article-cover figcaption { font-size: 12.5px; color: var(--ink-3); padding: 8px 12px; background: #fff; border-top: 1px solid var(--line); }

.notice {
  display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; font-size: 14px;
  background: #FBF4EE; border: 1px solid #EEDCCD; color: var(--ink-2); margin: 18px 0;
}
.notice .icon { width: 19px; height: 19px; flex: none; margin-top: 2px; color: var(--warn); }
.notice strong { color: var(--ink); }
.notice--danger { background: #FDF1F0; border-color: #F3D4D1; }
.notice--danger .icon { color: var(--danger); }
.notice--info { background: #F4F7F5; border-color: #DDE8E2; }
.notice--info .icon { color: var(--ok); }

/* 正文排版 */
.prose { font-size: 17px; line-height: 1.92; color: #3A332F; }
.prose > *:first-child { margin-top: 0; }
.prose h2 {
  font-size: 23px; margin: 2.1em 0 .7em; padding-left: 14px;
  border-left: 4px solid var(--brand); line-height: 1.45; scroll-margin-top: 92px;
}
.prose h3 { font-size: 18.5px; margin: 1.7em 0 .5em; color: var(--ink); scroll-margin-top: 92px; }
.prose h4 { font-size: 16.5px; margin: 1.4em 0 .4em; }
.prose p { margin: 0 0 1.15em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--brand); }
.prose a { color: var(--brand); text-decoration: underline; text-decoration-color: rgba(200, 32, 38, .28); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--brand); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose figure { margin: 1.6em 0; }
.prose figure img { border-radius: 12px; border: 1px solid var(--line); }
.prose figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; text-align: center; }
.prose blockquote {
  margin: 1.6em 0; padding: 14px 20px; background: #FCF5F0;
  border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; color: var(--ink-2);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { background: #F6EEE8; padding: 2px 6px; border-radius: 5px; font-size: .92em; }
.prose pre { background: #2B2320; color: #F6E9DF; padding: 16px 18px; border-radius: 12px; overflow-x: auto; font-size: 13.5px; }
.prose pre code { background: transparent; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 480px; }
.prose th, .prose td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: #FBF2EC; font-weight: 700; color: var(--ink); white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

.prose .callout {
  margin: 1.6em 0; padding: 14px 18px; border-radius: 12px;
  background: #FBF4EE; border: 1px solid #EEDCCD; font-size: 15.5px; line-height: 1.8;
}
.prose .callout strong { display: block; margin-bottom: 4px; }
.prose .callout-info { background: #F3F7FA; border-color: #D9E6EF; }
.prose .callout-warn { background: #FDF6EC; border-color: #F0DEBF; }
.prose .callout-danger { background: #FDF1F0; border-color: #F3D4D1; }
.prose .faq { margin: 1.6em 0; }
.prose .faq-item { border: 1px solid var(--line); border-radius: 10px; padding: 0; margin-bottom: 10px; background: #fff; }
.prose .faq-q { font-weight: 700; margin: 0; padding: 12px 16px; background: #FBF6F2; font-size: 15.5px; }
.prose .faq-a { padding: 12px 16px; font-size: 15px; color: var(--ink-2); }
.prose .faq-a p:last-child { margin-bottom: 0; }

/* 目录 */
.toc { position: sticky; top: calc(var(--header-h) + 18px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px; }
.toc h2 { font-size: 14px; letter-spacing: .04em; color: var(--ink-3); font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.toc h2 .icon { width: 15px; height: 15px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 62vh; overflow-y: auto; }
.toc a { display: block; font-size: 13.5px; color: var(--ink-2); padding: 6px 10px; border-radius: 7px; border-left: 2px solid transparent; line-height: 1.5; }
.toc a:hover { background: var(--brand-tint); color: var(--brand); }
.toc .lvl-3 a { padding-left: 22px; font-size: 13px; color: var(--ink-3); }
.toc a.is-active { color: var(--brand); background: var(--brand-tint); border-left-color: var(--brand); font-weight: 600; }

.toc-toggle { display: none; }

/* 文章底部 */
.article-foot { margin-top: 34px; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 22px; }
.tag-row a { font-size: 13px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); padding: 4px 11px; border-radius: 999px; }
.tag-row a:hover { border-color: var(--brand); color: var(--brand); }

.sources { background: #FBF7F3; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin: 22px 0; }
.sources h2 { font-size: 15px; margin: 0 0 8px; display: flex; align-items: center; gap: 7px; }
.sources h2 .icon { width: 16px; height: 16px; color: var(--gold); }
.sources ol { margin: 0; padding-left: 1.2em; font-size: 13.5px; color: var(--ink-2); }
.sources li { margin-bottom: 5px; }

.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0; }
.pn-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.pn-item span { font-size: 12px; color: var(--ink-3); display: block; margin-bottom: 4px; }
.pn-item a { font-size: 14.5px; color: var(--ink); font-weight: 600; }
.pn-item a:hover { color: var(--brand); }
.pn-item--next { text-align: right; }

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ---------------- 搜索页 ---------------- */
.search-page-form { display: flex; gap: 10px; max-width: 640px; }
.search-page-form .search-field { height: 52px; }
.search-result { display: flex; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.search-result:last-child { border-bottom: 0; }
.search-result-cover { width: 168px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; flex: none; background: var(--bg-alt); }
.search-result-cover img { width: 100%; height: 100%; object-fit: cover; }
.search-result h2 { font-size: 18px; margin-bottom: 6px; }
.search-result h2 a { color: var(--ink); }
.search-result h2 a:hover { color: var(--brand); }
.search-result p { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; }
.search-result .post-meta { font-size: 12.5px; }
mark { background: #FDEDC9; color: #7A4A12; padding: 0 2px; border-radius: 3px; }
.search-sort { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--ink-3); margin: 18px 0 0; }
.search-sort a { color: var(--ink-2); padding: 4px 10px; border-radius: 999px; }
.search-sort a.is-active { background: var(--brand-tint); color: var(--brand); font-weight: 600; }

/* ---------------- 工具页 ---------------- */
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; align-items: start; }
.tool-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
.tool-panel h2 { font-size: 19px; margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; height: 44px; border: 1px solid var(--line-strong); border-radius: 10px;
  padding: 0 12px; background: #fff; color: var(--ink); outline: none; transition: .15s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(200, 32, 38, .12); }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 14px; }
.checkbox { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); }
.checkbox input { width: 17px; height: 17px; accent-color: var(--brand); }
.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.form-error { color: var(--danger); font-size: 13px; }

.result-card { margin-top: 24px; border: 1px solid #F0DCCB; background: linear-gradient(180deg, #FFFDFB, #FDF5EE); border-radius: var(--radius); padding: 24px; }
.result-number { font-size: 44px; font-weight: 800; color: var(--brand); font-family: var(--font-num); line-height: 1.1; }
.result-number small { font-size: 16px; font-weight: 600; color: var(--ink-2); margin-left: 6px; }
.result-label { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.result-cell { background: rgba(255,255,255,.75); border: 1px solid #F1E1D4; border-radius: 10px; padding: 12px 14px; }
.result-cell span { font-size: 12px; color: var(--ink-3); display: block; }
.result-cell strong { font-size: 15px; color: var(--ink); }
.stage-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; }

.budget-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 14px; }
.budget-table th, .budget-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.budget-table th { background: #FBF3ED; font-size: 12.5px; color: var(--ink-2); }
.budget-table td:last-child, .budget-table th:last-child { text-align: right; }
.budget-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 0; font-size: 15px; }
.budget-total strong { font-size: 26px; color: var(--brand); font-family: var(--font-num); }

.food-level { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.level-safe { background: #EAF4EE; color: #23664A; }
.level-caution { background: #FDF3E3; color: #8A5A16; }
.level-toxic { background: #FCEDEA; color: #9E2A1E; }
.level-dangerous { background: #B3261E; color: #fff; }
.food-list { display: grid; gap: 12px; }
.food-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.food-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.food-head h3 { font-size: 16px; }
.food-aliases { font-size: 12px; color: var(--ink-3); }
.food-item p { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; }
.food-meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 14px; flex-wrap: wrap; }

.weight-chart { margin-top: 12px; background: #FDF8F4; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.weight-chart svg { width: 100%; height: auto; }
.record-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 12px; }
.record-table th, .record-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.record-table th { font-size: 12px; color: var(--ink-3); font-weight: 600; }

/* ---------------- 友链 ---------------- */
.link-group { margin-bottom: 30px; }
.link-group h2 { font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.link-group h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--gold); }
/* 纯文字友链：不设 Logo / 头像占位，只用站名 + 简介 + 细分隔线 */
.link-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 26px; }
.link-card { display: block; padding: 13px 2px 14px; border-bottom: 1px solid var(--line); }
.link-card:hover { border-bottom-color: var(--brand); }
.link-name { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 3px; line-height: 1.5; }
.link-card:hover .link-name { color: var(--brand); }
.link-desc { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.65; }

/* ---------------- 静态页 ---------------- */
.page-body { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px 40px; }
.page-body .prose { font-size: 16px; }
.info-list { display: grid; gap: 14px; margin: 20px 0; }
.info-row { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.info-row dt { color: var(--ink-3); }
.info-row dd { margin: 0; color: var(--ink); }

/* ---------------- 页脚 ---------------- */
.site-footer { background: #2B2320; color: #E8DCD4; margin-top: 20px; }
.footer-main { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; padding: 52px 0 40px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-en { color: rgba(255,255,255,.45); }
.footer-intro { font-size: 13.5px; line-height: 1.85; color: rgba(255,255,255,.62); margin: 16px 0 18px; max-width: 30em; }
.footer-title { font-size: 14px; color: #fff; font-weight: 700; margin-bottom: 14px; letter-spacing: .02em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-links a { color: rgba(255,255,255,.62); font-size: 13.5px; }
.footer-links a:hover { color: var(--gold); }
.footer-contact { font-size: 13.5px; color: rgba(255,255,255,.62); line-height: 2; }
.footer-contact a { color: rgba(255,255,255,.78); }
.footer-friend { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.footer-friend a { font-size: 12.5px; color: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.14); padding: 3px 9px; border-radius: 999px; }
.footer-friend a:hover { color: var(--gold); border-color: rgba(213,163,91,.5); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0 24px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; justify-content: space-between; font-size: 12.5px; color: rgba(255,255,255,.45); }
.footer-bottom a { color: rgba(255,255,255,.55); }
.footer-bottom a:hover { color: var(--gold); }
.footer-legal { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---------------- Flash ---------------- */
.flash-stack { position: fixed; top: 18px; right: 18px; z-index: 300; display: grid; gap: 10px; max-width: min(92vw, 420px); }
.flash {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  border-radius: 10px; padding: 12px 16px; font-size: 14px; box-shadow: var(--shadow);
  color: var(--ink);
}
.flash--success { border-left-color: var(--ok); }
.flash--error { border-left-color: var(--danger); }
.flash--warning { border-left-color: var(--warn); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .header-search input { width: 110px; }
  .main-nav { gap: 0; }
  .nav-link { padding: 10px 10px; font-size: 14.5px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .breed-grid { grid-template-columns: repeat(3, 1fr); }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-contact-col { grid-column: 1 / -1; }
  .article-wrap { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; margin-bottom: 20px; }
  .toc ol { max-height: none; }
  .layout-with-aside, .tool-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 880px) {
  :root { --header-h: 64px; }
  .main-nav { display: none; }
  .header-search { display: none; }
  .menu-toggle { display: inline-flex; }
  .hero-inner { grid-template-columns: 1fr; padding: 36px 0 44px; gap: 20px; }
  .hero-art { order: -1; max-width: 420px; margin: 0 auto; }
  .hero-badge { display: none; }
  .entry-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: 1fr; }
  .link-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 28px; }
  .page-body { padding: 26px 22px; }
}

@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .section { padding: 40px 0; }
  .card-grid, .breed-grid, .tool-grid, .card-grid--2, .card-grid--4 { grid-template-columns: 1fr; }
  .breed-grid { grid-template-columns: 1fr 1fr; }
  .post-card--wide { flex-direction: column; }
  .post-card--wide .post-cover { width: 100%; aspect-ratio: 16 / 10; }
  .search-hero { flex-direction: column; }
  .search-hero .btn { height: 48px; }
  .hero h1 { font-size: 27px; }
  .hero-facts { gap: 16px; }
  .search-result { gap: 12px; }
  .search-result-cover { width: 104px; }
  .prev-next { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .topbar-right { display: none; }
  .topbar .container { justify-content: flex-start; }
  .article-meta { gap: 8px 14px; font-size: 12.5px; }
  .prose { font-size: 16.5px; }
  .prose h2 { font-size: 21px; }
  .result-grid { grid-template-columns: 1fr; }
  .toc-toggle { display: flex; }
  .toc.is-collapsed ol { display: none; }
}

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

/* ---------------- 首页搜索带 ---------------- */
.search-band-wrap { padding: 0 0 6px; margin-top: -34px; position: relative; z-index: 3; }
.search-band {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px 24px 18px; box-shadow: var(--shadow);
}
.search-band .search-hero { max-width: none; }
.hero-copy { max-width: 40em; }

@media (max-width: 880px) {
  .search-band-wrap { margin-top: -18px; }
  .search-band { padding: 16px; }
}

/* ---------------- 品种详情 ---------------- */
.breed-detail { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 34px; padding: 26px 0 10px; align-items: start; }
.breed-detail-media img { border-radius: var(--radius-lg); border: 1px solid var(--line); width: 100%; background: var(--bg-alt); }
.breed-gallery { display: flex; gap: 10px; margin-top: 12px; }
.breed-gallery img { width: 72px; height: 88px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.breed-detail-body h1 { font-size: clamp(26px, 3.4vw, 36px); margin: 10px 0 12px; }
.breed-detail-body h1 small { font-size: 15px; font-weight: 500; color: var(--ink-3); letter-spacing: .06em; margin-left: 8px; }
.breed-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 18px 0 12px; }
.breed-facts > div { background: #fff; padding: 12px 16px; display: flex; gap: 8px; align-items: baseline; }
.breed-facts dt { font-size: 12.5px; color: var(--ink-3); flex: none; min-width: 64px; }
.breed-facts dd { margin: 0; font-size: 14.5px; color: var(--ink); font-weight: 600; }
.breed-facts .hint { font-size: 11.5px; color: var(--ink-3); font-weight: 400; }

.topic-article-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.topic-article-item { display: flex; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.topic-index { width: 32px; height: 32px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.topic-article-item h2 { font-size: 17px; margin-bottom: 6px; }
.topic-article-item h2 a { color: var(--ink); }
.topic-article-item h2 a:hover { color: var(--brand); }
.topic-article-item p { font-size: 14px; color: var(--ink-2); margin: 0 0 8px; }

.error-page { text-align: center; padding: 70px 0 90px; max-width: 560px; margin: 0 auto; }
.error-code { font-size: 96px; font-weight: 800; line-height: 1; color: var(--brand); opacity: .16; font-family: var(--font-num); }
.error-page h1 { font-size: 26px; margin: 10px 0 10px; }
.error-page p { color: var(--ink-2); }
.error-links { margin-top: 26px; font-size: 13.5px; color: var(--ink-3); display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.toc-mobile { display: none; }
@media (max-width: 1080px) {
  .toc-mobile { display: block; }
  .article-wrap aside > .toc { display: none; }
  .breed-detail { grid-template-columns: 1fr; }
  .breed-detail-media { max-width: 320px; }
}
@media (max-width: 640px) {
  .breed-facts { grid-template-columns: 1fr; }
  .topic-article-item { padding: 16px; gap: 12px; }
}

/* ---------------- 首页统一栅格 ----------------
   首页所有卡片板块每行固定 4 张；配合 HomeController 把每个板块的条目数
   补齐/裁剪成 4 的倍数，任何板块都不会出现「一行 3 张、下一行落单」。
   仅作用于 .home-modules（首页），其他页面保留原有 2/3 列布局。 */
.home-modules .card-grid,
.home-modules .card-grid--2,
.home-modules .card-grid--4,
.home-modules .breed-grid,
.home-modules .tool-grid,
.home-modules .link-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1080px) {
  .home-modules .card-grid,
  .home-modules .card-grid--2,
  .home-modules .card-grid--4,
  .home-modules .breed-grid,
  .home-modules .tool-grid,
  .home-modules .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-modules .card-grid,
  .home-modules .card-grid--2,
  .home-modules .card-grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-modules .breed-grid,
  .home-modules .tool-grid,
  .home-modules .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
