:root {
  --bg: #f3efe8;
  --card: #fffcf7;
  --ink: #16120f;
  --muted: #64584d;
  --line: rgba(22, 18, 15, 0.12);
  --accent: #111111;
  --accent-soft: #ece5dc;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(0, 0, 0, 0.04), transparent 28%),
    linear-gradient(180deg, #f7f3ec 0%, #f0ebe2 100%);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

button {
  font: inherit;
}

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

.app {
  width: min(760px, calc(100vw - 1.25rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.intro-card,
.gate-card,
.test-shell,
.report-shell {
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.gate-card,
.intro-card {
  min-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1.4rem, 4vw, 2.6rem);
}

.tiny-tag {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2 {
  margin: 0;
  line-height: 1.04;
  font-family: "Baskerville Old Face", "STZhongsong", "Times New Roman", serif;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  max-width: 9.4em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

p {
  margin: 0;
}

.lead,
.intro-note,
.test-hint,
.report-sub,
.report-desc,
.fun-note,
.dim-item p {
  color: var(--muted);
}

.lead {
  max-width: 34rem;
  font-size: 1.05rem;
}

.gate-form {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.gate-input {
  flex: 1 1 260px;
  min-height: 56px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
}

.gate-input:focus {
  outline: 0;
  border-color: rgba(22, 18, 15, 0.3);
  box-shadow: 0 0 0 4px rgba(22, 18, 15, 0.05);
}

.gate-error {
  min-height: 1.4rem;
  color: #a13a2b;
}

.intro-actions,
.report-actions,
.test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn,
.text-btn {
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--accent);
  padding: 0.9rem 1.25rem;
  text-decoration: none;
}

.btn:disabled,
.text-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.btn-solid {
  background: var(--accent);
  color: #fffaf4;
}

.btn-line {
  background: transparent;
  color: var(--ink);
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
}

.test-shell,
.report-shell {
  min-height: calc(100vh - 3rem);
  padding: 1rem;
}

.test-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.test-top {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.top-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.progress-text {
  font-size: 0.95rem;
  color: var(--muted);
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(22, 18, 15, 0.08);
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.22s ease;
}

.question-mount {
  flex: 1;
  display: grid;
  place-items: center;
}

.question {
  width: 100%;
  padding: clamp(1rem, 3vw, 1.8rem);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--card);
}

.question-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
}

.question-title {
  margin-top: 1rem;
  font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  line-height: 1.3;
}

.options {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.option {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fffdf8;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.option:hover {
  border-color: rgba(22, 18, 15, 0.28);
  transform: translateY(-1px);
}

.option input {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.option-code {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  font-family: "Baskerville Old Face", "Times New Roman", serif;
  font-size: 1.05rem;
}

.option input:checked + .option-code {
  background: var(--accent);
  color: #fffaf4;
}

.ghost-submit {
  display: none;
}

.report-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.report-badge {
  color: var(--muted);
}

.report-copy {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.poster-box {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #111;
  min-height: 560px;
}

.poster-box.no-image::before {
  content: "无图，但有病症。";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 25%),
    linear-gradient(180deg, #1b1714, #4a3e35);
  color: var(--muted);
  text-align: center;
  padding: 2rem;
}

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

.poster-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-overlay {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.35rem;
  color: #fffaf4;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.7));
}

.poster-tag {
  color: rgba(255, 250, 244, 0.72);
}

.poster-caption {
  font-size: 1rem;
  color: rgba(255, 250, 244, 0.88);
}

.report-section {
  padding-top: 0.25rem;
}

.dim-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.dim-item {
  padding: 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--card);
}

.dim-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}

.dim-item-name {
  font-weight: 600;
}

.dim-item-score {
  color: var(--muted);
  white-space: nowrap;
}

.fun-note {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line);
}

body.promo-body {
  background:
    radial-gradient(circle at top right, rgba(0, 0, 0, 0.06), transparent 30%),
    linear-gradient(180deg, #f6f0e7 0%, #ebe3d7 100%);
}

.promo-app {
  width: min(1180px, calc(100vw - 1.25rem));
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.promo-panel {
  background: rgba(255, 252, 247, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.promo-hero,
.promo-controls,
.promo-copy-card {
  padding: clamp(1.2rem, 3vw, 1.8rem);
}

.promo-hero,
.promo-controls,
.promo-copy-card,
.promo-copy-head {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.promo-hero {
  min-height: 240px;
  justify-content: center;
}

.promo-subline,
.promo-note,
.promo-empty {
  color: var(--muted);
}

.promo-controls {
  margin-top: 1rem;
}

.promo-select-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.promo-select {
  min-width: min(100%, 360px);
  min-height: 54px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
}

.promo-select:focus {
  outline: 0;
  border-color: rgba(22, 18, 15, 0.3);
  box-shadow: 0 0 0 4px rgba(22, 18, 15, 0.05);
}

.promo-type-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.promo-chip {
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.72rem 0.92rem;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.promo-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 18, 15, 0.28);
}

.promo-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffaf4;
}

.promo-stage {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 1rem;
  align-items: stretch;
}

.promo-poster {
  min-height: min(82vh, 860px);
}

.promo-copy-card {
  justify-content: space-between;
}

.promo-copy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.promo-note {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line);
}

.promo-empty {
  padding: 1rem 0;
}

@media (max-width: 760px) {
  .app {
    width: min(100vw - 0.8rem, 760px);
    padding-top: 0.4rem;
  }

  .intro-card,
  .gate-card,
  .test-shell,
  .report-shell {
    min-height: calc(100vh - 0.8rem);
    border-radius: 22px;
  }

  .top-row,
  .dim-list {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .option {
    grid-template-columns: 40px 1fr;
  }

  .option-code {
    width: 40px;
    height: 40px;
  }

  .poster-box {
    min-height: 420px;
  }

  .promo-app {
    width: min(100vw - 0.8rem, 1180px);
    padding-top: 0.4rem;
  }

  .promo-stage {
    grid-template-columns: 1fr;
  }

  .promo-poster {
    min-height: 420px;
  }
}
