@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&family=Source+Serif+4:opsz,wght@8..60,500;8..60,700&display=swap");

* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --ink: #171514;
  --muted: #7c746f;
  --line: #e8e2dd;
  --paper: #fffaf7;
  --cream: #f7f6f1;
  --accent: #ff5600;
  --green: #e8f3ec;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: #fff;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.quiz-header {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr;
  height: 57px;
  left: 0;
  padding: 0;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 5;
}

.back,
.hamburger {
  align-items: center;
  border-radius: 50%;
  display: inline-flex;
  font-size: 0;
  height: 36px;
  justify-content: center;
  position: relative;
  width: 36px;
}

.quiz-header .back,
.quiz-header .hamburger {
  display: none;
}

.back::before {
  border-bottom: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
  content: "";
  height: 9px;
  transform: rotate(45deg);
  width: 9px;
}

.hamburger::before,
.hamburger::after {
  background: var(--ink);
  border-radius: 2px;
  content: "";
  height: 2px;
  left: 9px;
  position: absolute;
  width: 18px;
}

.hamburger::before {
  top: 13px;
}

.hamburger::after {
  top: 21px;
}

.brand {
  align-items: center;
  display: inline-flex;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 500;
  gap: 4px;
  justify-content: center;
  line-height: 1;
}

.mark {
  display: block;
  flex: 0 0 auto;
  height: 32px;
  width: 32px;
}

.phone-page {
  margin: 0 auto;
  max-width: 398px;
  min-height: 100vh;
  overflow: hidden;
  padding: 113px 0 56px;
}

.phone-page h1 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
  text-align: center;
}

.phone-page h2 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}

.phone-page p {
  color: var(--muted);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  text-align: center;
}

.phone-page em {
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

.intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
  text-align: center;
}

.age-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}

.age-card {
  background: var(--cream);
  border-radius: 16px;
  color: #fff;
  display: flex;
  flex-direction: column;
  height: 159px;
  overflow: hidden;
  padding-top: 0;
  text-align: center;
  width: calc(50% - 6px);
}

.age-card img {
  display: block;
  height: 120px;
  margin: 0 auto;
  object-fit: contain;
  width: 120px;
}

.age-card span {
  align-items: center;
  background: #000;
  border-radius: 0 0 16px 16px;
  display: flex;
  font-size: 15px;
  font-weight: 500;
  justify-content: space-between;
  line-height: 1.5;
  min-height: 39px;
  padding: 8px 16px;
  text-align: left;
  width: 100%;
}

.age-card b {
  display: inline-block;
  font-size: 0;
  height: 18px;
  position: relative;
  width: 20px;
}

.age-card b::before {
  background: #fff;
  border-radius: 999px;
  content: "";
  height: 2px;
  left: 1px;
  position: absolute;
  top: 8px;
  width: 18px;
}

.age-card b::after {
  border-right: 2px solid #fff;
  border-top: 2px solid #fff;
  content: "";
  height: 9px;
  position: absolute;
  right: 1px;
  top: 4px;
  transform: rotate(45deg);
  width: 9px;
}

.urge-page {
  display: flex;
  flex-direction: column;
  padding-bottom: 28px;
}

.urge-page .intro {
  margin-bottom: 16px;
}

.urge-image {
  border-radius: 18px;
  display: block;
  margin: 8px auto 24px;
  max-height: 430px;
  max-width: 100%;
  object-fit: cover;
  width: 100%;
}

.continue {
  align-items: center;
  background: var(--ink);
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: 17px;
  font-weight: 700;
  height: 56px;
  justify-content: center;
  margin-top: auto;
  width: 100%;
}

.progress-wrap {
  margin-bottom: 24px;
}

.progress-label {
  color: #867f79;
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
}

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

.progress-track span,
.progress-track i {
  background: var(--ink);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.question-page {
  display: flex;
  flex-direction: column;
}

.subtitle {
  margin-bottom: 22px;
}

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

.option-row {
  align-items: center;
  background: var(--paper);
  border: 1px solid #eee5df;
  border-radius: 18px;
  display: grid;
  gap: 8px 12px;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 10px 13px;
  position: relative;
}

.option-row strong {
  font-size: 17px;
  grid-column: 2;
  line-height: 1.2;
}

.option-row small {
  color: var(--muted);
  display: block;
  font-size: 13px;
  grid-column: 2 / 4;
  line-height: 1.35;
}

.option-row img {
  align-self: end;
  display: block;
  grid-column: 3;
  grid-row: 1 / 3;
  height: 78px;
  justify-self: end;
  object-fit: contain;
  width: 78px;
}

.swatch,
.emoji,
.body-icon,
.box {
  align-items: center;
  display: inline-flex;
  grid-column: 1;
  grid-row: 1 / 3;
  justify-content: center;
}

.swatch {
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #ded6d0;
  height: 38px;
  width: 38px;
}

.emoji {
  background: #fff;
  border-radius: 50%;
  font-size: 25px;
  height: 42px;
  width: 42px;
}

.jewelry-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
  margin-top: 26px;
}

.jewel-card {
  background: var(--cream);
  border: 1px solid #efe4dc;
  border-radius: 18px;
  min-height: 190px;
  overflow: hidden;
  padding: 14px 10px 12px;
  text-align: center;
}

.jewel-card img {
  display: block;
  height: 118px;
  margin: 0 auto 8px;
  object-fit: contain;
  width: 100%;
}

.jewel-card strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

.body-icon {
  color: #4a4643;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 32px;
  font-weight: 700;
}

.option-row.selected {
  background: var(--green);
  border-color: #aac8b3;
}

.tip {
  background: #fff7ec;
  border-radius: 16px;
  color: #7a5030;
  font-size: 14px;
  line-height: 1.45;
  margin-top: 16px;
  padding: 14px 16px;
}

.checkbox .box {
  border: 1.5px solid #cfc7c1;
  border-radius: 8px;
  height: 28px;
  width: 28px;
}

.checkbox.selected .box {
  background: var(--ink);
  border-color: var(--ink);
}

.checkbox.selected .box::after {
  border-bottom: 2px solid #fff;
  border-right: 2px solid #fff;
  content: "";
  height: 12px;
  transform: rotate(45deg) translateY(-1px);
  width: 6px;
}

.input-page .toggle {
  background: #eee8e2;
  border-radius: 999px;
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
  margin: 28px 0 18px;
  padding: 4px;
}

.toggle span {
  align-items: center;
  border-radius: 999px;
  color: #746c65;
  display: flex;
  font-weight: 700;
  height: 42px;
  justify-content: center;
}

.toggle .active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 10px rgb(0 0 0 / 0.08);
}

.inputs {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 24px 0;
}

.inputs input {
  border: 1px solid #d9d0c9;
  border-radius: 16px;
  font-size: 24px;
  height: 58px;
  padding: 0 16px;
  width: 100%;
}

.inputs span {
  color: var(--muted);
  font-weight: 700;
}

.body-copy {
  margin: 20px 0 28px;
}

.overview {
  background: #fff;
  margin: 0 auto;
  max-width: 980px;
  min-height: 100vh;
  padding: 30px 20px 54px;
}

.overview-head {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 26px;
  max-width: 690px;
}

.overview h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
}

.overview p {
  color: var(--muted);
  line-height: 1.5;
  margin: 10px 0 0;
}

.overview-head > a {
  background: var(--ink);
  border-radius: 999px;
  color: #fff;
  flex: 0 0 auto;
  font-weight: 800;
  padding: 12px 18px;
}

.graph-list {
  display: grid;
  gap: 12px;
}

.graph-list article,
.graph-node {
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(190px, 270px) minmax(0, 1fr);
  padding: 13px;
}

.graph-list article > a {
  align-items: start;
  display: grid;
  gap: 4px;
  grid-template-columns: 52px minmax(0, 1fr);
}

.graph-list article > a strong,
.node-number {
  align-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-weight: 800;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.graph-list article > a span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  grid-column: 2;
}

.graph-list article > a em {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-style: normal;
  grid-column: 2;
  line-height: 1.2;
}

.graph-list article > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.graph-list article > div a {
  background: #fff;
  border: 1px solid #ded6d0;
  border-radius: 999px;
  color: #453f3a;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
}

.node-title {
  display: grid;
  gap: 4px;
}

.node-title strong {
  font-size: 16px;
}

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

.node-link {
  background: #fff;
  border: 1px solid #ddd4ce;
  border-radius: 999px;
  font-weight: 700;
  padding: 10px 14px;
}

.graph-overview {
  background:
    radial-gradient(circle, rgb(255 255 255 / 0.08) 1.5px, transparent 1.5px) 0 0 / 40px 40px,
    radial-gradient(circle at 15% 12%, rgb(71 92 178 / 0.22), transparent 420px),
    linear-gradient(180deg, #161a21 0%, #101318 100%);
  color: #f8fafc;
  height: 100vh;
  margin: 0;
  max-width: none;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

.graph-toolbar {
  align-items: center;
  background: #111116;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.24);
  display: flex;
  height: 48px;
  justify-content: space-between;
  left: 0;
  padding: 0 18px;
  position: sticky;
  right: 0;
  top: 0;
  z-index: 20;
}

.graph-toolbar div {
  align-items: baseline;
  display: flex;
  gap: 12px;
}

.graph-toolbar strong {
  font-size: 14px;
}

.graph-toolbar span {
  color: #8f97a5;
  font-size: 12px;
}

.graph-toolbar a {
  background: rgb(255 255 255 / 0.08);
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
}

.graph-canvas {
  height: 2240px;
  min-width: 4940px;
  position: relative;
}

.graph-lines {
  inset: 0;
  overflow: visible;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}

.graph-lines path {
  fill: none;
  stroke: #e5a236;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
  vector-effect: non-scaling-stroke;
}

.graph-lines .start-edge {
  stroke: #3b414d;
  stroke-width: 4;
}

.edge-label {
  color: rgb(244 246 248 / 0.68);
  font-size: 21px;
  font-weight: 700;
  left: 0;
  position: absolute;
  text-shadow: 0 1px 10px rgb(0 0 0 / 0.7);
  top: 0;
  white-space: nowrap;
  z-index: 3;
}

.start-pill {
  align-items: center;
  background: rgb(65 125 88 / 0.45);
  border: 2px solid rgb(110 193 139 / 0.48);
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgb(65 125 88 / 0.18);
  color: #d9f6df;
  display: flex;
  font-size: 20px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  min-width: 86px;
  position: absolute;
  z-index: 4;
}

.flow-node {
  position: absolute;
  width: 236px;
  z-index: 5;
}

.phone-preview {
  background: #0a0c10;
  border: 4px solid #242a33;
  border-radius: 31px;
  box-shadow: 0 18px 45px rgb(0 0 0 / 0.52);
  display: block;
  height: 468px;
  overflow: hidden;
  padding: 7px;
  position: relative;
  width: 236px;
}

.flow-node:first-of-type .phone-preview {
  border-color: #7180ff;
  box-shadow:
    0 0 0 2px rgb(113 128 255 / 0.35),
    0 0 60px rgb(88 98 255 / 0.42),
    0 18px 45px rgb(0 0 0 / 0.52);
}

.phone-preview iframe {
  background: #fff;
  border: 0;
  border-radius: 24px;
  height: 844px;
  left: 7px;
  pointer-events: none;
  position: absolute;
  top: 7px;
  transform: scale(0.516);
  transform-origin: top left;
  width: 430px;
}

.flow-caption {
  align-items: center;
  color: rgb(244 246 248 / 0.72);
  display: flex;
  font-size: 13px;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.75);
}

.flow-caption strong {
  color: #fff;
}

.flow-caption span {
  color: #9ba3af;
}

.comment-button {
  background: rgb(21 25 33 / 0.9);
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 28px;
  height: 72px;
  position: fixed;
  right: 18px;
  top: 58px;
  width: 72px;
  z-index: 30;
}

.comment-button::before {
  border: 4px solid #dfe4eb;
  border-radius: 3px;
  content: "";
  height: 25px;
  left: 21px;
  position: absolute;
  top: 17px;
  width: 30px;
}

.comment-button::after {
  background:
    linear-gradient(#dfe4eb, #dfe4eb) 0 0 / 20px 3px no-repeat,
    linear-gradient(#dfe4eb, #dfe4eb) 0 8px / 20px 3px no-repeat,
    linear-gradient(#dfe4eb, #dfe4eb) 0 16px / 15px 3px no-repeat;
  content: "";
  height: 21px;
  left: 27px;
  position: absolute;
  top: 23px;
  width: 22px;
}

@media (max-width: 520px) {
  .graph-node {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .graph-list article {
    grid-template-columns: 1fr;
  }

  .node-link {
    grid-column: 1 / 3;
    text-align: center;
  }
}

@media (max-width: 429px) {
  .phone-page {
    max-width: 328px;
    padding-top: 89px;
  }

  .phone-page h1 {
    font-size: 26px;
  }

  .phone-page p {
    font-size: 15px;
  }

  .age-grid {
    gap: 8px;
  }

  .age-card {
    width: 160px;
  }
}
