:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f1eb;
  color: #171717;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(255, 111, 97, 0.2), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(61, 110, 255, 0.15), transparent 28rem),
    #f6f2ea;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.screen {
  width: min(100%, 980px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 20px 96px;
}

.hero,
section {
  display: grid;
  gap: 18px;
}

.eyebrow {
  margin: 0;
  color: #725f55;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: 0.95;
}

h2 {
  font-size: clamp(1.8rem, 6vw, 3.4rem);
  line-height: 1.05;
}

.lede {
  max-width: 680px;
  color: #5d5a55;
  font-size: 1.05rem;
  line-height: 1.6;
}

.tiny {
  color: #817b73;
  font-size: 0.85rem;
}

.checkline {
  display: flex;
  gap: 10px;
  align-items: center;
  width: fit-content;
  padding: 12px 14px;
  border: 1px solid rgba(23, 23, 23, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.actions,
.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary,
.secondary,
.ghost,
.wide {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
}

.primary,
.wide {
  background: #171717;
  color: white;
}

.secondary {
  background: white;
  color: #171717;
  box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.12);
}

.ghost {
  background: transparent;
  color: #5d5a55;
}

.wide {
  width: 100%;
}

.progress {
  overflow: hidden;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.09);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ff6f61;
}

.count {
  color: #71695f;
  text-align: right;
}

.choices {
  display: grid;
  gap: 12px;
  margin-top: 12vh;
}

.choices button {
  min-height: 64px;
  border-radius: 8px;
  background: white;
  color: #25221e;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.1);
}

.choices .selected {
  background: #171717;
  color: white;
}

.result-card,
.mini,
.locked {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 60px rgba(70, 51, 36, 0.12);
}

.type {
  font-size: 4rem;
  font-weight: 950;
  line-height: 0.9;
}

.quote,
blockquote {
  font-weight: 850;
  font-size: 1.25rem;
  line-height: 1.35;
}

blockquote {
  margin: 0;
}

.relationship-card {
  display: grid;
  gap: 18px;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: clamp(22px, 5vw, 54px);
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 18px 70px rgba(62, 57, 52, 0.13);
}

.relationship-card.share {
  width: 100%;
  padding: 26px;
}

.relationship-people {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 1.2fr) 1fr;
  gap: 12px;
  align-items: start;
}

.relationship-people > p {
  align-self: center;
  color: #817b73;
  font-size: clamp(1rem, 3.5vw, 1.6rem);
  text-align: center;
}

.relationship-person {
  display: grid;
  gap: 10px;
  min-width: 0;
  color: #3d3936;
  font-size: clamp(1rem, 3.5vw, 1.35rem);
  font-weight: 900;
}

.relationship-person strong {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.relationship-person:last-child {
  justify-items: end;
  text-align: right;
}

.relationship-person i {
  width: clamp(54px, 12vw, 82px);
  aspect-ratio: 1;
  border-radius: 999px;
  background:
    linear-gradient(140deg, #242424 0 32%, transparent 33%),
    radial-gradient(circle at 50% 58%, #f2c39b 0 42%, transparent 43%),
    #2f7d63;
}

.relationship-person:last-child i {
  background:
    linear-gradient(220deg, #242424 0 32%, transparent 33%),
    radial-gradient(circle at 50% 58%, #f2c39b 0 42%, transparent 43%),
    #b06a83;
}

.relationship-card h1 {
  justify-self: center;
  max-width: 100%;
  color: #5549e8;
  font-size: clamp(3.7rem, 11vw, 6.6rem);
  line-height: 0.96;
  text-align: center;
  overflow-wrap: anywhere;
}

.relationship-subtitle {
  justify-self: center;
  color: #958dec;
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 850;
  letter-spacing: 0.08em;
}

.relationship-card blockquote {
  margin-top: 8px;
  font-size: clamp(1.25rem, 4vw, 2rem);
  line-height: 1.35;
}

.relationship-card p:last-child {
  color: #77716b;
  font-size: clamp(1rem, 3vw, 1.35rem);
  line-height: 1.65;
}

.code,
code {
  width: fit-content;
  padding: 8px 10px;
  border-radius: 6px;
  background: #171717;
  color: white;
  font-weight: 900;
  letter-spacing: 0;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 42px;
  gap: 10px;
  align-items: center;
}

.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(23, 23, 23, 0.1);
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #ff6f61;
}

.input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid rgba(23, 23, 23, 0.16);
  border-radius: 8px;
  background: white;
  text-transform: uppercase;
}

.error {
  color: #b42318;
  font-weight: 800;
}

.sample-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(23, 23, 23, 0.08);
}

.sample-panel strong {
  font-size: 1rem;
}

.sample-panel p {
  margin: 0;
  color: #71695f;
  line-height: 1.45;
}

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

.sample-grid button {
  min-height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  background: #171717;
  color: white;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.dynamic-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 60px rgba(70, 51, 36, 0.12);
}

.dynamic-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #725f55;
  text-transform: uppercase;
}

.dynamic-heading span,
.dynamic-heading strong {
  font-weight: 950;
}

.subtitle {
  font-weight: 900;
  opacity: 0.75;
}

.scene-illustration {
  position: relative;
  overflow: hidden;
  min-height: 360px;
  border-radius: 8px;
  background: linear-gradient(135deg, #171717, #725f55);
  isolation: isolate;
}

.scene-illustration.has-art {
  background: #f4f1eb;
  box-shadow: 0 14px 42px rgba(34, 28, 24, 0.12);
}

.scene-art {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

.scene-illustration.thumb {
  min-height: 116px;
}

.scene-illustration.share {
  min-height: 210px;
}

.scene-illustration.poster {
  width: min(100%, 520px);
  min-height: 0;
  aspect-ratio: 1;
  justify-self: center;
}

.scene-sky,
.scene-ground,
.scene-accent,
.scene-person,
.scene-person i,
.scene-person b,
.scene-person span {
  position: absolute;
}

.scene-sky {
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 44%),
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.25), transparent 12%);
}

.scene-ground {
  right: 7%;
  bottom: 18%;
  left: 7%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.scene-person {
  bottom: 20%;
  width: 92px;
  height: 172px;
  transform-origin: bottom center;
  z-index: 2;
}

.scene-person.left {
  left: 24%;
}

.scene-person.right {
  right: 24%;
  transform: scaleX(-1);
}

.scene-person i {
  top: 12px;
  left: 24px;
  width: 46px;
  height: 46px;
  border-radius: 48% 52% 44% 56%;
  background:
    linear-gradient(140deg, #2b2b2b 0 32%, transparent 33%),
    #f1c19b;
  box-shadow: 0 0 0 4px rgba(23, 23, 23, 0.08);
}

.scene-person b {
  right: 18px;
  bottom: 22px;
  left: 18px;
  height: 98px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: #2f7d63;
}

.scene-person.right b {
  background: #b06a83;
}

.scene-person span {
  right: 10px;
  bottom: 78px;
  width: 42px;
  height: 12px;
  border-radius: 999px;
  background: #f1c19b;
  transform: rotate(-22deg);
  transform-origin: left center;
}

.scene-person.reach span,
.scene-person.guard span,
.scene-person.spark span {
  width: 58px;
  transform: rotate(-8deg);
}

.scene-person.phone span {
  width: 44px;
  transform: translate(12px, -24px) rotate(-58deg);
}

.scene-person.turn {
  opacity: 0.88;
}

.scene-person.cross span {
  transform: rotate(28deg);
}

.scene-person.sit {
  transform: translateY(18px) scale(0.94);
}

.scene-person.right.sit {
  transform: translateY(18px) scaleX(-1) scale(0.94);
}

.scene-person.run {
  transform: rotate(-6deg);
}

.scene-person.right.run {
  transform: scaleX(-1) rotate(-6deg);
}

.scene-accent {
  z-index: 1;
}

.scene-accent.bubble,
.scene-accent.moon,
.scene-accent.soft,
.scene-accent.sun,
.scene-accent.calm {
  top: 12%;
  left: 42%;
  width: 16%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.scene-accent.bubble {
  width: 22%;
  aspect-ratio: 2 / 1;
  border-radius: 18px;
  box-shadow: 34px 38px 0 -10px rgba(255, 255, 255, 0.22), -38px 72px 0 -12px rgba(255, 255, 255, 0.18);
}

.scene-accent.ring,
.scene-accent.loop,
.scene-accent.sync,
.scene-accent.wave {
  inset: 20% 20% auto;
  height: 42%;
  border: 8px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  transform: rotate(-16deg);
}

.scene-accent.time {
  top: 9%;
  left: 44%;
  width: 72px;
  aspect-ratio: 1;
  border: 7px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
}

.scene-accent.time::before,
.scene-accent.time::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  transform-origin: left center;
}

.scene-accent.time::before {
  width: 24px;
  transform: rotate(0deg);
}

.scene-accent.time::after {
  width: 30px;
  transform: rotate(-92deg);
}

.scene-accent.rival,
.scene-accent.flare,
.scene-accent.flash,
.scene-accent.gap {
  top: 8%;
  bottom: 14%;
  left: calc(50% - 4px);
  width: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
}

.scene-accent.bolt,
.scene-accent.ember,
.scene-accent.crest,
.scene-accent.reflection {
  top: 10%;
  left: 44%;
  width: 12%;
  aspect-ratio: 1;
  border-radius: 24% 76% 54% 46%;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(18deg);
}

.scene-illustration.thumb .scene-person {
  bottom: 18%;
  width: 48px;
  height: 90px;
}

.scene-illustration.thumb .scene-person.left {
  left: 20%;
}

.scene-illustration.thumb .scene-person.right {
  right: 20%;
}

.scene-illustration.thumb .scene-person i {
  top: 6px;
  left: 13px;
  width: 24px;
  height: 24px;
}

.scene-illustration.thumb .scene-person b {
  right: 8px;
  bottom: 10px;
  left: 8px;
  height: 52px;
}

.scene-illustration.thumb .scene-person span {
  right: 4px;
  bottom: 40px;
  width: 22px;
  height: 7px;
}

.sunset,
.coral,
.rose {
  background: linear-gradient(135deg, #ff6f61, #2a1714);
}

.blue,
.teal,
.mint {
  background: linear-gradient(135deg, #2f80ed, #123c3d);
}

.violet,
.indigo,
.plum,
.lavender,
.night {
  background: linear-gradient(135deg, #6d5dfc, #19132f);
}

.gold,
.amber,
.lime,
.green {
  background: linear-gradient(135deg, #d99b2b, #183f2b);
}

.electric,
.magenta,
.red {
  background: linear-gradient(135deg, #ff3d7f, #1e1328);
}

.locked {
  background: #fff7d9;
}

.locked span {
  color: #6c6041;
}

.dex-progress {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: #171717;
  color: white;
  font-weight: 900;
}

.dex-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dex-card {
  display: grid;
  min-height: 138px;
  align-content: end;
  gap: 4px;
  padding: 12px;
  border-radius: 8px;
  color: white;
}

.dex-card.locked {
  background: rgba(23, 23, 23, 0.12);
  color: #817b73;
  box-shadow: none;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 10px;
  background: rgba(246, 242, 234, 0.92);
  backdrop-filter: blur(16px);
}

.bottom-nav button {
  min-height: 48px;
  border-radius: 8px;
  background: white;
  font-weight: 850;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
}

.modal-body {
  display: grid;
  gap: 12px;
  width: min(100%, 440px);
  max-height: 92vh;
  overflow: auto;
  padding: 16px;
  border-radius: 8px;
  background: #f6f2ea;
}

.modal-body.wide {
  width: min(100%, 680px);
}

.close {
  justify-self: end;
  background: transparent;
  font-weight: 800;
}

.share-card {
  display: grid;
  min-height: 420px;
  align-content: end;
  gap: 12px;
  padding: 24px;
  border-radius: 8px;
  background: #171717;
  color: white;
}

.share-card h2 {
  overflow-wrap: anywhere;
  font-size: clamp(2.7rem, 12vw, 4rem);
  line-height: 0.96;
}

.link-button {
  display: inline-grid;
  place-items: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  text-decoration: none;
}

@media (max-width: 520px) {
  .screen {
    padding: 22px 14px 90px;
  }

  h1 {
    font-size: 3.2rem;
  }

  .dex-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bar-row {
    grid-template-columns: 78px 1fr 34px;
  }

  .choices {
    margin-top: 8vh;
  }

  .relationship-card {
    gap: 14px;
    padding: 20px;
  }

  .relationship-card.share {
    padding: 18px;
  }

  .relationship-people {
    grid-template-columns: 0.9fr 1fr 0.9fr;
    gap: 8px;
  }

  .relationship-people > p {
    font-size: 0.95rem;
  }

  .relationship-person {
    gap: 8px;
    font-size: 0.95rem;
  }

  .relationship-person i {
    width: 52px;
  }

  .relationship-card h1 {
    font-size: clamp(2.7rem, 14vw, 4.1rem);
  }

  .relationship-subtitle {
    font-size: clamp(1.4rem, 8vw, 2.1rem);
  }

  .relationship-card blockquote {
    font-size: 1.12rem;
  }

  .relationship-card p:last-child {
    font-size: 0.98rem;
  }
}
