:root {
  --bg: #efe5d5;
  --bg-deep: #e3d4be;
  --paper: rgba(255, 250, 241, 0.9);
  --paper-strong: #fff9f0;
  --line: rgba(89, 58, 38, 0.12);
  --text: #2c241d;
  --muted: #6e6155;
  --accent: #1f5c4c;
  --accent-2: #b44d33;
  --accent-3: #d8ad54;
  --shadow: 0 20px 50px rgba(67, 44, 28, 0.13);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.55), transparent 30%),
    radial-gradient(circle at bottom right, rgba(180, 77, 51, 0.12), transparent 24%),
    linear-gradient(160deg, #f5ecdf 0%, #efe3d0 52%, #eadcc8 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at center, black, transparent 88%);
}

.app-shell {
  position: relative;
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 18px 56px;
}

.top-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-kicker {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-name,
.hero-card h1,
.summary-card h1,
.section-head h2,
.insight-card h2,
.strengths-card h3 {
  font-family: "STZhongsong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
}

.brand-name {
  font-size: 24px;
}

.brand-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 10px;
  align-items: center;
}

.brand-meta span,
.question-tag,
.question-index,
.poster-badge,
.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 249, 240, 0.66);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  white-space: nowrap;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.card {
  background: var(--paper);
  border: 1px solid rgba(89, 58, 38, 0.08);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.card-soft {
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.9), rgba(248, 239, 225, 0.84));
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
}

.hero-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  padding: 28px;
  border-radius: var(--radius-xl);
  min-height: 72vh;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card-home {
  grid-template-columns: 1fr;
  min-height: auto;
  padding: 56px 64px 44px;
}

.hero-copy-home {
  align-items: center;
  text-align: center;
}

.hero-card h1 {
  margin: 12px 0 0;
  font-size: 60px;
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-text {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
}

.hero-home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(96px, 1fr));
  gap: 10px;
  margin-top: 22px;
  width: min(100%, 620px);
}

.hero-home-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.9);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-actions-home {
  justify-content: center;
  margin-top: 28px;
}

.hero-actions-home .btn-primary {
  min-width: 158px;
  padding: 21px 38px;
  font-size: 19px;
}

.hero-actions-home .btn[hidden] {
  display: none;
}

.hero-author {
  margin: 14px 0 0;
  color: rgba(92, 82, 69, 0.62);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0;
}

.hero-side {
  display: grid;
  gap: 16px;
  align-content: center;
}

.hero-stat {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-value {
  font-family: "STZhongsong", "Noto Serif CJK SC", serif;
  font-size: 44px;
  line-height: 1;
}

.stat-label {
  margin-top: 10px;
  color: var(--muted);
}

.hero-note h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.hero-note p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.hero-home-note {
  width: min(760px, 100%);
  margin-top: 38px;
  padding-top: 28px;
  border-top: 1px solid rgba(89, 58, 38, 0.12);
}

.hero-home-note-main,
.hero-home-note-sub {
  margin: 0;
  color: var(--muted);
  line-height: 1.9;
}

.hero-home-note-sub {
  margin-top: 12px;
  font-size: 14px;
}

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

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #27463d);
  box-shadow: 0 14px 24px rgba(31, 92, 76, 0.22);
}

.btn-secondary {
  color: var(--accent);
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid rgba(31, 92, 76, 0.18);
}

.btn-ghost {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid var(--line);
}

.test-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.test-sidebar,
.question-panel,
.poster-card,
.summary-card,
.axis-card,
.strengths-card,
.dimension-card,
.insight-card {
  border-radius: var(--radius-lg);
}

.test-sidebar {
  padding: 22px;
  height: fit-content;
  position: sticky;
  top: 20px;
}

.sidebar-block + .sidebar-block {
  margin-top: 22px;
}

.sidebar-block h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.sidebar-block p,
.progress-text,
.section-head p,
.insight-card p,
.summary-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.progress-rail {
  height: 12px;
  margin: 12px 0 10px;
  border-radius: 999px;
  background: rgba(31, 92, 76, 0.08);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #d67a54, #225847);
  transition: width 0.18s ease;
}

.question-panel {
  padding: 32px;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.question-prompt {
  margin: 24px 0 0;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.option-list {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.option-btn {
  width: 100%;
  text-align: left;
  padding: 18px 18px 18px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.94);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.option-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(180, 77, 51, 0.35);
  box-shadow: 0 10px 22px rgba(92, 65, 43, 0.08);
}

.option-btn.active {
  border-color: rgba(31, 92, 76, 0.36);
  background: linear-gradient(135deg, rgba(31, 92, 76, 0.08), rgba(180, 77, 51, 0.06));
}

.option-label {
  display: block;
  font-size: 17px;
  font-weight: 700;
}

.option-sub {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.result-hero {
  display: grid;
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.poster-card {
  position: relative;
  overflow: hidden;
  min-height: 600px;
  padding: 0;
  border: 1px solid rgba(186, 169, 143, 0.34);
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.96), rgba(241, 232, 216, 0.98));
  box-shadow: 0 24px 54px rgba(141, 112, 74, 0.16);
}

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

.poster-image.show {
  display: block;
}

.poster-fallback {
  display: grid;
  align-content: space-between;
  gap: 20px;
  min-height: 600px;
  padding: 26px;
}

.poster-title-wrap {
  display: grid;
  gap: 6px;
}

.poster-public-name {
  font-family: "STZhongsong", "Noto Serif CJK SC", serif;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.poster-internal-name {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.keyword-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
}

.poster-note {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.summary-card {
  min-height: 600px;
  padding: 30px 30px 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border: 1px solid rgba(186, 169, 143, 0.28);
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.96), rgba(252, 246, 237, 0.92));
  box-shadow: 0 22px 48px rgba(141, 112, 74, 0.1);
}

.result-title {
  margin: 16px 0 0;
  font-size: 58px;
  line-height: 1.04;
  letter-spacing: 0;
}

.result-summary {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.8;
  max-width: 92%;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.metric-card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(186, 169, 143, 0.28);
  background: rgba(255, 252, 247, 0.9);
  padding: 16px 18px;
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.metric-value {
  font-size: 26px;
}

.result-tone {
  margin-top: 20px;
  padding: 18px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(180, 77, 51, 0.09), rgba(31, 92, 76, 0.09));
  color: var(--text);
  font-weight: 700;
  line-height: 1.7;
}

.system-note {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(31, 92, 76, 0.22);
  background: rgba(255, 253, 248, 0.84);
  color: var(--muted);
  font-weight: 700;
  line-height: 1.7;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.insight-card,
.axis-card,
.strengths-card,
.dimension-card {
  padding: 28px;
  border: 1px solid rgba(186, 169, 143, 0.24);
  box-shadow: 0 18px 34px rgba(141, 112, 74, 0.08);
}

.insight-card h2,
.section-head h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.insight-card p,
.section-head p,
.axis-note,
.dimension-note,
.trait-list {
  line-height: 1.85;
}

.axis-list,
.dimension-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.axis-item,
.dimension-item {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.86);
  border-radius: var(--radius-md);
  padding: 16px;
}

.axis-row,
.dimension-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.axis-name,
.dimension-name {
  font-weight: 800;
  font-size: 16px;
}

.axis-result,
.dimension-score {
  color: var(--accent);
  font-weight: 700;
}

.axis-bar {
  margin-top: 12px;
}

.axis-rail {
  position: relative;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(180, 77, 51, 0.22), rgba(31, 92, 76, 0.22));
}

.axis-thumb {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.axis-label-row {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

.axis-note,
.dimension-note {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.8;
}

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

.trait-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.9;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(18px);
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(32, 29, 25, 0.88);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 980px) {
  .hero-card,
  .test-layout,
  .result-hero,
  .insight-grid,
  .dual-list {
    grid-template-columns: 1fr;
  }

  .test-layout {
    display: flex;
    flex-direction: column;
  }

  .question-panel {
    order: 1;
  }

  .test-sidebar {
    order: 2;
    padding: 16px;
  }

  .test-sidebar .sidebar-block:nth-child(2) {
    display: none;
  }

  .test-sidebar {
    position: static;
  }

  .hero-card-home {
    padding: 36px 26px 30px;
  }

  .hero-card h1 {
    font-size: 48px;
  }

  .poster-card,
  .summary-card {
    min-height: 0;
  }

  .poster-card {
    min-height: 540px;
  }

  .poster-fallback {
    min-height: 540px;
  }

  .result-title {
    font-size: 48px;
  }

  .result-summary {
    max-width: none;
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding: 16px 12px 40px;
  }

  .top-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .brand-meta,
  .hero-home-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .hero-home-stats .hero-home-chip:nth-child(4) {
    grid-column: 1 / -1;
  }

  .hero-card,
  .question-panel,
  .test-sidebar,
  .summary-card,
  .poster-card,
  .axis-card,
  .strengths-card,
  .dimension-card,
  .insight-card {
    padding: 18px;
  }

  .hero-card-home {
    padding: 28px 18px 24px;
  }

  .hero-card h1 {
    font-size: 38px;
  }

  .hero-actions-home .btn-primary {
    min-width: 180px;
    padding: 22px 40px;
    font-size: 20px;
  }

  .poster-card {
    padding: 0;
  }

  .poster-card {
    min-height: 460px;
  }

  .poster-fallback,
  .summary-card {
    min-height: 0;
  }

  .poster-fallback {
    min-height: 460px;
    padding: 20px;
  }

  .summary-metrics {
    grid-template-columns: 1fr;
  }

  .question-prompt {
    font-size: 28px;
  }

  .result-title {
    font-size: 38px;
  }

  .result-summary,
  .result-tone,
  .system-note {
    font-size: 15px;
  }
}
