.btn svg { width: 19px; height: 19px; flex-shrink: 0; vertical-align: middle; }

/* ---------- landing & auth screens ---------- */
.landing,
.auth-screen {
  overflow: hidden;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
[data-theme="dark"] .landing,
[data-theme="dark"] .auth-screen {
  background-color: var(--bg);
  background-image: url('/bg-landing-dark.webp');
}
[data-theme="light"] .landing,
[data-theme="light"] .auth-screen {
  background-color: var(--bg);
  background-image: url('/bg-landing-light.webp');
}
.landing-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 22px calc(140px + var(--safe-b));
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  flex-direction: column;
}
.landing-body::-webkit-scrollbar { width: 0; height: 0; display: none; }
.landing-inner {
  margin: auto 0;
  width: 100%;
}
.hero { padding: 12px 0 16px; }
.hero h1 {
  font-size: 26px; line-height: 1.35; font-weight: 700; letter-spacing: 0.01em; margin: 0;
  color: var(--gold);
}
.hero h1 small {
  font-size: 15px;
  font-weight: 500;
  color: var(--gold-dim);
  margin-left: 4px;
  letter-spacing: 0;
}
@media (max-width: 380px) {
  .hero h1 { font-size: 22px; }
  .hero h1 small { font-size: 13px; }
}
.hero-subline {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  text-align: right;
  flex-wrap: nowrap;
  color: var(--text-3);
}
.hero-subline em {
  font-style: normal;
  color: var(--gold-dim);
  font-weight: 500;
}
.hero-subline .num {
  color: var(--gold-dim);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-left: 1px;
}
.hero-subline .unit {
  color: var(--gold-dim);
  font-size: 11.5px;
  font-weight: 400;
}
.hero-subline .lbl {
  font-size: 11px;
  color: var(--text-3);
  margin-left: 2px;
  font-weight: 400;
  opacity: 0.85;
}
.hero-subline .dot {
  color: var(--text-3);
  margin: 0 5px;
  opacity: 0.45;
}

.value-list { margin-top: 24px; }
.value-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 0; border-top: 1px solid var(--line);
}
.value-idx {
  flex: 0 0 22px; font-size: 13px; font-weight: 700;
  color: var(--gold); line-height: 1.4; padding-top: 1px;
  letter-spacing: 0.04em;
}
.value-body { flex: 1; min-width: 0; }
.value-title { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--text-1); }
.value-desc { margin: 6px 0 0; font-size: 13px; line-height: 1.8; color: var(--text-2); }

.price-card {
  margin-top: 28px; padding: 22px; border-radius: var(--radius);
  border: 1px solid rgba(217, 180, 91, 0.28);
  background: linear-gradient(155deg, rgba(217, 180, 91, 0.1), rgba(217, 180, 91, 0.015) 55%), var(--ink-1);
}
.price-main { display: flex; align-items: flex-end; gap: 6px; margin-top: 8px; }
.price-cur { font-size: 18px; color: var(--gold); transform: translateY(-6px); }
.price-num { font-size: 44px; font-weight: 700; line-height: 1; color: var(--gold); letter-spacing: -0.02em; }
.price-unit { font-size: 14px; color: var(--text-2); margin-left: 4px; }
.price-tag { display: inline-flex; margin-top: 10px; }
.price-block + .price-block { margin-top: 0; }
.price-desc {
  margin: 8px 0 0; font-size: 13px; line-height: 1.85; color: var(--text-2);
}
.price-sep { height: 1px; background: var(--line); margin: 18px 0; }

.wechat-card { margin-top: 14px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-1); }
.wechat-top { display: flex; gap: 14px; align-items: center; }
.qr {
  width: 108px; height: 108px; flex: 0 0 108px; border-radius: 10px;
  background: var(--qr-plate); padding: 6px; display: grid; place-items: center; border: 1px solid var(--line);
}
.qr img { width: 100%; height: 100%; object-fit: contain; display: block; }
.wechat-info { flex: 1; min-width: 0; }
.wechat-id {
  margin-top: 8px; display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
}
.steps { margin: 16px 0 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 10px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; padding: 5px 0; }
.steps b { color: var(--gold); font-weight: 600; flex: 0 0 auto; }

.faq { margin-top: 26px; }
.faq-item { border-top: 1px solid var(--line); padding: 14px 0; }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q { font-size: 14px; font-weight: 600; }
.faq-a { font-size: 12.5px; color: var(--text-2); line-height: 1.8; margin-top: 6px; }
.landing-foot { margin-top: 26px; padding-bottom: 12px; font-size: 11px; color: var(--text-3); line-height: 1.9; text-align: center; }

/* 核心装饰线条：横线 · 横线 (1:1 图三微光质感) */
.deco-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 0 24px;
  margin-bottom: 32px;
  opacity: 0.85;
}
.deco-line .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.08) 20%, rgba(217, 180, 91, 0.55));
}
.deco-line .line:last-child {
  background: linear-gradient(to left, transparent, rgba(255, 255, 255, 0.08) 20%, rgba(217, 180, 91, 0.55));
}
.deco-line .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(217, 180, 91, 0.6);
}
[data-theme="light"] .deco-line .line {
  background: linear-gradient(to right, transparent, rgba(24, 20, 12, 0.1) 20%, rgba(143, 100, 20, 0.55));
}
[data-theme="light"] .deco-line .line:last-child {
  background: linear-gradient(to left, transparent, rgba(24, 20, 12, 0.1) 20%, rgba(143, 100, 20, 0.55));
}
[data-theme="light"] .deco-line .dot {
  background: #8f6414;
  box-shadow: 0 0 6px rgba(143, 100, 20, 0.4);
}

/* 吸底操作栏 (按钮明显上移，底距 calc(48px + var(--safe-b))) */
.cta-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 22px calc(48px + var(--safe-b));
  background: linear-gradient(to top, var(--ink-0) 82%, rgba(10, 11, 16, 0));
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.cta-bar .btn-row {
  display: flex;
  gap: 10px;
  width: 100%;
}
.cta-bar .btn-row .btn-ghost {
  flex: 4;
}
.cta-bar .btn-row .btn-primary {
  flex: 6;
}
.cta-bar .btn {
  height: 50px;
  min-height: 50px;
  padding: 0 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex: none;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* ---------- auth ---------- */
.auth-screen {
  overflow: hidden;
}
.auth-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 22px calc(140px + var(--safe-b));
  display: flex;
  flex-direction: column;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.auth-body::-webkit-scrollbar { width: 0; height: 0; display: none; }
.auth-inner {
  margin: auto 0;
  width: 100%;
}
.auth-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--gold);
}
.auth-sub {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.6;
  margin-bottom: 24px;
}


/* ---------- home ---------- */
.greet { padding: 6px 0 18px; }
.greet-name { font-size: 24px; font-weight: 700; }
.greet-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.continue-card {
  margin-top: 14px;
  padding: 18px; border-radius: var(--radius);
  border: 1px solid rgba(217, 180, 91, 0.24);
  background: linear-gradient(150deg, rgba(217, 180, 91, 0.09), transparent 60%), var(--ink-1);
}
.continue-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.continue-title { font-size: 15px; font-weight: 600; line-height: 1.5; }
.continue-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.auth-switch-text {
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.4;
}
.auth-switch-text span {
  color: var(--gold);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 4px;
}
.auth-appbar {
  padding: 8px 16px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
}

.action-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.action {
  padding: 13px 4px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--ink-1); display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
.action:active { border-color: var(--gold-dim); background: var(--ink-2); }
.action svg { width: 22px; height: 22px; color: var(--gold); }
.action span { font-size: 11.5px; color: var(--text-2); font-weight: 500; }

.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--ink-1); }
.metric { padding: 14px 6px; text-align: center; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric-num { font-size: 18px; font-weight: 700; }
.metric-lbl { font-size: 10px; color: var(--text-3); margin-top: 3px; }

.pay-banner {
  margin-top: 14px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--cinnabar-soft); border: 1px solid rgba(239, 111, 108, 0.3);
  display: flex; align-items: center; gap: 10px;
}
.pay-banner-main { flex: 1; }
.pay-banner-title { font-size: 14px; font-weight: 600; color: var(--danger-text); }
.pay-banner-sub { font-size: 12px; color: var(--text-2); margin-top: 3px; }

/* ---------- papers ---------- */
.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0 6px;
}
.seg button {
  flex: 0 0 auto; height: 32px; padding: 0 14px; border-radius: 999px;
  font-size: 13px; color: var(--text-2); background: var(--ink-1); border: 1px solid var(--line);
  transition: all 160ms var(--ease);
}
.seg button.on { background: var(--gold-soft); color: var(--gold); border-color: rgba(217, 180, 91, 0.3); }

.paper-card {
  padding: 15px 16px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--ink-1); margin-top: 10px;
}
.paper-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.paper-name { font-size: 15px; font-weight: 600; line-height: 1.5; flex: 1; }
.paper-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.paper-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.paper-foot span { white-space: nowrap; }

/* ---------- practice ---------- */
.practice { background: var(--ink-0); }
.practice-head { padding: 0 16px; flex: 0 0 auto; }
.progress-line { display: flex; align-items: center; gap: 10px; padding: 6px 0 10px; }
.progress-count { font-size: 12px; color: var(--text-2); flex: 0 0 auto; }

/* 方案 A：标题栏单行居中与下边线进度条 */
.appbar-title-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1;
}
.appbar-title-wrap .appbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.appbar-prog-text {
  font-size: 12.5px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.appbar-prog-text .slash {
  opacity: 0.45;
  margin: 0 2px;
}
.appbar-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--line);
  overflow: hidden;
  z-index: 6;
}
.appbar-progress-bar {
  height: 100%;
  background: var(--gold);
  border-radius: 0 1px 1px 0;
  transition: width 220ms var(--ease);
}

.q-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 8px 16px 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.q-wrap.q-wrap-exam {
  padding-bottom: calc(150px + var(--safe-b));
}
.q-wrap::-webkit-scrollbar { width: 0; height: 0; display: none; }
.q-meta { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; min-height: 20px; }
.q-section-tag {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; line-height: 20px; height: 20px;
  display: inline-flex; align-items: center;
  max-width: calc(100% - 145px); flex: 0 1 auto; min-width: 0;
}
.q-stem { font-size: 17px; line-height: 1.9; letter-spacing: 0.01em; text-indent: 2em; }
.q-stem-sub { margin-top: 10px; font-size: 13px; color: var(--text-3); line-height: 1.7; }

.opts { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 14px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--ink-1);
  transition: border-color 140ms var(--ease), background 140ms var(--ease), transform 120ms var(--ease);
  text-align: left; width: 100%;
}
.opt:active { transform: scale(0.995); }
.opt-key {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--ink-3); color: var(--text-2); margin-top: 1px;
  transition: all 140ms var(--ease);
}
.opt-text { flex: 1; font-size: 15px; line-height: 1.72; color: var(--text-1); }
.opt.selected { border-color: var(--gold-dim); background: rgba(217, 180, 91, 0.06); }
.opt.selected .opt-key { background: var(--gold-fill); color: var(--gold-on-fill); }
.opt.correct { border-color: rgba(70, 201, 139, 0.5); background: var(--jade-soft); }
.opt.correct .opt-key { background: var(--jade); color: var(--jade-ink); }
.opt.wrong { border-color: rgba(239, 111, 108, 0.5); background: var(--cinnabar-soft); }
.opt.wrong .opt-key { background: var(--cinnabar); color: var(--cinnabar-ink); }
.opt.muted { opacity: 0.55; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(-3px); } 60% { transform: translateX(2px); } }
.opt.nudge { animation: nudge 180ms var(--ease); }

.answer-actions { margin-top: 16px; display: flex; gap: 10px; }

/* 常规做题底栏（练习模式/背题模式：紧凑贴底，留出最大垂直空间给试题与长解析） */
.bottom-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px calc(10px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--ink-0);
  position: relative;
  z-index: 10;
}
.bottom-bar .btn {
  height: 46px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
}
.bottom-bar .btn-ghost { flex: 0 0 auto; }
.bottom-bar .btn-primary { flex: 1; }

/* 模考专用吸底栏（方案 2A：无解析场景，整体上移 48px + 东方微光装饰线 + 渐变消隐蒙层） */
.bottom-bar.bar-exam {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 16px calc(48px + var(--safe-b));
  background: linear-gradient(to top, var(--ink-0) 80%, rgba(8, 9, 13, 0));
  display: flex;
  flex-direction: column;
  z-index: 20;
  pointer-events: none;
  border-top: none;
}
[data-theme="light"] .bottom-bar.bar-exam {
  background: linear-gradient(to top, var(--ink-0) 80%, rgba(250, 249, 246, 0));
}
.bottom-bar.bar-exam > * {
  pointer-events: auto;
}
.bottom-bar.bar-exam .deco-line {
  margin-bottom: 24px;
  padding: 0 12px;
}
.bottom-bar.bar-exam .btn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.bottom-bar.bar-exam .btn {
  height: 50px;
  min-height: 50px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
}
.bottom-bar.bar-exam #btnPrev { flex: 1; padding: 0 8px; font-size: 13.5px; }
.bottom-bar.bar-exam #btnMark { flex: 1; padding: 0 8px; font-size: 13.5px; }
.bottom-bar.bar-exam #btnCard { flex: 1; padding: 0 8px; font-size: 13.5px; }
.bottom-bar.bar-exam #btnNext { flex: 1.8; padding: 0 14px; font-size: 14.5px; }

/* answer card */
.card-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.card-cell {
  aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line);
  background: var(--ink-2); color: var(--text-2); font-size: 13px;
  display: grid; place-items: center; transition: all 140ms var(--ease);
}
.card-cell.cur { border-color: var(--gold); color: var(--gold); background: var(--gold-soft); }
.card-cell.ok { background: var(--jade-soft); border-color: rgba(70, 201, 139, 0.35); color: var(--jade); }
.card-cell.bad { background: var(--cinnabar-soft); border-color: rgba(239, 111, 108, 0.35); color: var(--cinnabar); }
.card-cell.done { background: var(--ink-3); color: var(--text-1); }
.card-legend { display: flex; gap: 16px; padding: 4px 0 14px; font-size: 11px; color: var(--text-3); }
.card-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; vertical-align: 1px; }

/* analysis */
.analysis {
  margin-top: 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--ink-1); overflow: hidden;
}
.analysis-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 15px; border-bottom: 1px solid var(--line); background: var(--ink-1);
}
.analysis-title { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0.04em; }
.analysis-answer { font-size: 13px; font-weight: 700; color: var(--jade); }
.analysis-body {
  padding: 15px; font-size: 14px; line-height: 1.95; color: var(--text-1);
  white-space: pre-wrap; word-break: break-word;
}
.analysis-flag {
  margin: 12px 15px 0; padding: 10px 12px; border-radius: 9px;
  background: var(--amber-soft); border: 1px solid var(--amber-line);
  font-size: 12.5px; line-height: 1.7; color: var(--amber-text);
}

/* ---------- exam ---------- */
.exam-timer { font-size: 15px; font-weight: 700; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }
.exam-timer.warn { color: var(--cinnabar); }
.exam-list-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: opacity 120ms ease;
}
.exam-list-item:active { opacity: 0.75; }
.exam-list-item:last-child { border-bottom: 0; }

.notice { padding: 12px 14px; border-radius: 10px; background: var(--ink-2); border: 1px solid var(--line); font-size: 12.5px; line-height: 1.8; color: var(--text-2); }

/* report */
.score-hero { text-align: center; padding: 18px 0 6px; }
.score-ring { position: relative; width: 150px; height: 150px; margin: 0 auto; }
.score-ring svg { transform: rotate(-90deg); }
.score-ring circle:first-child { stroke: var(--ink-3) !important; }
.score-ring circle:last-child { stroke: var(--gold) !important; }
.score-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-val { font-size: 38px; font-weight: 700; color: var(--gold); line-height: 1; letter-spacing: -0.02em; }
.score-lbl { font-size: 11px; color: var(--text-3); margin-top: 6px; letter-spacing: 0.08em; }
.stat-line { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.stat-line:last-child { border-bottom: 0; }
.secbar { margin-top: 12px; }
.secbar-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 6px; color: var(--text-2); }

/* ---------- wrongbook ---------- */
.wrong-card { padding: 15px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ink-1); margin-top: 10px; }
.wrong-stem { font-size: 14.5px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-indent: 2em; }
.wrong-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: var(--text-3); }

/* ---------- 错题中心上拉果冻弹簧加载组件 ---------- */
.pull-up-wrap {
  position: relative;
  width: 100%;
  margin-top: 14px;
  padding-bottom: 80px;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
}
.pull-up-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius);
  background: var(--ink-1);
  border: 1px solid var(--line);
  color: var(--text-2);
  cursor: pointer;
  box-sizing: border-box;
  will-change: transform;
}
.pull-up-box.elastic-bounce {
  transition: transform 0.42s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.2s ease, opacity 0.2s ease;
}
.pull-up-box.pulling {
  transition: none;
  border-color: rgba(230, 180, 80, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.pull-up-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}
.pull-up-arrow {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pull-up-arrow.rotate {
  transform: rotate(180deg);
}
.pull-up-spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
  border-color: rgba(230, 180, 80, 0.25);
  border-top-color: var(--gold);
}
.pull-up-end {
  text-align: center;
  padding: 12px;
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.5px;
}

/* ---------- me ---------- */
.profile-head { display: flex; align-items: center; gap: 14px; padding: 10px 0 20px; }
.avatar {
  width: 54px; height: 54px; border-radius: 16px; flex: 0 0 54px;
  overflow: hidden; background: var(--ink-2);
  border: 1px solid var(--line);
}
.avatar svg { border-radius: 16px; }
.avatar-sm { width: 46px; height: 46px; flex-basis: 46px; border-radius: 14px; }
.avatar-sm svg { border-radius: 14px; }
.greet-row { display: flex; align-items: center; gap: 12px; }
.setting-row {
  display: flex; align-items: center; gap: 12px; padding: 16px 0;
  border-bottom: 1px solid var(--line); width: 100%; text-align: left;
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .row-title { font-size: 14.5px; font-weight: 500; }

/* ---------- admin ---------- */
.admin-stat {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.admin-stat .card {
  margin: 0 !important;
  padding: 16px 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.admin-num { font-size: 26px; font-weight: 700; color: var(--gold); letter-spacing: -0.01em; line-height: 1.15; }
.admin-lbl { font-size: 11.5px; color: var(--text-3); margin-top: 6px; font-weight: 500; letter-spacing: 0.02em; }
.user-card {
  padding: 13px 15px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--ink-1);
  margin-top: 10px;
  transition: all 160ms var(--ease);
}
.user-card.is-vip {
  border-color: rgba(217, 180, 91, 0.28);
  background: linear-gradient(150deg, rgba(217, 180, 91, 0.05), transparent 60%), var(--ink-1);
}
.user-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.user-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.user-name {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-1);
  line-height: 1.35;
}
.user-name.vip-name {
  color: var(--gold);
  font-weight: 700;
}
.vip-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 15px;
  padding: 0 4.5px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  border-radius: 3px;
  background: linear-gradient(135deg, #fce08a, #d9b45b);
  color: #17130a;
  box-shadow: 0 1px 3px rgba(217, 180, 91, 0.25);
  line-height: 1;
  flex-shrink: 0;
}
.vip-tag.is-expired {
  background: var(--ink-3);
  color: var(--text-3);
  box-shadow: none;
  border: 1px solid var(--line);
}
.user-dates {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  flex-shrink: 0;
  text-align: right;
  margin-top: 1px;
}
.user-date-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 1.35;
}
.user-date-lbl {
  color: var(--text-3);
  font-size: 11px;
}
.user-date-val {
  color: var(--text-2);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  font-weight: 500;
}
.user-date-val.danger {
  color: var(--danger-text);
}
.user-actions { display: flex; gap: 6px; margin-top: 10px; }
.user-actions .btn { flex: 1; padding: 0 4px; font-size: 11.5px; height: 30px; line-height: 30px; white-space: nowrap; }
.pager-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding: 8px 4px 24px; }
.pager-info { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.code-line {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 14px; letter-spacing: 0.08em;
}

/* ---------- grade filter ---------- */
.seg button .seg-count {
  margin-left: 6px; font-size: 10px; color: var(--text-3);
}
.seg button.on .seg-count { color: var(--gold); }
.grade-summary {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0 2px;
}

/* ---------- trial note (landing, price-free) ---------- */
.trial-note {
  margin-top: 22px; padding: 14px 16px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--ink-1);
  font-size: 13px; line-height: 1.8; color: var(--text-2);
}

/* ---------- upgrade sheet: ¥28.8 年度会员专属开通卡片 ---------- */
.vip-plan-card {
  margin: 12px 0 14px;
  padding: 16px;
  border-radius: 14px;
  border: 1.5px solid rgba(217, 180, 91, 0.45);
  background: linear-gradient(135deg, rgba(217, 180, 91, 0.12) 0%, rgba(217, 180, 91, 0.04) 100%), var(--ink-2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}
.vip-plan-card::after {
  content: "年度通关";
  position: absolute;
  top: 0;
  right: 0;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 10px;
  background: var(--gold);
  color: #17130a;
  border-radius: 0 0 0 10px;
  letter-spacing: 0.04em;
}
.vip-plan-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.vip-plan-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 6px;
}
.vip-plan-sub {
  font-size: 11.5px;
  color: var(--gold-dim);
  margin-top: 3px;
}
.vip-plan-price-wrap {
  text-align: right;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.vip-plan-currency {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
}
.vip-plan-price {
  font-size: 30px;
  font-weight: 800;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.vip-plan-period {
  font-size: 12px;
  color: var(--text-3);
  margin-left: 2px;
}
.vip-plan-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}
.vip-feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
}
.vip-feature-item span:first-child {
  font-size: 13px;
  flex-shrink: 0;
}

[data-theme="light"] .vip-plan-card {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.08) 0%, rgba(217, 119, 6, 0.02) 100%), #ffffff;
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: 0 4px 16px rgba(24, 20, 12, 0.08);
}
[data-theme="light"] .vip-plan-title {
  color: #1c1917;
}
[data-theme="light"] .vip-plan-sub {
  color: #b45309;
}
[data-theme="light"] .vip-plan-currency,
[data-theme="light"] .vip-plan-price {
  color: #b45309;
}
[data-theme="light"] .vip-plan-card::after {
  background: #d97706;
  color: #ffffff;
}
[data-theme="light"] .vip-feature-item {
  color: #44403c;
}

/* ---------- 方案 B：上下分层尊享会员单卡 ---------- */
.vip-card-layered {
  background: linear-gradient(135deg, rgba(217, 180, 91, 0.08) 0%, rgba(15, 22, 41, 0.98) 100%), var(--ink-2);
  border: 1.5px solid rgba(217, 180, 91, 0.32);
  border-radius: 14px;
  padding: 12px 15px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: pointer;
  transition: transform 120ms ease, border-color 140ms ease;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
  box-sizing: border-box;
  margin-bottom: 10px;
}
.vip-card-layered:active {
  transform: scale(0.99);
  border-color: var(--gold);
}
.layered-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.layered-top-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.layered-top-left .title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-1);
}
.layered-top-right {
  font-size: 11.5px;
  color: var(--text-3);
  font-family: monospace;
}
.layered-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}
.layered-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.layered-bottom .info {
  color: var(--text-3);
}
.layered-bottom .info span {
  color: var(--text-2);
}
.layered-safe-tag {
  font-size: 11px;
  color: var(--gold-dim);
  display: flex;
  align-items: center;
  gap: 3px;
}
.layered-btn-link {
  color: var(--gold);
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(217, 180, 91, 0.1);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(217, 180, 91, 0.28);
}
.layered-btn-link:active {
  background: var(--gold);
  color: #120e06;
}

[data-theme="light"] .vip-card-layered {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.06) 0%, #ffffff 100%);
  border-color: rgba(217, 119, 6, 0.3);
  box-shadow: 0 2px 10px rgba(24, 20, 12, 0.05);
}
[data-theme="light"] .layered-top-left .title {
  color: #1c1917;
}
[data-theme="light"] .layered-top-right {
  color: #64748b;
}
[data-theme="light"] .layered-divider {
  background: rgba(0, 0, 0, 0.05);
}
[data-theme="light"] .layered-bottom .info {
  color: #64748b;
}
[data-theme="light"] .layered-bottom .info span {
  color: #1e293b;
}
[data-theme="light"] .layered-safe-tag {
  color: #b45309;
}
[data-theme="light"] .layered-btn-link {
  background: rgba(217, 119, 6, 0.08);
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.28);
}

/* ---------- 极简科技 Switch 开关组件 ---------- */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
  margin: 0;
}
.switch-slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--ink-3);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  transition: background-color 220ms ease, border-color 220ms ease;
  box-sizing: border-box;
}
.switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 2px;
  top: 1.5px;
  background-color: #94a3b8;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1), background-color 220ms ease;
}
.switch input:checked + .switch-slider {
  background-color: var(--gold);
  border-color: var(--gold);
}
.switch input:checked + .switch-slider::before {
  transform: translateX(19px);
  background-color: #120e06;
}
.switch input:focus-visible + .switch-slider {
  box-shadow: 0 0 0 2px var(--gold);
}

[data-theme="light"] .switch-slider {
  background-color: #e2e8f0;
  border-color: #cbd5e1;
}
[data-theme="light"] .switch-slider::before {
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .switch input:checked + .switch-slider {
  background-color: #d97706;
  border-color: #d97706;
}
[data-theme="light"] .switch input:checked + .switch-slider::before {
  background-color: #ffffff;
}

.tier-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0 12px;
}
.tier-card {
  padding: 10px 6px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--ink-2);
  text-align: center;
  cursor: pointer;
  transition: all 160ms var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  overflow: hidden;
}
.tier-card:active {
  transform: scale(0.97);
}
.tier-card.active {
  border-color: var(--gold);
  background: rgba(217, 180, 91, 0.12);
  box-shadow: 0 4px 14px rgba(217, 180, 91, 0.15);
}
.tier-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 0 0 0 8px;
  background: var(--gold);
  color: #17130a;
  font-weight: 700;
}
.tier-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.tier-card.active .tier-price {
  color: var(--gold);
}
.tier-item-name {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 600;
}
.tier-card.active .tier-item-name {
  color: var(--text-1);
}
.tier-tagline {
  font-size: 10.5px;
  color: var(--text-3);
}

.humor-banner {
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(217, 180, 91, 0.08);
  border: 1px dashed rgba(217, 180, 91, 0.35);
  margin-bottom: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.humor-icon {
  font-size: 22px;
  line-height: 1.1;
  flex-shrink: 0;
}
.humor-text {
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-1);
}
.humor-text b {
  color: var(--gold);
}

.wechat-box {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  align-items: center;
}
.charge-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 10px;
  margin-bottom: 2px;
  font-size: 11.5px;
  color: var(--text-2);
}
.charge-step {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  white-space: nowrap;
}
.charge-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.charge-step-arrow {
  color: var(--text-3);
  font-size: 11px;
}
.wechat-qr {
  width: 90px;
  height: 90px;
  border-radius: 10px;
  background: #fff;
  padding: 5px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.wechat-qr img {
  width: 100%;
  height: 100%;
  display: block;
}
.wechat-meta {
  flex: 1;
  min-width: 0;
}
.wechat-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}
.wechat-desc {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.5;
  margin-top: 6px;
}
.wechat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--ink-3);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  cursor: pointer;
  margin-top: 2px;
}
.wechat-pill .copy-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--gold-soft);
  color: var(--gold);
}

.sincere-notice {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-3);
}
.sincere-notice b {
  color: var(--text-2);
}

/* ---------- loading ---------- */
.loading-body { display: flex; flex-direction: column; }
.loading-block { padding: 44px 0 28px; text-align: center; }
.spinner {
  width: 30px; height: 30px; margin: 0 auto;
  border: 2.5px solid var(--ink-3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { margin-top: 14px; font-size: 14px; color: var(--text-2); }
.loading-hint { margin-top: 6px; font-size: 11.5px; color: var(--text-3); }
.q-skeleton { padding-top: 8px; }

/* ---------- theme selector ---------- */
.theme-seg {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 6px; padding: 0 0 14px;
}
.theme-seg button {
  height: 38px; border-radius: 9px; font-size: 13px;
  border: 1px solid var(--line); background: var(--ink-2); color: var(--text-2);
}
.theme-seg button.on {
  background: var(--gold-soft); color: var(--gold);
  border-color: var(--gold-dim);
}

/* Tab-level screens have no app bar; the status bar and tab bar are enough. */
.screen-body.no-bar {
  padding-top: calc(12px + var(--safe-t));
}
/* the tab bar floats over content; keep the last row fully visible */
.screen-body.with-tab { padding-bottom: calc(92px + var(--safe-b, 0px)); }
.seg-top {
  padding-top: 0;
  margin-top: 2px;
  margin-bottom: 14px;
}

/* ---------- report: 逐题回顾 ---------- */
.review-head { align-items: center; }
.review-seg {
  display: inline-flex; gap: 6px; overflow: visible; padding: 0;
}
.review-seg button {
  height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; border: 1px solid var(--line);
  background: var(--ink-2); color: var(--text-2);
}
.review-seg button.on {
  background: var(--gold-soft); color: var(--gold-text);
  border-color: var(--gold-dim);
}
.review-seg .nums { font-size: 11px; opacity: .85; margin-left: 1px; }

.answer-block {
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line);
}
.answer-inline {
  display: flex; align-items: baseline; gap: 10px;
}
.answer-label {
  flex: 0 0 auto; font-size: 11.5px; color: var(--text-3);
  letter-spacing: .04em;
}
.answer-value {
  flex: 1; min-width: 0;
  font-size: 13.5px; color: var(--jade);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.answer-list {
  margin: 6px 0 0; padding: 0; list-style: none;
}
.answer-list li {
  position: relative; padding-left: 12px; margin-top: 4px;
  font-size: 13.5px; line-height: 1.6; color: var(--jade);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.answer-list li::before {
  content: ''; position: absolute; left: 2px; top: .62em;
  width: 4px; height: 4px; border-radius: 50%;
  background: currentColor; opacity: .7;
}

/* ---------- 题库：多遍进度条与层层加深 ----------
   底槽为深色半透轨。
   底层 b.lap-base 表示已完成整遍的底色（整条铺满，颜色随已完成遍数层层加深）；
   上层 i.lap-cur 表示当前正在刷的这一遍进度（覆于底层之上，颜色为当前高阶色）。 */
.bar { position: relative; height: 4px; border-radius: 2px; }
.bar > b.lap-base {
  position: absolute; left: 0; top: 0; height: 100%; border-radius: 2px;
  opacity: 0.52; /* 底层整条铺满时淡雅通透，大幅降低高光面积，杜绝暗色模式下晃眼刺目 */
  transition: width 240ms var(--ease);
}
.bar > i.lap-cur {
  position: absolute; left: 0; top: 0; height: 100%; border-radius: 2px;
  opacity: 0.88; /* 上层进度条适度透气微柔光，温润护眼，与底层形成清晰层次 */
  transition: width 240ms var(--ease);
}

/* 遍数色阶体系：适度加入柔雅灰度与温润透光，温和不刺眼，层层自然加深。
   显式使用 .bar > i.* 与 .bar > b.* 选择器提升特异性，避免被 base.css 覆写 */
.bar > .lap-lvl-1, .bar > i.lap-lvl-1, .bar > b.lap-lvl-1 { background: #d8b368; } /* 第1遍：温润麦芒淡金 (微灰度，素雅柔和不刺眼) */
.bar > .lap-lvl-2, .bar > i.lap-lvl-2, .bar > b.lap-lvl-2 { background: #d98b36; } /* 第2遍：柔和暖琥珀金 (温雅深金，层次自然) */
.bar > .lap-lvl-3, .bar > i.lap-lvl-3, .bar > b.lap-lvl-3 { background: #ca622e; } /* 第3遍：雅致熔金赤橙 (内敛加深) */
.bar > .lap-lvl-4, .bar > i.lap-lvl-4, .bar > b.lap-lvl-4 { background: #be3d3d; } /* 第4遍：素雅朱砂赤金 (高阶沉稳) */
.bar > .lap-lvl-5, .bar > i.lap-lvl-5, .bar > b.lap-lvl-5 { background: #8a2c2c; } /* 第5遍：深沉赤褐 */
.bar > .lap-lvl-6, .bar > i.lap-lvl-6, .bar > b.lap-lvl-6 { background: #c4983b; } /* 第6遍+：哑光鎏金 */

/* ---------- 20261022 考点速记卡片 (题库顶部极简条目) ---------- */
.note-entry-card {
  margin-top: 0;
  margin-bottom: 12px;
  padding: 11px 14px;
  background: var(--ink-1);
  border: 1px solid rgba(217, 180, 91, 0.28);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: all 150ms var(--ease);
}
.note-entry-card:active {
  transform: scale(0.99);
  border-color: var(--gold);
}
.note-entry-main {
  flex: 1;
  min-width: 0;
}
.note-entry-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.35;
}
.note-entry-sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}
.note-entry-action {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.note-entry-arrow {
  font-size: 16px;
  color: var(--text-3);
  line-height: 1;
}

/* ---------- 20261021 考点速记流 (二级页沉浸版) ---------- */
.screen-body.notes-screen-body {
  padding: 12px 10px 48px;
}

/* 顶部粮友 @飞飞 荣誉致谢卡片 (精致典雅) */
.notes-credit-card {
  margin-bottom: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(217, 180, 91, 0.12) 0%, rgba(13, 19, 29, 0.95) 100%);
  border: 1px solid rgba(217, 180, 91, 0.32);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.32);
}
[data-theme="light"] .notes-credit-card {
  background: linear-gradient(135deg, rgba(217, 180, 91, 0.16) 0%, #fcfbf9 100%);
  border-color: rgba(217, 180, 91, 0.45);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.notes-credit-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.notes-credit-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(217, 180, 91, 0.14);
  border: 1px solid rgba(217, 180, 91, 0.3);
}
.notes-credit-info {
  flex: 1;
  min-width: 0;
}
.notes-credit-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.4;
}
.notes-credit-name {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.notes-credit-sub {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
  line-height: 1.35;
}
.notes-credit-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid rgba(217, 180, 91, 0.38);
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.notes-stream {
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.note-row {
  padding: 13px 15px;
  background: var(--ink-1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.28);
  transition: transform 140ms var(--ease), border-color 140ms var(--ease);
}
.note-row:active {
  transform: scale(0.995);
  border-color: rgba(217, 180, 91, 0.35);
}
.note-row.is-ambiguous {
  border-left: 3.5px solid var(--amber);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, var(--ink-1) 100%);
}
.note-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.note-row-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-1);
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}
.note-row-num {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.note-row-name {
  line-height: 1.38;
}
.note-tag {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-3);
  border: 1px solid var(--line);
  white-space: nowrap;
  flex-shrink: 0;
}
.note-row-body {
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--text-2);
}

/* 三色速背标记体系 (极致清晰易读) */
.mr {
  color: #f87171;
  background: rgba(239, 68, 68, 0.16);
  border-bottom: 2px solid #ef4444;
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
}
.mb {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-bottom: 1.5px dashed rgba(56, 189, 248, 0.55);
  padding: 1px 4px;
  border-radius: 3px;
}
[data-theme="light"] .mr {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
  border-bottom: 2px solid #dc2626;
}
[data-theme="light"] .mb {
  color: #0369a1;
  background: rgba(2, 132, 199, 0.1);
  border-bottom: 1.5px dashed rgba(2, 132, 199, 0.5);
}

/* 歧义警示便签 */
.note-ambiguous-box {
  padding: 9px 12px;
  border-radius: 7px;
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-left: 3px solid var(--amber);
  color: #fbbf24;
  font-size: 12px;
  line-height: 1.55;
  margin-top: 3px;
}

.note-row-foot {
  font-size: 11.5px;
  color: var(--text-3);
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  line-height: 1.5;
}

/* ================= 错题消灭卷专属视觉组件 ================= */
.wrong-paper-card {
  background: linear-gradient(145deg, #161410 0%, #0e1117 100%);
  border: 1px solid rgba(217, 180, 91, 0.4);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s var(--ease), border-color 0.18s;
}
.wrong-paper-card:active {
  transform: scale(0.985);
  border-color: var(--gold);
}
.tag-mini {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--ink-2);
  color: var(--text-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.tag-mini.gold {
  background: var(--gold-soft);
  color: var(--gold);
  border-color: rgba(217, 180, 91, 0.35);
  font-weight: 600;
}
.tag-mini.coral {
  background: rgba(224, 108, 117, 0.14);
  color: #e06c75;
  border-color: rgba(224, 108, 117, 0.35);
  font-weight: 600;
}
.tag-mini.cyan {
  background: rgba(6, 182, 212, 0.14);
  color: #06b6d4;
  border-color: rgba(6, 182, 212, 0.35);
  font-weight: 600;
}
.cyan-badge {
  border-color: rgba(6, 182, 212, 0.35) !important;
}
.cyan-badge.on {
  background: rgba(6, 182, 212, 0.16) !important;
  color: #06b6d4 !important;
  border-color: #06b6d4 !important;
}
.wrong-paper-card.bugfix-card {
  background: linear-gradient(145deg, #091a18 0%, #0e1620 100%);
  border-color: rgba(16, 185, 129, 0.4);
}
.wrong-paper-card.bugfix-card:active {
  border-color: #10b981;
}

/* ---------- 错题消灭卷 & BUG修复卷 亮色模式适配 (Light Theme) ---------- */
[data-theme="light"] .wrong-paper-card {
  background: linear-gradient(145deg, #fffcf5 0%, #ffffff 100%);
  border: 1px solid rgba(184, 134, 42, 0.35);
  box-shadow: 0 2px 10px rgba(184, 134, 42, 0.08), 0 1px 3px rgba(24, 20, 12, 0.04);
}
[data-theme="light"] .wrong-paper-card:active {
  border-color: var(--gold);
}
[data-theme="light"] .wrong-paper-card .paper-name {
  color: var(--text-1);
}

[data-theme="light"] .wrong-paper-card.bugfix-card {
  background: linear-gradient(145deg, #f2faf7 0%, #ffffff 100%);
  border-color: rgba(16, 185, 129, 0.38);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.08), 0 1px 3px rgba(24, 20, 12, 0.04);
}
[data-theme="light"] .wrong-paper-card.bugfix-card:active {
  border-color: #10b981;
}
[data-theme="light"] .wrong-paper-card.bugfix-card .paper-name {
  color: var(--text-1);
}

[data-theme="light"] .tag-mini {
  background: var(--ink-2);
  color: var(--text-2);
  border-color: var(--line);
}
[data-theme="light"] .tag-mini.gold {
  background: rgba(184, 134, 42, 0.10);
  color: #8f6414;
  border-color: rgba(184, 134, 42, 0.32);
}
[data-theme="light"] .tag-mini.coral {
  background: rgba(224, 108, 117, 0.12);
  color: #b8323c;
  border-color: rgba(184, 50, 60, 0.30);
}
[data-theme="light"] .tag-mini.cyan {
  background: rgba(6, 182, 212, 0.12);
  color: #0e7490;
  border-color: rgba(6, 182, 212, 0.35);
}
[data-theme="light"] .cyan-badge.on {
  background: rgba(6, 182, 212, 0.12) !important;
  color: #0e7490 !important;
  border-color: #0e7490 !important;
}


/* 鸣谢粮友致谢横条 (极简优雅，零胶囊，无官方校订) */
.correction-note {
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(217, 180, 91, 0.08);
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  line-height: 1.5;
}
.correction-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.correction-contributor {
  font-weight: 600;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 4px;
}
.correction-date {
  color: var(--text-3);
  font-size: 11px;
}
.correction-summary {
  color: var(--text-2);
  margin-bottom: 2px;
}
.correction-source {
  color: var(--text-3);
  font-size: 11px;
}

/* 答题卡彻底隐藏滚动条 Zero Scrollbars */
.sheet-body, .card-grid {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.sheet-body::-webkit-scrollbar, .card-grid::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.card-cell.mastered {
  background: linear-gradient(135deg, rgba(97, 175, 155, 0.25) 0%, rgba(217, 180, 91, 0.28) 100%);
  border-color: var(--gold);
  color: #f7df94;
  font-weight: 700;
  position: relative;
}
.card-cell.mastered::after {
  content: "⭐";
  font-size: 8px;
  position: absolute;
  top: 1px;
  right: 2px;
}

/* 达成消错横幅 */
.toast-mastered-banner {
  margin: 14px 0 16px;
  padding: 10px 14px;
  background: linear-gradient(90deg, rgba(217, 180, 91, 0.16) 0%, rgba(97, 175, 155, 0.14) 100%);
  border: 1px solid rgba(217, 180, 91, 0.45);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast-mastered-icon { font-size: 18px; }
.toast-mastered-title { font-size: 13px; font-weight: 700; color: #f7df94; }
.toast-mastered-sub { font-size: 11px; color: var(--text-2); margin-top: 1px; }

/* 极简消错战报 */
.simple-dual-card {
  width: 100%;
  background: var(--ink-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 16px 0;
  overflow: hidden;
}
.dual-col {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.dual-col:first-child {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(217, 180, 91, 0.08) 0%, transparent 100%);
}
.dual-num {
  font-size: 32px;
  font-weight: 800;
  font-family: ui-monospace, monospace;
  line-height: 1.1;
  margin-bottom: 4px;
}
.dual-num.gold { color: #f7df94; }
.dual-num.dim { color: var(--text-2); }
.dual-label { font-size: 12px; color: var(--text-3); }

.simple-status-strip {
  width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 20px;
  box-sizing: border-box;
}
.strip-diff {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  color: var(--jade);
}

/* ---------- 题目题头纠错胶囊 (1:1 精确对齐 .pill.sm 规格与尺寸) ---------- */
.btn-feedback {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.32);
  cursor: pointer;
  transition: all 150ms var(--ease);
  line-height: 18px;
  white-space: nowrap;
  flex-shrink: 0;
  box-sizing: border-box;
}
.btn-feedback .fb-icon {
  font-size: 9.5px;
  line-height: 1;
  display: inline-block;
  transform: translateY(-0.5px);
}
.btn-feedback:active {
  transform: scale(0.95);
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
}

/* ---------- 纠错抽屉 (Zero-Blur 深空高质感) ---------- */
.feedback-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}
.feedback-sheet-overlay.show {
  opacity: 1;
  pointer-events: auto;
}
.feedback-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 560px;
  margin: 0 auto;
  background: var(--ink-1);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px 20px 0 0;
  padding: 16px 18px calc(24px + var(--safe-b, 0px));
  transform: translateY(100%);
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1001;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.75);
  box-sizing: border-box;
}
.feedback-sheet.show {
  transform: translateY(0);
}
.fb-handle {
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 auto 12px;
}
.fb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.fb-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-1);
}
.fb-close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.fb-close:active {
  background: var(--ink-2);
}
.fb-q-preview {
  padding: 9px 12px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 14px;
}
.fb-q-preview b {
  color: var(--gold);
  font-weight: 600;
}
.fb-section-title {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 8px;
}
.fb-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.fb-chip {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  cursor: pointer;
  transition: all 140ms ease;
}
.fb-chip.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fbbf24;
  font-weight: 600;
}
.fb-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 80px;
  padding: 10px 12px;
  background: var(--ink-0);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font-size: 13px;
  line-height: 1.5;
  resize: none;
  outline: none;
  font-family: inherit;
  margin-bottom: 6px;
  transition: border-color 160ms ease;
}
.fb-textarea:focus {
  border-color: rgba(245, 158, 11, 0.6);
}
.fb-char-count {
  text-align: right;
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 14px;
}
.fb-actions {
  display: flex;
  gap: 10px;
}
.fb-btn-cancel {
  flex: 1;
  padding: 10px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}
.fb-btn-submit {
  flex: 2;
  padding: 10px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #1a150b;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: opacity 160ms;
}
.fb-btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- 纠错胶囊 & 纠错抽屉 亮色模式适配 (Light Theme) ---------- */
[data-theme="light"] .btn-feedback {
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(217, 119, 6, 0.35);
}
[data-theme="light"] .btn-feedback:active {
  background: rgba(245, 158, 11, 0.22);
  border-color: #d97706;
}

[data-theme="light"] .feedback-sheet-overlay {
  background: rgba(24, 20, 12, 0.45);
}
[data-theme="light"] .feedback-sheet {
  background: #ffffff;
  border-top: 1px solid rgba(24, 20, 12, 0.12);
  box-shadow: 0 -10px 40px rgba(24, 20, 12, 0.18);
}
[data-theme="light"] .fb-handle {
  background: rgba(0, 0, 0, 0.16);
}
[data-theme="light"] .fb-title {
  color: var(--text-1);
}
[data-theme="light"] .fb-close {
  color: var(--text-3);
}
[data-theme="light"] .fb-close:active {
  background: var(--ink-2);
}
[data-theme="light"] .fb-q-preview {
  background: #f8f7f4;
  border-color: var(--line);
  color: var(--text-2);
}
[data-theme="light"] .fb-chip {
  background: #f2f0eb;
  border-color: var(--line);
  color: var(--text-2);
}
[data-theme="light"] .fb-chip.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: #d97706;
  color: #92400e;
}
[data-theme="light"] .fb-textarea {
  background: #f8f7f4;
  border-color: var(--line);
  color: var(--text-1);
}
[data-theme="light"] .fb-textarea:focus {
  border-color: rgba(217, 119, 6, 0.6);
}
[data-theme="light"] .fb-btn-cancel {
  background: #f2f0eb;
  border-color: var(--line);
  color: var(--text-2);
}
[data-theme="light"] .fb-btn-submit {
  background: var(--gold-fill);
  color: var(--gold-on-fill);
  border-color: var(--gold-fill);
}

/* ==================== V2 UI 新架构组件体系 ==================== */

/* 1. 问候区单行并排胶囊栏 */
.greet-meta {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 5px !important;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.greet-meta::-webkit-scrollbar { display: none; }
.greet-meta .pill {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  font-size: 11px !important;
  padding: 3px 8px !important;
  letter-spacing: -0.2px;
}

/* 工种等级切换胶囊按钮 */
.target-capsule-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--ink-2);
  border: 1px solid rgba(217, 180, 91, 0.45);
  color: var(--gold);
  border-radius: 20px;
  padding: 2.5px 8px 2.5px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  font-family: var(--font-main);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  letter-spacing: -0.2px;
}
.target-capsule-btn.inspector-mode {
  border-color: rgba(6, 182, 212, 0.5);
  color: var(--cyan);
}
.target-capsule-btn:hover, .target-capsule-btn:active {
  background: var(--gold-soft);
  border-color: var(--gold);
}
.target-capsule-btn.inspector-mode:hover, .target-capsule-btn.inspector-mode:active {
  background: var(--cyan-soft);
  border-color: var(--cyan);
}
.gear-icon {
  flex-shrink: 0;
  opacity: 0.85;
  transition: transform 0.25s var(--ease);
  margin-left: 1px;
}
.target-capsule-btn:hover .gear-icon {
  transform: rotate(60deg);
  opacity: 1;
}

/* 2. 首页大纲备战全景紧凑看板 (Bento Deck) */
.bento-deck {
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-top: 14px;
  position: relative;
}
.bento-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.bento-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 6px;
}
.bento-action {
  font-size: 12px;
  color: var(--gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 2px;
  transition: opacity 0.2s;
}
.bento-action:hover { opacity: 0.8; }
.bento-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.bento-total-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
}
.bento-total-bar {
  height: 5px;
  background: var(--progress-track, rgba(255, 255, 255, 0.08));
  border-radius: 2.5px;
  overflow: hidden;
  margin-bottom: 12px;
}
.bento-total-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, #10b981 100%);
  border-radius: 2.5px;
  transition: width 0.3s ease;
}

/* 5 大章节紧凑微谱 (Sparklines Grid) */
.spark-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.spark-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 4px;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
}
.spark-row:hover { background: var(--ink-2); }
.spark-name {
  font-size: 11.5px;
  color: var(--text-2);
  width: 98px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
.spark-bar-wrap {
  flex: 1;
  min-width: 40px;
  height: 5px;
  background: var(--progress-track, rgba(255, 255, 255, 0.08));
  border-radius: 2.5px;
  overflow: hidden;
}
.spark-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 2.5px;
  transition: width 0.3s ease;
}
.spark-stat {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.bento-foot-link {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.2s;
}
.bento-foot-link:hover { color: var(--gold); }

/* 3. 刷题打卡热力图 (Heatmap) */
.heat-matrix-wrap {
  display: grid;
  grid-template-rows: repeat(7, 1fr);
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 8px 0;
  width: 100%;
}
.heat-cell {
  aspect-ratio: 1;
  border-radius: 2.5px;
  background: #111726;
  transition: transform 0.15s, box-shadow 0.15s;
}
.heat-cell:hover {
  transform: scale(1.35);
  z-index: 10;
}
.heat-cell.lvl-0 { background: #111726; }
.heat-cell.lvl-1 { background: #1c355e; }
.heat-cell.lvl-2 { background: #2563eb; }
.heat-cell.lvl-3 { background: #06b6d4; }
.heat-cell.lvl-4 { background: #38bdf8; }

.heat-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.heat-dot.lvl-0 { background: #111726; }
.heat-dot.lvl-1 { background: #1c355e; }
.heat-dot.lvl-2 { background: #2563eb; }
.heat-dot.lvl-3 { background: #06b6d4; }
.heat-dot.lvl-4 { background: #38bdf8; }

/* 4. 章节手风琴知识树卡片 (Chapter Accordion) */
.chapter-tree-card {
  background: var(--ink-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 10px;
  overflow: hidden;
  transition: all 0.2s var(--ease);
}
.chapter-tree-card.open {
  border-color: rgba(217, 180, 91, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.chapter-tree-header {
  padding: 13px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
  background: var(--ink-1);
  transition: background 0.15s;
}
.chapter-tree-header:hover { background: var(--ink-2); }
.chapter-tree-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.35;
}
.chapter-tree-meta {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chapter-tree-arrow {
  transition: transform 0.25s var(--ease);
  color: var(--text-3);
  flex-shrink: 0;
}
.chapter-tree-card.open .chapter-tree-arrow {
  transform: rotate(180deg);
  color: var(--gold);
}

/* 二级小节子列表 */
.section-sublist {
  display: none;
  background: #090e1a;
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.chapter-tree-card.open .section-sublist { display: block; }
.section-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  transition: background 0.15s;
  cursor: pointer;
}
.section-item:last-child { border-bottom: none; }
.section-item:hover { background: rgba(255, 255, 255, 0.03); }
.section-item:active { background: rgba(255, 255, 255, 0.06); }
.section-enter-arrow {
  color: var(--text-3);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding-left: 6px;
  transition: color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.section-item:hover .section-enter-arrow {
  color: var(--gold);
  transform: translateX(2px);
}
.section-name {
  font-size: 12.5px;
  color: var(--text-1);
  font-weight: 600;
}
.section-subinfo {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-xs {
  padding: 4px 9px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-xs.btn-primary {
  background: var(--gold);
  color: #0b0f19;
}
.btn-xs.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  border-color: rgba(255, 255, 255, 0.1);
}
.btn-xs:hover {
  opacity: 0.9;
  transform: translateY(-0.5px);
}

/* 5. 工种与等级切换抽屉 */
.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto 12px;
}
.prof-select-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 16px;
}
.prof-select-card {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
}
.prof-select-card:hover { border-color: rgba(217, 180, 91, 0.4); }
.prof-select-card.active {
  border-color: var(--gold);
  background: rgba(217, 180, 91, 0.08);
  box-shadow: 0 0 12px rgba(217, 180, 91, 0.15);
}
.prof-select-card.inspector-active {
  border-color: var(--cyan);
  background: rgba(6, 182, 212, 0.08);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}

.grade-select-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px 6px;
  margin-top: 10px;
}
.grade-select-item {
  grid-column: span 2;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  transition: all 0.15s;
  white-space: nowrap;
}
.grade-select-item:hover {
  border-color: var(--line-active);
  color: var(--text-1);
}
.grade-select-item.active {
  border-color: var(--gold);
  background: rgba(217, 180, 91, 0.1);
  color: var(--gold);
}
.grade-select-item:nth-child(4),
.grade-select-item:nth-child(5) {
  grid-column: span 3;
  padding: 9px 12px;
}

/* 亮色模式适配 (Light Theme) */
[data-theme="light"] .target-capsule-btn {
  background: #f4efe6;
  border-color: #d97706;
  color: #92400e;
}
[data-theme="light"] .target-capsule-btn.inspector-mode {
  border-color: #0891b2;
  color: #0e7490;
}
[data-theme="light"] .heat-cell { background: #e9ecef; }
[data-theme="light"] .heat-cell.lvl-0 { background: #e9ecef; }
[data-theme="light"] .heat-cell.lvl-1 { background: #bae6fd; }
[data-theme="light"] .heat-cell.lvl-2 { background: #60a5fa; }
[data-theme="light"] .heat-cell.lvl-3 { background: #2563eb; }
[data-theme="light"] .heat-cell.lvl-4 { background: #1d4ed8; }

[data-theme="light"] .heat-dot { background: #e9ecef; }
[data-theme="light"] .heat-dot.lvl-0 { background: #e9ecef; }
[data-theme="light"] .heat-dot.lvl-1 { background: #bae6fd; }
[data-theme="light"] .heat-dot.lvl-2 { background: #60a5fa; }
[data-theme="light"] .heat-dot.lvl-3 { background: #2563eb; }
[data-theme="light"] .heat-dot.lvl-4 { background: #1d4ed8; }

[data-theme="light"] .section-sublist { background: #fdfbf7; }
[data-theme="light"] .section-item { border-bottom-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .btn-xs.btn-ghost {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-2);
  border-color: rgba(0, 0, 0, 0.1);
}
[data-theme="light"] .bento-total-bar,
[data-theme="light"] .spark-bar-wrap {
  background: #e2e8f0;
}
[data-theme="light"] .appbar-progress-track {
  background: #e2e8f0;
  height: 2px;
}

/* ---------- 错题中心: 方案 B 悬浮攻坚胶囊与极简头部 ---------- */
.stream-header {
  padding: 4px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* ---------- Android 风格右下角浮动操作按钮 (FAB) ---------- */
.floating-wrong-fab {
  position: absolute;
  bottom: calc(78px + var(--safe-b));
  right: 30px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #121724;
  border: 1.5px solid rgba(217, 180, 91, 0.55);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.7), 0 0 18px rgba(217, 180, 91, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  cursor: pointer;
  transition: transform 220ms var(--ease), opacity 220ms var(--ease), box-shadow 180ms var(--ease);
}
.floating-wrong-fab:active {
  transform: scale(0.92);
}
.floating-wrong-fab.fab-hidden {
  transform: translateY(28px) scale(0.75);
  opacity: 0;
  pointer-events: none;
}
.floating-wrong-fab .fab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  user-select: none;
  transform: translateY(-0.5px);
}
.floating-wrong-fab .fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--cinnabar);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  border: 2px solid #121724;
  line-height: 1;
}
[data-theme="light"] .floating-wrong-fab {
  background: #ffffff;
  border-color: rgba(217, 180, 91, 0.7);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 14px rgba(217, 180, 91, 0.2);
}
[data-theme="light"] .floating-wrong-fab .fab-badge {
  border-color: #ffffff;
}

/* 兼容旧胶囊别名 */
.floating-wrong-capsule {
  position: absolute;
  bottom: calc(76px + var(--safe-b));
  left: 50%;
  transform: translateX(-50%);
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: #10141e;
  border: 1px solid rgba(217, 180, 91, 0.45);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7), 0 0 16px rgba(217, 180, 91, 0.2);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  z-index: 30;
  white-space: nowrap;
  cursor: pointer;
  transition: all 180ms var(--ease);
}
.floating-wrong-capsule:active {
  transform: translateX(-50%) scale(0.96);
}
.floating-wrong-capsule .capsule-num {
  background: var(--cinnabar);
  color: #fff;
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 700;
}
[data-theme="light"] .floating-wrong-capsule {
  background: #ffffff;
  border-color: rgba(217, 180, 91, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 12px rgba(217, 180, 91, 0.15);
}

/* ---------- 微信引导跳出遮罩与微导轨 ---------- */
.wechat-guide-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 10, 19, 0.95);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  padding: calc(14px + var(--safe-t)) 24px calc(24px + var(--safe-b));
  backdrop-filter: blur(10px);
  animation: fadeIn 200ms var(--ease);
}
.wechat-arrow-wrap {
  display: flex;
  justify-content: flex-end;
  padding-right: 10px;
}
.wechat-arrow-svg {
  width: 86px;
  height: 86px;
  animation: arrowBounce 1.4s infinite ease-in-out;
}
@keyframes arrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
.wechat-guide-card {
  margin-top: 14px;
  background: var(--ink-1);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 22px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  text-align: center;
}
.wechat-guide-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.wechat-guide-desc {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.7;
  text-align: left;
  margin-bottom: 16px;
  background: var(--ink-2);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.wechat-guide-steps {
  font-size: 13px;
  color: var(--gold);
  line-height: 1.8;
  margin-bottom: 18px;
  text-align: left;
  padding-left: 4px;
}
/* 微信环境视口适配：防止顶部横幅将底部 tab 栏挤出屏幕之外 */
body.has-wechat-bar {
  display: flex !important;
  flex-direction: column !important;
  height: 100dvh !important;
  overflow: hidden !important;
}
body.has-wechat-bar #app {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: auto !important;
  width: 100% !important;
}

.wechat-top-banner {
  flex-shrink: 0;
  max-width: 430px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
  background: var(--ink-1);
  border-bottom: 1px solid rgba(217, 180, 91, 0.3);
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--gold-text);
  z-index: 99;
}
.wechat-top-banner-main {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.wechat-top-banner-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.wechat-top-banner button#btnWechatOpenGuide {
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(217, 180, 91, 0.45);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.wechat-top-banner .btn-close-bar {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: 11px;
  opacity: 0.7;
  cursor: pointer;
  border-radius: 50%;
  padding: 0;
  border: none;
  background: none;
}
.wechat-top-banner .btn-close-bar:active {
  opacity: 1;
  background: var(--ink-2);
}
[data-theme="light"] .wechat-guide-overlay {
  background: rgba(245, 243, 238, 0.96);
}
[data-theme="light"] .wechat-guide-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .wechat-guide-desc {
  background: #f7f5ef;
  border-color: rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .wechat-top-banner {
  background: #fdfbf7;
  border-bottom-color: rgba(217, 180, 91, 0.4);
}

/* ---------- 模考历史记录空状态鼓励卡片 ---------- */
.exam-empty-encouragement {
  text-align: center;
  padding: 24px 16px 20px;
  background: var(--ink-1);
  border: 1px dashed var(--line);
  border-radius: 14px;
  margin-top: 4px;
  margin-bottom: 16px;
}
.exam-empty-encouragement .empty-icon {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 8px;
}
.exam-empty-encouragement .empty-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: 0.03em;
}
.exam-empty-encouragement .empty-desc {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 5px;
  line-height: 1.5;
}
[data-theme="light"] .exam-empty-encouragement {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* ---------- 法律条款与隐私协议排版规范 (正文首行缩进 2em) ---------- */
.legal-content {
  padding: 4px 0 24px;
}
.legal-heading {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  margin: 18px 0 8px;
  line-height: 1.5;
}
.legal-heading:first-child {
  margin-top: 2px;
}
.legal-p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-2);
  text-indent: 2em;
  margin-bottom: 8px;
  text-align: justify;
}
[data-theme="light"] .legal-heading {
  color: #1c1917;
}
[data-theme="light"] .legal-p {
  color: #44403c;
}

/* ---------- 意见与建议反馈抽屉 (Suggestion Sheet) ---------- */
.suggestion-sheet {
  max-height: 82dvh;
  background: var(--ink-1);
}
.sugg-sheet-body {
  padding-bottom: calc(20px + var(--safe-b, 0px));
}
.sugg-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sugg-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.sugg-chip {
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-card);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.08s ease, background-color 0.08s ease, color 0.08s ease;
}
.sugg-chip:hover {
  background: var(--surface-hover);
}
.sugg-chip.active {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
}
.sugg-textarea-wrap {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px 28px;
  transition: border-color 0.12s ease;
}
.sugg-textarea-wrap:focus-within {
  border-color: var(--gold);
}
.sugg-textarea {
  width: 100%;
  height: 105px;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text-1);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.55;
}
.sugg-textarea::placeholder {
  color: var(--text-3);
  font-size: 12.5px;
}
.sugg-char-count {
  position: absolute;
  right: 12px;
  bottom: 8px;
  font-size: 11px;
  color: var(--text-3);
  font-family: var(--font-mono);
}





