:root {
  --paper: #f5f2ea;
  --surface: #fffdf8;
  --ink: #20211f;
  --muted: #6e706a;
  --line: #d9d5ca;
  --accent: #435a49;
  --accent-soft: #e5ece5;
  --warn: #8a623e;
  --danger: #8a4c45;
  --shadow: 0 12px 36px rgba(34, 39, 34, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

button,
select,
textarea {
  font: inherit;
}

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

.site-header,
.step-nav,
.app-shell,
.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 22px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.prototype-badge,
.tag,
.rating {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  padding: 5px 10px;
}

.step-nav {
  padding-bottom: 18px;
  overflow-x: auto;
}

.step-nav ol {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 8px;
  min-width: 680px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-nav a {
  display: block;
  border-top: 2px solid var(--line);
  color: var(--muted);
  padding-top: 8px;
  text-decoration: none;
  font-size: 13px;
}

.step-nav a.active,
.step-nav a.completed {
  border-color: var(--accent);
  color: var(--accent);
}

.app-shell {
  min-height: 640px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page {
  padding: clamp(24px, 5vw, 64px);
}

.hero {
  display: grid;
  min-height: 520px;
  align-content: center;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(38px, 7vw, 72px);
  font-weight: 500;
  line-height: 1.08;
}

h2 {
  font-size: clamp(25px, 4vw, 36px);
  line-height: 1.25;
}

h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
}

.notice {
  margin: 24px 0;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 14px 16px;
  color: #334438;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  padding: 10px 17px;
  text-decoration: none;
}

.button:hover {
  filter: brightness(0.96);
}

.button.secondary {
  background: transparent;
  color: var(--accent);
}

.button.muted {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

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

.button:disabled {
  cursor: default;
  opacity: 0.45;
}

.stats,
.cards,
.final-columns {
  display: grid;
  gap: 14px;
}

.stats {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 24px;
}

.stat,
.card,
.panel,
.book-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffefa;
}

.stat {
  padding: 16px;
}

.stat strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 500;
}

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

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

.card {
  padding: 18px;
}

.card p,
.card dl,
.panel p {
  color: var(--muted);
  font-size: 14px;
}

.card-top,
.book-row,
.review-progress {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.card-top {
  align-items: start;
}

.card-top .tags {
  justify-content: flex-end;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rating {
  min-width: 30px;
  justify-content: center;
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

.rating.C {
  border-color: var(--warn);
  color: var(--warn);
}

.rating.D {
  border-color: var(--danger);
  color: var(--danger);
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(360px, 1.4fr);
  gap: 18px;
}

.panel {
  padding: 20px;
}

.book-list {
  display: grid;
  gap: 8px;
}

.book-row {
  width: 100%;
  align-items: center;
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.book-row.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.book-row span {
  color: var(--muted);
  font-size: 12px;
}

.detail-list {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 16px;
  margin: 20px 0 0;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list dd {
  margin: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 6px 12px;
}

.filter.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.review-progress {
  align-items: center;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 180ms ease;
}

.review-card {
  max-width: 760px;
  margin-inline: auto;
}

.decision-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 24px;
}

.decision-grid .button {
  min-height: 58px;
}

.field {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px;
}

.field textarea {
  min-height: 82px;
  resize: vertical;
}

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

.final-list {
  margin: 0;
  padding-left: 20px;
}

.final-list li {
  margin-bottom: 8px;
}

.rule-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-list li {
  border-left: 2px solid var(--accent);
  background: var(--accent-soft);
  padding: 10px 12px;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
  padding: 36px;
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 5;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
  padding: 12px 16px;
}

.site-footer {
  padding: 18px 0 32px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 820px) {
  .stats,
  .cards,
  .final-columns,
  .split {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .site-header {
    align-items: start;
    flex-direction: column;
  }

  .page {
    padding: 24px 18px;
  }

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