:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-soft: #dbeafe;
  --color-teal: #0d9488;
  --color-success: #16a34a;
  --color-danger: #dc2626;
  --color-amber: #f59e0b;
  --color-bg: #f5f7fa;
  --color-card: #ffffff;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-line: #e8eef5;
  --radius: 14px;
  --shadow: 0 6px 20px rgba(37, 99, 235, 0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: #dce4ef; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #dce4ef;
  color: var(--color-text);
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

/* 手机壳式外框：避免宽屏下卡片“悬空” */
#app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  height: auto;
  margin: 0 auto;
  background: var(--color-bg);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
}
/* 首页内容超出一屏时可上下滚动 */
#app:has(.home-page) {
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
/* 门闸/登录注册：浅灰底 + 内容垂直居中（配色保持学员端原样） */
#app:has(.gate-entry),
#app:has(.gate-auth) {
  min-height: 100vh;
  height: auto;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  box-shadow: none;
  overflow: visible;
}
@media (min-width: 460px) {
  body {
    padding: 20px 12px;
    background:
      radial-gradient(1200px 600px at 50% -10%, rgba(37, 99, 235, 0.12), transparent 55%),
      #dce4ef;
  }
  #app {
    min-height: calc(100vh - 40px);
    border-radius: 22px;
    box-shadow:
      0 0 0 1px rgba(15, 23, 42, 0.1),
      0 18px 48px rgba(15, 23, 42, 0.16);
  }
  #app:has(.home-page) {
    height: calc(100vh - 40px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  #app:has(.gate-entry),
  #app:has(.gate-auth) {
    min-height: calc(100vh - 40px);
    border-radius: 0;
    box-shadow: none;
    background: var(--color-bg);
  }
  body:has(.gate-entry),
  body:has(.gate-auth) {
    padding: 0;
    background: var(--color-bg);
  }
  /* 仅长列表页在手机壳内滚动；报告等短页能放下就不出滚动条 */
  #app:has(.chapters-page),
  #app:has(.exams-page) {
    max-height: calc(100vh - 40px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 459px) {
  html, body { background: var(--color-bg); }
  #app { box-shadow: none; max-width: none; }
}

.page {
  max-width: none;
  margin: 0;
  min-height: 100%;
  padding: 0 14px calc(16px + var(--safe-bottom));
  background: var(--color-bg);
}
/* 列表页按内容伸缩，避免多余底边距硬挤出滚动条 */
.page:not(.home-page) {
  min-height: auto;
  height: auto;
  overflow: visible;
  padding-bottom: calc(16px + var(--safe-bottom));
  flex: 0 0 auto;
}

/* —— 顶栏（对齐小程序蓝顶） —— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -14px 14px;
  padding: 12px 14px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  color: #fff;
  background: linear-gradient(145deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
  box-shadow: none;
}
.topbar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  position: relative;
}
.topbar .back {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  border-radius: 10px;
  flex-shrink: 0;
}
.topbar .title {
  flex: 1;
  font-weight: 720;
  font-size: 17px;
  letter-spacing: 0.02em;
}
.topbar .right {
  font-size: 12px;
  font-weight: 650;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.topbar-sub {
  margin-top: 8px;
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 500;
}

/* —— 首页 Hero（贴齐外框顶边，避免浮卡感） —— */
.hero {
  margin: 0 -14px 14px;
  padding: 22px 16px 20px;
  background: linear-gradient(145deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
  color: #fff;
  border-radius: 0;
  box-shadow: none;
}
.hero-body {
  display: flex;
  align-items: stretch;
  gap: 12px;
}
.hero-col-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-col-vip {
  flex-shrink: 0;
  width: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-panel {
  border-left: 4px solid rgba(255, 255, 255, 0.9);
  padding: 4px 8px 4px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.hero-tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
}
.hero-title {
  margin: 10px 0 0;
  font-size: 24px;
  font-weight: 760;
  letter-spacing: 0.5px;
  line-height: 1.3;
  text-align: center;
  width: 100%;
}
.hero-user {
  margin-top: 10px;
  width: 100%;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.86);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: center;
}
.vip-chip {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 999px;
  background: var(--color-amber);
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  white-space: nowrap;
}
.vip-chip.off {
  background: rgba(255, 255, 255, 0.22);
}
.hero-meta {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
  text-align: center;
}

/* 学习进度卡 */
.progress-card {
  cursor: pointer;
  transition: transform 0.12s ease;
}
.progress-card:active { transform: scale(0.99); }
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 4px;
}
.section-head-title {
  font-weight: 700;
  font-size: 15px;
}
.section-head-sub {
  margin-top: 4px;
}
.vip-foot {
  margin: 8px 4px 4px;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
}
.logout-link {
  display: block;
  margin: 18px auto 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

/* —— 首页：按内容增高，由 #app 负责上下滚动 —— */
.home-page {
  flex: 0 0 auto;
  min-height: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 0 10px calc(16px + var(--safe-bottom));
  overflow: visible;
}
.home-page .hero {
  flex-shrink: 0;
  margin: 0 -10px 8px;
  padding: 14px 14px 12px;
}
.home-page .hero-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 6px 0 4px;
}
.home-page .hero-brand {
  flex-shrink: 0;
  align-self: center;
  width: 44px;
  height: 52px;
  margin: 0 0 0 16px;
  border-radius: 12px;
  background: #d97706;
  border: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
}
.home-page .hero-brand span {
  display: block;
}
.home-page .hero-col-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-right: 4px;
  transform: translateX(-14px);
}
.home-page .hero-title {
  margin: 0;
  text-align: center;
  width: 100%;
  font-size: 20px;
  line-height: 1.3;
}
.home-page .hero-tags {
  justify-content: center;
  gap: 6px;
  margin: 8px 0 0;
}
.home-page .hero-user {
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
  gap: 6px;
}
.home-page .hero-user .hero-tag {
  font-size: 12px;
}
.home-page .hero-vip-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}
.home-page .hero-vip-tag.on {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.22);
}
.home-page .hero-vip-tag.off {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.16);
  font-weight: 600;
}
.home-page .hero-meta {
  margin-top: 6px;
  text-align: center;
  width: 100%;
}
.home-page .hero-tags { gap: 5px; }
.home-page .hero-tag {
  padding: 2px 8px;
  font-size: 11px;
}
.home-page .hero-title {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.25;
}
.home-page .hero-user {
  margin-top: 5px;
  font-size: 12px;
  gap: 6px;
}
.home-page .vip-chip {
  padding: 7px 6px;
  font-size: 11px;
}
.home-page .hero-meta {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.35;
}
.home-page .progress-card {
  flex-shrink: 0;
  padding: 10px 10px 8px;
  margin-bottom: 8px;
  border-radius: 12px;
}
.home-page .section-head { margin-bottom: 2px; }
.home-page .section-head-title { font-size: 13px; }
.home-page .section-head-sub {
  margin-top: 2px;
  font-size: 11px;
}
.home-page .nums-row { padding: 2px 0 0; }
.home-page .nums-row .num { font-size: 18px; }
.home-page .nums-row .muted { font-size: 11px; }
.home-page .tabs {
  flex-shrink: 0;
  padding: 3px;
  margin-bottom: 4px;
  border-radius: 10px;
}
.home-page .tab {
  padding: 7px 6px;
  font-size: 13px;
  border-radius: 8px;
}
.home-page .level-tip {
  flex-shrink: 0;
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 1.3;
}

/* 中间功能区吃掉剩余高度，避免底部空一大块 */
.home-page .home-fill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.home-page .home-block {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}
.home-page .section-title {
  flex-shrink: 0;
  margin: 4px 2px 6px;
  font-size: 13px;
}
.home-page .feature-grid {
  flex: 0 0 auto;
  margin: 0;
  display: grid;
  gap: 8px;
}
.home-page .feature-grid-4 {
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
}
.home-page .feature-grid-2 {
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
}
.home-page .feature-box {
  width: auto;
  margin: 0;
  min-height: 96px;
  height: auto;
  padding: 12px 8px;
  border-radius: 12px;
  justify-content: center;
}
.home-page .feature-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 13px;
}
.home-page .feature-name {
  margin-top: 5px;
  font-size: 13px;
}
.home-page .feature-desc {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.35;
  flex: 0;
}
.home-page .home-foot {
  flex-shrink: 0;
  margin-top: 6px;
}
.home-page .vip-foot {
  margin: 0 2px;
  font-size: 10px;
  line-height: 1.35;
}
.home-page .logout-link {
  margin: 4px auto 0;
  padding: 2px;
  font-size: 12px;
  color: #3b82f6;
  font-weight: 650;
}
.home-page .logout-link:active {
  color: #1d4ed8;
}
.provider-foot {
  margin-top: 4px;
  text-align: center;
  font-size: 10px;
  line-height: 1.3;
  color: #94a3b8;
}
.home-page .provider-foot {
  margin-top: 2px;
  font-size: 10px;
}
.icp-foot {
  margin-top: 2px;
  text-align: center;
  font-size: 10px;
  line-height: 1.3;
}
.icp-foot a {
  color: #94a3b8;
  text-decoration: none;
}
.icp-foot a:active {
  color: #64748b;
}

@media (max-height: 700px) {
  .home-page .hero { padding: 10px 10px 8px; margin-bottom: 6px; }
  .home-page .hero-tags { display: none; }
  .home-page .hero-title { margin-top: 0; font-size: 18px; }
  .home-page .progress-card { padding: 8px 10px 6px; margin-bottom: 6px; }
  .home-page .feature-box { padding: 8px 6px; }
  .home-page .vip-foot { display: none; }
}

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 16px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow);
}
.card-accent {
  border-left: 4px solid var(--color-primary);
}
.card-accent-teal {
  border-left: 4px solid var(--color-teal);
}
.card-accent-amber {
  border-left: 4px solid var(--color-amber);
}

/* 模拟卷单项：按类型区分左边线颜色 */
.paper-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  margin-bottom: 10px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--color-primary);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.paper-item:active { transform: scale(0.99); }
.paper-item.kind-combined {
  border-left-color: var(--color-teal);
}
.paper-item.kind-skill {
  border-left-color: #0ea5e9;
}
.paper-item .paper-main { flex: 1; min-width: 0; }
.paper-item .t { font-weight: 700; font-size: 15px; line-height: 1.4; }
.paper-item .m { color: var(--color-muted); font-size: 12px; margin-top: 4px; }
.paper-item .start-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.paper-item.kind-combined .start-btn {
  background: var(--color-teal);
}
.paper-item.kind-skill .start-btn {
  background: #0ea5e9;
}
.exam-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 4px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}
.exam-group-title .bar {
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: #60a5fa;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28);
}
.exam-group-title.teal .bar {
  background: #2dd4bf;
  box-shadow: 0 0 0 2px rgba(45, 212, 191, 0.28);
}
.exam-group-title.sky .bar {
  background: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28);
}
.exam-group-title .tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 650;
  color: var(--color-muted);
}

.muted { color: var(--color-muted); font-size: 13px; line-height: 1.5; }
.h1 { margin: 0 0 8px; font-size: 22px; font-weight: 780; }
.h2 { margin: 0 0 10px; font-size: 16px; font-weight: 720; }

.section-title {
  margin: 18px 4px 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
}
.section-title.vip { color: var(--color-amber); }
.section-title.free { color: var(--color-primary); }

label { display: block; font-size: 13px; color: var(--color-muted); margin: 12px 0 6px; }
input {
  width: 100%;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
  background: #fff;
}
input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  line-height: 1.2;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.btn-danger {
  background: #fef2f2;
  color: var(--color-danger);
}
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

.error {
  margin-top: 10px;
  color: var(--color-danger);
  font-size: 13px;
  min-height: 18px;
}
.link {
  display: inline-block;
  margin-top: 14px;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}

/* 教材切换（对齐小程序 book-tabs） */
.tabs {
  display: flex;
  gap: 0;
  background: #fff;
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 10px;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow);
}
.tab {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border-radius: 10px;
  background: transparent;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 650;
  border: none;
  cursor: pointer;
}
.tab.on {
  background: var(--color-primary);
  color: #fff;
}
.tabs.book-tabs .tab.on {
  background: var(--color-teal);
}
.book-count {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
}
.level-tip {
  text-align: center;
  font-size: 12px;
  color: var(--color-muted);
  margin: 0 0 12px;
  padding: 0 4px;
}

/* 功能宫格（对齐小程序 feature-grid） */
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -6px;
}
.feature-box {
  width: calc(50% - 12px);
  margin: 0 6px 12px;
  padding: 16px 12px;
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--color-primary);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.feature-box:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.1);
}
.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 760;
  flex-shrink: 0;
}
.feature-icon.blue { background: #2563eb; }
.feature-icon.green { background: #0ea5e9; }
.feature-icon.purple { background: #7c3aed; }
.feature-icon.orange { background: #ea580c; }
.feature-icon.indigo { background: #4f46e5; }
.feature-icon.rose { background: #e11d48; }
.feature-icon.teal { background: #0d9488; }
.feature-icon.amber { background: #d97706; }

.feedback-entry {
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px dashed #93c5fd;
  border-radius: 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.feedback-entry:active { background: #dbeafe; }
.fb-card { margin: 12px; padding: 14px; }
.fb-intro { font-size: 13px; line-height: 1.55; color: #334155; margin-bottom: 12px; }
.fb-stats-line { margin-top: 6px; font-size: 12px; }
.fb-label { display: block; font-size: 13px; font-weight: 600; color: #0f172a; margin: 10px 0 6px; }
.fb-rating-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-stars { display: flex; gap: 4px; }
.fb-star {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.fb-star.on { color: #f59e0b; }
.fb-group { margin-bottom: 10px; }
.fb-group-title { font-size: 12px; color: #64748b; margin-bottom: 6px; }
.fb-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-tag {
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.fb-tag.on {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
}
.fb-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
}
.fb-tip { font-size: 12px; margin: 8px 0 12px; }
.feedback-page .btn.block { width: 100%; }
.fb-mine-card { margin-top: 0; }
.fb-mine-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
}
.fb-mine-empty { font-size: 13px; padding: 8px 0 4px; }
.fb-mine-item {
  padding: 10px 0;
  border-top: 1px solid #eef2f7;
}
.fb-mine-item:first-child { border-top: 0; padding-top: 0; }
.fb-mine-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.fb-mine-stars { color: #f59e0b; font-size: 14px; letter-spacing: 1px; }
.fb-mine-status {
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 2px 8px;
}
.fb-mine-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.fb-mine-tags span {
  font-size: 11px;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 999px;
  padding: 2px 8px;
}
.fb-mine-content {
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
  white-space: pre-wrap;
  word-break: break-word;
}
.fb-mine-meta { font-size: 11px; margin-top: 6px; }
.feature-name {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 720;
  line-height: 1.3;
  text-align: center;
  width: 100%;
  color: var(--color-text);
}
.feature-desc {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--color-muted);
  text-align: center;
  width: 100%;
  flex: 1;
}

/* 兼容旧 feature 列表（章节等列表页仍可用） */
.feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--color-line);
  margin-bottom: 8px;
  cursor: pointer;
}
.feature .name { font-weight: 720; font-size: 15px; }
.feature .sub { color: var(--color-muted); font-size: 12px; margin-top: 4px; }
.feature .arrow { color: #94a3b8; font-size: 20px; }

.unit {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-line);
  cursor: pointer;
}
.unit:last-child { border-bottom: none; }
.unit .t { font-weight: 650; }
.unit .m { color: var(--color-muted); font-size: 12px; margin-top: 4px; }

/* 章节练习：模块卡（对齐小程序，单行紧凑） */
.chapters-page {
  padding-left: 10px;
  padding-right: 10px;
}
.chapters-page .tabs {
  padding: 3px;
  margin-bottom: 6px;
  border-radius: 10px;
}
.chapters-page .book-tabs { margin-top: -2px; }
.chapters-page .tab {
  padding: 8px 4px;
  font-size: 13px;
  border-radius: 8px;
}
.chapters-page .level-tip {
  margin: 0 0 8px;
  font-size: 11px;
}
.chapters-page .book-count {
  margin-left: 3px;
  font-size: 10px;
  font-weight: 600;
  opacity: 0.85;
}
.module-panel {
  margin-bottom: 8px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow);
}
.module-row {
  display: flex;
  align-items: stretch;
  min-height: 0;
}
.module-col {
  flex: 0 0 64px;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 6px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  border-right: 1px solid #e2e8f0;
  box-sizing: border-box;
}
.module-num-ring {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}
.module-num {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.module-name {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  text-align: center;
  line-height: 1.3;
  word-break: keep-all;
}
.units-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.units-col-single .unit-row {
  flex: 1;
  align-items: center;
}
.unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
  padding: 9px 10px 9px 8px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  box-sizing: border-box;
}
.unit-row:last-child { border-bottom: none; }
.unit-row:active { background: #f8fafc; }
.subject-line {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.subject-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  color: #1e293b;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.subject-meta {
  flex-shrink: 0;
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
}
.subject-meta .resume {
  color: #2563eb;
  font-weight: 650;
}
.unit-arrow {
  flex-shrink: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1;
}
.unit-arrow.lock {
  font-size: 11px;
  color: #f59e0b;
  font-weight: 650;
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--color-muted);
}
.quiz-meta .progress-text {
  font-weight: 700;
  color: var(--color-text);
}
.exam-timer {
  color: #dc2626;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.exam-timer.urgent {
  color: #b91c1c;
  animation: exam-blink 1s step-end infinite;
}
@keyframes exam-blink {
  50% { opacity: 0.45; }
}
.progress {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.progress > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  width: 0;
}
.type-tag {
  display: inline-block;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
}
.stem {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.55;
  margin-bottom: 14px;
}
.option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  border: 1.5px solid transparent;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.45;
}
.option .k {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-weight: 720;
  font-size: 13px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.option.picked {
  background: #eff6ff;
  border-color: #2563eb;
}
.option.picked .k {
  background: #2563eb;
  color: #fff;
}
.option.right {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #166534;
}
.option.right .k {
  background: #16a34a;
  color: #fff;
}
.option.wrong {
  background: #fef2f2;
  border-color: #dc2626;
  color: #991b1b;
}
.option.wrong .k {
  background: #dc2626;
  color: #fff;
}
.analysis {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f1f5f9;
  font-size: 14px;
  line-height: 1.55;
}
.analysis .ok { color: var(--color-success); font-weight: 720; }
.analysis .bad { color: var(--color-danger); font-weight: 720; }

.dock {
  position: sticky;
  bottom: 0;
  margin: 16px -14px calc(-28px + var(--safe-bottom));
  padding: 12px 14px calc(12px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--color-line);
  display: flex;
  gap: 8px;
  backdrop-filter: blur(8px);
}
.dock .btn { margin-top: 0; border-radius: 999px; }

.score-big {
  font-size: 56px;
  font-weight: 800;
  color: var(--color-primary);
  text-align: center;
  margin: 8px 0;
}

/* 学习报告：收紧间距，尽量一页放下 */
.stats-page .topbar { margin-bottom: 10px; }
.stats-page .result-panel { padding: 18px 14px 14px; margin-bottom: 8px; }
.stats-page .score-big { font-size: 44px; margin: 4px 0; }
.stats-page .h2 { margin: 0 0 4px; font-size: 15px; }
.stats-page .nums-row { padding: 6px 0; margin-bottom: 8px; }
.stats-page .section-title { margin: 10px 4px 6px; font-size: 13px; }
.stats-page .card { margin-bottom: 8px; padding: 12px; }
.stats-page .unit { padding: 10px 0; }
.stats-page .empty { padding: 16px; }
.center { text-align: center; }

.loading {
  padding: 48px 16px;
  text-align: center;
  color: var(--color-muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  max-width: 80%;
  text-align: center;
}
.toast.show { opacity: 1; }

.empty { padding: 28px; text-align: center; color: var(--color-muted); }

.nums-row {
  display: flex;
  padding: 8px 0;
}
.nums-row .n {
  flex: 1;
  text-align: center;
}
.nums-row .num {
  font-size: 22px;
  font-weight: 760;
  color: var(--color-primary);
}

.weak-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.rate { color: var(--color-danger); font-size: 12px; font-weight: 700; flex-shrink: 0; }
.track {
  height: 6px;
  background: var(--color-line);
  border-radius: 999px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.track > i {
  display: block;
  height: 100%;
  background: var(--color-primary);
}

.exam-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--color-line);
}
.exam-row:last-child { border-bottom: none; }
.exam-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.exam-top .score { font-size: 22px; font-weight: 780; }
.exam-top .score.good { color: var(--color-success); }
.exam-top .score.mid { color: var(--color-primary); }
.exam-top .score.low { color: var(--color-danger); }
.exam-links {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}
.exam-links a {
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.exam-links a.bad { color: var(--color-danger); }

/* 登录/门闸页 */
.gate-wrap {
  padding-top: 0;
  display: flex;
  flex-direction: column;
  min-height: auto;
  height: auto;
}
.gate-entry {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 24px 16px;
  background: transparent;
  flex: 0 0 auto;
}
.gate-auth {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 24px 16px;
  background: transparent;
  flex: 0 0 auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
}
.gate-auth .gate-panel {
  display: flex;
  flex-direction: column;
}
.gate-hero-auth {
  padding-top: 18px;
  padding-bottom: 18px;
}
.gate-auth-body {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  padding: 14px 12px 8px;
}
.gate-auth-body > .card,
.gate-auth-body > .auth-form-card {
  margin: 0 0 8px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-line);
  border-left: 4px solid var(--color-primary);
}
.gate-auth-body > .card .link,
.gate-auth-body > .auth-form-card .link {
  display: block;
  width: 100%;
  text-align: center;
}
.gate-auth-body .auth-form-card .field-row:first-child {
  margin-top: 0;
}
.gate-auth-body .field-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 8px;
  margin-top: 12px;
  align-items: stretch;
  min-height: 48px;
}
.gate-auth-body .field-label-box,
.gate-auth-body .field-input-box {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
}
.gate-auth-body .field-label-box {
  justify-content: center;
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  padding: 0 8px;
}
.gate-auth-body .field-input-box {
  padding: 0;
  background: #fff;
}
.gate-auth-body .field-input-box input {
  margin: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
  width: 100%;
  height: 100%;
  min-height: 46px;
  padding: 12px 14px;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.gate-auth-body .field-input-box input:focus {
  outline: none;
  box-shadow: none;
  background: transparent;
}
.gate-auth-body .field-input-box:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.pwd-force-tip {
  margin: 0 0 14px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 10px;
  text-align: left;
}

.gate-auth-body .field-row-readonly .field-readonly-value {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #64748b;
  background: #f1f5f9;
  cursor: default;
  user-select: text;
}

.gate-auth-body .gate-foot {
  margin: 0;
  padding: 4px 8px 10px;
}
.gate-panel {
  width: 100%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-line);
}
.gate-panel > .card {
  padding: 14px 14px 12px;
  margin: 12px 12px 8px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--color-line);
  border-left: 4px solid var(--color-primary);
}
.gate-panel > .card > .btn:first-of-type {
  margin-top: 0;
}
.gate-panel > .card .btn {
  margin-top: 10px;
  padding: 12px 16px;
}
.gate-panel > .card .link {
  margin-top: 10px;
}
.gate-wrap > .card {
  padding: 14px 14px 12px;
  margin-bottom: 8px;
}
.gate-wrap > .card > .btn:first-of-type {
  margin-top: 0;
}
.gate-wrap > .card .btn {
  margin-top: 10px;
  padding: 12px 16px;
}
.gate-wrap > .card .link {
  margin-top: 10px;
}
.gate-hero {
  margin: 0 -14px 12px;
  padding: 22px 18px 18px;
  background: linear-gradient(145deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
  color: #fff;
  border-radius: 0;
  text-align: left;
  box-shadow: none;
}
.gate-panel .gate-hero {
  margin: 0;
  padding: 22px 16px 18px;
}
.gate-panel .gate-foot {
  margin: 0;
  padding: 4px 12px 14px;
}
.gate-hero-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.gate-hero .logo-mark {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  margin: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}
.gate-hero .logo-mark.logo-suoyuan {
  width: 52px;
  height: 62px;
  border-radius: 14px;
  background: #d97706;
  color: #fff;
  flex-direction: column;
  gap: 1px;
  font-size: 17px;
  line-height: 1.15;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.35);
}
.gate-hero .logo-suoyuan span {
  display: block;
}
.gate-hero-main {
  flex: 1;
  min-width: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-10px);
}
.gate-foot {
  margin-top: 4px;
  padding: 8px 8px 4px;
  text-align: center;
}
.gate-hero .h1 {
  color: #fff;
  margin: 0;
  font-size: 20px;
  font-weight: 780;
  line-height: 1.35;
  letter-spacing: 0.02em;
}
.gate-brand {
  text-align: center;
  margin-bottom: 18px;
}
.gate-brand .logo-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, #1d4ed8, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

/* 错题本摘要条 */
.summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 14px;
  margin-bottom: 12px;
}
.summary-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary);
  margin-right: 4px;
}
.summary-unit {
  font-size: 15px;
  font-weight: 650;
}
.summary-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-muted);
  line-height: 1.4;
}
.summary-bar .btn {
  width: auto;
  margin-top: 0;
  padding: 10px 16px;
  flex-shrink: 0;
}

/* 结果页 */
.result-panel {
  padding: 28px 18px 22px;
}
.result-panel .ok-label {
  font-size: 18px;
  font-weight: 740;
  color: var(--color-primary);
}
.result-actions {
  margin-top: 8px;
}
.session-block {
  margin-top: 12px;
  padding: 14px 12px;
}
.session-row {
  margin-bottom: 12px;
}
.session-row:last-child {
  margin-bottom: 0;
}
.session-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
}
.session-name {
  flex: 1;
  line-height: 1.4;
  word-break: break-word;
}
.session-rate {
  flex-shrink: 0;
  color: var(--color-primary);
  font-weight: 600;
}
.session-rate.bad {
  color: #dc2626;
}
.session-track {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 4px;
}
.session-track i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
}
.session-sub {
  font-size: 11px;
}

/* 列表页浅蓝顶渐变 */
.page-tint {
  background: linear-gradient(180deg, #eef4ff 0%, var(--color-bg) 140px, var(--color-bg) 100%);
}
