/* =========================================================
   物理打卡 · 视觉与布局
   ========================================================= */

:root {
  --paper: #f4f1e9;
  --paper-2: #ece7db;
  --card: #fffdf8;
  --ink: #182521;
  --ink-soft: #35443e;
  --muted: #6e7a73;
  --line: #ded8ca;
  --line-strong: #c9c1af;
  --green: #0f6b58;
  --green-dark: #0a4d40;
  --green-soft: #e7f1ec;
  --amber: #d69a2d;
  --amber-soft: #fbf1d9;
  --red: #c04a38;
  --red-soft: #f9e9e5;
  --blue: #3a6ea5;
  --shadow-sm: 0 1px 2px rgba(24, 37, 33, 0.04), 0 8px 24px rgba(24, 37, 33, 0.04);
  --shadow-md: 0 2px 4px rgba(24, 37, 33, 0.03), 0 18px 44px rgba(24, 37, 33, 0.08);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", "SimSun", serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", "SF Mono", Consolas, "Liberation Mono", monospace;
  --nav-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  padding-bottom: var(--nav-height);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 10% -4%, rgba(15, 107, 88, 0.075), transparent 34rem),
    radial-gradient(circle at 94% 8%, rgba(214, 154, 45, 0.11), transparent 30rem),
    radial-gradient(rgba(24, 37, 33, 0.06) 0.7px, transparent 0.7px);
  background-size: auto, auto, 24px 24px;
  background-attachment: fixed;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked {
  overflow: hidden;
}

body[data-screen="quiz"] {
  padding-bottom: 0;
}

[hidden] {
  display: none !important;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fffdf8;
  font-size: 13px;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: none;
}

/* =========================================================
   顶栏
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(201, 193, 175, 0.55);
  background: rgba(244, 241, 233, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

body[data-screen="quiz"] .site-header {
  display: none;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 10px;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 11px;
  background: var(--ink);
  color: #f2e7c8;
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__text strong {
  font-size: 15px;
  letter-spacing: 0.02em;
}

.brand__text small {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.6);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

/* =========================================================
   按钮 / 徽标 / 通用
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 19px;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #faf5e9;
  box-shadow: 0 8px 22px rgba(24, 37, 33, 0.16);
}

.btn--primary:hover {
  border-color: var(--green-dark);
  background: var(--green-dark);
}

.btn--ghost {
  border-color: var(--line-strong);
  background: rgba(255, 253, 248, 0.55);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: var(--card);
}

.btn--outline {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink-soft);
}

.btn--outline:hover {
  border-color: var(--ink);
  background: var(--card);
}

.btn--danger {
  border-color: var(--red);
  background: var(--red);
  color: #fffaf7;
}

.btn--danger:hover {
  background: #a83a29;
  border-color: #a83a29;
}

.btn--text {
  padding: 10px 4px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn--text:hover {
  color: var(--ink);
}

.btn--small {
  padding: 7px 12px;
  font-size: 12px;
}

.btn--lg {
  padding: 14px 25px;
  font-size: 15px;
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.btn--outline .badge {
  background: var(--ink);
  color: #fffdf8;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 248, 0.82);
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-head--compact {
  align-items: center;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.selection-badge {
  flex: none;
  padding: 6px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 11px;
  white-space: nowrap;
}

.selection-badge--small {
  padding: 5px 10px;
  font-size: 10.5px;
}

/* =========================================================
   布局骨架
   ========================================================= */

.screen {
  animation: fade-up 0.38s ease both;
}

.shell {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 34px 24px 30px;
}

.shell--narrow {
  max-width: 820px;
}

.page-head {
  margin-bottom: 24px;
}

.page-head h1 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 54px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.page-head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.page-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(15, 107, 88, 0.1);
  animation: pulse 2.6s ease-in-out infinite;
}

.section-head {
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.01em;
}

/* =========================================================
   打卡卡片
   ========================================================= */

.checkin-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 26px;
  align-items: center;
  margin-bottom: 26px;
  padding: 30px 32px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(214, 154, 45, 0.12), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(15, 107, 88, 0.08), transparent 40%),
    var(--card);
  box-shadow: var(--shadow-md);
}

.checkin-card__streak {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.checkin-card__streak strong {
  font-family: var(--font-serif);
  font-size: 66px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--green-dark);
}

.checkin-card__streak span {
  color: var(--muted);
  font-size: 13px;
}

.checkin-card__status {
  max-width: 320px;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.65;
}

.checkin-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.checkin-card__total {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.checkin-card__calendar {
  min-width: 0;
}

.calendar-head {
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-weekdays {
  margin-bottom: 4px;
}

.calendar-weekdays span {
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.calendar-cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
}

.calendar-cell.is-checked {
  background: var(--green);
  color: #fffdf8;
}

.calendar-cell.is-today {
  box-shadow: inset 0 0 0 1.5px var(--amber);
}

.calendar-cell.is-muted {
  color: var(--line-strong);
}

/* =========================================================
   统计条
   ========================================================= */

/* =========================================================
   首页列表
   ========================================================= */

.home-list {
  max-width: 620px;
  margin: 0 auto;
  padding: 18px 16px 30px;
}

.home-list__head {
  padding: 2px 4px 18px;
}

.home-list__head h1 {
  margin: 2px 0 4px;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.home-list__head p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.home-feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-feature {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
  padding: 17px 18px;
  border: 0;
  border-radius: 20px;
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(46, 95, 170, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.home-feature::after {
  content: "";
  position: absolute;
  top: -46px;
  right: -24px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  pointer-events: none;
}

.home-feature:hover {
  transform: translateY(-2px);
}

.home-feature--blue {
  background: linear-gradient(135deg, #5b9cf4, #3e7ddd);
  box-shadow: 0 14px 26px rgba(62, 126, 232, 0.24);
}

.home-feature--green {
  background: linear-gradient(135deg, #55c4a2, #35a783);
  box-shadow: 0 14px 26px rgba(54, 169, 134, 0.22);
}

.home-feature__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 25px;
  line-height: 1;
}

.home-feature__body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.home-feature__kicker {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  opacity: 0.72;
}

.home-feature__body strong {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
}

.home-feature__body small {
  font-size: 11.5px;
  opacity: 0.84;
}

.home-feature__meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.home-feature__meta strong {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.1;
}

.home-feature__meta small {
  font-size: 9px;
  opacity: 0.76;
}

.home-feature__arrow {
  position: relative;
  z-index: 1;
  flex: none;
  font-size: 22px;
  line-height: 1;
  opacity: 0.82;
}

.home-list-section {
  margin-top: 24px;
}

.home-list-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 4px;
}

.home-list-section__head h2 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.06em;
}

.home-list-section__head span {
  color: var(--muted);
  font-size: 10.5px;
}

.home-list-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.home-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.16s ease;
}

.home-row:first-child {
  border-top: 0;
}

.home-row:hover {
  background: rgba(15, 107, 88, 0.04);
}

.home-row__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.home-row__icon--rose { background: linear-gradient(145deg, #ff8da0, #ec617a); }
.home-row__icon--green { background: linear-gradient(145deg, #7bdcb9, #41b78f); }
.home-row__icon--teal { background: linear-gradient(145deg, #7fe0cd, #45bfa8); }
.home-row__icon--blue { background: linear-gradient(145deg, #7db9ff, #4b93ee); }
.home-row__icon--orange { background: linear-gradient(145deg, #ffb36d, #ef8a3c); }
.home-row__icon--red { background: linear-gradient(145deg, #ff907f, #e75f4e); }
.home-row__icon--amber { background: linear-gradient(145deg, #ffc266, #ee9e2f); }
.home-row__icon--indigo { background: linear-gradient(145deg, #89b4ff, #5b87e8); }
.home-row__icon--slate { background: linear-gradient(145deg, #9aa8b6, #6f7f8f); }

.home-row__icon--semester {
  font-size: 12px;
  letter-spacing: -0.02em;
}

.home-row__body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.home-row__body strong {
  font-size: 13.5px;
  font-weight: 600;
}

.home-row__body small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-row__meta {
  flex: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  white-space: nowrap;
}

.home-row__badge {
  flex: none;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1.3;
}

.home-row__arrow {
  flex: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
}

.home-list__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}

.home-list__stats strong {
  margin-left: 3px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
}

/* =========================================================
   随机组卷
   ========================================================= */

.random-config {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.random-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.random-row__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  background: var(--accent);
  color: #fffdf8;
  font-size: 15px;
  font-weight: 700;
}

.random-row__body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.random-row__body strong {
  font-size: 13.5px;
}

.random-row__body small {
  color: var(--muted);
  font-size: 10.5px;
}

.random-row__avail {
  flex: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.random-stepper {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}

.random-stepper button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.random-stepper button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.random-stepper button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.random-stepper strong {
  min-width: 26px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  text-align: center;
}

.random-total {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin: 22px 0 2px;
  color: var(--muted);
  font-size: 12px;
}

.random-total strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.random-hint {
  min-height: 20px;
  margin: 2px 0 12px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.random-hint.is-error {
  color: var(--red);
}

.random-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.random-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media (max-width: 520px) {
  .random-row {
    gap: 9px;
    padding: 11px 10px;
  }

  .random-row__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 14px;
  }

  .random-row__avail {
    display: none;
  }

  .random-stepper button {
    width: 27px;
    height: 27px;
  }

  .random-stepper strong {
    min-width: 22px;
    font-size: 14px;
  }
}

/* =========================================================
   首页仪表盘
   ========================================================= */

body[data-screen="home"] .site-header {
  display: none;
}

body[data-screen="home"] #main {
  padding-top: 10px;
}

.home-dashboard {
  max-width: 620px;
  margin: 0 auto;
  padding: 12px 18px 26px;
}

.dashboard-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 92px;
  align-items: center;
  justify-items: center;
  gap: 8px;
  min-height: 276px;
}

.side-icons {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.dash-icon {
  position: relative;
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.dash-icon__badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 17px;
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(45, 52, 48, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dash-icon:hover .dash-icon__badge {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 11px 20px rgba(45, 52, 48, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.dash-icon__badge--rose {
  background: linear-gradient(145deg, #ff8da0, #ec617a);
}

.dash-icon__badge--blue {
  background: linear-gradient(145deg, #7db9ff, #4b93ee);
}

.dash-icon__badge--orange {
  background: linear-gradient(145deg, #ffb36d, #ef8a3c);
}

.dash-icon__badge--teal {
  background: linear-gradient(145deg, #7fe0cd, #45bfa8);
}

.dash-icon__badge--green {
  background: linear-gradient(145deg, #7bdcb9, #41b78f);
}

.dash-icon__badge--red {
  background: linear-gradient(145deg, #ff907f, #e75f4e);
}

.dash-icon__badge--amber {
  background: linear-gradient(145deg, #ffc266, #ee9e2f);
}

.dash-icon__badge--indigo {
  background: linear-gradient(145deg, #89b4ff, #5b87e8);
}

.dash-icon__label {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.dash-icon__tag {
  position: absolute;
  top: -5px;
  right: calc(50% - 39px);
  padding: 2px 5px;
  border-radius: 6px;
  background: #e75f4e;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
  transform: rotate(6deg);
  box-shadow: 0 2px 5px rgba(231, 95, 78, 0.25);
}

.dash-icon__tag--amber {
  background: #ee9e2f;
  box-shadow: 0 2px 5px rgba(238, 158, 47, 0.25);
}

.big-orb {
  position: relative;
  display: flex;
  width: 218px;
  height: 218px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.big-orb--blue {
  background: radial-gradient(circle at 34% 26%, #86beff 0%, #4d91f0 53%, #3c78dd 100%);
  box-shadow: 0 18px 34px rgba(62, 126, 232, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.32);
}

.big-orb--green {
  background: radial-gradient(circle at 34% 26%, #7ce0c2 0%, #48bd99 53%, #36a986 100%);
  box-shadow: 0 18px 34px rgba(54, 169, 134, 0.28), inset 0 2px 0 rgba(255, 255, 255, 0.32);
}

.big-orb:hover {
  transform: translateY(-3px) scale(1.012);
}

.big-orb:active {
  transform: translateY(0) scale(0.995);
}

.big-orb::before {
  content: "";
  position: absolute;
  inset: -13px;
  border: 2px dashed rgba(91, 157, 245, 0.38);
  border-radius: 50%;
  pointer-events: none;
}

.big-orb--green::before {
  border-color: rgba(72, 190, 155, 0.38);
}

.big-orb::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 2px solid transparent;
  border-top-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  transform: rotate(32deg);
  pointer-events: none;
}

.big-orb__ring {
  position: absolute;
  inset: 9px;
  border: 1px dashed rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  pointer-events: none;
}

.big-orb strong {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.big-orb__progress {
  font-family: var(--font-mono);
  font-size: 13.5px;
  opacity: 0.94;
}

.big-orb__hint {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  opacity: 0.82;
}

.dashboard-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 2px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.dashboard-stats strong {
  margin-left: 3px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.home-footer--dashboard {
  padding-top: 16px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 30px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 30px;
  border-right: 1px solid var(--line);
}

.stat:first-child {
  padding-left: 2px;
}

.stat:nth-child(3) {
  border-right: 0;
}

.stat__value {
  font-family: var(--font-serif);
  font-size: 38px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat__label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.11em;
}

/* =========================================================
   快捷入口
   ========================================================= */

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

.quick-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.7);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.quick-card:hover {
  border-color: var(--ink);
  background: var(--card);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.quick-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 13px;
  background: var(--paper-2);
  font-size: 19px;
}

.quick-card--primary {
  border-color: rgba(15, 107, 88, 0.4);
  background: var(--green-soft);
}

.quick-card--primary .quick-card__icon {
  background: var(--green);
  color: #fffdf8;
}

.quick-card--exam {
  border-color: rgba(192, 74, 56, 0.35);
  background: var(--red-soft);
}

.quick-card--exam .quick-card__icon {
  background: var(--red);
  color: #fffdf8;
}

.quick-card__body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.quick-card__body strong {
  font-size: 15px;
}

.quick-card__body small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-card__arrow {
  flex: none;
  color: var(--muted);
  font-size: 16px;
}

.home-footer {
  padding: 26px 4px 6px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

.home-footer p {
  margin: 0;
}

/* =========================================================
   章节页
   ========================================================= */

.chapter-group {
  margin-bottom: 22px;
}

.chapter-group__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chapter-group__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chapter-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.7);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.chapter-row:hover {
  border-color: var(--accent);
  background: var(--card);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.chapter-row__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fffdf8;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

.chapter-row__body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.chapter-row__name {
  font-size: 13.5px;
  font-weight: 600;
}

.chapter-row__meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.chapter-row__track {
  display: block;
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-2);
}

.chapter-row__track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.chapter-row__btn {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.chapter-row__btn:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fffdf8;
}

/* =========================================================
   章节小节
   ========================================================= */

.section-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.section-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.7);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.section-row:hover {
  border-color: var(--accent);
  background: var(--card);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.section-row__icon {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 36px;
  flex: none;
  padding: 0 7px;
  border-radius: 10px;
  background: var(--accent);
  color: #fffdf8;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.section-row__body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.section-row__name {
  font-size: 13.5px;
  font-weight: 600;
}

.section-row__meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.section-row__track {
  display: block;
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-2);
}

.section-row__track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.section-row__btn {
  flex: none;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.section-row__btn:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fffdf8;
}

/* =========================================================
   考试页
   ========================================================= */

.exam-panel {
  padding: 26px 28px 24px;
}

.exam-panel__rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 16px;
  background: var(--paper);
}

.exam-panel__rule {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 14px;
  border-right: 1px dashed var(--line-strong);
}

.exam-panel__rule:last-child {
  border-right: 0;
}

.exam-panel__rule b {
  font-size: 14px;
}

.exam-panel__rule span {
  color: var(--muted);
  font-size: 11.5px;
}

.setting-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.setting-row:last-of-type {
  border-bottom: 0;
}

.setting-label {
  flex: none;
  width: 42px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--paper-2);
}

.segmented__btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.segmented__btn:hover {
  background: rgba(255, 255, 255, 0.55);
}

.segmented__btn.is-active {
  background: var(--ink);
  color: #fffdf8;
  box-shadow: 0 2px 7px rgba(24, 37, 33, 0.2);
}

.hebei-paper-head {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--paper);
}

.hebei-paper-head div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
  border-right: 1px dashed var(--line-strong);
}

.hebei-paper-head div:last-child {
  border-right: 0;
}

.hebei-paper-head span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.hebei-paper-head strong {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
}

.hebei-paper {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.hebei-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 16px;
  padding: 13px 16px;
  background: rgba(255, 253, 248, 0.65);
  border-bottom: 1px dashed var(--line);
}

.hebei-row:last-child {
  border-bottom: 0;
}

.hebei-row__title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}

.hebei-row__title b {
  font-size: 13.5px;
}

.hebei-row__title span {
  color: var(--muted);
  font-size: 11px;
}

.hebei-row em {
  color: var(--green-dark);
  font-family: var(--font-mono);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.hebei-row p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.hebei-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.exam-start {
  width: 100%;
  margin-top: 20px;
}

.exam-history {
  margin-top: 14px;
  padding: 22px 26px;
}

/* =========================================================
   我的页
   ========================================================= */

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.profile-stat strong {
  font-family: var(--font-serif);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.profile-stat span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.profile-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.profile-link {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.7);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.profile-link:hover {
  border-color: var(--ink);
  background: var(--card);
  transform: translateY(-1px);
}

.profile-link__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--paper-2);
  font-size: 16px;
}

.profile-link__text {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.profile-link__text strong {
  font-size: 13.5px;
}

.profile-link__text small {
  color: var(--muted);
  font-size: 11px;
}

.profile-link__value {
  flex: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.profile-link__arrow {
  flex: none;
  color: var(--muted);
  font-size: 15px;
}

.profile-about {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

/* =========================================================
   底部导航
   ========================================================= */

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  height: var(--nav-height);
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

body[data-screen="quiz"] .bottom-nav,
body[data-screen="result"] .bottom-nav,
body[data-screen="mistakes"] .bottom-nav,
body[data-screen="favorites"] .bottom-nav,
body[data-screen="exam-bank"] .bottom-nav {
  display: none;
}

.bottom-nav__item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
  transition: color 0.18s ease;
}

.bottom-nav__item.is-active {
  color: var(--green-dark);
}

.bottom-nav__icon {
  font-size: 18px;
  line-height: 1;
}

/* =========================================================
   答题页
   ========================================================= */

.screen--quiz {
  min-height: 100vh;
  padding: 30px 24px 44px;
}

.quiz-shell {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.quiz-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--card);
  color: var(--ink-soft);
  font-size: 17px;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.icon-btn:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: #fffdf8;
}

.quiz-progress {
  flex: 1;
  min-width: 0;
}

.quiz-progress__meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.quiz-progress__meta span:first-child {
  overflow: hidden;
  color: var(--ink-soft);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiz-progress__meta span:last-child {
  flex: none;
  font-family: var(--font-mono);
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-2);
}

.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #3d9a7f);
  transition: width 0.35s ease;
}

.quiz-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

.quiz-status.is-countdown #quiz-timer {
  color: var(--red);
  font-weight: 700;
}

.quiz-status__sep {
  width: 1px;
  height: 13px;
  background: var(--line-strong);
}

.question-card {
  padding: 32px 36px 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow-md);
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.chip--topic {
  background: var(--paper-2);
  color: var(--ink-soft);
}

.chip--point {
  background: var(--green-soft);
  color: var(--green-dark);
}

.question-no {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.question-stem {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: 23px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -0.015em;
  text-wrap: pretty;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 18px;
}

.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fffefa;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

.option:hover:not(:disabled) {
  border-color: var(--green);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.option:disabled {
  cursor: default;
}

.option__key {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--paper-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.option__text {
  flex: 1;
  min-width: 0;
}

.option__mark {
  flex: none;
  font-size: 16px;
  font-weight: 700;
  opacity: 0;
}

.option.is-correct {
  border-color: #4b9b7f;
  background: #edf5f0;
  color: var(--green-dark);
}

.option.is-correct .option__key {
  background: var(--green);
  color: #fffdf8;
}

.option.is-correct .option__mark {
  color: var(--green);
  opacity: 1;
}

.option.is-wrong {
  border-color: #d58a7c;
  background: #fbefec;
  color: #8f3426;
}

.option.is-wrong .option__key {
  background: var(--red);
  color: #fffdf8;
}

.option.is-wrong .option__mark {
  color: var(--red);
  opacity: 1;
}

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

.option.is-selected .option__key {
  background: var(--green);
  color: #fffdf8;
}

.option.is-selected .option__mark {
  color: var(--green);
  opacity: 1;
}

.option.is-dim {
  opacity: 0.55;
}

.multi-submit {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 14px;
}

.multi-submit span {
  color: var(--muted);
  font-size: 11px;
}

.feedback {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 11px;
  padding: 12px 15px;
  border-radius: 13px;
  animation: fade-up 0.28s ease both;
}

.feedback--correct {
  border: 1px solid #c6e0d4;
  background: var(--green-soft);
}

.feedback--wrong {
  border: 1px solid #efd0c8;
  background: var(--red-soft);
}

.feedback__icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: none;
  border-radius: 50%;
  color: #fffdf8;
  font-size: 12px;
  font-weight: 700;
}

.feedback--correct .feedback__icon {
  background: var(--green);
}

.feedback--wrong .feedback__icon {
  background: var(--red);
}

.feedback strong {
  display: block;
  margin-bottom: 1px;
  font-size: 13px;
}

.feedback span {
  color: var(--ink-soft);
  font-size: 12.5px;
}

.explain-toggle {
  margin: 0 0 16px;
}

.explain {
  margin-bottom: 18px;
  padding: 16px 19px;
  border-left: 3px solid var(--amber);
  border-radius: 0 13px 13px 0;
  background: var(--paper);
  animation: fade-up 0.3s ease both;
}

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

.explain__label {
  color: #8a5c0a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.explain__point {
  color: var(--muted);
  font-size: 10px;
}

.explain p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.78;
}

.formula {
  display: inline-block;
  max-width: 100%;
  margin-top: 11px;
  padding: 7px 11px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
}

.question-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 4px;
}

.question-actions__left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.question-actions__hint {
  color: var(--muted);
  font-size: 11px;
}

.fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.fav-btn:hover {
  border-color: var(--amber);
  color: #8a5c0a;
}

.fav-btn.is-fav {
  border-color: var(--amber);
  background: var(--amber-soft);
  color: #8a5c0a;
}

.keyboard-hint {
  margin: 17px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: center;
}

/* =========================================================
   结果页
   ========================================================= */

.screen--result {
  padding: 44px 24px 60px;
}

.result-shell {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
}

.result-hero {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 30px;
}

.score-ring {
  position: relative;
  width: 184px;
  height: 184px;
  flex: none;
}

.score-ring svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring__bg,
.score-ring__fill {
  fill: none;
  stroke-width: 10;
}

.score-ring__bg {
  stroke: var(--paper-2);
}

.score-ring__fill {
  stroke: var(--green);
  stroke-linecap: round;
  stroke-dasharray: 402.12;
  stroke-dashoffset: 402.12;
  transition: stroke-dashoffset 1.15s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.score-ring__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-ring__center strong {
  font-family: var(--font-serif);
  font-size: 44px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.score-ring__center span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

.result-copy h1 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: clamp(34px, 4vw, 50px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.result-copy > p {
  max-width: 540px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.result-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
}

.result-stat strong {
  font-family: var(--font-serif);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.result-stat span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.06em;
}

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

.result-panel {
  padding: 22px 24px;
}

.topic-results {
  display: flex;
  flex-direction: column;
}

.topic-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.topic-result:last-child {
  border-bottom: 0;
}

.topic-result__name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
}

.topic-result__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}

.topic-result__score {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  white-space: nowrap;
}

.topic-result__track {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-2);
}

.topic-result__track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.6s ease;
}

.wrong-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 560px;
  padding-right: 3px;
  overflow: auto;
}

.wrong-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}

.wrong-item summary {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  cursor: pointer;
  list-style: none;
}

.wrong-item summary::-webkit-details-marker {
  display: none;
}

.wrong-item summary::after {
  content: "+";
  flex: none;
  margin-left: auto;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.2;
}

.wrong-item[open] summary::after {
  content: "−";
}

.wrong-item summary > span {
  flex: 1;
  min-width: 0;
}

.wrong-item__body {
  padding: 0 14px 14px;
  border-top: 1px dashed var(--line);
}

.wrong-answer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 9px 0 0;
  font-size: 11.5px;
}

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

.wrong-answer b {
  font-weight: 600;
}

.tag-wrong {
  color: var(--red);
}

.tag-right {
  color: var(--green);
}

.wrong-item .explain {
  margin: 9px 0 0;
  padding: 11px 13px;
  border-left-width: 2px;
}

.wrong-item .explain p {
  font-size: 12.5px;
}

.wrong-item .formula {
  margin-top: 8px;
  font-size: 10.5px;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 18px;
  color: var(--muted);
  text-align: center;
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 11px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 21px;
}

.empty strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 14px;
}

.empty p {
  max-width: 260px;
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
}

.empty .btn {
  margin-top: 15px;
}

.empty--large {
  padding: 54px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.5);
}

/* =========================================================
   错题本 / 收藏列表
   ========================================================= */

.back-link {
  margin-bottom: 22px;
  padding: 3px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
}

.back-link:hover {
  color: var(--ink);
}

.mistake-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mistake-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.mistake-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  background: var(--accent);
}

.mistake-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}

.mistake-card__count {
  margin-left: auto;
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 10px;
}

.mistake-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.55;
  text-wrap: pretty;
}

.mistake-card__answer {
  display: inline-block;
  margin-bottom: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
}

.mistake-card details summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 11.5px;
  cursor: pointer;
  list-style: none;
}

.mistake-card details summary::-webkit-details-marker {
  display: none;
}

.mistake-card details summary::before {
  content: "→";
}

.mistake-card details[open] summary::before {
  content: "↓";
}

.mistake-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 6px;
}

.link-action {
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 10.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-action:hover {
  color: var(--ink);
}

.link-action--danger:hover {
  color: var(--red);
}

/* =========================================================
   弹窗 / Toast / 无脚本提示
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 37, 33, 0.46);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.modal__card {
  position: relative;
  width: min(420px, 100%);
  padding: 25px 26px 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 32px 80px rgba(10, 30, 25, 0.28);
  animation: modal-in 0.2s ease both;
}

.modal__card h2 {
  margin: 0 0 7px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.modal__card p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  z-index: 120;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fffdf8;
  font-size: 12.5px;
  box-shadow: 0 14px 36px rgba(10, 30, 25, 0.26);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 300;
  padding: 14px 18px;
  border: 1px solid #efd0c8;
  border-radius: 12px;
  background: var(--red-soft);
  color: #8f3426;
  font-size: 13px;
  text-align: center;
}

/* =========================================================
   动画
   ========================================================= */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(15, 107, 88, 0.1); }
  50% { box-shadow: 0 0 0 7px rgba(15, 107, 88, 0.035); }
}

/* =========================================================
   响应式
   ========================================================= */

@media (max-width: 900px) {
  .checkin-card {
    grid-template-columns: 1fr;
  }

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

  .wrong-list {
    max-height: none;
  }

  .result-hero {
    gap: 30px;
  }
}

@media (max-width: 700px) {
  .header-inner,
  .shell {
    padding-right: 16px;
    padding-left: 16px;
  }

  .shell {
    padding-top: 24px;
  }

  .header-note {
    display: none;
  }

  .checkin-card {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .checkin-card__streak strong {
    font-size: 54px;
  }

  .stats-strip {
    margin-bottom: 24px;
  }

  .stat {
    padding: 0 16px;
  }

  .stat__value {
    font-size: 30px;
  }

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

  .exam-panel__rules {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .exam-panel__rule {
    padding: 8px 0;
    border-right: 0;
    border-bottom: 1px dashed var(--line-strong);
  }

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

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

  .page-head--row {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .score-ring {
    width: 150px;
    height: 150px;
  }

  .score-ring__center strong {
    font-size: 36px;
  }

  .result-copy h1 {
    font-size: 34px;
  }

  .result-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-actions .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 520px) {
  .brand__text small {
    display: none;
  }

  .streak-pill {
    padding: 6px 10px;
    font-size: 10px;
  }

  .header-nav {
    gap: 8px;
  }

  .screen--quiz {
    padding: 20px 12px 36px;
  }

  .quiz-topbar {
    gap: 11px;
    margin-bottom: 15px;
  }

  .quiz-status {
    gap: 7px;
    font-size: 9.5px;
  }

  .quiz-status__sep {
    display: none;
  }

  .question-card {
    padding: 22px 17px 20px;
    border-radius: 21px;
  }

  .question-stem {
    margin-bottom: 19px;
    font-size: 19px;
    line-height: 1.5;
  }

  .option {
    gap: 11px;
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 13.5px;
  }

  .option__key {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 10.5px;
  }

  .question-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .question-actions__left {
    justify-content: space-between;
  }

  .question-actions__hint {
    font-size: 10px;
  }

  .question-actions .btn {
    width: 100%;
  }

  .keyboard-hint {
    display: none;
  }

  .exam-panel {
    padding: 20px 18px;
  }

  .profile-stat {
    padding: 13px 14px;
  }

  .profile-stat strong {
    font-size: 25px;
  }

  .chapter-row {
    padding: 12px 13px;
  }

  .chapter-row__btn {
    padding: 7px 12px;
  }
}

/* =========================================================
   按学期练习
   ========================================================= */

.semester-section {
  margin-top: 34px;
  margin-bottom: 6px;
}

.semester-section .section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.section-head__note {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
}

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

.semester-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 148px;
  padding: 15px 14px 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255, 253, 248, 0.7);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.semester-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
}

.semester-card:hover {
  border-color: var(--accent);
  background: var(--card);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.semester-card__top {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding-top: 3px;
}

.semester-card__index {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 600;
  line-height: 1;
}

.semester-card__short {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
}

.semester-card__body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.semester-card__body strong {
  font-size: 13px;
  line-height: 1.35;
}

.semester-card__body small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.semester-card__meta {
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  line-height: 1.4;
}

.semester-card__track {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-2);
}

.semester-card__track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.semester-card__arrow {
  flex: none;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.semester-composite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.semester-composite:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.semester-composite__copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.semester-composite__kicker {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.semester-composite__copy strong {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.semester-composite__copy small {
  color: var(--muted);
  font-size: 11.5px;
}

.semester-composite__action {
  flex: none;
  padding: 10px 17px;
  border-radius: 999px;
  background: var(--accent);
  color: #fffdf8;
  font-size: 12.5px;
  font-weight: 600;
}

.semester-chapter-head {
  margin-top: 26px;
}

/* =========================================================
   2026 真题专区
   ========================================================= */

.exam-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  margin-bottom: 30px;
  padding: 27px 30px;
  overflow: hidden;
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 0%, rgba(214, 154, 45, 0.22), transparent 42%),
    linear-gradient(135deg, #133f35 0%, #0b2a24 100%);
  color: #f4efe1;
  box-shadow: 0 24px 48px -26px rgba(11, 42, 36, 0.6);
}

.exam-banner::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(240, 215, 155, 0.12);
  border-radius: 50%;
}

.exam-banner .section-kicker {
  color: #e0b25b;
}

.exam-banner h2 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.exam-banner p {
  max-width: 620px;
  margin: 0 0 16px;
  color: rgba(244, 239, 225, 0.72);
  font-size: 13px;
  line-height: 1.7;
}

.exam-banner p strong {
  color: #f0d79b;
  font-family: var(--font-mono);
  font-size: 15px;
}

.exam-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.exam-banner .btn--primary {
  border-color: #f0d79b;
  background: #f0d79b;
  color: #182521;
  box-shadow: none;
}

.exam-banner .btn--primary:hover {
  border-color: #f7e5b9;
  background: #f7e5b9;
}

.exam-banner .btn--ghost {
  border-color: rgba(244, 239, 225, 0.28);
  background: transparent;
  color: #f4efe1;
}

.exam-banner .btn--ghost:hover {
  border-color: rgba(244, 239, 225, 0.6);
  background: rgba(255, 255, 255, 0.06);
}

.exam-banner__stats {
  display: flex;
  gap: 18px;
  flex: none;
  padding: 16px 20px;
  border: 1px solid rgba(244, 239, 225, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.exam-banner__stats div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 52px;
}

.exam-banner__stats strong {
  color: #f0d79b;
  font-family: var(--font-serif);
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  line-height: 1.1;
}

.exam-banner__stats span {
  color: rgba(244, 239, 225, 0.55);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

.exam-bank-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.exam-bank-summary span {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 11px;
}

.exam-topic-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.exam-topic-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.7);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.exam-topic-card:hover {
  border-color: var(--accent);
  background: var(--card);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.exam-topic-card__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--accent);
  color: #fffdf8;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.exam-topic-card__body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.exam-topic-card__name {
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-topic-card__meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.exam-topic-card__track {
  display: block;
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--paper-2);
}

.exam-topic-card__track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.exam-topic-card__arrow {
  flex: none;
  color: var(--muted);
  font-size: 14px;
}

/* =========================================================
   题目内联公式 / 图片 / 大题作答
   ========================================================= */

.question-body {
  margin-bottom: 20px;
  color: var(--ink);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.65;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.question-body--long {
  font-size: 17.5px;
  font-weight: 500;
  line-height: 1.78;
}

.explain__body {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.78;
}

.explain__body .inline-eq {
  height: 1.4em;
}

.question-body .inline-eq {
  display: inline-block;
  height: 1.35em;
  width: auto;
  max-width: 100%;
  margin: 0 2px;
  vertical-align: -0.28em;
}

.question-body .question-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 460px;
  margin: 12px auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

img.is-broken {
  display: block;
  min-height: 72px;
  padding: 12px;
  border: 1px dashed var(--red);
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 12px;
  line-height: 1.5;
}

img.inline-eq.is-broken {
  display: inline-block;
  min-height: 1.6em;
  height: 1.6em;
  padding: 0 4px;
  vertical-align: -0.28em;
}

.question-figures {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.question-figures img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 420px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

.blank-field {
  display: inline-block;
  max-width: 100%;
  margin: 0 2px;
  vertical-align: baseline;
}

.blank-input {
  width: clamp(118px, 24vw, 260px);
  max-width: 100%;
  padding: 1px 7px 2px;
  border: 0;
  border-bottom: 1.5px solid var(--line-strong);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.94em;
  line-height: 1.5;
  text-align: center;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.blank-input::placeholder {
  color: var(--muted);
  font-size: 0.8em;
}

.blank-input:focus {
  border-bottom-color: var(--green);
  background: var(--green-soft);
}

.blank-input:disabled {
  border-bottom-style: dashed;
  opacity: 0.8;
}

.inline-answer-hint {
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 11px;
}

.answer-box {
  margin-bottom: 14px;
}

.answer-box label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.answer-box textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fffefa;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.7;
}

.answer-box textarea:focus {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.answer-box textarea::placeholder {
  color: var(--muted);
}

.reveal-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.reveal-bar span {
  color: var(--muted);
  font-size: 11px;
}

.reference-panel {
  margin-bottom: 14px;
  padding: 17px 19px;
  border-left: 3px solid var(--green);
  border-radius: 0 13px 13px 0;
  background: var(--green-soft);
}

.reference-panel__label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.reference-panel__body {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.8;
}

.reference-panel__body .inline-eq {
  height: 1.4em;
}

.reference-panel__body .question-image {
  max-height: 320px;
}

.self-grade {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.self-grade__label {
  color: var(--muted);
  font-size: 11px;
}

.self-grade .btn--correct {
  border-color: var(--green);
  background: var(--green);
  color: #fffdf8;
}

.self-grade .btn--wrong {
  border-color: var(--red);
  background: transparent;
  color: var(--red);
}

.graded-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 11.5px;
}

.chip--source {
  background: var(--amber-soft);
  color: #8a5c0a;
}

.chip--paper {
  background: var(--ink);
  color: #fffdf8;
}

/* =========================================================
   响应式补充
   ========================================================= */

@media (max-width: 900px) {
  .home-dashboard {
    max-width: 560px;
    padding: 8px 12px 22px;
  }

  .dashboard-row {
    grid-template-columns: 82px minmax(0, 1fr) 82px;
    min-height: 250px;
  }

  .big-orb {
    width: 198px;
    height: 198px;
  }

  .side-icons {
    gap: 26px;
  }

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

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

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

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

@media (max-width: 380px) {
  .home-feature {
    gap: 9px;
    padding: 12px;
  }

  .home-feature__icon {
    width: 36px;
    height: 36px;
    font-size: 19px;
  }

  .home-feature__body strong {
    font-size: 17px;
  }

  .home-feature__body small {
    font-size: 10px;
  }

  .home-feature__meta strong {
    font-size: 15px;
  }

  .home-feature__meta small {
    font-size: 8px;
  }

  .home-row__body strong {
    font-size: 12.5px;
  }

  .home-row__meta {
    font-size: 8px;
  }

  .dashboard-row {
    grid-template-columns: 62px minmax(0, 1fr) 62px;
    min-height: 212px;
  }

  .big-orb {
    width: 160px;
    height: 160px;
  }

  .big-orb strong {
    font-size: 21px;
  }

  .dash-icon__badge {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 17px;
  }

  .dash-icon__label {
    font-size: 11px;
  }

  .side-icons {
    gap: 17px;
  }

  .dash-icon__tag {
    right: calc(50% - 33px);
  }
}

@media (max-width: 520px) {
  .home-list {
    padding: 12px 12px 24px;
  }

  .home-list__head {
    padding-bottom: 14px;
  }

  .home-list__head h1 {
    font-size: 30px;
  }

  .home-feature {
    gap: 11px;
    padding: 14px 14px;
    border-radius: 18px;
  }

  .home-feature__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 21px;
  }

  .home-feature__body strong {
    font-size: 19px;
  }

  .home-feature__meta strong {
    font-size: 17px;
  }

  .home-feature__arrow {
    font-size: 19px;
  }

  .home-row {
    gap: 10px;
    padding: 12px 12px;
  }

  .home-row__icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 15px;
  }

  .home-row__meta {
    font-size: 8.8px;
  }

  .home-list__stats {
    gap: 14px;
    font-size: 9.5px;
  }

  .home-list__stats strong {
    font-size: 11px;
  }

  .home-dashboard {
    padding: 2px 8px 18px;
  }

  .dashboard-row {
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    gap: 2px;
    min-height: 232px;
  }

  .side-icons {
    gap: 20px;
  }

  .dash-icon {
    gap: 6px;
  }

  .dash-icon__badge {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    font-size: 20px;
  }

  .dash-icon__label {
    font-size: 12px;
  }

  .dash-icon__tag {
    right: calc(50% - 38px);
    font-size: 7.5px;
  }

  .big-orb {
    width: 196px;
    height: 196px;
    gap: 4px;
  }

  .big-orb::before {
    inset: -10px;
  }

  .big-orb::after {
    inset: -7px;
    border-width: 2px;
  }

  .big-orb strong {
    font-size: 25px;
  }

  .big-orb__progress {
    font-size: 11.5px;
  }

  .big-orb__hint {
    font-size: 10.5px;
  }

  .dashboard-stats {
    gap: 14px;
    font-size: 10px;
  }

  .dashboard-stats strong {
    font-size: 11.5px;
  }

  .semester-section .section-head {
    display: block;
  }

  .semester-composite {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .semester-composite__action {
    text-align: center;
  }

  .section-head__note {
    margin-top: 4px;
  }

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

  .semester-card {
    min-height: 0;
  }

  .exam-banner {
    padding: 22px 18px;
    border-radius: 20px;
  }

  .exam-banner h2 {
    font-size: 24px;
  }

  .exam-banner__stats {
    gap: 10px;
    padding: 12px 14px;
  }

  .exam-banner__stats strong {
    font-size: 23px;
  }

  .question-body {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   用户名登录
   ========================================================= */

body.login-open {
  overflow: hidden;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 18% 10%, rgba(15, 107, 88, 0.12), transparent 32rem),
    radial-gradient(circle at 86% 90%, rgba(214, 154, 45, 0.14), transparent 28rem),
    rgba(246, 243, 235, 0.96);
  backdrop-filter: blur(12px);
}

.login-overlay[hidden] {
  display: none;
}

.login-card {
  width: min(430px, 100%);
  padding: 32px 30px 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: 0 30px 80px rgba(28, 45, 38, 0.2);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.login-brand .brand__mark {
  width: 34px;
  height: 34px;
  font-size: 18px;
}

.login-card h1 {
  margin: 3px 0 7px;
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.login-card label {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.login-card input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.login-card input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 107, 88, 0.12);
}

.login-error {
  min-height: 18px;
  margin: 5px 0 8px;
  color: var(--red);
  font-size: 10.5px;
}

.login-actions {
  display: flex;
  gap: 9px;
}

.login-actions .btn {
  flex: 1;
}

.login-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  text-align: center;
}

.header-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 150px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 10.5px;
  cursor: pointer;
}

.header-user:hover {
  border-color: var(--line-strong);
  background: var(--paper-2);
}

.header-user__avatar {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  flex: none;
  border-radius: 50%;
  background: var(--green);
  color: #fffdf8;
  font-size: 10px;
  font-weight: 700;
}

#header-username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-user {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.profile-user:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.profile-user__avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  background: linear-gradient(145deg, #7bdcb9, #41b78f);
  color: #fffdf8;
  font-size: 18px;
  font-weight: 700;
}

.profile-user__body {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.profile-user__body strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-user__body small {
  color: var(--muted);
  font-size: 10px;
}

.profile-user__action {
  flex: none;
  color: var(--muted);
  font-size: 10.5px;
}

@media (max-width: 520px) {
  .login-card {
    padding: 26px 20px 22px;
  }

  .login-card h1 {
    font-size: 30px;
  }

  .header-user {
    max-width: 105px;
  }
}

/* =========================================================
   拍照 AI 批改
   ========================================================= */

.photo-overlay {
  position: fixed;
  inset: 0;
  z-index: 2600;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(24, 37, 33, 0.42);
  backdrop-filter: blur(8px);
}

.photo-overlay[hidden] {
  display: none;
}

.photo-card {
  width: min(560px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 28px 80px rgba(14, 28, 22, 0.28);
}

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

.photo-head h2 {
  margin: 2px 0 0;
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 600;
}

.photo-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.photo-question {
  display: -webkit-box;
  overflow: hidden;
  margin: 14px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.photo-preview-wrap {
  margin: 12px 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}

.photo-preview-wrap img {
  display: block;
  width: 100%;
  max-height: 300px;
  border-radius: 9px;
  object-fit: contain;
}

.photo-tip {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.photo-status {
  min-height: 20px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.photo-status.is-error {
  color: var(--red);
}

.photo-result {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.photo-score {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.photo-score strong {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 600;
  line-height: 1;
}

.photo-score .pill {
  margin-left: 8px;
}

.photo-score .pill--ok { background: var(--green-soft); color: var(--green); }
.photo-score .pill--bad { background: var(--red-soft); color: var(--red); }

.photo-block {
  margin-top: 13px;
}

.photo-block h3 {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.photo-block p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.photo-appeal {
  margin-top: 17px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.photo-appeal textarea {
  display: block;
  width: 100%;
  min-height: 70px;
  box-sizing: border-box;
  margin: 9px 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  resize: vertical;
}

.photo-appeal-status {
  min-height: 18px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.photo-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.photo-entry span {
  color: var(--muted);
  font-size: 10.5px;
}

@media (max-width: 520px) {
  .photo-card {
    padding: 18px;
    border-radius: 20px;
  }

  .photo-head h2 {
    font-size: 24px;
  }

  .photo-preview-wrap img {
    max-height: 220px;
  }
}

body.photo-open { overflow: hidden; }

/* =========================================================
   学习反馈
   ========================================================= */

.feedback-compose {
  margin-bottom: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.feedback-compose > label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}

.feedback-compose textarea {
  width: 100%;
  min-height: 92px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
}

.feedback-compose__actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

.feedback-image-preview {
  margin-top: 10px;
}

.feedback-image-preview img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.feedback-status {
  min-height: 18px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10.5px;
}

.feedback-status.is-error { color: var(--red); }

.feedback-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.feedback-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.feedback-card__head strong {
  font-size: 12.5px;
}

.feedback-card__head span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
}

.feedback-message {
  margin-top: 10px;
}

.feedback-message__meta {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9.5px;
}

.feedback-message__bubble {
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--paper-2);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.feedback-message--teacher .feedback-message__bubble {
  border-left: 3px solid var(--green);
  background: var(--green-soft);
  color: var(--ink);
}

.feedback-message img,
.feedback-message video {
  display: block;
  max-width: 100%;
  max-height: 280px;
  margin-top: 7px;
  border-radius: 9px;
}

.feedback-message a {
  display: inline-block;
  margin-top: 6px;
  color: var(--green);
  font-size: 11px;
  text-decoration: underline;
}

.feedback-card__unread {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 8px;
}
