/* ============================================================
   公考助手 · 设计系统（浅色 / 移动优先）
   ============================================================ */
:root {
  /* 品牌色 */
  --brand: #3b6fe0;
  --brand-600: #315fc7;
  --primary: #3b6fe0;
  --primary-dark: #315fc7;
  --primary-soft: #eef3ff;
  --primary-softer: #f7faff;
  /* 强调色 */
  --accent: #ff7a59;
  --accent-soft: #fff1ec;
  /* 语义色 */
  --green: #2eb872;
  --green-soft: #e9f9f1;
  --amber: #e8a33a;
  --amber-soft: #fff6e6;
  /* 中性色（对比度按 WCAG AA 调过：辅助文字 ≥ 4.5:1） */
  --text: #1f2a44;
  --text-soft: #55617a;
  --text-muted: #5f6b80;
  --text-faint: #97a2b3;
  --border: #e9eef7;
  --border-soft: #f2f5fb;
  --border-strong: #d8e0ee;
  --bg: #f6f8fc;
  --card: #ffffff;
  /* 形状 */
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(31, 42, 68, 0.04), 0 3px 10px rgba(59, 111, 224, 0.05);
  --shadow: 0 2px 8px rgba(31, 42, 68, 0.06), 0 10px 26px rgba(59, 111, 224, 0.07);
  --shadow-hover: 0 10px 28px rgba(59, 111, 224, 0.14);
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* 固定底部导航高度（窄屏时给 body 预留，避免遮挡内容） */
  --bar-h: 74px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI Emoji", "Apple Color Emoji",
    "Noto Color Emoji", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  /* 撑满视口：内容少时页脚贴底，不出现「上方一点内容 + 下方大片空白」 */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--bar-h) + var(--safe-b));
  /* 兜底：任何一处内容超出屏宽都不该把固定底栏/弹层顶出屏幕（clip 不产生滚动容器，不影响 sticky） */
  overflow-x: clip;
}
main.container { flex: 1 0 auto; width: 100%; min-width: 0; }
footer.site-footer { flex-shrink: 0; }

a { color: var(--primary); text-decoration: none; transition: color .15s; }
img { max-width: 100%; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 14px; }
::selection { background: var(--primary-soft); }

:focus-visible { outline: 2px solid rgba(59, 111, 224, .55); outline-offset: 2px; border-radius: 8px; }

/* 减少动效偏好：关掉装饰性动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================ 顶栏 ============================ */
header.site-header {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 60;
}
.header-inner {
  max-width: 1080px; margin: 0 auto; padding: 10px 14px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 8px; color: var(--text); }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand), #6a97f0);
  color: #fff; font-size: 15px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(59, 111, 224, .3);
}
.logo-text { font-size: 16px; font-weight: 800; letter-spacing: .3px; }

.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary-soft); color: var(--primary);
  border: none; border-radius: 999px; padding: 7px 14px;
  font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.pill-btn:hover { background: #e3ebff; }
.search-inline { display: flex; align-items: center; gap: 6px; }
.search-inline input {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 13px; width: 150px; outline: none; color: var(--text);
}
.search-inline input:focus { border-color: var(--brand); }
.search-inline button {
  border: none; background: var(--brand); color: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--border); background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text-soft);
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }

nav.main-nav {
  order: 3; width: 100%; display: flex; gap: 4px;
  overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none;
}
nav.main-nav::-webkit-scrollbar { display: none; }
nav.main-nav a {
  color: var(--text-soft); padding: 6px 13px; border-radius: 999px;
  font-size: 13.5px; white-space: nowrap; transition: .15s;
}
nav.main-nav a:hover { background: var(--primary-softer); color: var(--brand); }
nav.main-nav a.active { background: var(--primary-soft); color: var(--brand); font-weight: 800; }

/* 宽屏：logo / 导航 / 工具同一行，避免左侧堆叠、中间大片留白 */
@media (min-width: 861px) {
  nav.main-nav { order: 0; width: auto; flex: 1; margin-left: 18px; padding: 0; }
  .header-tools { margin-left: 0; }
}

/* 考试页的紧凑顶栏（不吸顶、无主导航，让答题工具条接管顶部） */
header.site-header.compact { position: static; }
header.site-header.compact .header-inner { padding: 12px 14px; }
header.site-header.compact .header-tools { gap: 10px; }
.back-link { font-size: 13.5px; color: var(--text-soft); font-weight: 600; }
.back-link:hover { color: var(--brand); }

/* ============================ 底部导航 ============================ */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  max-width: 100%;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex; padding: 6px calc(6px + env(safe-area-inset-right)) calc(6px + var(--safe-b)) calc(6px + env(safe-area-inset-left));
}
.bottom-nav a {
  flex: 1 1 0; min-width: 0; text-align: center; color: var(--text-muted); font-size: 11px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; transition: color .15s;
}
.bottom-nav a .ic { font-size: 20px; line-height: 1.2; }
.bottom-nav a.active { color: var(--brand); font-weight: 800; }

/* ============================ 通用 ============================ */
.page-title { margin: 20px 0 12px; font-size: 21px; font-weight: 800; letter-spacing: .2px; line-height: 1.4; }
.page-title small { color: var(--text-muted); font-weight: 400; font-size: 13px; margin-left: 8px; }
.page-sub { font-size: 13px; color: var(--text-muted); margin: -4px 0 14px; }
.section { margin-bottom: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; }
.section-head h2 { font-size: 16.5px; font-weight: 800; position: relative; padding-left: 12px; }
.section-head h2::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 15px; border-radius: 4px;
  background: linear-gradient(180deg, var(--brand), #7ba3f2);
}
.section-head a { font-size: 13px; color: var(--primary); }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: minmax(0, 1fr); }
.grid-3 { grid-template-columns: minmax(0, 1fr); }
/* 卡片流统一行高：同排卡片等高，底部操作行对齐。
   注意用 minmax(0,1fr) 而不是 1fr：1fr 的最小值是 min-content，
   金句出处这类 nowrap 长文本会把轨道顶宽，导致整页横向溢出（手机端弹层/底栏右侧被切） */
.grid-2 { grid-auto-rows: 1fr; align-items: stretch; }
.grid > * { min-width: 0; }
@media (min-width: 641px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 861px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.badge-tag {
  display: inline-block; background: var(--primary-soft); color: var(--primary);
  font-size: 12px; padding: 1px 9px; border-radius: 999px; margin-right: 6px;
}
.badge-tag.soft { background: var(--bg); color: var(--text-soft); }
.muted { color: var(--text-muted); font-size: 13px; }
.empty {
  text-align: center; color: var(--text-muted); padding: 46px 24px; font-size: 14px;
  background: #fff; border: 1px dashed var(--border-strong); border-radius: var(--radius);
  line-height: 1.9;
}
.empty::before { content: "🗒️"; display: block; font-size: 38px; margin-bottom: 8px; opacity: .75; }
.list-total { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }

/* ============================ 文章卡片 ============================ */
.article-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 16px; margin-bottom: 11px; box-shadow: var(--shadow-sm); transition: .18s;
}
.article-item:hover, .article-item:active { box-shadow: var(--shadow-hover); border-color: #dbe6fb; transform: translateY(-1px); }
.article-item h3 { font-size: 15.5px; margin-bottom: 5px; line-height: 1.55; font-weight: 700; }
.article-item h3 a { color: var(--text); }
.article-item h3 a:hover { color: var(--primary); }
.article-item .summary {
  color: var(--text-soft); font-size: 13.5px; margin: 5px 0; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.article-item .meta { color: var(--text-muted); font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ============================ 首页 ============================ */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #eaf1ff 0%, #f6f9ff 55%, #fff3ee 100%);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px 20px; margin-top: 16px;
  display: flex; flex-direction: column; gap: 16px;
}
.hero::after {
  content: ""; position: absolute; right: -40px; top: -40px;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(59,111,224,.14), transparent 70%);
}
.hero h1 { font-size: 23px; margin-bottom: 6px; font-weight: 800; }
.hero p { color: var(--text-soft); font-size: 13.5px; }
.hero .stats { display: flex; gap: 22px; }
.hero .stats div { text-align: center; }
.hero .stats b { font-size: 22px; display: block; color: var(--primary); font-weight: 800; }
.hero .stats span { font-size: 12px; color: var(--text-muted); }
@media (min-width: 641px) {
  .hero { flex-direction: row; align-items: center; justify-content: space-between; padding: 28px 30px; }
}

.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 4px; }
@media (min-width: 641px) { .cat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.cat-grid a {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 15px 6px; text-align: center; box-shadow: var(--shadow-sm); transition: .15s; min-width: 0;
}
.cat-grid a:hover { border-color: #cddffb; box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.cat-grid .ic { font-size: 23px; display: block; margin-bottom: 5px; }
.cat-grid .nm { font-size: 12.5px; color: var(--text-soft); font-weight: 600; }

/* ============================ chips ============================ */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; }
.cat-tabs a {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 5px 14px; font-size: 13px; color: var(--text-soft);
}
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips a {
  white-space: nowrap; padding: 7px 16px; border: 1px solid var(--border);
  border-radius: 999px; font-size: 13.5px; color: var(--text-soft); background: #fff; transition: .15s;
}
.cat-chips a:hover { border-color: #cddffb; color: var(--brand); }
.cat-chips a.active { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700; box-shadow: 0 6px 16px rgba(59,111,224,.25); }

/* 时间范围切换：今天 / 近7天 / 全部历史 / 自定义 */
.range-chips {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 4px 0 12px; padding: 10px 14px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
}
.range-chips .rc-label { font-size: 13px; color: var(--text-soft); margin-right: 2px; }
.range-chips a {
  white-space: nowrap; padding: 5px 14px; border: 1px solid var(--border);
  border-radius: 999px; font-size: 13px; color: var(--text-soft); background: #fff; transition: .15s;
}
.range-chips a:hover { border-color: #cddffb; color: var(--brand); }
.range-chips a.active { background: var(--primary-soft); border-color: transparent; color: var(--primary); font-weight: 700; }
.range-chips .rc-date { font-size: 12.5px; color: var(--text-soft); margin-left: auto; }

/* 全国 / 地方 分区：板块标题上的范围徽标 + 分区容器 */
.scope-badge {
  display: inline-block; vertical-align: middle;
  font-size: 11.5px; font-weight: 700; line-height: 1.6;
  padding: 1px 9px; border-radius: 999px; margin-left: 6px;
  border: 1px solid transparent; white-space: nowrap;
}
.scope-badge.national { background: var(--primary-soft); color: var(--primary); }
.scope-badge.local { background: var(--accent-soft); color: var(--accent); }
.scope-head { margin-bottom: 10px; }
.scope-head .scope-note { font-weight: 400; font-size: 12.5px; color: var(--text-soft); }
.scope-block { margin-bottom: 26px; }
.scope-block.is-local { padding-left: 12px; border-left: 3px solid var(--accent-soft); }
.scope-block.is-national { padding-left: 12px; border-left: 3px solid var(--primary-soft); }
.scope-tip {
  font-size: 12.5px; color: var(--text-soft); background: var(--border-soft);
  border-radius: 10px; padding: 8px 12px; margin-bottom: 14px;
}

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-soft); color: var(--primary);
  border-radius: 999px; padding: 4px 12px; font-size: 12.5px;
}
.chip .x { cursor: pointer; font-weight: 700; }
.chip.gray { background: var(--border-soft); color: var(--text-soft); }
.active-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hist-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 20px; }
.hist-row .chip { cursor: pointer; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tag-list a {
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  padding: 4px 13px; font-size: 13px; color: var(--text-soft);
}
.tag-list a:hover { border-color: var(--brand); color: var(--brand); }

/* ============================ 按钮 ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 999px; padding: 10px 20px; min-height: 42px;
  font-size: 14px; cursor: pointer; background: var(--brand); color: #fff;
  transition: .15s; font-weight: 600; line-height: 1; white-space: nowrap;
}
.btn:hover { background: var(--brand-600); color: #fff; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-outline { background: #fff; color: var(--brand); border: 1px solid #cddffb; }
.btn-outline:hover { background: var(--primary-soft); color: var(--brand); }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: #f2653f; }
.btn-sm { padding: 7px 15px; font-size: 13px; min-height: 36px; }
a.btn { color: #fff; }
a.btn.btn-outline { color: var(--brand); }

/* ============================ 筛选 / 分页 ============================ */
.filter-bar {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 14px; display: flex; gap: 10px 12px;
  flex-wrap: wrap; align-items: center; box-shadow: var(--shadow-sm);
}
.filter-bar select, .filter-bar input {
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 13.5px; outline: none; color: var(--text); background: #fff;
  min-height: 36px;
}
.filter-bar input[type="date"] { min-width: 138px; }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59,111,224,.1); }
/* 筛选按钮与输入框拉开距离，不粘在一起 */
.filter-bar .btn { margin-left: auto; }

.pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin: 20px 0 8px; }
.pager button {
  border: 1px solid var(--border-strong); background: #fff; border-radius: 999px;
  padding: 9px 18px; min-height: 40px; cursor: pointer; font-size: 13.5px; color: var(--text-soft); transition: .15s;
}
.pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager button:disabled { opacity: .45; cursor: default; }
.pager span { padding: 6px 8px; color: var(--text-muted); font-size: 13px; }
.pager-end { text-align: center; color: var(--text-faint); font-size: 12.5px; margin: 18px 0 6px; letter-spacing: 1px; }

/* ============================ 文章详情 ============================ */
.read-progress {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 200;
  background: linear-gradient(90deg, var(--brand), #7ba3f2); width: 0; transition: width .12s linear;
}
.article-detail {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px 20px; box-shadow: var(--shadow-sm);
}
.article-detail h1 { font-size: 22px; line-height: 1.5; margin-bottom: 12px; font-weight: 800; letter-spacing: .2px; }
.article-detail .meta {
  color: var(--text-muted); font-size: 12.5px; border-bottom: 1px solid var(--border);
  padding-bottom: 13px; margin-bottom: 16px; display: flex; gap: 12px; flex-wrap: wrap;
}
.article-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.article-body { font-size: 16.5px; line-height: 2; color: #2f3a4f; letter-spacing: .2px; }
.article-body p { margin-bottom: 15px; }
.article-body img { border-radius: 12px; margin: 6px 0; }
@media (min-width: 861px) { .article-body { font-size: 17px; } }

.panel { border-radius: var(--radius); padding: 16px 17px; margin: 16px 0; }
.panel h3 { font-size: 14.5px; margin-bottom: 10px; font-weight: 800; }
.panel-summary { background: var(--primary-softer); border: 1px solid #e2ecfd; }
.panel-summary li { margin-left: 18px; margin-bottom: 5px; }
.panel-quote { background: #fffaf6; border: 1px solid #ffe6da; }
.panel-point { background: var(--green-soft); border: 1px solid #d5f0e0; }

.quote-card {
  border-left: 3px solid var(--accent); padding: 8px 0 8px 13px; margin-bottom: 12px;
  border-radius: 0 8px 8px 0; transition: .15s;
}
.quote-card:hover { background: rgba(255,122,89,.05); }
.quote-card .q { font-size: 15.5px; font-weight: 700; line-height: 1.7; }
.quote-card .desc { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

/* ============================ 每日材料 ============================ */
.daily-mat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; box-shadow: var(--shadow-sm);
}
.daily-mat .dm-tag {
  display: inline-block; background: var(--primary-soft); color: var(--primary);
  font-size: 12px; font-weight: 700; padding: 2px 11px; border-radius: 999px; margin-bottom: 9px;
}
.daily-mat h3 { font-size: 17.5px; font-weight: 800; line-height: 1.5; margin-bottom: 9px; }
.daily-mat .dm-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-muted); margin-bottom: 14px; }
.daily-mat .dm-meta span { background: var(--bg); border-radius: 999px; padding: 2px 10px; }

/* 速记页：右侧历史栏随页滚动，列表过长时自身滚动，避免整页被拉长 */
.two-col > aside { position: sticky; top: 84px; }
#digest-dates { max-height: 360px; overflow: auto; }
#digest-dates a { font-size: 13.5px; }
#digest-dates div { padding: 5px 0; border-bottom: 1px dashed var(--border); }
#digest-dates div:last-child { border-bottom: none; }

/* ============================ 试卷 ============================ */
.paper-hero {
  background: linear-gradient(135deg, #eaf1ff, #fff3ee);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px 18px; margin-top: 16px;
}
.paper-hero h2 { font-size: 19px; margin-bottom: 10px; font-weight: 800; }
.paper-hero .meta { color: var(--text-soft); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.paper-hero .btn { margin-right: 8px; margin-top: 4px; }

/* ============================ 试卷（只读看题） ============================ */
.material-panel {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow-sm);
}
.material-panel h3 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.material-panel .mat { font-size: 15px; line-height: 1.95; color: #37414f; white-space: pre-wrap; }

.question-block {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
  scroll-margin-top: 120px;
}
.q-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.q-head .q-no {
  width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 13.5px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.q-head .q-score { font-size: 12.5px; color: var(--accent); font-weight: 700; }
.question-block .q-stem { font-weight: 600; margin-bottom: 12px; line-height: 1.85; font-size: 15.5px; color: #2b3549; }

.option {
  display: flex; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 8px; background: #fdfefe; font-size: 14.5px;
}
.option.correct { border-color: var(--green); background: var(--green-soft); }
.option .key { font-weight: 800; color: var(--brand); }
.option.correct .key { color: var(--green); }
.option .opt-mark { margin-left: auto; color: var(--green); font-weight: 800; }

/* 正确答案 + 解析（只读展示，无需作答） */
.q-answer {
  margin-top: 10px; background: var(--bg); border-radius: var(--radius-sm);
  padding: 12px 13px; font-size: 13.5px; line-height: 1.75;
}
.q-answer .ak { color: var(--green); font-weight: 800; }
.q-answer .an { margin-top: 6px; color: var(--text-soft); }

.ref-analysis { margin-top: 6px; color: var(--text-soft); }
.reference {
  margin-top: 12px; background: var(--green-soft); border: 1px solid #d5f0e0;
  border-radius: var(--radius-sm); padding: 13px 14px; font-size: 14px; line-height: 1.85;
}
.reference h4 { font-size: 13.5px; margin-bottom: 6px; color: var(--green); }

.q-nav { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0 6px; }
.q-nav .btn { flex: 1; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 901px) { .two-col { grid-template-columns: minmax(0, 1fr) 240px; } }

/* ============================ 弹层 ============================ */
.overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center; padding: 0;
  max-width: 100%; overflow: hidden;
}
@media (min-width: 641px) { .overlay { align-items: center; padding: 24px; } }
.sheet {
  background: #fff; width: 100%; max-width: 520px; min-width: 0;
  border-radius: 22px 22px 0 0; padding: 20px 20px calc(16px + var(--safe-b));
  animation: sheetUp .22s ease; display: flex; flex-direction: column;
  max-height: min(88vh, 680px); overflow: hidden;
}
@media (min-width: 641px) { .sheet { border-radius: 22px; max-height: min(84vh, 620px); } }
@keyframes sheetUp { from { transform: translateY(20px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet h3 { font-size: 17.5px; font-weight: 800; margin-bottom: 4px; }
.sheet p { color: var(--text-muted); font-size: 13.5px; line-height: 1.7; margin-bottom: 14px; }
.sheet-x {
  border: 1px solid var(--border); background: #fff; color: var(--text-muted);
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 14px; flex-shrink: 0;
}
.sheet-x:hover { border-color: var(--brand); color: var(--brand); }
.sheet-foot {
  display: flex; gap: 10px; padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--border);
}
.sheet-foot .btn { flex: 1; }
.prov-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 9px;
  flex: 1; overflow: auto; padding: 2px; margin: 0 -2px;
}
.prov-grid button {
  border: 1px solid var(--border-strong); background: #fff; border-radius: var(--radius-sm);
  padding: 9px 4px; min-height: 42px; font-size: 13px; cursor: pointer; color: var(--text-soft);
  transition: .12s; min-width: 0;
  /* 省份名换行显示，不用省略号截断，避免窄屏右侧看着「少了一截」 */
  white-space: normal; line-height: 1.35; word-break: keep-all;
}
.prov-grid button:hover { border-color: var(--brand); color: var(--brand); background: var(--primary-softer); }
.prov-grid button.hot { color: var(--brand); font-weight: 700; }
.prov-grid button.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.modal-mask { position: fixed; inset: 0; z-index: 300; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; padding: 22px; }
.modal { background: #fff; border-radius: var(--radius-lg); max-width: 380px; width: 100%; padding: 22px; box-shadow: var(--shadow); animation: sheetUp .18s ease; }
.modal h4 { font-size: 16.5px; margin-bottom: 8px; font-weight: 800; }
.modal p { color: var(--text-soft); font-size: 14px; margin-bottom: 18px; line-height: 1.7; }
.modal .row { display: flex; gap: 10px; }
.modal .row .btn { flex: 1; }

/* ============================ 骨架屏 / 返回顶部 ============================ */
.skeleton {
  background: linear-gradient(90deg, var(--border-soft) 25%, #f8fafd 37%, var(--border-soft) 63%);
  background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 11px; box-shadow: var(--shadow-sm); }
.sk-line { height: 13px; margin-bottom: 11px; }
.sk-line:last-child { margin-bottom: 0; }
.w40 { width: 40%; } .w60 { width: 60%; } .w80 { width: 80%; }

.back-top {
  position: fixed; right: 16px; bottom: calc(86px + var(--safe-b)); z-index: 80;
  width: 44px; height: 44px; border-radius: 50%; background: #fff;
  border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--brand);
  font-size: 18px; display: none; align-items: center; justify-content: center; cursor: pointer;
}
.back-top.show { display: flex; }
@media (min-width: 769px) { .back-top { bottom: 28px; } }

/* ============================ 工具 ============================ */
.tool-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 8px; }
.tool-head h3 { font-size: 15px; font-weight: 800; }
.tool-head .link { font-size: 13px; color: var(--text-muted); cursor: pointer; }
.load-more-btn {
  display: block; width: 100%; text-align: center; padding: 12px 0; margin: 6px 0 20px;
  background: #fff; border: 1px solid var(--border); border-radius: 999px;
  color: var(--brand); font-size: 14px; cursor: pointer;
}
footer.site-footer {
  text-align: center; color: var(--text-muted); font-size: 12.5px; line-height: 1.9;
  padding: 22px 16px 14px; margin-top: 26px; border-top: 1px solid var(--border);
}

/* ============================ 金句卡片 ============================ */
.quote-item {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  gap: 8px; height: 100%; transition: .16s;
}
.quote-item:hover { box-shadow: var(--shadow-hover); border-color: #dbe6fb; transform: translateY(-1px); }
.quote-item .quote-card { border-left: 3px solid var(--accent); padding: 2px 0 2px 13px; margin: 0; }
.quote-item .qi-foot {
  margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: var(--text-muted);
}
.quote-item .qi-foot .src {
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.quote-item .qi-foot .btn { flex: 0 0 auto; }

/* ============================ 响应式 ============================ */
@media (max-width: 640px) {
  .search-inline { display: none; }
  .logo-text { font-size: 15px; }
  .page-title { font-size: 19.5px; }
}
@media (min-width: 641px) {
  .icon-btn.only-mobile { display: none; }
}
@media (min-width: 769px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
}
