:root {
  --bg: #f3efe6;
  --bg-2: #e7decb;
  --card: #fffdf8;
  --ink: #171717;
  --muted: #665f52;
  --line: #d8cfbf;
  --accent: #101010;
  --accent-soft: #eee7d8;
  --shadow: 0 18px 48px rgba(45, 38, 24, 0.12);
  font-family: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
button { font: inherit; }
button:focus { outline: none; }

.page-shell {
  min-height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.app-card {
  width: 100%;
  max-width: 920px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.build-stamp {
  margin-top: 8px;
  font-size: 10px;
  line-height: 1;
  color: rgba(23, 23, 23, 0.35);
  user-select: none;
}

.screen { display: none; min-height: 720px; }
.screen-active { display: block; }

.hero-block, .result-card { padding: 56px 48px; }
.hero-main { text-align: center; }
.hero-copy { max-width: 720px; margin: 24px auto 0; }
.hero-sub {
  max-width: 700px;
  margin: 18px auto 0;
  line-height: 1.8;
  color: var(--muted);
  text-align: left;
  text-indent: 2em;
}
.info-label, .eyebrow, .question-tag {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--muted);
}

h1, h2 { margin: 0; line-height: 1.08; }
h1 { font-size: clamp(36px, 6vw, 64px); }
#question-text { font-size: clamp(28px, 4.5vw, 42px); margin: 16px 0 28px; }

.subtle, .result-subtitle, .small-note, #result-summary, #result-reason { color: var(--muted); line-height: 1.8; }
.small-note { font-size: 14px; }
.hero-copy .subtle {
  font-size: 12px;
  line-height: 1.6;
  color: rgba(102, 95, 82, 0.82);
}
.match-score {
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1;
  margin: 18px 0 10px;
  font-weight: 800;
  color: var(--ink);
}
.result-summary-hidden {
  display: none;
}

.primary-btn, .secondary-btn, .option-btn {
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.primary-btn {
  margin-top: 24px;
  background: var(--accent);
  color: white;
  padding: 16px 26px;
  font-weight: 700;
}
.secondary-btn {
  background: var(--accent-soft);
  color: var(--ink);
  padding: 14px 22px;
  font-weight: 700;
}
.primary-btn:hover, .secondary-btn:hover, .option-btn:hover { transform: translateY(-1px); }
.primary-btn:disabled, .secondary-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
.primary-btn:disabled:hover, .secondary-btn:disabled:hover {
  transform: none;
}

.quiz-topbar { padding: 28px 32px 20px; border-bottom: 1px solid var(--line); }
.progress-meta {
  display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 14px; margin-bottom: 12px;
}
.progress-track {
  height: 10px; background: var(--accent-soft); border-radius: 999px; overflow: hidden;
}
.progress-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.25s ease; }

.question-card { padding: 40px 32px 48px; }
.options-container { display: grid; gap: 14px; }
.quiz-actions {
  margin-top: 18px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.hidden { display: none !important; }
.option-btn {
  text-align: left; background: #f8f5ee; border: 1px solid transparent; padding: 20px 22px; color: var(--ink);
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
.option-btn:focus,
.option-btn:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: transparent;
}
.option-btn:active {
  outline: none;
  box-shadow: none;
  border-color: var(--ink);
  background: #f3ede1;
}
.option-btn-selected {
  border-color: var(--ink);
  background: #f1eadc;
  box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.04);
}
.option-btn-selected:hover,
.option-btn-selected:focus,
.option-btn-selected:focus-visible,
.option-btn-selected:active {
  border-color: var(--ink);
  background: #f1eadc;
  box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.04);
}
.option-btn-selected .option-label {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}
.option-btn:not(.option-btn-selected) .option-label {
  background: #fff;
  color: var(--ink);
}
.option-row { display: flex; align-items: flex-start; }
.option-label {
  display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center;
  font-size: 14px; background: white; border: 1px solid var(--line); margin-right: 12px; flex-shrink: 0;
}
.option-text { flex: 1; line-height: 1.75; }

.result-card { display: flex; flex-direction: column; gap: 18px; }
.result-info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.info-box, .ranking-box {
  border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: #f9f6ef;
}
.emphasis-box { background: #f4eddf; }
.ranking-box ol { margin: 12px 0 0; padding: 0; line-height: 1.9; list-style: none; }
.result-disclaimer {
  margin: 6px 0 0;
  text-align: center;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(102, 95, 82, 0.58);
}
.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  justify-content: space-between;
  align-items: center;
}
.result-actions .primary-btn,
.result-actions .secondary-btn {
  min-width: 132px;
  margin-top: 0;
  padding: 14px 22px;
}

@media (hover: hover) and (pointer: fine) {
  .option-btn:hover {
    background: #f3ede1;
  }
}

@media (max-width: 720px) {
  .page-shell { padding: 14px; align-items: stretch; }
  .app-card { min-height: calc(100vh - 28px); border-radius: 24px; }
  .hero-block, .result-card, .question-card { padding: 28px 20px 32px; }
  .quiz-topbar { padding: 20px 20px 16px; }
  .result-info-grid { grid-template-columns: 1fr; }
  .quiz-actions { flex-direction: column; }
  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .result-actions .primary-btn,
  .result-actions .secondary-btn {
    width: 100%;
  }
}
