:root {
  --canvas: #e8f2f0;
  --content: #eef6f4;
  --surface: #f5faf8;
  --surface-soft: #eaf3f1;
  --surface-strong: #e2efec;
  --surface-raised: #ffffff;
  --ink: #18221e;
  --ink-secondary: #58655f;
  --ink-tertiary: #77847e;
  --line: #c9ddd8;
  --line-strong: #a9c8c1;
  --brand: #146b5e;
  --brand-pressed: #0e554a;
  --brand-soft: #e8f2ee;
  --info: #426d79;
  --info-soft: #eaf1f3;
  --correct: #2f7655;
  --correct-soft: #e9f4ed;
  --wrong: #b94f43;
  --wrong-soft: #fff0ed;
  --warning: #946323;
  --warning-soft: #fff5e6;
  --focus: #0b62c4;
  --tab-height: calc(66px + env(safe-area-inset-bottom));
  --quiz-footer-height: calc(76px + env(safe-area-inset-bottom));
  --student-bg: var(--canvas);
  --student-surface: var(--surface);
  --student-soft: var(--surface-soft);
  --student-text: var(--ink);
  --student-muted: var(--ink-secondary);
  --student-line: var(--line);
  --student-primary: var(--brand);
  --student-primary-dark: var(--brand-pressed);
  --student-primary-soft: var(--brand-soft);
  --student-amber: var(--warning);
  --student-amber-soft: var(--warning-soft);
  --student-danger: var(--wrong);
  --student-danger-soft: var(--wrong-soft);
  --student-success: var(--correct);
  --student-disabled-bg: var(--surface-strong);
  --student-disabled-text: var(--ink-tertiary);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  min-width: 320px;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: var(--canvas);
  color: var(--ink);
}

body {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open,
body.quiz-screen-active {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
.option:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: none;
}

.student-app {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) var(--tab-height);
  overflow: hidden;
  background: var(--canvas);
}

.student-main {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: var(--content);
}

.student-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--content);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.app-header {
  width: 100%;
  min-height: 56px;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--content);
}

.wordmark {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
}

.wordmark-yaoan {
  color: var(--brand);
  font-size: 17px;
  line-height: 1;
  font-weight: 600;
}

.wordmark-rest {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  font-weight: 500;
  text-overflow: ellipsis;
}

.header-spacer {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}

.header-action,
.icon-button,
.quiz-tool-button {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-secondary);
  box-shadow: none;
}

.header-action .button-icon,
.icon-button .button-icon,
.quiz-tool-button .button-icon {
  width: 21px;
  height: 21px;
}

#homeView {
  overflow: hidden;
}

#homeView:not(.hidden) {
  display: grid;
  grid-template-rows: 56px auto auto;
  align-content: start;
}

.home-focus-card {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 22px 18px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--content);
  box-shadow: none;
}

.section-label,
.page-kicker {
  display: block;
  color: var(--brand);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
}

.subject-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 5px;
}

.home-focus-card h1 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.35;
  font-weight: 600;
}

.practice-status {
  flex: 0 0 auto;
  max-width: 96px;
  padding: 4px 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.practice-status.warning {
  border-color: #e5cfad;
  background: var(--warning-soft);
  color: var(--warning);
}

.practice-status.danger {
  border-color: #ebc0ba;
  background: var(--wrong-soft);
  color: var(--wrong);
}

.home-focus-card > p {
  margin: 7px 0 0;
  color: var(--ink-secondary);
  font-size: 14px;
  line-height: 1.55;
}

.primary-start-btn {
  width: 100%;
  min-height: 60px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 10px 16px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: var(--surface-raised);
  text-align: left;
  box-shadow: none;
}

.primary-start-btn:active {
  border-color: var(--brand-pressed);
  background: var(--brand-pressed);
  transform: none;
}

.primary-start-btn:disabled,
.primary-start-btn.disabled {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--ink-tertiary);
}

.primary-start-btn.is-wrong-locked {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--surface-raised);
}

.primary-start-btn > .button-icon {
  width: 23px;
  height: 23px;
  border: 0;
  background: transparent;
  color: currentColor;
}

.button-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.button-copy strong {
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 600;
}

.button-copy em {
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.4;
  font-style: normal;
  font-weight: 400;
}

.primary-start-btn:disabled .button-copy em,
.primary-start-btn.disabled .button-copy em {
  color: var(--ink-tertiary);
}

.button-arrow {
  width: 9px;
  height: 9px;
  justify-self: end;
  border-top: 1.8px solid currentColor;
  border-right: 1.8px solid currentColor;
  transform: rotate(45deg);
}

.home-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.study-tile {
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
  font-size: 15px;
  font-weight: 500;
}

.study-tile .button-icon {
  width: 21px;
  height: 21px;
}

.study-tile.wrong-action .button-icon {
  color: var(--warning);
}

.study-tile.record-action .button-icon {
  color: var(--info);
}

.practice-area {
  width: min(100%, 680px);
  min-height: 0;
  margin: 0 auto;
  padding: 16px 18px 20px;
  border: 0;
  background: var(--content);
}

.practice-switch-trigger {
  width: 100%;
  min-height: 58px;
  grid-template-columns: 22px minmax(0, 1fr) auto 18px;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.practice-switch-trigger .button-icon {
  width: 21px;
  height: 21px;
  color: var(--brand);
}

.practice-switch-trigger strong {
  font-size: 15px;
  font-weight: 500;
}

.practice-switch-trigger > span:not(.button-icon, .row-chevron) {
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 400;
}

.bank-empty-card {
  min-height: 96px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-secondary);
  box-shadow: none;
}

.student-tabbar {
  position: relative;
  inset: auto;
  transform: none;
  z-index: 20;
  width: 100%;
  max-width: none;
  height: var(--tab-height);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 0 env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  box-shadow: none;
}

.student-tabbar button {
  position: relative;
  min-width: 0;
  min-height: 66px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 5px 12px;
  border: 0;
  background: transparent;
  color: var(--ink-tertiary);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
}

.student-tabbar button .button-icon {
  width: 22px;
  height: 22px;
}

.student-tabbar button.active {
  background: transparent;
  color: var(--brand);
}

.student-tabbar button.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 32px;
  height: 2px;
  transform: translateX(-50%);
  border-radius: 2px;
  background: var(--brand);
}

body.quiz-screen-active .student-app {
  grid-template-rows: minmax(0, 1fr);
}

body.quiz-screen-active .student-tabbar {
  display: none;
}

#quizView.quiz-page {
  height: 100%;
  min-height: 0;
  grid-template-rows: 52px 48px minmax(0, 1fr) var(--quiz-footer-height);
  overflow: hidden;
  background: var(--content);
}

.quiz-page:not(.hidden) {
  display: grid;
}

.quiz-toolbar {
  height: 52px;
  min-height: 52px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  background: var(--content);
}

.quiz-title {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 1px;
  overflow: hidden;
  text-align: center;
}

.quiz-title span {
  width: 100%;
  overflow: hidden;
  color: var(--brand);
  font-size: 11px;
  line-height: 1.15;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiz-title strong {
  width: 100%;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiz-submit-button {
  min-width: 64px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--brand);
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
}

.quiz-submit-button .button-icon {
  width: 19px;
  height: 19px;
}

.question-head {
  --question-progress: 0%;
  height: 48px;
  min-height: 48px;
  display: block;
  padding: 9px 16px 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.question-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.question-progress-meta span {
  color: var(--ink-secondary);
  font-size: 13px;
  line-height: 1.35;
  font-weight: 500;
}

.question-progress-meta em {
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 12px;
  line-height: 1.25;
  font-style: normal;
  font-weight: 500;
}

.progress-track {
  width: 100%;
  height: 2px;
  margin-top: 8px;
  overflow: hidden;
  background: var(--line);
}

.progress-fill {
  width: var(--question-progress);
  height: 100%;
  background: var(--brand);
  transition: width 160ms ease;
}

.quiz-content {
  min-height: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--content);
  -webkit-overflow-scrolling: touch;
}

#quizForm {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

.question-card {
  width: min(100%, 760px);
  min-height: 100%;
  margin: 0 auto;
  padding: 20px 18px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.question-content {
  margin: 0 0 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
  font-size: 19px;
  line-height: 1.55;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.option-list {
  display: grid;
  gap: 12px;
}

.option {
  min-height: 56px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.option:hover {
  border-color: var(--line-strong);
  transform: none;
  box-shadow: none;
}

.option input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.option-key-badge {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--ink-secondary);
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
}

.option-label {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
}

.option-state-icon {
  width: 21px;
  height: 21px;
  color: transparent;
}

.option:has(input:checked),
.option.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.option:has(input:checked) .option-key-badge,
.option.selected .option-key-badge {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--surface-raised);
}

.option:has(input:checked) .option-state-icon,
.option.selected .option-state-icon {
  color: var(--brand);
}

.option.is-correct {
  border-color: var(--correct);
  background: var(--correct-soft);
}

.option.is-correct .option-key-badge {
  border-color: var(--correct);
  background: var(--correct);
  color: var(--surface-raised);
}

.option.is-correct .option-state-icon {
  color: var(--correct);
}

.option.is-incorrect {
  border-color: var(--wrong);
  background: var(--wrong-soft);
}

.option.is-incorrect .option-key-badge {
  border-color: var(--wrong);
  background: var(--wrong);
  color: var(--surface-raised);
}

.option.is-incorrect .option-state-icon {
  color: var(--wrong);
}

.option-state-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrong-feedback {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.wrong-feedback:empty {
  display: none;
}

.wrong-feedback.correct {
  border-color: #b9d7c4;
  background: var(--correct-soft);
  color: var(--correct);
}

.wrong-feedback.incorrect {
  border-color: #ebc0ba;
  background: var(--wrong-soft);
  color: var(--wrong);
}

.analysis-trigger {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

.quiz-nav {
  height: var(--quiz-footer-height);
  min-height: var(--quiz-footer-height);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.quiz-nav .btn {
  width: 100%;
  height: 48px;
  min-height: 48px;
  margin: 0;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: var(--surface-raised);
  box-shadow: none;
}

.quiz-nav .btn.ghost {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.quiz-nav .btn:disabled {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--ink-tertiary);
}

#mineView {
  padding: 0 0 24px;
  background: var(--content);
}

.mine-brand-header {
  position: sticky;
  top: 0;
  z-index: 5;
}

.mine-header,
.mine-info,
.mine-menu,
.logout-panel-btn {
  width: min(calc(100% - 36px), 680px);
  margin-right: auto;
  margin-left: auto;
}

.mine-header {
  padding: 24px 2px 18px;
  border: 0;
  background: transparent;
}

.mine-header h1 {
  margin: 5px 0 0;
  font-size: 25px;
  line-height: 1.35;
  font-weight: 600;
}

.mine-header p {
  margin: 5px 0 0;
  color: var(--ink-secondary);
  font-size: 14px;
}

.mine-info {
  display: grid;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.mine-info > div {
  min-height: 48px;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.mine-info > div:last-child {
  border-bottom: 0;
}

.mine-info span {
  color: var(--ink-secondary);
  font-size: 14px;
}

.mine-info strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.mine-menu {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.mine-menu button,
.settings-row {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.mine-menu .button-icon,
.settings-row .button-icon {
  width: 21px;
  height: 21px;
  color: var(--brand);
}

.mine-menu strong,
.settings-row strong {
  font-size: 15px;
  font-weight: 500;
}

.logout-panel-btn {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 14px;
  border: 1px solid #ebc0ba;
  border-radius: 8px;
  background: var(--wrong-soft);
  color: var(--wrong);
  box-shadow: none;
}

#resultView:not(.hidden) {
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr);
  overflow: hidden;
}

.result-content {
  width: min(100%, 680px);
  min-height: 0;
  margin: 0 auto;
  padding: 28px 18px 32px;
  overflow-y: auto;
}

.result-content h1 {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.35;
  font-weight: 600;
}

.result-score {
  margin-top: 20px;
  color: var(--brand);
  font-size: 48px;
  line-height: 1.1;
  font-weight: 600;
}

.result-content .note {
  margin: 10px 0 0;
  color: var(--ink-secondary);
  font-size: 15px;
  line-height: 1.6;
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.btn,
.primary-start-btn,
.study-tile,
.practice-switch-trigger,
.logout-panel-btn {
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn {
  min-height: 48px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: var(--surface-raised);
  box-shadow: none;
}

.btn.ghost {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.btn.danger {
  border-color: var(--wrong);
  background: var(--wrong);
  color: var(--surface-raised);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(28, 58, 56, 0.36);
  overflow: hidden;
}

.modal-card {
  width: min(100%, 520px);
  max-height: min(88vh, 760px);
  max-height: min(88dvh, 760px);
  padding: 18px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 18px 48px rgba(28, 58, 56, 0.18);
}

.student-record-card,
.record-detail-modal-card {
  height: min(88vh, 760px);
  height: min(88dvh, 760px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

#studentRecordBody,
.record-detail-body {
  min-height: 0;
  overflow-y: auto;
}

.modal-head {
  min-height: 44px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2,
.modal-card > h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
}

.modal-subtitle,
.submit-summary {
  margin: 16px 0 0;
  color: var(--ink-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.submit-summary strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.button-row.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.field input {
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-raised);
  color: var(--ink);
}

.practice-card,
.student-record-item,
.practice-report-item,
.record-detail-item,
.settings-row {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: none;
}

.student-record-summary {
  border-color: var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.record-tip {
  border-color: #e5cfad;
  border-radius: 8px;
  background: var(--warning-soft);
  color: var(--warning);
}

svg.button-icon {
  display: block;
  flex: 0 0 auto;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: currentColor;
  transform: none !important;
  stroke-width: 1.8;
}

svg.button-icon::before,
svg.button-icon::after {
  content: none !important;
}

@media (max-width: 420px) {
  .home-focus-card {
    padding: 18px 16px 16px;
  }

  .practice-area {
    padding: 14px 16px 18px;
  }

  .home-focus-card h1,
  .mine-header h1,
  .result-content h1 {
    font-size: 23px;
  }

  .question-card {
    padding: 16px 14px 20px;
  }

  .question-content {
    margin-bottom: 14px;
    padding: 14px;
    font-size: 18px;
  }

  .option-list {
    gap: 10px;
  }

  .quiz-nav {
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-height: 700px) {
  .home-focus-card {
    padding-top: 14px;
    padding-bottom: 12px;
  }

  .home-focus-card h1 {
    font-size: 21px;
  }

  .home-focus-card > p {
    margin-top: 4px;
    line-height: 1.4;
  }

  .primary-start-btn {
    min-height: 56px;
    margin-top: 12px;
  }

  .study-tile {
    min-height: 52px;
  }

  .practice-area {
    padding-top: 10px;
    padding-bottom: 12px;
  }

  .question-card {
    padding-top: 12px;
    padding-bottom: 14px;
  }

  .question-content {
    margin-bottom: 10px;
    padding: 12px;
    font-size: 17px;
    line-height: 1.45;
  }

  .option-list {
    gap: 8px;
  }

  .option {
    min-height: 50px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* V5 home and mine shell. The quiz grid above remains the functional baseline. */
:root {
  --ink: #152628;
  --muted: #647474;
  --quiet: #8b9997;
  --line: #d8e2df;
  --page: #edf2f1;
  --surface: #fbfcfb;
  --surface-soft: #f4f7f5;
  --teal: #17484b;
  --teal-strong: #103b3e;
  --teal-soft: #dcebe7;
  --amber: #d6a23c;
  --amber-soft: #f5ecd7;
  --green: #2d7a62;
  --red: #b85252;
  --content: var(--page);
  --surface-raised: #ffffff;
  --ink-secondary: var(--muted);
  --ink-tertiary: var(--quiet);
  --brand: var(--teal);
  --brand-pressed: var(--teal-strong);
  --brand-soft: var(--teal-soft);
  --warning: #816229;
  --warning-soft: var(--amber-soft);
  --wrong: var(--red);
  --wrong-soft: #f8e8e5;
}

.v5-home,
.v5-mine {
  width: min(100%, 680px);
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  background: var(--page);
}

#homeView.v5-home:not(.hidden),
#mineView.v5-mine:not(.hidden) {
  display: flex;
  flex-direction: column;
}

.v5-topbar {
  flex: 0 0 58px;
  min-height: 58px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  padding: 0 7px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.v5-topbar > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-topbar > button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--teal);
}

.v5-brand-mark {
  display: grid;
  place-items: center;
  color: var(--teal);
}

.v5-brand-mark,
.v5-topbar .button-icon {
  width: 22px;
  height: 22px;
}

.v5-exam-band {
  flex: 0 0 auto;
  padding: 18px;
  background: var(--teal);
  color: #fff;
}

.v5-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #d7e8e3;
  font-size: 12px;
  font-weight: 700;
}

.v5-kicker .button-icon {
  width: 16px;
  height: 16px;
  color: var(--amber);
}

.v5-exam-band .subject-row {
  margin-top: 10px;
}

.v5-exam-band .subject-row h1 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 800;
}

.v5-exam-band .practice-status {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.v5-exam-band > p {
  margin: 6px 0 0;
  color: #c4dad4;
  font-size: 13px;
  line-height: 1.45;
}

.v5-exam-meta,
.v5-status-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.v5-exam-meta {
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(220, 235, 231, 0.25);
}

.v5-exam-meta > div,
.v5-status-band > div {
  min-width: 0;
  text-align: center;
}

.v5-exam-meta > div + div,
.v5-status-band > div + div {
  border-left: 1px solid var(--line);
}

.v5-exam-meta > div + div {
  border-color: rgba(220, 235, 231, 0.25);
}

.v5-exam-meta strong,
.v5-exam-meta span,
.v5-status-band strong,
.v5-status-band span {
  display: block;
}

.v5-exam-meta strong {
  font-size: 17px;
  line-height: 1.2;
}

.v5-exam-meta span {
  margin-top: 4px;
  color: #b7d0c9;
  font-size: 11px;
}

.v5-exam-band .primary-start-btn {
  min-height: 56px;
  margin-top: 16px;
  border-color: var(--amber);
  background: var(--amber);
  color: #26362f;
}

.v5-exam-band .primary-start-btn:active {
  border-color: #c9922e;
  background: #c9922e;
}

.v5-exam-band .primary-start-btn:disabled,
.v5-exam-band .primary-start-btn.disabled {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.14);
  color: #c4dad4;
}

.v5-exam-band .button-copy em {
  color: rgba(38, 54, 47, 0.72);
}

.v5-exam-band .primary-start-btn:disabled .button-copy em,
.v5-exam-band .primary-start-btn.disabled .button-copy em {
  color: #c4dad4;
}

.v5-status-band {
  flex: 0 0 74px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.v5-status-band > div {
  padding: 0 8px;
}

.v5-status-band > div:first-child {
  padding-left: 0;
}

.v5-status-band > div:last-child {
  padding-right: 0;
}

.v5-status-band strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-status-band span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.v5-learning-actions {
  flex: 1 1 auto;
  min-height: 0;
  padding: 17px 14px 10px;
  overflow: hidden;
}

.v5-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 10px;
}

.v5-section-head h2,
.v5-mine-actions h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 800;
}

.v5-section-head span {
  color: var(--muted);
  font-size: 12px;
}

.v5-action-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.v5-action-list > button {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.v5-action-list > button:last-child {
  border-bottom: 0;
}

.v5-action-list > button:active,
.v5-action-list > button:focus-visible {
  background: var(--surface-soft);
}

.v5-action-list .button-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.v5-action-list .wrong-icon {
  background: #f4e1df;
  color: var(--red);
}

.v5-action-list .record-icon {
  background: var(--teal-soft);
  color: var(--green);
}

.v5-action-list > button > span:nth-child(2) {
  min-width: 0;
}

.v5-action-list strong,
.v5-action-list em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-action-list strong {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 800;
}

.v5-action-list em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-style: normal;
}

.row-chevron {
  width: 9px;
  height: 9px;
  justify-self: end;
  border-top: 1.8px solid var(--quiet);
  border-right: 1.8px solid var(--quiet);
  transform: rotate(45deg);
}

.v5-exam-notice {
  margin-top: 12px;
  border: 1px solid #e5cfad;
  border-radius: 8px;
  background: var(--amber-soft);
  color: #695128;
}

.v5-exam-notice summary {
  min-height: 50px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  cursor: pointer;
  list-style: none;
}

.v5-exam-notice summary::-webkit-details-marker {
  display: none;
}

.v5-exam-notice summary .button-icon {
  width: 19px;
  height: 19px;
  color: var(--amber);
}

.v5-exam-notice summary strong,
.v5-exam-notice summary em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-exam-notice summary strong {
  color: #5a451e;
  font-size: 13px;
}

.v5-exam-notice summary em {
  margin-top: 3px;
  color: #79633b;
  font-size: 11px;
  font-style: normal;
}

.v5-exam-notice p {
  margin: 0;
  padding: 0 13px 12px 44px;
  color: #79633b;
  font-size: 12px;
  line-height: 1.55;
}

.v5-home .practice-area {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
  padding: 0 14px 10px;
  background: transparent;
}

.v5-home .bank-empty-card {
  display: none;
}

.v5-home .practice-switch-trigger:not(.hidden) {
  display: grid;
  min-height: 48px;
  padding: 8px 13px;
}

.v5-mine {
  padding-bottom: 10px;
}

.v5-mine-intro {
  flex: 0 0 auto;
  padding: 19px 18px 17px;
  background: var(--teal);
  color: #fff;
}

.v5-mine-intro > span {
  color: #b9d2cb;
  font-size: 12px;
  font-weight: 700;
}

.v5-mine-intro h1 {
  margin: 8px 0 4px;
  color: #fff;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 800;
}

.v5-mine-intro p {
  margin: 0;
  color: #c4dad4;
  font-size: 13px;
  line-height: 1.45;
}

.v5-learner-strip {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}

.v5-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
}

.v5-avatar .button-icon {
  width: 23px;
  height: 23px;
}

.v5-learner-copy {
  min-width: 0;
}

.v5-learner-copy strong,
.v5-learner-copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-learner-copy strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.35;
}

.v5-learner-copy em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.v5-mine .mine-info,
.v5-mine-actions,
.v5-mine .logout-panel-btn {
  width: calc(100% - 36px);
  margin-right: auto;
  margin-left: auto;
}

.v5-mine .mine-info {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.v5-mine .mine-info > div {
  min-width: 0;
  min-height: 67px;
  padding: 10px 9px;
  border: 0;
  border-right: 1px solid var(--line);
}

.v5-mine .mine-info > div:last-child {
  border-right: 0;
}

.v5-mine .mine-info span,
.v5-mine .mine-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v5-mine .mine-info span {
  color: var(--muted);
  font-size: 11px;
}

.v5-mine .mine-info strong {
  margin-top: 5px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.v5-mine-actions {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 15px;
  overflow: hidden;
}

.v5-mine-actions h2 {
  margin: 0 0 9px;
}

.v5-mine-actions .v5-action-list > button {
  min-height: 64px;
}

.v5-mine .logout-panel-btn {
  flex: 0 0 auto;
  width: calc(100% - 36px);
  min-height: 45px;
  margin-top: 12px;
  border-color: #ebc0ba;
  border-radius: 8px;
  background: var(--wrong-soft);
  color: var(--red);
}

@media (max-width: 380px) {
  .v5-exam-band,
  .v5-status-band,
  .v5-mine-intro,
  .v5-learner-strip {
    padding-right: 14px;
    padding-left: 14px;
  }

  .v5-exam-band .subject-row h1,
  .v5-mine-intro h1 {
    font-size: 22px;
  }

  .v5-learning-actions {
    padding-right: 12px;
    padding-left: 12px;
  }

  .v5-mine .mine-info,
  .v5-mine-actions,
  .v5-mine .logout-panel-btn {
    width: calc(100% - 28px);
  }

  .v5-action-list > button {
    grid-template-columns: 38px minmax(0, 1fr) 14px;
    gap: 9px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .v5-action-list .button-icon {
    width: 36px;
    height: 36px;
  }
}

@media (max-height: 700px) {
  .v5-exam-band {
    padding-top: 13px;
    padding-bottom: 13px;
  }

  .v5-exam-band .subject-row {
    margin-top: 6px;
  }

  .v5-exam-meta {
    margin-top: 11px;
    padding-top: 9px;
  }

  .v5-exam-band .primary-start-btn {
    min-height: 50px;
    margin-top: 11px;
  }

  .v5-status-band {
    flex-basis: 64px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .v5-learning-actions {
    padding-top: 10px;
  }

  .v5-action-list > button {
    min-height: 60px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .v5-exam-notice {
    margin-top: 8px;
  }
}
