:root {
  color-scheme: light;
  --ink: #232631;
  --muted: #687180;
  --line: #e2e4e8;
  --paper: #fffdfa;
  --soft: #f5efe8;
  --rose: #b94b5d;
  --teal: #287875;
  --amber: #a96b2d;
  --plum: #6d5574;
  --green: #4f704c;
  --shadow: 0 16px 42px rgba(38, 42, 54, 0.1);
  --serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.96), rgba(245, 239, 232, 0.92)),
    #f5efe8;
}

button {
  border: 0;
  font: inherit;
}

.app-shell {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 46px;
}

.intro-panel,
.quiz-panel,
.result-panel {
  overflow: hidden;
  border: 1px solid rgba(31, 36, 48, 0.08);
  border-radius: 8px;
  background: rgba(255, 253, 250, 0.96);
  box-shadow: var(--shadow);
}

.intro-panel {
  min-height: calc(100vh - 64px);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--ink);
  color: #fffdf9;
  font-size: 12px;
  font-weight: 800;
}

.brand-note {
  margin-left: auto;
  color: #8a6470;
  font-size: 13px;
  font-weight: 600;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  min-height: calc(100vh - 105px);
}

.intro-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 6vw, 72px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--rose);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 620px;
  margin-bottom: 16px;
  font-size: 62px;
  line-height: 1.05;
  letter-spacing: 0;
}

.lede {
  max-width: 590px;
  margin-bottom: 20px;
  color: #4d5565;
  font-size: 18px;
  line-height: 1.78;
}

.intro-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.intro-facts span {
  padding: 7px 10px;
  border: 1px solid #e8d8d5;
  border-radius: 999px;
  background: #fff8f5;
  color: #8d4b56;
  font-size: 13px;
  font-weight: 700;
}

.intro-actions,
.quiz-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.primary-btn {
  background: var(--ink);
  color: #fffdf9;
  box-shadow: 0 10px 22px rgba(31, 36, 48, 0.18);
}

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

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

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

.visual-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 12px;
  align-content: center;
  padding: clamp(24px, 4.2vw, 48px);
  border-left: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(40, 120, 117, 0.1), transparent 42%),
    linear-gradient(35deg, rgba(185, 75, 93, 0.1), transparent 44%),
    #fbf8f0;
}

.visual-heading {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  margin-bottom: 4px;
}

.visual-heading span {
  color: var(--muted);
  font-size: 13px;
}

.visual-heading strong {
  font-size: 24px;
  line-height: 1.22;
}

.signal-card {
  min-height: 146px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid rgba(31, 36, 48, 0.14);
  border-radius: 8px;
  color: #fff;
}

.signal-card span {
  font-size: 14px;
  font-weight: 800;
}

.signal-card b {
  font-size: 52px;
  line-height: 1;
}

.signal-card small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.35;
}

.signal-card.strong {
  background: var(--rose);
}

.signal-card.calm {
  background: var(--teal);
}

.signal-card.warm {
  background: var(--amber);
}

.signal-card.deep {
  background: var(--plum);
}

.quiz-panel {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 38px);
}

.quiz-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.quiz-topbar h2 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: 32px;
  line-height: 1.32;
}

.progress-ring {
  flex: 0 0 auto;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--rose);
  font-size: 18px;
  font-weight: 900;
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ded2;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--teal), var(--amber));
  transition: width 260ms ease;
}

.option-list {
  display: grid;
  gap: 10px;
  margin: 24px 0 22px;
}

.option-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.option-card:hover {
  border-color: rgba(200, 79, 98, 0.5);
  background: #fff8f5;
}

.option-card.is-selected {
  border-color: var(--rose);
  background: #fff4f1;
  box-shadow: 0 12px 26px rgba(200, 79, 98, 0.1);
}

.option-key {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  background: #f0e8df;
  color: #7d4a40;
  font-weight: 900;
}

.option-card.is-selected .option-key {
  background: var(--rose);
  color: #fff;
}

.option-text {
  align-self: center;
  color: #2f3542;
  font-size: 16px;
  line-height: 1.58;
}

.quiz-actions {
  justify-content: space-between;
}

.result-panel {
  padding: clamp(16px, 3.2vw, 30px);
}

.result-hero {
  padding: clamp(24px, 4.2vw, 42px);
  border-radius: 8px;
  background:
    linear-gradient(132deg, rgba(35, 38, 49, 0.96), rgba(109, 85, 116, 0.9)),
    var(--ink);
  color: #fffdf9;
}

.result-hero .eyebrow {
  color: #f8c7cd;
}

.result-hero h2 {
  margin-bottom: 12px;
  font-family: var(--serif);
  font-size: 62px;
  font-weight: 700;
  line-height: 1.08;
}

.result-tagline {
  max-width: 760px;
  margin-bottom: 22px;
  color: rgba(255, 253, 249, 0.82);
  font-size: 18px;
  line-height: 1.72;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.score-line {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 253, 249, 0.28);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.08);
}

.score-line span {
  color: rgba(255, 253, 249, 0.72);
}

.score-line b {
  font-size: 32px;
}

.result-hint {
  color: rgba(255, 253, 249, 0.66);
  font-size: 13px;
  line-height: 1.55;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 14px;
  margin-top: 14px;
}

.result-main,
.result-side {
  display: grid;
  gap: 12px;
  align-content: start;
}

.result-block,
.mini-card,
.share-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.signal-summary {
  border-color: #ead3d6;
  background: #fff8f6;
}

.result-block,
.mini-card {
  padding: 18px;
}

.result-block h3,
.mini-card h3 {
  margin-bottom: 9px;
  font-size: 16px;
  line-height: 1.35;
}

.result-block p,
.mini-card p {
  margin-bottom: 0;
  color: #4c5565;
  font-size: 15px;
  line-height: 1.78;
}

.bars {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  gap: 7px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  color: #4c5565;
  font-size: 12px;
  font-weight: 800;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #ece4dc;
}

.bar-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--teal);
}

.bar-row:nth-child(2) .bar-fill {
  background: var(--rose);
}

.bar-row:nth-child(3) .bar-fill {
  background: var(--amber);
}

.bar-row:nth-child(4) .bar-fill {
  background: var(--plum);
}

.bar-row:nth-child(5) .bar-fill {
  background: var(--green);
}

.bar-row:nth-child(6) .bar-fill {
  background: #2d648a;
}

.share-card {
  margin-top: 14px;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(32, 123, 120, 0.09), transparent),
    #fffdf9;
}

.share-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.share-card strong {
  display: block;
  margin-bottom: 8px;
  font-family: var(--serif);
  color: var(--rose);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.14;
}

.share-card p {
  max-width: 850px;
  margin-bottom: 0;
  font-family: var(--serif);
  color: #343b49;
  font-size: 22px;
  line-height: 1.7;
}

.result-actions {
  margin-top: 14px;
}

.is-hidden {
  display: none;
}

@media (max-width: 840px) {
  .app-shell {
    width: min(100% - 20px, 680px);
    padding: 10px 0 22px;
  }

  .intro-panel {
    min-height: calc(100vh - 20px);
  }

  .intro-grid,
  .result-layout {
    grid-template-columns: 1fr;
  }

  .intro-copy {
    padding: 28px 20px;
  }

  h1 {
    font-size: 42px;
  }

  .lede {
    font-size: 16px;
  }

  .visual-heading strong {
    font-size: 21px;
  }

  .visual-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .signal-card {
    min-height: 104px;
    padding: 12px 10px;
  }

  .signal-card span {
    font-size: 13px;
  }

  .signal-card b {
    font-size: 30px;
  }

  .signal-card small {
    font-size: 11px;
  }

  .quiz-topbar {
    gap: 10px;
  }

  .progress-ring {
    width: 46px;
    height: 46px;
  }

  .quiz-topbar h2 {
    font-size: 24px;
  }

  .option-card {
    grid-template-columns: 32px 1fr;
    gap: 10px;
    min-height: 68px;
    padding: 13px;
  }

  .option-text {
    font-size: 15px;
    line-height: 1.55;
  }

  .result-hero h2 {
    font-size: 42px;
  }

  .result-tagline {
    font-size: 16px;
  }

  .share-card strong {
    font-size: 34px;
  }

  .share-card p {
    font-size: 19px;
  }

  .option-key {
    width: 30px;
    height: 30px;
  }

  .quiz-actions,
  .result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
    padding: 0 12px;
  }
}

@media (max-width: 460px) {
  h1 {
    font-size: 35px;
  }

  .brand-note {
    display: none;
  }

  .lede {
    font-size: 15px;
  }

  .result-block,
  .mini-card,
  .share-card {
    padding: 16px;
  }

  .result-hero h2 {
    font-size: 34px;
  }

  .quiz-topbar h2 {
    font-size: 22px;
  }

  .share-card strong {
    font-size: 30px;
  }

  .share-card p {
    font-size: 18px;
  }

  .quiz-actions,
  .result-actions {
    grid-template-columns: 1fr;
  }
}
