:root {
  --bg: #f7f4ee;
  --bg-deep: #e7decd;
  --panel: rgba(255, 253, 248, 0.9);
  --panel-strong: rgba(255, 251, 245, 0.97);
  --ink: #1d211c;
  --muted: #676252;
  --line: rgba(76, 68, 49, 0.12);
  --brand: #1e6b60;
  --brand-strong: #155046;
  --brand-soft: rgba(30, 107, 96, 0.11);
  --accent: #d19035;
  --accent-soft: rgba(209, 144, 53, 0.14);
  --correct: #23865a;
  --correct-soft: rgba(35, 134, 90, 0.13);
  --wrong: #c45a46;
  --wrong-soft: rgba(196, 90, 70, 0.13);
  --saved: #607cae;
  --saved-soft: rgba(96, 124, 174, 0.14);
  --shadow: 0 18px 72px rgba(92, 72, 44, 0.1);
  --radius: 28px;
  --hero-inline-pad: 28px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  padding: 26px;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(209, 144, 53, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(30, 107, 96, 0.16), transparent 28%),
    linear-gradient(180deg, #fcfaf5 0%, var(--bg) 100%);
  font-family: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(30, 107, 96, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 107, 96, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 85%);
}

img {
  max-width: 100%;
  display: block;
}

button,
select {
  font: inherit;
}

button {
  appearance: none;
}

.page-shell {
  position: relative;
  max-width: 1480px;
  margin: 0 auto;
}

.hero {
  margin-bottom: 18px;
}

.hero-copy-wrap,
.hero-stats,
.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.hero-copy-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 18px;
  min-height: 118px;
  padding: 20px var(--hero-inline-pad);
  background:
    radial-gradient(circle at top right, rgba(209, 144, 53, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(249, 244, 235, 0.9));
}

/* 首页标题区改成极简样式，只保留主标题，避免头图占位过大 */
.hero-copy-wrap .eyebrow,
.hero-copy-wrap .hero-copy,
.hero-copy-wrap .hero-pills {
  display: none;
}

.hero-copy-wrap::after,
.hero-stats::after,
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.25), transparent 38%);
}

.eyebrow,
.panel-kicker {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1,
.panel h2,
.question-card h3,
.summary-rate {
  font-family: "Source Han Serif SC", "Noto Serif SC", "STZhongsong", "Songti SC", serif;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.72rem, 2.6vw, 2.5rem);
  line-height: 1.22;
  flex: 1 1 360px;
}

.hero-stats-toggle {
  flex: 0 0 auto;
  min-width: 108px;
}

.hero-copy {
  margin: 0;
  max-width: 48rem;
  color: var(--muted);
  line-height: 1.86;
  font-size: 1.02rem;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.hero-pill,
.soft-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(76, 68, 49, 0.08);
  color: var(--muted);
}

.soft-chip.mode-sequence {
  color: var(--brand-strong);
}

.soft-chip.mode-random {
  background: var(--accent-soft);
  color: #9d6318;
}

.soft-chip.mode-wrong {
  background: var(--wrong-soft);
  color: var(--wrong);
}

.hero-stats {
  display: none;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  min-height: 74px;
  margin: 14px 0 0;
}

.hero-stats.is-expanded {
  display: grid;
}

.hero-metric {
  position: relative;
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(76, 68, 49, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(233, 225, 209, 0.42));
}

.hero-metric.accent {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(209, 144, 53, 0.16));
}

.hero-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.hero-metric strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(1.35rem, 1.8vw, 1.9rem);
  line-height: 1;
}

.view-switch {
  display: inline-flex;
  gap: 10px;
  padding: 8px;
  margin: 0 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(92, 72, 44, 0.08);
}

.view-tab {
  min-height: 46px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.view-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 10px 24px rgba(30, 107, 96, 0.24);
}

.view-panel {
  display: block;
}

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

.sidebar,
.workspace,
.practical-sidebar,
.practical-stage {
  display: grid;
  gap: 18px;
  align-content: start;
}

.sidebar-panel,
.practical-panel,
.question-stage,
.navigator-panel,
.practical-viewer,
.practical-info-card,
.practical-pages-panel {
  padding: 22px;
}

.sidebar-panel:first-child {
  position: sticky;
  top: 18px;
  z-index: 2;
}

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

.panel-head.compact {
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 6px 0 0;
  font-size: 1.18rem;
}

.field-grid,
.field {
  display: grid;
  gap: 12px;
}

.field span {
  color: var(--muted);
  font-size: 0.94rem;
}

select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(76, 68, 49, 0.1);
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.primary-btn,
.ghost-btn {
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.primary-btn {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 10px 24px rgba(30, 107, 96, 0.24);
}

.primary-btn.alt {
  background: linear-gradient(135deg, var(--accent), #b7741e);
  box-shadow: 0 10px 24px rgba(209, 144, 53, 0.24);
}

.ghost-btn {
  border: 1px solid rgba(76, 68, 49, 0.12);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

.primary-btn:hover,
.ghost-btn:hover,
.option-item:hover,
.navigator-item:hover,
.view-tab:hover,
.practical-module-card:hover,
.page-chip:hover {
  transform: translateY(-1px);
}

.primary-btn:hover {
  box-shadow: 0 14px 28px rgba(30, 107, 96, 0.28);
}

.primary-btn.alt:hover {
  box-shadow: 0 14px 28px rgba(209, 144, 53, 0.28);
}

.primary-btn:disabled,
.ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
  box-shadow: none;
}

.stats-grid,
.focus-grid,
.practical-grid {
  display: grid;
  gap: 12px;
}

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

.stat-card,
.mini-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(76, 68, 49, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(236, 228, 213, 0.42));
}

.stat-card span,
.mini-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.stat-card strong,
.mini-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.4rem;
  line-height: 1.35;
}

.mini-card strong {
  font-size: 1.08rem;
}

.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.summary-rate {
  font-size: 1.35rem;
  color: var(--brand-strong);
  line-height: 1;
}

.progress-block {
  margin-top: 16px;
}

.progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.progress-copy span {
  color: var(--muted);
}

.progress-copy strong {
  font-size: 1rem;
}

.progress-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: rgba(30, 107, 96, 0.08);
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width 0.28s ease;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(76, 68, 49, 0.08);
  color: var(--muted);
  font-size: 0.88rem;
}

.status-badge.is-neutral,
.status-badge.is-empty {
  background: rgba(76, 68, 49, 0.08);
  color: var(--muted);
}

.status-badge.is-active {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.status-badge.is-correct {
  background: var(--correct-soft);
  color: var(--correct);
}

.status-badge.is-wrong {
  background: var(--wrong-soft);
  color: var(--wrong);
}

.shortcut-list,
.bullet-list,
.number-list {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.shortcut-list {
  padding-left: 18px;
}

.bullet-list,
.number-list {
  padding-left: 20px;
}

kbd {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 1.7rem;
  min-height: 1.7rem;
  padding: 0 0.4rem;
  border-radius: 9px;
  border: 1px solid rgba(76, 68, 49, 0.12);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font-size: 0.84rem;
}

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

.stage-head h2 {
  margin: 6px 0 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.stage-side {
  display: grid;
  justify-items: end;
  gap: 10px;
  text-align: right;
}

.question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.92rem;
}

.tag.type-single {
  background: rgba(30, 107, 96, 0.12);
  color: var(--brand-strong);
}

.tag.type-tf {
  background: var(--accent-soft);
  color: #9d6318;
}

.muted-tag {
  background: rgba(76, 68, 49, 0.07);
  color: var(--muted);
}

.question-card {
  position: relative;
  padding: 24px 24px 20px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.72), transparent 28%),
    linear-gradient(180deg, rgba(255, 254, 250, 0.98), rgba(246, 240, 228, 0.93));
  border: 1px solid rgba(76, 68, 49, 0.1);
}

.question-brow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.question-brow-mark {
  display: inline-grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}

.question-card h3 {
  margin: 0;
  font-size: clamp(1.42rem, 2vw, 2.04rem);
  line-height: 1.72;
}

.option-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.option-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(76, 68, 49, 0.1);
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.option-item .badge {
  width: 2.35rem;
  height: 2.35rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(30, 107, 96, 0.1);
  color: var(--brand-strong);
  font-weight: 700;
}

.option-item .text {
  line-height: 1.78;
}

.option-item .state-mark {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid rgba(76, 68, 49, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.option-item.selected {
  border-color: rgba(30, 107, 96, 0.34);
  background: rgba(30, 107, 96, 0.08);
  box-shadow: 0 12px 22px rgba(30, 107, 96, 0.08);
}

.option-item.selected .badge {
  background: rgba(30, 107, 96, 0.16);
}

.option-item.selected .state-mark {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.9);
}

.option-item.correct {
  border-color: rgba(35, 134, 90, 0.34);
  background: var(--correct-soft);
}

.option-item.correct .badge {
  background: rgba(35, 134, 90, 0.16);
  color: var(--correct);
}

.option-item.correct .state-mark {
  background: var(--correct);
  border-color: var(--correct);
}

.option-item.wrong {
  border-color: rgba(196, 90, 70, 0.34);
  background: var(--wrong-soft);
}

.option-item.wrong .badge {
  background: rgba(196, 90, 70, 0.16);
  color: var(--wrong);
}

.option-item.wrong .state-mark {
  background: var(--wrong);
  border-color: var(--wrong);
}

.option-item:disabled {
  cursor: default;
}

.feedback-card {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid rgba(76, 68, 49, 0.1);
  background: rgba(255, 255, 255, 0.78);
}

.feedback-card.correct-state {
  background: var(--correct-soft);
  border-color: rgba(35, 134, 90, 0.34);
}

.feedback-card.wrong-state {
  background: var(--wrong-soft);
  border-color: rgba(196, 90, 70, 0.34);
}

.feedback-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.feedback-answer {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.action-row {
  justify-content: space-between;
}

.navigator-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.legend-dot {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  margin-right: 8px;
  border-radius: 50%;
  vertical-align: middle;
  background: rgba(76, 68, 49, 0.14);
}

.legend-dot.current {
  background: var(--brand);
}

.legend-dot.correct {
  background: var(--correct);
}

.legend-dot.wrong {
  background: var(--wrong);
}

.legend-dot.saved {
  background: var(--saved);
}

.navigator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 6px;
}

.navigator-item,
.navigator-empty,
.practical-empty {
  border-radius: 16px;
}

.navigator-item {
  min-height: 52px;
  border: 1px solid rgba(76, 68, 49, 0.1);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.navigator-item.current {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 18px rgba(30, 107, 96, 0.22);
}

.navigator-item.correct {
  background: var(--correct-soft);
  border-color: rgba(35, 134, 90, 0.3);
  color: var(--correct);
}

.navigator-item.wrong {
  background: var(--wrong-soft);
  border-color: rgba(196, 90, 70, 0.3);
  color: var(--wrong);
}

.navigator-item.saved {
  background: var(--saved-soft);
  border-color: rgba(96, 124, 174, 0.28);
  color: var(--saved);
}

.navigator-empty,
.practical-empty {
  padding: 22px;
  border: 1px dashed rgba(76, 68, 49, 0.16);
  color: var(--muted);
  text-align: center;
}

.practical-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
}

.practical-module-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.practical-module-card {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(76, 68, 49, 0.1);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.76), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(241, 235, 223, 0.62));
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.practical-module-card.is-active {
  border-color: rgba(30, 107, 96, 0.28);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.84), transparent 32%),
    linear-gradient(180deg, rgba(30, 107, 96, 0.12), rgba(255, 255, 255, 0.92));
  box-shadow: 0 14px 26px rgba(30, 107, 96, 0.12);
}

.practical-module-part {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.practical-module-title {
  font-size: 1.02rem;
}

.practical-module-meta,
.practical-module-summary {
  color: var(--muted);
  line-height: 1.7;
}

.practical-module-summary {
  margin: 0;
  font-size: 0.94rem;
}

.practical-figure {
  margin: 0;
  min-height: 420px;
  padding: 16px;
  border-radius: 26px;
  border: 1px solid rgba(76, 68, 49, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 237, 227, 0.92));
}

.practical-figure img {
  width: 100%;
  max-height: 720px;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(76, 68, 49, 0.1);
}

.practical-figure img.is-empty {
  min-height: 320px;
  background: rgba(76, 68, 49, 0.06);
  box-shadow: none;
}

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

.practical-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 10px;
}

.page-chip {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(76, 68, 49, 0.1);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.page-chip.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #b7741e);
  box-shadow: 0 10px 20px rgba(209, 144, 53, 0.22);
}

.hidden {
  display: none !important;
}

.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.option-item:focus-visible,
.navigator-item:focus-visible,
.view-tab:focus-visible,
.practical-module-card:focus-visible,
.page-chip:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(30, 107, 96, 0.22);
  outline-offset: 2px;
}

@media (max-width: 1260px) {
  .layout,
  .practical-layout {
    grid-template-columns: 1fr;
  }

  .hero-stats.is-expanded {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sidebar-panel:first-child {
    position: static;
  }
}

@media (max-width: 760px) {
  :root {
    --hero-inline-pad: 18px;
  }

  body {
    padding: 16px;
  }

  .hero-copy-wrap,
  .hero-stats,
  .question-stage,
  .navigator-panel,
  .sidebar-panel,
  .practical-panel,
  .practical-viewer,
  .practical-info-card,
  .practical-pages-panel {
    padding: 18px;
  }

  .hero-stats,
  .stats-grid,
  .focus-grid,
  .practical-grid {
    grid-template-columns: 1fr;
  }

  .stage-head,
  .panel-head {
    flex-direction: column;
  }

  .stage-side {
    justify-items: start;
    text-align: left;
  }

  .button-row,
  .action-row {
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn,
  .view-tab {
    width: 100%;
  }

  .view-switch {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .navigator-grid,
  .practical-page-grid {
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  }

  .practical-figure {
    min-height: 260px;
    padding: 12px;
  }
}
