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

:root {
  --red:        #C01920;   /* 主色·封面红 */
  --red-mid:    #B91521;   /* 主色渐变收束 */
  --red-deep:   #A3141C;   /* 按下/深红 */
  --red-bright: #D33A41;   /* 提亮层,避免荧光红 */
  --red-soft:   #FBEDEE;   /* 浅红填充 */
  --red-soft-strong: #F6DADD; /* 进度/强调浅红 */
  --red-line:   #F0D9DA;   /* 浅红描边 */
  --red-gradient: linear-gradient(135deg, var(--red) 0%, var(--red-mid) 100%);
  --cream:      #FAF7F2;   /* 米白背景(护眼) */
  --paper:      #FFFFFF;   /* 卡片白 */
  --ink:        #2B2B2B;   /* 正文近黑 */
  --ink-soft:   #6E6E6E;   /* 次要文字 */
  --line:       #ECE7DF;   /* 分隔线 */
  --gold:       #B8860B;   /* 真题年份点缀 */
  --ok:         #C0392B;   /* 状态色沿用红系 */

  /* 阴影:暖调中性多层(Soft UI Evolution),比原单层红调更柔和有纵深 */
  --shadow-sm:  0 1px 2px rgba(60,42,28,.04), 0 2px 6px rgba(60,42,28,.05);
  --shadow:     0 2px 8px rgba(60,42,28,.05), 0 10px 24px rgba(60,42,28,.06);
  --shadow-md:  0 6px 16px rgba(60,42,28,.07), 0 18px 40px rgba(60,42,28,.08);
  --shadow-red: 0 6px 18px rgba(192,25,32,.20);  /* 红色 CTA 专用 */

  /* 圆角阶(节奏统一) */
  --radius-sm:  10px;
  --radius:     14px;
  --radius-lg:  18px;
  --radius-pill:999px;

  /* 动效令牌:时长 + 缓动(进场 ease-out / 退场 ease-in / 回弹 spring) */
  --dur-fast:   .14s;
  --dur:        .2s;
  --dur-slow:   .3s;
  --ease-out:   cubic-bezier(.22,.61,.36,1);
  --ease-in:    cubic-bezier(.4,0,1,1);
  --ease-spring:cubic-bezier(.34,1.56,.64,1);
  /* 可点元素统一过渡:只动 transform/opacity/颜色,绝不动 layout,消除按压瞬跳 */
  --tap-transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);

  --maxw:       480px;
  --tabbar-h:   58px;
  --topbar-h:   50px;
  --app-height: 100vh;
  --standalone-safe-top: 0px;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--standalone-safe-top));
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  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;
}

@supports (height: 100dvh) {
  :root { --app-height: 100dvh; }
}
html.app-standalone { --standalone-safe-top: 24px; }

* { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; -webkit-tap-highlight-color: transparent; }
html { width: 100%; height: 100%; overflow: hidden; }
body {
  width: 100%;
  height: var(--app-height);
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
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: var(--app-height);
  min-height: 0;
  max-height: var(--app-height);
  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; }
/* 全站图标统一使用本地 SVG sprite,线宽/端点/对齐由这里集中控制。 */
.svg-sprite {
  position: absolute;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden;
  pointer-events: none;
}
.ui-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.ui-icon * { vector-effect: non-scaling-stroke; }
.button-icon { margin-right: 5px; vertical-align: -.14em; }
.button-icon:last-child { margin-right: 0; margin-left: 5px; }
.inline-icon { width: 1em; height: 1em; margin-left: 3px; vertical-align: -.14em; }

/* ---------- 统一可点元素过渡:消除按压 :active 瞬跳,松手柔和回弹 ---------- */
.review-card, .today-card, .today-card__refresh, .resume-card,
.home-slide, .home-action, .home-today-card__btn, .home-data__tab, .home-recent-row,
.feedback-entry, .feedback-fab, .flash-entry, .flash-entry--hero, .flash-home-preview, .flash-home-chip, .flash-home-start,
.q-card, .related-badge, .related-chip, .speak-btn, .flash-this-btn,
.mark-btn, .fmark, .filter-tab, .study-select__btn, .study-option, .chapter-card, .seg__btn, .flash-nav,
.chat-new, .chat-weak, .chat-menu, .chat-drawer__close, .chat-drawer__new,
.chat-history__open, .chat-history__del, .chat-source, .chat-send,
.ov-card, .memory-metric, .collection-card, .detail-nav__btn, .detail-ai-btn, .picker-item, .picker-close,
.flash-cfg-start, .cfg-book__head, .cfg-chapter, .mine-link, .weak-item,
.weak-review-entry, .account-card__btn, .login-code-btn, .intro-cta__btn,
.consult-card, .consult-link, .contact-row, .contact-row__copy,
.member-card__btn, .activate-btn, .activate-input, .login-code-btn,
.feedback-submit, .feedback-input, .feedback-select, .feedback-textarea,
.locked-box__btn, .tab, .fav-btn, .back-btn, .highlight-toolbar__btn,
.flash-close, .picker-item, .site-footer__beian, .activate-contact-link {
  transition: var(--tap-transition);
}

/* 桌面 hover:轻微上浮 + 阴影加深(位移 ≤4px,仅指针设备,避免触屏卡在 hover 态) */
@media (hover: hover) {
  .q-card:hover, .today-card:hover, .resume-card:hover, .home-slide:hover, .home-action:hover, .home-recent-row:hover,
  .mine-link:hover, .flash-home-preview:hover, .flash-home-chip:hover, .flash-home-start:hover,
  .consult-card:hover, .consult-link:hover, .ov-card:hover, .memory-metric:hover, .collection-card:hover, .weak-item:hover,
  .picker-item:hover, .feedback-entry:hover, .weak-review-entry:hover,
  .account-card:hover, .chat-source:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  .flash-entry--hero:hover, .member-card:hover { box-shadow: var(--shadow-red); }
}

/* 键盘可达:仅键盘聚焦时显示柔和 focus ring(触屏/鼠标点按不出现,不打扰移动端视觉) */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(192,25,32,.20);
}
.activate-input:focus-visible, .feedback-input:focus-visible,
.feedback-select:focus-visible, .feedback-textarea:focus-visible,
.chat-input:focus-visible, .search-box__input:focus-visible {
  box-shadow: 0 0 0 3px rgba(192,25,32,.18);
}

/* 触控命中区补强:小图标按钮视觉尺寸不变,用透明 ::after 扩到 ≥44×44(hitSlop) */
.today-card__refresh, .chat-menu, .chat-drawer__close,
.picker-close, .flash-close, .back-btn {
  position: relative;
}
.today-card__refresh::after, .chat-menu::after, .chat-drawer__close::after,
.picker-close::after, .flash-close::after, .back-btn::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  min-width: 44px; min-height: 44px;
  width: 100%; height: 100%;
  transform: translate(-50%, -50%);
}

/* 长题干/长公式不能撑宽移动端页面 */
.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-text,
.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: calc(var(--topbar-h) + var(--safe-top));
  flex: 0 0 calc(var(--topbar-h) + var(--safe-top));
  display: flex; align-items: center; gap: 4px;
  padding: 0 14px;
  padding-top: var(--safe-top);
  background: var(--paper);
  color: var(--red-deep);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  overflow: hidden;
  transition: height var(--dur) var(--ease-in), flex-basis var(--dur) var(--ease-in),
    padding var(--dur) var(--ease-in), opacity var(--dur-fast) var(--ease-in),
    transform var(--dur) var(--ease-in), border-color var(--dur-fast) var(--ease-in);
}
.topbar-title { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.topbar-title--center { text-align: center; font-weight: 850; color: var(--ink); letter-spacing: .4px; }
.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 {
  position: relative;
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: 16px 16px 24px;
}
.content:has(#view-mine.view--active) {
  padding-top: 0;
  padding-bottom: calc(var(--tabbar-h) + 28px + var(--safe-bottom));
  scrollbar-width: none;
}
.content:has(#view-home.view--active) {
  padding: calc(var(--safe-top) + 14px) 14px 24px;
  background:
    radial-gradient(circle at 82% 0%, rgba(192,25,32,.055) 0%, rgba(192,25,32,0) 30%),
    linear-gradient(180deg, #FFFAFA 0%, #FFFCFC 36%, var(--cream) 100%);
}
.content:has(#view-mine.view--active)::-webkit-scrollbar { display: none; }
.topbar:has(+ .content #view-home.view--active),
.topbar:has(+ .content #view-mine.view--active) {
  display: none;
  height: 0;
  flex-basis: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  border-bottom-color: transparent;
}
/* AI 问答页:外层不滚动,只允许消息流滚动,避免输入框被上滑带走。 */
.content:has(#view-chat.view--active) {
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 0%, rgba(192,25,32,.07) 0, rgba(192,25,32,0) 32%),
    linear-gradient(180deg, #FFF8F8 0%, #FFFDFD 45%, #FFF9F9 100%);
}
.view { display: none; }
.view--active { display: block; }
/* 高频重渲染的阅读内容必须稳定直出:禁止视图淡入和列表错峰,
   否则异步 renderStudyList/renderMine 会出现“先空白、再闪现”的双闪。 */

/* 独立内容页:从右侧推进覆盖旧页;只用于介绍/录取数据/记忆概览,不作用于高频题卡列表。 */
.view--transition-leave,
.view--transition-enter {
  display: block;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--cream);
  padding: 16px 16px 24px;
}
.view--transition-leave {
  z-index: 1;
  pointer-events: none;
  animation: pagePushOut var(--dur) var(--ease-in) both;
}
.view--transition-enter {
  z-index: 2;
  animation: pagePushIn var(--dur-slow) var(--ease-out) both;
}
@keyframes pagePushIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes pagePushOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-18%); opacity: .72; } }

/* 题目入口:来源卡片放大并淡出后由详情页接管,不改列表本身的稳定直出。 */
.detail-zoom-clone {
  position: fixed;
  z-index: 160;
  margin: 0;
  pointer-events: none;
  transform-origin: center center;
  will-change: transform, opacity;
}
.detail-zoom-clone--expand { animation: detailCardExpand .22s var(--ease-out) forwards; }
@keyframes detailCardExpand {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(1.14); opacity: .08; }
}

.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); }

/* ============ 首页 ============ */
#view-home {
  display: none;
  padding-bottom: 4px;
}
#view-home.view--active {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.home-hero {
  position: relative;
  min-height: 54px;
  padding: 6px 2px 0;
  color: #191919;
  background: transparent;
}
.home-hero::before,
.home-hero::after {
  display: none;
}
.home-hero__bg {
  display: none;
}
.home-hero__top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.home-hero__title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  line-height: 1.08;
  letter-spacing: -.5px;
}
.home-hero__title-main {
  font-size: 22px;
  font-weight: 950;
  color: #111;
}
.home-hero__title-ai {
  position: relative;
  display: inline-block;
  font-size: 20px;
  font-weight: 950;
  font-style: italic;
  letter-spacing: -.8px;
  color: var(--red);
  transform: skew(-7deg);
}
.home-hero__title-ai::after {
  content: none;
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 0;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(29,210,138,.18), rgba(123,92,255,.16));
  z-index: -1;
}
.home-hero__countdown {
  flex: 0 0 auto;
  position: relative;
  width: auto;
  height: auto;
  margin-top: 3px;
  padding: 0 1px;
  border-radius: 0;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .1px;
  color: rgba(192,25,32,.55);
  background: transparent;
  border: none;
  box-shadow: none;
}
.home-hero__countdown::before {
  content: none;
}
.home-hero__countdown::after {
  content: none;
}
.home-hero__hello {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  height: 20px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: rgba(192,25,32,.66);
  background: rgba(192,25,32,.07);
}

.home-promo {
  position: relative;
}
.home-promo__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  border-radius: 22px;
  scrollbar-width: none;
}
.home-promo__track::-webkit-scrollbar { display: none; }
.home-slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 136px;
  overflow: hidden;
  border: none;
  border-radius: 16px;
  padding: 22px 20px 16px;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: 0 12px 30px rgba(192,25,32,.18);
}
.home-slide::after {
  content: "";
  position: absolute;
  width: 178px;
  height: 112px;
  right: -28px;
  bottom: -34px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.09);
  transform: rotate(-16deg);
}
.home-slide::before {
  content: "";
  position: absolute;
  right: 50px;
  top: 32px;
  width: 90px;
  height: 92px;
  border-radius: 28px;
  background: rgba(255,255,255,.13);
  transform: rotate(14deg);
}
/* 静态 class 是首帧兜底;data-theme 供轮播脚本和后续动态卡片复用。
   红色主题不能依赖异步接口完成后才由 JS 补属性,否则冷启动会先闪白。 */
.home-slide--intro,
.home-slide[data-theme="intro"] {
  color: #fff;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.30) 0 1px, transparent 3px),
    radial-gradient(circle at 82% 10%, rgba(255,255,255,.20) 0 0, transparent 38%),
    linear-gradient(135deg, var(--red) 0%, #C72B32 52%, var(--red-bright) 100%);
}
.home-slide--xhs,
.home-slide[data-theme="xhs"] {
  color: #fff;
  background:
    radial-gradient(circle at 16% 20%, rgba(255,255,255,.22) 0 1px, transparent 3px),
    radial-gradient(circle at 78% 12%, rgba(255,255,255,.18) 0 0, transparent 36%),
    linear-gradient(135deg, var(--red-mid) 0%, var(--red) 50%, #CC3037 100%);
}
.home-slide[data-theme="consult"] {
  color: #fff;
  background:
    radial-gradient(circle at 16% 20%, rgba(255,255,255,.22) 0 1px, transparent 3px),
    linear-gradient(135deg, var(--red-deep) 0%, var(--red-mid) 50%, #C32931 100%);
}
.home-slide__art {
  position: absolute;
  right: 28px;
  top: 31px;
  z-index: 1;
  width: 92px;
  height: 86px;
  pointer-events: none;
}
.home-slide__art::before,
.home-slide__art::after {
  content: "";
  position: absolute;
}
.home-slide--intro .home-slide__art::before,
.home-slide[data-theme="intro"] .home-slide__art::before {
  right: 16px;
  top: 4px;
  width: 54px;
  height: 72px;
  border-radius: 10px 14px 12px 10px;
  background:
    linear-gradient(90deg, rgba(192,25,32,.16) 0 5px, transparent 5px),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.76));
  box-shadow:
    -15px 10px 0 rgba(255,255,255,.32),
    16px -10px 0 rgba(255,255,255,.23),
    0 14px 24px rgba(118,14,18,.20);
  transform: rotate(11deg);
}
.home-slide--intro .home-slide__art::after,
.home-slide[data-theme="intro"] .home-slide__art::after {
  right: 29px;
  top: 24px;
  width: 31px;
  height: 3px;
  border-radius: 999px;
  background: rgba(192,25,32,.46);
  box-shadow:
    0 12px 0 rgba(192,25,32,.30),
    0 24px 0 rgba(192,25,32,.18);
  transform: rotate(11deg);
}
.home-slide--xhs .home-slide__art::before,
.home-slide[data-theme="xhs"] .home-slide__art::before {
  right: 12px;
  top: 2px;
  width: 60px;
  height: 76px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 16px, rgba(192,25,32,.92) 0 8px, transparent 9px),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.78));
  box-shadow:
    -12px 12px 0 rgba(255,255,255,.22),
    0 15px 24px rgba(90,7,14,.20);
  transform: rotate(-8deg);
}
.home-slide--xhs .home-slide__art::after,
.home-slide[data-theme="xhs"] .home-slide__art::after {
  right: 30px;
  top: 30px;
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: rgba(192,25,32,.40);
  box-shadow:
    0 12px 0 rgba(192,25,32,.26),
    0 24px 0 rgba(192,25,32,.16),
    20px -28px 0 4px rgba(255,255,255,.34);
  transform: rotate(-8deg);
}
.home-slide__eyebrow {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  font-size: 12px;
  font-weight: 800;
}
.home-slide__title {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 6px;
  max-width: 250px;
  font-size: 22px;
  line-height: 1.22;
  letter-spacing: -.4px;
}
.home-slide__desc {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 8px;
  max-width: 240px;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255,255,255,.84);
}
.home-slide__go {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 9px;
  font-size: 13px;
  font-weight: 900;
  color: #fff;
}
.home-slide__go .ui-icon {
  width: 13px;
  height: 13px;
}
.home-promo__dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
}
.home-promo__dots span {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(192,25,32,.22);
  transition: width var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.home-promo__dots span.is-on {
  width: 18px;
  background: var(--red);
}

.home-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.home-action {
  min-height: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  padding: 15px 4px 10px;
  border: 1px solid rgba(238,233,225,.72);
  border-radius: 12px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 6px 15px rgba(60,42,28,.045);
  font-family: inherit;
  cursor: pointer;
}
.home-action:active,
.home-recent-row:active,
.home-slide:active,
.home-today-card__btn:active {
  transform: scale(.985);
}
.home-action__icon {
  width: 31px;
  height: 31px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 7px;
  border-radius: 8px;
  background: var(--red);
  box-shadow: 0 4px 9px rgba(192,25,32,.12);
}
.home-action__icon .ui-icon { width: 20px; height: 20px; color: #fff; stroke-width: 1.9; }
.home-action--start .home-action__icon {
  background: var(--red-bright);
  border-radius: 7px;
}
.home-action--review .home-action__icon {
  background: #8A67F7;
  border-radius: 9px;
}
.home-action--weak .home-action__icon {
  background: #FF7A1A;
  border-radius: 50%;
}
.home-action--fav .home-action__icon {
  background: #5BA8F7;
  border-radius: 6px;
  margin-top: 2px;
}
.home-action__title {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 850;
  color: #202020;
  white-space: nowrap;
}
.home-action__sub {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 400;
  color: #A8A8A8;
  white-space: nowrap;
}

.home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 2px 0;
}
.home-section-head h2 {
  font-size: 18px;
  font-weight: 900;
  color: #231B17;
  letter-spacing: -.3px;
}
.home-section-head span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.home-today .home-section-head span { display: none; }
.home-today,
.home-data,
.home-recent {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.home-today-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 14px;
  align-items: center;
  padding: 15px 16px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(235,235,235,.36);
  box-shadow: 0 1px 5px rgba(40,28,20,.014);
}
.home-today-card__main,
.home-today-card__chapter {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.home-today-card__main {
  grid-column: 1;
  grid-row: 1;
}
.home-today-card__chapter {
  grid-column: 1;
  grid-row: 2;
  margin-top: 6px;
}
.home-today-card__label,
.home-today-card__progress-head span {
  font-size: 11px;
  font-weight: 500;
  color: #9A9A9A;
}
.home-today-card__main strong,
.home-today-card__chapter strong {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 850;
  color: #242424;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-today-card__chapter strong {
  font-size: 12px;
  font-weight: 430;
  color: #818181;
}
.home-today-card__progress {
  grid-column: 1;
  grid-row: 3;
  margin-top: 10px;
}
.home-today-card__progress-head {
  display: block;
  margin-bottom: 10px;
}
.home-today-card__progress-head em {
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.8px;
  color: #202020;
}
.home-today-card__progress-head em span {
  font-size: 21px;
  font-weight: 850;
  color: #252525;
}
.home-today-card__progress-head em small {
  margin-left: 5px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  color: #8F8F8F;
}
.home-progress {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--red-soft-strong);
}
.home-progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red) 0%, var(--red-bright) 100%);
  transition: width var(--dur-slow) var(--ease-out);
}
.home-today-card__btn {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  width: 102px;
  height: 34px;
  margin-top: 9px;
  border: none;
  border-radius: 999px;
  background: var(--red-gradient);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .8px;
  box-shadow: 0 6px 12px rgba(192,25,32,.14);
  cursor: pointer;
}

.home-data {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.home-data__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px;
}
.home-data__head h2 {
  font-size: 18px;
  font-weight: 900;
  color: #231B17;
  letter-spacing: -.3px;
}
.home-data__tabs {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: #F5F2EF;
}
.home-data__tab {
  height: 24px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 11px;
  font-weight: 650;
  padding: 0 8px;
  cursor: pointer;
}
.home-data__tab.is-on {
  background: #fff;
  color: var(--red-deep);
  box-shadow: 0 2px 8px rgba(92,61,29,.06);
}
.home-data__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 8px;
  padding: 13px 8px 11px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(235,235,235,.36);
  box-shadow: 0 1px 5px rgba(40,28,20,.014);
}
.home-data-item {
  position: relative;
  min-height: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 0;
  background: transparent;
  border: none;
}
.home-data-item + .home-data-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 1px;
  background: #F5F1ED;
}
.home-data-item span {
  font-size: 11px;
  font-weight: 450;
  color: #9A9A9A;
  white-space: nowrap;
}
.home-data-item strong {
  order: 2;
  margin-top: 1px;
  font-size: 19px;
  line-height: 1.1;
  font-weight: 950;
  color: #2A1E18;
  letter-spacing: -.5px;
}
.home-data-item strong small {
  display: inline-block;
  margin-left: 1px;
  font-size: 14px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: 0;
  color: #2A1E18;
  transform: none;
}
.home-data-item > span:not(.home-data-icon) {
  order: 3;
}
.home-data-icon {
  order: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 3px;
  color: #2ED6C4;
  background: transparent;
}
.home-data-icon .ui-icon { width: 24px; height: 24px; stroke-width: 1.9; }
.home-data-icon--cube { color: #35D7C6; }
.home-data-icon--clock { color: var(--red-bright); }
.home-data-icon--check { color: #2ED881; }
.home-data-icon--calendar { color: #FF8A24; }

.home-recent__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.home-recent-row,
.home-recent-empty {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 19px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 2px 9px rgba(40,28,20,.018);
}
.home-recent-row {
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.home-recent-empty {
  justify-content: center;
  color: var(--ink-soft);
  font-size: 13px;
}
.home-recent-row__dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 6px var(--red-soft);
}
.home-recent-row__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-recent-row__title {
  font-size: 14px;
  font-weight: 850;
  color: #2A211C;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-recent-row__meta {
  font-size: 12px;
  color: var(--ink-soft);
}
.home-recent-row__pct {
  flex: 0 0 auto;
  min-width: 42px;
  text-align: right;
  font-size: 13px;
  font-weight: 900;
  color: var(--red);
}
@media (max-width: 380px) {
  .home-hero__title-main { font-size: 21px; }
  .home-hero__title-ai { font-size: 19px; }
  .home-actions { gap: 8px; }
  .home-action { min-height: 108px; padding-left: 3px; padding-right: 3px; }
  .home-action__title { font-size: 13px; }
  .home-action__sub { font-size: 11px; }
  .home-data__grid { gap: 6px; }
  .home-data-item strong { font-size: 17px; }
}

.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: var(--tap-transition);
}
.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 + var(--safe-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: var(--shadow-red);
  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 + var(--safe-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: var(--shadow-red);
}
.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: var(--tap-transition);
}
.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: var(--radius-sm); font-weight: 600;
}
.filter-tab--active .filter-tab__cnt { background: rgba(255,255,255,.25); color: #fff; }

.study-filters {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  column-gap: 14px;
  padding: 0 8px 2px;
}
.study-select {
  position: static;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.study-select__btn {
  width: auto;
  max-width: 112px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 0;
  border: none;
  background: transparent;
  color: var(--red-deep);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}
.study-select__value {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.study-select__chev {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}
.study-select__chev .ui-icon {
  width: 13px;
  height: 13px;
  transform: rotate(90deg);
}
.study-select.is-open .study-select__btn {
  color: var(--red);
}
.study-select.is-open .study-select__chev {
  color: var(--red);
  transform: translateY(2px) rotate(180deg);
}
.study-select__menu {
  position: absolute;
  top: 32px;
  left: 0;
  right: 0;
  z-index: 40;
  max-height: min(46dvh, 320px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px;
  border: 1px solid var(--red-line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.study-select.is-open .study-select__menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  animation: studyMenuDown var(--dur) var(--ease-out) both;
}
@keyframes studyMenuDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.study-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.study-option__main {
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.study-option__meta {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--ink-soft);
}
.study-option.is-selected {
  background: var(--red-soft);
  color: var(--red-deep);
}
.study-option.is-selected .study-option__main { font-weight: 800; }
.study-option.is-selected .study-option__meta { color: var(--red); }

.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: var(--tap-transition);
}
.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: var(--radius-sm); }
.q-card__badge { flex: 0 0 auto; font-size: 11px; padding: 1px 8px; border-radius: var(--radius-sm); 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; }
.q-list--chapter { margin-top: 12px; }
.q-card--compact { padding: 12px 14px; }
.q-card--compact .q-card__top { margin-bottom: 6px; }
.q-card--compact .q-card__q { font-size: 14.5px; line-height: 1.5; }
.q-card--compact .q-card__years { margin-top: 6px; }

.study-subject-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 -5px;
  padding: 8px 5px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(250, 225, 147, .11) 0%, rgba(250, 225, 147, .055) 100%);
}
.study-subject-group + .study-subject-group { margin-top: -12px; }
.study-subject-group .chapter-card {
  margin: 0 0;
  box-shadow: var(--shadow-sm);
}
.study-subject-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 2px 0;
  padding: 0 2px;
}
.study-subject-title:first-child { margin-top: 0; }
.study-subject-title span {
  font-size: 18px;
  font-weight: 800;
  color: var(--red-deep);
}
.study-subject-title em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.chapter-card {
  width: 100%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "main go"
    "bar pct";
  align-items: center;
  gap: 12px 14px;
  padding: 16px 22px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
}
.chapter-card:active { transform: scale(.99); box-shadow: var(--shadow); }
.chapter-card__main { grid-area: main; min-width: 0; }
.chapter-card__title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
}
.chapter-card__no {
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
}
.chapter-card__name {
  min-width: 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.chapter-card__meta {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.chapter-card__review {
  color: var(--red);
  font-weight: 800;
}
.chapter-card__go {
  grid-area: go;
  align-self: start;
  color: var(--ink-soft);
  font-size: 28px;
  line-height: 1;
  transform: translateY(2px);
}
.chapter-card__progress {
  grid-area: bar;
  height: 4px;
  border-radius: 999px;
  background: rgba(192,25,32,.10);
  overflow: hidden;
}
.chapter-card__progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
}
.chapter-card__pct {
  grid-area: pct;
  font-size: 12px;
  font-weight: 800;
  color: var(--ink-soft);
}

.study-chapter-head {
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--red-line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff 0%, #fff 64%, #fff7f7 100%);
  box-shadow: var(--shadow-sm);
}
.study-chapter-head__eyebrow {
  font-size: 12px;
  font-weight: 800;
  color: var(--red-deep);
}
.study-chapter-head__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-top: 3px;
}
.study-chapter-head__title {
  min-width: 0;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
}
.study-chapter-head__count {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red-deep);
  border: 1px solid var(--red-line);
  font-size: 12px;
  font-weight: 800;
}
.study-chapter-head__meta {
  margin-top: 5px;
  font-size: 12px;
  color: var(--ink-soft);
}
.study-chapter-head__meta span {
  color: var(--red);
  font-weight: 800;
}

.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-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-right: 56px; }
.detail-meta { font-size: 13px; color: var(--red); font-weight: 600; min-width: 0; flex: 1 1 auto; }
.detail-pos-top { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--red-deep); background: var(--red-soft); border: 1px solid var(--red-line); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.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: var(--radius-sm); cursor: pointer; transition: var(--tap-transition); }
.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;
}
/* 详情页行内反馈图标(取代原右下悬浮球,避免遮挡底部操作区) */
.speak-btn--feedback {
  min-width: 0;
  width: 38px;
  padding: 8px 0;
  font-size: 15px;
  box-shadow: none;
}

.answer-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
/* 字号/行距须与闪卡背面 .flash-a 保持一致(统一阅读体验) */
.answer-text { font-family: var(--font-serif); font-size: 16.5px; line-height: 1.95; color: var(--ink); white-space: pre-wrap; letter-spacing: .2px; }
.memory-history {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(235,235,235,.78);
}
.memory-history[hidden] { display: none; }
.memory-history__title {
  color: #A9A1A0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .2px;
}
.memory-history__summary {
  margin-top: 12px;
  color: #5B5552;
  font-size: 13px;
  font-weight: 750;
}
.memory-history__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 4px;
  margin-top: 10px;
}
.memory-history__chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  box-shadow: 0 3px 8px rgba(45,32,26,.055);
}
.memory-history__chip--mastered { background: #E69A96; }
.memory-history__chip--fuzzy { background: #D8B76A; }
.memory-history__chip--forgot { background: #B9B4B1; }
.memory-history__empty {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 12.5px;
}
.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; }
.answer-inline-image {
  margin: 16px 0;
  white-space: normal;
  break-inside: avoid;
}
.answer-inline-image img {
  max-height: 70vh;
  object-fit: contain;
}
.answer-inline-image__error {
  display: block;
  padding: 18px 10px;
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink-soft);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.answer-inline-image__error[hidden] { display: none; }
.answer-image-missing { color: var(--ink-soft); font-size: 13px; }

.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: var(--tap-transition);
}
.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: var(--radius-pill); padding: 7px 13px; font-size: 13px; cursor: pointer; }
.related-chip:active { background: var(--red); color: #fff; }

/* ============ AI 问答 ============ */
.view--chat.view--active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  position: absolute;
  inset: 0;
  height: auto;
  min-height: 0;
  overflow: hidden;
}
#view-chat { padding: 0; }
.chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  padding: 10px 14px 8px;
  background: linear-gradient(180deg, rgba(255,248,248,.98) 0%, rgba(255,248,248,.72) 100%);
  border-bottom: none;
  z-index: 2;
}
.chat-toolbar__hint { font-size: 12px; color: var(--ink-soft); }
.chat-toolbar__actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.chat-new,
.chat-weak {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .22s cubic-bezier(.2,.75,.35,1), color .22s cubic-bezier(.2,.75,.35,1), box-shadow .22s cubic-bezier(.2,.75,.35,1), transform .22s cubic-bezier(.2,.75,.35,1);
}
.chat-new { background: rgba(255,255,255,.78); color: var(--red-deep); box-shadow: 0 6px 16px rgba(54,31,28,.04); }
.chat-new:active { transform: translateY(1px) scale(.985); background: var(--red-soft); }
.chat-weak {
  background: var(--red-gradient);
  color: #fff;
  box-shadow: 0 8px 18px rgba(192,25,32,.18);
}
.chat-weak:active { transform: translateY(1px) scale(.985); background: var(--red-deep); }
.chat-menu {
  flex: 0 0 auto;
  width: 38px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(54,31,28,.04);
  transition: background-color .22s cubic-bezier(.2,.75,.35,1), transform .22s cubic-bezier(.2,.75,.35,1);
}
.chat-menu:active { transform: translateY(1px) scale(.985); background: var(--red-soft); }

/* 历史对话抽屉(☰):覆盖在 AI 问答视图内,左侧滑入 */
.view--chat { position: relative; }
.chat-drawer-overlay { position: absolute; inset: 0; background: rgba(30,18,18,.28); backdrop-filter: blur(3px); z-index: 30; }
.chat-drawer { position: absolute; top: 0; left: 0; bottom: 0; width: 78%; max-width: 300px; background: rgba(255,255,255,.96); z-index: 31; transform: translateX(-102%); transition: transform var(--dur-slow) var(--ease-out); display: flex; flex-direction: column; box-shadow: 8px 0 30px rgba(35,22,18,.12); }
.chat-drawer--open { transform: translateX(0); }
.chat-drawer__head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 14px 15px 12px; border-bottom: 1px solid rgba(235,235,235,.58); }
.chat-drawer__title { font-size: 15px; font-weight: 700; color: var(--ink); }
.chat-drawer__close { width: 28px; height: 28px; border: none; background: transparent; color: var(--ink-soft); font-size: 15px; cursor: pointer; border-radius: 8px; }
.chat-drawer__close:active { background: var(--cream); }
.chat-drawer__new { flex: 0 0 auto; margin: 12px 14px; padding: 10px 12px; border: none; border-radius: 16px; background: var(--red-soft); color: var(--red); font-size: 14px; font-weight: 700; cursor: pointer; }
.chat-drawer__new:active { background: var(--red); color: #fff; }
.chat-history-list { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 8px 8px; }
.chat-history__empty { color: var(--ink-soft); font-size: 13px; text-align: center; padding: 32px 12px; line-height: 1.8; }
.chat-history__item { display: flex; align-items: stretch; gap: 4px; border-radius: 14px; margin-bottom: 4px; }
.chat-history__item--active { background: var(--red-soft); }
.chat-history__open { flex: 1 1 auto; min-width: 0; text-align: left; background: transparent; border: none; padding: 9px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; border-radius: 10px; }
.chat-history__open:active { background: var(--cream); }
.chat-history__title { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-history__time { font-size: 11.5px; color: var(--ink-soft); }
.chat-history__del { flex: 0 0 auto; width: 30px; border: none; background: transparent; color: var(--ink-soft); font-size: 13px; cursor: pointer; border-radius: 8px; }
.chat-history__del:active { background: var(--red-soft); color: var(--red); }
.chat-drawer__foot { flex: 0 0 auto; padding: 10px 14px; border-top: 1px solid rgba(235,235,235,.58); font-size: 11px; color: var(--ink-soft); line-height: 1.6; }
.chat-stream {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 8px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none;
}
.chat-stream::-webkit-scrollbar { display: none; }
.chat-welcome {
  position: relative;
  overflow: hidden;
  margin: 2px 0 2px;
  padding: 16px 16px 14px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 12%, rgba(192,25,32,.12) 0, rgba(192,25,32,0) 32%),
    linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.9) 100%);
  box-shadow: 0 12px 28px rgba(56,34,28,.055);
}
.chat-welcome::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -34px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(192,25,32,.055);
}
.chat-welcome__eyebrow {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red-deep);
  font-size: 11.5px;
  font-weight: 850;
  letter-spacing: .5px;
}
.chat-welcome__eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 5px rgba(192,25,32,.09);
}
.chat-welcome h2 {
  position: relative;
  z-index: 1;
  margin: 7px 0 4px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: .2px;
}
.chat-welcome p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 88%;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.55;
}
.chat-prompts {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.chat-prompts__title {
  flex: 0 0 100%;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: .2px;
}
.chat-prompt {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(192,25,32,.12);
  border-radius: 999px;
  padding: 8px 11px 8px 12px;
  background: rgba(255,255,255,.96);
  color: var(--red-deep);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(192,25,32,.07);
  transition: background-color .22s cubic-bezier(.2,.75,.35,1), border-color .22s cubic-bezier(.2,.75,.35,1), box-shadow .22s cubic-bezier(.2,.75,.35,1), transform .22s cubic-bezier(.2,.75,.35,1);
}
.chat-prompt .ui-icon {
  width: 13px;
  height: 13px;
  opacity: .72;
}
.chat-prompt:active {
  border-color: rgba(192,25,32,.22);
  background: var(--red-soft);
  box-shadow: 0 3px 9px rgba(192,25,32,.08);
  transform: translateY(1px);
}
.chat-bubble {
  max-width: 86%;
  padding: 12px 15px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.72;
  word-break: break-word;
}
.chat-bubble--ai {
  align-self: flex-start;
  background: rgba(255,255,255,.94);
  border: none;
  color: var(--ink);
  border-bottom-left-radius: 8px;
  box-shadow: 0 10px 26px rgba(56,34,28,.055);
}
.chat-bubble--user {
  align-self: flex-end;
  background: var(--red-gradient);
  color: #fff;
  border-bottom-right-radius: 8px;
  box-shadow: 0 9px 20px rgba(192,25,32,.14);
}
.chat-bubble--ai.chat-bubble--wide { max-width: 92%; }
.chat-bubble--thinking {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-style: normal;
}
.chat-thinking__spin {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(192,25,32,.16);
  border-top-color: var(--red);
  animation: chatSpin .78s linear infinite;
}
.chat-thinking__dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: -2px;
}
.chat-thinking__dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  opacity: .28;
  animation: chatDot 1.05s ease-in-out infinite;
}
.chat-thinking__dots i:nth-child(2) { animation-delay: .16s; }
.chat-thinking__dots i:nth-child(3) { animation-delay: .32s; }
@keyframes chatSpin { to { transform: rotate(360deg); } }
@keyframes chatDot {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: .9; transform: translateY(-2px); }
}
.chat-bubble--error { background: var(--red-soft); color: var(--red-deep); box-shadow: none; }
.chat-bubble--ai .katex-display { margin: .4em 0; }

/* AI 答案富文本(renderRichText 产出):标题/段落/列表/分割线/行内码/真表格 */
.chat-bubble--ai .md-p { margin: .5em 0; }
.chat-bubble--ai .md-p:first-child { margin-top: 0; }
.chat-bubble--ai .md-p:last-child { margin-bottom: 0; }
.chat-bubble--ai .md-h { font-weight: 700; color: var(--ink); line-height: 1.4; margin: .8em 0 .4em; }
.chat-bubble--ai .md-h:first-child { margin-top: 0; }
.chat-bubble--ai .md-h1 { font-size: 16px; }
.chat-bubble--ai .md-h2 { font-size: 15px; }
.chat-bubble--ai .md-h3, .chat-bubble--ai .md-h4, .chat-bubble--ai .md-h5, .chat-bubble--ai .md-h6 { font-size: 14px; color: var(--red-deep); }
.chat-bubble--ai .md-ul { margin: .4em 0; padding-left: 1.35em; }
.chat-bubble--ai .md-ul li { margin: .25em 0; }
.chat-bubble--ai strong { font-weight: 700; color: var(--ink); }
.chat-bubble--ai code { background: var(--cream); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.chat-bubble--ai .md-codeblock {
  margin: .6em 0;
  padding: 10px 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.55;
}
.chat-bubble--ai .md-codeblock code {
  display: block;
  min-width: max-content;
  padding: 0;
  background: transparent;
  border: 0;
  white-space: pre;
}
.chat-bubble--ai .md-hr { border: none; border-top: 1px solid var(--line); margin: .7em 0; }
.chat-bubble--ai .md-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: .6em 0; border: 1px solid var(--line); border-radius: 10px; }
.chat-bubble--ai .md-table { border-collapse: collapse; width: 100%; font-size: 13px; display: table; }
.chat-bubble--ai .md-table th, .chat-bubble--ai .md-table td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; line-height: 1.5; }
.chat-bubble--ai .md-table th { background: var(--red-soft); color: var(--red-deep); font-weight: 700; white-space: nowrap; }
.chat-bubble--ai .md-table tr:nth-child(even) td { background: var(--cream); }

.chat-sources {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid rgba(192,25,32,.08);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.chat-sources__title {
  font-size: 11.5px;
  color: var(--red-deep);
  font-weight: 850;
  letter-spacing: .3px;
}
/* 内容安全:AI 生成内容标识(合规) */
.chat-ai-disclaimer {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.chat-rating {
  margin-top: 10px;
  padding: 11px 12px 12px;
  border: 1px solid var(--red-line);
  border-radius: 14px;
  background: var(--red-soft);   /* 轻底色卡片块:让评价条从长答案+来源卡片里"浮"出来,提升显著度 */
}
.chat-rating__title { font-size: 13px; font-weight: 700; color: var(--ink); }
.chat-rating__actions { display: flex; gap: 10px; margin-top: 9px; }
.chat-rating__actions[hidden] { display: none; }   /* 守卫:display:flex 会盖过默认 [hidden]{display:none},已评价后需隐藏两键 */
/* 两键各占一半、等大等权:加大点击区(移动端 42px 易点),严格对称,不给「有帮助」更大/更亮以免诱导好评 */
.chat-rating__btn {
  flex: 1 1 0;
  min-height: 42px;
  border: 1px solid var(--red-line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.chat-rating__chip,
.chat-rating__submit {
  border: 1px solid var(--red-line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  cursor: pointer;
}
.chat-rating__btn:active,
.chat-rating__chip:active { transform: scale(.97); }
.chat-rating__chip.is-on { background: var(--red-soft-strong); color: var(--red-deep); border-color: rgba(192,25,32,.28); font-weight: 700; }
.chat-rating__reasons { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.chat-rating__reasons[hidden] { display: none; }
.chat-rating__submit { width: 100%; background: var(--red); color: #fff; border-color: var(--red); font-weight: 700; }
.chat-rating__notice { margin-top: 7px; font-size: 10.5px; line-height: 1.5; color: var(--ink-soft); }
.chat-rating__status { margin-top: 6px; font-size: 11.5px; color: var(--ink-soft); }
.chat-rating__status.is-done { color: var(--red-deep); font-weight: 700; }
.chat-rating__status.is-error { color: #c0392b; }
.chat-welcome__notice {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.chat-source {
  width: 100%;
  text-align: left;
  background: rgba(255,248,248,.94);
  border: none;
  border-radius: 14px;
  padding: 9px 11px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: inset 0 0 0 1px rgba(192,25,32,.045);
}
.chat-source:active { background: var(--red-soft); }
.chat-source--reference {
  cursor: default;
  background: rgba(248,247,244,.94);
  box-shadow: inset 0 0 0 1px rgba(89,76,68,.06);
}
.chat-source__meta { font-size: 11px; color: var(--red-deep); font-weight: 750; }
.chat-source__q { font-size: 13px; color: var(--ink); line-height: 1.5; font-weight: 650; }
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px calc(10px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(255,249,249,0) 0%, rgba(255,255,255,.95) 28%, rgba(255,255,255,.98) 100%);
  border-top: none;
  box-shadow: 0 -14px 34px rgba(56,34,28,.035);
  z-index: 3;
}
.chat-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: none;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 16px;
  outline: none;
  background: #FFF6F6;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(192,25,32,.045), 0 6px 16px rgba(56,34,28,.04);
}
.chat-input::placeholder { color: rgba(106,93,86,.72); }
.chat-send {
  flex: 0 0 auto;
  min-width: 54px;
  height: 44px;
  padding: 0 16px;
  border: none;
  border-radius: 999px;
  background: var(--red-gradient);
  color: #fff;
  font-size: 14.5px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 9px 20px rgba(192,25,32,.18);
}
.chat-send:active { background: var(--red-deep); transform: translateY(1px) scale(.985); }
.chat-send:disabled { opacity: .55; cursor: default; box-shadow: none; }

/* 软键盘打开时释放底部导航占用的高度。聊天页绝对贴合 content 四边,
   键盘收起后不会保留旧的百分比高度,避免输入条悬在页面中间。 */
html.chat-keyboard-open .tabbar {
  height: 0;
  flex-basis: 0;
  padding: 0;
  opacity: 0;
  transform: translateY(100%);
  border-top-color: transparent;
  pointer-events: none;
  transition: none;
}
html.chat-keyboard-open .chat-input-bar {
  padding-bottom: 10px;
}

/* ============ 我的 ============ */
.mine-hero {
  margin: 0 -16px 14px;
  padding: 28px 16px 16px;
  background: linear-gradient(180deg, rgba(192,25,32,.98) 0%, rgba(192,25,32,.86) 52%, rgba(192,25,32,.42) 84%, rgba(192,25,32,.08) 100%);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 10px 26px rgba(192,25,32,.10);
}
.mine-hero__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 42px;
}
.mine-hero__title {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 900;
  color: #fff;
}
.mine-hero__icons {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #fff;
}
.mine-hero__icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  opacity: .96;
}
.memory-panel,
.collection-panel {
  background: rgba(255,255,255,.92);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.memory-panel { margin-top: 12px; }
.memory-panel__head,
.collection-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.memory-panel__title,
.collection-panel__title {
  font-size: 17px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--ink);
}
.memory-scope-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: var(--radius-pill);
  background: #F3EEE7;
}
.memory-scope-tab {
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink-soft);
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 850;
  cursor: pointer;
}
.memory-scope-tab.is-on {
  color: #fff;
  background: var(--red);
  box-shadow: 0 4px 10px rgba(192,25,32,.14);
}
.overview-grid { display: flex; flex-direction: column; gap: 12px; }
.memory-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ov-card {
  width: 100%;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  font: inherit;
  color: inherit;
  background: #FAF8F4;
  border: none;
  border-radius: 8px;
  padding: 9px 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--tap-transition);
}
.ov-card__num, .ov-card__label, .ov-card__sub { display: block; }
.ov-card:active { transform: scale(.98); }
.ov-card--active { background: var(--red-soft); }
.ov-card__label { font-size: 12px; color: var(--ink-soft); font-weight: 750; }
.ov-card__num {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
  color: var(--red);
  letter-spacing: -.4px;
}
.ov-card__num em {
  font-style: normal;
  font-size: 12px;
  font-weight: 750;
  margin-left: 3px;
  color: var(--ink-soft);
}
.ov-card__sub { font-size: 11px; font-weight: 800; color: var(--ink-soft); }
.ov-card__sub--up { color: var(--red); }
.ov-card__sub--down { color: #4E9A64; }
.ov-card__sub--flat { color: rgba(110,110,110,.72); }
.ov-card__sub--status {
  display: inline-flex;
  align-self: center;
  justify-content: center;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  line-height: 1.2;
}
.ov--mastered .ov-card__sub--status { color: var(--red); background: rgba(192,25,32,.10); }
.ov--fuzzy .ov-card__sub--status { color: var(--gold); background: rgba(184,134,11,.14); }
.ov--forgot .ov-card__sub--status { color: #666; background: rgba(120,120,120,.14); }
.ov--fuzzy .ov-card__num { color: var(--gold); }
.ov--forgot .ov-card__num { color: #6F6F6F; }
.memory-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.35fr;
  align-items: stretch;
  gap: 10px;
}
.memory-metric {
  min-height: 70px;
  display: grid;
  grid-template-rows: 24px 42px;
  align-items: flex-start;
  gap: 4px;
  border: none;
  background: transparent;
  padding: 0 2px;
  text-align: left;
  font: inherit;
  color: inherit;
}
.memory-metric[data-key] { cursor: pointer; }
.memory-metric__label {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
  color: var(--ink-soft);
}
.memory-metric__main {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.memory-metric strong {
  font-size: 28px;
  line-height: 1.05;
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -.5px;
}
.memory-metric em {
  font-style: normal;
  font-size: 11px;
  line-height: 1.1;
  font-weight: 900;
  color: var(--ink-soft);
}
.memory-trend {
  min-height: 70px;
  display: flex;
  position: relative;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
}
.memory-trend svg { width: 100%; height: 62px; overflow: visible; }
.memory-trend__fill { fill: rgba(190, 154, 104, .13); }
.memory-trend__line {
  fill: none;
  stroke: #79624E;
  stroke-width: 3.8;
  stroke-linecap: round;
}
.memory-trend__caption {
  position: absolute;
  left: 0;
  top: 0;
  font-size: 10px;
  font-weight: 750;
  color: rgba(110,110,110,.72);
}
.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; }
.collection-panel { margin-top: 12px; padding: 12px 14px; }
.collection-panel__go { color: var(--ink-soft); font-size: 22px; line-height: 1; }
.collection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.collection-card {
  position: relative;
  min-height: 52px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title go" "num go" "sub go";
  align-content: center;
  gap: 2px 8px;
  border: none;
  border-radius: var(--radius);
  background: #FCFAF7;
  padding: 8px 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(236,231,223,.45);
}
.collection-card:active { transform: scale(.98); background: var(--red-soft); }
.collection-card__title { grid-area: title; font-size: 13px; line-height: 1.2; font-weight: 850; color: var(--ink); }
.collection-card__num { grid-area: num; font-size: 18px; line-height: 1; font-weight: 900; color: var(--ink); }
.collection-card__sub { grid-area: sub; font-size: 10.5px; line-height: 1.15; font-weight: 650; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.collection-card__go { grid-area: go; align-self: center; color: var(--ink-soft); font-size: 20px; }
.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; }
.note-snippets { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.note-snippet {
  display: block;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 600;
  color: #7A5B25;
  background: rgba(250, 225, 147, .24);
  border-radius: 8px;
  padding: 5px 7px;
}

/* ============ 闪卡独立页 ============ */
#view-flash-home.view--active {
  display: flex;
  flex-direction: column;
  min-height: calc(var(--app-height) - var(--topbar-h) - var(--tabbar-h) - 32px);
}
.flash-home-range {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  margin: 2px 0 16px;
}
.flash-home-chip {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  color: #777;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(40,28,20,.025);
  transition: background-color .24s cubic-bezier(.2,.75,.35,1), color .24s cubic-bezier(.2,.75,.35,1), box-shadow .24s cubic-bezier(.2,.75,.35,1), transform .24s cubic-bezier(.2,.75,.35,1);
}
.flash-home-chip.is-on {
  background: var(--red-soft);
  color: var(--red-deep);
  box-shadow: 0 6px 18px rgba(192,25,32,.075);
}
.flash-home-chip--select {
  gap: 4px;
}
.flash-home-chip--select .ui-icon {
  width: 12px;
  height: 12px;
  opacity: .78;
  transform: rotate(90deg);
}
.flash-home-chip:active {
  transform: translateY(1px) scale(.985);
}
.flash-home-preview {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
  text-align: left;
  border: 1px solid rgba(235,235,235,.56);
  border-radius: 28px;
  padding: 24px 22px 20px;
  background:
    radial-gradient(circle at 86% 8%, rgba(192,25,32,.08) 0, rgba(192,25,32,0) 34%),
    linear-gradient(180deg, #fff 0%, #FFFDFB 100%);
  box-shadow: 0 14px 36px rgba(60,42,28,.075);
  font-family: inherit;
  cursor: pointer;
}
.flash-home-preview::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 82px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(192,25,32,.14), transparent);
}
.flash-home-preview:disabled {
  cursor: default;
  opacity: .72;
}
.flash-home-preview__icon {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--red-soft);
  color: var(--red);
}
.flash-home-preview__icon .ui-icon {
  width: 24px;
  height: 24px;
  stroke-width: 1.9;
}
.flash-home-preview__hint {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: calc(100% - 56px);
  padding: 4px 10px;
  border-radius: 999px;
  background: #F8F2EF;
  color: #8A7A72;
  font-size: 12px;
  font-weight: 850;
}
.flash-home-preview__question {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 190px;
  font-family: var(--font-serif);
  font-size: 23px;
  line-height: 1.7;
  font-weight: 800;
  color: #28211D;
  letter-spacing: .2px;
}
.flash-home-preview__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.flash-home-preview__foot span {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.flash-home-preview__foot strong {
  font-size: 13px;
  line-height: 1.25;
  font-weight: 900;
  color: var(--red-deep);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flash-home-preview__foot em {
  font-style: normal;
  font-size: 12px;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flash-home-preview__foot i {
  flex: 0 0 auto;
  min-width: 42px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}
.flash-home-start {
  width: 100%;
  height: 48px;
  margin-top: 16px;
  border: none;
  border-radius: 999px;
  background: var(--red-gradient);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .3px;
  box-shadow: 0 10px 22px rgba(192,25,32,.18);
  cursor: pointer;
}
.flash-home-start:disabled {
  opacity: .45;
  cursor: default;
}
/* ============ 底部导航 ============ */
.tabbar {
  position: relative; z-index: 20;
  flex: 0 0 calc(var(--tabbar-h) + var(--safe-bottom));
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 4px 6px calc(var(--safe-bottom) + 3px);
  display: flex; gap: 2px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 -8px 24px rgba(60,42,28,.05);
  transition: height var(--dur) var(--ease-in), flex-basis var(--dur) var(--ease-in),
    padding var(--dur) var(--ease-in), opacity var(--dur-fast) var(--ease-in),
    transform var(--dur) var(--ease-in), border-color var(--dur-fast) var(--ease-in);
}
.tab {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: none;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  color: #8A8A8A;
}
.tab__icon {
  width: 23px;
  height: 23px;
  display: block;
  stroke-width: 1.9;
}
.tab__label {
  font-size: 11.5px;
  line-height: 1.15;
  font-weight: 650;
  white-space: nowrap;
}
.tab--active {
  color: var(--red);
  background: rgba(192,25,32,.06);
  transform: translateY(-1px);
}
.tab--active .tab__label { font-weight: 800; }
.tab:active { transform: translateY(-1px) scale(.97); }

/* ============ 闪卡全屏 ============ */
.flash-layer { position: fixed; inset: 0; z-index: 100; height: var(--app-height); max-height: var(--app-height); 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(var(--safe-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: 2px 12px 8px; perspective: 1200px; overflow: hidden; }
.flash-card-wrap { position: relative; width: 100%; max-width: 420px; height: min(72dvh, 610px); }
.flash-card { position: relative; width: 100%; height: 100%; cursor: pointer; transform-style: preserve-3d; transition: transform .56s cubic-bezier(.22,.78,.24,1); }
.flash-card.is-flipped { transform: rotateY(180deg); }
/* 闪卡切换动效:整张卡片划走 + 新卡进入(动效加在 wrap 上,与内层翻面 transform 解耦) */
.flash-card-wrap--out-left  { animation: flashOutLeft  .26s cubic-bezier(.55,0,.85,.35) forwards; }
.flash-card-wrap--out-right { animation: flashOutRight .26s cubic-bezier(.55,0,.85,.35) forwards; }
.flash-card-wrap--in-right  { animation: flashInRight  .28s cubic-bezier(.2,.75,.35,1) both; }
.flash-card-wrap--in-left   { animation: flashInLeft   .28s cubic-bezier(.2,.75,.35,1) both; }
@keyframes flashOutLeft  { to { transform: translateX(-135%) rotate(-13deg); opacity: 0; } }
@keyframes flashOutRight { to { transform: translateX(135%)  rotate(13deg);  opacity: 0; } }
@keyframes flashInRight  { from { transform: translateX(62%)  scale(.93); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes flashInLeft   { from { transform: translateX(-62%) scale(.93); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .flash-card-wrap--out-left, .flash-card-wrap--out-right,
  .flash-card-wrap--in-right, .flash-card-wrap--in-left { animation: none; }
  /* 全局降级:页面推进/卡片放大关闭,高频阅读内容保持稳定直出。 */
  .view--transition-leave, .view--transition-enter, .detail-zoom-clone {
    animation: none !important;
  }
  .topbar, .tabbar, .chat-drawer, .picker-sheet, .flash-cfg-sheet, .contact-sheet, .toast, .study-select__menu {
    animation: none !important;
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  @media (hover: hover) {
    .q-card:hover, .today-card:hover, .resume-card:hover, .mine-link:hover,
    .consult-card:hover, .consult-link:hover, .ov-card:hover, .memory-metric:hover, .collection-card:hover, .weak-item:hover,
    .picker-item:hover, .feedback-entry:hover, .weak-review-entry:hover,
    .account-card:hover, .chat-source:hover { transform: none; }
  }
}
.flash-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg); padding: 24px 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.9; white-space: pre-wrap; color: var(--ink); letter-spacing: .2px; }
.flash-a .answer-inline-image {
  margin: 14px 0;
  padding: 8px;
  background: rgba(255,255,255,.72);
  box-shadow: none;
}
.flash-a .answer-inline-image img { max-height: 58vh; }

.flash-controls { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(var(--safe-bottom) + 12px); }
.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 var(--dur) var(--ease-spring); }
@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: var(--tap-transition); }
.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: overlayFade var(--dur) var(--ease-out); }
.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: var(--safe-bottom); animation: sheetUp var(--dur-slow) var(--ease-out);
}
@keyframes overlayFade { from { opacity: 0; } to { opacity: 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;
  overflow: hidden;
  margin-top: 14px;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(236,231,223,.76);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(60,42,28,.025);
}
.mine-link,
.weak-review-entry {
  position: relative;
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 16px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: var(--tap-transition);
}
.mine-link + .mine-link::before,
.mine-link + .weak-review-entry::before,
.weak-review-entry + .mine-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50px;
  right: 0;
  height: 1px;
  background: rgba(236,231,223,.78);
  transform: scaleY(.5);
  transform-origin: top;
}
.mine-link:active,
.weak-review-entry:active {
  transform: none;
  background: rgba(250,247,242,.82);
}
.mine-link__icon,
.weak-review-entry__icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4E79F2;
}
.mine-link__icon .ui-icon,
.weak-review-entry__icon .ui-icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}
.mine-link__text,
.weak-review-entry__text {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}
.mine-link__title,
.weak-review-entry__title {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 750;
  color: #565656;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mine-link__sub,
.weak-review-entry__sub { display: none; }
.mine-link__go,
.weak-review-entry__go {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9C9AA3;
}
.mine-link__go .ui-icon,
.weak-review-entry__go .ui-icon {
  width: 18px;
  height: 18px;
}
.mine-link--ai .mine-link__icon { color: var(--red); }
.mine-link--consult .mine-link__icon { color: #4E79F2; }
.mine-link--book .mine-link__icon { color: #FF7A1A; }
.mine-link--contact .mine-link__icon { color: #28A56A; }
.mine-link--feedback .mine-link__icon { color: #7C63FF; }

/* 备案号页脚(工信部合规:可点击跳转 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;
  flex-direction: column;
  gap: 10px;
  background: #FFF5F0;
  border: none;
  border-radius: 10px;
  padding: 14px 14px 13px;
  margin-bottom: 12px;
  box-shadow: 0 7px 18px rgba(159, 20, 27, .12);
}
.account-card__main { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.account-card__left { display: flex; align-items: center; gap: 11px; min-width: 0; }
.account-card__avatar {
  flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--red-deep); background: #FFE0D4; border: 3px solid rgba(255,255,255,.78);
  box-shadow: inset 0 -4px 10px rgba(129,68,44,.08);
}
.account-card__avatar .ui-icon { width: 30px; height: 30px; stroke-width: 1.8; }
.account-card__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.account-card__name { font-size: 16px; font-weight: 900; color: #2D2D2D; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card__sub { font-size: 13px; color: #6C6C6C; line-height: 1.4; font-weight: 750; }
.account-card__btn {
  flex: 0 0 auto;
  border: none;
  background: #FFE7CF;
  color: #C17A31;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.account-card__btn:active { transform: scale(.97); background: #F8D3AF; }
.account-card--logged .account-card__btn { background: #FFE7CF; color: #C17A31; }
.account-card__progress-row { display: flex; align-items: center; gap: 10px; padding-left: 70px; }
.account-card__progress {
  position: relative;
  flex: 1 1 auto;
  height: 4px;
  border-radius: var(--radius-pill);
  background: #E7D2C3;
  overflow: hidden;
}
.account-card__progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #E0A742, #F6C56D);
}
.account-card__score { flex: 0 0 auto; font-size: 12px; font-weight: 850; color: #8D8D8D; font-variant-numeric: tabular-nums; }

/* ---------- 登录弹层:验证码行 ---------- */
.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; }

.proof-card { background: var(--paper); border: 1px solid var(--red-line); border-radius: var(--radius); padding: 15px; box-shadow: var(--shadow); }
.proof-card__title { font-size: 15px; font-weight: 800; color: var(--red-deep); margin-bottom: 10px; }
.proof-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.proof-metrics span { background: var(--red-soft); border-radius: 12px; padding: 10px 6px; text-align: center; font-size: 11px; color: var(--ink-soft); }
.proof-metrics b { display: block; font-size: 20px; line-height: 1.1; color: var(--red); margin-bottom: 3px; }
.proof-top10 { margin: -2px 0 12px; padding: 12px; border-radius: 13px; background: linear-gradient(135deg, var(--red) 0%, var(--red-deep) 100%); color: #fff; }
.proof-top10__title { font-size: 12px; font-weight: 700; margin-bottom: 8px; color: rgba(255,255,255,.92); }
.proof-top10__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.proof-top10__grid span { border-radius: 11px; padding: 8px 5px; background: rgba(255,255,255,.14); text-align: center; font-size: 10.5px; line-height: 1.35; color: rgba(255,255,255,.88); }
.proof-top10__grid b { display: block; font-size: 19px; line-height: 1.05; color: #fff; margin-bottom: 3px; }
.proof-table { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.proof-table__row { display: grid; grid-template-columns: 1.35fr 1fr 1fr .8fr; }
.proof-table__row span { padding: 9px 6px; text-align: center; font-size: 12.5px; color: var(--ink); border-top: 1px solid var(--line); }
.proof-table__row:first-child span { border-top: none; }
.proof-table__row--head span { background: var(--red-soft); color: var(--red-deep); font-weight: 700; font-size: 12px; }
.proof-table__row span:first-child { text-align: left; padding-left: 10px; }
.proof-table__row span:last-child { color: var(--red-deep); font-weight: 700; }
.proof-table__row--sum span { background: #FFF6F0; font-weight: 700; }
.proof-card__note { font-size: 11.5px; color: var(--ink-soft); line-height: 1.7; margin-top: 9px; }

.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: var(--radius-pill); 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); }

/* ============ 报考咨询页 ============ */
.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-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.consult-table-scroll::after { content: "← 左右滑动查看更多"; display: block; font-size: 11px; color: var(--ink-soft); padding: 6px 2px 0; text-align: right; }
.consult-data-tip { margin: -2px 2px 14px; font-size: 12px; line-height: 1.65; color: var(--ink-soft); }
.consult-data-tip span { font-weight: 700; color: var(--ink); }
.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: 10px 4px; font-size: 13px; 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: 12px; }
.consult-table__row--new > span { background: #FFF6F0; color: var(--red-deep); font-weight: 700; }
.consult-table__row > span i { font-style: normal; color: var(--red); font-size: 10px; vertical-align: super; }
.consult-quota { font-weight: 700; letter-spacing: -.2px; }
.consult-table--wide { min-width: 680px; }
.consult-table--wide .consult-table__row { display: grid; grid-template-columns: 58px 154px 80px 80px 80px 76px 76px 76px; }
.consult-table--wide .consult-table__row > span { flex: none; display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 5px; line-height: 1.35; white-space: nowrap; }
.consult-table--wide .consult-table__row > span:nth-child(2) { white-space: normal; font-size: 12px; }

/* 报考咨询:分专业录取数据 */
.consult-major { margin-bottom: 16px; }
.consult-major__name { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 8px; padding-left: 10px; border-left: 3px solid var(--red); }
.consult-major__tag { display: inline-block; font-size: 10px; font-weight: 600; color: var(--red-deep); background: var(--red-soft); border-radius: 8px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }
.consult-major__note { font-size: 11px; color: var(--ink-soft); margin-top: 6px; padding-left: 2px; }

.consult-cards { display: flex; flex-direction: column; gap: 10px; }
.consult-card { 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; font-family: inherit; }
.consult-card:active { transform: scale(.99); background: var(--red-soft); }
.consult-card__ic { font-size: 24px; flex: 0 0 auto; }
.consult-card__body { flex: 1; min-width: 0; }
.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-card__go { flex: 0 0 auto; color: var(--red); font-size: 20px; font-weight: 700; }

.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: var(--tap-transition); }
.consult-link--button { width: 100%; font-family: inherit; text-align: left; }
.consult-link:active { transform: scale(.99); background: var(--red-soft); }
.consult-link--xhs { border-color: var(--red-line); background: #FFFDFD; }
.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: var(--safe-bottom); animation: sheetUp var(--dur-slow) var(--ease-out); }
.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 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  min-height: 68px;
  background: linear-gradient(90deg, #F8C99D 0%, #FFD8B4 100%);
  border-radius: 8px;
  padding: 13px 14px;
  margin-bottom: 0;
  border: none;
  box-shadow: none;
}
.member-card__icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: 1px;
  border-radius: 6px 6px 8px 8px;
  background: #2A1A0C;
  color: #E9B35C;
  box-shadow: none;
}
.member-card__icon .ui-icon { width: 12px; height: 12px; stroke-width: 2; }
.member-card__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.member-card__badge {
  display: none;
}
.member-card__title {
  position: relative;
  z-index: 1;
  font-size: 15.5px;
  line-height: 1;
  font-weight: 900;
  color: #2F210F;
  letter-spacing: 0;
}
.member-card__desc {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: #8B6A4A;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.member-card__btn {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-width: 74px;
  background: #B46F20;
  color: #fff;
  border: none;
  font-size: 13px;
  font-weight: 900;
  padding: 9px 13px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: none;
}
.member-card__btn:active { transform: scale(.97); background: #9E6019; }
.member-card__actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
.member-card__btn--ghost { background: rgba(180,111,32,.10); color: #7A4D1F; border: 1px solid rgba(180,111,32,.20); box-shadow: none; }
.member-card--trial,
.member-card--guest,
.member-card--formal {
  background: linear-gradient(90deg, #F8C99D 0%, #FFD8B4 100%);
}
.member-card--guest .member-card__btn { background: #B46F20; color: #fff; }
@media (max-width: 420px) {
  .member-card { flex-direction: row; align-items: center; }
  .member-card__actions { width: auto; flex-direction: column; }
  .member-card__actions .member-card__btn { flex: 0 0 auto; }
}

/* ============ 激活弹层 ============ */
.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); }
.claim-input { margin-top: 10px; text-transform: none; letter-spacing: 0; text-align: left; }
.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-tip__cheer { display: block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--red-deep); }
.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;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 40px;
  background-color: var(--red-soft);
  border-color: var(--red-line);
  color: var(--red-deep);
  font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%23C01920' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.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-privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--cream);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.feedback-privacy input { flex: 0 0 auto; margin-top: 3px; accent-color: var(--red); }
.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: var(--radius-sm); 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),
.content:has(#view-study-chapter.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; }
.study-sticky .study-filters { 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;
}

/* ---------- 详情页滚轮式布局:答案滚动,操作区常驻底部 ---------- */
.app-shell--detail-immersive .topbar {
  height: 0;
  min-height: 0;
  flex-basis: 0;
  padding: 0 14px;
  opacity: 0;
  transform: translateY(-8px);
  border-bottom-color: transparent;
  pointer-events: none;
}
.app-shell--detail-immersive .tabbar {
  height: 0;
  flex-basis: 0;
  padding: 0;
  opacity: 0;
  transform: translateY(8px);
  border-top-color: transparent;
  pointer-events: none;
}
.content:has(#view-detail.view--active) {
  padding: 10px 12px 12px;
  overflow: hidden;
}
.app-shell--detail-immersive .content:has(#view-detail.view--active) {
  padding: 6px 8px 8px;
}
#view-detail.view--active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 10px;
}
.app-shell--detail-immersive #view-detail.view--active { gap: 6px; }
#view-detail .detail-head {
  flex: 0 0 auto;
  padding: 0 0 10px;
  background: var(--cream);
}
.app-shell--detail-immersive #view-detail .detail-head { padding-bottom: 6px; }
.detail-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 3px;
  -webkit-overflow-scrolling: touch;
}
.app-shell--detail-immersive .detail-scroll { padding-right: 0; }
.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: stretch;
  gap: 8px;
}
.detail-primary-row .detail-ai-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 0;
  border: 1.5px solid var(--red-line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--red-deep);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.detail-primary-row .detail-ai-btn:active { transform: scale(.99); background: var(--red-soft); }
.detail-primary-row .flash-this-btn {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  white-space: nowrap;
}
.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); }

/* ---------- 今日复习计划 ---------- */
.review-plan-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 16px;
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 0%, rgba(255,255,255,.32) 0, rgba(255,255,255,0) 42%),
    var(--red-gradient);
  color: #fff;
  box-shadow: 0 10px 24px rgba(192,25,32,.16);
}
.review-plan-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  font-size: 12px;
  font-weight: 800;
}
.review-plan-hero h2 {
  margin-top: 9px;
  font-size: 23px;
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -.6px;
}
.review-plan-hero p {
  margin-top: 6px;
  font-size: 12.5px;
  color: rgba(255,255,255,.82);
}
.review-plan-hero__btn {
  flex: 0 0 auto;
  min-width: 86px;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: var(--red-deep);
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.review-plan-hero__btn:disabled {
  opacity: .62;
  cursor: default;
}
.review-plan-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 12px;
  padding: 13px 8px 11px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(235,235,235,.36);
  box-shadow: 0 1px 5px rgba(40,28,20,.014);
}
.review-plan-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 54px;
}
.review-plan-stat + .review-plan-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: #F5F1ED;
}
.review-plan-stat strong {
  font-size: 20px;
  line-height: 1.1;
  font-weight: 950;
  color: #2A1E18;
}
.review-plan-stat small {
  display: inline-block;
  margin-left: 1px;
  font-size: 12px;
  line-height: 1;
}
.review-plan-stat span {
  font-size: 11px;
  color: #9A9A9A;
}
.review-plan-empty {
  margin-top: 12px;
  padding: 18px 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(235,235,235,.36);
  box-shadow: 0 1px 5px rgba(40,28,20,.014);
  text-align: center;
}
.review-plan-empty[hidden] { display: none; }
.review-plan-empty__icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 9px;
  border-radius: 50%;
  background: #EAF9EF;
  color: #2ED881;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 950;
}
.review-plan-empty h3 {
  font-size: 16px;
  font-weight: 900;
  color: #202020;
}
.review-plan-empty p {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.review-plan-empty__actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.review-plan-empty__actions button {
  flex: 1;
  height: 38px;
  border: none;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.review-plan-empty__actions button + button {
  background: var(--red-soft);
  color: var(--red-deep);
}
.review-plan-rules {
  margin-top: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(235,235,235,.34);
  box-shadow: 0 1px 5px rgba(40,28,20,.012);
}
.review-plan-rules__title {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 900;
  color: #242424;
  margin-bottom: 8px;
}
.review-plan-rules p {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #777;
}
.review-plan-rules b {
  display: inline-block;
  min-width: 46px;
  color: var(--red-deep);
  font-weight: 900;
}
.review-plan-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.review-plan-loading {
  padding: 20px 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
}
.review-group {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(235,235,235,.36);
  box-shadow: 0 1px 5px rgba(40,28,20,.014);
}
.review-group__head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 14px 12px;
}
.review-group__icon {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.review-group__icon .ui-icon { width: 17px; height: 17px; stroke-width: 2; }
.review-group--urgent .review-group__icon { background: var(--red); }
.review-group--solidify .review-group__icon { background: #FF9F1C; }
.review-group--maintain .review-group__icon { background: #2ED881; }
.review-group__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.review-group__text strong {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 900;
  color: #222;
}
.review-group__text em {
  font-style: normal;
  font-size: 12px;
  color: #8A8A8A;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-group__start {
  flex: 0 0 auto;
  min-width: 58px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red-deep);
  font-family: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}
.review-group__start:disabled {
  color: #AAA;
  background: #F5F3F0;
  cursor: default;
}
.review-group__list {
  border-top: 1px solid #F6F0EC;
}
.review-task {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: none;
  border-top: 1px solid #F8F4F1;
  background: #fff;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}
.review-task:first-child { border-top: none; }
.review-task__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.review-task__main strong {
  font-size: 13px;
  line-height: 1.45;
  color: #242424;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.review-task__main em {
  font-style: normal;
  font-size: 12px;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.review-task__meta {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--red-soft);
  font-size: 12px;
  font-weight: 800;
  color: var(--red);
}
.review-task__meta--mastered {
  background: rgba(34, 197, 94, .12);
  color: #229E58;
}
.review-task__meta--fuzzy {
  background: rgba(245, 158, 11, .14);
  color: #B7791F;
}
.review-task__meta--forgot {
  background: rgba(105, 105, 105, .12);
  color: #666;
}
.review-group__empty,
.review-group__more {
  border-top: 1px solid #F8F4F1;
  padding: 11px 14px 13px;
  font-size: 12px;
  color: #999;
}

/* ---------- 闪卡配置层:游客解锁提示 ---------- */
.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; }
