/* 专题目录沿用站点颜色、格子背景和卡片层次。 */
body.page-template-page-collection,
body.gr-collection-archive {
  --gc-grid: rgba(15, 23, 42, .055);
  background-color: var(--bg-body, #f5f7fb);
  background-image: linear-gradient(var(--gc-grid) 1px, transparent 1px), linear-gradient(90deg, var(--gc-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  background-attachment: fixed;
}
:root[data-theme="dark"] body.page-template-page-collection,
:root[data-theme="dark"] body.gr-collection-archive { --gc-grid: rgba(255, 255, 255, .055); }
body.page-template-page-collection .bg-decoration,
body.gr-collection-archive .bg-decoration { display: none; }
body.page.page-template-page-collection main.page { max-width: 1440px; padding: calc(var(--nav-height, 72px) + 28px) 24px 48px; }
.gr-collection-page { width: 100%; min-width: 0; color: var(--text-main); }
.gc-breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; color: var(--text-muted); font-size: 12px; }
.gc-breadcrumb a { color: inherit; text-decoration: none; }
.gc-breadcrumb a:hover { color: var(--primary); }
.gc-intro { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 27px 30px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg-surface); box-shadow: var(--shadow-sm); }
.gc-eyebrow { display: block; margin-bottom: 7px; font-size: 10px; letter-spacing: .15em; font-weight: 800; color: var(--primary); }
.gc-intro h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); line-height: 1.3; font-weight: 800; letter-spacing: -.03em; }
.gc-intro p { margin: 10px 0 0; color: var(--text-muted); font-size: 14px; }
.gc-stats { display: flex; flex: none; gap: 28px; }
.gc-stats div { display: flex; flex-direction: column; gap: 3px; min-width: 76px; padding-left: 25px; border-left: 1px solid var(--border); }
.gc-stats strong { font-size: 28px; line-height: 1.25; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.gc-stats span { color: var(--text-muted); font-size: 12px; }
.gc-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 22px 0 16px; }
.gc-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.gc-filters button { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 15px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-surface); color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: color .18s, border-color .18s, background .18s; }
.gc-filters button:hover { color: var(--primary); border-color: var(--primary); }
.gc-filters button.is-active { border-color: var(--primary); color: #fff; background: var(--primary); }
.gc-filters button span { font-size: 11px; opacity: .8; }
.gc-search { display: flex; align-items: center; gap: 9px; width: 290px; min-height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-surface); color: var(--text-muted); }
.gc-search:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.gc-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text-main); font: inherit; font-size: 12px; box-shadow: none; }
.gc-search input::placeholder { color: var(--text-muted); opacity: 1; }
.gc-result-line { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 14px; color: var(--text-muted); font-size: 12px; }
.gc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gc-card { display: flex; min-width: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-surface); box-shadow: var(--shadow-sm); transition: border-color .18s, box-shadow .18s; }
.gc-card:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); box-shadow: var(--shadow-md); }
.gc-card a { text-decoration: none; }
.gc-card__media { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 7; background: var(--bg-elevated, #e9eef5); }
.gc-card__media::after { position: absolute; content: ''; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); pointer-events: none; }
.gc-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gc-card__group,
.gc-card__count { position: absolute; z-index: 1; bottom: 12px; color: #fff; font-size: 11px; font-weight: 600; }
.gc-card__group { left: 15px; }
.gc-card__count { right: 13px; padding: 4px 8px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 6px; background: rgba(0, 0, 0, .45); }
.gc-card__body { flex: 1; padding: 17px 18px 13px; }
.gc-card h2 { margin: 0; font-size: 18px; font-weight: 750; line-height: 1.4; }
.gc-card h2 a { color: var(--text-main); }
.gc-card h2 a:hover { color: var(--primary); }
.gc-card__description { min-height: 42px; margin: 7px 0 16px; color: var(--text-muted); font-size: 12px; line-height: 1.75; }
.gc-card__latest { display: block; margin-bottom: 7px; font-size: 10px; font-weight: 600; color: var(--text-muted); }
.gc-preview { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; }
.gc-preview a { display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 40px; padding: 3px; border-radius: 6px; color: var(--text-main); transition: background .18s, color .18s; }
.gc-preview a:hover { color: var(--primary); background: var(--primary-soft, #edf3ff); }
.gc-preview img { flex: none; width: 48px; height: 32px; border-radius: 4px; object-fit: cover; background: var(--bg-elevated, #edf1f6); }
.gc-preview span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.gc-preview svg { flex: none; color: var(--text-muted); }
.gc-card__action { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 0 18px; border-top: 1px solid var(--border); color: var(--primary); font-size: 12px; font-weight: 650; transition: background .18s; }
.gc-card__action:hover { background: var(--primary-soft, #edf3ff); }
.gc-empty { padding: 60px 20px; border: 1px dashed var(--border); border-radius: 14px; text-align: center; background: var(--bg-surface); }
.gc-empty p { margin-top: 10px; color: var(--text-muted); font-size: 13px; }
.gc-card[hidden], .gc-empty[hidden] { display: none !important; }
.gr-collection-page a:focus-visible,
.gr-collection-page button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

/* 专题归档继续使用站点资源卡，压紧页头并补回专题目录入口。 */
body.gr-collection-archive .cat-archive-page { max-width: 1392px; width: 100%; padding: 0; }
body.gr-collection-archive .cat-hero { max-width: none; padding: 23px 26px; border-radius: 14px; text-align: left; background: var(--bg-surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
body.gr-collection-archive .cat-hero::before,
body.gr-collection-archive .cat-hero::after,
body.gr-collection-archive .cat-hero-glow,
body.gr-collection-archive .cat-hero-icon { display: none; }
body.gr-collection-archive .cat-hero-title { margin: 5px 0 8px; color: var(--text-main); font-size: 28px; text-shadow: none; }
body.gr-collection-archive .cat-hero-kicker { color: var(--primary); }
body.gr-collection-archive .cat-hero-desc { margin: 0; color: var(--text-muted); font-size: 13px; }
body.gr-collection-archive .cat-hero-stats { justify-content: flex-start; margin-top: 15px; }
body.gr-collection-archive .cat-stat-chip { color: var(--text-muted); background: var(--bg-elevated, #f4f6fa); border-color: var(--border); }

@media (max-width: 1050px) {
  .gc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gc-search { width: 100%; }
}
@media (max-width: 640px) {
  body.page.page-template-page-collection main.page { padding: calc(var(--nav-height, 64px) + 18px) 14px 32px; }
  .gc-breadcrumb { margin-bottom: 14px; }
  .gc-intro { flex-direction: column; align-items: flex-start; gap: 22px; padding: 22px; }
  .gc-intro p { font-size: 12px; }
  .gc-stats { width: 100%; gap: 0; }
  .gc-stats div { flex: 1; padding: 0; border-left: 0; }
  .gc-stats div + div { padding-left: 20px; border-left: 1px solid var(--border); }
  .gc-stats strong { font-size: 26px; }
  .gc-tools { gap: 12px; margin-top: 16px; }
  .gc-filters { width: 100%; flex-wrap: nowrap; overflow-x: auto; padding: 2px 0 5px; }
  .gc-filters button { flex: none; min-height: 42px; padding: 0 12px; font-size: 12px; }
  .gc-result-line { font-size: 10px; }
  .gc-grid { grid-template-columns: 1fr; gap: 16px; }
  .gc-card__media { aspect-ratio: 16 / 6.8; }
  body.gr-collection-archive .cat-hero { padding: 20px; }
  body.gr-collection-archive .cat-hero-title { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .gr-collection-page * { transition: none !important; }
}
