:root {
  color-scheme: light;
  --ink: #17201b;
  --muted: #66716b;
  --line: #dce4dd;
  --paper: #fbfcf8;
  --soft: #eef4ee;
  --mint: #2f8f74;
  --mint-dark: #17624e;
  --coral: #df6b57;
  --amber: #d79b28;
  --blue: #4e7db8;
  --violet: #7a5ca8;
  --shadow: 0 18px 50px rgba(31, 50, 42, 0.12);
}

* {
  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: 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(145deg, rgba(251, 252, 248, 0.2), rgba(251, 252, 248, 0.96) 62%),
    radial-gradient(circle at 20% 18%, rgba(223, 107, 87, 0.2), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(47, 143, 116, 0.22), transparent 26%),
    linear-gradient(135deg, #f5efe7, #e9f3ee 46%, #f8f6ec);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--mint-dark);
  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: #3f4c45;
  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: var(--mint-dark);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(47, 143, 116, 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: var(--ink);
  color: white;
  box-shadow: 0 12px 22px rgba(23, 32, 27, 0.16);
}

.secondary-btn {
  background: var(--mint);
  color: white;
}

.ghost-btn {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  border-color: rgba(23, 32, 27, 0.14);
}

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

.pulse-grid {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(23, 32, 27, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 32, 27, 0.12) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(23, 32, 27, 0.18);
  border-radius: 50%;
}

.orbit--one {
  width: 360px;
  height: 360px;
  right: -120px;
  top: 60px;
}

.orbit--two {
  width: 240px;
  height: 240px;
  left: -80px;
  top: 130px;
}

.signal-card {
  position: absolute;
  width: 150px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.62);
  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;
}

.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;
}

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

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.mode-card {
  text-align: left;
  min-height: 106px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

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

.mode-card strong {
  font-size: 18px;
  line-height: 1.35;
}

.mode-card.is-active {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(47, 143, 116, 0.12);
}

.survey,
.report,
.empty-report {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.survey {
  padding: 18px;
}

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

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 12px;
}

legend {
  margin-bottom: 14px;
  font-weight: 800;
  font-size: 18px;
}

label {
  display: grid;
  gap: 8px;
  color: #3f4c45;
  font-size: 14px;
}

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

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

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

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

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

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

.report {
  padding: 18px;
}

.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;
}

.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(var(--coral), var(--amber), var(--mint), var(--blue), var(--coral));
  box-shadow: inset 0 0 0 1px rgba(23, 32, 27, 0.08);
}

.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(220px, 360px) 1fr;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f8faf7, #fff);
}

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

.persona-visual canvas {
  display: block;
  width: 100%;
  max-width: 360px;
  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: var(--soft);
  color: #3f4c45;
  font-size: 13px;
  font-weight: 700;
}

.metric {
  min-height: 104px;
  padding: 14px;
  border-radius: 8px;
  background: var(--soft);
}

.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: #edf1ed;
  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: #fff3ed;
  color: #9b3e2f;
  border: 1px solid #f5c8bb;
  padding: 9px 12px;
  font-weight: 750;
}

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

.share-lab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

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

.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;
  }

  .mode-switch,
  .form-grid,
  .persona-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 {
    flex-direction: column;
  }

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

  .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;
  }
}
