﻿.view-tab .wb-tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 99px;
  background: #b42318;
  color: #fff;
  font: 700 9px/1 var(--mono);
  vertical-align: 1px;
}
.view-tab[aria-selected="true"] .wb-tab-count { background: #ffb86b; color: #172033; }
.chip .wb-chip-count {
  min-width: 17px;
  padding: 1px 5px;
  border-radius: 99px;
  background: var(--paper-2);
  color: var(--muted);
  font: 700 8px/1.5 var(--mono);
}
.chip[aria-pressed="true"] .wb-chip-count { background: rgba(255,255,255,.16); color: #fff; }

.wrongbook-dashboard .exam-metric:first-child::after { background: #b42318; }
.wrongbook-dashboard .exam-metric:nth-child(2)::after { background: #d9480f; }
.wrongbook-dashboard .exam-metric:nth-child(3)::after { background: #0b7a67; }
.wrongbook-dashboard .exam-metric:nth-child(4)::after { background: #2457d6; }

.wrongbook-subject-strip { margin-bottom: 15px; }
.wrongbook-subject-strip .exam-subject-card { min-height: 91px; }
.wrongbook-subject-strip .exam-subject-card small { line-height: 1.45; }

.wrongbook-filter { margin-bottom: 16px; }
.wrongbook-filter .past-search { flex-basis: 330px; }

.wrongbook-card .past-card-stem { -webkit-line-clamp: 3; }
.wrongbook-card .past-card-top .wb-status { margin-left: auto; }
.wb-status {
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 8px;
  font-weight: 700;
  white-space: nowrap;
}
.wb-status.active { color: #b42318; background: #fee4e2; }
.wb-status.corrected { color: #08705d; background: #e2f5ef; }
.wb-status.mastered { color: #2457d6; background: #e9efff; }
.wb-source {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--paper-2);
  color: var(--muted);
  font-size: 8px;
}
.wb-source.manual { color: #7c4a00; background: #fff3d6; }
.wb-choice-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 1px;
}
.wb-choice-chip {
  padding: 2px 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  font: 700 8px var(--mono);
}
.wb-choice-chip.wrong { color: #b42318; background: #fee4e2; border-color: #f6c9c5; }
.wb-choice-chip.correct { color: #08705d; background: #e2f5ef; border-color: #bfe8db; }
.wb-choice-chip.count { color: var(--muted); background: var(--paper); border-color: var(--line); font-weight: 500; }

.wrongbook-detail .exam-detail-top { border-bottom-color: rgba(180,35,24,.12); }
.wb-detail-head-note {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: 0 0 15px;
  padding: 10px 12px;
  border: 1px solid #f4dfb4;
  border-radius: 10px;
  background: #fff9eb;
  color: #8a641f;
  font-size: 10px;
  line-height: 1.65;
}
.wb-detail-head-note b { color: #7c4a00; }
.wb-detail-head-note .wb-status { margin-left: auto; }
.exam-option.prior-wrong {
  border-style: dashed;
  border-color: #eaa9a3;
  background: #fff7f6;
}
.exam-option .option-tag {
  margin-left: auto;
  flex: 0 0 auto;
  align-self: center;
  padding: 2px 6px;
  border-radius: 99px;
  font: 600 8px var(--sans);
  white-space: nowrap;
}
.exam-option .option-tag.wrong { color: #b42318; background: #fee4e2; }
.exam-option .option-tag.correct { color: #08705d; background: #d6f2e8; }
.wb-retry-hint {
  display: grid;
  gap: 4px;
  margin-top: 15px;
  padding: 11px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
}
.wb-retry-hint b { color: var(--ink-2); font-size: 10px; }
.wb-retry-hint span { color: var(--muted); font-size: 10px; line-height: 1.7; }
.wb-review-actions { align-items: center; }
.wb-review-actions .wb-action-note { margin-right: auto; color: var(--muted); font: 8.5px var(--mono); }
.wrongbook-empty {
  display: grid;
  gap: 8px;
  justify-items: start;
  padding: 24px;
}
.wrongbook-empty b { color: var(--ink); font-size: 15px; }
.wrongbook-empty p { margin: 0; max-width: 560px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.wrongbook-empty button { margin-top: 4px; }

@media (max-width: 760px) {
  .wrongbook-filter .past-search { flex-basis: 100%; }
  .wrongbook-detail .exam-stem { font-size: 12px; }
}
