:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", "Segoe UI", sans-serif;
  color: #11110f;
  background: #faf8f2;
  font-synthesis: none;
  --paper: #faf8f2;
  --ink: #11110f;
  --muted: #66645e;
  --red: #c9362f;
  --red-dark: #ad2d27;
  --teal: #35565d;
  --yellow: #e8bb45;
  --line: rgba(53, 86, 93, 0.72);
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  translate: 0 -160%;
  background: var(--ink);
  color: white;
  padding: 10px 14px;
}
.skip-link:focus { translate: 0; }

.shell {
  position: relative;
  width: 100%;
  max-width: 1600px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 32px 32px 24px;
}

.brand {
  position: absolute;
  z-index: 2;
  top: 32px;
  left: 32px;
  display: grid;
  width: 112px;
}
.brand__image { display: block; width: 100%; height: auto; }
.brand::after {
  width: 76px;
  height: 12px;
  margin-top: 12px;
  background: var(--yellow);
  content: "";
}

.intro,
.quiz,
.result {
  min-height: calc(100dvh - 64px);
  padding-top: 190px;
}

.kicker,
.counter-kicker {
  margin: 0;
  color: var(--type-accent, var(--red));
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

h1,
h2,
.question-text {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.42;
}
.question-text:focus { outline: none; }

.lead {
  max-width: 46rem;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.9;
}

.vertical-note {
  margin: 0;
  border-left: 1px solid var(--teal);
  padding: 36px 10px 0 16px;
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.85;
  writing-mode: vertical-rl;
}
.vertical-note::before {
  display: block;
  width: 5px;
  height: 34px;
  margin: -36px 0 20px;
  background: var(--red);
  content: "";
}

.button {
  display: inline-flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 16px 24px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}
.button i { font-size: 1.65rem; }
.button--primary {
  min-width: min(100%, 420px);
  background: var(--red);
  color: white;
  font-size: 1.35rem;
}
.button--primary:hover { background: var(--red-dark); }
.button:disabled { cursor: not-allowed; opacity: 0.38; }
.button:focus-visible,
.text-button:focus-visible,
.answer-option:has(input:focus-visible) {
  outline: 4px solid var(--yellow);
  outline-offset: 5px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* Intro: the unshown state uses the selected concept's same editorial system. */
.intro {
  display: grid;
  grid-template-columns: minmax(180px, 250px) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.intro__number {
  display: grid;
  color: var(--red);
  font-family: "Anton", "Arial Narrow", sans-serif;
  line-height: 0.76;
}
.intro__number span { font-size: clamp(9rem, 18vw, 17rem); }
.intro__number small { margin-top: 24px; color: var(--ink); font-size: 1.5rem; letter-spacing: 0.18em; }
.intro__content { max-width: 900px; }
.intro .kicker { font-size: 2rem; }
.intro h1 { margin-top: 18px; font-size: clamp(3rem, 5.2vw, 5.25rem); }
.intro .button--primary { margin-top: 28px; }
.intro-hook { margin: 14px 0 0; color: var(--muted); font-size: 0.82rem; }

/* Quiz: faithful to selected concept option 3 at 1440 × 1024. */
.quiz {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr) 64px;
  grid-template-rows: auto auto auto;
  align-content: start;
  column-gap: 60px;
}
#question-form { display: contents; }
.quiz__counter {
  position: absolute;
  top: 190px;
  left: 0;
  width: 240px;
}
.counter-kicker { font-size: 1.9rem; }
.question-number {
  margin: 4px 0 0;
  color: var(--red);
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: clamp(10rem, 15vw, 14.5rem);
  line-height: 0.9;
  transform: scaleX(1.06);
  transform-origin: left center;
}
.counter-rule {
  width: 100%;
  height: 2px;
  margin: 10px 0 14px;
  background: rgba(201, 54, 47, 0.24);
}
.counter-rule span { display: block; width: 0; height: 100%; background: var(--red); transition: width 180ms ease; }
.progress-label {
  margin: 0;
  color: var(--red);
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 1.9rem;
  letter-spacing: 0.02em;
}
.quiz__counter .text-button { margin-top: 8px; }
.quiz__counter .text-button { opacity: 0; transition: opacity 120ms ease; }
.quiz__counter:hover .text-button,
.quiz__counter .text-button:focus-visible { opacity: 1; }

.question-block {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 800px;
  height: clamp(240px, 20vw, 280px);
  display: flex;
  align-items: flex-end;
  padding-top: 20px;
}
.question-text {
  max-width: 800px;
  font-size: clamp(1.9rem, 2.8vw, 3rem);
  line-height: 1.45;
}

.answer-options {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  display: grid;
  width: min(100%, 800px);
  grid-template-columns: 1fr;
  align-self: start;
  padding: 12px 0 16px;
}
.answer-options::before { display: none; }
.answer-option {
  position: relative;
  z-index: 1;
  display: grid;
  height: 76px;
  min-height: 0;
  min-width: 0;
  grid-template-columns: 52px minmax(0, 1fr);
  grid-template-rows: 1fr;
  gap: 16px;
  align-items: center;
  justify-items: start;
  border-top: 1px solid rgba(53, 86, 93, 0.34);
  padding: 10px 14px;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.answer-option:last-child { border-bottom: 1px solid rgba(53, 86, 93, 0.34); }
.answer-option__number {
  align-self: center;
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 2.45rem;
  line-height: 1;
}
.answer-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.answer-option input:focus-visible + .answer-option__label {
  outline: 2px solid var(--type-accent, var(--red));
  outline-offset: 5px;
}
.answer-option__label {
  max-width: none;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.55;
}
.answer-option:hover { background: rgba(232, 187, 69, 0.09); }
.answer-option:hover .answer-option__number,
.answer-option:hover .answer-option__label { color: var(--red); }
.answer-option:has(input:checked) { background: rgba(232, 187, 69, 0.16); color: var(--red); }
.answer-option:has(input:checked) input { border-color: var(--red); background: var(--red); }

.quiz-actions {
  grid-column: 2;
  grid-row: 3;
  width: min(100%, 800px);
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  margin-top: 14px;
  padding-top: 8px;
}
.button--back { justify-content: flex-start; padding-left: 0; font-size: 1.15rem; }

/* Result: a longer editorial profile, derived from the selected concept. */
.result {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 60px;
  align-items: start;
  padding-bottom: 72px;
}
.result__content { width: 100%; max-width: 960px; }
.result .kicker { font-size: 1.55rem; }
.result-code {
  margin: 12px 0 0;
  color: var(--type-accent, var(--red));
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: clamp(4.5rem, 8vw, 8rem);
  letter-spacing: 0.03em;
  line-height: 0.9;
}
.result h2,
.result-page h1 { font-size: clamp(2.6rem, 4.2vw, 4.4rem); }
.result h2:focus { outline: none; }
.result-tagline {
  max-width: 780px;
  margin: 24px 0 0;
  color: var(--teal);
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  font-weight: 850;
  line-height: 1.65;
}
.result .vertical-note { justify-self: end; }

.result-visual {
  position: relative;
  display: grid;
  min-height: 520px;
  align-content: space-between;
  overflow: hidden;
  border-block: 2px solid var(--type-accent, var(--red));
  background: var(--type-color, var(--red));
  color: var(--ink);
  padding: 24px 20px;
}
.result-visual__label,
.result-visual__note {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1.5;
}
.result-visual__code {
  position: relative;
  z-index: 1;
  align-self: center;
  margin: 0;
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: clamp(5rem, 8.2vw, 8.4rem);
  letter-spacing: -0.04em;
  line-height: 0.85;
  overflow-wrap: anywhere;
}
.result-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.result-visual:has(img:not([hidden]))::after {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 15, 0.18);
  content: "";
}

.result-detail {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  gap: 40px;
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.result-detail__heading { display: grid; align-content: start; gap: 10px; }
.result-detail__number {
  margin: 0;
  color: var(--red);
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 2.4rem;
  line-height: 1;
}
.result-detail h3,
.result-page .result-detail h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.55;
}
.trait-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: trait;
}
.trait-list li {
  display: grid;
  min-height: 74px;
  grid-template-columns: 36px 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(53, 86, 93, 0.34);
  padding: 14px 12px 14px 0;
  font-weight: 780;
  line-height: 1.55;
  counter-increment: trait;
}
.trait-list li::before {
  color: var(--red);
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 1.3rem;
  content: counter(trait, decimal-leading-zero);
}
.compatible-types { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.compatible-type {
  display: grid;
  min-height: 112px;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  align-content: center;
  border-block: 2px solid var(--ink);
  color: var(--ink);
  padding: 18px 4px;
  text-decoration: none;
}
.compatible-type span {
  color: var(--red);
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 2rem;
  line-height: 1;
}
.compatible-type strong { align-self: end; font-size: 0.92rem; line-height: 1.45; }
.compatible-type i { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 1.5rem; }
.compatible-type:hover { border-color: var(--red); color: var(--red); }
.compatible-types__empty { margin: 0; color: var(--muted); line-height: 1.8; }

.dimension-results { display: grid; gap: 24px; margin: 0; }
.dimension__labels { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; margin-bottom: 8px; font-size: 0.85rem; }
.dimension__labels strong:last-child { text-align: right; }
.dimension__labels span { color: var(--muted); font-size: 0.75rem; text-align: center; }
.dimension__track { height: 9px; background: #d8d3c8; }
.dimension__track span { display: block; height: 100%; background: var(--red); }

.share-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(250px, 360px);
  gap: 44px;
  margin-top: 64px;
  background: var(--ink);
  color: white;
  padding: 34px;
}
.share-panel h2,
.share-panel h3 { margin: 8px 0 0; font-size: clamp(1.7rem, 2.5vw, 2.5rem); line-height: 1.4; }
.share-panel p:not(.kicker, .share-status) { margin: 18px 0 0; color: rgba(255, 255, 255, 0.72); font-size: 0.88rem; line-height: 1.75; }
.share-actions { display: grid; gap: 10px; }
.share-actions .button { width: 100%; min-width: 0; }
.button--dark { background: white; color: var(--ink); }
.button--dark:hover { background: var(--yellow); }
.button--text-action { min-height: 46px; color: white; font-size: 0.83rem; text-decoration: underline; text-underline-offset: 4px; }
.share-status { grid-column: 1 / -1; min-height: 1.4em; margin: 0; color: var(--yellow); font-size: 0.78rem; }
.result__content > .button--primary { margin-top: 34px; }

.standalone-shell { min-height: 100dvh; }
.result-page {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: 60px;
  padding: 160px 0 72px;
}
.result-page__content { width: 100%; max-width: 960px; }
.result-page .kicker { font-size: 1.55rem; }
.result-page h1 { margin: 0; font-weight: 900; letter-spacing: -0.045em; line-height: 1.42; }
.result-page .lead { max-width: 800px; }
.disclaimer { margin: 28px 0 0; color: var(--muted); font-size: 0.75rem; line-height: 1.7; }

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .shell { padding: 24px; }
  .brand { top: 24px; left: 24px; width: 92px; }
  .brand::after { height: 8px; margin-top: 12px; }
  .intro, .quiz, .result { min-height: calc(100dvh - 48px); padding-top: 132px; }
  .quiz { grid-template-columns: 150px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 30px; }
  .quiz__counter { position: static; width: auto; grid-column: 1; grid-row: 1; align-self: start; }
  .question-number { font-size: 8rem; }
  .question-block { height: 240px; }
  .question-text { font-size: clamp(2rem, 5.6vw, 3.1rem); }
  .answer-options { grid-column: 1 / 3; grid-row: 3; width: 100%; padding: 24px 0 24px; }
  .quiz-actions { grid-column: 1 / 3; grid-row: 4; width: 100%; }
  .intro, .result { grid-template-columns: 150px minmax(0, 1fr); }
  .result { gap: 30px; }
  .result-page { grid-template-columns: 190px minmax(0, 1fr); gap: 30px; }
  .result-visual { min-height: 420px; }
  .result-detail { grid-template-columns: 140px minmax(0, 1fr); gap: 24px; }
  .share-panel { grid-template-columns: 1fr; }
  .intro > .vertical-note, .result > .vertical-note { display: none; }
}

@media (max-width: 640px) {
  .shell {
    --mobile-status-clearance: max(env(safe-area-inset-top, 0px), 32px);
    padding: calc(18px + var(--mobile-status-clearance)) 18px 18px;
  }
  .brand {
    top: calc(18px + var(--mobile-status-clearance));
    left: 18px;
    width: 72px;
  }
  .brand::after { width: 54px; height: 6px; }
  .intro, .quiz, .result {
    min-height: calc(100dvh - 36px - var(--mobile-status-clearance));
    padding-top: 112px;
  }
  .intro, .result { display: block; }
  .intro__number, .result__index { display: none; }
  .intro .kicker { font-size: 1.4rem; }
  .intro h1 { font-size: clamp(2.1rem, 9vw, 2.5rem); }
  .intro .button--primary { margin-top: 24px; }
  .intro .button--primary, .result .button--primary { width: 100%; }

  .quiz { display: grid; grid-template-columns: 86px minmax(0, 1fr); grid-template-rows: auto auto auto auto; column-gap: 18px; }
  .counter-kicker { font-size: 1rem; }
  .question-number { font-size: 5rem; }
  .progress-label { font-size: 1.15rem; }
  .quiz__counter .text-button { font-size: 0.7rem; }
  .question-block { padding-top: 4px; }
  .question-block { height: 190px; }
  .question-text { font-size: clamp(1.55rem, 7vw, 2.15rem); line-height: 1.5; }
  .answer-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 8px 0 28px;
  }
  .answer-options::before { display: none; }
  .answer-option {
    height: 58px;
    min-height: 0;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: 1fr;
    gap: 10px;
    justify-items: start;
    border-top: 0;
    border-bottom: 1px solid rgba(53, 86, 93, 0.25);
    padding: 8px 0;
    text-align: left;
  }
  .answer-option__number { align-self: center; font-size: 1.65rem; }
  .answer-option input { width: 1px; height: 1px; }
  .answer-option__label { max-width: none; align-self: center; font-size: 0.88rem; }
  .quiz-actions { padding-top: 18px; }
  .button--back { min-width: 82px; font-size: 0.95rem; }
  .dimension__labels { font-size: 0.75rem; }

  .result { padding-bottom: 44px; }
  .result-visual {
    min-height: 230px;
    margin-bottom: 34px;
    padding: 18px;
  }
  .result-visual__code { font-size: clamp(5.5rem, 28vw, 7.5rem); }
  .result-code { font-size: 4.8rem; }
  .result h2, .result-page h1 { font-size: clamp(2.2rem, 10vw, 3.25rem); }
  .result-tagline { font-size: 1.15rem; }
  .result .lead, .result-page .lead { margin-top: 18px; font-size: 0.9rem; }
  .result-detail { display: block; margin-top: 42px; padding-top: 20px; }
  .result-detail__heading { grid-template-columns: 42px 1fr; align-items: start; margin-bottom: 18px; }
  .result-detail__number { font-size: 1.8rem; }
  .trait-list { grid-template-columns: 1fr; }
  .trait-list li { min-height: 60px; }
  .compatible-types { grid-template-columns: 1fr; gap: 12px; }
  .compatible-type { min-height: 92px; }
  .share-panel { gap: 26px; margin-top: 46px; padding: 24px 20px; }
  .share-actions .button { min-height: 58px; }
  .result__content > .button--primary { width: 100%; }

  .result-page { display: block; padding: 112px 0 44px; }
  .result-page .result-visual { margin-bottom: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Result refresh: character-profile layout based on the selected playful diagnosis reference. */
body:has(.result:not([hidden])),
body:has(.standalone-shell) {
  background: #f9e9ec;
}

.shell:has(.result:not([hidden])),
.standalone-shell {
  max-width: none;
  padding: 0;
  background: #f9e9ec;
}

.shell:has(.result:not([hidden])) > .brand,
.standalone-shell > .brand {
  display: none;
}

.result,
.result-page {
  display: block;
  width: min(100%, 560px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: 64px 24px 72px;
  background: var(--type-color, #deebdf);
}

.result__content,
.result-page__content {
  width: 100%;
  max-width: none;
}

.result-hero {
  display: grid;
  justify-items: center;
  text-align: center;
}

.result .kicker,
.result-page .kicker {
  color: #756d69;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.result h2,
.result-page h1 {
  max-width: 440px;
  margin: 14px 0 0;
  font-size: clamp(1.75rem, 6vw, 2.4rem);
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.38;
}

.result-code {
  margin: 7px 0 0;
  color: #756d69;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1;
}

.result-visual {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 280px;
  align-content: center;
  place-items: center;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--type-accent, #53795d);
  padding: 18px 0 8px;
}

.result-visual__label,
.result-visual__note {
  display: none;
}

.result-visual__code {
  position: static;
  margin: 0;
  font-size: clamp(7rem, 25vw, 10rem);
  letter-spacing: -0.055em;
  line-height: 0.82;
  opacity: 0.88;
}

.result-visual img {
  position: static;
  display: block;
  width: min(100%, 320px);
  height: 280px;
  object-fit: contain;
}

.result-visual:has(img:not([hidden]))::after {
  display: none;
}

.result-tagline {
  display: inline-block;
  max-width: 440px;
  margin: 0;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 12px 22px;
  box-shadow: 0 3px 8px rgba(54, 56, 52, 0.1);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.55;
}

.result-card,
.share-panel {
  display: block;
  margin-top: 24px;
  border: 0;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  padding: 28px;
  box-shadow: 0 3px 0 rgba(66, 77, 67, 0.06), 0 10px 24px rgba(66, 77, 67, 0.06);
}

.result-card--summary {
  margin-top: 24px;
}

.result .lead,
.result-page .lead {
  max-width: none;
  margin: 0;
  color: #4f4d49;
  font-size: 0.95rem;
  line-height: 2;
}

.result-detail {
  grid-template-columns: 1fr;
  gap: 0;
  padding-top: 28px;
}

.result-detail__heading {
  display: block;
  margin: 0 0 14px;
}

.result-detail__number {
  display: none;
}

.result-detail h3,
.result-page .result-detail h2 {
  font-size: 1rem;
  line-height: 1.55;
}

.trait-list {
  display: block;
  margin: 0;
  padding-left: 1.4rem;
  list-style: disc;
  counter-reset: none;
}

.trait-list li {
  display: list-item;
  min-height: 0;
  border: 0;
  padding: 7px 0 7px 4px;
  color: #4f4d49;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.65;
  counter-increment: none;
}

.trait-list li::before {
  content: none;
}

.trait-list li::marker {
  color: var(--type-accent, #53795d);
}

.compatible-types {
  grid-template-columns: 1fr;
  gap: 10px;
}

.compatible-type {
  min-height: 82px;
  border: 0;
  border-radius: 18px;
  background: color-mix(in srgb, var(--type-color, #deebdf) 64%, white);
  padding: 16px 18px;
}

.compatible-type span {
  color: color-mix(in srgb, var(--type-accent, #53795d) 72%, #111);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.compatible-type strong {
  font-size: 0.88rem;
}

.compatible-type:hover {
  background: white;
  color: var(--type-accent, var(--red));
}

.dimension-results {
  gap: 18px;
}

.dimension__labels {
  margin-bottom: 9px;
}

.dimension__track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--type-color, #deebdf) 72%, #c9c5bd);
}

.dimension__track span {
  border-radius: inherit;
  background: var(--type-accent, var(--red));
}

.share-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  margin-top: 24px;
}

.share-panel .kicker {
  color: color-mix(in srgb, var(--type-accent, var(--red)) 72%, #111);
}

.share-panel h2,
.share-panel h3 {
  margin-top: 8px;
  font-size: 1.55rem;
}

.share-panel p:not(.kicker, .share-status) {
  margin-top: 12px;
  color: #68645f;
}

.button--dark {
  background: var(--ink);
  color: white;
}

.button--text-action {
  color: var(--ink);
}

.share-status {
  color: color-mix(in srgb, var(--type-accent, var(--red)) 72%, #111);
}

.result__content > .button--primary {
  width: 100%;
  margin-top: 18px;
}

@media (max-width: 640px) {
  .result,
  .result-page {
    width: 100%;
    min-height: 100dvh;
    padding: calc(30px + env(safe-area-inset-top, 0px)) 18px 52px;
  }

  .result h2,
  .result-page h1 {
    font-size: clamp(1.65rem, 7.6vw, 2.15rem);
  }

  .result-visual {
    min-height: 230px;
    margin: 0;
    padding: 12px 0 4px;
  }

  .result-visual img {
    height: 230px;
  }

  .result-visual__code {
    font-size: clamp(6.2rem, 31vw, 8rem);
  }

  .result-tagline {
    width: auto;
    max-width: calc(100% - 24px);
    font-size: 0.84rem;
  }

  .result-card,
  .share-panel {
    margin-top: 20px;
    border-radius: 22px;
    padding: 24px 22px;
  }

  .result-detail {
    display: block;
    padding-top: 24px;
  }

  .result-detail__heading {
    display: block;
    margin-bottom: 12px;
  }

  .result .lead,
  .result-page .lead {
    margin: 0;
    font-size: 0.9rem;
  }
}

/* Result poster: selected faceted Millesian profile concept. */
body:has(.result:not([hidden])),
body:has(.standalone-shell) {
  background: #e6dfd2;
}

.shell:has(.result:not([hidden])),
.standalone-shell {
  background: #e6dfd2;
}

.result,
.result-page {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 0 0 72px;
  background: #fffaf0;
  box-shadow: 0 18px 70px rgba(54, 43, 21, 0.12);
}

.result-hero {
  display: block;
  text-align: left;
}

/* Keep each MBTI family on one palette, even when a stale inline result survives a deploy. */
html:is([data-result-code="INTJ"], [data-result-code="INTP"], [data-result-code="ENTJ"], [data-result-code="ENTP"]) .standalone-shell,
.result:is([data-result-code="INTJ"], [data-result-code="INTP"], [data-result-code="ENTJ"], [data-result-code="ENTP"]) {
  --type-color: #eadff0 !important;
  --type-accent: #88619a !important;
}

html:is([data-result-code="INFJ"], [data-result-code="INFP"], [data-result-code="ENFJ"], [data-result-code="ENFP"]) .standalone-shell,
.result:is([data-result-code="INFJ"], [data-result-code="INFP"], [data-result-code="ENFJ"], [data-result-code="ENFP"]) {
  --type-color: #dcefe5 !important;
  --type-accent: #33a474 !important;
}

html:is([data-result-code="ISTJ"], [data-result-code="ISFJ"], [data-result-code="ESTJ"], [data-result-code="ESFJ"]) .standalone-shell,
.result:is([data-result-code="ISTJ"], [data-result-code="ISFJ"], [data-result-code="ESTJ"], [data-result-code="ESFJ"]) {
  --type-color: #dcecf2 !important;
  --type-accent: #4298b4 !important;
}

html:is([data-result-code="ISTP"], [data-result-code="ISFP"], [data-result-code="ESTP"], [data-result-code="ESFP"]) .standalone-shell,
.result:is([data-result-code="ISTP"], [data-result-code="ISFP"], [data-result-code="ESTP"], [data-result-code="ESFP"]) {
  --type-color: #f8e3a2 !important;
  --type-accent: #e4ae3a !important;
}

.result-hero__poster {
  position: relative;
  width: 100%;
  min-height: clamp(760px, calc(100svh - 24px), 900px);
  overflow: hidden;
  background-color: var(--type-color, #f8e3a2);
  isolation: isolate;
}

html:is([data-result-code="ISTP"], [data-result-code="ISFP"], [data-result-code="ESTP"], [data-result-code="ESFP"]) .result-hero__poster,
.result:is([data-result-code="ISTP"], [data-result-code="ISFP"], [data-result-code="ESTP"], [data-result-code="ESFP"]) .result-hero__poster {
  background-image: url("./images/results/result-hero-faceted-bg-explorer.webp");
  background-position: center;
  background-size: cover;
}

html:is([data-result-code="INTJ"], [data-result-code="INTP"], [data-result-code="ENTJ"], [data-result-code="ENTP"]) .result-hero__poster,
.result:is([data-result-code="INTJ"], [data-result-code="INTP"], [data-result-code="ENTJ"], [data-result-code="ENTP"]) .result-hero__poster {
  background-image: url("./images/results/result-hero-faceted-bg-analyst.webp");
  background-position: center;
  background-size: cover;
}

html:is([data-result-code="INFJ"], [data-result-code="INFP"], [data-result-code="ENFJ"], [data-result-code="ENFP"]) .result-hero__poster,
.result:is([data-result-code="INFJ"], [data-result-code="INFP"], [data-result-code="ENFJ"], [data-result-code="ENFP"]) .result-hero__poster {
  background-image: url("./images/results/result-hero-faceted-bg-diplomat.webp");
  background-position: center;
  background-size: cover;
}

html:is([data-result-code="ISTJ"], [data-result-code="ISFJ"], [data-result-code="ESTJ"], [data-result-code="ESFJ"]) .result-hero__poster,
.result:is([data-result-code="ISTJ"], [data-result-code="ISFJ"], [data-result-code="ESTJ"], [data-result-code="ESFJ"]) .result-hero__poster {
  background-image: url("./images/results/result-hero-faceted-bg-sentinel.webp");
  background-position: center;
  background-size: cover;
}

.result-hero__brand {
  position: absolute;
  z-index: 4;
  top: 44px;
  left: 44px;
  display: block;
  width: 126px;
  height: auto;
}

.result-code {
  position: absolute;
  z-index: 1;
  top: 230px;
  left: 38px;
  margin: 0;
  color: color-mix(in srgb, var(--type-accent, #e4ae3a) 84%, #111);
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: clamp(10rem, 23vw, 15rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.8;
  -webkit-text-stroke: 10px rgba(255, 253, 247, 0.9);
  paint-order: stroke fill;
}

.result-visual {
  position: absolute;
  z-index: 2;
  top: 94px;
  right: -24px;
  display: block;
  width: 64%;
  height: 82%;
  min-height: 0;
  margin: 0;
  overflow: visible;
  padding: 0;
}

.result-visual img {
  position: absolute;
  inset: auto 0 0 auto;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: right bottom;
}

.result-visual__code {
  display: none;
}

.result-hero__copy {
  position: absolute;
  z-index: 4;
  right: 18%;
  bottom: 34px;
  left: 30px;
  min-block-size: 330px;
  isolation: isolate;
  padding: 58px 150px 50px 58px;
  filter: drop-shadow(12px 14px 0 rgba(58, 42, 10, 0.26));
  clip-path: polygon(0 14%, 54% 9%, 58% 3%, 62% 10%, 88% 0, 82% 15%, 99% 9%, 91% 27%, 96% 34%, 91% 41%, 100% 48%, 93% 54%, 95% 89%, 82% 97%, 16% 100%, 2% 90%, 5% 68%, 0 57%);
  background: #11110f;
}

.result-hero__copy::before {
  position: absolute;
  z-index: -1;
  inset: 14px;
  background: rgba(255, 250, 240, 0.985);
  clip-path: polygon(0 14%, 54% 9%, 58% 3%, 62% 10%, 88% 0, 82% 15%, 99% 9%, 91% 27%, 96% 34%, 91% 41%, 100% 48%, 93% 54%, 95% 89%, 82% 97%, 16% 100%, 2% 90%, 5% 68%, 0 57%);
  content: "";
}

.result h2,
.result-page h1 {
  max-width: 520px;
  margin: 0;
  font-size: clamp(2.35rem, 5.5vw, 4.4rem);
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 1.28;
  word-break: auto-phrase;
}

.result-tagline {
  display: block;
  max-width: 500px;
  margin: 24px 0 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 0;
  box-shadow: none;
  font-size: clamp(1rem, 2.1vw, 1.35rem);
  font-weight: 750;
  line-height: 1.75;
  word-break: auto-phrase;
}

.result-card--summary .lead {
  word-break: auto-phrase;
}

.hero-copy-line {
  display: block;
  white-space: nowrap;
}

.result__content,
.result-page__content {
  width: 100%;
  max-width: none;
}

.result-card,
.share-panel {
  margin: 36px 44px 0;
  border: 1.5px solid color-mix(in srgb, var(--type-accent, #e4ae3a) 76%, #111);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  padding: 34px 38px;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--type-color, #f8e3a2) 52%, transparent);
}

.result-card--summary {
  margin-top: 0;
  border: 0;
  border-radius: 0;
  background: #fffaf0;
  padding: 42px 48px 8px;
  box-shadow: none;
}

.result .lead,
.result-page .lead {
  max-width: 760px;
  margin: 0;
  color: #514d45;
  font-size: 1rem;
  line-height: 2;
}

.result-detail {
  display: block;
  padding-top: 34px;
}

.result-detail__heading {
  display: block;
  width: max-content;
  max-width: calc(100% + 18px);
  margin: -58px 0 20px -26px;
  background: var(--ink);
  color: white;
  padding: 10px 22px;
  transform: rotate(-1.5deg);
}

.result-detail h3,
.result-page .result-detail h2 {
  margin: 0;
  color: white;
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

.trait-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trait-list li {
  display: grid;
  min-height: 76px;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border: 0;
  padding: 10px 4px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.55;
}

.trait-list li + li {
  border-top: 1px solid rgba(69, 59, 42, 0.12);
}

.trait-list li::before,
.trait-list li::marker {
  content: none;
}

.trait-list li i {
  color: color-mix(in srgb, var(--type-accent, #e4ae3a) 86%, #9d6500);
  font-size: 2.45rem;
  text-align: center;
}

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

.compatible-type {
  position: relative;
  display: grid;
  min-height: 156px;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  align-content: start;
  border: 2px solid color-mix(in srgb, var(--type-accent, #e4ae3a) 76%, #111);
  border-radius: 18px;
  background: color-mix(in srgb, var(--type-color, #f8e3a2) 40%, white);
  color: var(--ink);
  padding: 22px;
  text-decoration: none;
  transition: translate 140ms ease, box-shadow 140ms ease;
}

.compatible-type span {
  color: color-mix(in srgb, var(--type-accent, #e4ae3a) 76%, #111);
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 2.35rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.compatible-type strong {
  align-self: end;
  font-size: 0.95rem;
  line-height: 1.55;
}

.compatible-type i {
  font-size: 1.55rem;
}

.compatible-type:hover {
  color: var(--ink);
  translate: 0 -3px;
  box-shadow: 0 8px 0 color-mix(in srgb, var(--type-accent, #e4ae3a) 26%, transparent);
}

.dimension-results {
  gap: 20px;
}

.dimension__track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #ded8cd;
}

.dimension__track span {
  border-radius: inherit;
  background: var(--type-accent, #e4ae3a);
}

.share-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 28px;
  align-items: center;
  border: 0;
  background: var(--ink);
  color: white;
  box-shadow: none;
}

.share-panel .kicker {
  color: var(--type-accent, #e4ae3a);
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 1rem;
}

.share-panel h2,
.share-panel h3 {
  margin: 6px 0 0;
  color: white;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.share-panel p:not(.kicker, .share-status) {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.share-actions .button {
  min-width: 0;
  min-height: 54px;
  flex: 1 1 150px;
  border-radius: 999px;
}

#x-share-button,
#result-page-x {
  order: -2;
  flex-basis: 100%;
  background: #008d8f;
  color: white;
  font-size: 1.15rem;
  text-decoration: none;
}

#native-share-button,
#result-page-share {
  order: -1;
  background: white;
  color: var(--ink);
}

.share-actions .button--primary {
  background: var(--type-accent, #e4ae3a);
  color: var(--ink);
}

.share-status {
  grid-column: 1 / -1;
  color: var(--type-color, #f8e3a2);
}

.result__content > .button--primary {
  width: calc(100% - 88px);
  margin: 22px 44px 0;
  border-radius: 999px;
}

@media (max-width: 700px) {
  .result,
  .result-page {
    width: 100%;
    padding: 0 0 calc(48px + env(safe-area-inset-bottom, 0px));
    box-shadow: none;
  }

  .result-hero__poster {
    min-height: 650px;
  }

  .result-hero__brand {
    top: calc(22px + env(safe-area-inset-top, 0px));
    left: 20px;
    width: 76px;
  }

  .result-code {
    top: calc(132px + env(safe-area-inset-top, 0px));
    left: 16px;
    font-size: clamp(7.2rem, 36vw, 9.2rem);
    -webkit-text-stroke-width: 7px;
  }

  .result-visual {
    top: calc(116px + env(safe-area-inset-top, 0px));
    right: -64px;
    width: 88%;
    height: 64%;
  }

  html:is([data-result-code="ESFJ"], [data-result-code="ISFJ"], [data-result-code="ISTJ"], [data-result-code="ISTP"], [data-result-code="ISFP"], [data-result-code="ESTP"]) .result-visual,
  .result:is([data-result-code="ESFJ"], [data-result-code="ISFJ"], [data-result-code="ISTJ"], [data-result-code="ISTP"], [data-result-code="ISFP"], [data-result-code="ESTP"]) .result-visual {
    right: -14px;
    width: 84%;
  }

  html[data-result-code="ENTJ"] .result-visual,
  .result[data-result-code="ENTJ"] .result-visual {
    right: -18px;
    width: 92%;
  }

  .result-hero__copy {
    right: 16px;
    bottom: 24px;
    left: 16px;
    display: flex;
    min-block-size: 238px;
    flex-direction: column;
    justify-content: center;
    padding: 38px 34px 30px 28px;
    filter: drop-shadow(7px 8px 0 rgba(58, 42, 10, 0.22));
    clip-path: polygon(0 10%, 53% 6%, 58% 0, 63% 7%, 88% 1%, 82% 12%, 100% 7%, 94% 24%, 100% 31%, 94% 39%, 98% 91%, 84% 97%, 13% 100%, 1% 91%, 4% 68%, 0 58%);
  }

  .result-hero__copy::before {
    inset: 6px;
    background: rgba(255, 250, 240, 0.985);
    clip-path: polygon(0 10%, 53% 6%, 58% 0, 63% 7%, 88% 1%, 82% 12%, 100% 7%, 94% 24%, 100% 31%, 94% 39%, 98% 91%, 84% 97%, 13% 100%, 1% 91%, 4% 68%, 0 58%);
  }

  .result h2,
  .result-page h1 {
    max-width: none;
    font-size: clamp(2rem, 8.7vw, 2.2rem);
    letter-spacing: -0.035em;
    line-height: 1.22;
    text-wrap: balance;
    word-break: auto-phrase;
  }

  html[data-result-code="ESTJ"] .result-page h1,
  .result[data-result-code="ESTJ"] h2 {
    font-size: 1.9rem;
  }

  .result-tagline {
    max-width: none;
    margin-top: 10px;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.5;
    text-wrap: pretty;
    word-break: auto-phrase;
  }

  .result-card--summary {
    padding: 32px 22px 4px;
  }

  .result-card,
  .share-panel {
    margin: 34px 16px 0;
    border-radius: 24px;
    padding: 28px 22px;
  }

  .result-card--summary {
    margin: 0;
    border-radius: 0;
  }

  .result-detail__heading {
    margin: -49px 0 16px -10px;
    padding: 9px 16px;
  }

  .result-detail h3,
  .result-page .result-detail h2 {
    font-size: 0.98rem;
  }

  .trait-list li {
    min-height: 68px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
    font-size: 0.91rem;
  }

  .trait-list li i {
    font-size: 2rem;
  }

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

  .compatible-type {
    min-height: 142px;
    padding: 16px 14px;
  }

  .compatible-type span {
    font-size: 1.9rem;
  }

  .compatible-type strong {
    font-size: 0.78rem;
  }

  .share-panel {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .result__content > .button--primary {
    width: calc(100% - 32px);
    margin: 18px 16px 0;
  }
}
