:root {
  --ink: #17202a;
  --muted: #5d6875;
  --paper: #f8fbff;
  --panel: #ffffff;
  --line: #d8e1ea;
  --blue: #2368d6;
  --green: #13825c;
  --amber: #c87512;
  --red: #c74747;
  --violet: #6554c8;
  --cyan: #16899a;
  --shadow: 0 22px 70px rgba(29, 45, 66, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(232, 243, 255, 0.92), rgba(248, 251, 255, 0.96) 40%),
    radial-gradient(circle at 12% 18%, rgba(19, 130, 92, 0.12), transparent 28%),
    var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button {
  font: inherit;
}

.app-shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.hero {
  padding: 8px 2px 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}

.subtitle {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.activity-card,
.result-view {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.activity-card {
  padding: 24px;
}

.progress-head,
.result-head,
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.progress-head span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}

.quiet-button,
.secondary-button,
.answer-button {
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 900;
}

.quiet-button {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.progress-track {
  height: 12px;
  margin: 16px 0 22px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef5;
}

.progress-track div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width 260ms ease;
}

.question-panel {
  min-height: 330px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(35, 104, 214, 0.08), rgba(19, 130, 92, 0.08)),
    #fff;
}

.question-kicker {
  margin-bottom: 12px;
  color: var(--green);
  font-size: 15px;
  font-weight: 900;
}

.question-panel h2 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 1.18;
  letter-spacing: 0;
}

.question-panel p:not(.question-kicker) {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.75;
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.answer-button {
  min-height: 76px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 22px;
}

.answer-button.like:hover,
.answer-button.like.selected {
  border-color: rgba(19, 130, 92, 0.5);
  background: #e4f6ed;
  color: var(--green);
}

.answer-button.neutral:hover,
.answer-button.neutral.selected {
  border-color: rgba(200, 117, 18, 0.48);
  background: #fff3de;
  color: var(--amber);
}

.answer-button.dislike:hover,
.answer-button.dislike.selected {
  border-color: rgba(199, 71, 71, 0.48);
  background: #ffebeb;
  color: var(--red);
}

.secondary-button {
  padding: 0 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.secondary-button:disabled {
  cursor: not-allowed;
  color: #a8b2bd;
}

.nav-row {
  margin-top: 18px;
}

.nav-row p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.result-view {
  padding: 24px;
}

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

.result-head h2 {
  margin-bottom: 0;
  font-size: clamp(30px, 5vw, 50px);
  letter-spacing: 0;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.profile-summary,
.chart-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.profile-summary {
  padding: 22px;
}

.small-title {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.top-types {
  display: grid;
  gap: 10px;
}

.type-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.type-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 20px;
}

.type-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.profile-line {
  margin: 18px 0 0;
  padding: 16px;
  border-radius: 8px;
  background: #e9f5ff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.6;
}

.chart-panel {
  padding: 16px;
}

#profileChart {
  display: block;
  width: 100%;
  height: auto;
}

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

  .activity-card,
  .result-view {
    padding: 16px;
  }

  .progress-head,
  .result-head,
  .nav-row {
    display: grid;
  }

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

  .question-panel {
    min-height: 300px;
  }
}
