/* ============================================================
   密爱服务 · 共享样式 /assets/site.css
   内容索引与资料归档站全局基础
   ============================================================ */

/* ---------- 1. 变量与重置 ---------- */
:root {
  /* 品牌色板 */
  --c-cream: #FAF3E0;
  --c-orange: #E07A3F;
  --c-teal: #1B8A8A;
  --c-magenta: #B5486A;
  --c-card: #FFF6E9;
  --c-ochre: #8E3B2B;
  --c-mustard: #E6B94F;
  --c-blue: #2E86AB;
  --c-vermilion: #C0392B;
  --c-grayblue: #7F8C8D;
  --c-green: #27AE60;
  --c-grape: #8E44AD;
  --c-ink: #2C3E50;
  --c-gray: #BDC3C7;

  /* 功能色 */
  --color-bg: var(--c-cream);
  --color-surface: var(--c-card);
  --color-text: var(--c-ink);
  --color-heading: var(--c-ochre);
  --color-accent: var(--c-mustard);
  --color-border: var(--c-gray);
  --color-muted: var(--c-grayblue);

  /* 状态色 */
  --color-new: var(--c-blue);
  --color-beta: var(--c-vermilion);
  --color-archive: var(--c-grayblue);

  /* 分区色 */
  --section-archive: var(--c-orange);
  --section-history: var(--c-teal);
  --section-user: var(--c-magenta);

  /* 字体 */
  --font-head: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Heiti SC", "Noto Sans CJK SC", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, "Courier New", monospace;

  /* 间距 */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* 圆角 */
  --rd-sm: 4px;
  --rd-md: 8px;
  --rd-lg: 12px;

  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(44, 62, 80, 0.08);
  --shadow-md: 0 4px 16px rgba(44, 62, 80, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::after {
  content: "";
  display: block;
  min-height: 0;
}

img,
svg,
video {
  max-width: 100%;
  display: block;
  height: auto;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

main {
  display: block;
  flex: 1 0 auto;
  width: 100%;
  outline: none;
}

/* ---------- 2. 基础排版 ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 900;
  color: var(--color-heading);
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

h1 { font-size: 28px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

p {
  margin-bottom: var(--sp-4);
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

:focus-visible {
  outline: 3px solid var(--c-mustard);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--c-mustard);
  color: var(--c-ink);
}

/* ---------- 3. 布局容器 ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.container--wide {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

#main-content {
  width: 100%;
}

/* ---------- 4. 阅读进度条 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 400;
  pointer-events: none;
  background: transparent;
}

.scroll-progress__bar {
  height: 100%;
  width: 0;
  background: var(--c-vermilion);
  transition: width 0.08s linear;
}

/* ---------- 5. 页面头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--color-bg);
  border-bottom: 4px solid var(--c-ochre);
  box-shadow: var(--shadow-sm);
}

.skip-link {
  position: fixed;
  top: -48px;
  left: var(--sp-2);
  z-index: 500;
  background: var(--c-ink);
  color: var(--c-cream);
  font-weight: 700;
  font-size: 14px;
  padding: var(--sp-2) var(--sp-4);
  border-radius: 0 0 var(--rd-sm) var(--rd-sm);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  color: var(--c-mustard);
}

/* 头部批次条 */
.header-top {
  background: var(--c-ochre);
  color: var(--c-cream);
  border-bottom: 2px solid var(--c-mustard);
}

.header-top__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  max-width: 1440px;
  margin: 0 auto;
  padding: 6px var(--sp-5);
}

.header-top__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13px;
  margin: 0;
  letter-spacing: 0.02em;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-mustard);
  animation: statusPulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.header-top__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.header-top__link {
  color: var(--c-cream);
  font-weight: 700;
  font-size: 13px;
  padding: 2px 2px;
  border-bottom: 2px solid rgba(250, 243, 224, 0.45);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.header-top__link:hover {
  color: var(--c-mustard);
  border-bottom-color: var(--c-mustard);
}

.header-top__version {
  font-size: 12px;
  font-weight: 700;
  color: var(--c-mustard);
  background: rgba(0, 0, 0, 0.15);
  border: 1px dashed rgba(230, 185, 79, 0.55);
  border-radius: 3px;
  padding: 1px 8px;
  line-height: 1.5;
}

/* 头部主栏 */
.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px var(--sp-5);
  position: relative;
}

/* 品牌 */
.site-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.site-brand__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 22px;
  color: var(--c-mustard);
  background: var(--c-ochre);
  border: 2px solid var(--c-ochre);
  border-radius: var(--rd-sm);
  box-shadow: 2px 2px 0 0 var(--c-mustard);
  flex-shrink: 0;
}

.site-brand__name {
  display: block;
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  color: var(--c-ochre);
  line-height: 1.15;
  white-space: nowrap;
}

.site-brand__sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--c-grayblue);
  text-transform: uppercase;
  white-space: nowrap;
}

/* 主导航 */
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav__link {
  display: block;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 15px;
  color: var(--c-ink);
  border-radius: var(--rd-sm);
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav__link:hover {
  background: var(--c-mustard);
  color: var(--c-ink);
}

.site-nav__link[aria-current="page"] {
  background: var(--c-ochre);
  color: var(--c-cream);
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--c-mustard);
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--c-mustard);
  border: 2px solid var(--c-ink);
  border-radius: var(--rd-sm);
  color: var(--c-ink);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.1;
  transition: background 0.15s ease;
}

.nav-toggle:hover {
  background: #f0c65e;
}

.nav-toggle__bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--c-ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.is-active .nav-toggle__bar:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active .nav-toggle__bar:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  --foot-dark: #6e2a1e;
  background: var(--c-ochre);
  color: var(--c-cream);
  margin-top: var(--sp-8);
  font-size: 14px;
  flex-shrink: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: var(--sp-6);
  padding: var(--sp-7) 0;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--sp-5);
  padding-right: var(--sp-5);
}

.site-brand--footer .site-brand__name {
  color: var(--c-cream);
}

.site-brand--footer .site-brand__sub {
  color: rgba(250, 243, 224, 0.55);
}

.site-brand--footer .site-brand__mark {
  background: var(--c-mustard);
  color: var(--c-ochre);
  border-color: var(--c-mustard);
  box-shadow: 2px 2px 0 0 var(--c-cream);
}

.footer-slogan {
  font-size: 13px;
  letter-spacing: 0.05em;
  color: rgba(250, 243, 224, 0.7);
  margin: var(--sp-4) 0 0;
  padding-left: 2px;
}

.footer-heading {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 13px;
  color: var(--c-mustard);
  letter-spacing: 0.1em;
  margin: 0 0 var(--sp-4);
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(250, 243, 224, 0.25);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-links a {
  display: inline-block;
  position: relative;
  padding: 3px 0 3px 16px;
  color: var(--c-cream);
  transition: color 0.15s ease, transform 0.15s ease;
}

.footer-links a::before {
  content: "›";
  position: absolute;
  left: 2px;
  color: var(--c-mustard);
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--c-mustard);
  transform: translateX(3px);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-contact__item {
  padding: 3px 0;
  line-height: 1.5;
  color: var(--c-cream);
  word-break: break-all;
}

.footer-bottom {
  background: var(--foot-dark);
  border-top: 1px solid rgba(250, 243, 224, 0.15);
}

.footer-bottom__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px var(--sp-5);
  font-size: 13px;
  color: rgba(250, 243, 224, 0.75);
}

.footer-bottom__inner p {
  margin: 0;
}

/* ---------- 7. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  border: 2px solid transparent;
  border-radius: var(--rd-sm);
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--c-mustard);
  color: var(--c-ink);
}

.btn--primary:hover {
  background: var(--c-ochre);
  color: var(--c-cream);
}

.btn--ghost {
  border-color: var(--c-ink);
  color: var(--c-ink);
  background: transparent;
}

.btn--ghost:hover {
  background: var(--c-ink);
  color: var(--c-cream);
}

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-grayblue);
  padding: var(--sp-4) 0;
}

.breadcrumb a {
  color: var(--c-ochre);
  font-weight: 700;
}

.breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb__sep {
  color: var(--c-gray);
  user-select: none;
}

/* ---------- 9. 正文排版 ---------- */
.prose {
  font-size: 16px;
  line-height: 1.85;
  color: var(--c-ink);
  max-width: 720px;
}

.prose h2 {
  font-size: 24px;
  color: var(--c-ochre);
  margin-top: var(--sp-7);
  margin-bottom: var(--sp-3);
}

.prose h3 {
  font-size: 18px;
  color: var(--c-ink);
  margin-top: var(--sp-5);
  margin-bottom: var(--sp-2);
}

.prose p {
  margin-bottom: var(--sp-4);
}

.prose a {
  color: var(--c-ochre);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--c-vermilion);
}

.prose ul,
.prose ol {
  padding-left: var(--sp-5);
  margin-bottom: var(--sp-4);
}

.prose ul {
  list-style: square;
}

.prose ol {
  list-style: decimal;
}

/* ---------- 10. 章节标题带 ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  background: var(--c-ochre);
  color: var(--c-cream);
  padding: 8px 16px;
  border-radius: var(--rd-sm);
  margin-bottom: var(--sp-4);
}

.section-head__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.04em;
  margin: 0;
  color: var(--c-cream);
}

.section-head__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-mustard);
  white-space: nowrap;
}

/* ---------- 11. 卡片与网格 ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-4);
}

.card {
  background: var(--c-card);
  border: 2px solid var(--c-gray);
  border-top: 4px solid var(--c-ochre);
  border-radius: var(--rd-md);
  padding: var(--sp-4) var(--sp-5) var(--sp-5);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  border-color: var(--c-mustard);
  border-top-color: var(--c-mustard);
  box-shadow: var(--shadow-sm);
}

.card__title {
  font-size: 16px;
  font-weight: 900;
  color: var(--c-ochre);
  margin-bottom: 4px;
}

.card__desc {
  font-size: 14px;
  color: var(--c-ink);
  line-height: 1.6;
  margin-bottom: var(--sp-3);
}

.card__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--c-grayblue);
}

/* Bento 模块网格 */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--sp-4);
}

.bento__item {
  grid-column: span 12;
  min-width: 0;
}

.bento__item--span4 { grid-column: span 4; }
.bento__item--span5 { grid-column: span 5; }
.bento__item--span6 { grid-column: span 6; }
.bento__item--span7 { grid-column: span 7; }
.bento__item--span8 { grid-column: span 8; }
.bento__item--span12 { grid-column: span 12; }

/* ---------- 12. 筛选双栏 ---------- */
.filter-layout {
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: var(--sp-5);
  align-items: start;
}

.filter-layout__sidebar {
  position: sticky;
  top: 120px;
  min-width: 0;
}

.filter-layout__main {
  min-width: 0;
}

.panel {
  background: var(--c-card);
  border: 2px solid var(--c-gray);
  border-radius: var(--rd-md);
  padding: var(--sp-5);
}

.panel__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 15px;
  color: var(--c-ochre);
  margin-bottom: var(--sp-4);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--c-mustard);
}

.glass-panel {
  background: rgba(255, 246, 233, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--rd-md);
  padding: var(--sp-5);
}

/* ---------- 13. 条目行 ---------- */
.entry-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: 10px 16px;
  background: var(--c-card);
  border: 1px solid var(--c-gray);
  border-radius: var(--rd-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.entry-row + .entry-row {
  margin-top: -1px;
  border-radius: 0;
}

.entry-row:first-child {
  border-radius: var(--rd-sm) var(--rd-sm) 0 0;
}

.entry-row:last-child {
  border-radius: 0 0 var(--rd-sm) var(--rd-sm);
}

.entry-row:hover {
  border-color: var(--c-mustard);
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 1;
}

.entry-row__main {
  flex: 1;
  min-width: 0;
}

.entry-row__title {
  font-weight: 700;
  font-size: 15px;
  color: var(--c-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-row__meta {
  font-size: 12px;
  color: var(--c-grayblue);
  font-family: var(--font-mono);
  letter-spacing: 0em;
}

.entry-row__badges {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------- 14. 序号与指标条 ---------- */
.num-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--c-ochre);
  background: var(--c-mustard);
  border-radius: var(--rd-sm);
  flex-shrink: 0;
}

.num-marker--ghost {
  background: transparent;
  color: var(--c-grayblue);
  font-size: 16px;
}

.metric-bar {
  display: block;
  height: 8px;
  width: 100%;
  background: var(--c-gray);
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}

.metric-bar__fill {
  display: block;
  height: 100%;
  width: var(--metric, 50%);
  background: var(--c-blue);
  border-radius: inherit;
  transition: width 0.3s ease;
}

/* ---------- 15. 分区磁贴 ---------- */
.magnet-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  padding: var(--sp-5);
  border-radius: var(--rd-lg);
  color: var(--c-cream);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.magnet-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.magnet-tile--orange {
  background: var(--section-archive);
}

.magnet-tile--teal {
  background: var(--section-history);
}

.magnet-tile--magenta {
  background: var(--section-user);
}

.magnet-tile::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.magnet-tile__title {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  color: var(--c-cream);
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}

.magnet-tile__desc {
  font-size: 13px;
  opacity: 0.92;
  margin: 0;
  position: relative;
  z-index: 1;
}

.tile-count {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  padding: 2px 10px;
  border-radius: 20px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 2;
  color: var(--c-cream);
}

/* ---------- 16. 标签与徽标 ---------- */
.tag-block {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 700;
  background: var(--c-gray);
  color: var(--c-ink);
  border-radius: 20px;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.tag:hover {
  filter: brightness(0.88);
}

.tag:active {
  transform: scale(0.97);
}

.tag--hot {
  background: var(--c-green);
  color: #fff;
}

.tag--mid {
  background: var(--c-grape);
  color: #fff;
}

.tag--low {
  background: var(--c-grayblue);
  color: #fff;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
  border-radius: 3px;
  background: var(--c-gray);
  color: var(--c-ink);
  white-space: nowrap;
  letter-spacing: 0.03em;
}

.badge--new {
  background: var(--color-new);
  color: #fff;
}

.badge--beta {
  background: var(--color-beta);
  color: #fff;
}

.badge--archive {
  background: var(--color-archive);
  color: #fff;
}

/* ---------- 17. 索引条 ---------- */
.index-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: var(--sp-4) 0;
}

.index-bar__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-ink);
  background: var(--c-card);
  border: 1px solid var(--c-gray);
  border-radius: var(--rd-sm);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.index-bar__item:hover,
.index-bar__item.is-active {
  background: var(--c-mustard);
  border-color: var(--c-mustard);
  color: var(--c-ink);
}

/* ---------- 18. 横向滑轨 ---------- */
.h-scroll {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  padding: var(--sp-2) var(--sp-1) var(--sp-4);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--c-mustard) var(--c-gray);
}

.h-scroll::-webkit-scrollbar {
  height: 6px;
}

.h-scroll::-webkit-scrollbar-track {
  background: var(--c-gray);
  border-radius: 3px;
}

.h-scroll::-webkit-scrollbar-thumb {
  background: var(--c-mustard);
  border-radius: 3px;
}

.h-scroll__item {
  flex: 0 0 auto;
  width: 280px;
  scroll-snap-align: start;
}

/* ---------- 19. 数据表格 ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--c-card);
  border-radius: var(--rd-sm);
  overflow: hidden;
}

.data-table thead th {
  background: var(--c-ochre);
  color: var(--c-cream);
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  font-size: 13px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--c-gray);
  vertical-align: middle;
}

.data-table tbody tr:nth-child(even) {
  background: rgba(250, 243, 224, 0.5);
}

.data-table tbody tr:hover {
  background: rgba(230, 185, 79, 0.12);
}

.data-table .mono {
  font-size: 13px;
}

/* ---------- 20. 分页与计数 ---------- */
.pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: var(--sp-5);
}

.pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--c-card);
  border: 1px solid var(--c-gray);
  border-radius: var(--rd-sm);
  color: var(--c-ink);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.pagination__item:hover,
.pagination__item.is-current {
  background: var(--c-ochre);
  border-color: var(--c-ochre);
  color: var(--c-cream);
}

.pagination__count {
  margin-left: auto;
  font-size: 13px;
  color: var(--c-grayblue);
  font-family: var(--font-mono);
}

/* ---------- 21. 章节滚动高亮 ---------- */
[data-section] {
  box-shadow: inset 3px 0 0 0 transparent;
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

[data-section][data-visible] {
  box-shadow: inset 3px 0 0 0 var(--c-mustard);
  background-color: rgba(230, 185, 79, 0.05);
}

/* ---------- 22. 图片容器基础规则 ---------- */
.img-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--rd-md);
  background: var(--c-gray);
  border: 2px solid var(--c-gray);
  aspect-ratio: 16 / 9;
}

.img-frame--tall {
  aspect-ratio: 4 / 5;
}

.img-frame--square {
  aspect-ratio: 1 / 1;
}

.img-frame::before {
  content: "IMG";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--c-grayblue);
}

.img-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- 23. 响应式 ---------- */
@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--sp-5);
  }

  .footer-brand {
    grid-column: 1 / -1;
    border-bottom: 1px solid rgba(250, 243, 224, 0.15);
    padding-bottom: var(--sp-4);
  }

  .bento__item--span4,
  .bento__item--span5 {
    grid-column: span 6;
  }

  .bento__item--span7,
  .bento__item--span8 {
    grid-column: span 12;
  }
}

@media (max-width: 992px) {
  .filter-layout {
    grid-template-columns: 1fr;
  }

  .filter-layout__sidebar {
    position: static;
  }

  .header-top__meta {
    font-size: 12px;
  }

  /* 移动导航切换 */
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--c-cream);
    border: 2px solid var(--c-ochre);
    border-top: none;
    border-radius: 0 0 var(--rd-md) var(--rd-md);
    box-shadow: var(--shadow-md);
    padding: var(--sp-3) var(--sp-4);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .site-nav[data-open] {
    display: block;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .site-nav__link {
    padding: 12px 14px;
    border-radius: var(--rd-sm);
  }

  .site-nav__link[aria-current="page"]::after {
    left: auto;
    right: 12px;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
  }

  .header-top__inner {
    padding: 5px var(--sp-4);
  }
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-col--contact {
    grid-column: 1 / -1;
  }

  .h-scroll__item {
    width: 240px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

@media (max-width: 640px) {
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }

  .header-top__meta {
    display: none;
  }

  .header-top__inner {
    justify-content: flex-end;
  }

  .header-main {
    padding: 10px var(--sp-4);
  }

  .site-brand__mark {
    width: 38px;
    height: 38px;
    font-size: 19px;
  }

  .site-brand__name {
    font-size: 18px;
  }

  .site-brand__sub {
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-5);
    padding: var(--sp-6) var(--sp-4);
  }

  .footer-bottom__inner {
    flex-direction: column;
    text-align: center;
    gap: var(--sp-2);
  }

  .container,
  .container--wide {
    padding: 0 var(--sp-4);
  }
}

/* ---------- 24. 无障碍与动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-progress__bar {
    transition: none;
  }

  .status-dot {
    animation: none;
  }
}
