/* =========================================================
   shelf.css —— 列表/索引页（问题货架、工具货架、主题页、全部主题）
   依赖 home.css 的设计令牌、字体与 topnav/btn/footer 组件；
   本文件只提供"列表页专属"布局与行式条目。
   ========================================================= */

/* ---------- 页面头（eyebrow + 大标题 + 说明 + 过滤胶囊） ---------- */
.shelf-head {
  padding: 4rem 0 2.5rem;
  color: var(--color-text);
}
.shelf-crumb {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-gray-500);
}
.shelf-crumb a {
  color: var(--color-gray-600);
  text-decoration: none;
}
.shelf-crumb a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}
.shelf-eyebrow {
  display: block;
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.125rem;
  text-transform: uppercase;
  color: var(--color-gray-500);
}
.shelf-title {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.shelf-lead {
  margin: 0 0 2rem;
  max-width: 38rem;
  font-size: 1.125rem;
  color: var(--color-gray-700);
}
.shelf-lead a {
  color: var(--color-primary);
  text-decoration: none;
}
.shelf-lead a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}
/* 货架页头里的搜索框：沿用首页无框底线下滑样式，但收紧间距、占满可用宽度 */
.shelf-head .intro-search {
  margin-bottom: 1rem;
  max-width: 100%;
}

/* ---------- 过滤胶囊（云色块 hover scale-in） ---------- */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
}
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  isolation: isolate;
  padding: 0.3125rem 0.75rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  color: var(--color-gray-600);
  text-decoration: none;
  transition: color 150ms;
}
.chip::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: var(--color-cloud-500);
  opacity: 0;
  transform: scale(0.85);
  transform-origin: center;
  transition: opacity 200ms, transform 200ms cubic-bezier(0.17, 0.67, 0.34, 1);
}
.chip:hover,
.chip.active {
  color: var(--color-text);
}
.chip:hover::before,
.chip.active::before {
  opacity: 0.9;
  transform: scale(1);
}
.chip code {
  font-size: 0.875rem;
}
.chip .chip-count {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}
.chip:hover .chip-count,
.chip.active .chip-count {
  color: inherit;
}

/* ---------- 两栏：主内容 + 右侧 sticky 目录 ---------- */
.shelf-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 3rem 4rem;
  align-items: start;
  padding: 0 0 2rem;
}
.shelf-main {
  min-width: 0;
}
.shelf-toc {
  position: sticky;
  top: calc(3rem + 32px);
  max-width: 22rem;
  justify-self: end;
}

/* ---------- 分组（宽松间距 + 计数弱化） ---------- */
.shelf-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 4rem;
}
.shelf-section .section-count {
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--color-gray-500);
}
.section-lead-inline {
  margin: -1rem 0 2.25rem;
  max-width: 34rem;
  font-size: 0.9375rem;
  color: var(--color-gray-600);
}

/* 列表页标题统一 section-title（小号大写粉字），压过 site.css .page-section h2 */
.shelf-main .page-section h2.section-title,
.shelf-section h2.section-title {
  margin: 0 0 2.25rem;
  font-size: 1rem;
  color: var(--color-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.125rem;
}

/* 列表页条目 = 首页最新收录同款文章卡；主栏更宽，摘要限宽避免拉太长 */
.shelf-main .entry-summary {
  max-width: 42rem;
}

/* ---------- 行式条目（箭头 + 标题 + meta，无边框） ---------- */
.row-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.row-item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
  isolation: isolate;
  padding: 0.875rem 1rem;
  margin: 0 -1rem;
  border-radius: 8px;
  color: var(--color-text);
  text-decoration: none;
  transition: color 200ms;
}
.row-item::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: var(--color-cloud-500);
  opacity: 0;
  transform: scale(0.9);
  transform-origin: center;
  transition: opacity 200ms, transform 200ms cubic-bezier(0.17, 0.67, 0.34, 1);
}
.row-item:hover {
  color: var(--color-primary);
}
.row-item:hover::before {
  opacity: 0.65;
  transform: scale(1);
}
.row-item .pop-arrow {
  flex: none;
  margin-top: 4px;
  transition: transform 200ms;
}
.row-item:hover .pop-arrow {
  transform: translateX(4px);
}
.row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.row-title {
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.4;
}
.row-meta {
  font-size: 0.875rem;
  color: var(--color-gray-500);
}
.row-meta code {
  font-size: 0.8125rem;
}
.row-side {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}
.row-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-gray-500);
}

/* ---------- 徽章（小胶囊） ---------- */
.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
}
.badge-verified {
  background: var(--color-cloud-100);
  color: var(--color-success);
}
.badge-plain {
  background: var(--color-gray-100);
  color: var(--color-gray-600);
}

/* ---------- 右栏目录（与首页 side-block 同语言） ---------- */
.shelf-toc h2 {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.125rem;
  text-transform: uppercase;
  color: var(--color-gray-500);
}
.toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0 0 1.5rem;
}
.toc-list a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  isolation: isolate;
  padding: 0.4375rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  color: var(--color-gray-700);
  text-decoration: none;
  transition: color 150ms;
}
.toc-list a::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: inherit;
  background: var(--color-cloud-500);
  opacity: 0;
  transform: scale(0.85);
  transform-origin: center;
  transition: opacity 200ms, transform 200ms cubic-bezier(0.17, 0.67, 0.34, 1);
}
.toc-list a:hover {
  color: var(--color-text);
}
.toc-list a:hover::before {
  opacity: 1;
  transform: scale(1);
}
.toc-list .toc-count {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}
.toc-out {
  display: block;
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--color-gray-600);
  text-decoration: none;
}
.toc-out:hover {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- 主题页细节（details 锚点组） ---------- */
.anchor-group {
  margin: 0 0 0.75rem;
  border: none;
}
.anchor-group summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
}
.anchor-group summary:hover {
  background: var(--color-gray-100);
}
.anchor-group summary code {
  font-size: 0.875rem;
}
.anchor-group ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.anchor-group li {
  font-size: 0.9375rem;
}
.anchor-group li a {
  color: var(--color-text);
  text-decoration: none;
}
.anchor-group li a:hover {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.faq-list li {
  font-size: 0.9375rem;
}
.faq-list a {
  color: var(--color-text);
  text-decoration: none;
}
.faq-list a:hover {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.faq-list .muted {
  color: var(--color-gray-500);
}

/* ---------- 响应式（同首页：1080px 单列） ---------- */
@media (max-width: 1080px) {
  .shelf-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .shelf-toc {
    position: static;
    justify-self: auto;
    max-width: none;
  }
}

/* ---------- 宽屏：货架页内容区加宽（首页保持 1100px 定稿；避免 dot-nav 与内容之间大空白） ---------- */
body.shelf-page .wrap {
  /* 留出 7rem 边距：宽屏下内容尽量铺开，同时不与左侧 dot-nav（28px 处）重叠 */
  max-width: calc(100% - 7rem);
}
/* ---------- 主题分类胶囊（装饰块） ---------- */
.cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cat-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3125rem 0.75rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: background 150ms, color 150ms;
}
.cat-chip .cat-deco {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--color-primary);
  opacity: 0.8;
}
.cat-chip .cat-count {
  color: var(--color-gray-500);
  font-size: 0.8125rem;
}
.cat-chip:hover {
  background: var(--color-cloud-500);
  color: var(--color-primary);
}
.cat-chip:hover .cat-count {
  color: inherit;
}

/* ---------- 问题货架一级页：主题过滤 + 排序切换（head 下，替代分类卡片/二级页） ---------- */
.prob-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.75rem;
}
.cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cat-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--color-cloud-500);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  transition: background 150ms, color 150ms, border-color 150ms;
}
.cat-pill span {
  color: var(--color-gray-500);
  font-size: 0.75rem;
}
.cat-pill:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.cat-pill.is-active {
  background: var(--color-gray-900);
  border-color: var(--color-gray-900);
  color: var(--color-background);
}
.cat-pill.is-active span {
  color: inherit;
  opacity: 0.85;
}
.prob-sort {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.1875rem;
  border-radius: 999px;
  background: var(--color-cloud-100);
}
.prob-controls .prob-count {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--color-gray-500);
  white-space: nowrap;
}
.sort-pill {
  border: 0;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  background: transparent;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-gray-500);
  cursor: pointer;
  transition: background 150ms, color 150ms;
}
.sort-pill:hover {
  color: var(--color-primary);
}
.sort-pill.is-active {
  background: var(--color-gray-900);
  color: var(--color-background);
}

/* ---------- 问题货架：固定滚轮列表（固定高度内滚动 + 上下渐隐，页面本身保持约一个半屏） ---------- */
.prob-page {
  padding-top: 2rem;
}
.prob-wheel {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
}
.prob-scroll-hint {
  position: absolute;
  top: -30px;
  right: 4px;
  font-size: 0.75rem;
  color: var(--color-gray-500);
  opacity: 0.55;
  transition: opacity 150ms;
  pointer-events: none;
}
.prob-wheel:hover .prob-scroll-hint {
  opacity: 1;
}
.prob-scroll-hint.hidden {
  display: none;
}
.prob-wheel .prob-list {
  flex: 1 1 auto;
  min-width: 0;
}
.prob-list {
  position: relative;
  height: min(56vh, 540px);
  min-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--color-gray-300) transparent;
  padding: 22px 6px 22px 2px;
  mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 22px), transparent 100%);
}
.prob-list::-webkit-scrollbar {
  width: 6px;
}
.prob-list::-webkit-scrollbar-thumb {
  background: var(--color-gray-300);
  border-radius: 3px;
}

/* ---------- 问题货架：左侧滚轴圆点导航（每问题一点 + 条数 + 上下渐隐） ---------- */
.dot-nav.prob-dots {
  position: relative;
  top: auto;
  left: auto;
  translate: none;
  z-index: auto;
  gap: 0;
  flex: none;
  width: 28px;
  padding: 14px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.prob-dots-track {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 auto;
  min-height: 0;
  overflow: visible;
}
.dot-nav.prob-dots .dot {
  position: absolute;
  left: calc(50% - 3.5px);
  top: 0;
  width: 7px;
  height: 7px;
  background: var(--color-gray-300);
  opacity: 0.7;
}
.dot-nav.prob-dots .dot:hover,
.dot-nav.prob-dots .dot.active {
  background: var(--color-primary);
  opacity: 1;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 18%, transparent);
}
.dot-nav.prob-dots .dot::before {
  content: "";
  position: absolute;
  inset: -6px;
}

@media (max-width: 1200px) {
  .dot-nav.prob-dots {
    display: flex;
  }
}
/* ---------- 行式条目：宽松版（标题 + 下方弱化 meta，无右侧对齐列） ---------- */
.row-list {
  gap: 0.5rem;
}
.row-item {
  padding: 0.875rem 1rem;
}
.row-main {
  gap: 6px;
}
.row-side {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}

/* ---------- 通用弱化文字（问题空间 / 各列表页说明行） ---------- */
.muted { color: var(--color-gray-500); font-size: 0.88rem; }

/* ---------- 问题空间：求助看板 + 求助卡（v2，新变量体系） ---------- */
.page-section { margin-top: 2.4rem; }
.page-section h2 { margin-bottom: 0.5rem; }
.hd-table { width: 100%; border-collapse: collapse; margin-top: 1.2rem; }
.hd-table th, .hd-table td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--color-gray-200); font-size: 0.9rem; vertical-align: middle; }
.hd-table th { color: var(--color-gray-500); font-weight: 600; font-size: 0.82rem; }
.hd-status { display: inline-block; padding: 0.14rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.hd-status.st-open { background: var(--color-gray-100); color: var(--color-gray-600); }
.hd-status.st-matched { background: color-mix(in srgb, var(--color-primary) 15%, transparent); color: var(--color-primary); }
.hd-status.st-resolved, .hd-status.st-published { background: color-mix(in srgb, var(--color-success) 14%, transparent); color: var(--color-success); }
.hd-status.st-closed { background: var(--color-gray-100); color: var(--color-gray-500); text-decoration: line-through; }
.hd-link { color: inherit; text-decoration: none; }
.hd-link:hover { text-decoration: underline; }
.hd-table tr.hd-row { cursor: pointer; }
.hd-table tr.hd-row:hover td { background: color-mix(in srgb, var(--color-primary) 5%, transparent); }
.hd-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.7rem 1rem; margin: 1rem 0 0.4rem; }
.hd-meta-item { background: var(--color-gray-100); border: 1px solid var(--color-gray-200); border-radius: 10px; padding: 0.65rem 0.9rem; margin: 0; }
.hd-meta-item dt { font-size: 0.75rem; color: var(--color-gray-500); margin-bottom: 0.25rem; }
.hd-meta-item dd { margin: 0; font-size: 0.92rem; overflow-wrap: anywhere; }
.hd-problem { font-size: 1rem; line-height: 1.7; overflow-wrap: anywhere; }
.hd-msg { white-space: pre-wrap; overflow-wrap: anywhere; }
.hd-api { margin-top: 1.2rem; }
.hd-api summary { cursor: pointer; font-weight: 600; color: var(--color-primary); }
.hd-api pre { margin-top: 0.6rem; }
.ask-form { display: grid; gap: 0.9rem; margin: 1.2rem 0; }
.ask-form label { display: grid; gap: 0.3rem; font-size: 0.88rem; color: var(--color-gray-600); }
.ask-form input, .ask-form textarea { font: inherit; color: var(--color-text); background: var(--color-background); border: 1px solid var(--color-gray-300); border-radius: 8px; padding: 0.55rem 0.75rem; width: 100%; box-sizing: border-box; }
.ask-form input:focus, .ask-form textarea:focus { outline: none; border-color: var(--color-primary); }
.ask-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.9rem; }
.ask-actions { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.ask-hint { font-size: 0.85rem; }
.ask-card { background: var(--color-gray-100); border: 1px solid var(--color-gray-300); border-radius: 10px; padding: 1rem 1.2rem; font-size: 0.85rem; white-space: pre-wrap; word-break: break-word; margin-top: 0.6rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.hd-desc { max-width: 36rem; overflow-wrap: anywhere; }
.hd-err { display: block; margin-top: 0.2rem; font-size: 0.8rem; overflow-wrap: anywhere; }
.hd-ts { font-size: 0.75rem; }
.hd-note { font-size: 0.8rem; overflow-wrap: anywhere; }
.tip-types { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; align-items: center; }
.tip-types label { display: inline-flex; align-items: center; gap: 0.32rem; margin: 0; font-size: 0.86rem; color: var(--color-gray-700); cursor: pointer; }
.tip-types input[type="radio"] { width: auto; padding: 0; margin: 0; border: 0; background: transparent; accent-color: var(--color-primary); }

/* ---------- 选型对比段（R2 · D2 方向①：AI 编程助手按角色分层） ---------- */
.select-sec {
  padding-top: 1rem;
  padding-bottom: 0.5rem;
}
.select-head {
  margin: 0 0 1.4rem;
}
.select-head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.select-intro {
  max-width: 46rem;
  font-size: 0.98rem;
  color: var(--color-gray-600);
}
.select-group {
  margin-top: 1.8rem;
}
.select-group h3 {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.select-gnum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-background);
  font-size: 0.85rem;
  font-weight: 700;
  flex: none;
}
.select-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-gray-500);
}
.select-desc {
  margin: 0 0 0.6rem;
  font-size: 0.88rem;
  color: var(--color-gray-600);
}
.select-table td {
  vertical-align: top;
}
.select-table .select-tool {
  white-space: nowrap;
  font-weight: 600;
}
.select-table .select-tool a {
  color: var(--color-primary);
  text-decoration: none;
}
.select-table .select-tool a:hover {
  text-decoration: underline;
}
.select-table .select-aud {
  color: var(--color-gray-600);
}
.select-foot {
  margin-top: 1.5rem;
  max-width: 46rem;
}
@media (max-width: 800px) {
  .select-table th:nth-child(4),
  .select-table td:nth-child(4) {
    display: none;
  }
  .select-table th:nth-child(5),
  .select-table td:nth-child(5) {
    display: none;
  }
}


/* ---------- 移动端 ≤720px（2026-09-02 首轮适配）：货架页内容全宽 + 表格横滚 + 行内代码断行 ----------
   宽屏 7rem 边距是给左侧 dot-nav 留的（dot-nav ≤1200px 已隐藏）；手机上若保留，
   390px 屏正文只剩 246px（60% 屏宽），货架/详情/关于/问题空间全部中招。 */
@media (max-width: 720px) {
  body.shelf-page .wrap {
    max-width: none;
  }
}


/* ---------- 移动端 ≤720px：货架页改为掘金式单列信息流（2026-09-02） ----------
   桌面「滚轮 + 圆点轴」是宽屏玩法；手机上固定高度滚轮 + 左右圆点轴会把列表压到半屏以内，
   空间利用率极低。≤720px 改回正常文档流整页滚动：无圆点轴、无上下渐隐、无滚轮提示；
   页头字号对齐掘金移动端（标题 24 / 说明 15），筛选胶囊改单行横滑。
   仅作用于 body.shelf-page 的列表页；首页组合包滚轮与桌面版不受影响。 */
@media (max-width: 720px) {
  /* 1) 页头压缩：72px 天空条保留，其下内容瘦身（crumb/eyebrow 省掉一层导航噪音） */
  body.shelf-page .shelf-head,
  body.shelf-page .home-head {
    padding: 1.25rem 0 0.375rem;
  }
  body.shelf-page .shelf-crumb,
  body.shelf-page .shelf-eyebrow {
    display: none;
  }
  body.shelf-page .shelf-title,
  body.shelf-page .home-head .intro-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
  }
  body.shelf-page .shelf-lead,
  body.shelf-page .home-head .intro-sub {
    margin: 0 0 1rem;
    max-width: none;
    font-size: 0.9375rem;
    line-height: 1.55;
  }
  body.shelf-page .shelf-head .intro-search {
    margin-bottom: 0.875rem;
  }

  /* 2) 筛选行：胶囊单行横滑（不换行堆叠），排序与计数落到第二行 */
  body.shelf-page .prob-controls {
    margin-top: 0.875rem;
    row-gap: 0.625rem;
  }
  body.shelf-page .cat-filter {
    flex: 1 0 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-inline: -20px;
    padding-inline: 20px;
    padding-bottom: 2px;
  }
  body.shelf-page .cat-filter::-webkit-scrollbar {
    display: none;
  }
  body.shelf-page .cat-pill {
    flex: none;
  }
  body.shelf-page .prob-sort .sort-pill {
    padding: 0.3125rem 0.875rem;
  }
  body.shelf-page .prob-count {
    white-space: nowrap;
  }

  /* 3) 去掉滚轮轴：列表恢复文档流，整页滚动 */
  body.shelf-page .prob-page {
    padding-top: 0.375rem;
  }
  body.shelf-page .prob-wheel {
    display: block;
  }
  body.shelf-page .dot-nav.prob-dots,
  body.shelf-page .prob-scroll-hint {
    display: none;
  }
  body.shelf-page .prob-list {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
    mask-image: none;
    -webkit-mask-image: none;
  }
  body.shelf-page .prob-list::-webkit-scrollbar {
    display: none;
  }

  /* 4) 条目 = 通栏信息流：整宽触达 + 细分隔线 + 紧凑字号 */
  body.shelf-page .row-list {
    gap: 0;
  }
  body.shelf-page .row-item {
    margin-inline: -20px;
    padding: 0.875rem 20px;
    border-radius: 0;
    border-bottom: 1px solid var(--color-gray-200);
    gap: 0.75rem;
  }
  body.shelf-page .row-item:last-child {
    border-bottom: 0;
  }
  body.shelf-page .row-title {
    font-size: 1.0625rem;
    line-height: 1.45;
  }
  body.shelf-page .row-desc {
    font-size: 0.8125rem;
    line-height: 1.55;
  }
  body.shelf-page .row-meta,
  body.shelf-page .row-side {
    font-size: 0.8125rem;
  }
  body.shelf-page .row-item .pop-arrow {
    margin-top: 0.125rem;
    opacity: 0.6;
  }
}


/* ---------- 移动端 ≤720px 追加：分类不横滑（JS 折叠选择器 / 少分类平铺）+ 选型表卡片化（2026-09-02） ----------
   上一条 feed 块把 .cat-filter 设为单行横滑（无 JS 回退）；html.js 下 site.js 会给
   #prob-filter 打 is-chooser（分类多：下拉面板）或 is-flat（分类少：平铺），两者都不横滑。 */
@media (max-width: 720px) {
  /* 弹出面板以整行 .prob-controls 为定位基准，避免按窄小的 nav 收缩 */
  body.shelf-page .prob-controls {
    position: relative;
  }
  html.js body.shelf-page .cat-filter.is-chooser {
    position: static;
    flex: none;
    flex-wrap: nowrap;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
  html.js body.shelf-page .cat-filter.is-chooser > .cat-pill {
    display: none;
  }
  html.js body.shelf-page .cat-filter.is-flat {
    flex: none;
    flex-wrap: wrap;
    overflow: visible;
    gap: 0.375rem;
    margin-inline: 0;
    padding-inline: 0;
  }

  /* 分类触发按钮 + 下拉面板（两列网格，点选即收起） */
  body.shelf-page .cat-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 2.125rem;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    border: 1px solid var(--color-cloud-500);
    background: var(--color-background);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    cursor: pointer;
    transition: color 150ms, border-color 150ms;
  }
  body.shelf-page .cat-trigger:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
  }
  body.shelf-page .cat-trigger-count {
    color: var(--color-gray-500);
    font-size: 0.75rem;
  }
  body.shelf-page .cat-trigger .cat-chev {
    flex: none;
    transition: transform 180ms;
  }
  body.shelf-page .cat-filter.is-open .cat-trigger {
    color: var(--color-primary);
    border-color: var(--color-primary);
  }
  body.shelf-page .cat-filter.is-open .cat-chev {
    transform: rotate(180deg);
  }
  body.shelf-page .cat-sheet {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    z-index: 40;
    display: none;
    width: max-content;
    max-width: min(88vw, 24rem);
    min-width: 12.5rem;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
    padding: 0.5rem;
    background: var(--color-background);
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
    box-shadow: 0 12px 32px color-mix(in srgb, var(--color-text) 16%, transparent);
    max-height: min(72vh, calc(100vh - 8rem));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body.shelf-page .cat-filter.is-open .cat-sheet {
    display: grid;
  }
  body.shelf-page .cat-sheet .cat-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 2.375rem;
    margin: 0;
    font-size: 0.8125rem;
  }
  body.shelf-page .cat-sheet .cat-pill span {
    flex: none;
  }

  /* 选型对比表卡片化：不横滑，每行一张卡，字段前带小标签（标签由渲染期 data-label 提供） */
  body.shelf-page .select-table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    margin: 0.5rem 0 0;
  }
  body.shelf-page .select-table thead {
    display: none;
  }
  body.shelf-page .select-table tbody {
    display: block;
  }
  body.shelf-page .select-table tr {
    display: block;
    margin: 0 0 0.75rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--color-gray-200);
    border-radius: 12px;
  }
  body.shelf-page .select-table tr:last-child {
    margin-bottom: 0;
  }
  body.shelf-page .select-table td {
    display: flex;
    gap: 0.625rem;
    min-width: 0;
    padding: 0.3rem 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  body.shelf-page .select-table td::before {
    content: attr(data-label);
    flex: none;
    width: 4.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--color-gray-500);
  }
  body.shelf-page .select-table .select-tool {
    white-space: normal;
  }
}


/* 货架移动端“显示更多”按钮间距（按钮样式沿用 home.css .show-more，仅 ≤720px 由 JS 创建） */
.shelf-show-more {
  margin: 1.5rem auto 3rem;
}
