/* 铭学堂练习站 - 移动优先 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
       background: #f5f6f8; margin: 0; color: #26303b; }
#app { max-width: 760px; margin: 0 auto; padding: 0 14px 40px; }
.dim { color: #8a94a0; font-size: 13px; }
.warn { color: #b25e00; font-size: 13px; margin-top: 6px; }

/* 卡片 */
.card { background: #fff; border-radius: 14px; padding: 16px; margin-top: 12px;
        box-shadow: 0 1px 4px rgba(20,30,45,.06); }
h3 { margin: 0 0 10px; font-size: 15px; }

/* 按钮 */
.btn { border: 0; border-radius: 10px; padding: 10px 18px; font-size: 15px;
       cursor: pointer; background: #e8ebf0; color: #26303b; }
.btn.primary { background: #2f6fed; color: #fff; }
.btn.accent  { background: #e8632c; color: #fff; }
.btn.ghost   { background: transparent; color: #2f6fed; padding: 6px 10px; }
.btn.small   { font-size: 13px; }
.btn.block   { width: 100%; margin-top: 12px; }
.btn:disabled { opacity: .45; cursor: default; }
.warn-btn { color: #a33; }

/* 登录 */
.login-wrap { display: flex; justify-content: center; padding-top: 18vh; }
.login-card { width: 100%; max-width: 340px; }
.login-card h1 { font-size: 20px; margin: 0 0 14px; text-align: center; }
.login-msg { color: #c0392b; font-size: 13px; min-height: 18px; }
.login-card input { width: 100%; padding: 10px; border: 1px solid #d0d3d9;
                    border-radius: 8px; font-size: 16px; margin: 8px 0 14px; }

/* 顶栏 */
.topbar { display: flex; align-items: center; gap: 16px; padding: 14px 2px; }
.brand { font-weight: 700; color: #2f6fed; }
.topbar nav { flex: 1; display: flex; gap: 18px; }
.topbar a { color: #5a6572; font-size: 15px; cursor: pointer; padding-bottom: 2px; }
.topbar a.on { color: #2f6fed; border-bottom: 2px solid #2f6fed; font-weight: 600; }
.exam-timer { margin-left: auto; font-variant-numeric: tabular-nums; color: #5a6572; }

/* 首页 */
.banner b { font-size: 18px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-card.wide { grid-column: 1 / -1; }
.mode-card .btn { width: 100%; margin-top: 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.form-grid label { font-size: 13px; color: #5a6572; display: flex; flex-direction: column; gap: 4px; }
select, input[type=number] { padding: 8px; border: 1px solid #d0d3d9; border-radius: 8px;
                             font-size: 14px; background: #fff; width: 100%; }
.session-row { display: flex; align-items: center; gap: 12px; padding: 9px 2px;
               border-bottom: 1px solid #f0f2f5; font-size: 14px; }
.session-row:last-child { border-bottom: 0; }
.session-row .go { margin-left: auto; color: #2f6fed; }
.session-row.link { cursor: pointer; }
.score { margin-left: auto; color: #e8632c; font-weight: 600; }
.foot { text-align: center; margin-top: 24px; }
.foot a { color: #8a94a0; cursor: pointer; text-decoration: underline; }

/* 答题 */
.exam-head { display: flex; justify-content: space-between; padding: 12px 2px 0; font-size: 14px; }
.exam-layout { display: flex; gap: 12px; align-items: flex-start; }
.answer-sheet { width: 130px; flex-shrink: 0; position: sticky; top: 14px; }
.answer-sheet .sheet-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 10px; }
.sheet-cell { padding: 7px 0; border: 1px solid #d0d3d9; border-radius: 6px; background: #fff;
              font-size: 12px; cursor: pointer; }
.sheet-cell.done { background: #2f6fed; color: #fff; border-color: #2f6fed; }
.sheet-cell.cur { outline: 2px solid #26303b; }

.question-card { flex: 1; min-width: 0; }
.q-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.qtype-tag { font-size: 12px; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.qtype-tag.single { background: #e8f0fe; color: #2f6fed; }
.qtype-tag.multiple { background: #fdeee4; color: #e8632c; }
.stem { font-size: 16px; line-height: 1.75; }
.stem .md, .md { line-height: 1.7; word-break: break-word; }
.stem .md p { margin: 0 0 8px; }
.stem .md p:last-child { margin-bottom: 0; }
.figures img { max-width: 100%; border-radius: 8px; margin-top: 10px; background: #fafbfc; }

.options { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.option { display: flex; align-items: baseline; gap: 10px; padding: 10px 12px;
          border: 1.5px solid #e2e6ec; border-radius: 10px; cursor: pointer; }
.option.picked { border-color: #2f6fed; background: #f0f5ff; }
.option.multi.picked { border-color: #e8632c; background: #fdf3ee; }
.opt-mark { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.opt-letter { font-weight: 700; font-size: 15px; color: #26303b; }
.option.picked .opt-letter { color: #2f6fed; }
.option.multi.picked .opt-letter { color: #e8632c; }
.opt-check { color: #1a7f45; font-weight: 700; font-size: 14px; }
.opt-text { flex: 1; font-size: 15px; line-height: 1.6; }
.opt-text .md p { margin: 0; display: inline; }

.q-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

.exam-nav { display: flex; gap: 10px; margin-top: 12px; }
.exam-nav .btn { flex: 1; }
.autosave { font-size: 12px; }

/* 结果 */
.score-card { text-align: center; }
.score-big { font-size: 40px; font-weight: 700; }
.score-pct { color: #e8632c; font-size: 18px; font-weight: 600; }
.verdict-legend { display: flex; justify-content: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.badge { font-size: 12px; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
.badge.correct, .badge.review { background: #e5f6ec; color: #1a7f45; }
.badge.partial { background: #fff6e0; color: #9a6b00; }
.badge.wrong, .badge.wrong_pick, .badge.mastered { background: #fdecec; color: #c0392b; }
.badge.skipped { background: #eef1f4; color: #5a6572; }
.badge.mastered { background: #e5f6ec; color: #1a7f45; }
.verdict-legend .badge { cursor: pointer; opacity: .45; transition: opacity .15s; }
.verdict-legend .badge:hover { opacity: .7; }
.verdict-legend .badge.active { opacity: 1; }
.badge.filter-all { background: #eef1f4; color: #26303b; }
.ans-compare { display: flex; gap: 18px; margin-top: 10px; font-size: 14px; }
.ans-compare b { font-size: 15px; }
.mine { color: #c0392b; }
.mine.ok, .ans-compare .ok { color: #1a7f45; }

/* 结果页选项回顾 */
.options-review { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.opt-review { display: flex; align-items: baseline; gap: 10px; padding: 8px 12px;
              border-radius: 8px; border-left: 4px solid #d0d3d9; background: #fafbfc; }
.opt-review .opt-letter { font-weight: 700; font-size: 15px; flex-shrink: 0; min-width: 18px; }
.opt-review .opt-text { flex: 1; font-size: 14px; line-height: 1.6; }
.opt-review .opt-text .md p { margin: 0; display: inline; }
.opt-review .opt-status { font-size: 16px; font-weight: 700; flex-shrink: 0; margin-left: 4px; }

.opt-review.wrong-pick   { border-left-color: #c0392b; background: #fef5f5; }
.opt-review.wrong-pick   .opt-letter { color: #c0392b; }
.opt-review.wrong-pick   .opt-status { color: #c0392b; }

.opt-review.correct-miss { border-left-color: #e67e22; background: #fef9f0; }
.opt-review.correct-miss .opt-letter { color: #e67e22; }
.opt-review.correct-miss .opt-status { color: #e67e22; }

.opt-review.correct-pick { border-left-color: #1a7f45; background: #f2faf5; }
.opt-review.correct-pick .opt-letter { color: #1a7f45; }
.opt-review.correct-pick .opt-status { color: #1a7f45; }

.opt-review.neutral .opt-letter { color: #5a6572; }
.opt-review.neutral .opt-text   { color: #5a6572; }

.analysis { margin-top: 12px; padding: 12px; background: #f7f9fb; border-radius: 10px;
            font-size: 14px; }

/* 错题本 */
.filter-bar { display: flex; gap: 10px; align-items: center; }
.filter-bar select { width: auto; flex: 1; }
.wrong-meta { display: flex; gap: 12px; align-items: center; margin-top: 10px;
              font-size: 13px; flex-wrap: wrap; }
.wrong-entry .stem { font-size: 14px; }

/* 统计 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat { text-align: center; padding: 14px 6px; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12px; color: #8a94a0; }
.bar-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; }
.bar-label { width: 70px; flex-shrink: 0; }
.bar-track { flex: 1; height: 10px; background: #eef1f4; border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #2f6fed, #e8632c); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
         background: rgba(30,40,55,.92); color: #fff; padding: 10px 22px; border-radius: 10px;
         font-size: 14px; z-index: 99; max-width: 80vw; }
.fade-enter-active, .fade-leave-active { transition: opacity .3s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

/* 桌面加宽 */
@media (min-width: 700px) {
  .options { gap: 12px; }
  .stem { font-size: 17px; }
  .form-grid { grid-template-columns: repeat(5, 1fr); }
}
