.records-page {
  color: var(--ink);
}

.hall-empty-state {
  display: flex;
  min-height: 138px;
  align-items: center;
  padding: 24px;
  border: 1px dashed #c8bda9;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.78);
  gap: 16px;
}

.hall-empty-state.compact {
  min-height: 0;
  padding: 12px 0;
  border: 0;
  color: #eef4f7;
  background: transparent;
}

.hall-empty-state > span {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  place-items: center;
  color: #fffdf8;
  background: var(--blue-deep);
  border: 2px solid var(--gold-bright);
  border-radius: 6px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 18px;
}

.hall-empty-state.compact > span {
  background: #24577d;
}

.hall-empty-state > div {
  min-width: 0;
  flex: 1;
}

.hall-empty-state h2,
.hall-empty-state h3 {
  margin-bottom: 4px;
}

.hall-empty-state p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.hall-empty-state.compact p {
  color: #cbdbe3;
}

.data-empty {
  display: grid;
  min-height: 92px;
  grid-column: 1 / -1;
  place-items: center;
  padding: 20px;
  color: var(--ink-soft);
  text-align: center;
  font-size: 12px;
}

.data-empty.bordered {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.records-band {
  position: relative;
  width: 100%;
  background: var(--paper);
}

.records-band-light {
  background: rgba(255, 253, 248, 0.96);
}

.records-section {
  padding-block: 58px;
}

.records-intro {
  color: #f8f4ea;
  background: #173c61;
  border-bottom: 3px solid #c18a3d;
  overflow: hidden;
}

.records-intro::after {
  position: absolute;
  right: 3vw;
  bottom: -92px;
  width: 310px;
  height: 180px;
  content: "九章";
  color: rgba(232, 209, 171, 0.08);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 124px;
  line-height: 1;
  pointer-events: none;
}

.records-intro-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 212px;
  align-items: center;
  justify-content: space-between;
  padding-block: 38px;
  gap: 42px;
}

.records-intro h1 {
  max-width: 760px;
  margin-bottom: 10px;
  color: #fffdf8;
}

.records-intro p:not(.eyebrow) {
  max-width: 710px;
  margin-bottom: 0;
  color: #dce7ec;
}

.records-heading,
.panel-heading,
.subsection-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.records-heading {
  margin-bottom: 28px;
}

.records-heading h2,
.panel-heading h3,
.subsection-heading h3 {
  margin-bottom: 0;
}

.section-note {
  flex: none;
  color: var(--ink-soft);
  font-size: 13px;
}

.panel-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.sync-status {
  display: flex;
  min-width: 240px;
  align-items: center;
  padding: 13px 16px;
  border: 1px solid rgba(232, 209, 171, 0.35);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  gap: 11px;
}

.sync-status > span {
  width: 9px;
  height: 9px;
  flex: none;
  background: #d7a24f;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(215, 162, 79, 0.16);
}

.sync-status.synced > span {
  background: #71b78e;
  box-shadow: 0 0 0 4px rgba(113, 183, 142, 0.16);
}

.sync-status.error > span {
  background: #e08a82;
  box-shadow: 0 0 0 4px rgba(224, 138, 130, 0.16);
}

.sync-status div {
  display: grid;
  line-height: 1.25;
}

.sync-status strong {
  font-size: 13px;
}

.sync-status small {
  margin-top: 4px;
  color: #c8d6dd;
  font-size: 11px;
}

.ability-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
  align-items: stretch;
  gap: 24px;
}

.jmi-panel,
.chart-panel,
.map-panel,
.student-tag-group,
.wrong-category,
.account-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 9px 26px rgba(50, 42, 28, 0.07);
}

.jmi-panel {
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: center;
  padding: 32px;
  gap: 28px;
}

.jmi-gauge {
  position: relative;
  width: 238px;
  height: 238px;
}

.jmi-gauge svg {
  width: 100%;
  height: 100%;
}

.gauge-track,
.gauge-value,
.gauge-inner-line {
  fill: none;
}

.gauge-track {
  stroke: #e7e1d5;
  stroke-width: 13px;
}

.gauge-value {
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-width: 13px;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dasharray 450ms ease;
}

.gauge-inner-line {
  stroke: rgba(23, 60, 97, 0.14);
  stroke-width: 1px;
}

.gauge-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 1.1;
}

.gauge-copy strong {
  color: var(--blue-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 54px;
}

.jmi-gauge.pending .gauge-copy strong {
  max-width: 140px;
  font-family: inherit;
  font-size: 28px;
}

.jmi-gauge.pending .gauge-value {
  stroke: #b7b1a5;
}

.gauge-copy span {
  margin-top: 2px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
}

.gauge-copy small {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 11px;
}

.ability-level,
.data-badge,
.badge-status {
  display: inline-flex;
  width: max-content;
  align-items: center;
  color: var(--blue-deep);
  font-size: 11px;
  font-weight: 800;
}

.ability-level {
  padding: 4px 9px;
  border: 1px solid #c6d6e2;
  border-radius: 999px;
  background: #edf5f8;
}

.jmi-explanation h3 {
  margin: 13px 0 9px;
  color: var(--blue-deep);
  font-family: "Songti SC", "SimSun", serif;
  font-size: 23px;
}

.jmi-explanation > p {
  margin-bottom: 20px;
  color: var(--ink-soft);
}

.evidence-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding-top: 18px;
  margin: 0;
  border-top: 1px solid var(--line);
  gap: 16px;
}

.score-policy {
  max-width: 52ch;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.evidence-list div {
  display: grid;
  gap: 3px;
}

.evidence-list dt {
  color: var(--ink-soft);
  font-size: 11px;
}

.evidence-list dd {
  margin: 0;
  color: var(--blue-deep);
  font-weight: 800;
}

.chart-panel {
  padding: 24px;
}

.panel-heading {
  align-items: center;
}

.panel-heading h3 {
  color: var(--blue-deep);
  font-family: "Songti SC", "SimSun", serif;
  font-size: 20px;
}

.data-badge {
  padding: 3px 8px;
  border: 1px solid #b9d3df;
  border-radius: 999px;
  background: #edf6f8;
}

.radar-chart {
  width: 100%;
  height: 280px;
  margin-top: 8px;
  overflow: visible;
}

.radar-grid polygon,
.radar-grid line {
  fill: rgba(23, 60, 97, 0.025);
  stroke: #cfd9de;
  stroke-width: 1.2px;
}

.radar-value-shape {
  fill: rgba(183, 123, 41, 0.2);
  stroke: var(--gold);
  stroke-linejoin: round;
  stroke-width: 2.4px;
  transition: points 320ms ease;
}

.radar-points circle {
  fill: var(--blue-deep);
  stroke: #fffdf8;
  stroke-width: 3px;
}

.radar-labels text {
  fill: #555851;
  font-size: 13px;
  font-weight: 700;
}

.chart-legend {
  padding: 0;
  margin: 4px 0 0;
  list-style: none;
}

.dimension-legend {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px 14px;
}

.dimension-legend li {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  color: var(--ink-soft);
  font-size: 11px;
  gap: 7px;
}

.dimension-legend li > span {
  width: 7px;
  height: 7px;
  background: var(--gold);
  border-radius: 50%;
}

.dimension-legend strong {
  color: var(--blue-deep);
  font-size: 12px;
}

.trend-heading {
  align-items: center;
}

.segmented-control {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #c8d1d6;
  border-radius: 7px;
  background: #ecebe5;
}

.segmented-control button {
  min-width: 78px;
  min-height: 34px;
  padding: 5px 12px;
  border: 0;
  border-radius: 5px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.segmented-control button.active {
  color: var(--blue-deep);
  background: var(--surface-strong);
  box-shadow: 0 2px 7px rgba(39, 40, 35, 0.12);
}

.trend-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
}

.trend-panel {
  min-width: 0;
  padding: 18px 22px 14px;
}

.trend-chart {
  width: 100%;
  min-height: 250px;
  aspect-ratio: 19 / 7;
}

.trend-grid line {
  stroke: #ddd8cf;
  stroke-dasharray: 3 5;
  stroke-width: 1px;
}

.trend-grid text,
.trend-labels text {
  fill: #73756e;
  font-size: 11px;
}

.trend-series .trend-area {
  fill: rgba(22, 127, 192, 0.09);
}

.trend-series .trend-line {
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3px;
}

.trend-series circle {
  fill: var(--surface-strong);
  stroke: var(--blue-deep);
  stroke-width: 2.5px;
}

.trend-series text {
  fill: var(--blue-deep);
  font-size: 11px;
  font-weight: 800;
}

.trend-series .trend-empty {
  fill: var(--ink-soft);
  font-size: 13px;
  font-weight: 400;
}

.chart-summary {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
}

.trend-insight {
  position: relative;
  min-height: 100%;
  padding: 28px 26px;
  color: #f7f4eb;
  background: #173c61;
  border: 1px solid #2b5274;
  border-radius: 8px;
  overflow: hidden;
}

.trend-insight::after {
  position: absolute;
  right: -12px;
  bottom: -28px;
  content: "↗";
  color: rgba(255, 255, 255, 0.05);
  font-size: 128px;
  line-height: 1;
}

.insight-mark {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 24px;
  place-items: center;
  color: var(--blue-deep);
  background: var(--gold-bright);
  border-radius: 6px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 19px;
  font-weight: 800;
}

.trend-insight .panel-kicker {
  color: #e5b86f;
}

.trend-insight > strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 5px 0 9px;
  font-family: "Songti SC", "SimSun", serif;
  font-size: 20px;
}

.trend-insight > p:not(.panel-kicker) {
  position: relative;
  z-index: 1;
  color: #ccdbe2;
  font-size: 13px;
}

.trend-insight .text-link {
  position: relative;
  z-index: 1;
  color: #f0c47f;
  font-size: 13px;
}

.records-band-blue {
  color: #f6f4ed;
  background: #163a57;
  border-block: 1px solid #254e6b;
}

.inverted-heading h2 {
  color: #fffdf8;
}

.inverted-heading .section-note {
  color: #cbd9df;
}

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

.map-panel {
  padding: 26px;
  color: var(--ink);
  box-shadow: 0 12px 34px rgba(4, 19, 31, 0.18);
}

.knowledge-map,
.dimension-bars {
  display: grid;
  margin-top: 24px;
  gap: 10px;
}

.knowledge-cell {
  display: grid;
  grid-template-columns: minmax(110px, 0.72fr) minmax(150px, 1fr) 38px;
  align-items: center;
  min-height: 48px;
  padding: 7px 10px;
  border-left: 3px solid var(--gold);
  background: #f7f4ed;
  gap: 14px;
}

.knowledge-cell.strong {
  border-left-color: var(--success);
  background: #eef5ef;
}

.knowledge-cell.weak {
  border-left-color: var(--danger);
  background: #faefec;
}

.knowledge-cell > div:first-child {
  display: grid;
  line-height: 1.25;
}

.knowledge-cell strong {
  font-size: 13px;
}

.knowledge-cell div:first-child span {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 10px;
}

.knowledge-cell b {
  color: var(--blue-deep);
  text-align: right;
}

.score-track,
.dimension-track,
.chapter-track,
.badge-progress,
.match-track {
  height: 6px;
  overflow: hidden;
  background: #e2ded4;
  border-radius: 999px;
}

.score-track span,
.dimension-track span,
.chapter-track span,
.badge-progress span,
.match-track span {
  display: block;
  height: 100%;
  background: var(--gold);
  border-radius: inherit;
  transition: width 350ms ease;
}

.knowledge-cell.strong .score-track span {
  background: var(--success);
}

.knowledge-cell.weak .score-track span {
  background: var(--danger);
}

.dimension-row {
  padding: 12px 0;
  border-bottom: 1px solid #e5dfd4;
}

.dimension-row:first-child {
  padding-top: 2px;
}

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

.dimension-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 16px;
}

.dimension-row strong {
  color: var(--blue-deep);
  font-size: 13px;
}

.dimension-row div:first-child span {
  color: var(--ink-soft);
  font-size: 11px;
}

.dimension-track {
  height: 9px;
}

.dimension-track span {
  background: var(--blue);
}

.chapter-score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.chapter-score {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 36px;
  min-height: 92px;
  align-items: center;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  gap: 13px;
}

.chapter-score:nth-child(3n) {
  border-right: 0;
}

.chapter-score:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.chapter-seal {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fffdf8;
  background: var(--blue-deep);
  border: 2px solid var(--gold-bright);
  border-radius: 5px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 18px;
}

.chapter-score h3 {
  margin-bottom: 9px;
  font-family: "Songti SC", "SimSun", serif;
  font-size: 16px;
}

.chapter-score > strong {
  color: var(--blue-deep);
  text-align: right;
}

.chapter-summary {
  margin-top: 12px;
}

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

.badge-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 154px;
  align-items: center;
  padding: 22px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  gap: 15px;
}

.badge-item.locked {
  background: #f0eee8;
}

.badge-emblem {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 1px solid #c0b9ad;
  border-radius: 50%;
  background: #e5e1d8;
}

.badge-emblem span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #88857e;
  border: 2px solid currentColor;
  border-radius: 5px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 19px;
  transform: rotate(45deg);
}

.badge-item.unlocked .badge-emblem {
  border-color: #d5a75e;
  background: #f6e4bd;
  box-shadow: inset 0 0 0 5px #fff8e8;
}

.badge-item.unlocked .badge-emblem span {
  color: #9b6219;
}

.badge-copy {
  min-width: 0;
}

.badge-status {
  color: var(--ink-soft);
}

.badge-item.unlocked .badge-status {
  color: var(--success);
}

.badge-copy h3 {
  min-height: 40px;
  margin: 5px 0 10px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.badge-progress {
  margin-bottom: 6px;
}

.badge-item.unlocked .badge-progress span {
  background: var(--success);
}

.badge-copy small {
  color: var(--ink-soft);
  font-size: 10px;
}

.monthly-band {
  padding-block: 46px;
  background: #ead8b6;
  border-top: 1px solid #d0ae78;
}

.monthly-report {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1fr) minmax(270px, 0.75fr);
  align-items: center;
  gap: 42px;
}

.monthly-title-block h2 {
  color: var(--blue-deep);
}

.monthly-title-block p:last-child {
  margin-bottom: 0;
  color: #625846;
  font-size: 13px;
}

.monthly-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-inline: 1px solid rgba(128, 80, 39, 0.28);
}

.monthly-metrics div {
  display: grid;
  padding: 4px 18px;
  text-align: center;
  gap: 3px;
}

.monthly-metrics dt {
  color: #655c4b;
  font-size: 11px;
}

.monthly-metrics dd {
  margin: 0;
  color: var(--blue-deep);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 800;
}

.monthly-metrics dd span {
  font-family: inherit;
  font-size: 11px;
}

.monthly-next {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.monthly-next > span {
  color: #655c4b;
  font-size: 11px;
}

.monthly-next > strong {
  margin-bottom: 8px;
  color: var(--blue-deep);
  font-size: 14px;
}

/* Personal center */
.profile-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 226px;
  align-items: center;
  justify-content: space-between;
  padding-block: 38px;
  gap: 42px;
}

.profile-identity {
  display: flex;
  align-items: center;
  gap: 22px;
}

.large-avatar {
  display: grid;
  width: 88px;
  height: 88px;
  flex: none;
  place-items: center;
  color: #fffdf8;
  background: #24577d;
  border: 3px solid var(--gold-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.07);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 39px;
}

.profile-identity h1 {
  margin-bottom: 5px;
}

.profile-quick-stats {
  display: grid;
  width: min(490px, 100%);
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border: 1px solid rgba(232, 209, 171, 0.3);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.profile-quick-stats div {
  display: grid;
  min-width: 0;
  min-height: 90px;
  align-content: center;
  padding: 12px 20px;
  border-right: 1px solid rgba(232, 209, 171, 0.22);
  text-align: center;
}

.profile-quick-stats div:last-child {
  border-right: 0;
}

.profile-quick-stats dt {
  color: #c9d8df;
  font-size: 11px;
}

.profile-quick-stats dd {
  margin: 3px 0 0;
  color: #f6d79d;
  font-size: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.profile-local-nav {
  border-bottom: 1px solid var(--line);
}

.profile-local-nav .page-shell {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 34px;
}

.profile-local-nav a {
  position: relative;
  display: grid;
  min-height: 50px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.profile-local-nav a::after {
  position: absolute;
  right: 25%;
  bottom: 0;
  left: 25%;
  height: 2px;
  content: "";
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 160ms ease;
}

.profile-local-nav a:hover,
.profile-local-nav a:focus-visible {
  color: var(--blue-deep);
}

.profile-local-nav a:hover::after,
.profile-local-nav a:focus-visible::after {
  transform: scaleX(1);
}

.section-lead {
  max-width: 850px;
  margin: -12px 0 24px;
  color: var(--ink-soft);
  font-size: 13px;
}

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

.student-tag-group {
  min-height: 205px;
  padding: 21px;
  box-shadow: none;
}

.tag-group-heading,
.wrong-category-title,
.account-panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tag-group-heading > span,
.wrong-category-title > span,
.account-panel-heading > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: none;
  place-items: center;
  color: #fffdf8;
  background: var(--blue-deep);
  border-radius: 5px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 16px;
}

.tag-group-heading h3,
.wrong-category-title h3,
.account-panel-heading h3 {
  margin-bottom: 1px;
  color: var(--blue-deep);
  font-size: 15px;
}

.tag-group-heading small,
.wrong-category-title small,
.account-panel-heading small {
  color: var(--ink-soft);
  font-size: 10px;
}

.student-tag-group ul {
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
  gap: 8px;
}

.student-tag-group li {
  padding: 5px 9px;
  color: #654a25;
  background: #f5e7cb;
  border: 1px solid #dfc28c;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.student-tag-group li.tag-empty {
  color: var(--ink-soft);
  background: #f2f0ea;
  border-color: var(--line);
}

.chapter-match-block {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.subsection-heading {
  align-items: end;
  margin-bottom: 20px;
}

.subsection-heading h3 {
  color: var(--blue-deep);
  font-family: "Songti SC", "SimSun", serif;
  font-size: 20px;
}

.subsection-heading p {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.chapter-match-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 26px;
}

.chapter-match > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 12px;
}

.chapter-match strong {
  font-family: "Songti SC", "SimSun", serif;
}

.chapter-match div:first-child span {
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 800;
}

.match-track {
  height: 8px;
}

.match-track span {
  background: var(--blue);
}

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

.wrong-category {
  min-height: 210px;
  padding: 21px;
  box-shadow: none;
}

.wrong-category.has-items {
  border-color: #d3ad6a;
  background: #fffaf0;
}

.wrong-category.has-items .wrong-category-title > span {
  background: var(--gold);
}

.wrong-category > p {
  margin: 32px 0 0;
  color: #85847e;
  font-size: 12px;
}

.wrong-category ul {
  padding: 18px 0 0;
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.wrong-category li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  color: var(--ink-soft);
  font-size: 12px;
  gap: 12px;
}

.wrong-category li a {
  color: var(--blue-deep);
  font-weight: 800;
}

.wrong-category .mistake-list {
  display: grid;
  gap: 12px;
}

.wrong-category .mistake-record {
  display: block;
  padding: 12px 0 12px 12px;
  border: 0;
  border-left: 3px solid var(--warning);
  border-radius: 0;
  background: transparent;
}

.wrong-category .mistake-record.resolved {
  border-left-color: var(--success);
}

.mistake-record-heading,
.mistake-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mistake-record-heading strong {
  color: var(--blue-deep);
  font-size: 12px;
}

.mistake-record-heading span {
  flex: none;
  color: var(--warning);
  font-size: 9px;
  font-weight: 800;
}

.mistake-record.resolved .mistake-record-heading span {
  color: var(--success);
}

.wrong-category .mistake-record > p {
  display: -webkit-box;
  margin: 9px 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.mistake-meta {
  color: #858077;
  font-size: 9px;
}

.mistake-meta time {
  overflow-wrap: anywhere;
  text-align: right;
}

.wrong-category .mistake-record > a {
  display: inline-flex;
  margin-top: 10px;
  color: var(--blue-deep);
  font-size: 11px;
  font-weight: 800;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(580px, 1.35fr);
  align-items: start;
  padding-block: 58px;
  gap: 56px;
}

.settings-intro {
  position: sticky;
  top: 130px;
}

.settings-intro h2 {
  color: #fffdf8;
}

.settings-intro p:last-child {
  max-width: 340px;
  color: #cbd9df;
  font-size: 13px;
}

.preference-form {
  padding: 28px;
  color: var(--ink);
  background: var(--surface-strong);
  border: 1px solid #41637a;
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(4, 19, 31, 0.22);
}

.preference-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 0 24px;
  margin: 0 0 24px;
  border: 0;
  border-bottom: 1px solid var(--line);
  gap: 12px;
}

.preference-form legend {
  width: 100%;
  margin-bottom: 12px;
  color: var(--blue-deep);
  font-size: 13px;
  font-weight: 800;
}

.preference-form fieldset label,
.motion-setting {
  display: flex;
  min-height: 78px;
  align-items: center;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #faf8f2;
  cursor: pointer;
  gap: 11px;
}

.preference-form fieldset label:has(input:checked),
.motion-setting:has(input:checked) {
  border-color: var(--blue);
  background: #edf6f8;
  box-shadow: inset 0 0 0 1px rgba(22, 127, 192, 0.12);
}

.preference-form input {
  width: 17px;
  height: 17px;
  flex: none;
  accent-color: var(--blue-deep);
}

.preference-form label > span {
  display: grid;
  gap: 3px;
}

.preference-form label strong {
  color: var(--blue-deep);
  font-size: 13px;
}

.preference-form label small {
  color: var(--ink-soft);
  font-size: 10px;
}

.motion-setting {
  width: 100%;
  min-height: 64px;
}

.preference-actions {
  display: flex;
  align-items: center;
  margin-top: 24px;
  gap: 10px;
}

#preference-status {
  margin-left: auto;
  color: var(--success);
  font-size: 11px;
}

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

.account-panel {
  min-height: 260px;
  padding: 26px;
  box-shadow: none;
}

.account-details {
  margin: 24px 0 0;
}

.account-details div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  border-bottom: 1px solid #e7e1d6;
  gap: 18px;
}

.account-details div:last-child {
  border-bottom: 0;
}

.account-details dt {
  color: var(--ink-soft);
  font-size: 12px;
}

.account-details dd {
  margin: 0;
  color: var(--blue-deep);
  font-size: 12px;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: right;
}

.guardian-status {
  display: flex;
  align-items: center;
  padding: 17px;
  margin-top: 24px;
  border-left: 3px solid var(--warning);
  background: #f9f1e1;
  gap: 11px;
}

.guardian-status > span {
  width: 10px;
  height: 10px;
  flex: none;
  background: var(--warning);
  border-radius: 50%;
}

.guardian-status strong {
  color: #76501f;
  font-size: 13px;
}

.guardian-panel > p {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.reset-panel > p {
  margin: 24px 0 18px;
  color: var(--ink-soft);
  font-size: 12px;
}

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

.button.danger:hover:not(:disabled) {
  background: #963832;
}

.reset-dialog {
  width: min(calc(100% - 30px), 520px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 24px 70px rgba(18, 25, 31, 0.24);
}

.reset-dialog::backdrop {
  background: rgba(18, 31, 42, 0.58);
  backdrop-filter: blur(3px);
}

.reset-dialog form {
  padding: 26px;
}

.reset-dialog form > p {
  margin: 20px 0 24px;
  color: var(--ink-soft);
  font-size: 13px;
}

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

@media (max-width: 1120px) {
  .ability-overview-grid {
    grid-template-columns: 1fr;
  }

  .radar-panel {
    display: grid;
    grid-template-columns: 1fr minmax(360px, 0.9fr);
    align-items: center;
  }

  .radar-panel .panel-heading {
    grid-column: 1 / -1;
  }

  .radar-chart {
    height: 260px;
  }

  .trend-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
  }

  .monthly-report {
    grid-template-columns: 1fr 1.2fr;
  }

  .monthly-next {
    grid-column: 1 / -1;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid rgba(128, 80, 39, 0.2);
    gap: 18px;
  }

  .monthly-next > strong {
    margin-bottom: 0;
  }

  .profile-quick-stats {
    min-width: 420px;
  }

  .student-tag-grid,
  .wrong-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 900px) {
  .records-intro-inner,
  .profile-hero-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
  }

  .sync-status {
    min-width: 0;
  }

  .records-intro-inner > div:first-child {
    width: 100%;
    min-width: 0;
  }

  .profile-quick-stats {
    width: 100%;
    min-width: 0;
  }

  .jmi-panel {
    grid-template-columns: 220px 1fr;
    padding: 26px;
  }

  .jmi-gauge {
    width: 210px;
    height: 210px;
  }

  .trend-layout,
  .map-columns,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .trend-insight {
    min-height: 245px;
  }

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

  .chapter-score:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .chapter-score:nth-child(2n) {
    border-right: 0;
  }

  .chapter-score:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .chapter-score:last-child {
    border-right: 0;
    border-bottom: 0;
  }

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

  .settings-layout {
    gap: 24px;
  }

  .settings-intro {
    position: static;
  }
}

@media (max-width: 820px) {
  .records-section {
    padding-block: 42px;
  }

  .records-intro-inner,
  .profile-hero-inner {
    min-height: 220px;
    padding-block: 30px;
  }

  .records-intro::after {
    right: -45px;
    font-size: 94px;
  }

  .records-intro h1 {
    font-size: 31px;
  }

  .records-heading {
    margin-bottom: 22px;
  }

  .segmented-control button {
    min-height: 44px;
  }

  .radar-panel {
    display: block;
  }

  .radar-chart {
    height: auto;
  }

  .trend-chart {
    min-height: 220px;
    aspect-ratio: auto;
  }

  .chapter-score-grid {
    grid-template-columns: 1fr;
  }

  .chapter-score,
  .chapter-score:nth-child(3n),
  .chapter-score:nth-child(2n),
  .chapter-score:nth-last-child(-n + 3) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chapter-score:last-child {
    border-bottom: 0;
  }

  .monthly-report {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .monthly-metrics {
    border-inline: 0;
    border-block: 1px solid rgba(128, 80, 39, 0.25);
    padding-block: 16px;
  }

  .monthly-next {
    grid-column: auto;
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 0;
    border-top: 0;
    gap: 5px;
  }

  .monthly-next > strong {
    margin-bottom: 9px;
  }

  .profile-local-nav {
    overflow-x: auto;
  }

  .profile-local-nav .page-shell {
    width: max-content;
    min-width: calc(100% - 30px);
    padding-right: 15px;
    gap: 26px;
  }

  .student-tag-grid,
  .wrong-category-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }

  .student-tag-group,
  .wrong-category {
    min-height: 0;
  }

  .settings-layout {
    padding-block: 42px;
  }
}

@media (max-width: 560px) {

  .hall-empty-state {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 18px;
  }

  .hall-empty-state .button {
    width: 100%;
  }
  .records-heading,
  .subsection-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .trend-heading {
    align-items: stretch;
  }

  .segmented-control {
    align-self: flex-start;
  }

  .jmi-panel {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 23px 20px;
    text-align: center;
  }

  .jmi-gauge {
    width: 190px;
    height: 190px;
  }

  .gauge-copy strong {
    font-size: 46px;
  }

  .jmi-explanation {
    display: grid;
    justify-items: center;
  }

  .evidence-list {
    width: 100%;
  }

  .chart-panel,
  .map-panel,
  .preference-form {
    padding: 20px 16px;
  }

  .radar-chart {
    margin-inline: -7px;
    max-width: calc(100% + 14px);
  }

  .trend-panel {
    padding-inline: 10px;
  }

  .trend-chart {
    min-height: 205px;
  }

  .trend-insight {
    min-height: 260px;
  }

  .knowledge-cell {
    grid-template-columns: minmax(92px, 0.8fr) 1fr 30px;
    padding-inline: 8px;
    gap: 8px;
  }

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

  .badge-item {
    min-height: 132px;
  }

  .profile-identity {
    gap: 16px;
  }

  .large-avatar {
    width: 68px;
    height: 68px;
    font-size: 31px;
  }

  .profile-identity h1 {
    font-size: 29px;
  }

  .profile-quick-stats div {
    min-height: 78px;
    padding-inline: 8px;
  }

  .profile-quick-stats dd {
    font-size: 16px;
    white-space: normal;
  }

  .profile-quick-stats dt {
    font-size: 9px;
  }

  .chapter-match-list {
    grid-template-columns: 1fr;
  }

  .preference-form fieldset {
    grid-template-columns: 1fr;
  }

  .preference-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #preference-status {
    min-height: 18px;
    margin-left: 0;
    text-align: center;
  }

  .account-panel {
    min-height: 0;
    padding: 21px;
  }

  .reset-dialog form {
    padding: 20px;
  }

  .reset-dialog .dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gauge-value,
  .radar-value-shape,
  .score-track span,
  .dimension-track span,
  .chapter-track span,
  .badge-progress span,
  .match-track span {
    transition: none;
  }
}

/* Round 2 record workspaces */
.records-tab-panel[hidden] {
  display: none !important;
}

.records-tab-band {
  border-bottom: 1px solid var(--line);
}

.records-tabs {
  display: grid;
  width: 100%;
  max-width: 760px;
  grid-auto-columns: minmax(120px, 1fr);
  grid-auto-flow: column;
}

.records-tabs [role="tab"] {
  position: relative;
  display: grid;
  min-height: 54px;
  place-items: center;
  padding: 8px 18px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.records-tabs [role="tab"]::after {
  position: absolute;
  right: 24%;
  bottom: 0;
  left: 24%;
  height: 3px;
  content: "";
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 160ms ease;
}

.records-tabs [role="tab"]:hover,
.records-tabs [role="tab"]:focus-visible,
.records-tabs [role="tab"][aria-selected="true"] {
  color: var(--blue-deep);
}

.records-tabs [role="tab"][aria-selected="true"]::after {
  transform: scaleX(1);
}

.records-tabs [role="tab"]:focus-visible {
  z-index: 1;
  outline: 3px solid rgba(22, 127, 192, 0.28);
  outline-offset: -3px;
}

.records-tab-panel {
  min-height: 560px;
  scroll-margin-top: 126px;
}

.ability-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  align-items: stretch;
  gap: 24px;
}

.compact-jmi {
  min-height: 328px;
}

.dimension-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: 0 9px 26px rgba(50, 42, 28, 0.07);
}

.dimension-panel .dimension-bars {
  margin-top: 18px;
}

.dimension-panel .data-empty {
  margin-top: 22px;
}

.period-summary {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(370px, 1.2fr) minmax(220px, 0.8fr);
  align-items: center;
  padding: 26px 28px;
  margin-top: 24px;
  border: 1px solid #d1b27e;
  border-radius: 8px;
  background: #f1e2c5;
  gap: 30px;
}

.period-summary h3 {
  margin: 0;
  color: var(--blue-deep);
  font-family: "Songti SC", "SimSun", serif;
  font-size: 19px;
}

.period-summary .monthly-metrics {
  border-color: rgba(128, 80, 39, 0.22);
}

.period-next {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.period-next > span {
  color: #655c4b;
  font-size: 11px;
}

.period-next > strong {
  margin-bottom: 5px;
  color: var(--blue-deep);
  font-size: 14px;
}

.trend-state-copy {
  min-height: 20px;
  margin: -3px 0 0;
  color: #735d34;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.trend-panel[data-trend-state="series"] .trend-state-copy:empty {
  display: none;
}

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(520px, 1.12fr);
  align-items: start;
  gap: 40px;
}

.results-block {
  min-width: 0;
}

.results-block + .results-block {
  padding-left: 40px;
  border-left: 1px solid var(--line);
}

.results-block > .panel-heading {
  min-height: 46px;
  margin-bottom: 18px;
}

.results-layout .chapter-score-grid {
  grid-template-columns: 1fr;
}

.results-layout .chapter-score,
.results-layout .chapter-score:nth-child(2n),
.results-layout .chapter-score:nth-child(3n),
.results-layout .chapter-score:nth-last-child(-n + 3) {
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

.results-layout .chapter-score:last-child {
  border-bottom: 0;
}

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

.compact-badge-grid .badge-item {
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 126px;
  padding: 16px 14px;
  gap: 12px;
}

.compact-badge-grid .badge-emblem {
  width: 52px;
  height: 52px;
}

.compact-badge-grid .badge-emblem span {
  width: 34px;
  height: 34px;
  font-size: 15px;
}

.compact-badge-grid .badge-copy h3 {
  min-height: 0;
  margin: 4px 0 8px;
  font-size: 13px;
}

.mistake-group-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.mistake-group {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: start;
  min-height: 238px;
  padding: 22px;
  border: 1px solid #d9c291;
  border-left: 4px solid var(--warning);
  border-radius: 8px;
  background: #fffaf0;
  gap: 16px;
}

.mistake-group.resolved {
  border-color: #b8d1bf;
  border-left-color: var(--success);
  background: #f4f8f4;
}

.mistake-group-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fffdf8;
  background: var(--gold);
  border-radius: 6px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 18px;
}

.mistake-group.resolved .mistake-group-mark {
  background: var(--success);
}

.mistake-group-body {
  min-width: 0;
}

.mistake-group-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.mistake-group-heading h3 {
  margin: 0;
  color: var(--blue-deep);
  font-family: "Songti SC", "SimSun", serif;
  font-size: 17px;
}

.mistake-state {
  flex: none;
  padding: 3px 7px;
  color: #77531e;
  background: #f4e3c2;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
}

.mistake-group.resolved .mistake-state {
  color: #24613d;
  background: #dfefe3;
}

.mistake-summary {
  margin: 14px 0 12px;
  color: var(--ink-soft);
  font-size: 13px;
}

.mistake-group-meta {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: #79766e;
  font-size: 11px;
  gap: 6px 18px;
}

.mistake-raw-details {
  margin: 8px 0 14px;
  border-block: 1px solid var(--line);
}

.mistake-raw-details summary {
  min-height: 44px;
  align-content: center;
  color: var(--blue-deep);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.mistake-raw-details > p {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 10px;
}

.mistake-raw-details ol {
  display: grid;
  padding: 0 0 12px 20px;
  margin: 0;
  gap: 8px;
}

.mistake-raw-details li {
  color: var(--ink-soft);
  font-size: 11px;
}

.mistake-raw-details code {
  display: block;
  max-width: 100%;
  padding: 8px;
  overflow-wrap: anywhere;
  color: #4c4b46;
  background: #f0eee8;
  white-space: pre-wrap;
}

.mistake-raw-details time {
  display: block;
  margin-top: 3px;
  color: #858077;
  font-size: 9px;
}

.mistake-empty {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  gap: 16px;
}

.mistake-empty > span {
  display: grid;
  width: 48px;
  height: 48px;
  flex: none;
  place-items: center;
  color: #fffdf8;
  background: var(--blue-deep);
  border: 2px solid var(--gold-bright);
  border-radius: 6px;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 18px;
}

.mistake-empty h3 {
  margin-bottom: 4px;
  color: var(--blue-deep);
}

.mistake-empty p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

@media (max-width: 1120px) {
  .ability-summary-grid,
  .results-layout {
    grid-template-columns: 1fr;
  }

  .results-block + .results-block {
    padding: 32px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .period-summary {
    grid-template-columns: minmax(180px, 0.65fr) minmax(420px, 1.35fr);
  }

  .period-next {
    grid-column: 1 / -1;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding-top: 18px;
    border-top: 1px solid rgba(128, 80, 39, 0.2);
    gap: 18px;
  }

  .period-next > strong {
    margin-bottom: 0;
  }
}

@media (max-width: 820px) {
  .records-tabs {
    max-width: none;
    grid-auto-columns: minmax(96px, 1fr);
  }

  .records-tab-panel {
    min-height: 500px;
  }

  .period-summary {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .period-summary .monthly-metrics {
    border-inline: 0;
    border-block: 1px solid rgba(128, 80, 39, 0.25);
    padding-block: 14px;
  }

  .period-next {
    grid-column: auto;
    grid-template-columns: 1fr;
    align-items: start;
    padding-top: 0;
    border-top: 0;
    gap: 5px;
  }

  .period-next > strong {
    margin-bottom: 5px;
  }

  .mistake-group-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .records-tabs {
    width: max-content;
    min-width: 100%;
    grid-auto-columns: minmax(88px, 1fr);
  }

  .records-tab-band {
    overflow-x: auto;
  }

  .records-tabs [role="tab"] {
    min-height: 48px;
    padding-inline: 12px;
  }

  .records-tab-panel {
    min-height: calc(100vh - 220px);
  }

  .compact-jmi {
    min-height: 0;
  }

  .dimension-panel,
  .period-summary {
    padding: 20px 16px;
  }

  .period-summary .monthly-metrics div {
    padding-inline: 8px;
  }

  .period-summary .monthly-metrics dd {
    font-size: 21px;
  }

  .compact-badge-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .compact-badge-grid .badge-item {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 112px;
    padding: 13px 10px;
    gap: 8px;
  }

  .compact-badge-grid .badge-emblem {
    width: 36px;
    height: 36px;
  }

  .compact-badge-grid .badge-emblem span {
    width: 25px;
    height: 25px;
    font-size: 11px;
  }

  .compact-badge-grid .badge-copy h3 {
    font-size: 11px;
  }

  .compact-badge-grid .badge-copy small,
  .compact-badge-grid .badge-status {
    font-size: 9px;
  }

  .mistake-group {
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 0;
    padding: 18px 14px;
    gap: 11px;
  }

  .mistake-group-mark {
    width: 38px;
    height: 38px;
  }

  .mistake-group-heading {
    gap: 8px;
  }

  .mistake-group-heading h3 {
    font-size: 15px;
  }

  .mistake-state {
    font-size: 9px;
  }

  .mistake-empty {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .records-tabs [role="tab"]::after {
    transition: none;
  }
}

/* Round 3: truthful first-run states and prototype boundaries. */
.records-page .eyebrow,
.records-page .panel-kicker {
  color: #875714;
  font-size: 12px;
}

.growth-page .records-intro .eyebrow,
.me-page .records-intro .eyebrow,
.records-page .records-band-blue .eyebrow {
  color: #f6d79d;
}

.records-page .data-empty,
.records-page .score-policy,
.records-page .evidence-list dt,
.records-page .tag-group-heading small,
.records-page .wrong-category-title small,
.records-page .account-panel-heading small,
.records-page .student-tag-group li,
.records-page .mistake-state,
.records-page .mistake-group-meta,
.records-page .mistake-raw-details summary,
.records-page .mistake-raw-details > p,
.records-page .mistake-raw-details li,
.records-page .mistake-raw-details time {
  font-size: 12px;
}

.records-page .subsection-heading p,
.records-page .reset-panel > p,
.records-page .boundary-panel > p {
  color: #555851;
  font-size: 13px;
}

.initial-record-status,
.profile-initial-summary {
  display: flex;
  min-width: min(380px, 100%);
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(232, 209, 171, 0.35);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  gap: 12px;
}

.initial-record-status > span,
.profile-initial-summary > span {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  color: #fffdf8;
  border: 2px solid #d7a24f;
  border-radius: 6px;
  background: #24577d;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 18px;
}

.initial-record-status > div,
.profile-initial-summary > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.initial-record-status strong,
.profile-initial-summary strong {
  color: #fffdf8;
  font-size: 14px;
}

.initial-record-status small,
.profile-initial-summary p {
  margin: 0;
  color: #d2e0e6;
  font-size: 12px;
}

.learning-record-initial {
  display: grid;
  grid-template-columns: minmax(190px, 0.55fr) minmax(0, 1.45fr);
  min-height: 330px;
  align-items: center;
  padding-block: 34px;
  border-block: 1px solid var(--line);
  gap: clamp(34px, 6vw, 76px);
}

.learning-record-initial h2,
.records-empty-panel h2 {
  margin: 0 0 10px;
  color: var(--blue-deep);
  font-family: "Songti SC", "SimSun", serif;
  font-size: 27px;
}

.learning-record-initial-copy > p:not(.eyebrow),
.records-empty-panel > div > p:not(.eyebrow) {
  max-width: 68ch;
  margin-bottom: 20px;
  color: #52554f;
  font-size: 14px;
}

.learning-record-initial-visual {
  position: relative;
  width: min(260px, 100%);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid #cfc4b1;
  border-radius: 6px;
  background: #d9bd89;
}

.learning-record-initial-visual::before,
.learning-record-initial-visual::after,
.learning-record-initial-visual span,
.learning-record-initial-visual i {
  position: absolute;
  content: "";
}

.learning-record-initial-visual::before {
  top: 28px;
  bottom: 54px;
  left: 22px;
  width: 42%;
  border-block: 8px solid #c69d58;
  border-radius: 6px;
  background: #f1dfb8;
  box-shadow: inset 7px 0 #d6b878, inset -7px 0 #d6b878;
}

.learning-record-initial-visual::after {
  top: 35px;
  right: 18px;
  bottom: 47px;
  width: 42%;
  border: 1px solid #a9b6bd;
  border-left: 7px solid #406d87;
  border-radius: 4px;
  background: #fffdf8;
  box-shadow: inset 9px 0 #e5ecee;
}

.learning-record-initial-visual span {
  z-index: 1;
  bottom: 25px;
  width: 38px;
  height: 5px;
  border-radius: 2px;
  background: #345f78;
}

.learning-record-initial-visual span:nth-child(1) {
  left: 32px;
  transform: rotate(8deg);
}

.learning-record-initial-visual span:nth-child(2) {
  left: 84px;
  width: 31px;
  background: #b47b2f;
  transform: rotate(-11deg);
}

.learning-record-initial-visual span:nth-child(3) {
  left: 128px;
  width: 35px;
  transform: rotate(15deg);
}

.learning-record-initial-visual i {
  z-index: 1;
  right: 24px;
  bottom: 18px;
  width: 58px;
  height: 28px;
  border: 4px solid #31586f;
  border-radius: 3px;
  background: repeating-linear-gradient(90deg, #d8ad61 0 4px, #f1dcae 4px 10px);
}

.initial-state-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 620px;
  padding-block: 14px;
  margin: 0 0 22px;
  border-block: 1px solid var(--line);
}

.initial-state-facts div {
  display: grid;
  min-width: 0;
  padding-inline: 14px;
  border-right: 1px solid var(--line);
  gap: 4px;
}

.initial-state-facts div:first-child {
  padding-left: 0;
}

.initial-state-facts div:last-child {
  padding-right: 0;
  border-right: 0;
}

.initial-state-facts dt {
  color: #5d6059;
  font-size: 12px;
}

.initial-state-facts dd {
  margin: 0;
  color: var(--blue-deep);
  font-size: 14px;
  font-weight: 800;
}

.records-empty-panel {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  min-height: 280px;
  align-items: center;
  padding-block: 32px;
  border-block: 1px solid var(--line);
  gap: 26px;
}

.records-empty-mark,
.me-initial-mark {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  color: #fffdf8;
  border: 3px solid #d7a24f;
  border-radius: 7px;
  background: var(--blue-deep);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 25px;
}

.profile-initial-summary {
  min-width: min(430px, 100%);
}

.chapter-match-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chapter-match {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-strong);
}

.chapter-match > p {
  margin: 0;
  color: #5b5d57;
  font-size: 12px;
}

.mistake-empty {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  min-height: 260px;
  justify-content: initial;
  padding: 30px;
  border-style: solid;
  gap: 34px;
}

.mistake-empty-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid #c9d2d5;
  border-radius: 6px;
  background: #edf3f4;
}

.mistake-empty-visual::before,
.mistake-empty-visual::after,
.mistake-empty-visual span,
.mistake-empty-visual i {
  position: absolute;
  content: "";
}

.mistake-empty-visual::before {
  inset: 20px 24px;
  border: 2px solid #6889a0;
  border-radius: 5px;
  background: #fffdf8;
}

.mistake-empty-visual::after {
  z-index: 2;
  right: 42px;
  bottom: 34px;
  width: 34px;
  height: 42px;
  border: 2px solid #4d8565;
  border-radius: 3px;
  background: #e8f1eb;
  transform: rotate(5deg);
}

.mistake-empty-visual span {
  z-index: 1;
  right: 48px;
  left: 48px;
  height: 2px;
  background: #c8ceca;
}

.mistake-empty-visual span:nth-child(1) {
  top: 58px;
}

.mistake-empty-visual span:nth-child(2) {
  top: 82px;
}

.mistake-empty-visual i {
  z-index: 1;
  top: 106px;
  right: 76px;
  left: 48px;
  height: 2px;
  background: #c8ceca;
}

.mistake-empty h3 {
  font-size: 22px;
}

.mistake-empty p:not(.panel-kicker) {
  max-width: 62ch;
  margin-bottom: 18px;
  font-size: 13px;
}

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

.boundary-panel > p {
  margin: 24px 0 0;
  line-height: 1.75;
}

@media (max-width: 900px) {
  .learning-record-initial {
    grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1.58fr);
  }

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

@media (max-width: 820px) {
  .initial-record-status,
  .profile-initial-summary {
    min-width: 0;
  }

  .learning-record-initial,
  .records-empty-panel,
  .mistake-empty {
    grid-template-columns: 1fr;
    min-height: 0;
    align-items: start;
    gap: 22px;
  }

  .learning-record-initial-visual {
    width: min(220px, 72vw);
  }

  .initial-state-facts {
    grid-template-columns: 1fr;
  }

  .initial-state-facts div,
  .initial-state-facts div:first-child,
  .initial-state-facts div:last-child {
    min-height: 50px;
    align-content: center;
    padding-inline: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .initial-state-facts div:last-child {
    border-bottom: 0;
  }

  .mistake-empty-visual {
    width: min(180px, 60vw);
  }

  .account-grid,
  .chapter-match-list {
    grid-template-columns: 1fr;
  }

  .records-page {
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 560px) {
  .records-page .mistake-state,
  .records-page .compact-badge-grid .badge-copy h3,
  .records-page .compact-badge-grid .badge-copy small,
  .records-page .compact-badge-grid .badge-status {
    font-size: 12px;
  }

  .learning-record-initial h2,
  .records-empty-panel h2 {
    font-size: 23px;
  }

  .profile-initial-summary {
    padding: 12px;
  }

  .profile-initial-summary > span {
    width: 38px;
    height: 38px;
  }

  .mistake-empty {
    padding: 22px 16px;
  }
}
