:root {
  --lav-700: #6e3f57;
  --lav-600: #8a4f6d;
  --lav-500: #a9647f;
  --lav-300: #d4a3b8;
  --lav-100: #f2e2ea;
  --lav-50: #faf1f5;
  --pink: #cf8f7e;
  --pink-soft: #f4e3d9;
  --mint: #7d9b80;
  --mint-soft: #e7efe5;
  --ink: #3a2f36;
  --body: #5e525a;
  --muted: #988b93;
  --bg: #ffffff;
  --bg-soft: #faf5ef;
  --line: #ece2da;
  --danger: #b23b3b;
  --danger-bg: #f8e8e6;
  --amber-bg: #fbeede;
  --amber-tx: #7a5326;
  --radius: 24px;
  --shadow: 0 22px 60px -22px rgba(110, 63, 87, 0.30);
  --shadow-sm: 0 8px 24px -14px rgba(110, 63, 87, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-x: hidden;
}

body {
  font-family: "Mulish", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(55% 45% at 88% -5%, var(--lav-100) 0%, transparent 60%),
    radial-gradient(45% 40% at -5% 15%, var(--pink-soft) 0%, transparent 55%),
    var(--bg-soft);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--ink);
  line-height: 1.14;
  font-weight: 600;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--lav-700);
  font-weight: 600;
}

.wrap {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

.accent {
  background: linear-gradient(120deg, var(--lav-600), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 18px;
}

.logo .mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--lav-500), var(--pink));
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  flex: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--lav-700);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.pill .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
}

h1 {
  font-size: clamp(1.75rem, 6vw, 2.5rem);
  margin: 1rem 0 0.7rem;
  text-wrap: balance;
}

.lead {
  font-size: 1.05rem;
  max-width: 38ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  border: 0;
  padding: 1.05rem 1.5rem;
  border-radius: 999px;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  transition: 0.2s transform, 0.2s box-shadow, 0.2s opacity;
  text-decoration: none;
  min-height: 48px;
  width: 100%;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--lav-600), var(--lav-500));
  box-shadow: 0 14px 30px -10px rgba(110, 63, 87, 0.55);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px -10px rgba(110, 63, 87, 0.65);
}

.btn-ghost {
  background: #fff;
  color: var(--lav-700);
  border: 1.5px solid var(--line);
  font-size: 1rem;
  padding: 0.95rem 1.3rem;
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--lav-300);
}

.btn-row {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.btn-row .btn {
  flex: 1;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fade 0.22s ease;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 16px;
}

.points {
  display: grid;
  gap: 10px;
  margin: 1.4rem 0 1.2rem;
}

.point {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px;
  box-shadow: var(--shadow-sm);
}

.point strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
}

.point p {
  font-size: 0.9rem;
  color: var(--body);
  line-height: 1.45;
}

.point .ic {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--lav-100);
  color: var(--lav-700);
  display: grid;
  place-items: center;
  flex: none;
  font-weight: 800;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 1.1rem 0;
}

.check input {
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin-top: 2px;
  accent-color: var(--lav-600);
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
}

.field label .opt {
  color: var(--muted);
  font-weight: 500;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="number"] {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 0.85rem 1rem;
  background: var(--bg-soft);
  transition: 0.15s;
  min-height: 48px;
}

.field input:focus {
  outline: 0;
  border-color: var(--lav-500);
  background: #fff;
  box-shadow: 0 0 0 4px var(--lav-100);
}

.select-wrap {
  position: relative;
  display: block;
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  min-height: 52px;
  transition: 0.15s border-color, 0.15s box-shadow, 0.15s background;
}

.select-wrap:focus-within {
  border-color: var(--lav-500);
  background: #fff;
  box-shadow: 0 0 0 4px var(--lav-100);
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 16px;
  width: 12px;
  height: 8px;
  transform: translateY(-50%);
  pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1.5 1.5 6 6l4.5-4.5' stroke='%238a4f6d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") no-repeat center;
}

.select-wrap select {
  display: block;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 2.6rem 0 1rem;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  line-height: 52px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.select-wrap select::-ms-expand {
  display: none;
}

.select-wrap select:invalid {
  color: var(--muted);
}

.select-wrap select:focus {
  outline: 0;
}

.hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.4;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.choice {
  position: relative;
  display: flex;
  height: 100%;
}

.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  pointer-events: none;
}

.choice span {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  width: 100%;
  min-height: 72px;
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
  transition: 0.15s;
}

.choice small {
  font-weight: 500;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 4px;
}

.choice input:checked + span {
  background: #fff;
  color: var(--lav-700);
  border-color: var(--lav-500);
  box-shadow: var(--shadow-sm);
}

.choice input:focus-visible + span {
  box-shadow: 0 0 0 4px var(--lav-100);
}

.seg {
  display: grid;
  gap: 5px;
  align-items: stretch;
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 5px;
}

.seg.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.seg.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.seg.wrap-5 {
  grid-template-columns: 1fr 1fr;
}

.seg.wrap-5 .seg-btn:last-child {
  grid-column: 1 / -1;
}

.seg-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  box-sizing: border-box;
  min-height: 48px;
  margin: 0;
  padding: 0.5rem 0.45rem;
  border: 1.5px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  color: var(--body);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.25;
  text-align: center;
}

.seg-btn input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.seg-btn span {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  font: inherit;
  color: inherit;
  line-height: inherit;
  cursor: inherit;
}

.seg-btn:has(input:checked) {
  background: #fff;
  color: var(--lav-700);
  border-color: var(--lav-300);
}

.seg-btn:has(input:focus-visible) {
  box-shadow: 0 0 0 4px var(--lav-100);
}

.progress-wrap {
  margin: 0 0 1.1rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--lav-700);
  margin-bottom: 0.4rem;
}

.progress {
  height: 8px;
  background: var(--lav-100);
  border-radius: 999px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(120deg, var(--lav-600), var(--pink));
  border-radius: 999px;
  width: 0;
  transition: width 0.25s ease;
}

.cluster-head h2 {
  font-size: 1.45rem;
  margin-bottom: 0.35rem;
}

.cluster-head p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.symptom {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 10px;
}

.symptom-label {
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
  margin-bottom: 8px;
  line-height: 1.35;
}

.toggles {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.toggle {
  position: relative;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg-soft);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--body);
  cursor: pointer;
  text-align: center;
  padding: 0.4rem 0.2rem;
}

.toggle input:checked + span {
  background: var(--lav-600);
  border-color: var(--lav-600);
  color: #fff;
}

.toggle input:focus-visible + span {
  box-shadow: 0 0 0 4px var(--lav-100);
}

.form-err {
  font-size: 0.9rem;
  color: var(--danger);
  font-weight: 600;
  margin-top: 0.8rem;
  display: none;
}

.form-err.show {
  display: block;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.red-flag {
  background: var(--danger-bg);
  border: 1px solid #ead0cc;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
  color: #6c2e2e;
}

.red-flag h3 {
  color: #6c2e2e;
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.red-flag ul {
  margin: 0.6rem 0 0 1.1rem;
}

.positive {
  background: var(--mint-soft);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
}

.positive h3 {
  font-size: 1.25rem;
  margin-bottom: 0.3rem;
}

.success-card {
  background: #fff;
  border: 1.5px solid var(--mint);
  border-radius: 22px;
  padding: 22px 18px 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.success-card .check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--mint-soft);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}

.success-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.success-card p {
  font-size: 0.98rem;
  max-width: 34ch;
  margin: 0 auto;
}

.cluster-result {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 16px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.cluster-result h3 {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 14px;
}

.score-row .bar {
  flex: 1;
  height: 10px;
  background: var(--lav-100);
  border-radius: 999px;
  overflow: hidden;
}

.score-row .bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(120deg, var(--lav-600), var(--pink));
}

.score-row b {
  color: var(--lav-700);
  font-size: 0.95rem;
  min-width: 3.2ch;
  text-align: right;
}

.rec {
  font-size: 0.95rem;
}

.rec .k {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.section-label {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--lav-700);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.why {
  margin: 0.2rem 0 1.15rem;
}

.why p {
  font-size: 0.95rem;
  margin: 0;
}

.solutions {
  margin-top: 1.15rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
}

.solutions .section-label {
  margin-bottom: 0.7rem;
}

.rec-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.rec-list li {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.rec-list .area {
  display: block;
  font-weight: 800;
  color: var(--lav-700);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.cta-btn {
  margin-top: 14px;
  text-decoration: none;
}

.share-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: var(--shadow-sm);
}

.share-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.share-card .hint {
  margin-bottom: 0.8rem;
}

.share-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.share-row input {
  flex: 1;
  min-width: 0;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 0.7rem 0.85rem;
  background: var(--bg-soft);
}

.share-row .btn {
  width: auto;
  flex: none;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.num {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}

.num .l {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.num .v {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.45rem;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
}

.num .u {
  font-size: 0.8rem;
  color: var(--muted);
}

.notice {
  background: var(--amber-bg);
  color: var(--amber-tx);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.92rem;
  margin: 12px 0;
}

.disclaimer {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1.2rem;
  line-height: 1.45;
}

.table-wrap {
  overflow-x: auto;
  margin: 12px 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 280px;
}

th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 10px 12px;
  background: var(--lav-50);
  border-bottom: 1px solid var(--line);
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: 0;
}

.site-foot {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.7rem;
  flex-wrap: wrap;
  padding: 16px;
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
}

.site-foot button.link {
  background: none;
  border: 0;
  color: var(--lav-700);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.site-foot a:hover,
.site-foot button.link:hover {
  text-decoration: underline;
}

.hidden { display: none !important; }

@media (min-width: 520px) {
  body { font-size: 17.5px; }
  .wrap { padding: 28px 24px 48px; }
  .card { padding: 22px 22px; }
  .choice-grid { gap: 10px; }
}

@media (max-width: 420px) {
  .share-row {
    flex-direction: column;
  }
  .share-row .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen.active,
  .btn {
    animation: none;
    transition: none;
  }
}
