/* 灵考易通 H5 v6：系统配色 + 预览稿布局（覆盖 student-v4） */

:root {
  --v6-radius: 14px;
  --v6-radius-sm: 10px;
  --v6-shadow: 0 4px 14px rgba(21, 38, 40, 0.06);
  --v6-green-soft: #e4f2ec;
}

.v6-hidden-topbar {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
}

/* ========== 首页 ========== */
.v6-home {
  background: var(--page);
}

.v6-home-hero {
  flex: 0 0 auto;
  padding: 18px 18px 20px;
  background: linear-gradient(165deg, #1f5a5d 0%, var(--teal) 48%, var(--teal-strong) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.v6-home-hero::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  top: -70px;
  right: -40px;
  pointer-events: none;
}

.v6-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.v6-hello {
  font-size: 13px;
  opacity: 0.9;
  font-weight: 600;
}

.v6-hero-copy h1 {
  margin: 2px 0 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 800;
  color: #fff;
}

.v6-hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 12px;
  opacity: 0.92;
}

.v6-hero-meta .button-icon {
  width: 14px;
  height: 14px;
}

.v6-hero-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--teal);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  cursor: pointer;
}

.v6-hero-avatar .button-icon {
  width: 24px;
  height: 24px;
}

.v6-hero-tip {
  margin: 6px 0 0;
  text-align: right;
  font-size: 11px;
  opacity: 0.7;
  position: relative;
  z-index: 1;
}

.v6-hero-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}

.v6-hero-pills > button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.v6-hero-pills > button:active {
  background: rgba(255, 255, 255, 0.22);
}

.v6-hero-pills > button[data-auth-action="login"] {
  border-color: rgba(214, 162, 60, 0.95);
  background: linear-gradient(145deg, #d6a23c 0%, #c89432 100%);
  color: #26362f;
  box-shadow: 0 6px 14px rgba(16, 59, 62, 0.22);
}

.v6-hero-pills > button[data-auth-action="login"]:active {
  background: linear-gradient(145deg, #c89432 0%, #b9862c 100%);
}

.v6-hero-pills > button[data-auth-action="logout"] {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: none;
}

.v6-hero-pills .button-icon {
  width: 15px;
  height: 15px;
}

.v6-home-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 8px;
  overflow: hidden;
  overflow-x: hidden;
  overflow-y: hidden;
  overscroll-behavior: none;
}

.v6-chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-bottom: 12px;
}

.v6-section-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.v6-subject-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-width: 0;
  padding: 6px 10px 6px 12px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(23, 72, 75, 0.22);
}

.v6-subject-chip > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v6-subject-chip .practice-status {
  flex: 0 0 auto;
  margin: 0;
  padding: 2px 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.v6-home .v6-exam-card {
  flex: 0 0 auto;
  margin: 0;
  padding: 16px;
  border-radius: var(--v6-radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--v6-shadow);
  border: 1px solid rgba(23, 72, 75, 0.06);
}

.v6-home .v6-exam-card .v5-kicker {
  color: var(--teal);
}

.v6-home .v6-exam-card .v5-kicker .button-icon {
  color: var(--amber);
}

.v6-home .v6-exam-card .subject-row h1 {
  color: var(--ink);
  font-size: 20px;
}

.v6-home .v6-exam-card > p {
  color: var(--muted);
}

.v6-home .v6-exam-card .v5-exam-meta {
  border-top-color: var(--line);
}

.v6-home .v6-exam-card .v5-exam-meta > div + div {
  border-left-color: var(--line);
}

.v6-home .v6-exam-card .v5-exam-meta strong {
  color: var(--ink);
}

.v6-home .v6-exam-card .v5-exam-meta span {
  color: var(--muted);
}

.v6-home .v6-exam-card .primary-start-btn {
  border-color: var(--amber);
  background: var(--amber);
  color: #26362f;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(214, 162, 60, 0.28);
}

.v6-home .v6-exam-card .primary-start-btn:active {
  border-color: #c9922e;
  background: #c9922e;
}

.v6-home .v6-exam-card .button-copy em {
  color: rgba(38, 54, 47, 0.72);
}

.v6-home .v6-exam-card .primary-start-btn:disabled,
.v6-home .v6-exam-card .primary-start-btn.disabled {
  border-color: var(--line);
  background: #eef3f2;
  color: var(--quiet);
  box-shadow: none;
}

.v6-home .v6-stats-card {
  flex: 0 0 auto;
  margin-top: 12px;
  padding: 14px 8px;
  border: 0;
  border-radius: var(--v6-radius);
  background: #fff;
  box-shadow: var(--v6-shadow);
}

.v6-home .v6-learning {
  flex: 0 0 auto;
  padding: 16px 0 8px;
  overflow: visible;
}

.v6-home .v6-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.v6-home .v6-action-grid > button {
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px 16px;
  border: 1px solid rgba(21, 38, 40, 0.03);
  border-radius: var(--v6-radius);
  background: #fff;
  box-shadow: var(--v6-shadow);
  text-align: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.v6-home .v6-action-grid > button:last-child {
  border-bottom: 1px solid rgba(21, 38, 40, 0.03);
}

.v6-home .v6-action-grid > button:active,
.v6-home .v6-action-grid > button:focus-visible {
  background: var(--surface-soft);
}

.v6-home .v6-action-grid .button-icon {
  width: 22px;
  height: 22px;
  border-radius: 0;
  background: transparent;
}

.v6-home .v6-action-grid .wrong-icon {
  background: transparent;
  color: var(--red);
}

.v6-home .v6-action-grid .record-icon {
  background: transparent;
  color: var(--green);
}

.v6-home .v6-action-grid > button > span:nth-child(2) {
  width: 100%;
}

.v6-home .v6-action-grid strong {
  font-size: 14px;
  white-space: normal;
}

.v6-home .v6-action-grid em {
  white-space: normal;
}

.v6-home .v6-action-grid .row-chevron {
  display: none;
}

.v6-home .v5-exam-notice {
  margin-top: 12px;
  border-radius: var(--v6-radius-sm);
}

.v6-home .practice-area {
  padding: 0 0 8px;
}

.v6-home .practice-area:not(.hidden) {
  flex: 0 0 auto;
}

.v6-home .practice-area.hidden,
.v6-home .bank-empty-card.hidden {
  display: none !important;
}

.student-tabbar {
  position: relative;
  z-index: 40 !important;
  pointer-events: auto;
}

.v6-home .practice-switch-trigger:not(.hidden) {
  border-radius: var(--v6-radius-sm);
  box-shadow: var(--v6-shadow);
  background: #fff;
}

/* ========== 我的 ========== */
#mineView.v6-mine:not(.hidden) {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  padding-bottom: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
}

#mineView.v6-mine.hidden {
  display: none !important;
}

.v6-mine.v5-mine {
  padding-bottom: 0 !important;
}

.v6-mine .v5-topbar {
  flex: 0 0 auto;
  border-bottom-color: var(--line);
}

.v6-mine .v5-mine-intro {
  flex: 0 0 auto;
  background: linear-gradient(160deg, #1f5a5d, var(--teal) 50%, var(--teal-strong));
  padding: 16px 16px 30px;
}

.v6-mine .v5-learner-strip {
  flex: 0 0 auto;
  width: calc(100% - 24px) !important;
  margin: -20px 12px 0 !important;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--v6-radius) var(--v6-radius) 0 0;
  background: #fff;
  box-shadow: 0 4px 16px rgba(23, 72, 75, 0.1);
  position: relative;
  z-index: 1;
}

.v6-mine .mine-info {
  flex: 0 0 auto;
  width: calc(100% - 24px) !important;
  margin: 0 12px 0 !important;
  padding: 0;
  border: 0;
  border-radius: 0 0 var(--v6-radius) var(--v6-radius);
  background: #fff;
  box-shadow: 0 4px 16px rgba(23, 72, 75, 0.08);
  display: grid !important;
  grid-template-columns: 1fr !important;
}

.v6-mine .mine-info > div {
  min-width: 0;
  min-height: 0 !important;
  display: flex !important;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px !important;
  border-right: 0 !important;
  border-bottom: 1px solid var(--line);
  text-align: left !important;
}

.v6-mine .mine-info > div:last-child {
  border-bottom: 0;
}

.v6-mine .mine-info span,
.v6-mine .mine-info strong {
  display: inline !important;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin: 0 !important;
}

.v6-mine .mine-info span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.v6-mine .mine-info strong {
  flex: 1 1 auto;
  text-align: right;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

.v6-mine .v5-mine-actions {
  flex: 0 0 auto;
  min-height: 0;
  width: calc(100% - 24px) !important;
  margin: 10px 12px 0 !important;
  overflow: hidden !important;
  overscroll-behavior: none;
}

.v6-mine .v5-mine-actions h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.v6-mine-actions .v5-action-list,
.v6-mine .v5-action-list {
  border-radius: var(--v6-radius);
  box-shadow: var(--v6-shadow);
  border-color: transparent;
  overflow: hidden;
}

.v6-mine .v5-action-list > button {
  grid-template-columns: 40px minmax(0, 1fr) 14px;
  align-items: center;
  min-height: 52px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.v6-mine .v5-action-list strong,
.v6-mine .v5-action-list em {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
  overflow-wrap: anywhere;
}

.v6-mine .v5-action-list em {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden !important;
}

.v6-mine .logout-panel-btn {
  flex: 0 0 auto;
  width: calc(100% - 24px) !important;
  margin: auto 12px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  border-radius: 12px;
  min-height: 44px;
  cursor: pointer;
}

/* 我的：短屏密度（与首页 scheduleMineFit 联动） */
#mineView.v6-mine[data-mine-density="cozy"] .v5-mine-intro {
  padding: 14px 14px 26px;
}

#mineView.v6-mine[data-mine-density="cozy"] .v5-mine-intro p {
  display: none;
}

#mineView.v6-mine[data-mine-density="compact"] .v5-mine-intro,
#mineView.v6-mine[data-mine-density="dense"] .v5-mine-intro {
  padding: 10px 12px 22px;
}

#mineView.v6-mine[data-mine-density="compact"] .v5-mine-intro p,
#mineView.v6-mine[data-mine-density="dense"] .v5-mine-intro p {
  display: none;
}

#mineView.v6-mine[data-mine-density="compact"] .v5-mine-intro h1,
#mineView.v6-mine[data-mine-density="dense"] .v5-mine-intro h1 {
  font-size: 20px;
  margin: 4px 0 0;
}

#mineView.v6-mine[data-mine-density="compact"] .v5-learner-strip,
#mineView.v6-mine[data-mine-density="dense"] .v5-learner-strip {
  min-height: 52px;
  padding: 8px 12px;
  margin-top: -16px !important;
}

#mineView.v6-mine[data-mine-density="compact"] .mine-info > div,
#mineView.v6-mine[data-mine-density="dense"] .mine-info > div {
  padding: 8px 12px !important;
}

#mineView.v6-mine[data-mine-density="compact"] .v5-mine-actions,
#mineView.v6-mine[data-mine-density="dense"] .v5-mine-actions {
  margin-top: 8px !important;
}

#mineView.v6-mine[data-mine-density="compact"] .v5-mine-actions h2,
#mineView.v6-mine[data-mine-density="dense"] .v5-mine-actions h2 {
  margin-bottom: 6px;
  font-size: 13px;
}

#mineView.v6-mine[data-mine-density="compact"] .v5-action-list > button,
#mineView.v6-mine[data-mine-density="dense"] .v5-action-list > button {
  min-height: 46px;
  padding-top: 8px;
  padding-bottom: 8px;
}

#mineView.v6-mine[data-mine-density="dense"] .v5-action-list em {
  display: none;
}

@media (max-width: 420px) {
  .v6-mine .v5-mine-intro {
    padding: 14px 14px 28px;
  }

  .v6-mine .v5-mine-intro h1 {
    font-size: 22px;
  }
}

@media (max-height: 760px) {
  .v6-mine .v5-mine-intro p {
    display: none;
  }

  .v6-mine .v5-mine-intro {
    padding-bottom: 22px;
  }

  .v6-mine .v5-learner-strip {
    margin-top: -16px !important;
  }

  .v6-mine .v5-action-list em {
    -webkit-line-clamp: 1;
  }
}

/* ========== 答题 / 错题 ========== */
.quiz-toolbar-leading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 0;
}

.exam-timer {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 8px 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(23, 72, 75, 0.12);
  background: #fff;
  box-shadow: 0 1px 6px rgba(21, 38, 40, 0.06);
  color: var(--teal);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.exam-timer.hidden {
  display: none !important;
}

.exam-timer svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exam-timer strong {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.exam-timer em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #647474;
  line-height: 1;
}

.submit-elapsed {
  display: inline;
  margin-left: 4px;
}

.submit-elapsed.hidden {
  display: none !important;
}

.v6-quiz .quiz-toolbar {
  background: #fff;
}

.v6-quiz .quiz-title span {
  color: var(--teal);
  font-weight: 700;
}

.v6-quiz .quiz-title strong {
  font-weight: 800;
}

.v6-quiz .quiz-submit-button {
  color: var(--teal);
  font-weight: 700;
  cursor: pointer;
}

.v6-quiz .question-head {
  background: #fff;
}

.v6-quiz .question-progress-meta em {
  border-radius: 999px;
  border-color: transparent;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 3px 10px;
  font-weight: 700;
}

.v6-quiz .progress-fill {
  background: var(--teal);
  border-radius: 999px;
}

.v6-quiz .progress-track {
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.v6-quiz .quiz-content {
  background: var(--page);
}

.v6-quiz .question-card,
.v6-quiz .option,
.v6-quiz .quiz-question,
.v6-quiz #quizForm > .question,
.v6-quiz .stem,
.v6-quiz .q-stem {
  border-radius: var(--v6-radius-sm);
}

.v6-quiz #quizForm .question-text,
.v6-quiz #quizForm .stem-card,
.v6-quiz .question-block {
  background: #fff;
  border-radius: var(--v6-radius-sm);
  box-shadow: var(--v6-shadow);
}

/* 题干旁不画边框/分隔横线，选项卡片保留自身边框 */
.v6-quiz .question-content,
.question-content {
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.v6-quiz .option {
  border-radius: var(--v6-radius-sm);
  box-shadow: var(--v6-shadow);
  border: 1px solid rgba(21, 38, 40, 0.04);
  background: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.v6-quiz .option:has(input:checked),
.v6-quiz .option.selected {
  border-color: #9cbab6;
  background: #eef6f4;
}

.v6-quiz .option-key-badge {
  border-radius: 8px;
  background: #eef3f2;
  color: var(--teal);
}

.v6-quiz .option:has(input:checked) .option-key-badge,
.v6-quiz .option.selected .option-key-badge {
  background: var(--teal);
  color: #fff;
}

.v6-quiz .quiz-nav {
  background: #fff;
  gap: 10px;
  padding: 10px 14px 14px;
}

.v6-quiz .quiz-nav .btn.ghost {
  border-radius: 12px;
  background: #eef3f2;
  border: 1px solid var(--line);
  color: var(--muted);
}

.v6-quiz .quiz-nav .btn:not(.ghost) {
  border-radius: 12px;
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 6px 16px rgba(23, 72, 75, 0.25);
  font-weight: 700;
}

.v6-quiz .quiz-nav .btn {
  cursor: pointer;
  transition: background 0.2s ease;
}

.student-tabbar button {
  cursor: pointer;
}

.student-tabbar button.active {
  color: var(--teal);
}

.student-tabbar button.active::before {
  background: var(--teal);
}

/* ========== 手机端兼容：全宽 + 防截断 ========== */
/* 覆盖 student-redesign 的 flex 居中，避免主栏被收成窄条 */
.student-app {
  position: relative;
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) var(--tab-height) !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  justify-items: stretch !important;
  gap: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.student-main,
.student-tabbar {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  justify-self: stretch !important;
}

html,
body,
.student-app,
.student-main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.v5-home,
.v6-home,
.v5-mine,
.v6-mine,
.v6-quiz,
#quizView.quiz-page {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.v6-home-hero {
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}

.v6-chip-row {
  flex-wrap: wrap;
}

.v6-subject-chip {
  flex: 1 1 auto;
  max-width: 100%;
  box-sizing: border-box;
}

.v6-subject-chip .practice-status,
.v6-subject-chip em.practice-status {
  display: inline-flex !important;
  align-items: center;
  margin: 0 !important;
  padding: 2px 7px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  white-space: nowrap;
}

.v6-home .v6-exam-card .subject-row h1 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.v6-home .v6-exam-card > p,
.v6-home .v6-exam-card .button-copy em,
.v6-home .v6-exam-card .button-copy strong {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.v6-home .v6-exam-card .primary-start-btn {
  min-height: 52px;
  height: auto;
  padding: 10px 12px;
}

.v6-home .v6-exam-card .button-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.v6-home .v6-stats-card strong,
.v6-home .v6-stats-card span {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.v6-home .v6-action-grid strong,
.v6-home .v6-action-grid em {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: unset !important;
}

/* 我的：铺满宽度；信息区保持纵向行，禁止旧三列回退 */
.v6-mine .v5-topbar,
.v6-mine .v5-mine-intro {
  width: 100%;
}

.v6-mine .v5-learner-strip,
.v6-mine .mine-info,
.v6-mine .v5-mine-actions,
.v6-mine .logout-panel-btn {
  max-width: none !important;
  box-sizing: border-box;
}

.v6-mine .mine-info {
  margin-top: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
}

.v6-mine .mine-info > div {
  border-right: 0 !important;
}

/* 答题页手机适配 */
.v6-quiz .quiz-title span,
.v6-quiz .quiz-title strong {
  max-width: 100%;
}

.v6-quiz .option-label {
  white-space: normal;
  overflow-wrap: anywhere;
}

.v6-quiz .quiz-nav {
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

.student-tabbar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 420px) {
  .v6-home-hero {
    padding: 12px 12px 16px;
  }

  .v6-home-body {
    padding: 12px 12px 8px;
  }

  .v6-hero-copy h1 {
    font-size: 22px;
  }

  .v6-hero-pills > button {
    height: 34px;
    font-size: 12px;
  }

  .v6-home .v6-exam-card {
    padding: 14px 12px;
  }

  .v6-home .v6-exam-card .subject-row h1 {
    font-size: 18px;
  }

  .v6-home .v5-exam-meta strong {
    font-size: 14px;
  }

  .v6-home .v6-action-grid {
    gap: 8px;
  }

  .v6-home .v6-action-grid > button {
    padding: 14px 8px 12px;
  }

  .v6-mine .v5-mine-intro {
    padding: 16px 14px 32px;
  }

  .v6-mine .v5-mine-intro h1 {
    font-size: 22px;
  }

  .v6-mine .v5-learner-strip,
  .v6-mine .mine-info,
  .v6-mine .v5-mine-actions,
  .v6-mine .logout-panel-btn {
    margin-left: 10px !important;
    margin-right: 10px !important;
    width: calc(100% - 20px) !important;
  }

  .v6-mine .mine-info > div {
    padding: 10px 12px !important;
  }
}

@media (max-width: 360px) {
  .v6-home .v5-exam-meta {
    gap: 4px;
  }

  .v6-home .v5-exam-meta strong {
    font-size: 13px;
  }

  .v6-home .v5-exam-meta span {
    font-size: 10px;
  }

  .v6-mine .mine-info {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .v6-hero-pills > button,
  .v6-home .v6-action-grid > button,
  .v6-quiz .option,
  .v6-quiz .quiz-nav .btn {
    transition: none;
  }
}

/* ========== 图标去突兀 + 答题顶栏/底栏纠偏（覆盖 redesign !important） ========== */
.student-app .button-icon,
.student-app span.button-icon,
.student-app svg.button-icon,
.modal .button-icon,
.modal svg.button-icon,
.button-icon[data-icon="wrong-book"],
.button-icon[data-icon="history-list"],
.home-secondary-actions .study-tile.orange > .button-icon,
.home-secondary-actions .study-tile.green > .button-icon,
.v5-action-list .button-icon,
.v5-action-list .wrong-icon,
.v5-action-list .record-icon,
.v6-home .v6-action-grid .button-icon,
.v6-home .v6-action-grid .wrong-icon,
.v6-home .v6-action-grid .record-icon,
.v5-exam-notice summary .button-icon,
.v6-hero-pills .button-icon,
.student-tabbar .button-icon,
.logout-panel-btn .button-icon,
.empty-icon {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.v5-action-list .wrong-icon,
.v6-home .v6-action-grid .wrong-icon {
  color: var(--red) !important;
}

.v5-action-list .record-icon,
.v6-home .v6-action-grid .record-icon {
  color: var(--green) !important;
}

.v5-action-list .button-icon {
  width: 22px !important;
  height: 22px !important;
  display: inline-grid !important;
  place-items: center;
}

.student-app [data-button-role="primary"] > .button-icon,
.student-app [data-button-role="quiz-submit"] > .button-icon,
.student-app [data-button-role="danger"] > .button-icon,
.modal [data-button-role="modal-primary"] > .button-icon,
.modal [data-button-role="danger"] > .button-icon {
  background: transparent !important;
  color: currentColor !important;
}

.student-tabbar button,
.student-tabbar button.active,
.student-tabbar button:active,
.student-tabbar button:focus-visible {
  background: transparent !important;
  box-shadow: none !important;
}

.student-tabbar button.active::before {
  background: var(--teal) !important;
}

.v6-quiz .quiz-toolbar,
#quizView .quiz-toolbar {
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  overflow: hidden;
  align-items: center !important;
  padding: 0 10px !important;
  box-sizing: border-box;
  position: relative !important;
  display: flex !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.v6-quiz .quiz-toolbar-leading,
#quizView .quiz-toolbar-leading {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.v6-quiz .quiz-title,
#quizView .quiz-title {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: auto !important;
  max-width: calc(100% - 168px) !important;
  min-width: 0 !important;
  display: grid !important;
  justify-items: center !important;
  text-align: center !important;
  pointer-events: none !important;
  z-index: 1 !important;
  margin: 0 !important;
}

.v6-quiz .quiz-tool-button,
#quizView .quiz-tool-button {
  width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  min-width: 40px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink) !important;
}

.v6-quiz .quiz-submit-button,
#quizView .quiz-submit-button,
.student-app #submitBtn[data-button-role="quiz-submit"],
.student-app .quiz-submit-button[data-button-role="quiz-submit"] {
  position: relative !important;
  z-index: 2 !important;
  flex-shrink: 0 !important;
  margin-left: auto !important;
  min-width: auto !important;
  width: auto !important;
  min-height: 36px !important;
  height: 36px !important;
  max-height: 36px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--teal) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  gap: 4px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transform: none !important;
}

.v6-quiz .quiz-submit-button .button-icon,
#quizView .quiz-submit-button .button-icon,
.student-app #submitBtn .button-icon {
  width: 18px !important;
  height: 18px !important;
  background: transparent !important;
  color: currentColor !important;
}

.v6-quiz .quiz-nav,
#quizView .quiz-nav {
  display: grid !important;
  grid-template-columns: 1fr 1.2fr !important;
  gap: 10px !important;
  align-items: center !important;
  height: auto !important;
  min-height: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  background: #fff !important;
  border-top: 1px solid var(--line) !important;
  box-sizing: border-box;
}

.v6-quiz .quiz-nav .btn,
#quizView .quiz-nav .btn,
.student-app #quizNav .btn,
.student-app #quizNav [data-button-role="quiz-nav"] {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  transform: none !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  letter-spacing: 0 !important;
}

.v6-quiz .quiz-nav .btn > span,
#quizView .quiz-nav .btn > span,
.student-app #quizNav .btn > span {
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.v6-quiz .quiz-nav .btn .button-icon,
#quizView .quiz-nav .btn .button-icon,
.student-app #quizNav .button-icon {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  background: transparent !important;
  color: currentColor !important;
  position: static !important;
}

.v6-quiz .quiz-nav .btn.ghost,
#quizView .quiz-nav .btn.ghost,
.student-app #prevQuestionBtn {
  border: 1px solid var(--line) !important;
  background: #f3f6f5 !important;
  color: var(--muted) !important;
}

.v6-quiz .quiz-nav .btn:not(.ghost),
#quizView .quiz-nav .btn:not(.ghost),
.student-app #nextQuestionBtn {
  border: 0 !important;
  background: var(--teal) !important;
  color: #fff !important;
}

.v6-quiz .quiz-nav .btn:disabled,
#quizView .quiz-nav .btn:disabled,
.student-app #prevQuestionBtn:disabled {
  opacity: 0.45 !important;
  background: #eef3f2 !important;
  color: var(--quiet) !important;
  border-color: var(--line) !important;
}

.v6-quiz .option-key-badge,
#quizView .option-key-badge {
  background: transparent !important;
  border: 1px solid var(--line);
  color: var(--teal) !important;
}

.v6-quiz .option:has(input:checked) .option-key-badge,
.v6-quiz .option.selected .option-key-badge,
#quizView .option:has(input:checked) .option-key-badge {
  background: var(--teal) !important;
  border-color: var(--teal);
  color: #fff !important;
}

.v6-quiz .option-state-icon,
#quizView .option-state-icon {
  background: transparent !important;
}

/* ========== 弹窗双按钮：取消 / 开始验证 同一水平线 ========== */
.modal .button-row.two {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  align-items: stretch !important;
  gap: 10px !important;
}

.modal .button-row.two > .btn,
.modal .button-row.two > [data-button-role="modal-secondary"],
.modal .button-row.two > [data-button-role="modal-primary"],
.modal .button-row.two > [data-button-role="danger"] {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  transform: none !important;
}

.modal .button-row.two > .btn > span,
.modal .button-row.two > .btn > .button-icon,
.modal .button-row.two > .btn > svg.button-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  line-height: 1 !important;
}

.modal .button-row.two .button-icon,
.modal .button-row.two svg.button-icon {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  background: transparent !important;
  position: static !important;
}

/* ========== 首页无滚动适配：各机型同屏展示 ========== */
#homeView.v6-home:not(.hidden),
.v6-home:not(.hidden) {
  --home-fit-scale: 1;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  overscroll-behavior: none;
}

#homeView.v6-home.hidden,
.v6-home.hidden {
  display: none !important;
}

/* 禁止 zoom 压缩：登录后内容变高时会把状态卡叠到学习入口上 */
#homeView.v6-home {
  --home-fit-scale: 1;
}

.v6-home .v6-stats-card {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible;
}

.v6-home .v6-learning {
  flex: 0 0 auto !important;
}

.v6-home-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  overflow-y: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
}

.v6-home .v6-learning {
  flex: 0 0 auto !important;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 0 4px;
  overflow: visible;
}

.v6-home .v6-exam-card .button-copy em {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.v6-home .v5-exam-notice {
  flex: 0 0 auto;
  margin-top: 8px;
}

@media (max-height: 900px) {
  .v6-hero-tip {
    display: none;
  }

  .v6-home .v6-exam-card > p {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 11px;
    margin: 4px 0 0;
  }

  .v6-home .v6-exam-card .button-copy em {
    -webkit-line-clamp: 1;
    font-size: 11px;
  }

  .v6-home .v6-action-grid em {
    display: none;
  }

  .v6-home .v6-action-grid > button {
    padding: 12px 8px 10px;
    gap: 6px;
  }

  .v6-home .v6-stats-card {
    margin-top: 8px;
    padding: 10px 6px;
  }

  .v6-home .v5-exam-notice em {
    display: none;
  }
}

@media (max-height: 760px) {
  .v6-home-hero {
    padding: 12px 14px 12px;
  }

  .v6-hero-copy h1 {
    font-size: 22px;
  }

  .v6-hero-pills {
    margin-top: 10px;
    gap: 8px;
  }

  .v6-hero-pills > button {
    height: 34px;
  }

  .v6-home-body {
    padding: 10px 12px 4px;
  }

  .v6-chip-row {
    margin-bottom: 8px;
  }

  .v6-home .v6-exam-card {
    padding: 12px;
  }

  .v6-home .v6-exam-card .subject-row h1 {
    font-size: 18px;
  }

  .v6-home .v6-exam-card .primary-start-btn {
    min-height: 48px;
    padding: 8px 10px;
  }

  .v6-home .v6-stats-card {
    margin-top: 8px;
    padding: 10px 6px;
  }

  .v6-home .v6-action-grid > button {
    padding: 12px 8px 10px;
    gap: 6px;
  }
}

@media (max-height: 700px) {
  .v6-home-hero {
    padding: 8px 12px 8px;
  }

  .v6-hello {
    font-size: 12px;
  }

  .v6-hero-copy h1 {
    font-size: 18px;
  }

  .v6-hero-meta {
    display: none;
  }

  .v6-hero-avatar {
    width: 40px;
    height: 40px;
  }

  .v6-hero-pills {
    margin-top: 8px;
  }

  .v6-hero-pills > button {
    height: 32px;
    font-size: 12px;
  }

  .v6-home-body {
    padding: 8px 10px 2px;
  }

  .v6-chip-row {
    margin-bottom: 6px;
    gap: 6px;
  }

  .v6-home .v6-exam-card {
    padding: 10px;
  }

  .v6-home .v6-exam-card .subject-row {
    margin-top: 6px;
  }

  .v6-home .v6-exam-card .subject-row h1 {
    font-size: 16px;
  }

  .v6-home .v6-exam-card > p {
    display: none;
  }

  .v6-home .v5-exam-meta {
    margin-top: 8px;
    padding-top: 8px;
  }

  .v6-home .v5-exam-meta strong {
    font-size: 14px;
  }

  .v6-home .v6-exam-card .primary-start-btn {
    min-height: 42px;
    margin-top: 8px;
    padding: 8px 10px;
  }

  .v6-home .v6-exam-card .button-copy strong {
    font-size: 15px;
  }

  .v6-home .v6-stats-card {
    margin-top: 6px;
    padding: 8px 4px;
  }

  .v6-home .v6-learning {
    padding: 6px 0 2px;
    gap: 6px;
  }

  .v6-home .v6-action-grid {
    gap: 6px;
  }

  .v6-home .v6-action-grid > button {
    padding: 8px 6px;
  }

  .v6-home .v6-action-grid strong {
    font-size: 13px;
  }

  .v6-home .v5-exam-notice summary {
    padding: 6px 10px;
    min-height: 34px;
  }
}

@media (max-height: 640px) {
  .v6-home-hero {
    padding: 6px 10px 6px;
  }

  .v6-hero-copy h1 {
    font-size: 17px;
  }

  .v6-hero-pills {
    margin-top: 6px;
  }

  .v6-hero-pills > button {
    height: 30px;
  }

  .v6-home .v6-exam-card {
    padding: 8px 10px;
  }

  .v6-home .v6-exam-card .subject-row h1 {
    font-size: 15px;
  }

  .v6-home .v6-exam-card .v5-kicker {
    font-size: 11px;
  }

  .v6-home .v6-exam-card .primary-start-btn {
    min-height: 40px;
    margin-top: 6px;
  }

  .v6-home .v6-stats-card {
    margin-top: 4px;
    padding: 6px 4px;
  }

  .v6-home .v6-stats-card strong {
    font-size: 15px;
  }

  .v6-home .v6-learning {
    padding: 4px 0 0;
    gap: 4px;
  }

  .v6-home .v6-action-grid > button {
    padding: 8px 6px;
    gap: 4px;
  }

  .v6-home .v6-action-grid .button-icon {
    width: 18px;
    height: 18px;
  }

  .v6-home .v5-exam-notice {
    display: block !important;
    margin-top: 4px;
  }

  .v6-home .v5-exam-notice summary {
    padding: 5px 8px;
    min-height: 32px;
  }

  .v6-home .v5-exam-notice summary em {
    display: none;
  }
}

@media (max-height: 580px) {
  .v6-hero-tip,
  .v6-home .v6-exam-card > p {
    display: none;
  }

  .v6-hero-meta {
    display: none;
  }

  .v6-home .v6-stats-card span {
    font-size: 10px;
  }

  .v6-home .v6-action-grid em {
    display: none;
  }

  .v6-home .v5-exam-notice {
    display: block !important;
    margin-top: 4px;
  }

  .v6-home .v5-exam-notice summary {
    padding: 5px 8px;
    min-height: 34px;
    font-size: 12px;
  }
}

/* density hooks from scheduleHomeFit：压缩，不隐藏考试说明 */
#homeView.v6-home[data-home-density="cozy"] .v6-home-hero {
  padding-top: 10px;
  padding-bottom: 10px;
}

#homeView.v6-home[data-home-density="compact"] .v5-exam-notice,
#homeView.v6-home[data-home-density="dense"] .v5-exam-notice {
  display: block !important;
  margin-top: 6px;
}

#homeView.v6-home[data-home-density="compact"] .v5-exam-notice summary em,
#homeView.v6-home[data-home-density="dense"] .v5-exam-notice summary em,
#homeView.v6-home[data-home-density="ultra"] .v5-exam-notice summary em {
  display: none;
}

#homeView.v6-home[data-home-density="dense"] .v6-hero-tip,
#homeView.v6-home[data-home-density="dense"] .v6-hero-meta {
  display: none;
}

#homeView.v6-home[data-home-density="cozy"] .v6-exam-card .button-copy em,
#homeView.v6-home[data-home-density="compact"] .v6-exam-card .button-copy em,
#homeView.v6-home[data-home-density="dense"] .v6-exam-card .button-copy em {
  -webkit-line-clamp: 1;
  font-size: 11px;
}

#homeView.v6-home[data-home-density="compact"] .v6-home-body,
#homeView.v6-home[data-home-density="dense"] .v6-home-body {
  padding: 8px 10px 2px;
}

#homeView.v6-home[data-home-density="compact"] .v6-stats-card,
#homeView.v6-home[data-home-density="dense"] .v6-stats-card {
  margin-top: 6px;
  padding: 8px 4px;
}

#homeView.v6-home[data-home-density="compact"] .v6-action-grid > button,
#homeView.v6-home[data-home-density="dense"] .v6-action-grid > button {
  padding: 10px 6px 8px;
  gap: 4px;
}

#homeView.v6-home[data-home-density="dense"] .v6-exam-card > p {
  display: none;
}

#homeView.v6-home[data-home-density="cozy"] .v6-hero-tip,
#homeView.v6-home[data-home-density="compact"] .v6-hero-tip,
#homeView.v6-home[data-home-density="dense"] .v6-hero-tip,
#homeView.v6-home[data-home-density="ultra"] .v6-hero-tip {
  display: none;
}

#homeView.v6-home[data-home-density="cozy"] .v6-home-body {
  padding: 10px 12px 4px;
}

#homeView.v6-home[data-home-density="cozy"] .v6-hero-pills {
  margin-top: 10px;
  gap: 8px;
}

#homeView.v6-home[data-home-density="cozy"] .v6-hero-pills > button {
  height: 34px;
}

#homeView.v6-home[data-home-density="compact"] .v6-home-hero,
#homeView.v6-home[data-home-density="dense"] .v6-home-hero,
#homeView.v6-home[data-home-density="ultra"] .v6-home-hero {
  padding: 8px 12px 8px;
}

#homeView.v6-home[data-home-density="compact"] .v6-hero-copy h1,
#homeView.v6-home[data-home-density="dense"] .v6-hero-copy h1,
#homeView.v6-home[data-home-density="ultra"] .v6-hero-copy h1 {
  font-size: 20px;
}

#homeView.v6-home[data-home-density="compact"] .v6-hero-meta,
#homeView.v6-home[data-home-density="dense"] .v6-hero-meta,
#homeView.v6-home[data-home-density="ultra"] .v6-hero-meta {
  display: none;
}

#homeView.v6-home[data-home-density="compact"] .v6-exam-card,
#homeView.v6-home[data-home-density="dense"] .v6-exam-card,
#homeView.v6-home[data-home-density="ultra"] .v6-exam-card {
  padding: 10px 12px;
}

#homeView.v6-home[data-home-density="compact"] .v6-exam-card .primary-start-btn,
#homeView.v6-home[data-home-density="dense"] .v6-exam-card .primary-start-btn,
#homeView.v6-home[data-home-density="ultra"] .v6-exam-card .primary-start-btn {
  min-height: 44px;
  padding: 6px 10px;
}

#homeView.v6-home[data-home-density="compact"] .v6-action-grid em,
#homeView.v6-home[data-home-density="dense"] .v6-action-grid em,
#homeView.v6-home[data-home-density="ultra"] .v6-action-grid em {
  display: none;
}

#homeView.v6-home[data-home-density="ultra"] .v6-exam-card > p,
#homeView.v6-home[data-home-density="ultra"] .v6-exam-card .button-copy em {
  display: none;
}

#homeView.v6-home[data-home-density="ultra"] .v6-hello {
  font-size: 12px;
}

#homeView.v6-home[data-home-density="ultra"] .v6-hero-pills > button {
  height: 32px;
  font-size: 12px;
}

#homeView.v6-home[data-home-density="ultra"] .v6-chip-row {
  margin-bottom: 6px;
}

#homeView.v6-home[data-home-density="ultra"] .v6-learning {
  gap: 4px;
  padding-top: 6px;
}

#homeView.v6-home[data-home-density="ultra"] .v6-action-grid > button {
  padding: 8px 4px;
  min-height: 44px;
}

#homeView.v6-home[data-home-density="ultra"] .v5-exam-notice {
  margin-top: 4px;
}

#homeView.v6-home[data-home-density="ultra"] .v5-exam-notice summary {
  min-height: 30px;
  padding: 4px 8px;
}

/* 我的：ultra 密度 */
#mineView.v6-mine[data-mine-density="ultra"] .v5-mine-intro {
  padding: 8px 10px 18px;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-mine-intro p {
  display: none;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-mine-intro h1 {
  font-size: 18px;
  margin: 2px 0 0;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-learner-strip {
  min-height: 48px;
  padding: 8px 10px;
  margin-top: -14px !important;
}

#mineView.v6-mine[data-mine-density="ultra"] .mine-info > div {
  padding: 7px 10px !important;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-mine-actions {
  margin-top: 6px !important;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-mine-actions h2 {
  margin-bottom: 4px;
  font-size: 12px;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-action-list > button {
  min-height: 44px;
  padding-top: 6px;
  padding-bottom: 6px;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-action-list em {
  display: none;
}

#mineView.v6-mine[data-mine-density="ultra"] .logout-panel-btn {
  min-height: 44px;
  margin-top: auto !important;
}

#homeView.v6-home[data-home-density="cozy"] .v6-hero-tip,
#homeView.v6-home[data-home-density="compact"] .v6-hero-tip,
#homeView.v6-home[data-home-density="dense"] .v6-hero-tip,
#homeView.v6-home[data-home-density="ultra"] .v6-hero-tip {
  display: none;
}

#homeView.v6-home[data-home-density="compact"] .v6-home-hero,
#homeView.v6-home[data-home-density="dense"] .v6-home-hero,
#homeView.v6-home[data-home-density="ultra"] .v6-home-hero {
  padding: 10px 12px 8px;
}

#homeView.v6-home[data-home-density="compact"] .v6-hero-copy h1,
#homeView.v6-home[data-home-density="dense"] .v6-hero-copy h1,
#homeView.v6-home[data-home-density="ultra"] .v6-hero-copy h1 {
  font-size: 20px;
  margin-top: 2px;
}

#homeView.v6-home[data-home-density="compact"] .v6-hero-meta,
#homeView.v6-home[data-home-density="dense"] .v6-hero-meta,
#homeView.v6-home[data-home-density="ultra"] .v6-hero-meta {
  display: none;
}

#homeView.v6-home[data-home-density="compact"] .v6-hero-pills,
#homeView.v6-home[data-home-density="dense"] .v6-hero-pills,
#homeView.v6-home[data-home-density="ultra"] .v6-hero-pills {
  margin-top: 8px;
  gap: 8px;
}

#homeView.v6-home[data-home-density="compact"] .v6-hero-pills > button,
#homeView.v6-home[data-home-density="dense"] .v6-hero-pills > button,
#homeView.v6-home[data-home-density="ultra"] .v6-hero-pills > button {
  height: 32px;
  font-size: 12px;
}

#homeView.v6-home[data-home-density="compact"] .v6-exam-card,
#homeView.v6-home[data-home-density="dense"] .v6-exam-card,
#homeView.v6-home[data-home-density="ultra"] .v6-exam-card {
  padding: 10px 12px;
}

#homeView.v6-home[data-home-density="compact"] .v6-exam-card .primary-start-btn,
#homeView.v6-home[data-home-density="dense"] .v6-exam-card .primary-start-btn,
#homeView.v6-home[data-home-density="ultra"] .v6-exam-card .primary-start-btn {
  min-height: 44px;
  padding: 6px 10px;
}

#homeView.v6-home[data-home-density="compact"] .v6-exam-card .subject-row h1,
#homeView.v6-home[data-home-density="dense"] .v6-exam-card .subject-row h1,
#homeView.v6-home[data-home-density="ultra"] .v6-exam-card .subject-row h1 {
  font-size: 18px;
}

#homeView.v6-home[data-home-density="compact"] .v6-learning,
#homeView.v6-home[data-home-density="dense"] .v6-learning,
#homeView.v6-home[data-home-density="ultra"] .v6-learning {
  gap: 6px;
  padding-top: 6px;
}

#homeView.v6-home[data-home-density="compact"] .v6-action-grid em,
#homeView.v6-home[data-home-density="dense"] .v6-action-grid em,
#homeView.v6-home[data-home-density="ultra"] .v6-action-grid em {
  display: none;
}

#homeView.v6-home[data-home-density="ultra"] .v6-exam-card > p,
#homeView.v6-home[data-home-density="ultra"] .v6-exam-card .button-copy em {
  display: none;
}

#homeView.v6-home[data-home-density="ultra"] .v6-home-body {
  padding: 6px 10px 0;
}

#homeView.v6-home[data-home-density="ultra"] .v6-stats-card {
  margin-top: 4px;
  padding: 6px 4px;
}

#homeView.v6-home[data-home-density="ultra"] .v6-action-grid > button {
  min-height: 44px;
  padding: 8px 4px;
}

#homeView.v6-home[data-home-density="ultra"] .v5-exam-notice {
  display: block !important;
  margin-top: 4px;
}

#homeView.v6-home[data-home-density="ultra"] .v5-exam-notice summary {
  min-height: 32px;
  padding: 4px 8px;
}

/* 展开考试说明时必须显示正文；折叠态只压 summary 副标题 */
.v6-home .v5-exam-notice p {
  display: none;
}

.v6-home .v5-exam-notice[open] p {
  display: block !important;
  margin: 8px 10px 10px;
  color: var(--ink-secondary, #4a5c5c);
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
  overflow: visible;
}

#homeView.v6-home[data-home-notice-open="1"] .v6-home-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

#homeView.v6-home[data-home-logged-in="1"][data-home-density="normal"] .v6-hero-tip {
  display: none;
}

#homeView.v6-home[data-home-logged-in="1"][data-home-density="normal"] .v6-home-hero {
  padding-bottom: 12px;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-mine-intro {
  padding: 8px 10px 18px;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-mine-intro p,
#mineView.v6-mine[data-mine-density="ultra"] .v5-mine-intro > span {
  display: none;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-mine-intro h1 {
  font-size: 18px;
  margin: 2px 0 0;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-learner-strip {
  margin-top: -14px !important;
  min-height: 48px;
  padding: 8px 10px;
}

#mineView.v6-mine[data-mine-density="ultra"] .mine-info > div {
  padding: 7px 10px !important;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-mine-actions {
  margin-top: 6px !important;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-action-list > button {
  min-height: 44px;
  padding-top: 6px;
  padding-bottom: 6px;
}

#mineView.v6-mine[data-mine-density="ultra"] .v5-action-list em {
  display: none;
}

#mineView.v6-mine[data-mine-density="ultra"] .logout-panel-btn {
  min-height: 44px;
  margin-top: auto;
}

/* ========== 答题底栏固定贴手机底 ========== */
body.quiz-screen-active .student-app {
  grid-template-rows: minmax(0, 1fr) !important;
}

body.quiz-screen-active .student-tabbar {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* 模拟考试结果页：隐藏底栏，去掉顶栏后内容上移 */
body.result-screen-active .student-app {
  grid-template-rows: minmax(0, 1fr) !important;
}

body.result-screen-active .student-tabbar {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

body.result-screen-active .student-main {
  overflow: hidden !important;
  height: 100% !important;
  min-height: 0 !important;
}

body.result-screen-active #resultView.result-panel {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  /* redesign 给 .result-panel 设了左右 margin，宽度仍是 100% 时会整页右偏 */
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden !important;
}

body.result-screen-active #resultView .result-content {
  padding-top: 16px !important;
}

body.result-screen-active #resultView .result-actions .btn.full {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 12px 16px !important;
  text-align: center !important;
}

body.result-screen-active #resultView .result-actions .result-btn-inner {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 0 auto !important;
  line-height: 1 !important;
}

body.result-screen-active #resultView .result-actions .result-btn-inner > .button-icon,
body.result-screen-active #resultView .result-actions .result-btn-inner > svg.button-icon {
  position: static !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  transform: none !important;
  margin: 0 !important;
  flex: 0 0 18px !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: currentColor !important;
}

body.result-screen-active #resultView .result-actions .result-btn-inner > .button-icon::before,
body.result-screen-active #resultView .result-actions .result-btn-inner > .button-icon::after,
body.result-screen-active #resultView .result-actions .result-btn-inner > svg.button-icon::before,
body.result-screen-active #resultView .result-actions .result-btn-inner > svg.button-icon::after {
  display: none !important;
  content: none !important;
}

body.result-screen-active #resultView .result-actions .result-btn-inner > span:not(.button-icon) {
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.quiz-screen-active .student-main {
  overflow: hidden !important;
  height: 100% !important;
  min-height: 0 !important;
}

body.quiz-screen-active #quizView.quiz-page {
  display: grid !important;
  grid-template-rows: 52px 48px minmax(0, 1fr) !important;
  grid-template-columns: minmax(0, 1fr) !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.quiz-screen-active #quizToolbar {
  grid-row: 1 !important;
}

body.quiz-screen-active #quizProgress {
  grid-row: 2 !important;
}

/* 进度条沾满屏宽：覆盖 redesign .question-head { width:fit-content; display:inline-flex; pill } */
body.quiz-screen-active #quizProgress.question-head {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 9px 16px 0 !important;
  border-radius: 0 !important;
  border-bottom: 1px solid var(--line, #e6eceb);
  background: var(--surface-soft, #eef3f2) !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  height: 48px !important;
  min-height: 48px !important;
}

body.quiz-screen-active #quizProgress .progress-track {
  width: 100% !important;
  box-sizing: border-box !important;
}

body.quiz-screen-active #quizContent {
  grid-row: 3 !important;
  min-height: 0 !important;
}

body.quiz-screen-active #quizNav.quiz-nav {
  /* 跟在题目内容后面，随反馈增高而下移，不钉在屏底 */
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 8px 0 0 !important;
  height: auto !important;
  min-height: 0 !important;
}

/* 题目按内容高度排列；上一题/下一题紧跟最后一个选项 */
body.quiz-screen-active #quizView .quiz-content {
  display: block !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 10px 12px 16px !important;
  box-sizing: border-box !important;
}

body.quiz-screen-active #quizView #quizForm {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
}

body.quiz-screen-active #quizView .question-card {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  background: #fff !important;
  border-radius: var(--v6-radius-sm) !important;
  overflow: visible !important;
}

body.quiz-screen-active #quizView .question-content {
  flex: 0 0 auto !important;
  max-height: none !important;
  overflow: hidden !important;
}

body.quiz-screen-active #quizView .option-list {
  flex: 0 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: auto !important;
  align-content: start !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body.quiz-screen-active #quizView .option {
  height: auto !important;
  min-height: 48px !important;
  max-height: none !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

body.quiz-screen-active #quizView .wrong-feedback {
  flex: 0 0 auto !important;
  margin-top: 0 !important;
  min-height: var(--quiz-feedback-reserve, 58px) !important;
  contain: layout style;
}

/* 空反馈不占位：答完后内容增高，上一题/下一题跟着下移 */
body.quiz-screen-active #quizView .wrong-feedback:empty {
  display: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

body.quiz-screen-active #quizView .wrong-multi-confirm {
  flex: 0 0 auto !important;
}

/* 答题密度阶梯：短屏收紧间距/字号（对齐首页 density ladder） */
body.quiz-screen-active #quizView[data-quiz-density="cozy"] .question-card {
  padding: 12px !important;
  gap: 8px !important;
}

body.quiz-screen-active #quizView[data-quiz-density="cozy"] .question-content {
  font-size: 16px !important;
  line-height: 1.4 !important;
  margin-bottom: 8px !important;
}

body.quiz-screen-active #quizView[data-quiz-density="cozy"] .option {
  min-height: 48px !important;
  padding: 8px 10px !important;
}

body.quiz-screen-active #quizView[data-quiz-density="cozy"] .option-list {
  gap: 8px !important;
}

body.quiz-screen-active #quizView[data-quiz-density="compact"] .question-card,
body.quiz-screen-active #quizView .question-card.compact {
  padding: 10px !important;
  gap: 6px !important;
}

body.quiz-screen-active #quizView[data-quiz-density="compact"] .question-content,
body.quiz-screen-active #quizView .question-card.compact .question-content {
  font-size: 15px !important;
  line-height: 1.35 !important;
  margin-bottom: 6px !important;
}

body.quiz-screen-active #quizView[data-quiz-density="compact"] .option,
body.quiz-screen-active #quizView .question-card.compact .option {
  min-height: 44px !important;
  padding: 7px 9px !important;
  font-size: 14px !important;
}

body.quiz-screen-active #quizView[data-quiz-density="compact"] .option-list,
body.quiz-screen-active #quizView .question-card.compact .option-list {
  gap: 6px !important;
}

body.quiz-screen-active #quizView[data-quiz-density="dense"] .question-card,
body.quiz-screen-active #quizView[data-quiz-density="ultra"] .question-card {
  padding: 8px !important;
  gap: 5px !important;
}

body.quiz-screen-active #quizView[data-quiz-density="dense"] .question-content,
body.quiz-screen-active #quizView[data-quiz-density="ultra"] .question-content {
  font-size: 14px !important;
  line-height: 1.32 !important;
  margin-bottom: 4px !important;
}

body.quiz-screen-active #quizView[data-quiz-density="dense"] .option,
body.quiz-screen-active #quizView[data-quiz-density="ultra"] .option {
  min-height: 40px !important;
  padding: 6px 8px !important;
  font-size: 13px !important;
}

body.quiz-screen-active #quizView[data-quiz-density="dense"] .option-list,
body.quiz-screen-active #quizView[data-quiz-density="ultra"] .option-list {
  gap: 5px !important;
}

body.quiz-screen-active #quizView[data-quiz-density="dense"] .wrong-feedback,
body.quiz-screen-active #quizView[data-quiz-density="ultra"] .wrong-feedback {
  margin-top: 0 !important;
  padding: 8px 10px !important;
}

/* 选项按内容高度，不把剩余屏高均分进每个选项 */
body.quiz-screen-active #quizView .option-list {
  flex: 0 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: auto !important;
  align-content: start !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body.quiz-screen-active #quizView .option,
body.quiz-screen-active #quizView[data-quiz-density] .option,
body.quiz-screen-active #quizView .question-card.compact .option {
  height: auto !important;
  min-height: 48px !important;
  max-height: none !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

/* ========== 按钮操作限流提示 ========== */
.action-rate-limit-tip {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(12px);
  z-index: 40;
  max-width: min(92vw, 360px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(23, 72, 75, 0.94);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 8px 24px rgba(15, 35, 37, 0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.action-rate-limit-tip.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

button.is-rate-limited {
  animation: action-rate-limit-shake 0.35s ease;
}

@keyframes action-rate-limit-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}
