:root {
  /* 品牌主色 —— 来自晓钟一三真实 Logo（橙红蓝） */
  --ink: #B5462A;          /* 主橙红：书脊、CTA */
  --ink-2: #D9632F;         /* 暖橙 hover */
  --ink-3: #F0A560;         /* 浅橙描边 */
  --gold: #F59E2C;          /* Logo 同款橙（花蕊） */
  --gold-2: #FBBF24;        /* 强调橙黄 */
  --gold-soft: #FFF3DC;     /* 橙色淡底 */
  --red: #DC2626;           /* Logo V 形红 */
  --blue: #2563EB;          /* Logo 人形蓝 */
  --paper: #FFFCF7;         /* 暖白底 */
  --paper-2: #FAF3E8;       /* 米色淡底 */
  --card: #FFFFFF;
  --line: #F0E6D5;          /* 暖灰描边 */
  --line-2: #F8F1E4;
  --text: #3A2D1F;          /* 深棕主文字 */
  --text-2: #6B5840;
  --muted: #97836B;
  --ok: #D97706;            /* 暖色成功 */
  --warn: #F59E0C;
  --err: #DC2626;
  --shadow: 0 1px 2px rgba(184, 90, 30, .05), 0 6px 20px rgba(184, 90, 30, .07);
  --shadow-lg: 0 12px 32px rgba(184, 90, 30, .14);
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--paper);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--ink-2); }

/* ============ 登录页 ============ */
#login {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #FFF8EB 0%, #FFEFD5 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; z-index: 100;
}
.login-box {
  width: 100%; max-width: 940px;
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(184, 90, 30, .16);
  display: grid; grid-template-columns: 1.15fr 1fr;
  min-height: 580px;
}
.login-left {
  background:
    radial-gradient(circle at 80% 10%, rgba(251, 191, 36, .22) 0, transparent 50%),
    linear-gradient(160deg, var(--ink) 0%, #D85A28 100%);
  color: #fff; padding: 38px 38px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.login-left::after {
  content: ''; position: absolute; right: -70px; bottom: -70px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(251, 191, 36, .18);
}
.brand-mark { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.brand-logo {
  width: 60px; height: 60px; border-radius: 13px; flex: none;
  background: #fff; padding: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-txt b { display: block; font-size: 17px; letter-spacing: 1.5px; font-weight: 700; }
.brand-txt span { font-size: 11px; opacity: .82; letter-spacing: .5px; }
.login-left h1 { font-size: 30px; margin: 0 0 8px; letter-spacing: 3px; font-weight: 700; }
.slogan { font-size: 16px; color: var(--gold-2); margin: 0 0 4px; letter-spacing: 4px; font-weight: 600; }
.slogan-sub { font-size: 13px; opacity: .88; margin: 0 0 26px; letter-spacing: .5px; }
.lf-list { display: flex; flex-direction: column; gap: 13px; }
.lf-item { display: flex; gap: 12px; align-items: flex-start; }
.lf-ico {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: rgba(255, 255, 255, .18);
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  color: var(--gold-2);
}
.lf-item b { display: block; font-size: 13.5px; }
.lf-item span { font-size: 12px; opacity: .78; line-height: 1.5; }
.login-foot {
  margin-top: auto; padding-top: 22px; font-size: 12.5px;
  opacity: .68; letter-spacing: 1.5px; position: relative; z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.login-right { padding: 44px 42px; display: flex; flex-direction: column; }
.login-h { margin-bottom: 26px; }
.login-h h2 { font-size: 19px; color: var(--ink); letter-spacing: .5px; }
.login-h p { margin-top: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.tabs { display: flex; gap: 6px; background: var(--line-2); padding: 4px; border-radius: 11px; margin-bottom: 26px; }
.tabs button {
  flex: 1; padding: 9px; border: 0; background: transparent;
  border-radius: 8px; font-size: 14px; color: var(--muted); font-weight: 500;
}
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .07); font-weight: 600; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.inp {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 10px; outline: none; background: #FCFBF8;
}
.inp:focus { border-color: var(--ink-3); background: #fff; }
.inp-row { display: flex; gap: 8px; }
.code-btn {
  flex: none; padding: 0 14px; border: 1px solid var(--ink-3);
  background: #fff; color: var(--ink); border-radius: 10px; font-size: 13px;
}
.code-btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  width: 100%; padding: 12px; border: 0; border-radius: 11px;
  background: var(--ink); color: #fff; font-size: 15px; font-weight: 600;
  margin-top: 6px; letter-spacing: 2px;
}
.btn-primary:hover { background: var(--ink-2); }
.demo-tip { margin-top: 16px; font-size: 12px; color: var(--muted); background: var(--gold-soft); padding: 10px 12px; border-radius: 9px; line-height: 1.7; }

/* ============ 应用骨架 ============ */
#app { display: none; min-height: 100vh; }
#app.on { display: flex; }
.sidebar {
  width: 224px; flex: none;
  background: linear-gradient(180deg, var(--ink) 0%, #C4431F 100%);
  color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.logo {
  display: flex; align-items: center; gap: 11px; padding: 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.logo-img {
  width: 40px; height: 40px; border-radius: 10px; background: #fff;
  padding: 3px; flex: none;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .14);
}
.logo-img img { width: 100%; height: 100%; object-fit: contain; }
.logo b { display: block; font-size: 14px; letter-spacing: .8px; font-weight: 700; }
.logo span { font-size: 10.5px; opacity: .7; letter-spacing: .3px; }
.nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.nav-group { font-size: 10.5px; opacity: .42; padding: 12px 10px 6px; letter-spacing: 1px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border-radius: 9px; color: rgba(255, 255, 255, .76); font-size: 13.5px;
  text-decoration: none; margin-bottom: 2px; cursor: pointer;
}
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.on { background: var(--gold-2); color: #3B2606; font-weight: 600; }
.nav a i { font-style: normal; width: 17px; text-align: center; opacity: .9; }
.side-foot { padding: 12px 14px; border-top: 1px solid rgba(255, 255, 255, .09); display: flex; align-items: center; gap: 9px; }
.avatar {
  width: 31px; height: 31px; border-radius: 50%; background: rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center; font-size: 13px; flex: none;
}
.side-foot .nm { font-size: 12.5px; }
.side-foot .rl { font-size: 10.5px; opacity: .58; }
.side-foot .out {
  margin-left: auto; background: transparent; border: 1px solid rgba(255, 255, 255, .22);
  color: rgba(255, 255, 255, .8); border-radius: 7px; padding: 4px 9px; font-size: 11.5px;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  padding: 16px 26px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: sticky; top: 0; z-index: 10;
}
.topbar h2 { margin: 0; font-size: 18px; font-weight: 600; }
.topbar .sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.topbar .right { display: flex; gap: 8px; align-items: center; }
.content { padding: 22px 26px 50px; }

/* ============ 通用组件 ============ */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.card-h h3 { margin: 0; font-size: 15px; font-weight: 600; }
.card-h .hint { font-size: 12px; color: var(--muted); }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.stat .k { font-size: 12px; color: var(--muted); }
.stat .v { font-size: 25px; font-weight: 650; margin-top: 3px; letter-spacing: -.5px; }
.stat .u { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 3px; }
.stat .d { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.btn {
  padding: 7px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font-size: 13px;
}
.btn:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-pri { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-pri:hover { background: var(--ink-2); color: #fff; }
.btn-sm { padding: 4px 9px; font-size: 12px; border-radius: 7px; }
.btn-gold { background: var(--gold-2); border-color: var(--gold-2); color: #3B2606; font-weight: 600; }
.btn-danger { color: var(--err); border-color: #E8C4BF; }

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 11.5px; background: var(--line-2); color: var(--muted);
}
.tag-lv { background: var(--ink); color: #fff; font-weight: 600; letter-spacing: .5px; }
.tag-term { background: var(--gold-soft); color: #8A5F14; font-weight: 600; }
.tag-ok { background: #E4F1EA; color: var(--ok); }
.tag-warn { background: #FBF0DC; color: #8A5F14; }
.tag-err { background: #F7E4E1; color: var(--err); }
.tag-sub { background: #EFF3F1; color: #4A6B5D; font-size: 11px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; padding: 9px 10px; font-size: 12px; color: var(--muted);
  font-weight: 500; border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tbody tr:hover { background: #FCFBF8; }
.empty { text-align: center; padding: 46px 20px; color: var(--muted); font-size: 13.5px; }

.bar { height: 7px; background: var(--line-2); border-radius: 20px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ink-3), var(--gold-2)); border-radius: 20px; }

.filters { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .inp, .filters select { padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.filters .inp { min-width: 190px; }

/* 课程卡片 */
.course-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: .16s;
  display: flex; flex-direction: column;
}
.course-card:hover { transform: translateY(-2px); box-shadow: 0 8px 26px rgba(184, 90, 30, .15); }
.cc-top { height: 88px; position: relative; padding: 13px 15px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.cc-lv { font-size: 19px; font-weight: 700; letter-spacing: 1px; }
.cc-sl { font-size: 11.5px; opacity: .88; }
.cc-term {
  position: absolute; right: 12px; top: 12px; background: rgba(255, 255, 255, .23);
  padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
}
.cc-body { padding: 13px 15px 15px; flex: 1; display: flex; flex-direction: column; }
.cc-title { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.cc-meta { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.cc-subs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 11px; }
.cc-prog { margin-top: auto; }
.cc-prow { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }

/* 书单 */
.book-card {
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  padding: 13px 14px; box-shadow: var(--shadow); display: flex; gap: 12px;
}
.bk-cover {
  width: 42px; height: 58px; border-radius: 6px; flex: none; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
  font-weight: 600; writing-mode: vertical-rl; letter-spacing: 1px; padding: 4px;
  overflow: hidden;
}
.bk-main { min-width: 0; flex: 1; }
.bk-title { font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.bk-meta { font-size: 11.5px; color: var(--muted); }
.bk-tags { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }

/* 课时列表 */
.lesson {
  display: flex; align-items: center; gap: 13px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff; margin-bottom: 9px;
}
.lesson:hover { border-color: var(--ink-3); }
.ls-no {
  width: 42px; height: 42px; border-radius: 10px; flex: none; background: var(--gold-soft);
  color: #8A5F14; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.ls-no.done { background: #E4F1EA; color: var(--ok); }
.ls-main { flex: 1; min-width: 0; }
.ls-title { font-size: 13.5px; font-weight: 500; margin-bottom: 3px; }
.ls-meta { font-size: 11.5px; color: var(--muted); display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }

/* 弹窗 */
.mask {
  position: fixed; inset: 0; background: rgba(27, 40, 34, .42);
  display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px;
}
.modal {
  background: #fff; border-radius: 15px; width: 100%; max-width: 560px;
  max-height: 86vh; overflow: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
}
.modal-w { max-width: 820px; }
.modal-h { padding: 17px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-h b { font-size: 15px; }
.modal-b { padding: 20px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 9px; }
.mfield { margin-bottom: 13px; }
.mfield label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }
.mfield .inp, .mfield select, .mfield textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #FCFBF8;
}
.mfield textarea { min-height: 68px; resize: vertical; }
.mrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.close-x { background: none; border: 0; font-size: 20px; color: var(--muted); line-height: 1; }

/* 提示 */
#toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; }
.toast-item {
  background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 10px;
  margin-bottom: 8px; font-size: 13.5px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  animation: slideDown .22s ease;
}
.toast-item.err { background: var(--err); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* 能力雷达 */
.radar-wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.radar-legend { flex: 1; min-width: 220px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 16px; }
.rl-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.rl-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rl-val { margin-left: auto; font-weight: 600; font-size: 12.5px; }

/* 学科地图 */
.subj-map { display: flex; flex-wrap: wrap; gap: 7px; }
.subj-chip { padding: 5px 12px; border-radius: 20px; font-size: 12.5px; color: #fff; font-weight: 500; }

/* 进度环 */
.ring { display: flex; align-items: center; gap: 16px; }

.hero {
  background:
    radial-gradient(circle at 90% 10%, rgba(251, 191, 36, .28) 0, transparent 60%),
    linear-gradient(135deg, var(--ink) 0%, #D85A28 100%);
  color: #fff; border-radius: var(--radius); padding: 22px 24px; position: relative; overflow: hidden;
  box-shadow: 0 8px 24px rgba(184, 90, 30, .18);
}
.hero::after {
  content: ''; position: absolute; right: -50px; top: -50px; width: 180px; height: 180px;
  border-radius: 50%; background: rgba(251, 191, 36, .2);
}
.hero-k { font-size: 12.5px; opacity: .75; }
.hero-v { font-size: 27px; font-weight: 650; margin: 4px 0 2px; letter-spacing: -.5px; }
.hero-s { font-size: 12.5px; opacity: .8; }
.hero-row { display: flex; gap: 30px; margin-top: 16px; position: relative; z-index: 1; flex-wrap: wrap; }
.hero-row .hi-k { font-size: 11.5px; opacity: .7; }
.hero-row .hi-v { font-size: 17px; font-weight: 600; }

.two-col { display: grid; grid-template-columns: 320px 1fr; gap: 16px; align-items: start; }

/* ============ 阅读能力测试 ============ */
/* 考试列表 */
.exam-item {
  display: flex; align-items: center; gap: 14px; padding: 15px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 11px;
}
.exam-item:hover { border-color: var(--ink-3); }
.exam-ico {
  width: 46px; height: 46px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, var(--ink), #D85A28); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700;
}
.exam-main { flex: 1; min-width: 0; }
.exam-title { font-size: 14.5px; font-weight: 600; }
.exam-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* 介绍页 */
.exam-banner {
  background: radial-gradient(circle at 85% 15%, rgba(251, 191, 36, .26) 0, transparent 55%),
    linear-gradient(135deg, var(--ink) 0%, #D85A28 100%);
  color: #fff; border-radius: 12px; padding: 24px 26px; margin-bottom: 16px;
}
.exam-banner-t { font-size: 20px; font-weight: 700; letter-spacing: 1px; }
.exam-banner-s { font-size: 12.5px; opacity: .85; margin-top: 4px; letter-spacing: 3px; }
.exam-rules { display: flex; gap: 12px; margin-bottom: 14px; }
.rule {
  flex: 1; text-align: center; padding: 14px 8px; background: var(--paper-2);
  border-radius: 11px; border: 1px solid var(--line);
}
.rule b { display: block; font-size: 22px; color: var(--ink); }
.rule span { font-size: 12px; color: var(--muted); }
.exam-note { font-size: 13px; color: var(--text-2); line-height: 1.8; }

/* 作答页 */
.quiz-shell { max-width: 760px; margin: 0 auto; }
.quiz-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; flex-wrap: wrap; }
.quiz-title { font-size: 15px; font-weight: 600; }
.quiz-count { font-size: 13px; color: var(--muted); }
.quiz-count b { color: var(--ink); font-size: 16px; }
.q-tags { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.q-stem { font-size: 15px; line-height: 1.9; margin-bottom: 18px; color: var(--text); }
.q-opts { display: flex; flex-direction: column; gap: 10px; }
.q-opt {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px;
  border: 1.5px solid var(--line); border-radius: 11px; cursor: pointer; transition: .14s; background: #fff;
}
.q-opt:hover { border-color: var(--ink-3); background: #FFFCF7; }
.q-opt.on { border-color: var(--ink); background: var(--gold-soft); }

/* L1 等带读题音频的题：在题目上方显眼的播放器 */
.quiz-audio {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #FFF4E8 0%, #FFE9D2 100%);
  border: 1.5px solid #F59E2C;
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(245,158,44,0.12);
}
.quiz-audio .qa-btn {
  background: var(--brand); color: #fff; border: none; border-radius: 999px;
  padding: 10px 22px; font-size: 15px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 6px rgba(181,70,42,0.25);
}
.quiz-audio .qa-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(181,70,42,0.32); }
.quiz-audio .qa-btn:active { transform: translateY(0); }
.quiz-audio .qa-btn[data-playing="1"] { background: #C77B3D; }
.quiz-audio .qa-hint { font-size: 13px; color: var(--muted); }
.quiz-audio audio { display: none; }
/* 移动端：放大按钮 + hint更显眼 */
@media (max-width: 720px) {
  .quiz-audio { flex-wrap: wrap; padding: 12px 14px; }
  .quiz-audio .qa-btn { padding: 12px 20px; font-size: 16px; flex: 1; justify-content: center; }
  .quiz-audio .qa-hint { flex: 1 1 100%; text-align: center; font-size: 12px; margin-top: 2px; }
}
.q-key {
  width: 28px; height: 28px; border-radius: 8px; flex: none; background: var(--paper-2);
  color: var(--text-2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.q-opt.on .q-key { background: var(--ink); color: #fff; }
.q-opt-t { flex: 1; font-size: 14px; line-height: 1.6; }
.q-check { color: var(--ink); font-weight: 700; font-size: 15px; }

/* 选项里带图片（低年级常见题型） */
.q-opt.has-img { align-items: flex-start; padding: 12px 14px; }
.q-opt-img {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-2);
  border-radius: 8px;
  padding: 4px;
  max-width: 168px;
}
.q-opt-img img {
  display: block;
  max-width: 160px;
  max-height: 110px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  background: #fff;
}
.q-opt-img-empty { /* 仅文字无图，保持左对齐 */
  display: inline-block;
}

/* 题干配图（图题题干看图回答） */
.q-stem-imgs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 14px;
  padding: 12px;
  background: var(--paper-2);
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.q-stem-imgs .stem-img {
  flex: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  display: flex; align-items: center; justify-content: center;
}
.q-stem-imgs .stem-img img {
  display: block;
  max-width: 220px;
  max-height: 140px;
  width: auto; height: auto;
  object-fit: contain;
}
.q-stem-imgs-label {
  font-size: 12px; color: var(--muted); margin-bottom: 6px;
  display: flex; align-items: center; gap: 4px;
}
.q-stem-imgs-label:before {
  content: "🖼"; font-size: 14px;
}

/* 错题回看里的图片选项 */
.rec-opt.has-img { display: flex; align-items: flex-start; gap: 10px; }
.rec-opt.has-img .rec-opt-img {
  max-width: 140px; max-height: 100px;
  background: #fff; border-radius: 6px; padding: 4px;
}
.rec-opt.has-img .rec-opt-img img { display: block; max-width: 100%; max-height: 92px; object-fit: contain; }

/* PDF 模式下放大图片选项 */
.pdf-mode .q-opt-img img { max-width: 200px; max-height: 130px; }
.pdf-mode .q-stem-imgs .stem-img img { max-width: 280px; max-height: 180px; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.quiz-nav .btn { padding: 9px 24px; font-size: 14px; }

/* 报告页 */
.report-hero {
  background: radial-gradient(circle at 88% 8%, rgba(251, 191, 36, .25) 0, transparent 55%),
    linear-gradient(135deg, var(--ink) 0%, #D85A28 100%);
  color: #fff; border: 0;
}
.rh-brand { font-size: 12px; opacity: .8; letter-spacing: 2px; }
.rh-title { font-size: 20px; font-weight: 700; margin: 8px 0 20px; letter-spacing: 1px; }
.rh-score-row { display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.rh-score { font-size: 58px; font-weight: 700; line-height: 1; }
.rh-score span { font-size: 20px; font-weight: 400; opacity: .7; margin-left: 4px; }
.rh-meta { display: flex; gap: 30px; flex-wrap: wrap; }
.rh-meta div span { display: block; font-size: 11.5px; opacity: .7; }
.rh-meta div b { font-size: 18px; }
.rh-info { margin-top: 20px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .22); font-size: 12px; opacity: .82; display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.rh-info span { white-space: nowrap; }
.rh-pdf {
  margin-left: auto;
  background: #fff; color: var(--ink);
  border: 0; border-radius: 999px;
  padding: 7px 18px; font-size: 13px; font-weight: 600;
  letter-spacing: 1px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.rh-pdf:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 0, 0, .22); }
.rh-pdf:active { transform: translateY(0); }
.sum-overall { font-size: 13.5px; line-height: 1.9; color: var(--text-2); }
.sum-parts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* 分档评语 */
.grade-badge { color: #fff; font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 999px; letter-spacing: 1px; }
.sum-block { display: flex; gap: 12px; margin-top: 14px; }
.sum-block-ico {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700;
}
.sum-block-body { flex: 1; }
.sum-block-body b { display: block; font-size: 13px; color: var(--text); margin-bottom: 3px; }
.sum-block-body p { margin: 0; font-size: 13px; line-height: 1.85; color: var(--text-2); }
.sum-tags { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }

/* 图表容器 */
.chart-box { padding: 6px 0 2px; }
.chart-legend { display: flex; gap: 18px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.chart-legend span { font-size: 12px; color: var(--muted); }

/* 逐题记录 */
.rec { border: 1px solid var(--line); border-radius: 11px; margin-bottom: 9px; background: #fff; overflow: hidden; cursor: pointer; }
.rec:hover { border-color: var(--ink-3); }
.rec-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; }
.rec-ico {
  width: 24px; height: 24px; border-radius: 50%; flex: none; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.rec-ico.ok { background: var(--ok); }
.rec-ico.bad { background: var(--err); }
.rec-no { font-weight: 700; color: var(--text-2); flex: none; }
.rec-stem { flex: 1; min-width: 0; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-tags { display: flex; gap: 5px; flex: none; }
.rec-arrow { color: var(--muted); flex: none; font-size: 13px; }
.rec-body { border-top: 1px solid var(--line-2); padding: 14px 16px; background: #FCFBF8; }
.rec-stem-full { font-size: 14px; line-height: 1.9; margin-bottom: 12px; color: var(--text); }
.rec-opts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.rec-opt { font-size: 13px; padding: 7px 11px; border-radius: 8px; color: var(--text-2); }
.rec-opt.c { background: #E4F1EA; color: #1B4D3E; }
.rec-opt.w { background: #F7E4E1; color: var(--err); }
.rec-ans { display: flex; gap: 22px; font-size: 13px; margin-bottom: 10px; flex-wrap: wrap; }
.rec-ana { font-size: 12.5px; line-height: 1.85; color: var(--text-2); background: var(--paper-2); border-radius: 9px; padding: 11px 13px; }

/* ============ 错题本 ============ */
.wb-summary {
  background: var(--paper-2); color: var(--text-2);
  border-radius: 11px; padding: 13px 16px;
  font-size: 13px; line-height: 1.85;
  margin-bottom: 14px;
  border-left: 4px solid var(--ink);
}
.wb-summary b { color: var(--ink); font-size: 14px; }
.wb-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #FFFDF9;
  padding: 16px 18px 18px;
  margin-bottom: 14px;
}
.wb-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 11px; margin-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  flex-wrap: wrap;
}
.wb-no {
  font-size: 14px; font-weight: 700; color: #fff;
  background: var(--ink); padding: 4px 12px; border-radius: 999px;
  letter-spacing: 1px;
}
.wb-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.wb-tags .tag { font-size: 11.5px; }
.wb-score {
  margin-left: auto; font-size: 12.5px; color: var(--muted);
}
.wb-score b { color: var(--err); font-size: 16px; margin-right: 2px; font-weight: 700; }
.wb-stem {
  font-size: 14px; line-height: 1.9; color: var(--text);
  background: var(--paper-2); border-radius: 9px;
  padding: 11px 14px; margin-bottom: 12px;
}
.wb-ans {
  display: flex; gap: 26px; flex-wrap: wrap;
  font-size: 13px; margin-bottom: 12px; padding: 9px 12px;
  background: #FCFBF8; border-radius: 8px;
}
.wb-ans b { font-size: 14px; padding: 0 4px; }
.wb-row {
  display: flex; gap: 11px;
  padding: 11px 13px; border-radius: 9px;
  margin-top: 9px;
}
.wb-row.wb-reason { background: #F7E4E1; }
.wb-row.wb-hint { background: #E4F1EA; }

/* 答对题清单 */
.ck-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ck-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #FFFDF9;
  flex-wrap: wrap;
}
.ck-ico {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--ok); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 700; flex: none;
}
.ck-no { font-size: 13px; font-weight: 700; color: var(--ink); flex: none; }
.ck-stem { font-size: 13px; color: var(--text); flex: 1 1 240px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-tags { display: flex; gap: 6px; flex-wrap: wrap; flex: none; }
.ck-tags .tag { font-size: 11.5px; }

/* PDF 模式：截图前临时注入，字号 / 行高 / 卡片 padding 全面加大，方便打印和下载查看 */
.pdf-mode { font-size: 16px; line-height: 1.85; }
.pdf-mode .card { padding: 22px 24px; margin-bottom: 16px; }
.pdf-mode .card-h h3 { font-size: 19px; }
.pdf-mode .card-h .hint { font-size: 13px; }
.pdf-mode .sum-overall { font-size: 16px; line-height: 1.9; }
.pdf-mode .sum-block { padding: 14px 16px; }
.pdf-mode .sum-block-body p { font-size: 14.5px; line-height: 1.85; }
.pdf-mode .sum-block-body b { font-size: 14.5px; }
.pdf-mode .wb-summary { font-size: 14.5px; line-height: 1.95; padding: 16px 20px; }
.pdf-mode .wb-summary b { font-size: 17px; }
.pdf-mode .wb-card { padding: 20px 22px; }
.pdf-mode .wb-no { font-size: 15px; padding: 5px 14px; }
.pdf-mode .wb-tags .tag { font-size: 13px; padding: 3px 10px; }
.pdf-mode .wb-score { font-size: 14px; }
.pdf-mode .wb-score b { font-size: 19px; }
.pdf-mode .wb-stem { font-size: 15px; line-height: 2; padding: 14px 18px; }
.pdf-mode .rec-opts { gap: 8px; }
.pdf-mode .rec-opt { font-size: 14px; padding: 9px 14px; line-height: 1.8; }
.pdf-mode .wb-ans { font-size: 14px; padding: 12px 16px; }
.pdf-mode .wb-row { padding: 14px 16px; gap: 14px; }
.pdf-mode .wb-body p { font-size: 14px; line-height: 1.85; }
.pdf-mode .wb-body b { font-size: 14.5px; }
.pdf-mode .wb-ico { width: 32px; height: 32px; font-size: 13px; }
.pdf-mode .ck-row { padding: 14px 18px; gap: 14px; }
.pdf-mode .ck-ico { width: 26px; height: 26px; font-size: 13.5px; }
.pdf-mode .ck-no { font-size: 14px; }
.pdf-mode .ck-stem { font-size: 14px; }
.pdf-mode .ck-tags .tag { font-size: 12.5px; padding: 3px 10px; }
.pdf-mode .grade-badge { font-size: 13px; padding: 4px 14px; }
.pdf-mode .rh-brand { font-size: 13px; }
.pdf-mode .rh-title { font-size: 22px; margin: 10px 0 22px; }
.pdf-mode .rh-score { font-size: 64px; }
.pdf-mode .rh-score span { font-size: 22px; }
.pdf-mode .rh-meta div b { font-size: 19px; }
.pdf-mode .rh-meta div span { font-size: 13px; }
.pdf-mode .rh-info { font-size: 13px; margin-top: 22px; padding-top: 16px; }
.pdf-mode table th,
.pdf-mode table td { font-size: 13.5px; padding: 9px 11px; }
.pdf-mode .chart-legend { font-size: 13px; }
.pdf-mode .chart-box { padding: 8px 6px; }
/* 雷达图：HTML 标签层覆盖在 SVG 上 */
.radar-overlap { position: relative; width: 100%; max-width: 340px; margin: 0 auto; }
.radar-overlap > svg { display: block; }
.radar-lab {
  position: absolute; font-size: 12px; color: #97836B;
  line-height: 1; padding: 1px 2px; pointer-events: none;
  transform: translateY(-50%); white-space: nowrap;
}
.radar-legend-hint { font-size: 12px; color: #97836B; margin-top: 6px; text-align: center; }
/* 柱状图：HTML X 轴标签层覆盖在 SVG 底部 */
.hbc-overlap { position: relative; width: 100%; }
.hbc-overlap > svg { display: block; }
.hbc-axis { position: absolute; left: 0; right: 0; bottom: 4px; height: 22px; pointer-events: none; }
.hbc-ax {
  position: absolute; font-size: 11px; color: #6B5840;
  line-height: 1; transform: translateX(-50%); white-space: nowrap;
}
.pdf-mode .radar-lab { font-size: 13px; color: #5C4D38; }
.pdf-mode .hbc-ax { font-size: 13px; color: #5C4D38; }
.wb-ico {
  width: 26px; height: 26px; flex: none; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.wb-body { flex: 1; }
.wb-body b {
  display: block; font-size: 13px; margin-bottom: 3px;
  color: var(--text); font-weight: 700;
}
.wb-body p {
  margin: 0; font-size: 12.5px; line-height: 1.85;
  color: var(--text-2);
}

/* ============ 打印 / PDF 适配 ============ */
@media print {
  @page { size: A4; margin: 12mm; }
  html, body {
    background: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  /* 隐藏侧栏/顶栏/按钮，仅留报告主体 */
  .sidebar, .topbar, .rh-pdf { display: none !important; }
  #app { display: block; }
  .main { width: 100%; }
  .content { padding: 0 !important; max-width: 100% !important; }
  .card {
    box-shadow: none !important;
    border: 1px solid #E5D7BE !important;
    break-inside: avoid; page-break-inside: avoid;
    margin-bottom: 10px !important;
  }
  /* 错题本每张卡片强制不跨页 */
  .wb-card { break-inside: avoid; page-break-inside: avoid; }
  /* 答题记录全部展开 */
  .rec-body { display: block !important; }
  /* 收紧字号与行高，让 PDF 更紧凑 */
  body, .sum-block-body p, .wb-body p { font-size: 11.5px; line-height: 1.7; }
  .rh-score { font-size: 44px; }
  .rh-meta div b { font-size: 15px; }
  .report-hero {
    background: linear-gradient(135deg, #B5462A 0%, #D85A28 100%) !important;
    -webkit-print-color-adjust: exact;
  }
}

@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .login-box { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .sidebar { width: 62px; }
  .logo span, .side-foot .nm, .side-foot .rl, .side-foot .out { display: none; }
  .nav a span { display: none; }
  .content { padding: 16px; }
}

/* ============ 页脚：备案信息（法定展示，勿删） ============ */
/* ICP 备案号必须展示在网站底部并链接工信部；公安联网备案通过后再追加「京公网安备 XXX 号」+ 图标 */
.site-legal {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 3px 10px;
  padding: 16px 20px 20px;
  font-size: 12px; line-height: 1.7;
  color: var(--muted);
  text-align: center;
}
.site-legal a { color: var(--muted); text-decoration: none; }
.site-legal a:hover { color: var(--ink); text-decoration: underline; }
.site-legal .sep { opacity: .4; }
/* 登录页：绝对定位贴底，不影响登录卡片居中 */
#login .site-legal { position: absolute; left: 0; right: 0; bottom: 12px; padding: 0 20px; }
/* 主应用：内容不足一屏时把页脚推到视口底部 */
#app .site-legal { margin-top: auto; }

@media (max-width: 780px) {
  .site-legal { font-size: 11px; gap: 2px 8px; }
  .site-legal .sep { display: none; }
}
