/* ================= 基础变量与重置 ================= */
:root {
  /* 花妈优选品牌橙主色系 */
  --primary: #f97316;
  --primary-dark: #ea580c;
  --primary-light: #fff4ec;
  --success: #16a34a;
  --success-light: #e8f7ee;
  --danger: #e5484d;
  --danger-light: #fdecec;
  --warn: #f59e0b;
  --warn-light: #fef4e2;
  --text: #1f2937;
  --text-sub: #6b7280;
  --border: #e5e7eb;
  --bg: #fff9f5;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(154, 52, 18, 0.07);
  --tabbar-h: 56px;
  --header-h: 52px;
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  width: 100%;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16); }
textarea { resize: vertical; min-height: 84px; }

/* ================= 顶部导航 ================= */
.app-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(135deg, #fb923c, #ea580c);
  border-bottom: none;
  box-shadow: 0 2px 10px rgba(154, 52, 18, 0.18);
  height: var(--header-h);
}
.header-inner {
  max-width: 960px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; min-width: 0; color: #fff; }
.brand-logo-img { height: 28px; width: auto; flex: none; }
.brand-sub { font-size: 0.72rem; color: rgba(255, 255, 255, 0.85); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-nav { display: none; gap: 4px; }
.header-nav a {
  padding: 6px 14px; border-radius: 8px; font-size: 0.95rem; color: rgba(255, 255, 255, 0.88);
}
.header-nav a.active { color: #fff; background: rgba(255, 255, 255, 0.22); font-weight: 600; }

/* ================= 底部 TabBar（移动端） ================= */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: #fff; border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; font-size: 0.72rem; color: var(--text-sub);
}
.tabbar a .tab-ico { font-size: 1.15rem; line-height: 1; }
.tabbar a.active { color: var(--primary); font-weight: 600; }

/* ================= 主容器 ================= */
.app-main { max-width: 960px; margin: 0 auto; padding: 14px 14px 24px; }
.page-title { font-size: 1.25rem; font-weight: 700; margin: 6px 0 14px; }
.section-title { font-size: 1rem; font-weight: 700; margin: 18px 0 10px; display: flex; align-items: center; gap: 6px; }
.section-title::before { content: ""; width: 4px; height: 16px; background: var(--primary); border-radius: 2px; }

/* ================= 卡片 ================= */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px;
}
.card.clickable { cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.card.clickable:active { transform: scale(0.985); }

/* ================= 按钮 ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; padding: 10px 18px;
  font-size: 0.95rem; font-weight: 600; transition: opacity 0.15s;
}
.btn:active { opacity: 0.85; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-ghost { background: var(--primary-light); color: var(--primary); }
.btn-danger { background: var(--danger-light); color: var(--danger); }
.btn-plain { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 22px; font-size: 1.05rem; border-radius: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 5px 12px; font-size: 0.82rem; border-radius: 8px; }

/* ================= 徽章与标签 ================= */
.badge {
  display: inline-flex; align-items: center; padding: 2px 9px;
  border-radius: 999px; font-size: 0.74rem; font-weight: 600;
  background: var(--primary-light); color: var(--primary);
}
.badge.green { background: var(--success-light); color: var(--success); }
.badge.red { background: var(--danger-light); color: var(--danger); }
.badge.orange { background: var(--warn-light); color: var(--warn); }
.badge.gray { background: #f1f3f5; color: var(--text-sub); }

/* ================= 首页 ================= */
.hero {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 20px;
  margin-bottom: 22px;
  border-left: 5px solid var(--primary);
}
.hero h2 { font-size: 1.45rem; margin-bottom: 6px; color: var(--text); }
.hero p { color: var(--text-sub); font-size: 0.88rem; }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 14px; cursor: pointer; transition: transform 0.12s;
  border-left: 4px solid var(--primary);
}
.cat-card:active { transform: scale(0.97); }
.cat-card .cat-ico { font-size: 1.5rem; }
.cat-card .cat-name { font-weight: 700; margin: 6px 0 2px; }
.cat-card .cat-desc { font-size: 0.76rem; color: var(--text-sub); }
.cat-card.c2 { border-left-color: #16a34a; }
.cat-card.c3 { border-left-color: #f59e0b; }
.cat-card.c4 { border-left-color: #e5484d; }
.cat-card.c5 { border-left-color: #7c3aed; }

/* 首页三大功能卡片 */
.feat-card { margin-bottom: 22px; padding: 20px 18px; }
.feat-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.feat-ico { font-size: 1.6rem; line-height: 1.2; }
.feat-title { font-weight: 700; font-size: 1.02rem; }
.feat-sub { font-size: 0.78rem; color: var(--text-sub); margin-top: 4px; line-height: 1.5; }
.mod-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mod-chip {
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  border-radius: 999px; padding: 6px 14px; font-size: 0.85rem; cursor: pointer;
}
.mod-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.grad-bar { display: flex; border-radius: 8px; overflow: hidden; margin-bottom: 12px; font-size: 0.68rem; color: #fff; text-align: center; }
.grad-seg { padding: 6px 2px; white-space: nowrap; overflow: hidden; }
.grad-seg.g1 { background: #fdba74; color: #7c2d12; }
.grad-seg.g2 { background: #f97316; }
.grad-seg.g3 { background: #e5484d; }

.quick-test { display: flex; gap: 8px; flex-wrap: wrap; }
.quick-test select { flex: 1; min-width: 100px; }

/* ================= 试卷列表 ================= */
.paper-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.paper-card .p-info { flex: 1; min-width: 0; }
.paper-card .p-title { font-weight: 700; margin-bottom: 4px; }
.paper-card .p-meta { font-size: 0.78rem; color: var(--text-sub); display: flex; gap: 8px; flex-wrap: wrap; }
.filter-bar { display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 2px; }
.chip {
  flex: none; padding: 6px 14px; border-radius: 999px; font-size: 0.85rem;
  background: #fff; border: 1px solid var(--border); color: var(--text-sub); cursor: pointer;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ================= 答题页 ================= */
.exam-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; font-size: 0.9rem;
}
.exam-header .timer { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--primary); }
.progress-bar { height: 6px; background: #e7ecf5; border-radius: 3px; overflow: hidden; margin-bottom: 16px; }
.progress-bar > div { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.25s; }
.q-type-tag { margin-bottom: 8px; }
.q-stem { font-size: 1.05rem; font-weight: 600; white-space: pre-wrap; word-break: break-word; margin-bottom: 14px; }
.q-fig { margin: 8px 0 14px; text-align: center; }
.q-img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: zoom-in; }
.q-review .q-fig { text-align: left; margin: 6px 0 8px; }
.q-review .q-img { max-width: 220px; }
.q-admin-card .q-fig { text-align: left; margin: 4px 0 6px; }
.q-admin-card .q-img { max-width: 120px; }
.q-score-tip { color: var(--text-sub); font-size: 0.8rem; font-weight: 400; }
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice-item {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1.5px solid var(--border); border-radius: 12px; padding: 12px;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.choice-item .c-key {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: #f1f3f5; color: var(--text-sub); font-weight: 700; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.choice-item.selected { border-color: var(--primary); background: var(--primary-light); }
.choice-item.selected .c-key { background: var(--primary); color: #fff; }
.choice-item .c-text { flex: 1; word-break: break-word; }
.exam-input { font-size: 1.05rem; }
.exam-nav {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px));
  background: #fff; border-top: 1px solid var(--border);
  display: flex; gap: 10px; padding: 10px 14px; z-index: 40;
  max-width: 960px; margin: 0 auto;
}
.exam-nav .btn { flex: 1; }
.exam-body { padding-bottom: 80px; }
.q-dots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.q-dot {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; font-size: 0.85rem; color: var(--text-sub);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.q-dot.done { background: var(--success-light); border-color: var(--success); color: var(--success); font-weight: 600; }
.q-dot.cur { border: 2px solid var(--primary); color: var(--primary); font-weight: 700; }

/* ================= 成绩页 ================= */
.score-hero { text-align: center; padding: 26px 16px; }
.score-num { font-size: 3rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.score-num small { font-size: 1rem; color: var(--text-sub); font-weight: 500; }
.score-stats { display: flex; justify-content: center; gap: 22px; margin-top: 12px; font-size: 0.85rem; color: var(--text-sub); }
.score-stats b { display: block; font-size: 1.1rem; color: var(--text); }
.q-review { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; background: #fff; }
.q-review.right { border-left: 4px solid var(--success); }
.q-review.wrong { border-left: 4px solid var(--danger); }
.q-review .rev-row { font-size: 0.88rem; margin-top: 6px; }
.q-review .rev-label { color: var(--text-sub); }
.q-review .rev-val.right { color: var(--success); font-weight: 600; }
.q-review .rev-val.wrong { color: var(--danger); font-weight: 600; }

/* ================= 表单 ================= */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.form-item .hint { font-size: 0.76rem; color: var(--text-sub); margin-top: 4px; }
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; }

/* ================= 管理后台 ================= */
.admin-tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; }
.pin-gate { max-width: 320px; margin: 60px auto; text-align: center; }
.pin-gate input { text-align: center; font-size: 1.4rem; letter-spacing: 8px; }
.q-admin-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin-bottom: 10px; background: #fff; }
.q-admin-card .qa-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.q-admin-card .qa-stem { font-size: 0.92rem; word-break: break-word; white-space: pre-wrap; }
.q-admin-card .qa-answer { font-size: 0.8rem; color: var(--text-sub); margin-top: 4px; }
.qa-actions { display: flex; gap: 6px; flex: none; }
.empty-tip { text-align: center; color: var(--text-sub); padding: 40px 0; font-size: 0.9rem; }
/* 出处汇总行 */
.src-row { padding: 7px 10px; border-bottom: 1px solid #f0e6dd; cursor: pointer; border-radius: 6px; }
.src-row:hover, .src-row.active { background: #f6f1ea; }
.src-row.active { outline: 2px solid var(--primary); outline-offset: -2px; }
.src-row .src-name { font-size: 0.83rem; font-weight: 600; }
.src-row .src-meta { font-size: 0.74rem; color: var(--text-sub); margin-top: 2px; }

/* ================= 弹窗 ================= */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
}
/* 配图点击放大查看器（答题页/结果页/管理页通用） */
.imgview-mask {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.78);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 12px; padding: 20px;
  animation: imgviewIn 0.16s ease;
}
.imgview-img {
  max-width: 92vw; max-height: 84vh; width: auto; height: auto;
  background: #fff; border-radius: 10px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
}
.imgview-close {
  position: absolute; top: 12px; right: 16px;
  width: 42px; height: 42px; border-radius: 50%;
  border: none; cursor: pointer;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  font-size: 1.5rem; line-height: 1;
}
.imgview-tip { color: rgba(255, 255, 255, 0.78); font-size: 0.8rem; }
@keyframes imgviewIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff; width: 100%; max-width: 560px; border-radius: 16px 16px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  max-height: 88vh; overflow-y: auto;
}
.modal-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.modal-close { border: none; background: none; font-size: 1.3rem; color: var(--text-sub); }

/* ================= 轻提示 ================= */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 30px); transform: translateX(-50%) translateY(20px);
  background: rgba(31, 41, 55, 0.92); color: #fff; padding: 9px 18px;
  border-radius: 999px; font-size: 0.88rem; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s; z-index: 200; max-width: 80vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= 历史记录 ================= */
.record-card { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.record-card .r-score { font-size: 1.5rem; font-weight: 800; color: var(--primary); flex: none; }
.record-card .r-info { flex: 1; min-width: 0; }
.record-card .r-title { font-weight: 600; font-size: 0.95rem; }
.record-card .r-meta { font-size: 0.76rem; color: var(--text-sub); }

/* ================= 报告页（能力评析） ================= */
.rp-doc { max-width: 860px; margin: 0 auto; }
.rp-hero {
  background: linear-gradient(135deg, #c2410c, #f97316);
  border-radius: var(--radius); color: #fff; padding: 22px 18px; margin-bottom: 14px;
}
.rp-hero-title { font-size: 1.2rem; font-weight: 800; }
.rp-hero-sub { font-size: 0.8rem; opacity: 0.85; margin: 4px 0 16px; }
.rp-pos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.rp-pos-card {
  background: rgba(255, 255, 255, 0.12); border-radius: 10px; padding: 12px; text-align: center;
}
.rp-pos-num { font-size: 1.5rem; font-weight: 800; }
.rp-pos-num small { font-size: 0.85rem; opacity: 0.8; font-weight: 500; }
.rp-pos-cap { font-size: 0.72rem; opacity: 0.8; margin-top: 2px; }
.rp-pos-badge { display: inline-block; font-size: 0.82rem; font-weight: 700; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,0.2); }
.rp-pos-badge.green { background: rgba(22, 163, 74, 0.55); }
.rp-pos-badge.orange { background: rgba(245, 158, 11, 0.6); }
.rp-pos-badge.red { background: rgba(229, 72, 77, 0.55); }
.rp-conclusion {
  margin-top: 14px; background: rgba(255, 255, 255, 0.14); border-radius: 10px;
  padding: 12px; font-size: 0.86rem; line-height: 1.7;
}
.rp-section { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.rp-section-title {
  font-weight: 800; font-size: 1.02rem; margin-bottom: 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px;
  border-left: 4px solid var(--primary); padding-left: 10px;
}
.rp-section-sub { font-size: 0.74rem; color: var(--text-sub); font-weight: 500; }
.rp-subtitle { font-weight: 700; font-size: 0.9rem; margin: 14px 0 8px; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.rp-table th {
  text-align: left; color: var(--text-sub); font-weight: 600; font-size: 0.74rem;
  border-bottom: 1px solid var(--border); padding: 6px 6px;
}
.rp-table td { padding: 8px 6px; border-bottom: 1px solid #f1f3f5; }
.rp-name { font-weight: 600; white-space: nowrap; }
.rp-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-barcell { width: 26%; min-width: 80px; }
.rp-bar { height: 8px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.rp-bar-fill { height: 100%; border-radius: 4px; background: var(--primary); transition: width 0.4s; }
.rp-bar-fill.good { background: var(--success); }
.rp-bar-fill.mid { background: var(--warn); }
.rp-bar-fill.bad { background: var(--danger); }
.rp-tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 0.7rem; font-weight: 700;
  background: var(--primary-light); color: var(--primary); white-space: nowrap;
}
.rp-tag.green { background: var(--success-light); color: var(--success); }
.rp-tag.red { background: var(--danger-light); color: var(--danger); }
.rp-tag.orange { background: var(--warn-light); color: var(--warn); }
.rp-tag.gray { background: #f1f3f5; color: var(--text-sub); }
.rp-note { font-size: 0.74rem; color: var(--text-sub); margin-top: 10px; line-height: 1.6; }

/* openEXAM 风格图表区 */
.rp-chart-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; justify-content: center; margin-bottom: 14px; }
.rp-chart-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 16px; text-align: center; }
.rp-chart-card svg { max-width: 100%; height: auto; }
.rp-chart-cap { font-size: 0.74rem; color: var(--text-sub); margin-top: 4px; }
.rp-legend { display: flex; flex-direction: column; gap: 8px; justify-content: center; font-size: 0.8rem; }
.rp-legend-item { display: flex; align-items: center; gap: 8px; }
.rp-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.rp-muted { color: var(--text-sub); }
.rp-pattern { border-left: 4px solid var(--warn); background: var(--warn-light); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.rp-pattern.high { border-left-color: var(--danger); background: var(--danger-light); }
.rp-pattern.low { border-left-color: var(--primary); background: var(--primary-light); }
.rp-pattern-name { font-weight: 700; font-size: 0.9rem; }
.rp-pattern-ev { font-size: 0.8rem; color: var(--text); margin-top: 2px; }
.rp-loss-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px dashed var(--border); }
.rp-loss-rank {
  flex: none; width: 24px; height: 24px; border-radius: 6px; background: var(--danger-light);
  color: var(--danger); font-weight: 800; font-size: 0.8rem; display: flex; align-items: center; justify-content: center;
}
.rp-loss-info { flex: 1; min-width: 0; }
.rp-loss-stem { font-size: 0.86rem; }
.rp-loss-meta { font-size: 0.72rem; color: var(--text-sub); }
.rp-loss-num { flex: none; font-weight: 800; color: var(--danger); }
.rp-pyramid { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; }
.rp-pyr-row { display: flex; justify-content: center; }
.rp-pyr-block {
  width: 100%; text-align: center; padding: 9px 6px; border-radius: 8px; font-size: 0.8rem; font-weight: 700;
  background: #eef1f6; color: var(--text-sub);
}
.rp-pyr-block.good { background: var(--success-light); color: var(--success); }
.rp-pyr-block.mid { background: var(--warn-light); color: var(--warn); }
.rp-pyr-block.bad { background: var(--danger-light); color: var(--danger); }
.rp-pyr-block.na { background: #f5f6f8; color: #b6bcc6; }
.rp-diag-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.rp-diag-card { border-radius: 10px; padding: 12px; }
.rp-diag-card.good { background: var(--success-light); }
.rp-diag-card.bad { background: var(--danger-light); }
.rp-diag-h { font-weight: 800; font-size: 0.92rem; margin-bottom: 6px; }
.rp-diag-item { font-size: 0.82rem; margin: 4px 0; line-height: 1.55; }
.rp-tip { display: flex; gap: 10px; padding: 9px 4px; border-bottom: 1px dashed var(--border); font-size: 0.88rem; }
.rp-tip:last-of-type { border-bottom: none; }
.rp-tip-idx {
  flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 0.75rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.rp-tip-desc { font-size: 0.8rem; color: var(--text-sub); }
.rp-footer { text-align: center; color: var(--text-sub); font-size: 0.72rem; padding: 10px 0 30px; }
.rp-overall { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rp-overall-score { font-size: 2.4rem; font-weight: 800; color: var(--primary); line-height: 1; }
.rp-overall-score small { font-size: 1rem; color: var(--text-sub); font-weight: 500; }
.rp-overall-sub { font-size: 0.78rem; color: var(--text-sub); margin-top: 6px; }

/* ================= 弱点评测中心 ================= */
.tr-hero { text-align: center; background: linear-gradient(135deg, #c2410c, #f97316); color: #fff; }
.tr-hero.passed { background: linear-gradient(135deg, #14532d, #16a34a); }
.tr-rate { font-size: 2.6rem; font-weight: 800; line-height: 1.1; }
.tr-rate small { font-size: 1.1rem; opacity: 0.8; font-weight: 500; }
.tr-goal { font-size: 0.8rem; opacity: 0.85; margin-top: 2px; }
.tr-hero .progress-bar { background: rgba(255, 255, 255, 0.25); }
.tr-hero .progress-bar > div { background: #fff; }
.tr-status { font-size: 0.85rem; margin-top: 10px; opacity: 0.95; }
.tr-weak { padding: 12px 14px; }
.tr-weak .p-meta, .tr-round .p-meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.76rem; color: var(--text-sub); }
.tr-round { padding: 12px 14px; }

/* ================= 小奥随机测入口卡片 ================= */
.quiz-card { border-left: 4px solid var(--success); background: linear-gradient(135deg, #f0fdf4, #ffffff); }
@media (min-width: 768px) {
  .rp-pos-grid { grid-template-columns: repeat(4, 1fr); }
  .rp-diag-grid { grid-template-columns: 1fr 1fr; }
}

/* ================= 打印 / 导出 PDF ================= */
@media print {
  @page { margin: 10mm; }
  body { background: #fff; padding: 0; }
  .app-header, .tabbar, .no-print, .toast { display: none !important; }
  .app-main { max-width: none; padding: 0; }
  .rp-doc { max-width: none; }
  .rp-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rp-section, .rp-hero { box-shadow: none; border: 1px solid var(--border); break-inside: avoid; }
  .rp-bar-fill, .rp-tag, .rp-pattern, .rp-pyr-block, .rp-diag-card, .rp-loss-rank, .rp-tip-idx, .tr-hero {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

/* ================= 登录页 ================= */
.login-wrap { max-width: 420px; margin: 40px auto; padding: 0 14px; }
.login-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 22px; margin-bottom: 16px; }
.login-logo { text-align: center; margin-bottom: 18px; }
.login-logo img { height: 48px; }
.login-title { text-align: center; font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.login-sub { text-align: center; font-size: 0.82rem; color: var(--text-sub); margin-bottom: 20px; }
.login-contact { background: var(--primary-light); border-radius: 12px; padding: 14px 16px; }
.login-contact h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 8px; color: var(--primary-dark); }
.login-contact-row { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; margin-bottom: 6px; }
.login-contact-row:last-child { margin-bottom: 0; }
.login-contact-row b { flex: none; width: 48px; color: var(--text-sub); font-weight: 600; }
.login-contact-row span { flex: 1; word-break: break-all; }
.login-contact-row .copy-btn { flex: none; font-size: 0.72rem; padding: 2px 8px; border-radius: 6px; background: var(--primary); color: #fff; border: none; cursor: pointer; }
.login-admin-card { background: var(--primary-light); border: 1px dashed var(--primary); }
.login-admin-card .form-item { margin-bottom: 12px; }

/* ================= 桌面端适配 ================= */
@media (min-width: 768px) {
  .app-main { padding-top: 22px; }
  .tabbar { display: none; }
  body { padding-bottom: 24px; }
  .header-nav { display: flex; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .exam-nav { bottom: 0; }
  .modal-mask { align-items: center; }
  .modal-box { border-radius: 16px; max-height: 82vh; }
  .toast { bottom: 40px; }
}

/* 移动端隐藏副标题 */
@media (max-width: 480px) {
  .brand-sub { display: none; }
}
