:root {
  --bg: #17171b;
  --screen-bg: #17171b;
  --ink: #e2d9e2;
  --muted: #e2d9e2;
  --card-bg: #2b2b2f;
  --card-line: #535357;
  --demo-text: #8e8e96;
  --accent: #c9f938;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #17171b;
  font-family: "Inter Tight", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  overflow: hidden;
}

.app {
  position: relative;
  min-height: 100dvh;
  height: 100dvh;
  padding: 16px 12px;
  overflow: hidden;
}

.screen {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 390px;
  height: 844px;
  border-radius: 28px;
  border: 0;
  background: var(--screen-bg);
  overflow: hidden;
  transform: translate(-50%, -50%) scale(var(--desktop-scale, 1));
}

.layout {
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
}

.layout > .character.welcome,
.layout > .question-block,
.result-layout > .result-copy {
  margin-top: 40px;
}

.layout > .character.welcome {
  margin-bottom: 40px;
}

.layout > .welcome-copy {
  margin-top: auto;
}

.layout > .welcome-copy + .cta {
  margin-top: 20px;
}

.layout > .question-block + .cta,
.result-layout > .cta {
  margin-top: auto;
}

.result-layout > .character {
  margin-top: 40px;
  margin-bottom: 40px;
  flex: 1 1 0;
}

.topbar {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar span {
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  color: var(--ink);
}

.character {
  width: 100%;
  border-radius: 0;
  object-fit: contain;
  min-height: 0;
  flex-shrink: 1;
}

.character.welcome {
  height: 405px;
  max-height: 405px;
}

.character.success,
.character.final {
  height: 446px;
  max-height: 446px;
}

.character.final {
  height: 501px;
  max-height: 501px;
}

.character.lost {
  width: 272px;
  height: 394px;
  max-height: 394px;
  max-width: 100%;
  align-self: center;
}

.welcome-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.welcome-copy h1 {
  margin: 0;
  font-size: 36px;
  line-height: 36px;
  letter-spacing: -0.01em;
  font-weight: 600;
}

.welcome-copy p {
  margin: 0;
  font-size: 18px;
  line-height: 22px;
  color: var(--muted);
}

.question-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.question-block h2 {
  margin: 0;
  font-size: 20px;
  line-height: 24px;
  font-weight: 600;
  color: var(--ink);
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answers[data-question="1"] .demo-col {
  gap: 8px;
}

.answers[data-question="1"] .quiz-card:nth-child(2) {
  padding-top: 20px;
  padding-bottom: 8px;
}

.answers[data-question="1"] .quiz-card:nth-child(2) .big-title {
  margin-bottom: 12px;
}

.answers[data-question="2"] .demo-col {
  gap: 8px;
}

.answers[data-question="2"] .quiz-card:first-child .big-title {
  margin-bottom: 16px;
}

.answers[data-question="2"] .quiz-card:nth-child(2) .desc:last-child {
  margin-top: 0;
}

.description-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.answers[data-question="2"] .desc,
.answers[data-question="3"] .desc {
  font-size: 18px;
  line-height: 22px;
  text-align: center;
}

.answers[data-question="3"] .demo-col {
  gap: 20px;
}

.answers[data-question="3"] .demo-row .desc {
  width: 186px;
  text-align: left;
}

.answers[data-question="3"] .demo-row .mid-title {
  font-size: 24px;
  line-height: 40px;
}

.answers[data-question="4"] .product-image,
.answers[data-question="4"] .product-thumb {
  background: #3f3f43;
  border-radius: 4px;
}

.answers[data-question="4"] .mid-title.wide {
  font-size: 36px;
  text-align: center;
}

.answers[data-question="4"] .desc {
  font-size: 18px;
  line-height: 22px;
  text-align: center;
}

.answers[data-question="4"] .product-row .mid-title {
  font-size: 22px;
  line-height: 24px;
}

.answers[data-question="4"] .product-row .desc {
  width: 130px;
  font-size: 14px;
  line-height: 18px;
  text-align: left;
}

.answers[data-question="5"] .demo-col {
  gap: 20px;
}

.answers[data-question="5"] .quiz-card:nth-child(2) {
  padding-top: 20px;
  padding-bottom: 8px;
}

.answers[data-question="5"] .quiz-card:nth-child(2) .demo-col {
  gap: 8px;
}

.answers[data-question="5"] .quiz-card:nth-child(2) .big-title {
  margin-bottom: 12px;
}

.quiz-card {
  width: 100%;
  border: 1px solid var(--card-line);
  background: var(--card-bg);
  border-radius: 16px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.quiz-card.selected {
  border: 2px solid var(--accent);
  padding: 15px;
}

.demo-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.demo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.big-title,
.mid-title {
  margin: 0;
  font-weight: 600;
  color: var(--demo-text);
}

.big-title {
  font-size: 40px;
  line-height: 40px;
}

.big-title.center {
  text-align: center;
}

.mid-title {
  font-size: 24px;
  line-height: 24px;
}

.mid-title.wide {
  width: 100%;
  font-size: 40px;
  line-height: 40px;
}

.mid-title.mini {
  width: 100px;
}

.desc {
  margin: 0;
  width: 100%;
  font-size: 22px;
  line-height: 22px;
  color: var(--demo-text);
}

.desc.tight {
  font-size: 18px;
  line-height: 24px;
}

.pill {
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--demo-text);
  background: transparent;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pill span {
  font-size: 24px;
  line-height: 24px;
  font-weight: 500;
  color: var(--demo-text);
}

.arrow {
  display: block;
  width: 2px;
  height: 40px;
  background: var(--accent);
  position: relative;
}

.arrow::before,
.arrow::after {
  content: "";
  position: absolute;
  left: -5px;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}

.arrow::before {
  top: 0;
  transform: rotate(225deg);
}

.arrow::after {
  bottom: 0;
  transform: rotate(45deg);
}

.split-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.split-title .arrow {
  width: 56px;
  height: 2px;
  flex: 0 0 56px;
}

.split-title .arrow::before {
  top: -5px;
  left: 0;
  transform: rotate(135deg);
}

.split-title .arrow::after {
  bottom: -5px;
  left: auto;
  right: 0;
  transform: rotate(-45deg);
}

.split-title span {
  font-size: 40px;
  line-height: 40px;
  font-weight: 600;
  color: var(--demo-text);
}

.product {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-image {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  background: #46464b;
}

.product-row {
  display: grid;
  grid-template-columns: 70px 100px 1fr;
  gap: 12px;
  align-items: center;
}

.product-thumb {
  width: 70px;
  height: 72px;
  border-radius: 10px;
  background: #46464b;
}

.tags {
  display: grid;
  gap: 8px;
}

.tags.two-cols {
  grid-template-columns: 1fr 1fr;
}

.tags.wrap {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid #8e8e96;
  font-size: 24px;
  line-height: 24px;
  color: #8e8e96;
}

.tag.small {
  font-size: 18px;
}

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

.grid-two.inverse {
  grid-template-columns: 1fr 69px;
}

.tag.left {
  min-width: 69px;
}

.tag.right {
  width: 100%;
}

.result-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-layout {
  position: relative;
}

.result-copy h2 {
  margin: 0;
  font-size: 48px;
  line-height: 44px;
  font-weight: 600;
}

.result-copy h2.lost {
  margin-bottom: 2px;
}

.result-copy p {
  margin: 0;
  font-size: 18px;
  line-height: 22px;
  color: var(--ink);
}

.result-copy.final-copy p {
  max-width: 350px;
}

.score-text {
  white-space: nowrap;
}

.benefit-status {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 76px;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 18px;
  text-align: center;
}

.cta {
  width: 100%;
  height: 52px;
  flex: 0 0 52px;
  border: 0;
  border-radius: 14px;
  font-family: Inter, "Inter Tight", sans-serif;
  font-size: 16px;
  line-height: 22px;
  font-weight: 600;
}

.cta.enabled {
  background: var(--accent);
  color: #141414;
  cursor: pointer;
}

.cta.disabled {
  background: #568100;
  color: #111827;
}

@media (max-width: 420px) {
  html:not(.fit-screen) .app {
    height: 100dvh;
    padding: 0;
    overflow: hidden;
  }

  html:not(.fit-screen) .screen {
    position: static;
    width: 100%;
    height: 100%;
    border-radius: 0;
    overflow: hidden;
    transform: none;
  }

  html:not(.fit-screen) .layout {
    width: 100%;
    height: 100%;
  }

  html:not(.fit-screen) .character {
    height: auto;
    flex: 1 1 0;
  }

  html:not(.fit-screen) .layout > .character.welcome,
  html:not(.fit-screen) .layout > .question-block,
  html:not(.fit-screen) .result-layout > .result-copy {
    margin-top: clamp(12px, 4dvh, 40px);
  }

  html:not(.fit-screen) .result-layout > .character,
  html:not(.fit-screen) .result-layout > .character.final {
    margin-top: clamp(12px, 4dvh, 40px);
    margin-bottom: clamp(12px, 4dvh, 40px);
  }

  html:not(.fit-screen) .question-block {
    gap: clamp(12px, 3dvh, 24px);
  }

  html:not(.fit-screen) .answers {
    gap: clamp(8px, 2dvh, 12px);
  }

  html:not(.fit-screen) .layout > .question-block + .cta {
    margin-top: auto;
  }
}

@media (max-width: 360px) {
  html:not(.fit-screen) .character.welcome,
  html:not(.fit-screen) .character.success,
  html:not(.fit-screen) .character.final,
  html:not(.fit-screen) .character.lost {
    height: auto;
    object-fit: contain;
  }

  html:not(.fit-screen) .answers[data-question="4"] .product-row {
    grid-template-columns: 60px 80px minmax(0, 1fr);
    gap: 8px;
  }

  html:not(.fit-screen) .answers[data-question="4"] .product-thumb {
    width: 60px;
  }

  html:not(.fit-screen) .answers[data-question="4"] .product-row .mid-title,
  html:not(.fit-screen) .answers[data-question="4"] .product-row .desc {
    width: auto;
    min-width: 0;
  }
}

@media (max-width: 420px) and (min-height: 701px) {
  html:not(.fit-screen) .layout > .character.welcome,
  html:not(.fit-screen) .layout > .question-block,
  html:not(.fit-screen) .result-layout > .result-copy,
  html:not(.fit-screen) .result-layout > .character,
  html:not(.fit-screen) .result-layout > .character.final {
    margin-top: 40px;
  }

  html:not(.fit-screen) .result-layout > .character,
  html:not(.fit-screen) .result-layout > .character.final {
    margin-bottom: 40px;
  }
}

@media (max-width: 420px) and (min-height: 651px) and (max-height: 700px) {
  html:not(.fit-screen) .answers[data-question="2"] .quiz-card {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .big-title {
    font-size: 34px;
    line-height: 36px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .arrow {
    height: 30px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .desc {
    font-size: 16px;
    line-height: 19px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .description-stack {
    gap: 4px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .quiz-card:first-child .big-title {
    margin-bottom: 12px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .quiz-card:nth-child(2) .desc:last-child {
    margin-top: 0;
  }
}

@media (max-width: 420px) and (max-height: 650px) {
  html:not(.fit-screen) .layout {
    padding: 12px 16px 16px;
  }

  html:not(.fit-screen) .layout > .question-block {
    margin-top: 8px;
    gap: 8px;
  }

  html:not(.fit-screen) .question-block h2 {
    font-size: 18px;
    line-height: 20px;
  }

  html:not(.fit-screen) .quiz-card {
    padding: 8px;
  }

  html:not(.fit-screen) .quiz-card.selected {
    padding: 7px;
  }

  html:not(.fit-screen) .answers {
    gap: 8px;
  }

  html:not(.fit-screen) .demo-col,
  html:not(.fit-screen) .description-stack {
    gap: 4px;
  }

  html:not(.fit-screen) .answers[data-question="1"] .demo-col,
  html:not(.fit-screen) .answers[data-question="2"] .demo-col,
  html:not(.fit-screen) .answers[data-question="5"] .quiz-card:nth-child(2) .demo-col,
  html:not(.fit-screen) .answers[data-question="2"] .description-stack {
    gap: 8px;
  }

  html:not(.fit-screen) .big-title,
  html:not(.fit-screen) .split-title span {
    font-size: 30px;
    line-height: 32px;
  }

  html:not(.fit-screen) .mid-title,
  html:not(.fit-screen) .answers[data-question="3"] .demo-row .mid-title {
    font-size: 20px;
    line-height: 24px;
  }

  html:not(.fit-screen) .desc,
  html:not(.fit-screen) .answers[data-question="2"] .desc,
  html:not(.fit-screen) .answers[data-question="3"] .desc,
  html:not(.fit-screen) .answers[data-question="4"] .desc {
    font-size: 16px;
    line-height: 18px;
  }

  html:not(.fit-screen) .pill {
    height: 36px;
  }

  html:not(.fit-screen) .pill span {
    font-size: 18px;
    line-height: 20px;
  }

  html:not(.fit-screen) .arrow {
    height: 24px;
  }

  html:not(.fit-screen) .split-title .arrow {
    height: 2px;
  }

  html:not(.fit-screen) .answers[data-question="1"] .quiz-card:nth-child(2),
  html:not(.fit-screen) .answers[data-question="5"] .quiz-card:nth-child(2) {
    padding-top: 8px;
  }

  html:not(.fit-screen) .answers[data-question="1"] .quiz-card:nth-child(2) .big-title,
  html:not(.fit-screen) .answers[data-question="5"] .quiz-card:nth-child(2) .big-title,
  html:not(.fit-screen) .answers[data-question="2"] .quiz-card:first-child .big-title {
    margin-bottom: 8px;
  }

  html:not(.fit-screen) .answers[data-question="3"] .demo-col,
  html:not(.fit-screen) .answers[data-question="5"] .demo-col {
    gap: 8px;
  }

  html:not(.fit-screen) .answers[data-question="4"] .mid-title.wide {
    font-size: 28px;
    line-height: 30px;
  }

  html:not(.fit-screen) .product {
    gap: 8px;
  }

  html:not(.fit-screen) .product-image {
    height: 70px;
  }

  html:not(.fit-screen) .product-thumb {
    height: 50px;
  }

  html:not(.fit-screen) .tag {
    min-height: 28px;
    font-size: 20px;
    line-height: 22px;
  }
}

@media (max-width: 420px) and (max-height: 500px) {
  html:not(.fit-screen) .quiz-card {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  html:not(.fit-screen) .quiz-card.selected {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  html:not(.fit-screen) .welcome-copy {
    gap: 8px;
  }

  html:not(.fit-screen) .welcome-copy h1 {
    font-size: 28px;
    line-height: 30px;
  }

  html:not(.fit-screen) .welcome-copy p {
    font-size: 16px;
    line-height: 19px;
  }

  html:not(.fit-screen) .layout > .character.welcome {
    margin-top: 8px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .quiz-card:nth-child(2) .desc:last-child {
    margin-top: 0;
  }

  html:not(.fit-screen) .answers[data-question="1"] .quiz-card:nth-child(2),
  html:not(.fit-screen) .answers[data-question="5"] .quiz-card:nth-child(2) {
    padding-top: 6px;
  }

  html:not(.fit-screen) .product-image {
    height: 62px;
  }

  html:not(.fit-screen) .product-thumb {
    height: 44px;
  }
}

@media (max-width: 420px) and (max-height: 460px) {
  html:not(.fit-screen) .question-block h2 {
    font-size: 17px;
    line-height: 18px;
  }

  html:not(.fit-screen) .quiz-card {
    padding-top: 4px;
    padding-bottom: 4px;
  }

  html:not(.fit-screen) .quiz-card.selected {
    padding-top: 3px;
    padding-bottom: 3px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .desc,
  html:not(.fit-screen) .answers[data-question="4"] .desc {
    font-size: 15px;
    line-height: 16px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .desc {
    font-size: 14px;
    line-height: 14px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .quiz-card {
    padding-top: 2px;
    padding-bottom: 2px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .quiz-card.selected {
    padding-top: 1px;
    padding-bottom: 1px;
  }

  html:not(.fit-screen) .big-title,
  html:not(.fit-screen) .split-title span {
    font-size: 27px;
    line-height: 28px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .big-title {
    font-size: 24px;
    line-height: 22px;
  }

  html:not(.fit-screen) .answers[data-question="2"] .quiz-card:first-child .big-title {
    margin-bottom: 0;
  }

  html:not(.fit-screen) .arrow {
    height: 16px;
  }

  html:not(.fit-screen) .split-title .arrow {
    height: 2px;
  }

  html:not(.fit-screen) .product-image {
    height: 42px;
  }

  html:not(.fit-screen) .product {
    gap: 4px;
  }

  html:not(.fit-screen) .product-row {
    gap: 6px;
  }

  html:not(.fit-screen) .result-copy h2 {
    font-size: 40px;
    line-height: 38px;
  }
}
