:root {
  --bg: #f7f3ec;
  --bg-wash: #efe6da;
  --paper: rgba(255, 252, 247, 0.86);
  --paper-strong: #fffdf9;
  --paper-soft: #fbf7f1;
  --ink: #1f1a17;
  --muted: #72665a;
  --line: rgba(84, 63, 42, 0.14);
  --line-strong: rgba(84, 63, 42, 0.22);
  --accent: #bb6a47;
  --accent-strong: #9a4e2e;
  --accent-soft: rgba(187, 106, 71, 0.12);
  --shadow: 0 18px 50px rgba(63, 45, 30, 0.08);
  --radius: 26px;
  --radius-sm: 18px;
  --content-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0) 30%),
    radial-gradient(circle at bottom right, rgba(187, 106, 71, 0.08), rgba(187, 106, 71, 0) 26%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-wash) 100%);
}

a {
  color: inherit;
}

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(247, 243, 236, 0.78);
  border-bottom: 1px solid rgba(84, 63, 42, 0.08);
}

.brand,
.page-shell,
.site-footer,
.noscript-box {
  width: min(var(--content-width), calc(100% - 32px));
}

.brand {
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #2b241f;
  color: #fff9f3;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.brand-text {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Songti SC", serif;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.lang-switch {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.lang-btn {
  appearance: none;
  border: 1px solid rgba(84, 63, 42, 0.12);
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  min-width: 54px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.lang-btn.is-active {
  border-color: rgba(154, 78, 46, 0.22);
  background: rgba(255, 248, 243, 0.94);
  color: var(--accent-strong);
}

.lang-btn:focus-visible {
  outline: 3px solid rgba(187, 106, 71, 0.24);
  outline-offset: 3px;
}

.page-shell {
  margin: 0 auto;
  padding: 32px 0 68px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 42px 40px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0.18)),
    var(--paper);
}

.hero::before {
  content: "";
  position: absolute;
  left: 40px;
  right: 40px;
  top: 26px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent 60%);
}

.hero::after {
  content: "";
  position: absolute;
  right: -54px;
  top: -50px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(187, 106, 71, 0.16), rgba(187, 106, 71, 0) 68%);
  pointer-events: none;
}

.eyebrow,
.section-kicker,
.badge,
.match {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(154, 78, 46, 0.16);
  background: rgba(255, 248, 243, 0.88);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow,
.section-kicker {
  padding: 8px 12px;
}

.hero h1,
.content-block h2,
.content-card h2,
.panel-head h2,
.analysis-box h3,
.dim-box h3,
.type-name {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Songti SC", serif;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.hero h1 {
  max-width: 760px;
  margin-top: 22px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.94;
}

.hero-copy {
  max-width: 700px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.95;
}

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

.hero-stats {
  margin-top: 26px;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-stats li {
  padding: 10px 14px;
  border: 1px solid rgba(84, 63, 42, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 14px;
}

.content-block,
.test-wrap,
.result-wrap {
  margin-top: 22px;
  padding: 30px;
}

.result-wrap {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(187, 106, 71, 0.16), rgba(187, 106, 71, 0) 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0)),
    var(--paper);
}

.result-wrap::after {
  content: "";
  position: absolute;
  left: 30px;
  right: 30px;
  top: 86px;
  height: 1px;
  background: linear-gradient(90deg, rgba(84, 63, 42, 0.16), transparent 90%);
  pointer-events: none;
}

.content-block,
.content-card {
  position: relative;
}

.content-block::before,
.content-card::before,
.test-wrap::before,
.result-wrap::before {
  content: "";
  position: absolute;
  left: 0;
  top: 28px;
  bottom: 28px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(187, 106, 71, 0.4), rgba(187, 106, 71, 0));
  opacity: 0.9;
}

.content-block h2,
.content-card h2,
.panel-head h2,
.analysis-box h3,
.dim-box h3 {
  font-size: 24px;
  line-height: 1.14;
}

.content-block p,
.content-card p,
.content-list,
.hint,
.type-subname,
.poster-caption,
.analysis-box p,
.detail-head p,
.dim-item p,
.result-note,
.site-footer p,
.noscript-box {
  color: var(--muted);
  line-height: 1.85;
}

.content-block p {
  max-width: 760px;
  margin-top: 14px;
  font-size: 15px;
}

.content-block-compact {
  background: rgba(252, 247, 240, 0.9);
}

.content-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.content-card {
  padding: 28px 28px 28px 30px;
  background: rgba(255, 252, 247, 0.78);
}

.content-list {
  margin-top: 16px;
  padding-left: 18px;
  font-size: 15px;
}

.content-list li + li {
  margin-top: 10px;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
  box-shadow: none;
}

.btn:focus-visible,
.option input:focus-visible {
  outline: 3px solid rgba(187, 106, 71, 0.24);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(180deg, #bf7250, var(--accent-strong));
  color: #fff8f3;
  box-shadow: 0 14px 28px rgba(154, 78, 46, 0.2);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  border: 1px solid var(--line);
}

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

.panel-head-result {
  margin-bottom: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.progress {
  flex: 1;
  min-width: 220px;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(84, 63, 42, 0.1);
}

.progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(187, 106, 71, 0.82), rgba(154, 78, 46, 1));
  transition: width 0.22s ease;
}

.progress-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

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

.question {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(84, 63, 42, 0.12);
  background: rgba(255, 253, 249, 0.96);
}

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

.badge {
  padding: 6px 10px;
}

.question-title {
  font-size: 17px;
  line-height: 1.82;
  white-space: pre-wrap;
}

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

.option {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: start;
  gap: 12px;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(84, 63, 42, 0.12);
  background: rgba(253, 250, 244, 0.96);
  transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.option:hover {
  transform: translateY(-1px);
  border-color: rgba(154, 78, 46, 0.24);
  background: rgba(255, 250, 245, 0.98);
}

.option:has(input:checked) {
  border-color: rgba(154, 78, 46, 0.34);
  background: rgba(255, 246, 241, 0.96);
  box-shadow: inset 0 0 0 1px rgba(154, 78, 46, 0.08);
}

.option input {
  margin: 4px 0 0;
  accent-color: var(--accent-strong);
  transform: scale(1.08);
}

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

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

.actions-bottom {
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
}

.button-row {
  justify-content: flex-end;
}

.hint {
  font-size: 14px;
}

.result-top {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 26px;
  align-items: stretch;
}

.poster-box,
.type-box,
.analysis-box,
.dim-box {
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(84, 63, 42, 0.12);
  background: rgba(255, 252, 247, 0.94);
}

.poster-box {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: grid;
  grid-template-rows: 1fr auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0) 30%),
    linear-gradient(160deg, #221d19 0%, #2d231e 46%, #5e3a2b 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 60px rgba(63, 45, 30, 0.16);
}

.poster-box::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 248, 240, 0.14);
  pointer-events: none;
}

.poster-box::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  top: auto;
  height: 120px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(17, 13, 10, 0.36));
}

.poster-image {
  position: relative;
  z-index: 1;
  width: 100%;
  align-self: center;
  justify-self: center;
  min-height: 250px;
  max-height: 520px;
  padding: 24px 10px 10px;
  object-fit: contain;
  filter: drop-shadow(0 24px 38px rgba(0, 0, 0, 0.28));
}

.poster-box.no-image .poster-image {
  display: none;
}

.poster-caption {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding-right: 8px;
  color: rgba(255, 244, 236, 0.9);
  font-size: 14px;
  letter-spacing: 0.02em;
}

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

.type-name {
  margin-top: 12px;
  font-size: clamp(42px, 7vw, 68px);
  line-height: 0.92;
}

.match {
  margin-top: 20px;
  padding: 10px 14px;
  font-size: 12px;
}

.type-box {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, rgba(187, 106, 71, 0.08), rgba(187, 106, 71, 0)),
    rgba(255, 252, 247, 0.98);
}

.type-box::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(84, 63, 42, 0.18), transparent 100%);
}

.type-box::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -28px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(187, 106, 71, 0.12), rgba(187, 106, 71, 0) 70%);
}

.type-subname {
  margin-top: 18px;
  font-size: 15px;
  max-width: 44ch;
}

.analysis-box,
.dim-box {
  margin-top: 22px;
}

.analysis-box p {
  margin-top: 14px;
  font-size: 15px;
  color: #3a2e26;
  white-space: pre-wrap;
}

.detail-head {
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 14px;
}

.detail-head p {
  font-size: 13px;
}

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

.dim-item {
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid rgba(84, 63, 42, 0.1);
  background: rgba(255, 254, 251, 0.96);
}

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

.dim-item-name {
  font-size: 14px;
  font-weight: 700;
}

.dim-item-score {
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
}

.dim-item p {
  font-size: 13px;
}

.result-note {
  margin-top: 18px;
  padding-left: 14px;
  border-left: 2px solid rgba(187, 106, 71, 0.22);
  font-size: 13px;
}

.result-actions {
  justify-content: flex-end;
  margin-top: 24px;
}

.site-footer {
  margin: 0 auto;
  padding: 0 0 40px;
}

.site-footer p {
  font-size: 13px;
}

.noscript-box {
  margin: 0 auto 24px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 248, 241, 0.96);
}

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

  .panel-head,
  .detail-head {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .brand,
  .lang-switch,
  .page-shell,
  .site-footer,
  .noscript-box {
    width: min(100% - 24px, var(--content-width));
  }

  .page-shell {
    padding: 18px 0 50px;
  }

  .hero,
  .content-block,
  .content-card,
  .test-wrap,
  .result-wrap,
  .poster-box,
  .type-box,
  .analysis-box,
  .dim-box {
    padding: 18px;
  }

  .hero::before,
  .result-wrap::after,
  .poster-box::before,
  .poster-box::after,
  .content-block::before,
  .content-card::before,
  .test-wrap::before,
  .result-wrap::before {
    display: none;
  }

  .hero h1 {
    font-size: 44px;
  }

  .question {
    padding: 16px;
  }

  .question-title {
    font-size: 16px;
  }

  .button-row,
  .result-actions {
    width: 100%;
  }

  .button-row .btn,
  .result-actions .btn {
    flex: 1 1 160px;
  }
}
