:root {
  --bg: #f4efe6;
  --paper: rgba(255, 255, 255, 0.8);
  --paper-strong: #fffdf8;
  --ink: #1f2f29;
  --ink-soft: #5b6964;
  --line: rgba(32, 53, 46, 0.08);
  --sage: #dce7de;
  --sage-deep: #20352e;
  --orange: #ff7a32;
  --shadow: 0 24px 64px rgba(32, 53, 46, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, #fcf8f1 0%, #f4efe6 42%, #ede5d9 100%);
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.site-shell {
  width: min(980px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.screen {
  display: none;
}

.screen-active {
  display: block;
}

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

.eyebrow,
.entry-pill,
.match-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.eyebrow {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--sage);
  color: var(--sage-deep);
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
}

.entry-card {
  min-height: calc(100vh - 92px);
  display: grid;
  place-content: center;
  gap: 18px;
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.entry-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 122, 50, 0.18), rgba(255, 122, 50, 0));
}

.entry-card h1,
.section-top h2,
.result-main h3,
.card-header h4,
.question-card h4 {
  margin: 0;
}

.entry-card h1 {
  font-size: clamp(42px, 7vw, 80px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.entry-copy,
.result-desc,
.result-fun,
.result-long,
.card-header p,
.dimension-item p,
.empty-state p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.8;
}

.entry-copy {
  max-width: 640px;
  margin-inline: auto;
  font-size: 17px;
}

.entry-points {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.entry-pill {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  font-weight: 700;
}

.btn-primary,
.btn-secondary {
  border-radius: 18px;
  padding: 14px 20px;
  font-weight: 700;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 20px 36px rgba(255, 122, 50, 0.24);
}

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.92;
}

.btn-loading .btn-text {
  opacity: 0.86;
}

.btn-spinner {
  width: 18px;
  height: 18px;
  display: inline-block;
  margin-right: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.36);
  border-top-color: #fff;
  animation: spin 0.75s linear infinite;
  vertical-align: -3px;
}

.btn-secondary {
  background: var(--paper-strong);
  color: var(--sage-deep);
  border: 1px solid var(--line);
}

.btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.section-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.section-top h2 {
  margin-top: 10px;
  font-size: clamp(32px, 5vw, 54px);
  letter-spacing: -0.04em;
}

.test-panel,
.result-hero,
.explain-card,
.empty-state {
  padding: 24px;
}

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

.progress-bar {
  flex: 1;
  height: 12px;
  background: #e2e5de;
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--orange), #ff9e67);
  transition: width 0.2s ease;
}

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

.loading-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff, #f9f5ef);
  border: 1px solid rgba(32, 53, 46, 0.07);
  color: var(--ink-soft);
  font-size: 16px;
  text-align: center;
}

.loading-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(32, 53, 46, 0.16);
  border-top-color: var(--orange);
  animation: spin 0.8s linear infinite;
}

.question-card {
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(180deg, #fff, #f9f5ef);
  border: 1px solid rgba(32, 53, 46, 0.07);
}

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

.question-card h4 {
  font-size: 18px;
  line-height: 1.6;
}

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

.option-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(32, 53, 46, 0.08);
}

.option-row input {
  margin-top: 4px;
  accent-color: var(--orange);
}

.test-actions,
.result-actions {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hidden {
  display: none !important;
}

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

.result-hero {
  display: flex;
  gap: 18px;
  align-items: stretch;
}

.poster-frame {
  width: min(420px, 100%);
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff, #f5efe7);
  border: 1px solid rgba(32, 53, 46, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.poster-frame img {
  width: 100%;
  display: block;
}

.result-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-code {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.result-main h3 {
  margin-top: 10px;
  font-size: clamp(34px, 5vw, 62px);
  letter-spacing: -0.05em;
}

.match-pill {
  width: fit-content;
  margin-top: 14px;
  padding: 10px 16px;
  background: var(--sage);
  color: var(--sage-deep);
  font-weight: 700;
}

.result-punchline {
  margin: 18px 0 0;
  font-size: 22px;
  line-height: 1.5;
  font-weight: 700;
}

.result-desc {
  margin-top: 14px;
  max-width: 640px;
}

.result-fun {
  font-size: 18px;
  line-height: 1.9;
  color: var(--ink);
}

.result-long {
  font-size: 20px;
  line-height: 2;
  color: var(--ink);
}

.card-header {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

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

.dimension-item {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(32, 53, 46, 0.08);
  background: linear-gradient(180deg, #fff, #faf6ef);
}

.dimension-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 820px) {
  .result-hero {
    flex-direction: column;
  }

  .poster-frame {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100vw - 24px, 980px);
    padding-top: 16px;
  }

  .entry-card,
  .test-panel,
  .result-hero,
  .explain-card,
  .empty-state {
    padding: 18px;
  }

  .section-top,
  .test-actions,
  .result-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .question-card h4 {
    font-size: 16px;
  }
}
