:root {
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --surface-soft: #F3EFE7;
  --border: #E7E1D6;
  --border-strong: #D5CCBC;
  --text: #1F1E1B;
  --text-secondary: #5A554D;
  --text-muted: #847D72;

  --primary: #1F4E5F;
  --primary-hover: #173C4A;
  --primary-soft: #EAF2F4;
  --seal: #B44332;
  --seal-soft: #FBF0EE;

  /* 四本教材雅致色标 */
  --book-indigo-bg: #EDF3F7;
  --book-indigo-fg: #1F4E5F;
  --book-indigo-bd: #C4D8E2;

  --book-teal-bg: #ECF5F1;
  --book-teal-fg: #1F5B48;
  --book-teal-bd: #BEE0D2;

  --book-crimson-bg: #FBF0EE;
  --book-crimson-fg: #A13829;
  --book-crimson-bd: #ECCBC5;

  --book-ochre-bg: #F9F3E6;
  --book-ochre-fg: #8A5A17;
  --book-ochre-bd: #E6D3B0;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(31, 30, 27, 0.04);
  --shadow-md: 0 8px 24px rgba(31, 30, 27, 0.07);
  --shadow-lg: 0 18px 46px rgba(31, 30, 27, 0.14);

  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 顶部导航 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none !important;
}

.seal {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--seal);
  color: #FAF8F4;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1.5px rgba(250, 248, 244, 0.35);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 1px;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 按钮体系 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--primary-hover);
  text-decoration: none;
}

.btn-outline {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

.btn-ghost {
  background: var(--seal-soft);
  color: var(--seal);
  border-color: rgba(180, 67, 50, 0.22);
}

.btn-ghost:hover {
  background: #F6E2DF;
  text-decoration: none;
}

.btn-subtle {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-subtle:hover {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

.dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--seal);
  display: inline-block;
}

.main-wrap {
  flex: 1;
}

/* 首屏 Hero */
.hero {
  padding: 36px 0 26px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(250, 248, 244, 0) 100%);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-kicker {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--seal);
  font-weight: 500;
  letter-spacing: 0.4px;
}

.hero-title {
  margin: 0 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.6px;
  color: var(--text);
}

.hero-desc {
  margin: 0;
  max-width: 720px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.stat-num {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 搜索与筛选 */
.controls-wrap {
  padding-top: 24px;
  padding-bottom: 12px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 15px;
  color: var(--text);
  outline: none;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 78, 95, 0.1);
}

.clear-search-btn {
  position: absolute;
  right: 12px;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--text-secondary);
  font-size: 12px;
}

.filter-rows {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 12.5px;
  color: var(--text-muted);
  min-width: 32px;
  flex-shrink: 0;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 13px;
  transition: all 0.15s ease;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.chip.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

.book-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.dot-indigo { background: var(--book-indigo-fg); }
.dot-teal { background: var(--book-teal-fg); }
.dot-crimson { background: var(--book-crimson-fg); }
.dot-ochre { background: var(--book-ochre-fg); }
.chip.active .book-dot { background: #FFFFFF; }

.list-status-bar {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

.link-btn {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 13px;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

/* 题目卡片网格 */
.question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 8px 0 36px;
}

.q-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.q-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.q-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.q-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.badge-form {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-year {
  background: var(--surface-soft);
  color: var(--text-secondary);
}

.badge-universal {
  background: #F5F2EB;
  color: var(--text-muted);
  font-weight: 400;
}

.q-chars {
  font-size: 12px;
  color: var(--text-muted);
}

.q-card-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.42;
  color: var(--text);
}

.q-card-excerpt {
  margin: 0;
  font-size: 13.8px;
  color: var(--text-secondary);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.q-card-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-book-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mini-book-tag {
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid transparent;
}

.tag-indigo { background: var(--book-indigo-bg); color: var(--book-indigo-fg); border-color: var(--book-indigo-bd); }
.tag-teal { background: var(--book-teal-bg); color: var(--book-teal-fg); border-color: var(--book-teal-bd); }
.tag-crimson { background: var(--book-crimson-bg); color: var(--book-crimson-fg); border-color: var(--book-crimson-bd); }
.tag-ochre { background: var(--book-ochre-bg); color: var(--book-ochre-fg); border-color: var(--book-ochre-bd); }

.verify-ok {
  font-size: 12px;
  color: #266A4E;
  font-weight: 500;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 32px;
}

.empty-title {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}

.empty-sub {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* 教材版本说明带 */
.books-band {
  padding-top: 12px;
  padding-bottom: 48px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 20px;
}

.section-head p {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.books-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.catalog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.catalog-abbr {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.catalog-info h3 {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 600;
}

.catalog-info p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* 详情页吸顶工具条 */
.detail-sticky-bar {
  position: sticky;
  top: 64px;
  z-index: 30;
  background: rgba(250, 248, 244, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.detail-bar-inner {
  min-height: 54px;
  padding-top: 8px;
  padding-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.back-btn {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.back-btn:hover {
  background: var(--surface-soft);
}

.mode-switch {
  display: inline-flex;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.mode-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
  transition: all 0.16s ease;
}

.mode-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 1px 4px rgba(31, 78, 95, 0.25);
}

/* 详情正文区 */
.detail-article {
  max-width: 820px;
  padding-top: 28px;
  padding-bottom: 56px;
}

.detail-header {
  margin-bottom: 22px;
}

.detail-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.detail-title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.35;
  color: var(--text);
}

.detail-verify-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.mode-tip {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.sample-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11.5px;
  background: var(--book-indigo-bg);
  color: var(--book-indigo-fg);
  border: 1px solid var(--book-indigo-bd);
}

.answer-paper {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow-sm);
}

.answer-body p {
  margin: 0 0 18px;
  font-size: 16.5px;
  line-height: 1.95;
  color: #24221E;
  text-align: justify;
}

.answer-body p:last-child {
  margin-bottom: 0;
}

/* 正文行内教材页码胶囊 */
.cite-pill {
  display: inline-flex;
  align-items: center;
  vertical-align: baseline;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.3;
  padding: 1px 6px;
  margin: 0 2px;
  border-radius: 5px;
  border: 1px solid transparent;
  transform: translateY(-1px);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cite-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.cite-pill.active-pill {
  box-shadow: 0 0 0 2px rgba(31, 78, 95, 0.25);
}

/* 详情下挂区块 */
.detail-block {
  margin-top: 28px;
}

.block-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.block-header h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 19px;
}

.block-hint {
  font-size: 12.5px;
  color: var(--text-muted);
}

.book-groups-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
}

.bg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.bg-title {
  font-weight: 600;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.bg-count {
  font-size: 12px;
  color: var(--text-muted);
}

.bg-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.page-chip {
  font-size: 12.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.bg-chapters {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.bg-edition {
  margin: 6px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* 跨教材取舍卡 */
.notes-block .notes-body {
  background: #F6F3EC;
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  font-size: 14.5px;
  line-height: 1.8;
  color: #34312C;
}

.notes-body p {
  margin: 0 0 12px;
}

.notes-body p:last-child {
  margin-bottom: 0;
}

/* 折叠书证明细 */
.cite-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.cite-details-summary {
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.cite-details-summary::-webkit-details-marker {
  display: none;
}

.cite-details-count {
  font-size: 12.5px;
  color: var(--text-muted);
}

.all-citations-list {
  margin: 0;
  padding: 6px 18px 16px 36px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.all-citations-list li {
  margin-bottom: 4px;
}

.all-citations-list code {
  font-size: 12px;
  background: var(--surface-soft);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--primary);
}

/* 上下题导航 */
.detail-pager {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.pager-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: left;
  color: var(--text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.pager-btn:hover:not(:disabled) {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pager-next {
  text-align: right;
}

.pager-dir {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pager-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 底部点题条 */
.inline-cta {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.inline-cta strong {
  display: block;
  font-size: 15px;
  margin-bottom: 3px;
}

.inline-cta p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

/* 书证页码浮卡（移动端自动变底部抽屉） */
.popover-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 19, 17, 0.25);
  z-index: 60;
}

.cite-popover {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: min(480px, calc(100vw - 28px));
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-lg);
  z-index: 70;
}

.popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.popover-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.popover-close {
  border: none;
  background: var(--surface-soft);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
}

.popover-title {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 18px;
}

.popover-meta {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.popover-loc {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.loc-label {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.loc-value {
  font-size: 14.5px;
  color: var(--text);
}

.popover-foot {
  margin: 12px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* 通用弹窗 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 19, 17, 0.42);
}

.modal-card {
  position: relative;
  z-index: 81;
  width: min(540px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-lg);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 20px;
}

.modal-body {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.modal-body p {
  margin: 0 0 12px;
}

.step-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
}

.step-item {
  display: flex;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
}

.step-no {
  flex-shrink: 0;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.step-item strong {
  display: block;
  color: var(--text);
  margin-bottom: 3px;
}

.step-item p {
  margin: 0;
  font-size: 13.5px;
}

.modal-note {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 0 !important;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  background: #1F1E1B;
  color: #FAF8F4;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13.5px;
  z-index: 95;
  box-shadow: var(--shadow-md);
}

/* 页脚 */
.site-footer {
  border-top: 1px solid var(--border);
  background: #F4F0E8;
  padding: 28px 0 36px;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand strong {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--text);
}

.footer-brand p,
.footer-legal p {
  margin: 4px 0 0;
  line-height: 1.65;
}

.footer-legal {
  color: var(--text-muted);
  font-size: 12.5px;
}

/* 响应式适配（手机端优先体验） */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .brand-sub {
    display: none;
  }

  .hide-xs {
    display: none;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-grid,
  .books-catalog-grid,
  .book-groups-grid {
    grid-template-columns: 1fr;
  }

  .answer-paper {
    padding: 20px 18px;
    border-radius: var(--radius-md);
  }

  .answer-body p {
    font-size: 15.8px;
    line-height: 1.9;
    text-align: left;
  }

  .detail-bar-inner {
    gap: 8px;
  }

  .mode-btn {
    padding: 5px 11px;
    font-size: 12.5px;
  }

  .copy-btn {
    padding: 0 10px;
    font-size: 12.5px;
  }

  .detail-pager {
    grid-template-columns: 1fr;
  }

  .pager-next {
    text-align: left;
  }

  .cite-popover {
    bottom: 0;
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
}
