:root {
  --bg: #f4f8f4;
  --panel: #ffffff;
  --panel-soft: #f7fbf8;
  --text: #1c2a21;
  --muted: #66786d;
  --line: #d7e4da;
  --line-strong: #c0d3c5;
  --accent: #607d66;
  --accent-strong: #3f5b45;
  --accent-soft: #edf5ef;
  --shadow: 0 16px 48px rgba(35, 58, 42, 0.08);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, #fbfffb 0, #f4f8f4 36%, #eef5f0 100%);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.card,
.page-intro,
.content-card,
.feature-card,
.type-card,
.ranking-table,
.app-shell {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(244, 248, 244, 0.88);
  border-bottom: 1px solid rgba(215, 228, 218, 0.8);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #405d46, #73917a);
  font-weight: 800;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.site-nav a.is-active,
.site-nav a:hover { color: var(--accent-strong); }

.header-actions {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  padding: 13px 18px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, opacity .16s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.is-hidden {
  display: none !important;
}

.btn-primary {
  background: var(--accent-strong);
  color: #fff;
  box-shadow: 0 12px 30px rgba(63, 91, 69, 0.18);
}

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

.hero-section {
  padding: 36px 0 14px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.page-intro,
.content-card,
.ranking-table {
  padding: 28px;
}

.hero-copy {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(122, 164, 132, 0.18), transparent 38%),
    linear-gradient(180deg, #ffffff, #f8fbf9);
}

.hero-copy h1 {
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-sub,
.content-card p,
.feature-card p,
.page-intro p,
.faq-item p,
.site-footer p {
  color: var(--muted);
  line-height: 1.82;
  font-size: 15px;
}

.hero-sub { margin-top: 16px; max-width: 760px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.hero-panel h2,
.section-head h2,
.page-intro h1,
.content-card h2 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-panel h2 { font-size: 22px; margin-bottom: 16px; }

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

.clean-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.stat-grid,
.feature-grid,
.type-grid {
  display: grid;
  gap: 18px;
}

.stat-grid {
  margin-top: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 18px 20px;
  background: linear-gradient(180deg, #ffffff, #f8fbf9);
}

.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 30px; font-weight: 900; color: var(--accent-strong); margin: 8px 0 10px; }
.stat-card p { color: var(--muted); font-size: 13px; line-height: 1.7; }

.content-grid,
.ranking-wrap,
.dual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.page-section {
  margin: 34px auto 0;
}

.section-head {
  margin-bottom: 18px;
}

.section-head.compact h2,
.section-head.compact h3 {
  font-size: 22px;
  line-height: 1.2;
}

.section-head h2 { margin-top: 10px; }
.section-head p { margin-top: 12px; color: var(--muted); line-height: 1.8; }

.mini-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.mini-metric-grid strong {
  display: block;
  font-size: 30px;
  color: var(--accent-strong);
}

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

.muted-paragraph,
.hint,
.empty-note {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.feature-card,
.type-card {
  overflow: hidden;
}

.feature-card { padding: 22px; }
.feature-card h3,
.type-card h2,
.type-card h3 { font-size: 22px; margin-bottom: 10px; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

.type-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.type-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: linear-gradient(180deg, #f6faf6, #eef4ef);
}

.type-card-body {
  padding: 20px;
}

.type-code {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid var(--line);
  padding: 7px 10px;
  border-radius: 999px;
}

.type-intro { margin-bottom: 10px; color: #324237; font-weight: 700; }
.section-actions { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }

.leaderboard-head,
.topbar,
.dim-item-top,
.actions-bottom,
.result-actions,
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.leaderboard-list,
.history-list,
.dim-list,
.question-list,
.faq-list {
  display: grid;
  gap: 12px;
}

.leaderboard-item,
.history-item,
.dim-item,
.question,
.faq-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdfb);
}

.leaderboard-item,
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.leaderboard-rank {
  min-width: 56px;
  font-size: 14px;
  font-weight: 900;
  color: var(--accent-strong);
}

.leaderboard-copy { flex: 1; }
.leaderboard-copy strong { display: block; margin-bottom: 4px; }
.leaderboard-copy span { color: var(--muted); font-size: 13px; line-height: 1.7; }

.leaderboard-score {
  min-width: 80px;
  text-align: right;
}

.leaderboard-score strong {
  display: block;
  color: var(--accent-strong);
  font-size: 20px;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.warning {
  color: #7d5b1d;
  background: #fff5da;
  border: 1px solid #eed79d;
}

.app-shell {
  padding: 24px;
}

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

.test-page-intro {
  padding-bottom: 22px;
}

.test-page-intro p {
  max-width: 820px;
}

.quiz-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfefb, #f4f9f5);
  margin-bottom: 16px;
}

.quiz-toolbar-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 260px;
}

.quiz-toolbar-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.app-home {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 18px;
  align-items: stretch;
}

.app-home > div {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff, #fbfdfb);
}

.app-home h3 { font-size: 28px; margin-bottom: 12px; }
.app-home-note h4 { margin-bottom: 10px; font-size: 18px; }
.app-home-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.progress {
  flex: 1;
  min-width: 220px;
  height: 10px;
  background: #e8f0ea;
  border-radius: 999px;
  overflow: hidden;
}

.progress > span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #98b59d, #55745c);
  transition: width .22s ease;
}

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

.question-stage {
  min-height: 470px;
  display: flex;
  align-items: stretch;
}

.question {
  width: 100%;
  padding: 18px;
  min-height: 470px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.question-list {
  width: 100%;
}

.question-stage.is-switching .question {
  pointer-events: none;
}

.question-stage.is-switching .question-card-anim {
  animation: question-card-out .18s ease forwards;
}

.question-stage.is-entering .question-card-anim {
  animation: question-card-in .24s ease forwards;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
}

.question-title {
  font-size: 16px;
  line-height: 1.8;
  white-space: pre-wrap;
  min-height: 168px;
}

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

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

.option:hover {
  background: #f8fcf9;
  border-color: var(--line-strong);
}

.option.is-selected {
  border-color: #aac0b0;
  background: linear-gradient(180deg, #f7fcf8, #eef6f0);
}

.option input {
  margin-top: 3px;
  accent-color: var(--accent-strong);
}

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

.result-layout { display: grid; gap: 18px; }
.result-top { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 18px; }

.poster-box {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(127, 165, 134, 0.16), rgba(127, 165, 134, 0) 40%),
    linear-gradient(180deg, #ffffff, #f7fbf8);
}

.poster-image {
  width: 100%;
  min-height: 240px;
  object-fit: contain;
  border-radius: 16px;
}

.poster-caption {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.8;
}

.type-kicker,
.match {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.type-kicker {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
}

.type-name {
  margin-top: 8px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.match {
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.type-subname { margin-top: 12px; line-height: 1.8; color: var(--muted); }
.submit-panel { margin-top: 22px; }
.submit-panel .hint { margin-top: 10px; }

.quiz-submit-btn {
  min-width: 168px;
}

.analysis-box p,
.dim-item p,
.note-box p,
.history-meta {
  color: var(--muted);
  line-height: 1.8;
}

.analysis-box h3,
.dim-box h3,
.note-box h3 { margin-bottom: 12px; font-size: 18px; }

.dim-item {
  padding: 16px;
}

.dim-item-name { font-weight: 800; }
.dim-item-score { color: var(--accent-strong); font-weight: 900; }

.history-item strong { display: block; margin-bottom: 4px; }
.history-meta { font-size: 13px; }

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

.history-status.pending {
  background: #fff7e7;
  color: #855d18;
  border-color: #ecd39e;
}

.compact-list .leaderboard-item {
  padding: 14px;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 800;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { padding: 0 20px 18px; }

.long-copy { padding: 28px; }
.long-copy p + p { margin-top: 14px; }

.inner-page {
  padding: 34px 0 48px;
}

.page-intro h1 { margin-top: 10px; }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 16px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 56px;
  padding: 34px 0 56px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.9fr;
  gap: 18px;
}

.site-footer h3 { margin-bottom: 10px; font-size: 18px; }

@media (max-width: 980px) {
  .hero-grid,
  .content-grid,
  .ranking-wrap,
  .dual-grid,
  .result-top,
  .app-home,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .type-grid,
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 1180px); }
  .site-nav,
  .header-actions { display: none; }
  .hero-copy,
  .hero-panel,
  .page-intro,
  .content-card,
  .feature-card,
  .app-shell,
  .ranking-table { padding: 20px; }
  .feature-grid,
  .type-grid,
  .stat-grid,
  .mini-metric-grid { grid-template-columns: 1fr; }
.type-card img { aspect-ratio: 4 / 3; }
}

@keyframes question-card-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

@keyframes question-card-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
