/* v49 模拟考试 (full JLPT N2 mock): section bar, exam answer-sheet, timer state.
   Additive only — scoped to .exam-bar / .route-exam, never touches practice. */

/* ---------- exam section bar ---------- */
.exam-bar {
  margin: 4px 0 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f3f7ff 0%, #ffffff 100%);
  border: 1px solid var(--u-line, #e6ebf3);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(31, 107, 255, .07);
}
.exam-bar.hidden { display: none; }

.exam-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.exam-tab {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--u-line, #e6ebf3);
  background: #fff;
  opacity: .72;
  transition: border-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.exam-tab b { font-size: 14px; color: var(--u-ink, #0f172a); letter-spacing: .02em; }
.exam-tab span { font-size: 13px; color: var(--u-ink, #0f172a); font-weight: 600; }
.exam-tab small { font-size: 12px; color: var(--u-muted, #64748b); }
.exam-tab.active {
  opacity: 1;
  border-color: var(--u-blue, #1f6bff);
  box-shadow: 0 6px 18px rgba(31, 107, 255, .14);
  background: linear-gradient(180deg, #f1f6ff 0%, #ffffff 100%);
}
.exam-tab.done { opacity: 1; border-color: #bfe6cf; }
.exam-tab.done b::after { content: " ✓"; color: #16a34a; }

.exam-hint {
  margin: 10px 2px 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--u-muted, #64748b);
}

/* ---------- exam answer sheet (grouped by 問題) ---------- */
.route-exam .answer-sheet {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.exam-sheet-section {
  flex-basis: 100%;
  margin-top: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--u-blue, #1f6bff);
  border-radius: 8px;
  letter-spacing: .02em;
}
.exam-sheet-section:first-child { margin-top: 0; }
.exam-sheet-problem {
  flex-basis: 100%;
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--u-ink, #0f172a);
}
.exam-sheet-problem small { font-weight: 500; color: var(--u-muted, #64748b); margin-left: 4px; }

.exam-sheet-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1.5px solid var(--u-line, #e6ebf3);
  background: #fff;
  color: var(--u-ink, #0f172a);
  font-size: 13px;
  cursor: pointer;
  transition: transform .12s ease, border-color .2s ease, background .2s ease;
}
.exam-sheet-btn:hover { transform: translateY(-1px); border-color: var(--u-blue, #1f6bff); }
.exam-sheet-btn.answered { background: #e8f0ff; border-color: #b9d2ff; color: #1d4ed8; }
.exam-sheet-btn.current { outline: 2px solid var(--u-blue, #1f6bff); outline-offset: 1px; }
.exam-sheet-btn.right { background: #e7f7ed; border-color: #67c98a; color: #15803d; }
.exam-sheet-btn.wrong { background: #fdecec; border-color: #f1a5a5; color: #b91c1c; }
.exam-sheet-btn.blank { background: #f6f7f9; color: #9aa3af; }

/* ---------- timer low-time warning ---------- */
.timer-card.timer-low {
  background: linear-gradient(180deg, #fff1f1 0%, #ffffff 100%) !important;
  border-color: #f3b4b4 !important;
}
.timer-card.timer-low #timerDisplay { color: #dc2626; }

/* ---------- exam result dialog rows ---------- */
.result-dialog .result-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--u-line, #e6ebf3);
  font-size: 14px;
}
.result-dialog .result-row:last-child { border-bottom: none; }
.result-dialog .result-row b { color: var(--u-blue, #1f6bff); }

@media (max-width: 720px) {
  .exam-tabs { grid-template-columns: 1fr; }
  .exam-sheet-btn { width: 34px; height: 34px; }
}

/* ---------- link to the standalone 高频文法专属练习 page ---------- */
.focus-open-page {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 16px;
  padding: 13px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
  color: #fff;
  background: linear-gradient(135deg, #1f6bff, #4f46e5);
  box-shadow: 0 8px 22px rgba(31, 107, 255, .2);
  transition: transform .15s ease, box-shadow .2s ease;
}
.focus-open-page:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(31, 107, 255, .28); }
.focus-open-page small { font-weight: 500; opacity: .9; font-size: 12px; }
