:root {
  --bg: #faf7f2;
  --bg-2: #f3ede3;
  --panel: #ffffff;
  --text: #1a1814;
  --muted: #7a7468;
  --line: #e8e2d5;
  --soft: #fbf4e8;
  --accent: #ff5b2e;
  --accent-strong: #e64415;
  --shadow: 0 18px 46px rgba(30, 20, 10, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1000px 500px at 10% -10%, #fff4e7 0, rgba(255,244,231,0) 60%),
    radial-gradient(800px 500px at 110% 10%, #ffe5dc 0, rgba(255,229,220,0) 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

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

.hero {
  padding: 44px 36px 40px;
  margin-top: 20px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 91, 46, 0.18), rgba(255, 91, 46, 0) 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 999px;
  padding: 8px 14px;
  margin-bottom: 20px;
  font-weight: 600;
}

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

.hero h1 {
  font-size: clamp(30px, 5.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  max-width: 720px;
  font-weight: 800;
}

.hero .sub {
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 30px;
}

.hero-meta {
  color: var(--muted);
  font-size: 13px;
}

.hero-stamp {
  position: absolute;
  top: 32px;
  right: 28px;
  z-index: 2;
  padding: 10px 18px;
  border: 3px solid #cc1818;
  border-radius: 10px;
  color: #cc1818;
  background: rgba(255, 255, 255, 0.35);
  text-align: center;
  transform: rotate(-9deg);
  opacity: 0.88;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(204, 24, 24, 0.2);
}

.hero-stamp-main {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1.1;
}

.hero-stamp-sub {
  font-size: 10px;
  font-weight: 700;
  margin-top: 4px;
  opacity: 0.75;
  letter-spacing: 0.18em;
}

.hero-footnote {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .hero-stamp {
    top: 20px;
    right: 16px;
    padding: 8px 12px;
  }
  .hero-stamp-main { font-size: 15px; }
  .hero-stamp-sub  { font-size: 9px; }
  .hero-footnote   { font-size: 10px; }
}

button {
  border: 0;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease, background .16s ease;
  font: inherit;
}

button:hover:not(:disabled) { transform: translateY(-1px); }
button:disabled { cursor: not-allowed; opacity: 0.5; transform: none; }

.btn-primary {
  background: var(--text);
  color: #fff;
  padding: 15px 22px;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(26, 24, 20, 0.18);
  font-weight: 700;
  font-size: 15px;
}
.btn-primary:hover:not(:disabled) { background: #000; }

.btn-secondary {
  background: #fff;
  color: var(--text);
  padding: 15px 22px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-weight: 700;
  font-size: 15px;
}

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.screen { display: none; }
.screen.active { display: block; }

.test-wrap, .result-wrap {
  margin-top: 22px;
  padding: 26px;
}

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

.progress {
  flex: 1;
  min-width: 240px;
  height: 10px;
  background: var(--bg-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #ff8a4c, var(--accent));
  border-radius: inherit;
  transition: width .24s ease;
}

.progress-text {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

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

.question {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff, #fdfaf4);
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-weight: 600;
}

.question-title {
  font-size: 16px;
  line-height: 1.7;
  font-weight: 600;
  white-space: pre-wrap;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .12s ease;
}

.option:hover { border-color: #ffb79f; background: #fff8f4; }

.option input {
  margin-top: 3px;
  accent-color: var(--accent);
  transform: scale(1.1);
  flex-shrink: 0;
}

.option:has(input:checked) {
  border-color: var(--accent);
  background: #fff4ee;
}

.option-code {
  font-weight: 800;
  color: var(--accent-strong);
  min-width: 22px;
}

.option-text { line-height: 1.6; }

.actions-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 6px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* Result */
.result-layout { display: grid; gap: 18px; }

.result-top {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
  align-items: stretch;
}

.poster-box,
.type-box,
.analysis-box,
.dim-box,
.top3-box,
.note-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  background: linear-gradient(180deg, #ffffff, #fdfaf4);
}

.poster-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 280px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 91, 46, 0.18), rgba(255, 91, 46, 0) 55%),
    linear-gradient(180deg, #fff8f2, #ffe9da);
}

.poster-box::after {
  content: "";
  position: absolute;
  left: -40px;
  bottom: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 91, 46, 0.14), rgba(255, 91, 46, 0) 70%);
  pointer-events: none;
}

.poster-emoji {
  font-size: 96px;
  line-height: 1;
  filter: drop-shadow(0 10px 20px rgba(255, 91, 46, 0.22));
  position: relative;
  z-index: 1;
}

.poster-logo {
  display: none;
  max-width: 140px;
  max-height: 120px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 10px 20px rgba(30, 20, 10, 0.14));
}

.poster-box.has-logo .poster-emoji { display: none; }
.poster-box.has-logo .poster-logo { display: block; }

.poster-caption {
  margin-top: 18px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 600;
  position: relative;
  z-index: 1;
  max-width: 260px;
}

.type-kicker {
  font-size: 12px;
  color: var(--accent-strong);
  margin-bottom: 10px;
  letter-spacing: .08em;
  font-weight: 700;
}

.type-name {
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 800;
}

.type-subname {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.match {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--text);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}

.analysis-box h3,
.dim-box h3,
.top3-box h3,
.note-box h3 {
  font-size: 16px;
  margin-bottom: 14px;
  font-weight: 800;
}

.analysis-box p {
  margin: 0;
  color: #302a22;
  font-size: 15px;
  line-height: 1.95;
  white-space: pre-wrap;
}

.note-box p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.top3-list { display: grid; gap: 10px; }

.top3-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}

.top3-item strong { font-size: 15px; display: block; margin-bottom: 2px; }
.top3-item span { color: var(--muted); font-size: 13px; }
.top3-score {
  color: var(--accent-strong);
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

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

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

.dim-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.dim-item-name { font-size: 13px; font-weight: 700; color: var(--text); }
.dim-item-score { color: var(--accent-strong); font-weight: 800; font-size: 13px; }
.dim-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.author-box {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fdfaf4);
  overflow: hidden;
}

.author-box summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.author-box summary::-webkit-details-marker { display: none; }

.author-box summary::after {
  content: '展开';
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-strong);
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 6px 12px;
  border-radius: 999px;
}
.author-box[open] summary::after { content: '收起'; }

.author-content {
  border-top: 1px solid var(--line);
  padding: 2px 20px 20px;
}

.author-content p {
  margin: 14px 0 0;
  color: #302a22;
  font-size: 14px;
  line-height: 1.9;
}

.result-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

@media (max-width: 860px) {
  .result-top { grid-template-columns: 1fr; }
  .dim-list { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .shell { padding: 14px 12px 42px; }
  .hero { padding: 32px 22px 30px; }
  .test-wrap, .result-wrap { padding: 18px; }
  .hero h1 { font-size: 30px; }
  .question-title { font-size: 15px; }
  .poster-emoji { font-size: 76px; }
}
