:root {
  --bg: #f6faf6;
  --panel: #ffffff;
  --text: #1e2a22;
  --muted: #6a786f;
  --line: #dbe8dd;
  --soft: #edf6ef;
  --accent: #6c8d71;
  --accent-strong: #4d6a53;
  --shadow: 0 16px 40px rgba(47, 73, 55, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(circle at top left, #f8fff8 0, #f6faf6 36%, #f2f7f3 100%);
}

button {
  border: none;
  cursor: pointer;
  font: inherit;
}

.shell {
  width: min(1080px, calc(100% - 24px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero,
.test-wrap,
.result-wrap {
  padding: 28px;
}

.hero-minimal {
  max-width: 760px;
  margin: 12vh auto 0;
  text-align: center;
}

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

h1 {
  font-size: clamp(1.5rem, 4.2vw, 3rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

h3 {
  margin-bottom: 12px;
}

.hero-actions,
.button-row,
.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-actions-single {
  justify-content: center;
  margin-top: 24px;
}

.btn-primary,
.btn-secondary {
  padding: 14px 18px;
  border-radius: 18px;
  font-weight: 700;
}

.btn-primary {
  color: #fff;
  background: var(--accent-strong);
}

.btn-secondary {
  color: var(--text);
  background: var(--soft);
}

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

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.progress {
  flex: 1;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.progress-text,
.hint,
.type-subname,
.poster-caption,
.analysis-box p,
.note-box p,
.author-content p,
.dim-sub {
  color: var(--muted);
  line-height: 1.8;
}

.question-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.question,
.analysis-box,
.dim-box,
.note-box,
.author-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fcfefd;
}

.question {
  padding: 20px;
}

.question-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.badge,
.question-meta > div:last-child {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge {
  color: #fff;
  background: var(--accent-strong);
}

.question-meta > div:last-child {
  color: var(--muted);
  background: var(--soft);
}

.question-title {
  margin-bottom: 14px;
  font-size: 1.02rem;
  line-height: 1.75;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  cursor: pointer;
}

.option input {
  display: none;
}

.option:has(input:checked) {
  border-color: var(--accent-strong);
  background: #f3faf4;
  box-shadow: inset 0 0 0 1px var(--accent-strong);
}

.option-code {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-strong);
  background: var(--soft);
  font-weight: 700;
}

.actions-bottom {
  margin-top: 24px;
}

.actions-bottom .button-row {
  margin-top: 16px;
}

.result-top {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.poster-image {
  display: block;
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #f2f7f3;
}

.poster-caption,
.match {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--soft);
}

.type-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.type-name {
  margin-top: 8px;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.match {
  display: inline-block;
  color: var(--accent-strong);
  font-weight: 700;
}

.type-subname {
  margin-top: 10px;
}

.analysis-box,
.dim-box,
.note-box,
.author-box {
  margin-top: 24px;
  padding: 18px;
}

.group-qr {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: contain;
}

.dim-list {
  display: grid;
  gap: 12px;
}

.dim-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.dim-item-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.dim-item-name,
.dim-item-score {
  font-weight: 700;
}

.author-box summary {
  cursor: pointer;
  font-weight: 700;
}

.author-content {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.result-actions {
  margin-top: 24px;
}

@media (max-width: 860px) {
  .topbar,
  .result-top,
  .result-actions,
  .button-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}
