/* ==========================================================
   考点全集 · 民大812经济学背诵 · 样式
   配色:红白(主色取自书封面 #C01920)+ 米白护眼底
   移动端优先
   ========================================================== */

:root {
  --red:        #C01920;   /* 主色·封面红 */
  --red-deep:   #A3141C;   /* 按下/深红 */
  --red-soft:   #FBEDEE;   /* 浅红填充 */
  --red-line:   #F0D9DA;   /* 浅红描边 */
  --cream:      #FAF7F2;   /* 米白背景(护眼) */
  --paper:      #FFFFFF;   /* 卡片白 */
  --ink:        #2B2B2B;   /* 正文近黑 */
  --ink-soft:   #6E6E6E;   /* 次要文字 */
  --line:       #ECE7DF;   /* 分隔线 */
  --gold:       #B8860B;   /* 真题年份点缀 */
  --ok:         #C0392B;   /* 状态色沿用红系 */
  --shadow:     0 4px 16px rgba(192, 25, 32, 0.08);
  --radius:     14px;
  --maxw:       480px;
  --tabbar-h:   58px;
  --topbar-h:   50px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  /* 阅读区衬线字体(题目/答案,贴近纸质书,适合长时间背诵) */
  --font-serif: "Songti SC", "SimSun", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow-x: hidden; }
body {
  background: #E4DED4;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  position: relative;
  max-width: var(--maxw);
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.08);
  overflow: hidden;
}

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

/* 长题干/长公式不能撑宽移动端页面 */
.today-card,
.resume-card,
.flash-entry,
.feedback-entry,
.q-card,
.detail-head,
.answer-box,
.weak-item,
.picker-item,
.flash-card,
.flash-face,
.consult-table {
  max-width: 100%;
}
.today-card__q,
.q-card__q,
.detail-q,
.answer-box p,
.flash-q,
.flash-a,
.weak-item__q,
.picker-item__q,
.chat-bubble,
.overview-page__desc {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.katex {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  vertical-align: middle;
}
.katex-display {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: .12em 0 .24em;
  -webkit-overflow-scrolling: touch;
}
.katex-display > .katex {
  display: inline-block;
  max-width: none;
}
.answer-box .katex-display,
.flash-a .katex-display {
  font-size: .94em;
  text-align: left;
}
.today-card__q .katex,
.q-card__q .katex,
.flash-q .katex {
  font-size: .92em;
}
table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  -webkit-overflow-scrolling: touch;
}

/* ---------- 顶栏 ---------- */
.topbar {
  height: var(--topbar-h);
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 4px;
  padding: 0 14px;
  padding-top: env(safe-area-inset-top);
  background: var(--paper);
  color: var(--red-deep);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar-title { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.topbar-title--slogan { display: flex; align-items: center; gap: 8px; line-height: 1.2; letter-spacing: 0; }
.topbar-title__main {
  flex: 0 1 auto; min-width: 0;
  font-size: 16px; font-weight: 800; color: var(--red-deep);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.topbar-title__sub {
  flex: 0 0 auto;
  font-size: 11.5px; font-weight: 600; color: var(--red-deep);
  background: var(--red-soft); border: 1px solid var(--red-line);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap; letter-spacing: .2px;
}
.back-btn { background: none; border: none; color: var(--red-deep); font-size: 30px; line-height: 1; cursor: pointer; width: 30px; margin-left: -6px; }

@media (max-width: 360px) {
  .topbar-title--slogan { gap: 6px; }
  .topbar-title__main { font-size: 15px; }
  .topbar-title__sub { font-size: 10.5px; padding: 2px 6px; }
}

/* ---------- 内容区 ---------- */
.content {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: 16px 16px 24px;
}
/* AI 问答页:聊天区自适应、输入框贴底(不受内容区内边距影响) */
.content:has(#view-chat.view--active) { padding: 0; }
.view { display: none; animation: fade .2s ease; }
.view--active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }

.section-title { font-size: 15px; font-weight: 700; color: var(--ink); margin: 22px 2px 12px; position: relative; padding-left: 12px; }
.section-title::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 4px; border-radius: 2px; background: var(--red); }

/* ============ 首页 ============ */
.home-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 2px 2px 0;
}
.home-bar__left { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.home-bar__brand { font-size: 12px; color: var(--ink-soft); letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-bar__hello { font-size: 18px; font-weight: 700; color: var(--ink); }
.home-bar__countdown {
  flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--red-deep);
  background: var(--red-soft); border: 1px solid var(--red-line);
  padding: 6px 12px; border-radius: 20px; white-space: nowrap;
}

.today-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
  cursor: pointer; border-left: 4px solid var(--red);
}
.home-task-panel {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(104px, .76fr) minmax(0, 1.24fr);
  gap: 0;
  align-items: stretch;
  background: linear-gradient(135deg, #fff 0%, #fff 62%, #fff7f7 100%);
  border: 1px solid var(--red-line);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow);
}
.review-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  background: transparent;
  border: none;
  border-right: 1px solid var(--red-line);
  border-radius: 10px 0 0 10px;
  padding: 8px 12px 8px 4px;
  cursor: pointer;
}
.review-card:active { transform: scale(.99); background: var(--red-soft); }
.review-card__label { font-size: 12px; font-weight: 800; color: var(--red-deep); }
.review-card__count { font-size: 24px; line-height: 1.1; color: var(--red); letter-spacing: .2px; }
.review-card__hint { font-size: 12px; line-height: 1.45; color: var(--ink-soft); }
.today-card--task {
  min-width: 0;
  padding: 8px 4px 8px 12px;
  background: transparent;
  border: none;
  border-left-width: 0;
  border-radius: 0 10px 10px 0;
  box-shadow: none;
}
.today-card__head { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.today-card__tag { font-size: 12px; font-weight: 700; color: #fff; background: var(--red); padding: 3px 10px; border-radius: 20px; }
.today-card__type { font-size: 12px; color: var(--ink-soft); border: 1px solid var(--line); padding: 2px 8px; border-radius: 10px; }
.today-card__refresh {
  margin-left: auto; flex: 0 0 auto;
  background: none; border: none; cursor: pointer;
  font-size: 12.5px; color: var(--red); font-weight: 600;
  padding: 4px 7px; border-radius: 8px; transition: background .15s ease;
}
.today-card__refresh:active { background: var(--red-soft); }
.today-card__q {
  font-size: 15px; font-weight: 700; line-height: 1.5; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.today-card--locked .today-card__q { color: var(--red-deep); }
.today-card--locked .today-card__go { color: var(--red-deep); }
.today-card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--ink-soft); }
.today-card__meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-card__go { flex: 0 0 auto; color: var(--red); font-weight: 700; font-size: 13px; }

.resume-card {
  width: 100%; margin-top: 12px; text-align: left;
  display: flex; flex-direction: column; gap: 3px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 16px; cursor: pointer;
}
.resume-card__label { font-size: 12px; color: var(--ink-soft); }
.resume-card__q { font-size: 15px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.feedback-entry {
  width: 100%; margin-top: 14px; text-align: left;
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); border: 1px solid var(--red-line);
  border-radius: var(--radius); padding: 14px 16px; cursor: pointer;
  box-shadow: var(--shadow); transition: all .15s ease;
}
.feedback-entry:active { transform: scale(.99); background: var(--red-soft); }
.feedback-entry--home,
.feedback-entry--study { display: none; }
.feedback-entry__icon { font-size: 22px; flex: 0 0 auto; }
.feedback-entry__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.feedback-entry__title { font-size: 15px; font-weight: 700; color: var(--red-deep); }
.feedback-entry__sub { font-size: 12px; color: var(--ink-soft); line-height: 1.5; }
.feedback-entry__go { color: var(--red); font-size: 22px; flex: 0 0 auto; }

.feedback-fab {
  position: absolute;
  right: 16px;
  bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom));
  z-index: 70;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(192,25,32,.30);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
}
.feedback-fab[hidden] { display: none; }
.feedback-fab:active { transform: scale(.96); }
.feedback-fab__icon { font-size: 18px; line-height: 1; }
.feedback-fab__text { font-size: 12px; line-height: 1.15; font-weight: 800; }
.feedback-fab--detail {
  bottom: calc(var(--tabbar-h) + 118px + env(safe-area-inset-bottom));
}

.flash-entry {
  width: 100%; margin-top: 20px; text-align: left;
  display: flex; align-items: center; gap: 12px;
  background: var(--red-soft); border: 1px solid var(--red-line);
  border-radius: var(--radius); padding: 14px 16px; cursor: pointer;
}
.flash-entry__icon { font-size: 22px; }
.flash-entry__text { flex: 1; display: flex; flex-direction: column; }
.flash-entry__title { font-size: 15px; font-weight: 700; color: var(--red-deep); }
.flash-entry__sub { font-size: 12px; color: var(--ink-soft); }
.flash-entry__go { color: var(--red); font-size: 22px; }

/* 主推的放大闪卡入口(首页) */
.flash-entry--hero {
  margin-top: 14px; gap: 14px; padding: 22px 20px; align-items: center;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  border: none; box-shadow: 0 6px 18px rgba(192,25,32,.28);
}
.flash-entry--hero:active { transform: scale(.99); }
.flash-entry--hero .flash-entry__icon { font-size: 34px; }
.flash-entry--hero .flash-entry__title { font-size: 19px; color: #fff; margin-bottom: 4px; }
.flash-entry--hero .flash-entry__sub { font-size: 12.5px; color: rgba(255,255,255,.9); line-height: 1.5; }
.flash-entry--hero .flash-entry__go { color: #fff; font-size: 26px; }

/* ============ 背诵列表 ============ */
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 24px; padding: 10px 16px; margin-bottom: 14px;
}
.search-box__input { flex: 1; border: none; outline: none; font-size: 15px; background: none; color: var(--ink); }

.filter-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  flex: 0 0 auto; white-space: nowrap;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 20px; padding: 7px 16px; font-size: 14px; color: var(--ink-soft);
  cursor: pointer; transition: all .15s ease;
}
.filter-tab--active { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.filter-tab__cnt {
  display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px;
  font-size: 11px; line-height: 17px; text-align: center;
  background: var(--red-soft); color: var(--red-deep); border-radius: 9px; font-weight: 600;
}
.filter-tab--active .filter-tab__cnt { background: rgba(255,255,255,.25); color: #fff; }

.q-list { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.q-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; cursor: pointer; transition: all .15s ease;
}
.q-card:active { transform: scale(.99); box-shadow: var(--shadow); }
.q-card__top { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.q-card__chapter { max-width: 100%; overflow-wrap: anywhere; font-size: 12px; color: var(--red); background: var(--red-soft); padding: 2px 8px; border-radius: 10px; }
.q-card__type { font-size: 11px; color: var(--ink-soft); border: 1px solid var(--line); padding: 1px 7px; border-radius: 9px; }
.q-card__badge { flex: 0 0 auto; font-size: 11px; padding: 1px 8px; border-radius: 9px; font-weight: 600; margin-left: auto; }
.q-card__q { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.55; }
.q-card__years { font-size: 12px; color: var(--gold); margin-top: 8px; }

.badge--mastered { background: rgba(192,25,32,.10); color: var(--red); }
.badge--fuzzy    { background: rgba(184,134,11,.14); color: var(--gold); }
.badge--forgot   { background: rgba(120,120,120,.14); color: #666; }

.empty-tip { text-align: center; color: var(--ink-soft); font-size: 14px; margin-top: 40px; }

/* ============ 详情 ============ */
.detail-head { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.detail-meta { font-size: 13px; color: var(--red); font-weight: 600; }
.detail-q { font-family: var(--font-serif); font-size: 21px; font-weight: 700; margin: 8px 0; line-height: 1.5; letter-spacing: .3px; }
.detail-badges { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.detail-badges::-webkit-scrollbar { display: none; }
.detail-badges .b { flex: 0 0 auto; white-space: nowrap; font-size: 12px; padding: 2px 10px; border-radius: 10px; }
.detail-badge-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: nowrap; overflow: hidden; }
.detail-badge-row .detail-badges { flex: 1 1 auto; min-width: 0; }
.b--type { background: var(--red-soft); color: var(--red-deep); }
.b--year { background: rgba(184,134,11,.12); color: var(--gold); }
.b--star { background: rgba(192,25,32,.10); color: var(--red); }
.related-badge {
  border: none;
  background: var(--paper);
  color: var(--red-deep);
  border: 1px solid var(--red-line);
  font-weight: 700;
  cursor: pointer;
}
.related-badge:disabled {
  opacity: .58;
  cursor: default;
}
.related-badge:not(:disabled):active {
  background: var(--red-soft);
}

.seg { display: flex; background: var(--red-soft); border-radius: 12px; padding: 4px; margin: 16px 0 14px; }
.seg__btn { flex: 1; border: none; background: none; padding: 9px 0; font-size: 14px; font-weight: 600; color: var(--ink-soft); border-radius: 9px; cursor: pointer; transition: all .15s ease; }
.seg__btn--active { background: var(--red); color: #fff; box-shadow: 0 2px 8px rgba(192,25,32,.25); }

.speak-btn {
  flex: 0 0 auto;
  border: 1px solid var(--red-line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--red-deep);
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1;
  min-width: 54px;
  padding: 8px 10px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(192,25,32,.08);
}
.speak-btn:active { background: var(--red-soft); transform: scale(.97); }
.speak-btn--playing { background: var(--red); border-color: var(--red); color: #fff; }
.speak-btn:disabled { opacity: .48; cursor: default; transform: none; }
.speak-btn--flash {
  min-width: 54px;
  padding: 8px 9px;
  font-size: 12px;
  box-shadow: none;
}

.answer-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
/* 字号/行距须与闪卡背面 .flash-a 保持一致(统一阅读体验) */
.answer-box p { font-family: var(--font-serif); font-size: 16.5px; line-height: 1.95; color: var(--ink); white-space: pre-wrap; letter-spacing: .2px; }
.hl-mark {
  background: linear-gradient(transparent 42%, rgba(255, 225, 92, .72) 42%);
  border-radius: 3px;
  padding: 0 1px;
  cursor: pointer;
}
.highlight-toolbar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 108px);
  z-index: 90;
  width: min(calc(100% - 34px), 430px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--red-line);
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 24px rgba(43,43,43,.14);
}
.highlight-toolbar[hidden] { display: none; }
.highlight-toolbar__text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--ink-soft);
}
.highlight-toolbar__btn {
  flex: 0 0 auto;
  border: none;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.detail-images { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.detail-images[hidden] { display: none; }
.detail-image {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow);
}
.detail-image img { display: block; width: 100%; height: auto; border-radius: 10px; }
.detail-image figcaption { margin-top: 8px; font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); text-align: center; }

.flash-this-btn {
  width: 100%; margin-top: 14px; padding: 13px 0;
  border: 1.5px dashed var(--red); border-radius: var(--radius);
  background: var(--red-soft); color: var(--red-deep); font-size: 15px; font-weight: 700; cursor: pointer;
}
.flash-this-btn:active { transform: scale(.99); }

.mark-group { display: flex; gap: 10px; }
.mark-btn {
  flex: 1; padding: 12px 0; border-radius: var(--radius); font-size: 15px; font-weight: 600;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink-soft); cursor: pointer; transition: all .15s ease;
}
.mark-btn[data-status="mastered"].mark-btn--on { background: var(--red); border-color: var(--red); color: #fff; }
.mark-btn[data-status="fuzzy"].mark-btn--on    { background: var(--gold); border-color: var(--gold); color: #fff; }
.mark-btn[data-status="forgot"].mark-btn--on   { background: #8a8a8a; border-color: #8a8a8a; color: #fff; }

.related-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.related-chip { background: var(--red-soft); color: var(--red-deep); border: none; border-radius: 16px; padding: 7px 13px; font-size: 13px; cursor: pointer; }
.related-chip:active { background: var(--red); color: #fff; }

/* ============ AI 问答 ============ */
.view--chat.view--active { display: flex; flex-direction: column; height: 100%; }
#view-chat { padding: 0; }
.chat-stream { flex: 1 1 auto; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-bubble { max-width: 82%; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.7; word-break: break-word; }
.chat-bubble--ai { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-bubble--user { align-self: flex-end; background: var(--red); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble--ai.chat-bubble--wide { max-width: 92%; }
.chat-bubble--thinking { color: var(--ink-soft); font-style: italic; }
.chat-bubble--error { border-color: var(--red-line); background: var(--red-soft); color: var(--red-deep); }
.chat-bubble--ai .katex-display { margin: .4em 0; }
.chat-sources { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; }
.chat-sources__title { font-size: 11.5px; color: var(--ink-soft); font-weight: 700; letter-spacing: .3px; }
.chat-source { width: 100%; text-align: left; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.chat-source:active { background: var(--red-soft); }
.chat-source__meta { font-size: 11px; color: var(--red-deep); }
.chat-source__q { font-size: 13px; color: var(--ink); line-height: 1.5; font-weight: 600; }
.chat-input-bar { flex: 0 0 auto; display: flex; gap: 8px; padding: 10px 12px; background: var(--paper); border-top: 1px solid var(--line); }
.chat-input { flex: 1; border: 1px solid var(--line); border-radius: 20px; padding: 10px 16px; font-size: 15px; outline: none; background: var(--cream); color: var(--ink); }
.chat-send { flex: 0 0 auto; padding: 0 20px; border: none; border-radius: 20px; background: var(--red); color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; }
.chat-send:active { background: var(--red-deep); }

/* ============ 我的 ============ */
.overview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ov-card { width: 100%; display: block; font: inherit; color: inherit; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; cursor: pointer; transition: all .15s ease; }
.ov-card__num, .ov-card__label { display: block; }
.ov-card:active { transform: scale(.98); }
.ov-card--active { border-color: var(--red); background: var(--red-soft); }
.ov-card__num { font-size: 26px; font-weight: 800; line-height: 1.2; color: var(--red); }
.ov-card__label { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.ov--fuzzy .ov-card__num { color: var(--gold); }
.ov--forgot .ov-card__num { color: #8a8a8a; }
.ov--none .ov-card__num { color: var(--ink-soft); }
.overview-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.overview-page-head { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.overview-page__label { font-size: 12px; font-weight: 700; color: var(--red); }
.overview-page__title { margin-top: 4px; font-size: 20px; line-height: 1.35; color: var(--ink); }
.overview-page__desc { margin-top: 6px; font-size: 13px; line-height: 1.7; color: var(--ink-soft); }
.overview-page-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; padding-bottom: 10px; }

.weak-tip { font-size: 12px; color: var(--ink-soft); margin: -6px 2px 10px; }
.weak-list { display: flex; flex-direction: column; gap: 10px; max-height: 320px; overflow-y: auto; padding-right: 4px; }
.weak-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 16px; cursor: pointer; }
.weak-item__q { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.weak-item__go { color: var(--ink-soft); font-size: 20px; }

/* ============ 底部导航 ============ */
.tabbar {
  position: relative; z-index: 20; flex: 0 0 var(--tabbar-h); height: var(--tabbar-h);
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: var(--paper); border-top: 1px solid var(--line);
}
.tab { flex: 1; display: flex; align-items: center; justify-content: center; background: none; border: none; cursor: pointer; color: var(--ink-soft); }
.tab__label { font-size: 13px; }
.tab--active { color: var(--red); }
.tab--active .tab__label { font-weight: 700; }
.tab--active { border-top: 2px solid var(--red); margin-top: -1px; }

/* ============ 闪卡全屏 ============ */
.flash-layer { position: fixed; inset: 0; z-index: 100; background: var(--cream); display: flex; flex-direction: column; }
.flash-layer[hidden] { display: none; }
.flash-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; padding-top: calc(env(safe-area-inset-top) + 10px); }
.flash-close { background: none; border: none; font-size: 20px; color: var(--ink-soft); cursor: pointer; width: 32px; }
.flash-progress { font-size: 15px; font-weight: 700; color: var(--red); }
.flash-scope { font-size: 12px; color: var(--ink-soft); background: var(--red-soft); padding: 3px 10px; border-radius: 12px; }

.flash-stage { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; padding: 8px 20px 20px; perspective: 1200px; }
.flash-card-wrap { position: relative; width: 100%; max-width: 380px; height: 62vh; max-height: 520px; }
.flash-card { position: relative; width: 100%; height: 100%; cursor: pointer; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.4,.2,.2,1); }
.flash-card.is-flipped { transform: rotateY(180deg); }
.flash-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 18px; padding: 26px 22px; display: flex; flex-direction: column;
  box-shadow: 0 10px 30px rgba(0,0,0,.12); overflow-y: auto;
}
.flash-face--front { background: var(--paper); border: 2px solid var(--red-line); }
.flash-face--back { background: var(--cream); color: var(--ink); transform: rotateY(180deg); border: 1.5px solid var(--red-line); border-top: 4px solid var(--red); }
.flash-hint { font-size: 12px; opacity: .8; margin-bottom: 14px; }
.flash-face--front .flash-hint { color: var(--ink-soft); }
.flash-face--back .flash-hint { color: var(--red); font-weight: 700; opacity: 1; }
.flash-meta { font-size: 12px; color: var(--ink-soft); margin: -6px 0 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--red-line); }
.flash-meta .fm-type { color: var(--red); font-weight: 600; }
.flash-meta .fm-year { color: var(--gold); }
.flash-q { font-family: var(--font-serif); font-size: 22px; font-weight: 700; line-height: 1.6; color: var(--ink); margin: auto 0; letter-spacing: .3px; }
.flash-a { font-family: var(--font-serif); font-size: 16.5px; line-height: 1.95; white-space: pre-wrap; color: var(--ink); letter-spacing: .2px; }

.flash-controls { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 14px 16px calc(env(safe-area-inset-bottom) + 16px); }
.flash-nav { flex: 0 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px; font-size: 13px; color: var(--ink); cursor: pointer; }
.flash-nav:disabled { opacity: .4; }
.flash-marks { flex: 1; display: flex; gap: 6px; }
.fmark { flex: 1; padding: 10px 0; border-radius: 12px; font-size: 13px; font-weight: 600; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink-soft); cursor: pointer; }
.fmark[data-status="mastered"].fmark--on { background: var(--red); border-color: var(--red); color: #fff; }
.fmark[data-status="fuzzy"].fmark--on { background: var(--gold); border-color: var(--gold); color: #fff; }
.fmark[data-status="forgot"].fmark--on { background: #8a8a8a; border-color: #8a8a8a; color: #fff; }

/* ============ Toast ============ */
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: rgba(43,43,43,.94); color: #fff; font-size: 14px; padding: 10px 18px; border-radius: 22px; z-index: 120; max-width: 80%; text-align: center; animation: toastIn .2s ease; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px);} to { opacity: 1; transform: translate(-50%, 0);} }

/* ============ 详情·上下切换 ============ */
.detail-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.detail-nav__btn { flex: 1; padding: 11px 0; border-radius: var(--radius); font-size: 14px; font-weight: 600; border: 1.5px solid var(--red-line); background: var(--red-soft); color: var(--red-deep); cursor: pointer; transition: all .15s ease; }
.detail-nav__btn:disabled { opacity: .4; background: var(--paper); color: var(--ink-soft); border-color: var(--line); }
.detail-nav__btn:active:not(:disabled) { background: var(--red); color: #fff; }
.detail-nav__pos { flex: 0 0 auto; font-size: 13px; font-weight: 700; color: var(--red); min-width: 56px; text-align: center; }

/* ============ 列表·章节分割标题 ============ */
.chapter-divider { display: flex; align-items: baseline; gap: 8px; margin: 20px 2px 4px; padding-bottom: 8px; border-bottom: 2px solid var(--red-line); }
.chapter-divider:first-child { margin-top: 4px; }
.chapter-divider__sub { font-size: 12px; color: #fff; background: var(--red); padding: 2px 9px; border-radius: 10px; font-weight: 600; }
.chapter-divider__ch { font-size: 14px; font-weight: 700; color: var(--red-deep); }

/* ============ 关联候选 / 通用底部弹层 ============ */
.picker-layer { position: fixed; inset: 0; z-index: 110; }
.picker-mask { position: absolute; inset: 0; background: rgba(0,0,0,.4); animation: fade .2s ease; }
.picker-sheet, .flash-cfg-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: var(--maxw); margin: 0 auto;
  background: var(--cream); border-radius: 18px 18px 0 0; max-height: 82vh; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom); animation: sheetUp .25s cubic-bezier(.3,.7,.3,1);
}
@keyframes sheetUp { from { transform: translateY(100%);} to { transform: translateY(0);} }
.picker-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.picker-title { font-size: 16px; font-weight: 700; color: var(--ink); }
.picker-close { background: none; border: none; font-size: 18px; color: var(--ink-soft); cursor: pointer; width: 30px; }
.picker-body { overflow-y: auto; padding: 12px 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.picker-item { text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.picker-item:active { background: var(--red-soft); border-color: var(--red); }
.picker-item__meta { font-size: 12px; color: var(--red); }
.picker-item__type { font-style: normal; color: var(--ink-soft); }
.picker-item__q { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.5; }

/* ============ 闪卡配置层 ============ */
.flash-cfg-layer { position: fixed; inset: 0; z-index: 110; }
.flash-cfg-mode-row { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 14px 18px 6px; }
.flash-cfg-mode-label { font-size: 13px; color: var(--ink-soft); flex: 0 0 auto; }
.seg--sm { flex: 1; margin: 0; }
.seg--sm .seg__btn { padding: 8px 0; font-size: 13px; }
.flash-cfg-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 16px; display: flex; flex-direction: column; gap: 14px; }
.cfg-book { flex: 0 0 auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cfg-book__head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 15px; background: var(--red-soft); border: none; border-bottom: 1px solid var(--red-line); cursor: pointer; }
.cfg-book__head.is-on { background: var(--red); }
.cfg-book__name { flex: 1; text-align: left; font-size: 15px; font-weight: 700; color: var(--red-deep); }
.cfg-book__head.is-on .cfg-book__name { color: #fff; }
.cfg-book__meta { font-size: 12px; color: var(--ink-soft); }
.cfg-book__head.is-on .cfg-book__meta { color: rgba(255,255,255,.85); }
.cfg-chapter { width: 100%; display: flex; align-items: center; gap: 10px; padding: 12px 15px; background: none; border: none; border-top: 1px solid var(--line); cursor: pointer; }
.cfg-chapter:first-of-type { border-top: none; }
.cfg-chapter__name { flex: 1; text-align: left; font-size: 14px; color: var(--ink); }
.cfg-chapter.is-on .cfg-chapter__name { color: var(--red-deep); font-weight: 600; }
.cfg-chapter__cnt { font-size: 12px; color: var(--ink-soft); }
.cfg-check { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--red-line); display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff; background: var(--paper); }
.cfg-book__head.is-on .cfg-check { background: #fff; color: var(--red); border-color: #fff; }
.cfg-chapter.is-on .cfg-check { background: var(--red); border-color: var(--red); }
.flash-cfg-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--cream); }
.flash-cfg-count { flex: 1; font-size: 13px; color: var(--ink-soft); }
.flash-cfg-start { flex: 0 0 auto; padding: 12px 26px; border: none; border-radius: 24px; background: var(--red); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.flash-cfg-start:active { background: var(--red-deep); }

/* ============ 我的·关于&联系入口 ============ */
.mine-links { display: flex; flex-direction: column; gap: 10px; }
.mine-link { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; cursor: pointer; transition: all .15s ease; }
.mine-link:active { transform: scale(.99); }
.mine-link--book { background: var(--red-soft); border-color: var(--red-line); }
.mine-link__icon { font-size: 24px; flex: 0 0 auto; }
.mine-link__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mine-link__title { font-size: 15px; font-weight: 700; color: var(--ink); }
.mine-link--book .mine-link__title { color: var(--red-deep); }
.mine-link__sub { font-size: 12px; color: var(--ink-soft); }
.mine-link__go { color: var(--red); font-size: 22px; flex: 0 0 auto; }

/* 备案号页脚(工信部合规:可点击跳转 beian.miit.gov.cn) */
.site-footer { margin-top: 20px; padding: 14px 0 6px; text-align: center; }
.site-footer__beian { font-size: 12px; color: var(--ink-soft); text-decoration: none; letter-spacing: .2px; }
.site-footer__beian:active { color: var(--red); }

/* ---------- 账户卡(登录/未登录) ---------- */
.account-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 13px 14px; margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.account-card__left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.account-card__avatar {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--red-soft); border: 1px solid var(--red-line);
}
.account-card__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.account-card__name { font-size: 15px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card__sub { font-size: 12px; color: var(--ink-soft); line-height: 1.4; }
.account-card__btn {
  flex: 0 0 auto; border: 1px solid var(--red); background: var(--red); color: #fff;
  font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 20px; cursor: pointer;
}
.account-card__btn:active { background: var(--red-deep); }
.account-card--logged .account-card__btn { background: transparent; color: var(--red); }

/* ---------- 登录弹层:验证码行 ---------- */
.login-code-row { display: flex; gap: 8px; margin-top: 10px; }
.login-code-input { flex: 1; margin: 0; }
/* 邮箱输入框:覆盖 .activate-input 的强制大写(邮箱区分大小写)。
   用组合选择器提高特异性,确保盖过后面定义的 .activate-input。 */
.activate-input.login-email-input { text-transform: none; letter-spacing: 0; text-align: left; }
.login-code-btn {
  flex: 0 0 auto; white-space: nowrap;
  border: 1px solid var(--red); background: var(--red-soft); color: var(--red-deep);
  font-size: 13px; font-weight: 600; padding: 0 14px; border-radius: 10px; cursor: pointer;
}
.login-code-btn:active { background: var(--red-line); }
.login-code-btn:disabled { color: var(--ink-soft); border-color: var(--line); background: var(--cream); cursor: default; }
.login-agreement { margin-top: 12px; font-size: 11px; color: var(--ink-soft); line-height: 1.5; text-align: center; }

/* ============ 纸质版介绍页 ============ */
.intro-hero { background: var(--red); color: #fff; border-radius: var(--radius); padding: 20px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.intro-hero::after { content: "考"; position: absolute; right: 6px; bottom: -22px; font-size: 100px; font-weight: 800; color: rgba(255,255,255,.10); line-height: 1; }
.intro-hero__badge { display: inline-block; font-size: 12px; background: rgba(255,255,255,.18); padding: 3px 10px; border-radius: 20px; }
.intro-hero__title { font-size: 24px; font-weight: 800; margin: 10px 0 6px; letter-spacing: 1px; }
.intro-hero__slogan { font-size: 13px; opacity: .92; }
.intro-hero__stats { display: flex; gap: 18px; margin-top: 16px; position: relative; z-index: 1; }
.intro-stat { font-size: 12px; opacity: .9; }
.intro-stat b { display: block; font-size: 20px; font-weight: 800; }

.intro-cover { margin-top: 14px; }
.intro-cover__img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.intro-cover__img + .intro-cover__img { margin-top: 10px; }
.intro-cover__cap { font-size: 12px; color: var(--ink-soft); text-align: center; margin-top: 8px; }

.intro-gift { display: flex; align-items: center; gap: 12px; margin-top: 12px; background: var(--red-soft); border: 1px dashed var(--red); border-radius: var(--radius); padding: 14px 16px; }
.intro-gift__tag { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: #fff; background: var(--red); padding: 4px 11px; border-radius: 20px; }
.intro-gift__text { font-size: 14px; font-weight: 600; color: var(--red-deep); line-height: 1.5; }

.intro-value { display: flex; flex-direction: column; gap: 10px; }
.intro-value__item { display: flex; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 15px; }
.intro-value__ic { font-size: 22px; flex: 0 0 auto; }
.intro-value__item b { font-size: 15px; color: var(--ink); }
.intro-value__item p { font-size: 13px; color: var(--ink-soft); line-height: 1.7; margin-top: 3px; }

.intro-toc { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.intro-toc__row { display: flex; gap: 12px; padding: 13px 15px; border-top: 1px solid var(--line); }
.intro-toc__row:first-child { border-top: none; }
.intro-toc__k { flex: 0 0 82px; font-size: 14px; font-weight: 700; color: var(--red); }
.intro-toc__v { flex: 1; font-size: 13px; color: var(--ink); line-height: 1.6; }
.intro-note { font-size: 12px; color: var(--ink-soft); margin: 10px 2px 0; line-height: 1.6; }

.intro-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.intro-tag { font-size: 13px; color: var(--red-deep); background: var(--red-soft); border: 1px solid var(--red-line); border-radius: 16px; padding: 7px 13px; }

.intro-cta { margin-top: 22px; background: var(--red-soft); border: 1px solid var(--red-line); border-radius: var(--radius); padding: 18px 16px; text-align: center; }
.intro-cta__title { font-size: 16px; font-weight: 700; color: var(--red-deep); }
.intro-cta__sub { font-size: 12px; color: var(--ink-soft); margin: 6px 0 14px; line-height: 1.6; }
.intro-cta__btn { border: none; background: var(--red); color: #fff; font-size: 15px; font-weight: 700; padding: 12px 30px; border-radius: 24px; cursor: pointer; }
.intro-cta__btn:active { background: var(--red-deep); }

/* ============ 报考咨询页 ============ */
.mine-link--consult { background: var(--red-soft); border-color: var(--red-line); }
.mine-link--consult .mine-link__title { color: var(--red-deep); }

.consult-hero { background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%); color: #fff; border-radius: var(--radius); padding: 22px 20px; margin-top: 4px; }
.consult-hero__badge { display: inline-block; font-size: 11px; background: rgba(255,255,255,.2); padding: 4px 10px; border-radius: 12px; margin-bottom: 10px; }
.consult-hero__title { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.consult-hero__slogan { font-size: 13px; color: rgba(255,255,255,.9); }

.consult-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.consult-table__row { display: flex; }
.consult-table__row > span { flex: 1; padding: 11px 8px; font-size: 13.5px; text-align: center; color: var(--ink); border-top: 1px solid var(--line); }
.consult-table__row:first-child > span { border-top: none; }
.consult-table__row--head > span { background: var(--red-soft); color: var(--red-deep); font-weight: 700; font-size: 13px; }

.consult-cards { display: flex; flex-direction: column; gap: 10px; }
.consult-card { display: flex; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.consult-card__ic { font-size: 24px; flex: 0 0 auto; }
.consult-card__body b { font-size: 15px; color: var(--ink); }
.consult-card__body p { font-size: 13px; color: var(--ink-soft); line-height: 1.7; margin-top: 4px; }

.consult-links { display: flex; flex-direction: column; gap: 10px; }
.consult-link { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; cursor: pointer; transition: all .15s ease; }
.consult-link:active { transform: scale(.99); background: var(--red-soft); }
.consult-link__ic { font-size: 22px; flex: 0 0 auto; }
.consult-link__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.consult-link__title { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.consult-link__sub { font-size: 12px; color: var(--ink-soft); }
.consult-link__go { color: var(--red); font-size: 18px; flex: 0 0 auto; }

/* ============ 联系我弹层 ============ */
.contact-layer { position: fixed; inset: 0; z-index: 110; }
.contact-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-width: var(--maxw); margin: 0 auto; background: var(--cream); border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: sheetUp .25s cubic-bezier(.3,.7,.3,1); }
.contact-body { padding: 18px 20px 24px; display: flex; flex-direction: column; align-items: center; }
.contact-qr { width: 200px; height: 200px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 8px; display: flex; align-items: center; justify-content: center; }
.contact-qr__img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.contact-qr__ph { font-size: 13px; color: var(--ink-soft); text-align: center; line-height: 1.7; }
.contact-qr__tip { font-size: 12px; color: var(--ink-soft); margin: 10px 0 18px; }
.contact-row { width: 100%; display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; margin-bottom: 10px; text-decoration: none; cursor: pointer; }
.contact-row:active { background: var(--red-soft); }
.contact-row__ic { font-size: 20px; flex: 0 0 auto; }
.contact-row__text { flex: 1; display: flex; flex-direction: column; }
.contact-row__label { font-size: 12px; color: var(--ink-soft); }
.contact-row__val { font-size: 15px; font-weight: 700; color: var(--ink); }
.contact-row__copy { flex: 0 0 auto; font-size: 12px; color: #fff; background: var(--red); padding: 5px 12px; border-radius: 14px; }
.contact-foot { font-size: 12px; color: var(--ink-soft); margin-top: 6px; text-align: center; }

/* ============ 会员/激活状态卡(我的页) ============ */
.member-card {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%);
  border-radius: var(--radius); padding: 16px; margin-bottom: 4px;
  box-shadow: 0 6px 18px rgba(192,25,32,.22);
}
.member-card__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.member-card__badge {
  align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--red-deep);
  background: #fff; padding: 2px 10px; border-radius: 20px;
}
.member-card__desc { font-size: 13px; color: rgba(255,255,255,.95); line-height: 1.5; overflow-wrap: anywhere; }
.member-card__btn {
  flex: 0 0 auto; background: #fff; color: var(--red-deep); border: none;
  font-size: 13.5px; font-weight: 700; padding: 9px 14px; border-radius: 20px; cursor: pointer;
}
.member-card__btn:active { transform: scale(.97); }
/* 已解锁(正式码)时的低调样式 */
.member-card--unlocked { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.member-card--unlocked .member-card__badge { background: var(--red-soft); color: var(--red-deep); }
.member-card--unlocked .member-card__desc { color: var(--ink-soft); }
.member-card--unlocked .member-card__btn { background: var(--red-soft); color: var(--red-deep); }

/* ============ 激活弹层 ============ */
.activate-tip { font-size: 13.5px; line-height: 1.7; color: var(--ink); margin-bottom: 14px; }
.activate-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 16px; font-size: 16px; outline: none; background: var(--cream); color: var(--ink);
  text-transform: uppercase; letter-spacing: 1px; text-align: center;
}
.activate-input:focus { border-color: var(--red); }
.activate-btn {
  width: 100%; margin-top: 12px; padding: 14px 0; border: none; border-radius: 12px;
  background: var(--red); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
}
.activate-btn:active { background: var(--red-deep); }
.activate-msg { margin-top: 12px; font-size: 13.5px; text-align: center; line-height: 1.6; }
.activate-msg--ok { color: var(--red-deep); }
.activate-msg--err { color: #c0392b; }

/* ============ 反馈 / 内容纠错弹层 ============ */
.feedback-sheet { max-height: 88vh; overflow-y: auto; }
.feedback-body { align-items: stretch; padding-bottom: 26px; }
.feedback-tip { font-size: 13.5px; line-height: 1.7; color: var(--ink); margin-bottom: 14px; }
.feedback-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.feedback-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.feedback-optional { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--ink-soft); }
.feedback-input,
.feedback-select,
.feedback-textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 13px; font-size: 15px; outline: none; background: var(--paper); color: var(--ink);
}
.feedback-select { appearance: none; }
.feedback-textarea { min-height: 112px; resize: vertical; line-height: 1.7; }
.feedback-input:focus,
.feedback-select:focus,
.feedback-textarea:focus { border-color: var(--red); }
.feedback-context {
  font-size: 12px; color: var(--ink-soft); line-height: 1.6;
  background: var(--paper); border: 1px dashed var(--line); border-radius: 10px;
  padding: 8px 10px; margin-bottom: 12px;
}
.feedback-submit {
  width: 100%; padding: 14px 0; border: none; border-radius: 12px;
  background: var(--red); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
}
.feedback-submit:active { background: var(--red-deep); }
.feedback-submit:disabled { opacity: .65; cursor: default; }

/* ============ 锁定题卡片(游客态) ============ */
.q-card--locked { position: relative; opacity: .96; }
.q-card__lock { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 1px 8px; border-radius: 9px; font-weight: 600; margin-left: auto; background: rgba(192,25,32,.10); color: var(--red); }
/* 详情页锁定遮罩 */
.locked-box {
  background: var(--paper); border: 1px dashed var(--red-line); border-radius: var(--radius);
  padding: 28px 20px; text-align: center;
}
.locked-box--flash { padding: 18px 16px; }
.locked-box__icon { font-size: 34px; }
.locked-box__title { font-size: 16px; font-weight: 700; color: var(--ink); margin-top: 10px; }
.locked-box__desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; margin-top: 8px; }
.locked-box__btn {
  margin-top: 16px; padding: 12px 28px; border: none; border-radius: 22px;
  background: var(--red); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.locked-box__btn:active { background: var(--red-deep); }
.locked-box__contact {
  display: block; margin: 12px auto 0; background: none; border: none;
  color: var(--red-deep); font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline;
}

/* ---------- 背诵页顶部吸顶 ---------- */
.content:has(#view-study.view--active) {
  padding-top: 0;
}
.study-sticky {
  position: sticky; top: 0; z-index: 15;
  background: var(--cream);
  margin: 0 -16px 8px;
  padding: 0 16px 4px;
  border-bottom: 1px solid var(--line);
}
.study-sticky .search-box { margin-bottom: 10px; }
.study-sticky .filter-tabs { margin-bottom: 0; }

/* ---------- 章节分隔标题:统一为纵向两行,长名省略,不再错位 ---------- */
.chapter-divider {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  margin: 20px 2px 8px; padding-bottom: 8px; border-bottom: 2px solid var(--red-line);
}
.chapter-divider:first-child { margin-top: 4px; }
.chapter-divider__sub {
  flex: 0 0 auto; font-size: 12px; color: #fff; background: var(--red);
  padding: 2px 9px; border-radius: 10px; font-weight: 600; white-space: nowrap;
}
.chapter-divider__ch {
  font-size: 14px; font-weight: 700; color: var(--red-deep); line-height: 1.4;
  max-width: 100%; overflow-wrap: anywhere;
}

/* ---------- 详情页滚轮式布局:答案滚动,操作区常驻底部 ---------- */
.content:has(#view-detail.view--active) {
  padding: 10px 12px 12px;
  overflow: hidden;
}
#view-detail.view--active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 10px;
}
#view-detail .detail-head {
  flex: 0 0 auto;
  padding: 0 0 10px;
  background: var(--cream);
}
.detail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 3px;
  -webkit-overflow-scrolling: touch;
}
.detail-scroll .answer-box {
  margin-bottom: 12px;
}
.detail-actions {
  flex: 0 0 auto;
  padding-top: 8px;
  background: var(--cream);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 18px rgba(250,247,242,.92);
}
.detail-actions .flash-this-btn {
  margin-top: 0;
  padding: 11px 0;
}
.detail-primary-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-primary-row .flash-this-btn {
  flex: 1 1 auto;
  width: auto;
}
.detail-primary-row .detail-nav__pos {
  flex: 0 0 62px;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border: 1px solid var(--red-line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--red-deep);
  font-size: 13px;
}
.detail-control-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.detail-control-row .detail-nav__btn {
  flex: 0 0 68px;
  padding: 10px 0;
  font-size: 12.5px;
}
.detail-control-row .mark-group {
  flex: 1 1 auto;
  gap: 5px;
}
.detail-control-row .mark-btn {
  padding: 10px 0;
  font-size: 12.5px;
}

/* ---------- 收藏按钮(详情页 / 闪卡) ---------- */
.detail-head { position: relative; }
.fav-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid var(--red-line);
  border-radius: 13px;
  background: var(--paper);
  color: var(--red-deep);
  cursor: pointer;
}
.fav-star {
  font-size: 20px;
  line-height: 1;
}
.fav-label {
  font-size: 10.5px;
  line-height: 1.1;
  font-weight: 700;
}
.detail-fav {
  position: absolute; top: 0; right: 0;
  width: 48px;
  min-height: 42px;
  padding: 4px 5px;
}
.detail-fav--on {
  color: #B8860B;
  background: #FFF8DD;
  border-color: rgba(184,134,11,.35);
}
.detail-q { padding-right: 56px; }
.flash-fav {
  position: absolute;
  top: -46px;
  right: 0;
  z-index: 5;
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 40px;
  padding: 4px 7px;
  box-shadow: var(--shadow);
}
.flash-fav--on {
  color: #B8860B;
  background: #FFF8DD;
  border-color: rgba(184,134,11,.35);
}
.flash-top { gap: 8px; }
.flash-progress { flex: 0 0 auto; }
.flash-scope {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.flash-scope::-webkit-scrollbar { display: none; }

/* 收藏项副标题(章节) */
.weak-item__sub { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: var(--ink-soft); }

/* ---------- 闪卡配置层:游客解锁提示 ---------- */
.cfg-unlock-tip {
  display: flex; flex-direction: column; gap: 3px; width: 100%;
  margin-top: 14px; padding: 14px 16px; text-align: left; cursor: pointer;
  background: var(--red-soft); border: 1px dashed var(--red-line); border-radius: var(--radius);
}
.cfg-unlock-tip--top { margin-top: 0; border-style: solid; }
.cfg-unlock-tip__t { font-size: 14px; font-weight: 700; color: var(--red-deep); }
.cfg-unlock-tip__s { font-size: 12.5px; color: var(--ink-soft); }

/* ---------- 激活弹层:联系获取入口 ---------- */
.activate-contact-link {
  display: block; width: 100%; margin-top: 14px; padding: 4px;
  background: none; border: none; cursor: pointer;
  color: var(--red-deep); font-size: 13.5px; font-weight: 600; text-align: center;
}
.activate-contact-link:active { opacity: .7; }
