:root {
  --bg: #f4f7f2;
  --bg-deep: #e7eee4;
  --surface: #ffffff;
  --surface-2: #f7faf5;
  --ink: #1c2a22;
  --ink-2: #35443b;
  --muted: #66766c;
  --faint: #8a9a90;
  --line: #dce5da;
  --line-2: #c9d6c8;
  --green: #58cc02;
  --green-strong: #4cb800;
  --green-deep: #3d8f00;
  --green-dark: #2f6e00;
  --green-pale: #e9f8d9;
  --green-wash: #f2fbea;
  --orange: #ff9600;
  --orange-deep: #b96a00;
  --orange-pale: #fff3df;
  --red: #e5484d;
  --red-deep: #b4232a;
  --red-pale: #fdecec;
  --red-line: #f3c9cb;
  --blue: #1cb0f6;
  --blue-deep: #075f88;
  --blue-pale: #e8f6fd;
  --blue-line: #b9e4f8;
  --purple: #ce82ff;
  --purple-deep: #6b2fa0;
  --purple-pale: #f4e9ff;
  --purple-line: #e1c8f8;
  --yellow: #ffc800;
  --yellow-deep: #7a5a00;
  --yellow-pale: #fff8d9;
  --yellow-line: #f0dfa0;
  --font-display: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC", "SimSun", serif;
  --font-num: "SF Pro Display", "DIN Alternate", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #dde6db;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}

body.app-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
ol,
figure,
blockquote {
  margin: 0;
  padding: 0;
}

ol {
  list-style: none;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.screen {
  width: 390px;
  height: 844px;
  flex: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
  position: relative;
  padding-top: 16px;
}

.statusbar {
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}

.status-time {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-icons .icon {
  width: 15px;
  height: 15px;
}

.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--muted);
  line-height: 1.2;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--ink-2);
  transition: transform 180ms var(--ease), border-color 180ms var(--ease);
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn .icon {
  width: 20px;
  height: 20px;
}

.btn {
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.015em;
  white-space: nowrap;
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background-color 180ms var(--ease);
}

.btn .icon {
  width: 19px;
  height: 19px;
}

.btn-primary {
  background: var(--green);
  color: #10240b;
  box-shadow: 0 4px 0 var(--green-deep);
}

.btn-primary:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--green-deep);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink-2);
  border: 2px solid var(--line-2);
  box-shadow: 0 4px 0 var(--line-2);
}

.btn-secondary:active {
  transform: translateY(4px);
  box-shadow: 0 0 0 var(--line-2);
}

.btn-block {
  width: 100%;
}

.tabbar {
  height: 64px;
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 5px 8px 7px;
  background: var(--surface);
  border-top: 2px solid var(--line);
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tab .icon {
  width: 21px;
  height: 21px;
}

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

.tab.is-active::after {
  content: "";
  position: absolute;
  bottom: 1px;
  width: 18px;
  height: 3px;
  border-radius: 3px;
  background: var(--green);
}

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

.today-head {
  height: 64px;
  flex: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
}

.today-head h1 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.005em;
}

.head-sub {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 500;
}

.streak-chip {
  margin-top: 4px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  background: var(--orange-pale);
  color: var(--orange-deep);
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
  flex: none;
}

.streak-chip .icon {
  width: 14px;
  height: 14px;
}

.today-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 10px;
}

.countdown-card {
  flex: none;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 4px 0 var(--line-2);
}

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

.countdown {
  margin-top: 3px;
  display: flex;
  align-items: baseline;
  gap: 5px;
  line-height: 0.95;
}

.countdown .num {
  font-size: 58px;
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.countdown-unit {
  font-size: 17px;
  font-weight: 800;
  color: var(--green-dark);
  letter-spacing: 0.02em;
}

.countdown-note {
  padding-top: 3px;
  text-align: right;
  font-size: 9.5px;
  line-height: 1.55;
  color: var(--muted);
  font-weight: 500;
}

.subject-row {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.subject-pill {
  min-width: 0;
  padding: 6px 9px 7px;
  border-radius: 10px;
  background: var(--surface-2);
}

.subject-pill span {
  display: block;
  font-size: 9px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
}

.subject-pill b {
  display: block;
  margin-top: 1px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--ink);
}

.subject-pill.is-good {
  background: var(--green-pale);
}

.subject-pill.is-good b {
  color: var(--green-dark);
}

.subject-pill.is-empty b {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.subject-pill.is-low b {
  color: var(--orange-deep);
}

.subject-pill.is-info b {
  color: var(--blue-deep);
}

.subject-pill b em {
  font-style: normal;
  margin-left: 1px;
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0;
}

.subject-cap {
  margin: 7px 0 0;
  font-size: 10px;
  line-height: 1.45;
  color: var(--faint);
  letter-spacing: .01em;
}

.task-section {
  flex: none;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
  margin-bottom: 7px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.section-meta {
  font-size: 9.5px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

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

.task {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.task.is-done {
  background: var(--surface-2);
}

.task.is-now {
  background: var(--green-wash);
  border-color: #c9e9aa;
}

.task-index {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--faint);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: 800;
}

.task.is-done .task-index {
  background: var(--green-deep);
  color: #ffffff;
}

.task.is-now .task-index {
  background: var(--green);
  color: #10240b;
}

.task-index .icon {
  width: 15px;
  height: 15px;
}

.task-body {
  flex: 1;
  min-width: 0;
}

.task-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.task.is-done .task-title {
  color: var(--muted);
}

.task-now {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--green);
  color: #10240b;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.task-meta {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.3;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-time {
  flex: none;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink-2);
}

.task.is-done .task-time {
  color: var(--muted);
}

.week-card {
  flex: none;
  margin-top: auto;
  padding: 11px 12px 12px;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

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

.week-days {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.day > span {
  font-size: 8.5px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
}

.day > b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--faint);
}

.day > b .icon {
  width: 13px;
  height: 13px;
}

.day.is-done > b {
  border-color: var(--green-deep);
  background: var(--green-deep);
  color: #ffffff;
}

.day.is-today > b {
  border-color: var(--green-deep);
  box-shadow: 0 0 0 3px var(--green-pale);
}

.week-count {
  flex: none;
  text-align: right;
  padding-top: 2px;
}

.week-count b {
  display: block;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  color: var(--green-dark);
}

.week-count span {
  display: block;
  margin-top: 2px;
  font-size: 8.5px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
}

.week-stats {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1.5px solid var(--line);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 12px;
}

.mini-stat > span {
  display: block;
  font-size: 8.5px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
}

.mini-stat > b {
  display: block;
  margin-top: 1px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--ink);
}

.mini-stat > b small {
  font-size: 9px;
  color: var(--muted);
  font-weight: 600;
}

.mini-stat.is-warn > b {
  color: var(--orange-deep);
}

.mini-bar {
  height: 5px;
  margin-top: 4px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
}

.mini-bar > i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--green);
}

.quiz-head {
  height: 58px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}

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

.quiz-kicker {
  font-size: 9px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.quiz-title {
  margin-top: 1px;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.timer {
  height: 30px;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 800;
}

.timer .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.quiz-overview {
  flex: none;
  padding: 0 16px 8px;
}

.overview-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.overview-label {
  font-size: 10px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--muted);
}

.overview-label b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
}

.overview-current {
  font-size: 10px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.overview-current b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  line-height: 1;
  font-weight: 800;
  color: var(--ink);
}

.qmap {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 4px;
}

.qcell {
  height: 6px;
  border-radius: 2px;
  background: var(--line);
}

.qcell.is-good {
  background: #b7e48c;
}

.qcell.is-bad {
  background: var(--red);
}

.qcell.is-mark {
  background: var(--orange);
}

.qcell.is-neutral {
  background: var(--blue);
  opacity: 0.55;
}

.qcell.is-current {
  background: var(--ink);
  box-shadow: 0 0 0 2px var(--bg);
  position: relative;
  z-index: 1;
}

.overview-legend {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 9.5px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
}

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

.overview-legend b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  color: var(--ink);
  font-weight: 800;
}

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.is-good {
  background: var(--green);
}

.legend-dot.is-bad {
  background: var(--red);
}

.legend-dot.is-mark {
  background: var(--orange);
}

.quiz-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 0;
}

.q-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.q-no {
  font-size: 10px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
}

.q-no b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--green-dark);
  font-weight: 800;
}

.q-type {
  font-size: 9px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
}

.q-feedback {
  margin-left: auto;
  height: 21px;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.q-feedback.is-bad {
  background: var(--red-pale);
  color: var(--red-deep);
}

.q-stem {
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.62;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.005em;
}

.q-stem b {
  font-weight: 800;
}

.options {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 13px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  text-align: left;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease), transform 180ms var(--ease);
}

.option:active {
  transform: scale(0.985);
}

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

.option.is-correct {
  border-color: var(--green-deep);
  background: var(--green-pale);
}

.option.is-wrong {
  border-color: var(--red);
  background: var(--red-pale);
}

.opt-letter {
  width: 32px;
  height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 800;
}

.option.is-selected .opt-letter {
  border-color: var(--green);
  background: var(--green);
  color: #10240b;
}

.option.is-correct .opt-letter {
  border-color: var(--green-deep);
  background: var(--green-deep);
  color: #ffffff;
}

.option.is-wrong .opt-letter {
  border-color: var(--red);
  background: var(--red);
  color: #ffffff;
}

.opt-text {
  flex: 1;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink);
}

.opt-check {
  width: 20px;
  height: 20px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--green-dark);
  opacity: 0;
}

.option.is-selected .opt-check {
  opacity: 1;
}

.option.is-correct .opt-check {
  opacity: 1;
}

.option.is-wrong .opt-check {
  opacity: 0;
}

.opt-check .icon {
  width: 18px;
  height: 18px;
}

.option.is-wrong .opt-check {
  color: var(--red-deep);
}

.quiz-tools {
  margin-top: auto;
  padding: 12px 0 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tool {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 2px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.tool .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.tool.is-on {
  border-color: var(--orange);
  background: var(--orange-pale);
  color: var(--orange-deep);
}

.tool.is-on .icon {
  color: var(--orange-deep);
}

.quiz-foot {
  height: 64px;
  flex: none;
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 10px;
  padding: 4px 16px 8px;
}

.quiz-foot .btn {
  width: 100%;
}

.report-head {
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
}

.report-head h1 {
  flex: 1;
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.report-head-spacer {
  width: 44px;
  height: 44px;
  flex: none;
}

.report-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 16px 0;
}

.report-title-block {
  flex: none;
}

.report-title-block .eyebrow {
  font-size: 9px;
  letter-spacing: 0.04em;
}

.essay-title {
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.score-card {
  flex: none;
  padding: 9px 12px 10px;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.score-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.score-main {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.score-num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 44px;
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.score-den {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  line-height: 1;
  font-weight: 600;
  color: var(--muted);
}

.score-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.range-pill {
  height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.score-label {
  font-size: 8px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
}

.score-disclaimer {
  margin-top: 3px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 3px 7px;
  border: 1.5px solid var(--yellow-line);
  border-radius: 7px;
  background: var(--yellow-pale);
  color: var(--yellow-deep);
  font-size: 10px;
  line-height: 1.35;
  font-weight: 600;
}

.score-disclaimer .icon {
  width: 11px;
  height: 11px;
  margin-top: 1px;
}

.score-parts {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.part {
  min-width: 0;
  padding: 0 5px;
}

.part + .part {
  border-left: 1.5px solid var(--line);
}

.part-label {
  display: block;
  font-size: 8px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.part-value {
  display: block;
  margin-top: 1px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.part-value span {
  font-size: 8px;
  color: var(--muted);
  font-weight: 600;
}

.part-bar {
  height: 3px;
  margin-top: 3px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
}

.part-bar i {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
  background: var(--green);
}

.part.is-weak .part-value {
  color: var(--orange-deep);
}

.part.is-weak .part-bar i {
  background: var(--orange);
}

.findings-block {
  flex: none;
}

.findings-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  padding: 0 1px;
}

.findings-head h2 {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 11.5px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.findings-head h2 .icon {
  width: 13px;
  height: 13px;
}

.findings-head h2.is-hard {
  color: var(--red-deep);
}

.findings-head h2.is-fix {
  color: var(--green-dark);
}

.findings-meta {
  font-size: 8.5px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.findings-meta.is-hard {
  color: var(--red-deep);
}

.findings {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.finding {
  border-radius: 12px;
  padding: 8px 10px;
}

.finding--hard {
  background: #fff7f7;
  border: 2px solid var(--red-line);
}

.finding--fix {
  background: var(--surface);
  border: 2px solid var(--line);
  padding: 7px 10px;
}

.finding.is-target {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

.finding-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.finding-flag {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--red-deep);
  font-size: 8.5px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.finding-flag .icon {
  width: 12px;
  height: 12px;
}

.finding-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--ink);
}

.finding-desc {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 500;
}

.finding-desc span:last-child {
  min-width: 0;
}

.quote {
  margin-top: 3px;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 500;
}

.finding--fix .quote {
  background: var(--surface-2);
}

.quote .icon {
  width: 10px;
  height: 10px;
  margin-top: 1px;
  color: var(--faint);
}

.fix-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fix-rank {
  width: 19px;
  height: 19px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--green-pale);
  color: var(--green-dark);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 8.5px;
  font-weight: 800;
}

.fix-title {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--ink);
}

.fix-delta {
  flex: none;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--red-deep);
}

.fix-desc {
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 500;
}

.ev {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 17px;
  padding: 0 5px;
  border-radius: 5px;
  font-size: 8.5px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.ev .icon {
  width: 10px;
  height: 10px;
}

.ev-official {
  background: var(--ink);
  color: #ffffff;
}

.ev-rule {
  background: var(--surface-2);
  border: 1.5px solid var(--line-2);
  color: var(--ink-2);
}

.ev-exam {
  background: var(--blue-pale);
  border: 1.5px solid var(--blue-line);
  color: var(--blue-deep);
}

.ev-book {
  background: var(--purple-pale);
  border: 1.5px solid var(--purple-line);
  color: var(--purple-deep);
}

.ev-lore {
  background: transparent;
  border: 1.5px dashed var(--line-2);
  color: var(--muted);
}

.evidence-legend {
  flex: none;
  margin-top: auto;
  padding-top: 5px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.legend-label {
  font-size: 8.5px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--muted);
  margin-right: 1px;
}

.evidence-legend .ev {
  height: 16px;
  font-size: 8px;
  padding: 0 4px;
}

.evidence-legend .ev .icon {
  width: 9px;
  height: 9px;
}

.report-foot {
  height: 60px;
  flex: none;
  padding: 4px 16px 4px;
}

.report-foot .btn {
  width: 100%;
  height: 52px;
}

.data-head {
  height: 56px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
}

.data-head h1 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0.005em;
}

.data-head .eyebrow {
  margin-top: 2px;
  font-size: 9px;
}

.data-range {
  height: 25px;
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1.5px solid #c9e9aa;
  border-radius: var(--r-pill);
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}

.data-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 10px;
}

.forecast-card {
  flex: none;
  padding: 14px;
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 4px 0 #14201a;
}

.forecast-card .eyebrow {
  color: #a9b8af;
}

.forecast-card .forecast-score > b {
  color: #b7f36a;
}

.forecast-card .forecast-recent {
  color: #c4d0c8;
}

.forecast-card .forecast-recent b {
  color: #f6faf4;
}

.forecast-card .pass-pill {
  background: #24352b;
  border-color: #3a4d40;
  color: #ffd28a;
}

.forecast-card .section-head h2 {
  color: #f6faf4;
}

.forecast-card .section-head .section-meta {
  color: #a9b8af;
}

.forecast-card .chart-wrap {
  background: #16241c;
}

.forecast-card .chart text {
  fill: #a9b8af;
}

.forecast-card .chart .grid {
  stroke: #33443a;
}

.forecast-card .chart .area {
  fill: #2f4a31;
}

.forecast-card .chart .dot {
  fill: #16241c;
  stroke: var(--green);
}

.forecast-card .chart .dot-last {
  fill: var(--green);
  stroke: #16241c;
}

.forecast-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.forecast-score {
  margin-top: 2px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.forecast-score > b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 46px;
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink);
}

.forecast-recent {
  font-size: 9px;
  line-height: 1.3;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.forecast-recent b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  color: var(--ink-2);
  font-weight: 800;
}

.pass-pill {
  height: 24px;
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border: 1.5px solid #f2d39a;
  border-radius: var(--r-pill);
  background: var(--orange-pale);
  color: var(--orange-deep);
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}

.chart-wrap {
  margin-top: 6px;
  padding: 4px 6px 2px;
  border-radius: 10px;
  background: var(--green-wash);
}

.chart {
  display: block;
  width: 100%;
  height: 146px;
}

.chart text {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  fill: var(--muted);
}

.chart .grid {
  stroke: var(--line);
  stroke-width: 1;
}

.chart .pass {
  stroke: var(--orange);
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
}

.chart .area {
  fill: #edf9df;
}

.chart .line {
  fill: none;
  stroke: var(--green);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart .dot {
  fill: var(--surface);
  stroke: var(--green);
  stroke-width: 2;
}

.chart .dot-last {
  fill: var(--green);
  stroke: var(--surface);
  stroke-width: 2;
}

.kpi-grid {
  flex: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kpi-card {
  min-width: 0;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.kpi-label {
  display: block;
  font-size: 9px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
}

.kpi-value {
  display: block;
  margin-top: 1px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 23px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--ink);
}

.kpi-value.is-warn {
  color: var(--orange-deep);
}

.kpi-sub {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  line-height: 1.3;
  color: var(--muted);
  font-weight: 500;
}

.kpi-sub b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  color: var(--green-dark);
}

.domains {
  flex: none;
}

.domains-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding: 0 1px;
}

.domains-head h2 {
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.domains-head span {
  font-size: 8.5px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.domain-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.domain {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 42px 26px;
  align-items: center;
  gap: 8px;
  height: 36px;
}

.domain-name {
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
}

.domain-track {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
}

.domain-fill {
  display: block;
  height: 100%;
  border-radius: var(--r-pill);
}

.domain-fill.is-low {
  background: var(--orange);
}

.domain-fill.is-mid {
  background: var(--yellow);
}

.domain-fill.is-good {
  background: var(--green);
}

.domain-value {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--ink);
  text-align: right;
}

.domain-status {
  font-size: 8.5px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
}

.domain-status.is-low {
  color: var(--orange-deep);
}

.domain-status.is-mid {
  color: var(--yellow-deep);
}

.domain-status.is-good {
  color: var(--green-dark);
}

.subject-block {
  margin-top: auto;
  flex: none;
}

.subject-block .section-head {
  margin-bottom: 6px;
}

.subject-block h2 {
  font-family: var(--font-display);
  font-size: 11.5px;
  line-height: 1.2;
  font-weight: 800;
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.subject-card {
  min-width: 0;
  padding: 8px 10px 9px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.subject-card span {
  display: block;
  font-size: 8.5px;
  line-height: 1.2;
  color: var(--muted);
  font-weight: 600;
}

.subject-card b {
  display: block;
  margin-top: 1px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 19px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--ink);
}

.subject-card small {
  display: block;
  margin-top: 1px;
  font-size: 8px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--muted);
}

.subject-card.is-good b,
.subject-card.is-good small {
  color: var(--green-dark);
}

.subject-card.is-warn b,
.subject-card.is-warn small {
  color: var(--orange-deep);
}

.subject-card.is-empty b {
  color: var(--muted);
}

.preview-body {
  min-height: 100vh;
  background: #121a15;
  color: #f3f7f1;
  overflow-x: hidden;
}

.preview-head {
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 30px 32px 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.preview-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9.5px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #9fb0a3;
}

.preview-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
}

.preview-title {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #f6faf4;
}

.preview-sub {
  margin-top: 5px;
  font-size: 10.5px;
  line-height: 1.4;
  color: #8fa195;
  font-weight: 500;
}

.preview-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.preview-pill {
  height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1.5px solid #2d4033;
  border-radius: var(--r-pill);
  background: #17241b;
  color: #b7c8b8;
  font-size: 8.5px;
  font-weight: 700;
  white-space: nowrap;
}

.preview-scale {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  min-width: 38px;
  text-align: right;
}

.preview-stage {
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 32px 20px;
  overflow: hidden;
}

.preview-board {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  transform-origin: top left;
  will-change: transform;
}

.preview-frame {
  width: 390px;
  flex: none;
}

.preview-frame figcaption {
  height: 31px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 0 2px 7px;
}

.preview-no {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 8.5px;
  font-weight: 800;
  color: var(--green);
  letter-spacing: 0.04em;
}

.preview-frame figcaption a {
  font-size: 11.5px;
  font-weight: 800;
  color: #eef5ec;
}

.preview-file {
  margin-left: auto;
  font-size: 8.5px;
  font-weight: 500;
  color: #8fa195;
}

.preview-frame iframe {
  width: 390px;
  height: 844px;
  display: block;
  border: 0;
  box-shadow: 0 0 0 1px #2a3b30;
  background: #ffffff;
}

.preview-foot {
  width: 100%;
  max-width: 1720px;
  margin: 0 auto;
  padding: 0 32px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 9.5px;
  line-height: 1.5;
  color: #8fa195;
}

.preview-foot b {
  color: #a7b8aa;
  font-weight: 700;
}

@media (max-width: 720px) {
  .preview-head {
    padding: 22px 18px 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .preview-title {
    font-size: 24px;
  }

  .preview-stage {
    padding: 0 18px 16px;
  }

  .preview-foot {
    padding: 0 18px 22px;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (hover: hover) {
  .icon-btn:hover {
    border-color: var(--line-2);
  }

  .btn-primary:hover {
    background: var(--green-strong);
  }

  .btn-secondary:hover {
    border-color: var(--faint);
  }

  .option:hover {
    border-color: var(--green);
  }

  .tool:hover {
    border-color: var(--line-2);
  }

  .tab:hover {
    color: var(--ink-2);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}

/* ---------- m2 · 题号导航 ---------- */

.quiz-tools {
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.quiz-tools .tool {
  gap: 4px;
  font-size: 10px;
}

.qsheet-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.qsheet-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 32, 26, 0.42);
  opacity: 0;
  transition: opacity 200ms ease;
}

.qsheet {
  position: relative;
  z-index: 1;
  height: 68%;
  display: flex;
  flex-direction: column;
  padding: 14px 16px 12px;
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  box-shadow: 0 -14px 40px rgba(20, 32, 26, 0.22);
  transform: translateY(18px);
  opacity: 0;
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
}

.qsheet-layer.is-open .qsheet-scrim {
  opacity: 1;
}

.qsheet-layer.is-open .qsheet {
  transform: translateY(0);
  opacity: 1;
}

.qsheet-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.qsheet-summary {
  min-width: 0;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.qsheet-summary b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
}

.qsheet-close {
  height: 44px;
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 700;
}

.qsheet-grid {
  margin-top: 12px;
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 2px 2px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.qs-cell {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 11px;
  background: var(--bg-deep);
  color: var(--muted);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 800;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease);
}

.qs-cell:active {
  transform: scale(0.94);
}

.qs-cell.is-good {
  background: var(--green);
  color: #10240b;
}

.qs-cell.is-bad {
  background: var(--red-deep);
  color: #ffffff;
}

.qs-cell.is-mark {
  background: var(--orange);
  color: #3a2500;
}

.qs-cell.is-neutral {
  background: var(--blue-pale);
  color: var(--blue-deep);
  box-shadow: inset 0 0 0 1.5px var(--blue-line);
}

.qs-cell.is-current {
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink);
}

.qs-cell.is-current:not(.is-good):not(.is-bad):not(.is-mark):not(.is-neutral) {
  background: var(--ink);
  color: #f6faf4;
}

.qs-cell:focus-visible,
.qsheet-close:focus-visible,
.qsheet-foot .btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

.qsheet-foot {
  flex: none;
  padding-top: 12px;
  border-top: 1.5px solid var(--line);
}

.qsheet-foot .btn {
  height: 48px;
}

/* ---------- m5 · 交卷结果 ---------- */

.result-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 16px 0;
}

.result-hero {
  flex: none;
  padding: 16px 16px 14px;
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  background: var(--ink);
  color: #ffffff;
  box-shadow: 0 4px 0 #14201a;
}

.result-hero .eyebrow {
  color: #a9b8af;
}

.result-hero-row {
  margin-top: 3px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.result-score {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.result-score-num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 56px;
  line-height: 0.9;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #f6faf4;
}

.result-score-den {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  color: #a9b8af;
}

.result-percent {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.result-percent b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 800;
  color: #b7f36a;
}

.result-percent > span {
  font-size: 8.5px;
  line-height: 1.2;
  font-weight: 600;
  color: #a9b8af;
}

.result-facts {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-fact {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 9.5px;
  line-height: 1.3;
  font-weight: 600;
  color: #a9b8af;
}

.result-fact + .result-fact {
  padding-left: 8px;
  border-left: 1px solid #33443a;
}

.result-fact b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 800;
  color: #f6faf4;
  white-space: nowrap;
}

.result-compare {
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid #33443a;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 600;
  color: #c4d0c8;
}

.result-compare b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 800;
  color: #f6faf4;
}

.result-compare .icon {
  width: 14px;
  height: 14px;
  color: #8fa195;
}

.compare-delta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: #3a2226;
  color: #ff9ea0;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.diagnosis {
  flex: none;
  padding: 15px 16px 16px;
  border: 1.5px solid var(--red-line);
  border-radius: var(--r-lg);
  background: var(--red-pale);
}

.diagnosis-label {
  font-size: 9px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--red-deep);
}

.diagnosis-text {
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: 0.005em;
  color: var(--red-deep);
}

.result-block {
  flex: none;
}

.result-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.result-block-head h2 {
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.result-block-head > span {
  font-size: 8.5px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.dist-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dist {
  min-height: 48px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 8px;
}

.dist-name {
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
}

.dist-track {
  height: 9px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
}

.dist-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.dist-fill.is-low {
  background: var(--red);
}

.dist-fill.is-mid {
  background: var(--orange);
}

.dist-fill.is-good {
  background: var(--green);
}

.dist-value {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  text-align: right;
  color: var(--ink);
  white-space: nowrap;
}

.wrong-block {
  margin-top: auto;
  flex: none;
  padding: 13px 14px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.wrong-count {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 800;
  color: var(--red-deep);
}

.wrong-summary {
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-foot {
  height: 72px;
  flex: none;
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 10px;
  align-items: center;
  padding: 4px 16px 8px;
}

.result-foot .btn {
  width: 100%;
}

.result-foot .btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

@media (hover: hover) {
  .qs-cell:hover {
    border-color: var(--line-2);
  }

  .qsheet-close:hover {
    border-color: var(--line-2);
  }

  .result-foot .btn-secondary:hover,
  .qsheet-foot .btn-secondary:hover {
    border-color: var(--faint);
  }
}

/* ---------- m6 · 错题本 ---------- */

.mistake-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.mistake-stats {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mstat {
  min-width: 0;
  padding: 9px 10px 10px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}

.mstat > span {
  display: block;
  font-size: 8.5px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.mstat > b {
  display: block;
  margin-top: 2px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  color: var(--ink);
}

.mstat small {
  display: block;
  margin-top: 1px;
  font-size: 8px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--faint);
  white-space: nowrap;
}

.mstat.is-due {
  border-color: var(--green);
  background: var(--green-wash);
}

.mstat.is-due > span {
  color: var(--green-dark);
}

.mstat.is-due > b {
  color: var(--green-deep);
}

.seg {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border: 2px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
}

.seg-item {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.seg-item b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: 800;
}

.seg-item.is-active {
  background: var(--green);
  color: #10240b;
}

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

.mistake-card {
  padding: 11px 13px 12px;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.mistake-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.topic-tag {
  height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.miss-count {
  height: 20px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.miss-count.is-hot {
  background: var(--red-pale);
  color: var(--red-deep);
}

.mistake-stem {
  margin-top: 8px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.005em;
}

.mistake-foot {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--muted);
}

.mistake-foot b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  font-weight: 800;
  color: var(--ink-2);
  white-space: nowrap;
}

.foot-sep {
  color: var(--line-2);
}

.redo {
  position: relative;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 2px 0 8px;
  color: var(--green-dark);
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.redo::after {
  content: "";
  position: absolute;
  inset: -12px -6px -12px -8px;
}

.redo > span {
  font-size: 13px;
  line-height: 1;
}

.mistake-hint {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--orange-deep);
}

.mistake-hint::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--orange);
}

.mistake-empty {
  padding: 24px 16px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface-2);
  text-align: center;
}

.mistake-empty b {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--ink-2);
}

.mistake-empty span {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--muted);
}

.seg-item:focus-visible,
.redo:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- m7 · 账号与安全 ---------- */

.account-head {
  height: 60px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}

.account-head h1 {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.005em;
}

.account-head-spacer {
  width: 44px;
  height: 44px;
  flex: none;
}

.account-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 10px 16px 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.account-card {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.avatar {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--green-pale);
  color: var(--green-dark);
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
}

.account-id {
  flex: 1;
  min-width: 0;
}

.account-name {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.005em;
}

.account-sub {
  margin-top: 2px;
  font-size: 9.5px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  height: 22px;
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: var(--r-pill);
  font-size: 8.5px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.is-ok,
.badge.is-live {
  border: 1.5px solid #c9e9aa;
  background: var(--green-pale);
  color: var(--green-dark);
}

.badge.is-type {
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  font-family: var(--font-num);
  letter-spacing: 0.04em;
}

.account-group {
  flex: none;
}

.group-label {
  padding: 0 2px 6px;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.group-card {
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}

.set-row {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.set-row + .set-row {
  border-top: 1.5px solid var(--line);
}

.set-label {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--ink);
}

.set-body {
  flex: 1;
  min-width: 0;
}

.set-body .set-label {
  display: block;
  flex: none;
}

.set-sub {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--muted);
}

.set-row > .icon {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--faint);
}

.set-right {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.set-right .icon {
  width: 14px;
  height: 14px;
  color: var(--faint);
}

.set-row.is-muted {
  background: var(--surface-2);
}

.set-row.is-muted .set-label {
  color: var(--muted);
}

.add-plus {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--faint);
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
}

.set-row:focus-visible {
  outline: 3px solid var(--blue-deep);
  outline-offset: -3px;
}

.device-card {
  flex: none;
  padding: 13px 14px 14px;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.device-card h2 {
  font-family: var(--font-display);
  font-size: 12px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.device-list {
  margin-top: 8px;
}

.device-row {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.device-row + .device-row {
  border-top: 1.5px solid var(--line);
}

.device-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink-2);
}

.live-dot {
  width: 6px;
  height: 6px;
  flex: none;
  display: inline-block;
  border-radius: 50%;
  background: var(--green);
}

.device-time {
  flex: none;
  font-size: 9.5px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.device-time.is-now {
  color: var(--green-dark);
  font-weight: 800;
}

.privacy-note {
  flex: none;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.privacy-note p {
  font-size: 10.5px;
  line-height: 1.65;
  font-weight: 500;
  color: var(--muted);
}

.privacy-note b {
  color: var(--ink);
  font-weight: 800;
}

@media (hover: hover) {
  .seg-item:hover {
    color: var(--ink-2);
  }

  .seg-item.is-active:hover {
    color: #10240b;
  }

  .redo:hover {
    color: var(--green-deep);
  }

  .mistake-card:hover {
    border-color: var(--line-2);
  }

  .set-row:hover {
    background: var(--surface-2);
  }
}

/* ==========================================================================
   实际应用层覆盖（原型 → 可用页面）
   原型是 390×844 定高画布；真机要填满视口、内容可滚动。
   ========================================================================== */

body.app-body {
  align-items: stretch;
  justify-content: flex-start;
  min-height: 100dvh;
  background: var(--bg);
}

.screen {
  width: 100%;
  max-width: 560px;
  height: auto;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: visible;
  padding-top: 10px;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 561px) {
  body.app-body { background: #dde6db; padding: 24px 0; }
  .screen { min-height: auto; border-radius: 22px; box-shadow: 0 10px 40px rgba(16,32,22,.10); }
}

/* 隐藏原型里的假状态栏 */
.statusbar { display: none; }

/* 主内容区可滚动 */
.today-main, .quiz-main, .review-main, .result-main,
.papers-main, .stats-main, .account-main {
  overflow: visible;
}

/* —— 底部 tabbar —— */
.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1.5px solid var(--line);
  z-index: 40;
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0 2px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border-radius: 10px;
}
.tabbar a .icon { width: 20px; height: 20px; }
.tabbar a.is-on { color: var(--ink); background: var(--surface-warm); }

/* —— 通用小件 —— */
.hr { height: 1.5px; background: var(--line); border: 0; margin: 14px 0; }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 800; letter-spacing: .02em;
  padding: 3px 7px; border-radius: 6px;
  background: var(--surface-warm); color: var(--muted);
}
.tag.is-bad { background: #fdecea; color: #b3261e; }
.tag.is-warn { background: #fff4e0; color: #9a5b00; }
.tag.is-ok { background: #e6f6ea; color: #1c7a3a; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

/* —— 列表卡 —— */
.list { display: flex; flex-direction: column; gap: 10px; }
.row-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 15px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 16px;
  text-decoration: none; color: inherit;
}
.row-card .grow { flex: 1; min-width: 0; }
.row-card .t1 { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.row-card .t2 { font-size: 12px; color: var(--muted); margin-top: 3px; }
.row-card .right { font-size: 13px; font-weight: 800; }

/* —— 表单 —— */
.form-card { padding: 18px 16px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; box-sizing: border-box;
  height: 48px; padding: 0 14px;
  font-size: 16px; font-weight: 600;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 12px;
}
.field input:focus { outline: 2.5px solid var(--ink); outline-offset: 1px; }
.form-err {
  background: #fdecea; color: #b3261e;
  border: 1.5px solid #f6c9c4; border-radius: 12px;
  padding: 10px 12px; font-size: 13px; font-weight: 700; margin-bottom: 14px;
}
.help { font-size: 12px; color: var(--muted); line-height: 1.6; }

/* —— 空状态 —— */
.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 6px; }

/* —— 选项按钮（服务端渲染版） —— */
.option.is-picked { border-color: var(--ink); background: var(--surface-warm); }
.option.is-correct { border-color: #1c7a3a; background: #e6f6ea; }
.option.is-wrong { border-color: #b3261e; background: #fdecea; }
.option[disabled] { cursor: default; }
.feedback-bar { margin-top: 14px; padding: 13px 15px; border-radius: 14px; font-size: 14px; font-weight: 700; line-height: 1.55; }
.feedback-bar.is-ok { background: #e6f6ea; color: #14592b; border: 1.5px solid #bfe6c9; }
.feedback-bar.is-bad { background: #fdecea; color: #8c1d18; border: 1.5px solid #f6c9c4; }
.explain { margin-top: 10px; font-size: 13px; line-height: 1.7; color: var(--muted); }

/* dist 进度条默认要有颜色；原型只给了 is-low/is-mid/is-good 修饰类 */
.dist-fill { background: var(--green); }
.dist-fill.is-mute { background: var(--muted); }

/* 数据页按卷：名字要能换行，轨道可压缩（.dist 是 grid，不是 flex） */
.stats-main .dist {
  grid-template-columns: 120px minmax(0, 1fr) 52px;
  align-items: start;
}
.stats-main .dist-name {
  white-space: normal;
  word-break: break-all;
  line-height: 1.35;
  padding-top: 1px;
}
.stats-main .dist-track { margin-top: 4px; }

/* ==========================================================================
   题号面板（75 题 44px 可点；原型里只有细进度带，点不准）
   ========================================================================== */
.qsheet-layer {
  position: fixed; inset: 0; z-index: 60;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.qsheet-layer[hidden] { display: none; }
.qsheet-scrim {
  position: absolute; inset: 0; border: 0; padding: 0;
  background: rgba(12, 24, 16, .45);
  backdrop-filter: blur(2px);
}
.qsheet {
  position: relative; z-index: 1;
  width: 100%; max-width: 560px; margin: 0 auto;
  max-height: 74vh;
  display: flex; flex-direction: column;
  padding: 14px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  border-radius: 22px 22px 0 0;
  background: var(--surface);
  box-shadow: 0 -14px 44px rgba(16, 32, 22, .28);
  animation: qsheet-up .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes qsheet-up { from { transform: translateY(24px); opacity: .6 } to { transform: none; opacity: 1 } }
.qsheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px; border-bottom: 1.5px solid var(--line);
}
.qsheet-summary { margin: 0; font-size: 12px; color: var(--muted); }
.qsheet-summary b { color: var(--ink); }
.qsheet-close {
  border: 0; background: transparent; font-size: 13px; font-weight: 800;
  color: var(--ink); padding: 4px 6px;
}
.qsheet-grid {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 8px; padding: 14px 0;
  -webkit-overflow-scrolling: touch;
}
.qnum {
  display: flex; align-items: center; justify-content: center;
  min-height: 42px; border-radius: 11px;
  font-size: 13px; font-weight: 800; text-decoration: none;
  background: var(--surface-2, #f7faf5);
  color: var(--ink-2, #3c4a41);
  border: 1.5px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.qnum.is-good { background: #dff3e4; color: #1c7a3a; border-color: #bfe6c9; }
.qnum.is-bad { background: #fdecea; color: #b3261e; border-color: #f6c9c4; }
.qnum.is-mark { background: #fff1d6; color: #8a5300; border-color: #f7ddb0; }
.qnum.is-neutral { background: #e6ece7; color: #55635a; border-color: #d3ddd5; }

.qsheet-foot { flex: none; padding-top: 10px; border-top: 1.5px solid var(--line); }

/* 今日任务的"为什么是它"——一行小字，弱化但可查 */
.task-why {
  margin: 3px 0 0;
  font-size: 11px;
  line-height: 1.45;
  color: var(--muted);
  opacity: .85;
}

/* 模考倒计时 */
.timer-exam { background: var(--ink); color: #fff; border-color: var(--ink); }
.timer-exam.is-urgent, .timer-exam .is-urgent { background: #b3261e; }
.timer.is-urgent { background: #b3261e !important; color: #fff !important; border-color: #b3261e !important; }

/* 模考入口条 */
.exam-bar { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.exam-bar select {
  height: 44px; padding: 0 10px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 700;
}

/* 案例 / 论文 */
.case-text { font-size:13px; line-height:1.85; color:var(--body); margin:6px 0 0; }
.case-q { font-size:12.5px; line-height:1.75; color:var(--body); margin:6px 0 10px; }
.case-input {
  width:100%; box-sizing:border-box; padding:12px 13px;
  border:1.5px solid var(--line); border-radius:12px;
  background:var(--bg); font-size:14px; line-height:1.8;
  font-family:inherit; color:var(--ink); resize:vertical;
}
.case-input:focus { outline:2.5px solid var(--ink); outline-offset:1px; }

/* 报告页复用 v2 的样式，但 v2 那套没进这份 app.css，这里补最小的 */
.report-main { padding-bottom: 8px; }
.report-main .fhead { display:flex; align-items:center; gap:7px; margin:18px 2px 8px; }
.report-main .fhead .t { font-size:12.5px; font-weight:800; }
.report-main .fhead .n { font-size:10px; color:#fff; background:#b3261e; border-radius:10px; padding:1px 6px; font-weight:800; }
.report-main .fhead .h { margin-left:auto; font-size:10.5px; color:var(--muted); }
.find { background:var(--surface); border:1px solid var(--line); border-left:3px solid #b3261e;
        border-radius:11px; padding:12px 14px; margin-bottom:8px; }
.find.soft { border-left-color:#9a5b00; }
.find .ft { font-size:12.5px; font-weight:700; line-height:1.5; }
.find .quote { margin-top:7px; font-size:11px; line-height:1.55; color:var(--body);
               background:var(--bg); border-radius:7px; padding:7px 9px; border-left:2px solid var(--line); }
.lv { display:inline-block; font-size:9.5px; font-weight:800; padding:2px 6px; border-radius:4px; }
.lv.b1 { background:#EFF8FF; color:#175CD3; }
.lv.b2 { background:#ECFDF5; color:#027A48; }
.lv.b3 { background:#F4F3FF; color:#5925DC; }
.lv.b4 { background:#F2F4F7; color:#667085; }
.privacy-note {
  background:var(--surface); border:1px solid var(--line); border-radius:12px;
  padding:11px 14px; font-size:11px; line-height:1.7; color:var(--muted);
}
.legend-dot.is-neutral { background: #cfd8cf; }

/* ==========================================================================
   错题本：链接化后的对齐（原型里 seg 是 4 列网格但只放了 3 项 → 歪）
   ========================================================================== */
.mistake-stats .mstat {
  display: block;
  text-decoration: none;
  color: inherit;
  text-align: left;
  transition: border-color .15s ease;
}
.mistake-stats .mstat.is-active { border-color: var(--ink); }

.seg {
  display: flex;            /* 原来 fixed 4 列网格，项数一变就歪 */
  flex-wrap: nowrap;
  gap: 3px;
}
.seg-item {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  text-decoration: none;
}
.seg-item.is-active { background: var(--ink); color: #fff; }

.mistake-head {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mistake-no {
  margin-left: auto;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--faint, #9aa79c);
  white-space: nowrap;
}

.mistake-card .mistake-stem { margin-top: 8px; }

.mistake-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.mistake-foot .mistake-hint {
  margin-top: 0;            /* 原来自己又有 8px，和父级叠成双层 */
  color: var(--muted);
  font-weight: 600;
}
.mistake-redo {
  margin-left: auto;
  flex: none;
  padding: 5px 11px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
}
.mistake-redo:active { background: var(--surface-2); }

/* ==========================================================================
   大屏手机边距（iPhone 17 Pro Max 440×956 上原来贴边）
   统一成一个令牌：--gutter，所有页面用它，别再各写 16px
   ========================================================================== */
:root { --gutter: clamp(18px, 5.4vw, 30px); }

.screen {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}

.today-head, .quiz-head, .quiz-overview, .mistake-main,
.account-main, .result-main, .report-main, .papers-main, .stats-main {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.quiz-main { padding-left: var(--gutter); padding-right: var(--gutter); }
.quiz-foot { padding-left: var(--gutter); padding-right: var(--gutter); }
.pad { padding-left: var(--gutter); padding-right: var(--gutter); }

/* 底部安全区：给 tabbar 留出身位，别让内容被遮 */
.tabbar {
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  padding-left: max(8px, env(safe-area-inset-left, 0px));
  padding-right: max(8px, env(safe-area-inset-right, 0px));
}

/* 宽屏时不把内容拉满，居中留白更稳 */
@media (min-width: 430px) {
  body.app-body { background: #dde6db; }
  .screen {
    max-width: 480px;
    border-radius: 26px;
    box-shadow: 0 12px 44px rgba(16, 32, 22, .10);
    margin: 10px auto;
    min-height: calc(100dvh - 20px);
  }
}

/* 14 天做题量柱图 */
.daybars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  margin-top: 12px;
  height: 96px;
}
.daybar {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.daybar-track {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  align-items: flex-end;
  background: var(--surface-2, #eef2ee);
  border-radius: 4px;
  overflow: hidden;
}
.daybar-track > i {
  display: block;
  width: 100%;
  min-height: 2px;
  background: var(--ink);
  border-radius: 3px 3px 0 0;
}
.daybar-n {
  font-size: 8.5px;
  font-weight: 800;
  color: var(--muted);
  margin-top: 3px;
  height: 10px;
  font-variant-numeric: tabular-nums;
}
.daybar-d {
  font-size: 7.5px;
  color: var(--faint, #9aa79c);
  white-space: nowrap;
}

/* 统计卡不要用底色当"选中态"，否则"今日到期"一直像被选中 */
.mistake-stats .mstat.is-due {
  background: var(--surface);
  border-color: var(--line);
}
.mistake-stats .mstat.is-due b { color: inherit; }
.mistake-stats .mstat.is-active,
.mistake-stats .mstat.is-hot.is-active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.mistake-stats .mstat.is-due b,
.mistake-stats .mstat.is-hot b { color: var(--ink); }
.mistake-stats .mstat.is-due > span,
.mistake-stats .mstat.is-hot > span { color: var(--muted); }

/* 当前题：只加描边，保留状态底色（否则看不出这题答对还是答错） */
.qnum.is-current { box-shadow: inset 0 0 0 2.5px var(--ink); }
/* 还没答过的当前题才实心 */
.qnum.is-current:not([class*="is-good"]):not([class*="is-bad"]):not([class*="is-mark"]):not([class*="is-neutral"]) {
  background: var(--ink);
  color: #fff;
}
.qsheet-grid { padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
a.mistake-card { display: block; text-decoration: none; color: inherit; }
a.mistake-card:active { background: var(--surface-2, #f7faf5); }

/* 章节练习 */
.poolbar { display: flex; gap: 8px; margin-top: 12px; }
.pool {
  flex: 1 1 0; padding: 11px 13px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px;
}
.pool-l { display: block; font-size: 10px; font-weight: 700; color: var(--muted); }
.pool b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.5px; margin-top: 1px; }
.pool-s { display: block; font-size: 10px; color: var(--muted); margin-top: 1px; }

.chapter-row {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 13px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px;
}
.chapter-no {
  flex: 0 0 24px; text-align: center;
  font-size: 11px; font-weight: 800; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chapter-body { flex: 1 1 auto; min-width: 0; }
.chapter-name { font-size: 13.5px; font-weight: 800; letter-spacing: -.1px; }
.chapter-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.chapter-bar {
  height: 5px; margin-top: 6px; border-radius: 3px;
  background: var(--surface-2, #eef2ee); overflow: hidden;
}
.chapter-bar i { display: block; height: 100%; border-radius: 3px; background: var(--line); }
.chapter-bar i.is-low { background: #d9534f; }
.chapter-bar i.is-mid { background: #d9a441; }
.chapter-bar i.is-good { background: #3f9e5a; }
.chapter-go {
  flex: 0 0 auto; padding: 7px 12px;
  border: 1.5px solid var(--ink); border-radius: 999px;
  font-size: 11px; font-weight: 800; color: var(--ink); text-decoration: none;
  white-space: nowrap;
}
.chapter-go:active { background: var(--ink); color: #fff; }

.pool-title { font-size: 11px; font-weight: 800; letter-spacing: .3px; color: var(--muted); }
/* 14 天柱图：轨道不要满高底色，否则每天都像有一根柱子 */
.daybar-track { background: transparent; }
.daybar-track > i { background: var(--ink); }
.daybar.is-zero .daybar-track > i { background: var(--line); }
