:root {
  --paper: #fff8ee;
  --ink: #201916;
  --coral: #ef6c54;
  --orange: #d8792a;
  --violet: #432d69;
  --mint: #177a6b;
  --gold: #be8738;
  --muted: #75645d;
  --line: rgba(32, 25, 22, 0.16);
  --shadow: 0 22px 60px rgba(32, 25, 22, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 16% 10%, rgba(239, 108, 84, 0.24), transparent 25rem),
    radial-gradient(circle at 88% 18%, rgba(23, 122, 107, 0.18), transparent 27rem),
    var(--paper);
  color: var(--ink);
  font-family: Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

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

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--violet);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button {
  display: inline-flex;
  min-height: 3.2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 0.82rem 1.4rem;
  font-weight: 900;
}

.button--primary {
  background: var(--ink);
  color: var(--paper);
}

.button--secondary {
  background: rgba(255, 248, 238, 0.78);
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(32, 25, 22, 0.68);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.text-button:disabled {
  cursor: default;
  opacity: 0.34;
}

.home,
.question-page,
.result-page {
  min-height: 100vh;
}

.home-body {
  overflow-x: hidden;
  background: #dceef4;
}

.home-hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.25rem, 5vw, 4rem);
}

.home-hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: 50%;
  left: 50%;
  width: min(76rem, 82vw);
  height: max(61rem, 116vh);
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

.home-hero__copy {
  position: relative;
  z-index: 2;
  width: min(100%, 62rem);
  padding-right: clamp(10rem, 22vw, 20rem);
  text-align: center;
}

.home-hero__label {
  display: inline-block;
  margin: 0 0 clamp(1.1rem, 3vh, 2rem);
  padding: 0.5rem 1.15rem;
  background: #fff000;
  color: #17120f;
  font-size: clamp(0.78rem, 1.1vw, 0.95rem);
  font-weight: 900;
}

.home-hero__copy h1 {
  margin: 0;
  color: #17120f;
  line-height: 1;
}

.home-hero__copy h1 span {
  display: block;
  margin-bottom: 0.45rem;
  font-size: clamp(1.65rem, 3.3vw, 3.15rem);
  font-weight: 900;
}

.home-hero__copy h1 strong {
  display: block;
  color: #f05a4f;
  font-size: clamp(3.4rem, 7.2vw, 6.8rem);
  font-weight: 900;
  line-height: 0.94;
  text-shadow: 0.04em 0.04em 0 #fff000;
}

.home-hero__book-title {
  margin: clamp(1.4rem, 3vh, 2.2rem) 0 0;
  color: #6a615d;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.7;
}

.home-hero__book-title strong {
  color: #17120f;
  font-size: clamp(0.95rem, 1.4vw, 1.2rem);
}

.home-hero__lead {
  margin: 1rem auto 1.35rem;
  color: #4d4541;
  font-size: clamp(0.86rem, 1.15vw, 1rem);
  font-weight: 700;
  line-height: 1.8;
}

.home-start {
  display: inline-flex;
  min-width: min(100%, 18rem);
  min-height: 4rem;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  border: 3px solid #17120f;
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  background: #fff000;
  color: #17120f;
  box-shadow: 0.35rem 0.35rem 0 #17120f;
  font-size: 1.08rem;
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.home-start b {
  font-size: 1.55rem;
  line-height: 1;
}

.home-start:hover,
.home-start:focus-visible {
  box-shadow: 0.15rem 0.15rem 0 #17120f;
  transform: translate(0.2rem, 0.2rem);
}

.home-start--mobile {
  display: none;
}

.home-publisher--mobile {
  display: none;
}

.home-book {
  position: absolute;
  z-index: 3;
  right: clamp(3rem, 12vw, 12rem);
  bottom: 2.8rem;
  width: clamp(14rem, 23vw, 22rem);
  margin: 0;
  transform: rotate(2.5deg);
}

.home-book img {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid #17120f;
  box-shadow: 1rem 1.15rem 0 rgba(240, 90, 79, 0.25), 0 1.6rem 3rem rgba(32, 25, 22, 0.2);
}

.home-book figcaption {
  margin-top: 0.7rem;
  color: #5e5550;
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
}

.result-mock h1 {
  max-width: 12ch;
  margin: 0 0 1.2rem;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: 0.98;
}

.lead,
.result-mock p {
  max-width: 43rem;
  margin: 0 0 2rem;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.9;
}

.result-mock {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 248, 238, 0.82);
  box-shadow: var(--shadow);
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 92rem);
  margin: 0 auto;
  border-bottom: 2px solid rgba(32, 25, 22, 0.1);
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  background: transparent;
  font-weight: 900;
}

.topbar span {
  color: var(--coral);
  font-size: 0.92rem;
}

.question-page {
  position: relative;
  overflow-x: clip;
  background: #fffaf2;
}

.question-page::before {
  content: "";
  position: absolute;
  inset: 4.25rem 0 auto;
  height: 0.45rem;
  background: repeating-linear-gradient(90deg, var(--coral) 0 0.4rem, transparent 0.4rem 0.85rem);
  opacity: 0.45;
}

.question-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.72fr) minmax(32rem, 1.28fr);
  gap: clamp(0.5rem, 2vw, 2rem);
  align-items: stretch;
  width: min(100%, 92rem);
  min-height: calc(100vh - 4.25rem);
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2.5rem) 1.5rem;
}

.character-stage {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 41rem;
  align-items: flex-end;
  justify-content: center;
  margin: 0;
  overflow: visible;
}

.character-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 3%;
  bottom: 3%;
  width: 84%;
  height: 68%;
  border: 3px solid var(--ink);
  background: var(--coral);
  clip-path: polygon(13% 0, 100% 8%, 88% 100%, 0 92%);
}

.character-stage img {
  display: block;
  width: auto;
  height: min(96vh, 62rem);
  max-width: 160%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(5px 5px 0 #fff) drop-shadow(-3px -3px 0 #fff);
}

.protected-illustration {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}

.illustration-credit {
  position: absolute;
  z-index: 4;
  margin: 0;
  padding: 0.12rem 0.26rem;
  background: rgba(255, 252, 246, 0.86);
  color: rgba(32, 25, 22, 0.66);
  border-radius: 2px;
  font-size: clamp(0.58rem, 0.85vw, 0.7rem);
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.illustration-credit--question {
  right: 4%;
  bottom: 1.45rem;
}

.question-card {
  position: relative;
  z-index: 2;
  align-self: center;
  width: min(100%, 54rem);
  padding-left: clamp(0rem, 1vw, 1rem);
}

.speech-bubble {
  position: relative;
  border: 3px solid var(--ink);
  border-radius: 2.2rem;
  padding: clamp(1.25rem, 2.6vw, 2rem) clamp(1.35rem, 3.4vw, 2.7rem);
  background: #fff;
  box-shadow: 0.7rem 0.7rem 0 #ffd74a;
}

.speech-bubble::before {
  content: "";
  position: absolute;
  left: -1.15rem;
  top: 52%;
  width: 2.1rem;
  height: 2.1rem;
  border-left: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: #fff;
  transform: rotate(45deg);
}

.speech-bubble h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.65rem, 2.8vw, 2.75rem);
  line-height: 1.3;
  letter-spacing: 0;
}

.answer-list {
  display: grid;
  gap: 0.68rem;
  margin-top: 1.35rem;
}

.answer-button {
  display: grid;
  grid-template-columns: 4.3rem 1fr;
  align-items: center;
  min-height: 4rem;
  overflow: hidden;
  border: 2px solid #f1b92b;
  border-radius: 1rem;
  padding: 0;
  background: #fff;
  box-shadow: 0.25rem 0.25rem 0 rgba(32, 25, 22, 0.12);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease;
}

.answer-button:hover,
.answer-button:focus-visible {
  border-color: var(--ink);
  background: #fff6d5;
  transform: translate(-2px, -2px);
  outline: none;
}

.answer-button strong {
  display: grid;
  align-self: stretch;
  width: 4.3rem;
  min-height: 100%;
  place-items: center;
  padding-right: 0.35rem;
  background: var(--coral);
  clip-path: polygon(0 0, 77% 0, 100% 50%, 77% 100%, 0 100%, 14% 50%);
  color: #fff;
  font-size: 1.25rem;
}

.answer-button span {
  padding: 0.75rem 1.15rem 0.75rem 0.85rem;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
}

.question-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding: 0 0.25rem;
}

.result-page {
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.result-mock {
  width: min(100%, 58rem);
  padding: clamp(1.5rem, 5vw, 4rem);
}

.result-detail {
  position: relative;
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(16rem, 0.72fr);
  gap: clamp(1.2rem, 4vw, 3rem);
  align-items: center;
  width: min(100%, 72rem);
  border: 0;
  background: transparent;
  box-shadow: none;
}

.result-content {
  position: relative;
  min-width: 0;
  border: 8px solid #1d1d1d;
  border-radius: 30px;
  padding: clamp(1.5rem, 4vw, 3rem);
  background: #fffdf8;
  box-shadow: 14px 14px 0 rgba(29, 29, 29, 0.9);
}

.result-content::before,
.result-visual::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 2;
  width: 4.5rem;
  height: 0.75rem;
  border-radius: 0 0 0.7rem 0.7rem;
  background: #1d1d1d;
  transform: translateX(-50%);
}

.result-visual {
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  min-height: 28rem;
  justify-items: center;
  margin: 0;
  overflow: hidden;
  border: 8px solid #1d1d1d;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 248, 238, 0.24), rgba(255, 255, 255, 0.96)),
    #fff;
  box-shadow: 14px 14px 0 rgba(29, 29, 29, 0.9);
}

.result-visual img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(64vh, 38rem);
  object-fit: contain;
}

.character-profile {
  width: min(100%, 30rem);
  box-sizing: border-box;
  border-top: 1px solid rgba(32, 25, 22, 0.12);
  padding: 1.1rem 1.15rem 1.25rem;
  text-align: left;
  background: rgba(255, 248, 238, 0.92);
}

.character-profile__label {
  margin: 0 0 0.35rem;
  color: var(--coral);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.character-profile h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.35;
}

.character-profile__meta {
  margin: 0.25rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.character-profile__facts {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.character-profile__facts div {
  display: grid;
  grid-template-columns: 6.4rem 1fr;
  gap: 0.55rem;
}

.character-profile__facts dt {
  color: var(--muted);
  font-weight: 700;
}

.character-profile__facts dd {
  margin: 0;
  font-weight: 800;
}

.character-profile__description {
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(32, 25, 22, 0.12);
  font-size: 0.9rem;
  line-height: 1.75;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.result-detail h1 {
  max-width: 16ch;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.1;
}

.result-label {
  display: inline-flex;
  margin-bottom: 1rem;
  border: 1px solid rgba(32, 25, 22, 0.16);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: rgba(239, 108, 84, 0.12);
  color: var(--coral);
  font-size: 0.86rem;
  font-weight: 900;
}

.result-insight {
  margin: 1.5rem 0 1.8rem;
  border: 1px solid rgba(32, 25, 22, 0.12);
  border-radius: 8px;
  padding: 1.2rem 1.25rem 1.3rem;
  background: rgba(255, 248, 238, 0.72);
}

.result-insight__label {
  margin: 0 0 0.65rem;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
}

.result-insight__quote {
  margin: 0 0 1.15rem;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 900;
  line-height: 1.65;
}

.result-philosophy {
  border-top: 1px solid rgba(32, 25, 22, 0.12);
  padding-top: 1rem;
}

.result-philosophy__title {
  margin: 0 0 0.55rem;
  color: var(--gold);
  font-size: 1rem;
  font-weight: 900;
}

.result-philosophy p:last-child {
  margin: 0;
  white-space: pre-line;
  font-size: 0.98rem;
  line-height: 1.85;
}

.result-note {
  margin: 1.5rem 0 1.8rem;
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.1rem;
  background: rgba(255, 248, 238, 0.72);
}

.result-note span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.result-note p {
  margin: 0;
  font-size: 0.98rem;
}

@media (max-width: 900px) {
  .home-hero,
  .question-layout,
  .result-detail {
    grid-template-columns: 1fr;
  }

  .home-hero {
    min-height: 58rem;
    align-content: start;
    padding-top: 5rem;
    padding-bottom: 24rem;
  }

  .home-hero::before {
    width: 132vw;
    height: 110%;
  }

  .home-hero__copy {
    width: min(100%, 42rem);
    padding-right: 0;
  }

  .home-book {
    right: auto;
    bottom: 7.4rem;
    left: 50%;
    width: 16.5rem;
    transform: translateX(-50%) rotate(2.5deg);
  }

  .home-start--desktop {
    display: none;
  }

  .home-start--mobile {
    position: absolute;
    right: auto;
    bottom: 1.6rem;
    left: 50%;
    z-index: 4;
    display: inline-flex;
    transform: translateX(-50%);
  }

  .home-start--mobile:hover,
  .home-start--mobile:focus-visible {
    transform: translate(calc(-50% + 0.2rem), 0.2rem);
  }

  .character-stage {
    min-height: 35rem;
    max-height: 39rem;
  }

  .character-stage::before {
    left: 13%;
    width: 72%;
  }

  .character-stage img {
    height: 40rem;
    max-width: 135%;
  }

  .question-card {
    width: min(100%, 42rem);
    margin: -1rem auto 0;
    padding-left: 0;
  }

  .result-visual {
    min-height: 24rem;
  }

  .speech-bubble::before {
    left: 2rem;
    top: -1.15rem;
    border: 0;
    border-left: 3px solid var(--ink);
    border-top: 3px solid var(--ink);
  }
}

@media (max-width: 560px) {
  .home-hero,
  .question-layout {
    padding-inline: 1rem;
  }

  .result-mock h1 {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

  .home-hero {
    min-height: 60rem;
    padding-top: 4.2rem;
    padding-bottom: 21rem;
  }

  .home-hero::before {
    width: 155vw;
  }

  .home-hero__copy h1 span {
    font-size: 1.55rem;
  }

  .home-hero__copy h1 strong {
    font-size: clamp(3rem, 15vw, 4.5rem);
  }

  .home-hero__lead {
    max-width: 24rem;
  }

  .home-hero__desktop-break {
    display: none;
  }

  .home-start {
    min-width: min(100%, 17rem);
  }

  .home-book {
    bottom: 7.3rem;
    width: 14.5rem;
  }

  .home-book figcaption {
    display: none;
  }

  .home-publisher--mobile {
    position: absolute;
    bottom: 0.45rem;
    left: 50%;
    z-index: 4;
    display: block;
    width: max-content;
    margin: 0;
    color: rgba(32, 25, 22, 0.48);
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.2;
    transform: translateX(-50%);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
    justify-content: center;
  }

  .character-stage {
    min-height: 30rem;
    max-height: 32rem;
  }

  .character-stage img {
    height: 34rem;
    max-width: 150%;
    object-position: center bottom;
    transform: translateY(1.15rem);
  }

  .question-layout {
    gap: 0.5rem;
    padding-top: 1.5rem;
  }

  .speech-bubble {
    border-radius: 1.6rem;
    box-shadow: 0.45rem 0.45rem 0 #ffd74a;
  }

  .speech-bubble h1 {
    font-size: 1.55rem;
  }

  .answer-button {
    grid-template-columns: 3.6rem 1fr;
    min-height: 3.8rem;
  }

  .answer-button strong {
    width: 3.6rem;
  }

  .answer-button span {
    padding-inline: 0.65rem 0.85rem;
    font-size: 0.9rem;
    text-align: left;
  }

  .button,
  .result-actions,
  .question-footer {
    width: 100%;
  }

  .question-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Final diagnosis result layout */
.diagnosis-page {
  min-height: 100vh;
  overflow-x: clip;
  padding: clamp(1.5rem, 4vw, 4rem) 1rem;
  background: #fff8ee;
}

.diagnosis-result {
  width: min(100%, 64rem);
  margin: 0 auto;
  color: var(--ink);
  --result-accent: #ef5f55;
}

.diagnosis-details[hidden],
.diagnosis-quote[hidden],
.diagnosis-profile[hidden],
.diagnosis-profiles[hidden],
.diagnosis-character img[hidden],
.diagnosis-character__placeholder[hidden] {
  display: none !important;
}

.diagnosis-header {
  position: relative;
  margin-bottom: clamp(2.2rem, 6vw, 4.8rem);
  text-align: center;
}

.diagnosis-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 2.7rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

.diagnosis-kicker::before,
.diagnosis-kicker::after {
  content: "";
  width: 3.2rem;
  border-top: 3px dotted var(--result-accent);
}

.diagnosis-title {
  margin: 0;
  line-height: 1;
}

.diagnosis-title span {
  display: block;
  margin-bottom: 0.45rem;
  font-size: clamp(1.6rem, 4vw, 3.3rem);
  font-weight: 900;
}

.diagnosis-title strong {
  display: block;
  color: var(--result-accent);
  font-size: clamp(5rem, 13vw, 8.5rem);
  line-height: 0.92;
}

.diagnosis-title .diagnosis-reading {
  margin: 0 auto 0.3rem;
  padding-left: 2.2em;
  color: var(--result-accent);
  font-size: 0.82rem;
  letter-spacing: 2.2em;
  line-height: 1;
}

.diagnosis-result[data-result="yajnavalkya"] .diagnosis-title strong {
  overflow-wrap: anywhere;
  font-size: clamp(2.8rem, 7vw, 5.3rem);
  line-height: 1.05;
}

.diagnosis-result[data-result="shinran-honen"] .diagnosis-title strong {
  font-size: clamp(3.8rem, 9vw, 6.8rem);
}

.diagnosis-result[data-result="shinran-honen"] {
  width: min(100%, 76rem);
}

.diagnosis-result[data-result="shinran-honen"] .diagnosis-stage {
  grid-template-columns: minmax(40rem, 46rem) minmax(24rem, 1fr);
}

.diagnosis-stage {
  display: grid;
  grid-template-columns: minmax(19rem, 0.8fr) minmax(24rem, 1.2fr);
  gap: clamp(0.5rem, 1.2vw, 0.9rem);
  align-items: start;
}

.diagnosis-stage--single {
  grid-template-columns: minmax(19rem, 32rem);
  justify-content: center;
}

.diagnosis-character {
  position: relative;
  min-height: 60rem;
  margin: 0;
}

.illustration-credit--result {
  position: static;
  width: max-content;
  margin-top: 4.4rem;
  color: rgba(32, 25, 22, 0.7);
}

.diagnosis-character::before {
  content: "";
  position: absolute;
  inset: 7% 1% 2% 1%;
  background: var(--result-accent);
  transform: rotate(5deg);
}

.diagnosis-character::after {
  content: "";
  position: absolute;
  inset: 5% auto 1% -5%;
  width: 55%;
  background-image: radial-gradient(var(--result-accent) 1.4px, transparent 1.4px);
  background-size: 9px 9px;
  opacity: 0.58;
}

.diagnosis-character__art {
  position: relative;
  z-index: 1;
  min-height: 60rem;
  overflow: visible;
}

.diagnosis-character__placeholder {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  display: grid;
  width: min(72%, 18rem);
  height: 50rem;
  border: 2px dashed rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  place-content: center;
  text-align: center;
  transform: translateX(-50%) rotate(-2deg);
}

.diagnosis-character__placeholder span {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.diagnosis-character__placeholder strong {
  margin-top: 0.7rem;
  font-size: clamp(2.3rem, 5vw, 3.5rem);
  line-height: 1;
}

.diagnosis-character img {
  position: absolute;
  bottom: -4rem;
  left: 50%;
  display: block;
  width: auto;
  max-width: none;
  height: 66rem;
  clip-path: none;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 3px #fff);
  transform: translateX(-50%);
}

.diagnosis-character__image--secondary {
  display: none;
}

.diagnosis-result[data-result="shinran-honen"] .diagnosis-character__image--primary {
  bottom: -2rem;
  left: 18%;
  z-index: 2;
  height: 58rem;
}

.diagnosis-result[data-result="shinran-honen"] .diagnosis-character__image--secondary {
  bottom: -2rem;
  left: 68%;
  z-index: 1;
  display: block;
  height: 54rem;
}

.diagnosis-details {
  display: grid;
  gap: 1.75rem;
}

.diagnosis-profiles {
  display: grid;
  gap: 1.75rem;
}

.diagnosis-quote {
  position: relative;
  margin-top: 2rem;
  border: 3px solid var(--ink);
  border-radius: 1.25rem;
  min-height: 0;
  padding: 2.8rem 2.6rem 1.9rem 3rem;
  background: #fff;
  filter: drop-shadow(8px 8px 0 color-mix(in srgb, var(--result-accent) 30%, transparent));
  isolation: isolate;
}

.diagnosis-quote::before {
  display: none;
}

.diagnosis-quote::after {
  display: none;
}

.diagnosis-quote__label {
  position: absolute;
  top: -1.15rem;
  left: clamp(2rem, 16%, 5.5rem);
  z-index: 2;
  margin: 0;
  border: 2px solid var(--ink);
  padding: 0.5rem 1rem;
  background: var(--result-accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.35;
  max-width: calc(100% - 3rem);
  transform: rotate(-4deg);
  transform-origin: center;
}

.diagnosis-quote__body {
  position: relative;
  z-index: 1;
  margin: 0;
  font-weight: 900;
  line-height: 1.62;
  text-align: left;
  line-break: strict;
  text-wrap: pretty;
}

.diagnosis-quote__body span,
.diagnosis-quote__body strong {
  display: inline;
  white-space: normal;
}

.diagnosis-quote__body strong {
  color: var(--result-accent);
  font-size: 1.12em;
}

.diagnosis-quote--short .diagnosis-quote__body {
  font-size: clamp(1.7rem, 3vw, 2.15rem);
}

.diagnosis-quote--medium .diagnosis-quote__body {
  font-size: clamp(1.48rem, 2.5vw, 1.85rem);
}

.diagnosis-quote--long .diagnosis-quote__body {
  font-size: clamp(1.28rem, 2vw, 1.55rem);
}

.diagnosis-quote--extra-long .diagnosis-quote__body {
  font-size: clamp(1.12rem, 1.7vw, 1.35rem);
}

.diagnosis-profile {
  position: relative;
  min-height: 32rem;
  padding: 2.5rem 2.35rem 2.2rem;
  background: var(--ink);
  clip-path: polygon(0 0, 96% 0, 100% 5%, 100% 95%, 96% 100%, 4% 100%, 0 95%);
  filter: drop-shadow(7px 7px 0 rgba(32, 25, 22, 0.08));
  isolation: isolate;
}

.diagnosis-profile::before {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: 0;
  background: #fff;
  clip-path: polygon(0 0, 96% 0, 100% 5%, 100% 95%, 96% 100%, 4% 100%, 0 95%);
}

.diagnosis-profile > * {
  position: relative;
  z-index: 1;
}

.diagnosis-profile__label {
  display: none;
}

.diagnosis-profile h2 {
  margin: 0;
  padding-bottom: 0.65rem;
  border-bottom: 2px dashed rgba(32, 25, 22, 0.22);
  font-size: clamp(1.45rem, 2.7vw, 2.05rem);
  line-height: 1.35;
  text-align: center;
}

.diagnosis-profile h2::before,
.diagnosis-profile h2::after {
  content: "✦";
  margin: 0 0.55rem;
  color: var(--result-accent);
}

.diagnosis-profile__meta {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin: 1.2rem auto 0.7rem;
  border: 1px solid var(--result-accent);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  color: var(--result-accent);
  font-size: 0.9rem;
  font-weight: 900;
}

.diagnosis-profile__origin {
  margin: 0 0 1.35rem;
  color: var(--result-accent);
  font-size: 0.95rem;
  font-weight: 900;
  text-align: center;
}

.diagnosis-profile__facts {
  display: grid;
  gap: 0;
  margin: 0;
  font-size: 1rem;
}

.diagnosis-profile__facts div {
  display: grid;
  grid-template-columns: minmax(8rem, 9.5rem) minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.95rem 0;
  border-top: 1px dotted rgba(32, 25, 22, 0.28);
}

.diagnosis-profile__facts dt {
  color: var(--muted);
  font-weight: 800;
}

.diagnosis-profile__facts dt::before {
  content: "✦";
  margin-right: 0.5rem;
  color: var(--result-accent);
}

.diagnosis-profile__facts dd {
  min-width: 0;
  margin: 0;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.diagnosis-profile__description {
  margin: 1.15rem 0 0;
  border-top: 1px dotted rgba(32, 25, 22, 0.28);
  padding-top: 1rem;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.75;
}

.diagnosis-reading-guide {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  width: 100%;
  margin: 0;
  border: 3px solid var(--ink);
  border-radius: 1rem;
  padding: 0.55rem 0.7rem;
  gap: 0.65rem;
  background: #fff;
  box-shadow: 7px 7px 0 color-mix(in srgb, var(--result-accent) 24%, transparent);
}

.diagnosis-reading-guide[hidden] {
  display: none;
}

.diagnosis-reading-guide h2 {
  margin: 0;
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: var(--result-accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.3;
  white-space: nowrap;
}

.diagnosis-reading-guide__link {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.3rem, 2.4vw, 1.55rem);
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
  text-wrap: pretty;
  white-space: nowrap;
}

.diagnosis-reading-guide__link:hover,
.diagnosis-reading-guide__link:focus-visible {
  color: color-mix(in srgb, var(--result-accent) 78%, #000);
}

.diagnosis-reading-guide--compact .diagnosis-reading-guide__link {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.diagnosis-reading-guide--extra-compact .diagnosis-reading-guide__link {
  font-size: clamp(0.88rem, 1.7vw, 1.08rem);
}

.diagnosis-reading-guide--multiline .diagnosis-reading-guide__link {
  white-space: pre-line;
}

.diagnosis-actions {
  display: grid;
  width: min(100%, 52rem);
  margin: clamp(1.4rem, 3vw, 2rem) auto 0;
  gap: 0.65rem;
  justify-items: center;
}

.diagnosis-complete {
  position: relative;
  width: 100%;
  border: 3px solid var(--ink);
  background: #f3bd4d;
  color: var(--ink);
  font-size: 1.8rem;
  box-shadow: 0 7px 0 color-mix(in srgb, var(--result-accent) 22%, transparent);
}

.diagnosis-complete::before,
.diagnosis-complete::after {
  content: "✦";
  position: absolute;
  top: 50%;
  color: #fff;
  font-size: 1.3rem;
  transform: translateY(-50%);
}

.diagnosis-complete::before {
  left: 13%;
}

.diagnosis-complete::after {
  right: 13%;
}

.diagnosis-share-wrap {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
}

.diagnosis-share,
.diagnosis-retry {
  border: 2px solid var(--ink);
  padding: 0.62rem 1.1rem;
  background: var(--ink);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.diagnosis-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-width: 15rem;
  border-radius: 999px;
  color: #fff;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.diagnosis-share__icon {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.9rem;
  line-height: 1;
}

.diagnosis-share:hover,
.diagnosis-share:focus-visible,
.diagnosis-retry:hover,
.diagnosis-retry:focus-visible {
  color: var(--result-accent);
}

.diagnosis-share:hover,
.diagnosis-share:focus-visible {
  border-color: var(--result-accent);
  background: #fff;
}

.diagnosis-share[aria-busy="true"] {
  opacity: 0.65;
  pointer-events: none;
}

.diagnosis-share__status {
  min-height: 1.35em;
  margin: 0;
  color: rgba(32, 25, 22, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.diagnosis-share-dialog {
  width: min(calc(100% - 2rem), 34rem);
  border: 3px solid var(--ink);
  border-radius: 8px;
  padding: 0;
  background: #fffaf2;
  color: var(--ink);
  box-shadow: 10px 10px 0 color-mix(in srgb, var(--result-accent) 30%, transparent);
}

.diagnosis-share-dialog::backdrop {
  background: rgba(20, 16, 14, 0.62);
}

.diagnosis-share-dialog form {
  position: relative;
  padding: clamp(1.5rem, 5vw, 2.25rem);
  text-align: center;
}

.diagnosis-share-dialog__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  border: 0;
  padding: 0;
  place-items: center;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.diagnosis-share-dialog__eyebrow {
  margin: 0 0 0.45rem;
  color: var(--result-accent);
  font-size: 0.75rem;
  font-weight: 900;
}

.diagnosis-share-dialog h2 {
  margin: 0;
  font-size: clamp(1.35rem, 5vw, 1.9rem);
}

.diagnosis-share-dialog form > p:not(.diagnosis-share-dialog__eyebrow) {
  margin: 0.55rem 0 1.25rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.diagnosis-share-dialog__choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.diagnosis-share-dialog__choice {
  display: grid;
  min-height: 6rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0.9rem;
  align-content: center;
  gap: 0.25rem;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.diagnosis-share-dialog__choice:hover,
.diagnosis-share-dialog__choice:focus-visible {
  color: var(--result-accent);
  box-shadow: 4px 4px 0 var(--result-accent);
  transform: translate(-2px, -2px);
}

.diagnosis-share-dialog__choice strong {
  font-size: 1.45rem;
}

.diagnosis-share-dialog__choice span {
  font-size: 0.78rem;
  font-weight: 700;
}

@media (max-width: 430px) {
  .diagnosis-share-dialog__choices {
    grid-template-columns: 1fr;
  }

  .diagnosis-share-dialog__choice {
    min-height: 4.8rem;
  }
}

@media (max-width: 1050px) {
  .diagnosis-result[data-result="shinran-honen"] .diagnosis-stage {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .diagnosis-stage {
    grid-template-columns: 1fr;
  }

  .diagnosis-character,
  .diagnosis-character__art {
    min-height: 42rem;
  }

  .diagnosis-character img {
    height: 46rem;
  }

  .diagnosis-result[data-result="shinran-honen"] .diagnosis-character__image--primary {
    left: 18%;
    height: 44rem;
  }

  .diagnosis-result[data-result="shinran-honen"] .diagnosis-character__image--secondary {
    left: 78%;
    height: 42rem;
  }

  .diagnosis-character__placeholder {
    bottom: 1rem;
    height: 39rem;
  }

  .diagnosis-quote {
    margin-top: 0;
    min-height: 0;
    padding: 2.8rem 2rem 1.8rem 2.4rem;
  }

  .diagnosis-quote__label {
    left: clamp(1.8rem, 14%, 4rem);
  }

  .diagnosis-quote--short .diagnosis-quote__body {
    font-size: 1.7rem;
  }

}

@media (max-width: 520px) {
  .diagnosis-page {
    padding: 1.3rem 1rem 2rem;
  }

  .diagnosis-kicker::before,
  .diagnosis-kicker::after {
    width: 1.8rem;
  }

  .diagnosis-title span {
    font-size: 1.45rem;
  }

  .diagnosis-title strong {
    font-size: clamp(4.2rem, 24vw, 6rem);
  }

  .diagnosis-character,
  .diagnosis-character__art {
    min-height: 35rem;
  }

  .diagnosis-character img {
    height: 39rem;
  }

  .illustration-credit--question,
  .illustration-credit--result {
    right: 0.25rem;
    font-size: 0.58rem;
  }

  .illustration-credit--question {
    bottom: 1.4rem;
  }

  .illustration-credit--result {
    margin-top: 4.4rem;
  }

  .diagnosis-details {
    margin-top: 0.75rem;
  }

  .diagnosis-result[data-result="shinran-honen"] .diagnosis-character__image--primary {
    left: 18%;
    height: 36rem;
  }

  .diagnosis-result[data-result="shinran-honen"] .diagnosis-character__image--secondary {
    left: 72%;
    height: 34rem;
  }

  .diagnosis-character__placeholder {
    height: 32rem;
  }

  .diagnosis-profile__facts div {
    grid-template-columns: minmax(7.5rem, 8rem) minmax(0, 1fr);
  }

  .diagnosis-quote {
    min-height: 0;
    border-radius: 1rem;
    padding: 2.7rem 1.35rem 1.55rem 1.6rem;
  }

  .diagnosis-quote::before {
    top: -3rem;
    right: 2.2rem;
    left: auto;
    width: 3.6rem;
    height: 3.25rem;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
  }

  .diagnosis-quote::after {
    top: -2.45rem;
    right: calc(2.2rem + 5px);
    left: auto;
    width: calc(3.6rem - 10px);
    height: calc(3.25rem - 6px);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
  }

  .diagnosis-quote__label {
    top: -1rem;
    left: 1.6rem;
    max-width: calc(100% - 2.6rem);
    padding: 0.42rem 0.75rem;
    font-size: 0.78rem;
  }

  .diagnosis-quote--short .diagnosis-quote__body {
    font-size: 1.5rem;
  }

  .diagnosis-quote--medium .diagnosis-quote__body {
    font-size: 1.3rem;
  }

  .diagnosis-quote--long .diagnosis-quote__body {
    font-size: 1.15rem;
  }

  .diagnosis-quote--extra-long .diagnosis-quote__body {
    font-size: 1.03rem;
  }

  .diagnosis-profile {
    min-height: auto;
    padding: 2rem 1.35rem;
  }

  .diagnosis-reading-guide {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    padding: 0.55rem;
  }

  .diagnosis-reading-guide h2 {
    text-align: center;
  }

  .diagnosis-complete {
    font-size: 1.4rem;
  }
}

/* Editorial result page */
.result-page {
  padding: clamp(1rem, 4vw, 3rem);
  background: #fff8ee;
}

.result-mock.result-detail {
  display: block;
  width: min(100%, 72rem);
  border: 0;
  border-radius: 0;
  padding: clamp(1.25rem, 4vw, 3.5rem);
  background: #fffaf2;
  box-shadow: none;
  --result-accent: #ef5f55;
}

.result-side[hidden],
.result-insight[hidden],
.character-profile[hidden] {
  display: none !important;
}

.result-header {
  position: relative;
  z-index: 2;
  max-width: 56rem;
  margin: 0 auto clamp(2rem, 5vw, 4rem);
  text-align: center;
}

.result-header .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.8rem;
  color: var(--ink);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.result-header .eyebrow::before,
.result-header .eyebrow::after {
  content: "";
  width: 2.8rem;
  border-top: 3px dotted var(--result-accent);
}

.result-label {
  margin-bottom: 0.8rem;
  border-color: color-mix(in srgb, var(--result-accent) 36%, transparent);
  background: color-mix(in srgb, var(--result-accent) 10%, transparent);
  color: var(--result-accent);
}

.result-detail h1 {
  max-width: none;
  margin: 0;
  font-size: inherit;
  line-height: 1;
}

.result-detail h1 span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: clamp(1.5rem, 4vw, 3.2rem);
  font-weight: 900;
}

.result-detail h1 strong {
  display: block;
  color: var(--result-accent);
  font-size: clamp(4rem, 11vw, 8rem);
  line-height: 0.95;
}

.result-detail[data-result="yajnavalkya"] h1 strong {
  overflow-wrap: anywhere;
  font-size: clamp(2.6rem, 6.5vw, 5.2rem);
  line-height: 1.05;
}

.result-header > p:last-child {
  max-width: 42rem;
  margin: 1rem auto 0;
  font-size: 1rem;
  line-height: 1.8;
}

.result-stage {
  display: grid;
  grid-template-columns: minmax(18rem, 0.84fr) minmax(20rem, 1.16fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.result-stage--single {
  grid-template-columns: minmax(18rem, 34rem);
  justify-content: center;
}

.result-content,
.result-content::before,
.result-visual::before {
  display: none;
}

.result-visual {
  position: relative;
  display: block;
  min-height: 42rem;
  margin: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.result-character-mat {
  position: relative;
  display: grid;
  min-height: 42rem;
  place-items: end center;
  isolation: isolate;
}

.result-character-mat::before {
  content: "";
  position: absolute;
  inset: 9% 8% 6% 10%;
  z-index: -2;
  background: var(--result-accent);
  transform: rotate(5deg);
}

.result-character-mat::after {
  content: "";
  position: absolute;
  inset: 5% 0 0 0;
  z-index: -1;
  background-image: radial-gradient(var(--result-accent) 1.4px, transparent 1.4px);
  background-size: 10px 10px;
  opacity: 0.52;
  clip-path: polygon(0 12%, 34% 3%, 24% 96%, 0 100%);
}

.result-visual img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 29rem);
  max-width: 100%;
  max-height: 44rem;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 8px #fff);
}

.result-side {
  display: grid;
  gap: 1.5rem;
}

.result-insight {
  position: relative;
  margin: 1.8rem 0 0;
  border: 3px solid var(--ink);
  border-radius: 4px;
  padding: 2rem 1.6rem 1.5rem;
  background: #fff;
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--result-accent) 30%, transparent);
}

.result-insight::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 3.2rem;
  width: 1.8rem;
  height: 1.8rem;
  border-left: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  background: #fff;
  transform: rotate(45deg);
}

.result-insight__label {
  position: absolute;
  top: -1.2rem;
  left: 1.4rem;
  margin: 0;
  border: 2px solid var(--ink);
  padding: 0.5rem 1rem;
  background: var(--result-accent);
  color: #fff;
  font-size: 0.9rem;
}

.result-insight__quote {
  margin: 0 0 1.1rem;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  line-height: 1.75;
}

.result-philosophy {
  border-top: 2px dotted color-mix(in srgb, var(--result-accent) 55%, transparent);
  padding-top: 1rem;
}

.result-philosophy__title {
  color: var(--result-accent);
}

.character-profile {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: #fff;
  box-shadow: 7px 7px 0 rgba(32, 25, 22, 0.08);
}

.character-profile__label {
  color: var(--result-accent);
}

.character-profile h2 {
  padding-bottom: 0.7rem;
  border-bottom: 2px dashed rgba(32, 25, 22, 0.24);
  font-size: clamp(1.25rem, 2.5vw, 1.8rem);
}

.character-profile__meta {
  display: inline-flex;
  margin-top: 0.9rem;
  border: 1px solid var(--result-accent);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  color: var(--result-accent);
}

.character-profile__facts div {
  grid-template-columns: 7rem 1fr;
  padding: 0.45rem 0;
  border-bottom: 1px dotted rgba(32, 25, 22, 0.25);
}

.character-profile__facts dt::before {
  content: "✦";
  margin-right: 0.5rem;
  color: var(--result-accent);
}

.result-actions {
  display: grid;
  width: min(100%, 52rem);
  margin: clamp(2rem, 5vw, 4rem) auto 0;
  gap: 0.8rem;
  justify-items: center;
}

.result-actions .result-complete {
  width: 100%;
  border-color: var(--ink);
  background: #f2bd50;
  color: var(--ink);
  font-size: 1.25rem;
}

.result-share {
  border: 0;
  padding: 0.5rem 0.7rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.result-share:hover,
.result-share:focus-visible,
.result-retry:hover,
.result-retry:focus-visible {
  color: var(--result-accent);
}

.result-retry {
  padding: 0.35rem 0.5rem;
}

@media (max-width: 900px) {
  .result-stage {
    grid-template-columns: 1fr;
  }

  .result-visual,
  .result-character-mat {
    min-height: 34rem;
  }

  .result-insight {
    margin-top: 0;
  }

  .result-insight::before {
    left: 2.2rem;
    top: -1rem;
    border: 0;
    border-left: 3px solid var(--ink);
    border-top: 3px solid var(--ink);
  }
}

@media (max-width: 560px) {
  .result-page {
    padding: 0;
  }

  .result-mock.result-detail {
    padding: 1.25rem 1rem 2rem;
  }

  .result-detail h1 span {
    font-size: 1.45rem;
  }

  .result-detail h1 strong {
    font-size: clamp(3.8rem, 24vw, 6rem);
  }

  .result-visual,
  .result-character-mat {
    min-height: 29rem;
  }

  .character-profile__facts div {
    grid-template-columns: 6.2rem 1fr;
  }
}
