:root {
  color-scheme: light;
  --ink: #2c2728;
  --muted: #7a706f;
  --line: #eadeda;
  --paper: #fff9f3;
  --soft: #fff0ea;
  --mint: #78a58f;
  --mint-dark: #4f7f6a;
  --coral: #e98582;
  --amber: #e8b46d;
  --blue: #9eb7c9;
  --violet: #b5a3bd;
  --blush: #f7c8c5;
  --cream: #fffdf8;
  --shadow: 0 18px 46px rgba(120, 86, 76, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 4%, rgba(247, 200, 197, 0.34), transparent 28%),
    radial-gradient(circle at 92% 12%, rgba(120, 165, 143, 0.2), transparent 30%),
    var(--paper);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: end;
  padding: 28px 18px 42px;
  background:
    linear-gradient(180deg, rgba(255, 249, 243, 0.14), rgba(255, 249, 243, 0.96) 64%, var(--paper)),
    url("assets/visual/healing-manga-hero.png") center top / cover no-repeat,
    linear-gradient(135deg, #fff4ef, #f5efe9 48%, #eef4ee);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(to bottom, rgba(255, 249, 243, 0), var(--paper));
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.84);
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0;
  color: #8f5a5c;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(48px, 15vw, 88px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  font-size: 28px;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.hero__copy {
  max-width: 560px;
  color: #5d5552;
  font-size: 17px;
  line-height: 1.7;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 20px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  color: #8f5a5c;
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid rgba(233, 133, 130, 0.18);
  font-size: 13px;
  font-weight: 800;
}

.hero__actions,
.submit-row,
.share-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 18px;
  font-weight: 750;
}

.primary-btn {
  background: linear-gradient(135deg, #2c2728, #8f5a5c);
  color: white;
  box-shadow: 0 12px 24px rgba(143, 90, 92, 0.22);
}

.secondary-btn {
  background: linear-gradient(135deg, var(--coral), #d66f83);
  color: white;
}

.ghost-btn {
  color: var(--ink);
  background: rgba(255, 253, 248, 0.76);
  border-color: rgba(143, 90, 92, 0.16);
}

.hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#heroCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  opacity: 0.16;
  mask-image: linear-gradient(to bottom, black 0 36%, transparent 68%);
}

.signal-card {
  position: absolute;
  width: 150px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 253, 248, 0.7);
  backdrop-filter: blur(14px);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.signal-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.signal-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  color: #8f5a5c;
}

.signal-card--a {
  right: 22px;
  top: 18vh;
}

.signal-card--b {
  left: 20px;
  top: 31vh;
}

.panel,
.report-shell {
  padding: 28px 18px;
  max-width: 1060px;
  margin: 0 auto;
}

.assessment {
  min-height: 100vh;
  display: grid;
  align-content: center;
}

.section-heading {
  margin-bottom: 18px;
}

.survey,
.analysis-card,
.report,
.empty-report {
  background: #fff;
  border: 1px solid rgba(234, 222, 218, 0.82);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.survey {
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 18px;
}

.progress {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.progress i {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), var(--amber), var(--coral));
  transform-origin: left center;
  transform: scaleX(0.08);
  transition: transform 220ms ease;
}

.question-card {
  min-height: 386px;
  display: grid;
  align-content: start;
  padding: 4px 0 0;
}

.question-kicker {
  margin: 0 0 8px;
  color: #8f5a5c;
  font-size: 14px;
  font-weight: 800;
}

.question-card h3 {
  margin-bottom: 8px;
  font-size: 30px;
  line-height: 1.18;
}

.question-hint {
  min-height: 28px;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 18px;
}

.option-grid {
  display: grid;
  gap: 12px;
}

.option-btn {
  width: 100%;
  min-height: 74px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.option-btn strong,
.option-btn span {
  display: block;
}

.option-btn strong {
  font-size: 18px;
  line-height: 1.35;
}

.option-btn span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.option-btn.is-selected {
  background: #fff9f3;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(233, 133, 130, 0.14);
}

.option-btn:active {
  transform: scale(0.99);
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  color: var(--ink);
  padding: 0 12px;
  font-size: 16px;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--coral);
}

.range-value {
  color: var(--mint-dark);
  font-weight: 700;
}

.range-step {
  padding: 22px 16px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 240, 234, 0.96), rgba(255, 253, 248, 0.9)),
    radial-gradient(circle at 82% 20%, rgba(120, 165, 143, 0.18), transparent 34%);
}

.range-step input {
  width: 100%;
}

.range-step output {
  display: block;
  margin-top: 16px;
  font-size: 40px;
  line-height: 1;
  color: var(--mint-dark);
  font-weight: 900;
  text-align: center;
}

.submit-row {
  justify-content: space-between;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.survey-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.analysis-card {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.analysis-card h2 {
  margin-bottom: 18px;
}

.analysis-lines {
  display: grid;
  gap: 10px;
}

.analysis-lines span {
  position: relative;
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px 0 42px;
  border-radius: 8px;
  background: #fff4ef;
  color: #5d5552;
  font-weight: 750;
  overflow: hidden;
}

.analysis-lines span::before {
  content: "";
  position: absolute;
  left: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--line);
}

.analysis-lines span.is-running::before {
  background: var(--amber);
  box-shadow: 0 0 0 6px rgba(215, 155, 40, 0.14);
}

.analysis-lines span.is-done::before {
  background: var(--mint);
}

.analysis-lines span.is-running::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  animation: sweep 1.1s infinite;
}

@keyframes sweep {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(100%);
  }
}

.empty-report {
  padding: 32px 18px;
}

.report {
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(255, 249, 243, 0.94)),
    url("assets/visual/healing-manga-card.png") center top / cover no-repeat;
}

.report-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 14px;
  padding: 18px 0 0;
}

.is-hidden {
  display: none !important;
}

.report__top {
  display: grid;
  grid-template-columns: 1fr 152px;
  gap: 18px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.report__top p {
  color: var(--muted);
  line-height: 1.7;
}

.result-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.result-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 8px;
  background: #fff0ea;
  border: 1px solid rgba(233, 133, 130, 0.26);
  color: #9a5b60;
  font-size: 13px;
  font-weight: 800;
}

.score-ring {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at center, #fff 0 48%, transparent 49%),
    conic-gradient(#e98582, #e8b46d, #78a58f, #b5a3bd, #e98582);
  box-shadow: inset 0 0 0 1px rgba(143, 90, 92, 0.08), 0 10px 24px rgba(143, 90, 92, 0.12);
}

.score-ring strong,
.score-ring span {
  grid-area: 1 / 1;
}

.score-ring strong {
  transform: translateY(-10px);
  font-size: 26px;
}

.score-ring span {
  transform: translateY(22px);
  color: var(--muted);
  font-size: 12px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0;
}

.persona-card {
  display: grid;
  grid-template-columns: minmax(170px, 260px) 1fr;
  gap: 18px;
  align-items: center;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.92), rgba(255, 244, 239, 0.96)),
    radial-gradient(circle at 20% 18%, rgba(233, 133, 130, 0.14), transparent 34%);
}

.persona-visual {
  min-height: 260px;
}

.persona-visual canvas {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(23, 32, 27, 0.08);
}

.persona-copy p {
  color: var(--muted);
  line-height: 1.7;
}

.persona-details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.persona-details span {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(120, 165, 143, 0.12);
  color: #566d60;
  font-size: 13px;
  font-weight: 700;
}

.verdict-grid {
  display: grid;
  gap: 10px;
}

.verdict-card {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.86);
}

.verdict-card strong,
.verdict-card span {
  display: block;
}

.verdict-card strong {
  font-size: 24px;
  line-height: 1.15;
  color: var(--ink);
}

.verdict-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.verdict-card--accent {
  color: #fff;
  border-color: transparent;
  background:
    linear-gradient(135deg, rgba(143, 90, 92, 0.96), rgba(120, 165, 143, 0.92)),
    radial-gradient(circle at 88% 20%, rgba(232, 180, 109, 0.5), transparent 36%);
}

.verdict-card--accent strong,
.verdict-card--accent span {
  color: #fff;
}

.metric {
  min-height: 104px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 240, 234, 0.72);
}

.strategy-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(233, 133, 130, 0.24);
  background:
    linear-gradient(135deg, rgba(255, 240, 234, 0.94), rgba(255, 253, 248, 0.96) 62%),
    radial-gradient(circle at 12% 20%, rgba(233, 133, 130, 0.16), transparent 32%);
}

.strategy-score {
  display: grid;
  align-content: center;
  min-height: 142px;
}

.strategy-score span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.strategy-score strong {
  display: block;
  margin: 8px 0;
  color: #d66f83;
  font-size: 46px;
  line-height: 1;
}

.strategy-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.strategy-list li {
  position: relative;
  padding: 11px 12px 11px 34px;
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.78);
  color: #5d5552;
  line-height: 1.55;
  font-size: 14px;
}

.strategy-list li::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
}

.moment-copy {
  margin: 12px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #5d5552;
  line-height: 1.6;
  font-size: 14px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.report-block {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.block-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

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

.funnel {
  display: grid;
  gap: 10px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 130px 1fr 72px;
  gap: 10px;
  align-items: center;
}

.funnel-row span {
  color: #3f4c45;
  font-size: 13px;
}

.bar {
  min-height: 22px;
  background: #f7ece7;
  border-radius: 8px;
  overflow: hidden;
}

.bar i {
  display: block;
  min-width: 4px;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--mint), var(--amber), var(--coral));
}

.two-col {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

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

.tag {
  border-radius: 8px;
  background: #fff0ea;
  color: #9a5b60;
  border: 1px solid rgba(233, 133, 130, 0.28);
  padding: 9px 12px;
  font-weight: 750;
}

.advice-list {
  margin: 0;
  padding-left: 20px;
  color: #5d5552;
  line-height: 1.7;
}

.share-lab {
  display: grid;
  grid-template-columns: 1fr minmax(140px, 180px);
  align-items: end;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.share-lab p {
  margin-bottom: 12px;
  color: var(--muted);
}

#posterPreview {
  display: block;
  width: min(220px, 58vw);
  max-height: 320px;
  object-fit: contain;
  border: 1px solid rgba(143, 90, 92, 0.12);
  box-shadow: 0 14px 32px rgba(120, 86, 76, 0.14);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 32, 27, 0.54);
}

.modal__card {
  position: relative;
  width: min(440px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.icon-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 24px;
  line-height: 1;
}

canvas {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #f6f8f3;
  border: 1px solid var(--line);
}

.share-actions {
  margin-top: 12px;
}

.share-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .hero {
    min-height: 88vh;
    padding: 22px 16px 34px;
  }

  h1 {
    font-size: clamp(48px, 17vw, 72px);
  }

  h2 {
    font-size: 24px;
  }

  .panel,
  .report-shell {
    padding: 22px 14px;
  }

  .persona-card,
  .report-spotlight,
  .strategy-card,
  .metrics,
  .two-col,
  .report__top {
    grid-template-columns: 1fr;
  }

  .score-ring {
    width: 132px;
    height: 132px;
  }

  .persona-card,
  .survey,
  .report,
  .empty-report {
    border-radius: 8px;
  }

  .persona-visual {
    min-height: 220px;
  }

  .funnel-row {
    grid-template-columns: 86px 1fr 54px;
  }

  .signal-card {
    width: 118px;
    min-height: 82px;
    padding: 12px;
  }

  .signal-card strong {
    font-size: 28px;
  }

  .signal-card--a {
    right: 12px;
    top: 14vh;
  }

  .signal-card--b {
    left: 12px;
    top: 27vh;
  }

  .share-lab,
  .submit-row {
    align-items: stretch;
  }

  .share-lab,
  .submit-row,
  .hero__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn {
    width: 100%;
  }

  .survey {
    padding: 16px;
  }

  .question-card {
    min-height: 420px;
  }

  .question-card h3 {
    font-size: 26px;
  }

  .option-btn {
    min-height: 68px;
  }

  .modal {
    padding: 0;
    align-items: end;
  }

  .modal__card {
    width: 100%;
    max-height: 96vh;
    border-radius: 16px 16px 0 0;
    padding: 16px;
  }

  .share-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  #posterPreview {
    width: min(260px, 72vw);
    margin: 0 auto;
  }
}
