/* 学员端公共样式：移动优先 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100vh; background: #f2f5fa; color: #17212f;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px; line-height: 1.65;
}
a { color: #1468d4; text-decoration: none; }
.container { max-width: 720px; margin: 0 auto; padding: 16px; }

/* 顶栏 */
.topbar {
  background: #1468d4; color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10;
}
.topbar .title { font-size: 17px; font-weight: 600; }
.topbar a { color: #fff; font-size: 13px; }

/* 卡片 */
.card { background: #fff; border-radius: 12px; padding: 18px 16px; margin-bottom: 14px;
        box-shadow: 0 2px 10px rgba(23,33,47,.06); }
.card h3 { margin: 0 0 10px; font-size: 16px; }

/* 表单 */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: #687586; margin-bottom: 6px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #dfe5ec; border-radius: 8px;
  font-size: 15px; background: #fff; outline: none;
}
.form-item input:focus, .form-item textarea:focus { border-color: #1468d4; }
.btn {
  display: block; width: 100%; padding: 12px; border: none; border-radius: 8px;
  background: #1468d4; color: #fff; font-size: 16px; cursor: pointer; text-align: center;
}
.btn:active { opacity: .85; }
.btn.ghost { background: #eaf2ff; color: #1468d4; }
.btn.sm { display: inline-block; width: auto; padding: 6px 14px; font-size: 13px; }
.btn[disabled] { opacity: .5; }
.form-msg { text-align: center; font-size: 13px; color: #c73b3b; min-height: 20px; margin: 8px 0; }
.form-msg.ok { color: #147a48; }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; background: #fff;
  display: flex; border-top: 1px solid #e6ebf2; z-index: 10; max-width: 720px; margin: 0 auto;
}
.tabbar a { flex: 1; text-align: center; padding: 8px 0 10px; color: #8a94a6; font-size: 12px; }
.tabbar a.active { color: #1468d4; font-weight: 600; }
.tabbar .ico { display: block; font-size: 18px; line-height: 1.2; }
body.has-tabbar { padding-bottom: 64px; }

/* 题目 */
.q-meta { font-size: 13px; color: #687586; margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.q-tag { background: #eaf2ff; color: #1468d4; border-radius: 4px; padding: 1px 8px; font-size: 12px; }
.q-tag.multi { background: #f2edff; color: #7053ca; }
.q-tag.judge { background: #e9f8ef; color: #147a48; }
.q-stem { font-size: 16px; font-weight: 500; white-space: pre-wrap; margin-bottom: 14px; }
.opt {
  display: block; width: 100%; text-align: left; background: #f7f9fc; border: 1.5px solid #e2e8f0;
  border-radius: 8px; padding: 11px 12px; margin-bottom: 10px; font-size: 15px; cursor: pointer; color: #17212f;
}
.opt.selected { border-color: #1468d4; background: #eaf2ff; }
.opt.right { border-color: #147a48; background: #e9f8ef; }
.opt.wrong { border-color: #c73b3b; background: #fff0f0; }

.feedback { border-radius: 8px; padding: 12px; margin: 12px 0; font-size: 14px; }
.feedback.ok { background: #e9f8ef; color: #147a48; }
.feedback.no { background: #fff0f0; color: #c73b3b; }
.feedback b { display: block; margin-bottom: 4px; }

.progress-bar { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.progress-bar > i { display: block; height: 100%; background: #1468d4; transition: width .2s; }

/* 统计 */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-cell { background: #fff; border-radius: 12px; text-align: center; padding: 14px 6px; }
.stat-cell .num { font-size: 22px; font-weight: 700; color: #1468d4; }
.stat-cell .lbl { font-size: 12px; color: #687586; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.bar-row .name { width: 90px; color: #47536b; text-align: right; flex-shrink: 0; }
.bar-row .track { flex: 1; background: #eef2f7; border-radius: 4px; height: 14px; overflow: hidden; }
.bar-row .track > i { display: block; height: 100%; background: #1468d4; }
.bar-row .val { width: 88px; color: #687586; flex-shrink: 0; }

/* 列表行 */
.row-item { border-bottom: 1px solid #eef2f7; padding: 12px 0; }
.row-item:last-child { border-bottom: none; }
.muted { color: #8a94a6; font-size: 12.5px; }
.pill { border-radius: 10px; padding: 1px 9px; font-size: 12px; }
.pill.ok { background: #e9f8ef; color: #147a48; }
.pill.no { background: #fff0f0; color: #c73b3b; }
.pill.info { background: #eaf2ff; color: #1468d4; }

/* 考试倒计时 */
.timer {
  background: #17212f; color: #fff; border-radius: 8px; padding: 8px 14px;
  font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center;
}
.timer.warn { background: #c73b3b; }

.score-hero { text-align: center; padding: 18px 0 6px; }
.score-hero .big { font-size: 46px; font-weight: 800; }
.score-hero .big.pass { color: #147a48; }
.score-hero .big.fail { color: #c73b3b; }

.pager { display: flex; justify-content: space-between; padding: 6px 0 20px; }
.pager a, .pager span { padding: 6px 14px; background: #fff; border-radius: 8px; font-size: 14px; }
.pager span { color: #b7c0cf; }

/* 成绩单选项行 */
.opt-line { padding: 5px 9px; border-radius: 6px; background: #f7f9fc; font-size: 13.5px; }
.opt-line.right { background: #e9f8ef; color: #147a48; font-weight: 600; }
.opt-line.right::after { content: ' ✓'; }
.opt-line.wrong { background: #fff0f0; color: #c73b3b; }

/* 宽屏与边缘防御修复：html 层同色防画布白边；顶栏限宽与内容对齐 */
html { background: #f2f5fa; }
body { overflow-x: hidden; }
.topbar { max-width: 720px; margin-left: auto; margin-right: auto; }

/* a 标签卡片块级化（修复考试记录页 inline 行盒白缝） */
a.card { display: block; }

/* 我的页四宫格入口（正方形 + 彩色图标底） */
.grid-cells {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.grid-cell {
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  background: #fff; border-radius: 16px;
  color: #17212f; text-decoration: none;
  box-shadow: 0 2px 10px rgba(23, 33, 47, .06);
  transition: transform .1s ease;
}
.grid-cell:active { transform: scale(.96); }
.grid-ico {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1;
}
.grid-cell.t-blue   .grid-ico { background: #eaf2ff; }
.grid-cell.t-red    .grid-ico { background: #fff0f0; }
.grid-cell.t-green  .grid-ico { background: #e9f8ef; }
.grid-cell.t-purple .grid-ico { background: #f2edff; }
.grid-cell .grid-label { font-size: 14px; font-weight: 500; }
