:root {
  --bg: #f5efe6;
  --bg-deep: #ece1d0;
  --ink: #1f2433;
  --muted: #596171;
  --line: rgba(31, 36, 51, 0.12);
  --panel: rgba(255, 250, 243, 0.72);
  --panel-strong: rgba(255, 252, 247, 0.9);
  --accent: #cf6a3d;
  --accent-soft: rgba(207, 106, 61, 0.16);
  --teal: #2c7672;
  --teal-soft: rgba(44, 118, 114, 0.16);
  --gold: #e8c46b;
  --shadow: 0 24px 60px rgba(55, 42, 18, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  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(232, 196, 107, 0.25), transparent 28%),
    radial-gradient(circle at right 15%, rgba(44, 118, 114, 0.16), transparent 20%),
    linear-gradient(180deg, #f7f2ea 0%, var(--bg) 48%, var(--bg-deep) 100%);
  font-family: "Aptos", "Microsoft YaHei", "Segoe UI", sans-serif;
  line-height: 1.6;
}

button,
input,
textarea,
select {
  font: inherit;
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(22px);
  pointer-events: none;
  opacity: 0.7;
}

.ambient-one {
  width: 280px;
  height: 280px;
  top: 48px;
  right: 6%;
  background: rgba(207, 106, 61, 0.14);
}

.ambient-two {
  width: 220px;
  height: 220px;
  left: 4%;
  bottom: 8%;
  background: rgba(44, 118, 114, 0.12);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 24px;
  margin-bottom: 24px;
}

.hero-copy,
.hero-panel,
.panel {
  backdrop-filter: blur(16px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel {
  border-radius: var(--radius-xl);
  padding: 30px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: var(--teal);
  text-transform: uppercase;
}

.hero h1,
.panel h2,
.result-title,
.result-badge strong {
  font-family: "Palatino Linotype", "Georgia", "STKaiti", serif;
  letter-spacing: 0.02em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 0.98;
}

.hero-text {
  max-width: 62ch;
  margin: 18px 0 22px;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-meta,
.hero-actions,
.sidebar-metrics,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta span,
.axis-banner,
.metric-box,
.legend-box,
.result-badge,
.type-matrix span {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
}

.hero-meta span {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.94rem;
}

.primary-btn,
.ghost-btn,
.choice-btn {
  border: none;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.primary-btn,
.ghost-btn {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
}

.primary-btn {
  color: #fff7f0;
  background: linear-gradient(135deg, #d26b3e, #be5930);
  box-shadow: 0 16px 26px rgba(190, 89, 48, 0.22);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.choice-btn:hover {
  transform: translateY(-2px);
}

.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.choice-btn:focus-visible {
  outline: 3px solid rgba(44, 118, 114, 0.3);
  outline-offset: 3px;
}

.primary-btn:disabled,
.ghost-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.panel-caption {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.type-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.type-matrix span {
  display: grid;
  place-items: center;
  min-height: 66px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.type-matrix span:nth-child(4n + 1) {
  background: rgba(232, 196, 107, 0.22);
}

.type-matrix span:nth-child(4n + 2) {
  background: rgba(44, 118, 114, 0.14);
}

.type-matrix span:nth-child(4n + 3) {
  background: rgba(207, 106, 61, 0.14);
}

.type-matrix span:nth-child(4n) {
  background: rgba(31, 36, 51, 0.06);
}

.panel-note {
  margin: 18px 0 0;
  color: var(--muted);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 330px;
  gap: 24px;
  align-items: start;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 28px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.6vw, 2.7rem);
  line-height: 1.08;
}

.compact-head h2 {
  font-size: 2rem;
}

.info-list,
.dimension-grid,
.result-grid {
  display: grid;
  gap: 16px;
}

.info-list {
  margin-top: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.info-card,
.dimension-card,
.result-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.54);
}

.info-card h3,
.dimension-card h3,
.result-card h3,
.legend-box h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.info-card p,
.dimension-card p,
.result-card p,
.legend-box p,
.sidebar-summary,
.status-copy,
.copy-feedback {
  margin: 0;
  color: var(--muted);
}

.dimension-axis {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  background: rgba(31, 36, 51, 0.06);
  font-weight: 700;
  font-size: 0.9rem;
}

.question-head {
  margin-bottom: 20px;
}

.progress-box {
  min-width: 160px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.progress-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(31, 36, 51, 0.08);
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2c7672, #cf6a3d);
}

.axis-banner {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--teal);
}

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

.choice-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  min-height: 220px;
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
}

.choice-btn.is-selected {
  border-color: rgba(207, 106, 61, 0.46);
  background:
    linear-gradient(180deg, rgba(207, 106, 61, 0.14), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 28px rgba(190, 89, 48, 0.12);
}

.choice-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(31, 36, 51, 0.06);
  color: var(--muted);
  font-size: 0.88rem;
}

.choice-copy {
  font-size: 1.22rem;
  line-height: 1.45;
}

.quiz-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
}

.status-copy {
  text-align: center;
}

.is-hidden {
  display: none;
}

.result-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 8px;
}

.result-title {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.result-summary {
  margin: 0;
  color: var(--muted);
  max-width: 68ch;
}

.result-badge {
  min-width: 140px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.result-badge span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  letter-spacing: 0.2em;
  font-size: 0.8rem;
}

.result-badge strong {
  display: block;
  font-size: 2.4rem;
}

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

.dimension-breakdown {
  display: grid;
  gap: 14px;
}

.breakdown-item {
  display: grid;
  gap: 8px;
}

.breakdown-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.breakdown-bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(31, 36, 51, 0.08);
}

.breakdown-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2c7672, #cf6a3d);
}

.breakdown-note {
  font-size: 0.92rem;
  color: var(--muted);
}

.strength-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.strength-list li + li {
  margin-top: 8px;
}

.sidebar-panel {
  position: sticky;
  top: 18px;
}

.sidebar-summary {
  margin-top: 6px;
}

.sidebar-metrics {
  margin-top: 18px;
}

.metric-box {
  flex: 1 1 140px;
  padding: 14px;
  border-radius: var(--radius-md);
}

.metric-box span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-box strong {
  display: block;
  margin-top: 6px;
  font-size: 1.1rem;
}

.axis-stack {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.axis-row {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
}

.axis-row-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-weight: 700;
}

.axis-row small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.axis-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(31, 36, 51, 0.08);
}

.axis-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #cf6a3d, #2c7672);
}

.legend-box {
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius-md);
}

.copy-feedback {
  min-height: 24px;
  margin-top: 12px;
}

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

  .sidebar-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-panel,
  .panel {
    padding: 22px;
  }

  .info-list,
  .dimension-grid,
  .choice-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .result-hero,
  .quiz-footer {
    grid-template-columns: 1fr;
    display: grid;
  }

  .progress-box,
  .result-badge {
    min-width: 0;
  }

  .quiz-footer {
    gap: 12px;
  }

  .status-copy {
    order: 3;
    text-align: left;
  }

  .choice-btn {
    min-height: 160px;
  }
}
