:root {
  color-scheme: light;
  --bg: #f5f8fb;
  --panel: #ffffff;
  --panel-2: #eaf6fd;
  --text: #172533;
  --muted: #667985;
  --line: #d7e4ea;
  --brand: #1f78b7;
  --brand-dark: #145a86;
  --accent: #e85d04;
  --success: #10a779;
  --danger: #d92d20;
  --shadow: 0 8px 24px rgba(20, 69, 104, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
select,
input,
textarea {
  font: inherit;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(31, 120, 183, 0.2);
  outline-offset: 2px;
  border-color: var(--brand);
}

.shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px clamp(14px, 4vw, 28px);
  background: rgba(245, 248, 251, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand strong,
.brand span {
  display: block;
  line-height: 1.2;
}

.brand span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

main {
  padding: 16px clamp(12px, 4vw, 28px) 40px;
}

.toolbar {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.toolbar[hidden] {
  display: none;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.toolbar.registration-mode {
  display: none;
}

.segmented button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.segmented button.active {
  background: var(--brand);
  color: #fff;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(0, 0.85fr) minmax(0, 0.85fr);
  gap: 10px;
}

.bank-set-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 42px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
}

.filter-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.filter-chip.active {
  border-color: var(--brand);
  background: var(--panel-2);
  color: var(--brand-dark);
  font-weight: 700;
}

.searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

select,
input {
  min-height: 42px;
  padding: 0 10px;
}

textarea {
  min-height: 92px;
  padding: 10px;
  resize: vertical;
}

.content {
  display: grid;
  gap: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.auth-page {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: stretch;
  justify-self: center;
  width: 100%;
  max-width: 860px;
  margin: 20px auto 0;
}

.auth-brand-panel {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 420px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.auth-brand-panel img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-brand-panel h1,
.auth-brand-panel p {
  margin: 0;
}

.auth-brand-panel h1 {
  font-size: 28px;
  line-height: 1.2;
}

.auth-brand-panel p {
  margin-top: 8px;
  color: var(--muted);
}

.auth-registration-focus {
  display: grid;
  align-content: center;
  gap: 18px;
  min-height: 420px;
  padding: 24px;
  border: 1px solid rgba(31, 120, 183, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, #eff9ff 0%, #ffffff 100%);
  box-shadow: 0 18px 42px rgba(20, 90, 134, 0.16);
}

.auth-focus-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--brand-dark);
  font-weight: 800;
}

.auth-focus-brand img {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.auth-registration-focus h1,
.auth-registration-focus p {
  margin: 0;
}

.auth-registration-focus h1 {
  font-size: 34px;
  line-height: 1.15;
}

.auth-registration-focus p {
  margin-top: 10px;
  color: #435766;
  font-size: 16px;
  line-height: 1.6;
}

.auth-registration-cta {
  width: 100%;
  min-height: 52px;
  font-size: 17px;
  font-weight: 800;
}

.auth-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.auth-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 8px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff3e7;
  color: #9a3412;
  font-size: 12px;
  font-weight: 700;
}

.auth-form,
.auth-card label {
  display: grid;
}

.auth-form {
  gap: 12px;
}

.auth-error {
  padding: 10px 12px;
  border: 1px solid #f3b5ae;
  border-radius: 8px;
  background: #fff1f1;
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
}

.auth-error[hidden] {
  display: none;
}

.auth-card label {
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.auth-mode-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.auth-mode-toggle button {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.auth-mode-toggle button.active {
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 4px 12px rgba(15, 45, 60, 0.08);
}

.auth-credential {
  display: grid;
  gap: 12px;
}

.auth-credential[hidden] {
  display: none;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 8px;
  align-items: end;
}

.auth-code-row .button {
  width: 118px;
  padding: 0 10px;
}

.auth-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.auth-submit-row,
.auth-support {
  display: grid;
  gap: 8px;
}

.auth-submit-row,
.auth-support {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-submit-row {
  grid-template-columns: 1fr;
}

.auth-support {
  grid-template-columns: 1fr;
  margin-top: 2px;
}

.card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.resume-card {
  display: grid;
  gap: 12px;
}

.resume-card p {
  margin: 8px 0 0;
}

.resume-card h2 {
  margin: 0;
}

.resume-list {
  display: grid;
  gap: 10px;
}

.resume-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.resume-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.resume-item strong {
  display: block;
  line-height: 1.4;
}

.learning-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 12px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #eaf6fd 0%, #ffffff 70%);
}

.overview-copy h1,
.overview-copy p {
  margin: 0;
}

.overview-copy h1 {
  font-size: 28px;
  line-height: 1.2;
}

.overview-copy p {
  margin-top: 8px;
  color: var(--muted);
}

.overview-stats,
.report-metrics,
.review-summary {
  display: grid;
  gap: 8px;
}

.overview-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: center;
}

.overview-stats span,
.report-metrics span,
.review-summary span {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
}

.overview-stats strong,
.report-metrics strong,
.review-summary strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.task-grid-priority {
  grid-template-columns: minmax(0, 1fr);
}

.task-grid-priority .task-card {
  min-height: auto;
}

.task-card {
  display: grid;
  align-content: start;
  min-height: 166px;
}

.task-label {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

.task-card p {
  margin: 8px 0 0;
}

.registration-page {
  display: grid;
  gap: 14px;
}

.registration-hero {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #eaf6fd 0%, #ffffff 72%);
}

.registration-hero h1,
.registration-hero p {
  margin: 0;
}

.registration-hero h1 {
  font-size: 28px;
  line-height: 1.2;
}

.registration-hero p {
  margin-top: 8px;
  color: var(--muted);
}

.registration-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.registration-form {
  display: grid;
  gap: 14px;
}

.registration-info-head {
  margin-top: 4px;
}

.registration-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.registration-materials {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.registration-upload {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 250px;
  padding: 12px;
  border: 1px dashed #9dbdcc;
  border-radius: 8px;
  background: #f7fbfe;
  color: var(--brand-dark);
  cursor: pointer;
  text-align: center;
}

.registration-upload.done {
  border-style: solid;
  background: #effaf5;
  color: #08785c;
}

.registration-upload.previewing {
  border-style: solid;
  background: #fff8ed;
  color: #9a5b00;
}

.registration-upload span {
  color: var(--text);
  font-weight: 700;
}

.registration-upload strong {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.registration-upload img {
  width: 100%;
  height: 148px;
  border-radius: 6px;
  object-fit: cover;
}

.registration-upload-status {
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.registration-upload-prompt {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 124px;
  place-items: center;
  padding: 16px;
  border-radius: 8px;
  background: #eaf6fd;
}

.registration-upload-prompt small {
  max-width: 320px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.registration-upload-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}

.registration-upload-actions .button {
  min-height: 36px;
  padding: 0 10px;
}

.registration-file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
  cursor: pointer;
}

.registration-file-label input {
  display: none;
}

.capture-guide {
  display: grid;
  gap: 14px;
  width: 100%;
  justify-items: center;
}

.capture-guide strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.capture-card-frame {
  position: relative;
  width: min(100%, 230px);
  aspect-ratio: 1.586;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow:
    0 0 0 999px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.capture-card-frame.credential {
  aspect-ratio: 1.32;
}

.capture-person-outline,
.capture-emblem-outline,
.capture-validity-outline,
.capture-document-outline {
  position: absolute;
  pointer-events: none;
}

.capture-person-outline {
  right: 10%;
  bottom: 18%;
  width: 24%;
  height: 48%;
}

.capture-person-outline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 38%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border: 2px dashed rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

.capture-person-outline::after {
  content: "";
  position: absolute;
  right: 6%;
  bottom: 0;
  left: 6%;
  height: 62%;
  border: 2px dashed rgba(255, 255, 255, 0.9);
  border-radius: 48% 48% 18% 18%;
  border-top-color: transparent;
}

.capture-person-outline span {
  position: absolute;
  left: 18%;
  right: 18%;
  top: 35%;
  height: 20%;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.9);
  border-radius: 50%;
}

.capture-emblem-outline {
  left: 44%;
  top: 11%;
  width: 12%;
  aspect-ratio: 1;
  border: 2px dashed rgba(255, 255, 255, 0.86);
  border-radius: 50%;
}

.capture-validity-outline {
  right: 12%;
  bottom: 18%;
  width: 34%;
  height: 24%;
  border-top: 2px dashed rgba(255, 255, 255, 0.72);
  border-bottom: 2px dashed rgba(255, 255, 255, 0.72);
}

.capture-document-outline {
  inset: 12%;
  border: 2px dashed rgba(255, 255, 255, 0.78);
  border-radius: 6px;
}

.registration-camera-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #050f18;
}

.registration-camera-panel {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  color: #fff;
}

.registration-camera-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #050f18;
}

.registration-camera-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.registration-camera-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px 18px calc(120px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.registration-camera-overlay .capture-card-frame {
  width: min(86vw, 620px);
}

.registration-camera-overlay .capture-guide strong {
  font-size: 14px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.registration-camera-copy {
  position: absolute;
  top: calc(18px + env(safe-area-inset-top));
  right: 20px;
  left: 20px;
  z-index: 2;
  display: none;
  gap: 6px;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
  pointer-events: none;
}

.registration-camera-copy strong {
  color: #fff;
  font-size: 17px;
}

.registration-camera-actions {
  position: absolute;
  right: 18px;
  bottom: calc(18px + env(safe-area-inset-bottom));
  left: 18px;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}

.registration-camera-actions .button {
  min-height: 44px;
  border-color: transparent;
  background: transparent;
  color: #fff;
}

.registration-camera-actions .button.primary {
  width: 74px;
  height: 74px;
  min-height: 74px;
  padding: 0;
  border: 4px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: transparent;
  box-shadow:
    inset 0 0 0 4px rgba(5, 15, 24, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.3);
}

.registration-side {
  display: grid;
  gap: 12px;
  position: static;
}

.registration-checks,
.registration-steps {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.registration-checks span,
.registration-steps span {
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}

.registration-checks span.done {
  border-color: #a4d9bf;
  background: #e9fbf4;
  color: #08785c;
  font-weight: 700;
}

.registration-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border-left: 4px solid var(--brand);
}

.registration-status h2,
.registration-status p {
  margin: 0;
}

.registration-status h2 {
  margin-top: 4px;
}

.registration-status.success {
  border-left-color: var(--success);
}

.registration-status.warning {
  border-left-color: var(--accent);
}

.registration-status.danger {
  border-left-color: var(--danger);
}

.registration-status-actions {
  flex: 0 0 auto;
}

.content-section {
  display: grid;
  gap: 12px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.section-head h2,
.section-head p {
  margin: 0;
}

.section-head p {
  margin-top: 5px;
}

.card h2,
.card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.paper-card {
  display: grid;
  align-content: space-between;
  min-height: 154px;
}

.search-results {
  display: grid;
  gap: 10px;
}

.search-result {
  display: grid;
  gap: 10px;
}

.search-result h3 {
  font-size: 16px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--brand-dark);
}

.tag.bank-set {
  background: #fff3e7;
  color: #9a3412;
}

.tag.danger {
  background: #fff1f1;
  color: #b42318;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.button.ghost {
  background: transparent;
}

.button.full {
  width: 100%;
}

.button.danger {
  border-color: #ffd7d2;
  background: #fff4f2;
  color: var(--danger);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.room {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: start;
}

.exam-room {
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 10px;
  width: min(1280px, 100%);
  margin: 0 auto;
}

.question {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.exam-sidebar {
  display: grid;
  align-content: start;
  gap: 10px;
  position: sticky;
  top: 86px;
}

.exam-side-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.exam-sidebar .answer-card {
  position: static;
  max-height: none;
  overflow: visible;
}

.exam-side-panel h3 {
  margin: 0;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: #eaf3f9;
  color: #172533;
  font-size: 15px;
  text-align: center;
}

.exam-profile {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  align-items: start;
}

.exam-profile img {
  width: 74px;
  height: 74px;
  border: 1px solid var(--line);
  border-radius: 4px;
  object-fit: cover;
}

.exam-info-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.exam-info-list div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 30px;
  border-bottom: 1px solid #edf1f3;
}

.exam-info-list div:last-child {
  border-bottom: 0;
}

.exam-info-list dt,
.exam-info-list dd {
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  font-size: 13px;
}

.exam-info-list dt {
  color: var(--muted);
}

.exam-info-list dd {
  color: var(--text);
  overflow-wrap: anywhere;
}

.exam-nav-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 12px 4px;
  color: var(--muted);
  font-size: 12px;
}

.exam-nav-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.exam-legend-swatch {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #fff;
}

.exam-legend-swatch.current {
  border-color: var(--brand);
  background: var(--brand);
}

.exam-legend-swatch.answered {
  border-color: var(--success);
  background: var(--success);
}

.exam-stage {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.exam-titlebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #edf6fb;
}

.exam-titlebar h2 {
  margin: 0;
  color: #172533;
  font-size: 22px;
  line-height: 1.25;
  text-align: center;
}

.exam-clock {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #c0352b;
  font-size: 14px;
  white-space: nowrap;
}

.exam-clock strong {
  min-width: 76px;
  padding: 7px 10px;
  border-radius: 5px;
  background: #59636f;
  color: #fff;
  text-align: center;
}

.exam-section-title {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  color: #273744;
  font-weight: 700;
}

.exam-section-title span:not(:first-child) {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.exam-question-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.exam-question-panel {
  align-content: start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.exam-question-panel:last-child {
  border-bottom: 0;
}

.exam-question-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #273744;
  font-weight: 700;
}

.exam-question-head span + span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.exam-question-panel .stem {
  font-size: 17px;
  line-height: 1.65;
}

.exam-question-panel .options {
  gap: 2px;
}

.exam-question-panel .option {
  min-height: 34px;
  padding: 4px 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
}

.exam-question-panel .option strong {
  width: 24px;
  height: 24px;
  border: 1px solid #a8b3ba;
  background: #fff;
  color: #273744;
  font-size: 13px;
}

.exam-question-panel .option.selected {
  background: var(--panel-2);
  box-shadow: inset 0 0 0 2px var(--brand);
}

.exam-question-panel .option.selected strong {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.exam-footer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 18px 16px 20px;
  border-top: 1px solid var(--line);
}

.exam-footer-actions .button.primary {
  border-color: #d95c40;
  background: #d95c40;
}

.stem {
  font-size: 20px;
  line-height: 1.65;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}

.option.locked {
  cursor: default;
}

.option span {
  min-width: 0;
}

.option strong {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--brand-dark);
}

.option.judge-option strong {
  position: relative;
  border: 1px solid #a8b3ba;
  background: #fff;
  color: transparent;
}

.option.judge-option strong::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
}

.option.selected {
  border-color: var(--brand);
  background: var(--panel-2);
  box-shadow: inset 0 0 0 2px var(--brand);
}

.option.selected strong {
  background: var(--brand);
  color: #fff;
}

.option.option-correct {
  border-color: var(--success);
  background: #e9fbf4;
  box-shadow: inset 0 0 0 2px var(--success);
  color: #08785c;
}

.option.option-wrong {
  border-color: #f04438;
  background: #fff1f1;
  box-shadow: inset 0 0 0 2px #f04438;
  color: #b42318;
}

.option.option-correct strong,
.option.option-wrong strong {
  position: relative;
  border: 0;
  color: transparent;
  font-size: 0;
}

.option.option-correct strong {
  background: var(--success);
}

.option.option-wrong strong {
  background: #f04438;
}

.option.option-correct strong::before,
.option.option-wrong strong::before {
  color: #fff;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
}

.option.option-correct strong::before {
  content: "✓";
}

.option.option-wrong strong::before {
  content: "×";
}

.option.judge-option.selected strong {
  border-color: var(--brand);
  background: #fff;
}

.option.judge-option.selected strong::after {
  background: var(--brand);
}

.option.judge-option.option-correct strong,
.option.judge-option.option-wrong strong {
  background: var(--success);
}

.option.judge-option.option-wrong strong {
  background: #f04438;
}

.option.judge-option.option-correct strong::after,
.option.judge-option.option-wrong strong::after {
  display: none;
}

.result {
  border-left: 4px solid var(--brand);
  background: #f2f9fd;
}

.result.wrong {
  border-left-color: var(--danger);
  background: #fff4f2;
}

.practice-status {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--brand-dark);
  font-weight: 700;
}

.practice-status.success {
  border-color: #a4d9bf;
  background: #e9fbf4;
  color: #08785c;
}

.practice-status.wrong {
  border-color: #ffc4bd;
  background: #fff1f1;
  color: #b42318;
}

.practice-status.pending {
  border-color: #ffd6a9;
  background: #fff7ed;
  color: #9a3412;
}

.practice-note-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.practice-note-panel summary {
  padding: 11px 12px;
  color: var(--brand-dark);
  cursor: pointer;
  font-weight: 700;
}

.practice-note-panel textarea,
.practice-note-panel .actions {
  margin: 0 12px 12px;
  width: calc(100% - 24px);
}

.practice-inline-actions {
  align-items: center;
}

.answer-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
}

.answer-summary strong {
  font-size: inherit;
}

.answer-correct {
  color: var(--success);
}

.answer-wrong {
  color: #f04438;
}

.exam-report,
.exam-review {
  width: min(980px, 100%);
  margin: 0 auto;
}

.report-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 12px;
}

.weakness-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.weakness-list span {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1f1;
  color: #b42318;
  font-weight: 700;
}

.compact-notice {
  margin-top: 12px;
  padding: 14px;
}

.exam-review-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.exam-review-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.exam-review-item p {
  margin: 0;
  color: #344451;
  line-height: 1.65;
}

.state-review-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.state-review-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.state-review-head {
  display: grid;
  gap: 8px;
}

.state-review-head h3 {
  margin-top: 8px;
  font-size: 17px;
  line-height: 1.55;
}

.state-review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.state-review-options .option {
  cursor: default;
}

.state-answer-summary {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--panel-2);
  font-size: 15px;
}

.state-analysis {
  margin: 0;
  color: #344451;
  line-height: 1.65;
}

.review-center {
  display: grid;
  gap: 12px;
}

.review-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.review-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.muted {
  color: var(--muted);
}

.side {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.answer-card {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  overflow: hidden;
}

.answer-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.answer-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
}

.legend-dot.correct {
  border-color: var(--success);
  background: var(--success);
}

.legend-dot.wrong {
  border-color: #f04438;
  background: #f04438;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.answer-grid .button,
.answer-dot {
  aspect-ratio: 1;
  min-height: 36px;
  padding: 0;
}

.exam-answer-grid,
.practice-answer-grid {
  max-height: min(54vh, 560px);
  margin-top: 12px;
  padding-right: 2px;
  overflow: auto;
  overscroll-behavior: contain;
}

.exam-answer-grid {
  grid-template-columns: repeat(10, minmax(0, 1fr));
  max-height: none;
  margin: 8px 12px 12px;
  padding-right: 0;
}

.exam-answer-grid .answer-dot {
  min-height: 26px;
  aspect-ratio: auto;
  border-radius: 4px;
  font-size: 12px;
}

.answer-dot {
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}

.answer-dot.answered {
  border-color: #a4d9bf;
  background: #e9fbf4;
  color: #08785c;
}

.answer-dot.correct {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.answer-dot.wrong {
  border-color: #f04438;
  background: #f04438;
  color: #fff;
}

.answer-dot.unanswered.current {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.answer-dot.current {
  box-shadow: 0 0 0 2px rgba(31, 120, 183, 0.2);
}

.answer-dot.current::after {
  content: "当前";
  position: absolute;
  right: 50%;
  bottom: -12px;
  transform: translateX(50%);
  z-index: 1;
  padding: 1px 5px;
  border-radius: 4px;
  background: #102027;
  color: #fff;
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}

.answer-card-summary,
.answer-card-actions,
.practice-summary {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.answer-card-summary,
.practice-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  color: var(--muted);
  font-size: 13px;
}

.practice-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.answer-card-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-answer-bar,
.sheet-backdrop {
  display: none;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.sheet-head h3 {
  margin: 0;
}

.practice-report {
  display: grid;
  gap: 12px;
}

.empty,
.notice {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  text-align: center;
}

.empty-mark {
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #53a6d7);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 10;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #102027;
  color: #fff;
  box-shadow: var(--shadow);
}

@media (max-width: 760px) {
  main {
    padding-bottom: 94px;
  }

  .topbar {
    align-items: flex-start;
  }

  .auth-page {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .auth-brand-panel {
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    align-items: center;
    min-height: 0;
    padding: 16px;
  }

  .auth-brand-panel img {
    width: 52px;
    height: 52px;
  }

  .auth-brand-panel h1 {
    font-size: 22px;
  }

  .auth-registration-focus {
    min-height: 0;
    padding: 18px;
  }

  .auth-registration-focus h1 {
    font-size: 28px;
  }

  .auth-registration-focus p {
    font-size: 15px;
  }

  .auth-code-row {
    grid-template-columns: 1fr;
  }

  .auth-code-row .button {
    width: 100%;
  }

  .segmented {
    overflow-x: auto;
    grid-template-columns: repeat(5, minmax(72px, 1fr));
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .bank-set-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

  .searchbar {
    grid-template-columns: 1fr;
  }

  .learning-overview,
  .task-grid {
    grid-template-columns: 1fr;
  }

  .overview-stats,
  .report-metrics,
  .review-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .overview-copy h1 {
    font-size: 23px;
  }

  .registration-hero h1 {
    font-size: 23px;
  }

  .registration-layout,
  .form-grid,
  .registration-materials {
    grid-template-columns: 1fr;
  }

  .registration-side {
    position: static;
  }

  .registration-status {
    align-items: stretch;
    flex-direction: column;
  }

  .registration-status-actions .button {
    width: 100%;
  }

  .registration-upload-actions {
    grid-template-columns: 1fr;
  }

  .registration-camera-actions {
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
  }

  .registration-camera-actions .button.primary {
    width: 70px;
    height: 70px;
    min-height: 70px;
  }

  .review-filters {
    grid-template-columns: 1fr;
  }

  .resume-card {
    align-items: stretch;
  }

  .resume-item {
    grid-template-columns: 1fr;
  }

  .resume-item .actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .room {
    grid-template-columns: 1fr;
  }

  .side {
    display: none;
  }

  .exam-room {
    width: 100%;
  }

  .exam-stage {
    order: 1;
  }

  .exam-sidebar {
    order: 2;
    position: static;
    top: auto;
  }

  .exam-titlebar {
    grid-template-columns: 1fr;
  }

  .exam-titlebar h2 {
    font-size: 19px;
    text-align: left;
  }

  .exam-clock {
    justify-content: flex-start;
  }

  .exam-question-grid {
    grid-template-columns: 1fr;
  }

  .answer-card {
    position: static;
    max-height: none;
  }

  .practice-inline-actions {
    display: none;
  }

  .mobile-answer-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    padding: 10px max(12px, env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -8px 24px rgba(20, 69, 104, 0.08);
    backdrop-filter: blur(12px);
  }

  .sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9;
    display: grid;
    align-items: end;
    background: rgba(16, 32, 39, 0.38);
  }

  .answer-sheet-drawer {
    max-height: min(78vh, 640px);
    padding: 14px;
    border-radius: 8px 8px 0 0;
    background: #fff;
    overflow: auto;
  }

  .answer-sheet-drawer .answer-card {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .answer-card-summary,
  .practice-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-answer-grid,
  .practice-answer-grid {
    max-height: 220px;
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .stem {
    font-size: 18px;
  }
}
