@charset "utf-8";
/* ============================================================
   微信服务号 H5 模拟考试系统 —— 全局样式
   设计原则：移动端优先、纯 flex 布局、零依赖零外链字体、触控目标 >= 44px
   兼容目标：Android 微信 X5 内核 / iOS WKWebView（含 iOS 安全区）
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --brand: #1a73e8;
  --brand-dark: #1557b0;
  --brand-soft: #e8f0fe;
  --brand-line: #d2e3fc;

  --green: #07c160;
  --green-soft: #e8f8ee;
  --red: #e54545;
  --red-soft: #fdecec;
  --orange: #f5a623;
  --orange-soft: #fff6e6;

  --text: #1f2329;
  --text-2: #4e5969;
  --text-3: #86909c;
  --line: #ebedf0;
  --line-2: #e3e6eb;
  --bg: #f4f6f9;
  --card: #ffffff;

  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 8px;

  --shadow: 0 2px 10px rgba(20, 40, 80, 0.05);
  --shadow-up: 0 -2px 12px rgba(20, 40, 80, 0.07);

  --tap: 44px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  --navbar-h: 48px;
  --tabbar-h: 54px;
}

/* ---------- 2. 基础重置 ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

button,
input,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: 0;
  background: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

button {
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ---------- 3. 通用布局 ---------- */
.app {
  min-height: 100vh;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.page {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  min-height: 100vh;
}

.page__body {
  -webkit-flex: 1;
  flex: 1;
  padding: 12px 12px 16px;
}

/* 底部有 tabbar 时给正文留出空间 */
.page--tabbed .page__body {
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 16px);
}

/* 底部有固定操作条时留出空间 */
.page--action .page__body {
  padding-bottom: calc(72px + var(--safe-bottom) + 16px);
}

/* ---------- 4. 顶部导航 ---------- */
.navbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  min-height: calc(var(--navbar-h) + var(--safe-top));
  padding: var(--safe-top) 8px 0;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.navbar--brand {
  background: var(--brand);
  border-bottom-color: var(--brand-dark);
  color: #fff;
}

.navbar__side {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  min-width: 56px;
  min-height: var(--navbar-h);
}

.navbar__side--right {
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
}

.navbar__title {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.navbar__sub {
  display: block;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.75;
}

.navbar__btn {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  min-width: var(--tap);
  min-height: var(--tap);
  padding: 0 8px;
  font-size: 15px;
  color: var(--text-2);
  border-radius: var(--radius-sm);
}

.navbar--brand .navbar__btn {
  color: #fff;
}

.navbar__btn:active {
  opacity: 0.6;
}

/* ---------- 5. 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}

.card--flat {
  box-shadow: none;
  border: 1px solid var(--line);
}

.card__title {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card__hint {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 400;
}

/* 单独占一行的说明（例如"按《xxx》的章划分"） */
.card__hint--block {
  display: block;
  margin: -4px 0 8px;
  line-height: 1.5;
}

.section-title {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  margin: 4px 2px 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.section-title::before {
  content: "";
  width: 3px;
  height: 15px;
  margin-right: 8px;
  border-radius: 2px;
  background: var(--brand);
}

/* 英雄区（首页顶部） */
.hero {
  padding: 20px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  background: -webkit-linear-gradient(135deg, #1a73e8 0%, #3f8bf0 60%, #4a9bf5 100%);
  background: linear-gradient(135deg, #1a73e8 0%, #3f8bf0 60%, #4a9bf5 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(26, 115, 232, 0.22);
}

.hero__title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
}

.hero__desc {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.9;
}

.hero__tags {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-top: 14px;
}

.hero__tag {
  margin: 0 8px 8px 0;
  padding: 3px 10px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

/* ---------- 6. 按钮 ---------- */
.btn {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  background: var(--brand-soft);
  color: var(--brand);
  -webkit-transition: opacity 0.15s;
  transition: opacity 0.15s;
}

.btn:active {
  opacity: 0.75;
}

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

.btn--ghost {
  background: #fff;
  color: var(--text-2);
  border: 1px solid var(--line-2);
}

.btn--danger {
  background: var(--red-soft);
  color: var(--red);
}

.btn--green {
  background: var(--green);
  color: #fff;
}

.btn--block {
  display: -webkit-flex;
  display: flex;
  width: 100%;
}

.btn--lg {
  min-height: 50px;
  font-size: 17px;
}

.btn--sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-row {
  display: -webkit-flex;
  display: flex;
  margin-bottom: 12px;
}

.btn-row .btn {
  -webkit-flex: 1;
  flex: 1;
}

.btn-row .btn + .btn {
  margin-left: 12px;
}

/* 底部固定操作条 */
.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: var(--card);
  box-shadow: var(--shadow-up);
}

.actionbar .btn {
  -webkit-flex: 1;
  flex: 1;
}

.actionbar .btn + .btn {
  margin-left: 12px;
}

.actionbar__info {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  padding-right: 12px;
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.3;
}

/* ---------- 7. 首页入口九宫格（flex 换行，避免 grid） ---------- */
.entries {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: -6px;
}

.entry {
  width: 50%;
  padding: 6px;
}

.entry__inner {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 12px;
  text-align: left;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.entry__inner:active {
  background: #fafbfc;
}

.entry__icon {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-right: 10px;
  border-radius: 10px;
  font-size: 19px;
  background: var(--brand-soft);
  color: var(--brand);
}

.entry__icon--green { background: var(--green-soft); color: var(--green); }
.entry__icon--orange { background: var(--orange-soft); color: var(--orange); }
.entry__icon--red { background: var(--red-soft); color: var(--red); }

.entry__text {
  min-width: 0;
  -webkit-flex: 1;
  flex: 1;
}

.entry__name {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry__sub {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 8. 列表 ---------- */
.list {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 12px;
}

.list__item {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 14px 16px;
  text-align: left;
  background: var(--card);
}

.list__item + .list__item {
  border-top: 1px solid var(--line);
}

.list__item:active {
  background: #fafbfc;
}

.list__main {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
}

.list__title {
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.list__sub {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-3);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.list__extra {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-left: 10px;
  font-size: 13px;
  color: var(--text-3);
  text-align: right;
}

.list__arrow {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-left: 6px;
  color: #c9cdd4;
  font-size: 16px;
  line-height: 1;
}

/* ---------- 9. 徽标 / 标签 ---------- */
.badge {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: var(--brand-soft);
  color: var(--brand);
  white-space: nowrap;
}

.badge--green { background: var(--green-soft); color: var(--green); }
.badge--red { background: var(--red-soft); color: var(--red); }
.badge--orange { background: var(--orange-soft); color: var(--orange); }
.badge--gray { background: #f2f3f5; color: var(--text-3); }

.tag-line {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.tag-line > * {
  margin: 0 8px 6px 0;
}

/* ---------- 10. 统计 ---------- */
.stats {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: -5px;
}

.stat {
  width: 33.3333%;
  padding: 5px;
}

.stat--half { width: 50%; }

.stat__inner {
  padding: 12px 6px;
  text-align: center;
  background: #f7f9fc;
  border-radius: var(--radius);
}

.stat__num {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--brand);
}

.stat__num--green { color: var(--green); }
.stat__num--red { color: var(--red); }
.stat__num--gray { color: var(--text-3); }

.stat__label {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- 11. 练习/考试配置 ---------- */
.field {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  min-height: var(--tap);
  padding: 6px 0;
}

.field + .field {
  border-top: 1px solid var(--line);
}

.field__label {
  -webkit-flex: 0 0 74px;
  flex: 0 0 74px;
  font-size: 15px;
  color: var(--text-2);
}

.field__value {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  font-size: 15px;
  text-align: right;
  color: var(--text);
}

.chips {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: -4px;
}

.chip {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  min-height: 36px;
  margin: 4px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--text-2);
  background: #f2f3f5;
  border-radius: 999px;
}

.chip.is-active {
  background: var(--brand);
  color: #fff;
  font-weight: 500;
}

.chip:active {
  opacity: 0.8;
}

/* 该章没有题目时的禁用态 */
.chip.is-disabled,
.chip:disabled {
  opacity: 0.45;
  color: var(--text-3);
  background: #f7f8fa;
}

/* ---------- 12. 答题页 ---------- */
.exam-progress {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  padding: 8px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}

.exam-progress__text {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--text-2);
}

.exam-progress__bar {
  -webkit-flex: 1;
  flex: 1;
  height: 5px;
  margin-left: 10px;
  border-radius: 3px;
  background: #eef0f3;
  overflow: hidden;
}

.exam-progress__fill {
  height: 100%;
  width: 0;
  border-radius: 3px;
  background: var(--brand);
  -webkit-transition: width 0.2s;
  transition: width 0.2s;
}

.timer {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.timer.is-warning {
  background: #fff;
  color: var(--red);
}

.q-head {
  margin-bottom: 10px;
}

.q-stem {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.65;
  word-break: break-word;
}

.q-index {
  display: inline-block;
  margin-right: 4px;
  color: var(--brand);
  font-weight: 700;
}

.options {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  margin-top: 4px;
}

.option {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  margin-bottom: 10px;
  text-align: left;
  background: #f7f9fc;
  border: 1px solid transparent;
  border-radius: var(--radius);
  -webkit-transition: background 0.15s, border-color 0.15s;
  transition: background 0.15s, border-color 0.15s;
}

.option:active {
  background: #eef2f8;
}

.option.is-picked {
  background: var(--brand-soft);
  border-color: var(--brand);
}

.option__key {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 50%;
}

.option.is-picked .option__key {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.option__text {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  font-size: 15px;
  line-height: 1.55;
  word-break: break-word;
  padding-top: 1px;
}

/* 结果态：正确/错误选项 */
.option.is-correct {
  background: var(--green-soft);
  border-color: var(--green);
}

.option.is-correct .option__key {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.option.is-wrong {
  background: var(--red-soft);
  border-color: var(--red);
}

.option.is-wrong .option__key {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
}

.fill-input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  font-size: 16px;
  background: #f7f9fc;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
}

.fill-input:focus {
  border-color: var(--brand);
  background: #fff;
}

.fill-input[readonly] {
  color: var(--text-2);
}

.hint {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-3);
}

/* ---------- 13. 答题卡 ---------- */
.sheet {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: -5px;
}

.sheet__cell {
  width: 20%;
  padding: 5px;
}

.sheet__btn {
  position: relative;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  background: #f2f3f5;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
}

.sheet__btn.is-answered {
  background: var(--brand-soft);
  color: var(--brand);
  border-color: var(--brand-line);
}

.sheet__btn.is-current {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.18);
}

.sheet-legend {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-3);
}

.sheet-legend__item {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  margin-right: 14px;
}

.sheet-legend__dot {
  width: 12px;
  height: 12px;
  margin-right: 5px;
  border-radius: 3px;
  background: #f2f3f5;
  border: 1px solid var(--line-2);
}

.sheet-legend__dot--answered {
  background: var(--brand-soft);
  border-color: var(--brand-line);
}

/* ---------- 14. 结果页 ---------- */
.score-card {
  padding: 22px 16px 18px;
  text-align: center;
  border-radius: var(--radius-lg);
  background: -webkit-linear-gradient(160deg, #1a73e8 0%, #2f86ef 100%);
  background: linear-gradient(160deg, #1a73e8 0%, #2f86ef 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(26, 115, 232, 0.22);
  margin-bottom: 12px;
}

.score-card--fail {
  background: -webkit-linear-gradient(160deg, #f0854a 0%, #e54545 100%);
  background: linear-gradient(160deg, #f0854a 0%, #e54545 100%);
  box-shadow: 0 6px 18px rgba(229, 69, 69, 0.22);
}

.score-card__label {
  font-size: 13px;
  opacity: 0.88;
}

.score-card__score {
  font-size: 46px;
  font-weight: 700;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.score-card__score small {
  font-size: 18px;
  font-weight: 500;
  opacity: 0.85;
}

.score-card__rate {
  font-size: 14px;
  opacity: 0.92;
}

.score-card__badge {
  display: inline-block;
  margin-top: 10px;
  padding: 4px 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.filter-bar {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.filter-bar .chip {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line-2);
}

.filter-bar .chip.is-active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* 解析条目 */
.analysis {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}

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

.analysis__no {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.analysis__body {
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px dashed var(--line-2);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
  word-break: break-word;
}

.analysis__row {
  display: -webkit-flex;
  display: flex;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.6;
}

.analysis__row:last-child {
  margin-bottom: 0;
}

.analysis__key {
  -webkit-flex: 0 0 68px;
  flex: 0 0 68px;
  color: var(--text-3);
}

.analysis__val {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.analysis__val--right { color: var(--green); font-weight: 600; }
.analysis__val--wrong { color: var(--red); font-weight: 600; }

.analysis__title {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.6;
  word-break: break-word;
}

.analysis__tools {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.analysis__tools .btn + .btn {
  margin-left: 10px;
}

/* ---------- 15. 空状态 / 加载 ---------- */
.empty {
  padding: 56px 24px;
  text-align: center;
}

.empty__icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.55;
}

.empty__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-2);
}

.empty__desc {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-3);
}

.empty .btn {
  margin-top: 18px;
}

.loading {
  padding: 40px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--text-3);
}

.skeleton {
  height: 14px;
  margin-bottom: 10px;
  border-radius: 6px;
  background: -webkit-linear-gradient(90deg, #eef0f3 25%, #f6f7f9 37%, #eef0f3 63%);
  background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 37%, #eef0f3 63%);
  -webkit-animation: skeleton 1.2s ease-in-out infinite;
  animation: skeleton 1.2s ease-in-out infinite;
}

@-webkit-keyframes skeleton {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

@keyframes skeleton {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ---------- 16. 启动占位 ---------- */
.boot {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  min-height: 80vh;
  color: var(--text-3);
}

.boot__logo {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  margin-bottom: 14px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 20px;
}

.boot__text {
  font-size: 14px;
}

/* ---------- 17. 底部 tabbar ---------- */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: -webkit-flex;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom);
}

.tabbar__item {
  -webkit-flex: 1;
  flex: 1;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  min-height: var(--tabbar-h);
  color: var(--text-3);
  font-size: 11px;
}

.tabbar__item.is-active {
  color: var(--brand);
}

.tabbar__icon {
  font-size: 19px;
  line-height: 1.2;
}

.tabbar__icon svg {
  display: block;
}

.tabbar__label {
  margin-top: 1px;
}

/* ---------- 18. 个人中心 ---------- */
.profile {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  padding: 18px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius-lg);
  background: -webkit-linear-gradient(135deg, #1a73e8 0%, #3f8bf0 100%);
  background: linear-gradient(135deg, #1a73e8 0%, #3f8bf0 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(26, 115, 232, 0.22);
}

.profile__avatar {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-right: 14px;
  font-size: 22px;
  font-weight: 600;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
}

.profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile__name {
  font-size: 18px;
  font-weight: 600;
}

.profile__sub {
  margin-top: 3px;
  font-size: 12px;
  opacity: 0.85;
}

/* ---------- 19. 排行榜 ---------- */
.rank-item {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  padding: 12px 16px;
  background: var(--card);
}

.rank-item + .rank-item {
  border-top: 1px solid var(--line);
}

.rank-item.is-me {
  background: var(--brand-soft);
}

.rank-item__no {
  -webkit-flex: 0 0 30px;
  flex: 0 0 30px;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
  text-align: center;
}

.rank-item__no--1 { color: #f5a623; }
.rank-item__no--2 { color: #94a3b8; }
.rank-item__no--3 { color: #cd7f32; }

.rank-item__avatar {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-right: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
  overflow: hidden;
}

.rank-item__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-item__main {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
}

.rank-item__name {
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item__meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
}

.rank-item__score {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  margin-left: 10px;
  text-align: right;
}

.rank-item__best {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.rank-item__unit {
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- 20. 题目列表（错题本 / 收藏） ---------- */
.q-list__head {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 8px;
}

.q-list__stem {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  word-break: break-word;
}

.q-list__meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.q-list__actions {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-top: 12px;
}

.q-list__actions .btn + .btn {
  margin-left: 10px;
}

.q-list__actions .btn {
  margin-bottom: 6px;
}

.q-answer {
  margin-top: 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-2);
  background: #f7f9fc;
  border-radius: var(--radius-sm);
  word-break: break-word;
}

.q-answer__label {
  color: var(--text-3);
}

.text-green { color: var(--green); font-weight: 600; }
.text-red { color: var(--red); font-weight: 600; }
.text-brand { color: var(--brand); font-weight: 600; }
.text-muted { color: var(--text-3); }

/* ---------- 21. toast ---------- */
.toast-layer {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--safe-top) + 12px);
  z-index: 90;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  pointer-events: none;
  padding: 0 16px;
}

.toast {
  max-width: 100%;
  margin-bottom: 8px;
  padding: 10px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
  background: rgba(31, 35, 41, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
  word-break: break-word;
  -webkit-animation: toast-in 0.2s ease-out;
  animation: toast-in 0.2s ease-out;
}

.toast--error {
  background: rgba(200, 45, 45, 0.94);
}

.toast--success {
  background: rgba(7, 150, 80, 0.94);
}

@-webkit-keyframes toast-in {
  from { opacity: 0; -webkit-transform: translateY(-8px); transform: translateY(-8px); }
  to { opacity: 1; -webkit-transform: none; transform: none; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 22. 弹窗 ---------- */
.modal-layer {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 80;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  -webkit-justify-content: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
}

.modal-layer[hidden] {
  display: none;
}

.modal {
  width: 100%;
  max-height: 78vh;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding-bottom: var(--safe-bottom);
  -webkit-animation: modal-up 0.22s ease-out;
  animation: modal-up 0.22s ease-out;
}

@-webkit-keyframes modal-up {
  from { -webkit-transform: translateY(14px); transform: translateY(14px); opacity: 0.6; }
  to { -webkit-transform: none; transform: none; opacity: 1; }
}

@keyframes modal-up {
  from { transform: translateY(14px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

.modal__head {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.modal__title {
  font-size: 16px;
  font-weight: 600;
}

.modal__close {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  margin: -8px -10px -8px 0;
  font-size: 20px;
  color: var(--text-3);
}

.modal__body {
  -webkit-flex: 1;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}

.modal__foot {
  display: -webkit-flex;
  display: flex;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
}

.modal__foot .btn {
  -webkit-flex: 1;
  flex: 1;
}

.modal__foot .btn + .btn {
  margin-left: 12px;
}

.modal__text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2);
}

.modal__summary {
  display: -webkit-flex;
  display: flex;
  margin: 14px -5px 0;
}

.modal__summary > div {
  -webkit-flex: 1;
  flex: 1;
  margin: 0 5px;
  padding: 10px 4px;
  text-align: center;
  background: #f7f9fc;
  border-radius: var(--radius-sm);
}

.modal__summary b {
  display: block;
  font-size: 18px;
  color: var(--brand);
}

.modal__summary span {
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- 23. 关于页 / 页脚 ---------- */
.about-text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-2);
}

.about-text p + p {
  margin-top: 8px;
}

.footer {
  padding: 22px 16px 26px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.7;
}

.chapter-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  min-height: var(--tap);
  padding: 8px 0;
  font-size: 15px;
  color: var(--text-2);
}

.chapter-row + .chapter-row {
  border-top: 1px solid var(--line);
}

.chapter-row__count {
  font-size: 13px;
  color: var(--text-3);
}

/* 该章还没有题：灰掉但仍列出来，让"教材一共有哪几章"一眼看清 */
.chapter-row--empty {
  color: var(--text-3);
  opacity: 0.55;
}

/* ---------- 24. 深色模式（微信内跟随系统，可选） ---------- */
@media (prefers-color-scheme: dark) {
  /* 为保证考试类产品的清晰度，仅做轻微微调，不切换为深色底 */
  :root {
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  }
}

/* ============================================================
   25. 多科目：科目选择 / 当前科目 / 组卷配比 / 告警条
   （追加于 2026-10，配合科目化改造）
   ============================================================ */

/* ---------- 25.1 当前科目 hero 顶部条 ---------- */
.hero__bar {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 6px;
}

.hero__label {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}

.hero__switch {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
}

.hero__switch:active {
  background: rgba(255, 255, 255, 0.3);
}

/* ---------- 25.2 科目卡片 ---------- */
.subjects-hint {
  margin: 0 2px 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-3);
}

.subject-card__head {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.subject-card__name {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  min-width: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.subject-card__short {
  margin-left: 8px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
  background: #f2f3f5;
  border-radius: 999px;
}

.subject-card__desc {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-3);
}

.subject-card--current {
  border: 1px solid var(--brand-line);
  box-shadow: 0 2px 12px rgba(26, 115, 232, 0.12);
}

.subject-card__note {
  margin-top: 10px;
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  background: #f7f9fc;
  border-radius: var(--radius-sm);
}

.subject-card__note--warn {
  color: #9a6400;
  background: var(--orange-soft);
}

/* ---------- 25.3 题型配比条 ---------- */
.compose__bars {
  display: -webkit-flex;
  display: flex;
  width: 100%;
  height: 8px;
  margin: 2px 0 10px;
  border-radius: 4px;
  overflow: hidden;
  background: #f2f3f5;
}

.compose__seg {
  height: 100%;
}

.compose__seg--single { background: var(--brand); }
.compose__seg--multiple { background: var(--orange); }
.compose__seg--judge { background: var(--green); }
.compose__seg--fill { background: var(--red); }

.compose__legend {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: -3px;
}

.compose__item {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  margin: 3px 10px 3px 0;
  font-size: 13px;
  color: var(--text-2);
}

.compose__item.is-off {
  color: var(--text-3);
  opacity: 0.6;
}

.compose__dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--brand);
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
}

.compose__dot--single { background: var(--brand); }
.compose__dot--multiple { background: var(--orange); }
.compose__dot--judge { background: var(--green); }
.compose__dot--fill { background: var(--red); }

/* ---------- 25.4 按题型明细 ---------- */
.type-row {
  padding: 10px 0;
}

.type-row + .type-row {
  border-top: 1px solid var(--line);
}

.type-row__head {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  font-size: 14px;
}

.type-row__name {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  color: var(--text);
  font-weight: 500;
}

.type-row__score {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.type-row__bar {
  height: 6px;
  margin: 7px 0 5px;
  border-radius: 3px;
  background: #eef0f3;
  overflow: hidden;
}

.type-row__fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--brand);
}

.type-row__fill--single { background: var(--brand); }
.type-row__fill--multiple { background: var(--orange); }
.type-row__fill--judge { background: var(--green); }
.type-row__fill--fill { background: var(--red); }

.type-row__meta {
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- 25.5 分科目统计行 ---------- */
.subject-stat {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  min-height: 56px;
  padding: 10px 0;
}

.subject-stat + .subject-stat {
  border-top: 1px solid var(--line);
}

.subject-stat.is-current {
  background: #f7faff;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

.subject-stat__main {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  padding-right: 10px;
}

.subject-stat__name {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.subject-stat__meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-3);
}

.subject-stat__right {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  text-align: right;
}

.subject-stat__rate {
  font-size: 17px;
  font-weight: 700;
  color: var(--brand);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.subject-stat__unit {
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- 25.6 告警提示条（不阻断答题） ---------- */
.notice {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-start;
  align-items: flex-start;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
}

.notice--warn {
  background: var(--orange-soft);
  border-color: #ffe0b2;
}

.notice--error {
  background: var(--red-soft);
  border-color: #ffd6d6;
}

.notice__main {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
}

.notice__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
}

.notice--warn .notice__title {
  color: #9a6400;
}

.notice--error .notice__title {
  color: var(--red);
}

.notice__list {
  margin-top: 5px;
}

.notice__list li {
  position: relative;
  padding-left: 12px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-2);
}

.notice--warn .notice__list li {
  color: #8a6a1f;
}

.notice__list li::before {
  content: "·";
  position: absolute;
  left: 2px;
}

.notice__close {
  -webkit-flex: 0 0 auto;
  flex: 0 0 auto;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: -6px -6px 0 6px;
  font-size: 18px;
  line-height: 1;
  color: var(--text-3);
  border-radius: 50%;
}

.notice__close:active {
  background: rgba(0, 0, 0, 0.06);
}

/* ---------- 25.7 toast 告警色 ---------- */
.toast--warn {
  background: rgba(180, 118, 0, 0.94);
}

/* ---------- 25.8 5 个 tab 时压缩字号 ---------- */
.tabbar__item {
  min-width: 0;
}

.tabbar__label {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
