:root {
  --paper: #eee7db;
  --paper-light: #f7f2e9;
  --ink: #25231f;
  --ink-soft: #6d685f;
  --rust: #b94c36;
  --rust-dark: #813b2d;
  --blue: #4f6978;
  --green: #486b59;
  --line: rgba(37, 35, 31, 0.28);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: #071b26;
  background-image:
    linear-gradient(rgba(4, 15, 23, 0.2), rgba(4, 15, 23, 0.48)),
    url("/backgrounds/mystic-tarot-background.webp");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--rust);
  outline-offset: 4px;
}

.landing-page,
.result-page,
.test-shell,
.scan-screen {
  min-height: 100vh;
  overflow-x: hidden;
  background: transparent;
}

.landing-nav,
.result-header,
.test-header {
  height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  padding: 0 clamp(22px, 4vw, 72px);
  background: rgba(247, 242, 233, 0.96);
  position: relative;
  z-index: 20;
}

.wordmark,
.wordmark-button {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.wordmark span,
.wordmark-button span {
  font-family: var(--sans);
  font-size: 8px;
  vertical-align: top;
  margin-left: 2px;
}

.wordmark-button,
.quiet-button,
.nav-cta,
.site-footer button,
.modal-close {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.wordmark-button {
  justify-self: start;
  padding: 0;
}

.nav-center,
.result-header > div {
  font-size: 10px;
  letter-spacing: 0.18em;
}

.nav-cta,
.quiet-button {
  justify-self: end;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 0;
  border-bottom: 1px solid var(--ink);
}

.landing-hero {
  min-height: calc(100vh - 76px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  align-items: center;
  padding: clamp(70px, 8vw, 118px) clamp(24px, 7vw, 112px);
  background: rgba(238, 231, 219, 0.91);
  border-bottom: 1px solid var(--ink);
}

.hero-grid,
.scan-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(37, 35, 31, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 35, 31, 0.055) 1px, transparent 1px);
  background-size: 84px 84px;
  mask-image: linear-gradient(90deg, #000, transparent 75%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.eyebrow.rust,
.rust {
  color: var(--rust);
}

.landing-hero h1 {
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(58px, 7vw, 112px);
  line-height: 0.93;
  letter-spacing: -0.07em;
  margin: 0;
}

.landing-hero h1 span {
  display: block;
  color: var(--rust);
}

.hero-description {
  margin: 34px 0 0;
  max-width: 660px;
  font-family: var(--serif);
  font-size: clamp(17px, 1.5vw, 23px);
  line-height: 1.75;
}

.hero-actions,
.share-actions,
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 38px;
}

.hero-actions {
  /* Reserve room for the offset frame so Safari/embedded browsers do not crop its right edge. */
  padding: 0 8px 8px 0;
  overflow: visible;
}

.hero-actions > button {
  min-width: 0;
  max-width: 100%;
}

.primary-button,
.outline-button,
.back-button {
  min-height: 56px;
  border: 1px solid var(--ink);
  padding: 0 24px;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.primary-button {
  background: var(--ink);
  color: var(--paper-light);
  box-shadow: 6px 6px 0 var(--rust);
}

.primary-button:hover:not(:disabled),
.outline-button:hover:not(:disabled) {
  transform: translate(-2px, -2px);
}

.primary-button:disabled,
.outline-button:disabled,
.back-button:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.primary-button.compact {
  min-height: 50px;
  box-shadow: 4px 4px 0 var(--rust);
}

.primary-button.inverse {
  background: var(--paper-light);
  color: var(--ink);
  box-shadow: 6px 6px 0 var(--rust);
}

.outline-button,
.back-button {
  background: transparent;
}

.outline-button.light {
  border-color: var(--paper-light);
  color: var(--paper-light);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 52px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 680px;
  font-size: 12px;
  color: var(--ink-soft);
}

.hero-meta strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  margin-right: 4px;
}

.hero-art {
  width: min(590px, 44vw);
  aspect-ratio: 1.04;
  position: relative;
  justify-self: end;
  z-index: 2;
  margin-right: clamp(0px, 2vw, 32px);
}

.personality-fan {
  display: grid;
  place-items: center;
  isolation: isolate;
}

.fan-halo {
  position: absolute;
  inset: 8% 2% 1%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 56%, rgba(247, 242, 233, 0.94) 0 29%, transparent 68%),
    radial-gradient(circle at 50% 60%, rgba(190, 74, 49, 0.22), transparent 62%);
  filter: blur(2px);
}

.fan-kicker,
.fan-note {
  position: absolute;
  z-index: 40;
  margin: 0;
  letter-spacing: 0.18em;
  text-align: center;
}

.fan-kicker {
  top: 1%;
  font-size: 10px;
  font-weight: 800;
  color: var(--rust);
}

.fan-deck {
  position: absolute;
  inset: 6% 0 10%;
}

.personality-fan-slot {
  position: absolute;
  left: 50%;
  bottom: 5%;
  width: 34%;
  aspect-ratio: 0.6;
  z-index: var(--fan-z);
  transform-origin: 50% 100%;
  transform: translateX(calc(-50% + var(--fan-x))) translateY(var(--fan-y)) rotate(var(--fan-r));
}

.personality-fan-card {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border: 2px solid rgba(247, 242, 233, 0.96);
  background: #201d19;
  box-shadow:
    0 1px 0 rgba(37, 35, 31, 0.55),
    7px 9px 18px rgba(16, 18, 18, 0.26);
}

.personality-fan-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.personality-fan-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 58%, rgba(16, 18, 18, 0.9));
}

.personality-fan-card figcaption {
  position: absolute;
  z-index: 2;
  left: 8px;
  right: 7px;
  bottom: 8px;
  display: grid;
  gap: 1px;
  color: var(--paper-light);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.personality-fan-card figcaption span {
  color: #e89a71;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.personality-fan-card figcaption strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: clamp(9px, 0.85vw, 13px);
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.fan-note {
  right: 3%;
  bottom: 0;
  padding: 10px 14px;
  border: 1px solid rgba(37, 35, 31, 0.7);
  background: rgba(247, 242, 233, 0.9);
  box-shadow: 5px 5px 0 var(--rust);
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
}

.fan-note span {
  margin-right: 4px;
  color: var(--rust);
  font-family: var(--serif);
  font-size: 22px;
  line-height: 0;
}

.specimen-card {
  position: absolute;
  inset: 5% 7% 4% 10%;
  border: 1px solid var(--ink);
  background: #f4eee4;
}

.card-back-two {
  transform: rotate(-8deg) translate(-26px, 8px);
  background: var(--blue);
  color: white;
}

.card-back-one {
  transform: rotate(5deg) translate(32px, -2px);
  background: var(--rust);
  color: white;
}

.card-back-one span,
.card-back-two span {
  display: block;
  padding: 18px;
  font-size: 9px;
  letter-spacing: 0.2em;
}

.main-specimen {
  padding: clamp(22px, 3vw, 40px);
  box-shadow: 18px 20px 0 rgba(37, 35, 31, 0.16);
}

.specimen-top {
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.main-specimen > p {
  margin: 42px 0 10px;
  color: var(--rust);
  font-size: 12px;
  font-weight: 700;
}

.main-specimen h2 {
  font-family: var(--serif);
  font-size: clamp(58px, 7vw, 92px);
  line-height: 0.9;
  letter-spacing: -0.08em;
  margin: 0;
}

.mini-tags {
  display: flex;
  gap: 8px;
  margin-top: 22px;
}

.mini-tags span {
  border: 1px solid var(--ink);
  padding: 5px 8px;
  font-size: 9px;
}

.specimen-meter {
  display: flex;
  align-items: end;
  gap: 12px;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.specimen-meter span {
  font-size: 11px;
  margin-bottom: 11px;
}

.specimen-meter strong {
  color: var(--rust);
  font-family: var(--serif);
  font-size: 66px;
  line-height: 0.9;
}

.specimen-warning {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--ink);
  color: white;
  padding: 15px clamp(22px, 3vw, 40px);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.round-stamp,
.result-stamp {
  position: absolute;
  display: grid;
  place-items: center;
  width: 105px;
  aspect-ratio: 1;
  border: 2px solid var(--rust);
  color: var(--rust);
  border-radius: 50%;
  right: -10px;
  bottom: 10px;
  transform: rotate(-12deg);
  font-size: 10px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  background: var(--paper);
}

.manifesto-strip {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(18px, 4vw, 64px);
  padding: 22px;
  background: var(--ink);
  color: var(--paper-light);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
}

.manifesto-strip i {
  color: var(--rust);
  font-size: 18px;
  font-style: normal;
}

.how-section,
.sample-section,
.final-cta-section {
  padding: clamp(80px, 10vw, 150px) clamp(24px, 8vw, 130px);
}

.how-section,
.final-cta-section,
.site-footer:not(.dark-footer) {
  background: rgba(247, 242, 233, 0.92);
}

.section-heading {
  display: grid;
  grid-template-columns: 0.4fr 1fr;
  gap: 30px;
  align-items: start;
  margin-bottom: 64px;
}

.section-heading h2,
.sample-copy h2,
.final-cta-section h2,
.share-copy > h2 {
  font-family: var(--serif);
  font-size: clamp(42px, 5vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.055em;
  margin: 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.steps-grid article {
  min-height: 330px;
  padding: 34px clamp(24px, 3vw, 48px);
  border-right: 1px solid var(--ink);
}

.steps-grid article:last-child {
  border-right: 0;
}

.steps-grid article > span {
  display: block;
  color: var(--rust);
  font-family: var(--serif);
  font-size: 46px;
  margin-bottom: 80px;
}

.steps-grid h3 {
  font-family: var(--serif);
  font-size: 30px;
  margin: 0 0 16px;
}

.steps-grid p,
.sample-copy > p,
.share-copy > p {
  color: var(--ink-soft);
  line-height: 1.8;
  font-size: 15px;
}

.sample-section {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: clamp(50px, 9vw, 150px);
  align-items: center;
  background: rgba(18, 42, 53, 0.94);
  color: var(--paper-light);
}

.sample-copy {
  max-width: 520px;
}

.sample-copy > p {
  color: rgba(255, 255, 255, 0.72);
  margin: 28px 0;
}

.sample-manual-card {
  background: var(--paper-light);
  color: var(--ink);
  border: 1px solid var(--ink);
  box-shadow: 18px 18px 0 rgba(0, 0, 0, 0.24);
  padding: clamp(28px, 5vw, 64px);
  transform: rotate(1.2deg);
}

.sample-card-head {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 16px;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.sample-manual-card h3 {
  margin: 36px 0 10px;
  font-family: var(--serif);
  font-size: clamp(56px, 7vw, 98px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.sample-tagline {
  color: var(--rust);
  font-family: var(--serif);
  font-size: 20px;
  margin-bottom: 34px;
}

.sample-manual-card dl {
  margin: 0;
  border-top: 1px solid var(--ink);
}

.sample-manual-card dl div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.sample-manual-card dt {
  color: var(--ink-soft);
  font-size: 12px;
}

.sample-manual-card dd {
  margin: 0;
  line-height: 1.6;
}

.sample-warning {
  margin: 28px -64px -64px;
  padding: 18px 64px;
  background: var(--rust);
  color: white;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.final-cta-section {
  text-align: center;
  background: rgba(238, 231, 219, 0.92);
}

.final-cta-section h2 {
  margin: 0 auto 38px;
  max-width: 900px;
}

.final-cta-section > p:last-child {
  color: var(--ink-soft);
  font-size: 12px;
  margin-top: 24px;
}

.site-footer {
  min-height: 106px;
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 30px;
  align-items: center;
  padding: 30px clamp(24px, 5vw, 80px);
  border-top: 1px solid var(--ink);
  font-size: 11px;
}

.site-footer > span {
  font-family: var(--serif);
  font-weight: 800;
}

.site-footer p {
  text-align: center;
  color: var(--ink-soft);
}

.site-footer nav {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
}

.site-footer button {
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Test */
.test-shell {
  background: rgba(9, 28, 39, 0.52);
}

.test-header {
  position: sticky;
  top: 0;
}

.progress-readout {
  font-family: var(--serif);
  font-size: 18px;
}

.progress-readout > span:first-child {
  color: var(--rust);
  font-size: 28px;
  font-weight: 800;
}

.progress-divider {
  margin: 0 6px;
  color: var(--ink-soft);
}

.progress-track {
  height: 4px;
  background: rgba(37, 35, 31, 0.12);
  position: sticky;
  top: 76px;
  z-index: 21;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--rust);
  transition: width 300ms ease;
}

.question-panel {
  width: min(940px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(54px, 7vw, 100px) 0 70px;
  animation: question-in 280ms ease both;
  margin-top: clamp(24px, 5vw, 64px);
  margin-bottom: clamp(24px, 5vw, 64px);
  padding: clamp(44px, 6vw, 80px) clamp(22px, 4vw, 54px) 58px;
  border: 1px solid rgba(200, 162, 88, 0.34);
  background: rgba(247, 242, 233, 0.93);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

@keyframes question-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.question-kicker {
  display: flex;
  justify-content: space-between;
  color: var(--rust);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 14px;
}

.question-panel h1 {
  font-family: var(--serif);
  font-size: clamp(37px, 5vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 36px 0 24px;
}

.question-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(164px, 20vw, 230px);
  gap: clamp(24px, 4vw, 52px);
  align-items: center;
  margin: 32px 0 24px;
}

.question-title-row h1 {
  margin: 0;
}

.scene-icon {
  width: 100%;
  aspect-ratio: 23 / 20;
  margin: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--ink);
  box-shadow: 7px 7px 0 var(--rust);
  isolation: isolate;
}

.scene-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.2, 0.75, 0.2, 1), filter 400ms ease;
  animation: scene-painting-in 700ms ease both;
}

.scene-icon:hover img {
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.03);
}

.scene-icon figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 10px 8px;
  background: linear-gradient(transparent, rgba(18, 24, 26, 0.82));
  color: var(--paper-light);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.scene-icon figcaption span {
  color: #efb55d;
  font-family: var(--serif);
  font-size: 12px;
}

@keyframes scene-painting-in {
  from { opacity: 0; transform: scale(1.07); filter: saturate(0.55); }
  to { opacity: 1; transform: scale(1); filter: saturate(1); }
}

.scenario-copy {
  font-family: var(--serif);
  font-size: clamp(17px, 1.65vw, 23px);
  line-height: 1.75;
  margin: 0 0 40px;
  max-width: 880px;
}

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

.option-card {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr 26px;
  gap: 16px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  padding: 20px 22px;
  cursor: pointer;
  min-height: 76px;
  line-height: 1.6;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.option-card:hover {
  border-color: var(--ink);
  transform: translateX(3px);
}

.option-card.selected {
  border-color: var(--rust);
  background: rgba(185, 76, 54, 0.08);
  box-shadow: inset 5px 0 0 var(--rust);
}

.option-key {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 800;
}

.option-check {
  color: var(--rust);
  font-size: 20px;
  text-align: right;
}

.question-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
}

.back-button {
  border: 0;
  padding: 0;
}

.auto-advance-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.keyboard-hint {
  text-align: right;
  color: var(--ink-soft);
  font-size: 11px;
  margin-top: 14px;
}

.milestone-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 40;
  background: var(--ink);
  color: var(--paper-light);
  border: 1px solid var(--paper-light);
  box-shadow: 10px 10px 0 var(--rust);
  padding: 22px 32px;
  font-family: var(--serif);
  font-size: 24px;
  animation: toast 1.4s ease both;
}

@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, -45%); }
  18%, 78% { opacity: 1; transform: translate(-50%, -50%); }
  100% { opacity: 0; transform: translate(-50%, -55%); }
}

/* Scan */
.scan-screen {
  display: grid;
  place-items: center;
  position: relative;
  background: rgba(6, 20, 29, 0.84);
  color: var(--paper-light);
}

.scan-grid {
  background-image:
    linear-gradient(rgba(247, 242, 233, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 242, 233, 0.05) 1px, transparent 1px);
  mask-image: none;
}

.scan-content {
  width: min(760px, calc(100% - 42px));
  position: relative;
  z-index: 2;
  text-align: center;
}

.scan-mark {
  width: 86px;
  aspect-ratio: 1;
  border: 1px solid var(--rust);
  color: var(--rust);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 38px;
  font-family: var(--serif);
  font-weight: 800;
  animation: scan-pulse 1.3s ease-in-out infinite;
}

@keyframes scan-pulse {
  50% { transform: scale(1.08); box-shadow: 0 0 0 18px rgba(185, 76, 54, 0.08); }
}

.scan-content > p:first-of-type,
.scan-note {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(247, 242, 233, 0.6);
}

.scan-content h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1;
  margin: 22px 0 48px;
}

.scan-status {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(247, 242, 233, 0.65);
}

.scan-line {
  height: 2px;
  margin: 14px 0 24px;
  background: rgba(247, 242, 233, 0.15);
  overflow: hidden;
}

.scan-line span {
  display: block;
  height: 100%;
  background: var(--rust);
  animation: scan-progress 2.6s ease forwards;
}

@keyframes scan-progress {
  from { width: 0; }
  to { width: 100%; }
}

/* Result */
.result-page {
  background: transparent;
}

.result-header {
  position: absolute;
  left: 0;
  right: 0;
  background: transparent;
  border-color: rgba(247, 242, 233, 0.4);
  color: var(--paper-light);
}

.result-header .quiet-button {
  color: var(--paper-light);
  border-color: var(--paper-light);
}

.report-rail {
  position: fixed;
  z-index: 15;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  gap: 8px;
  mix-blend-mode: difference;
}

.report-rail a {
  color: white;
  text-decoration: none;
  font-size: 9px;
  letter-spacing: 0.08em;
  display: flex;
  gap: 8px;
  opacity: 0.7;
}

.report-rail a:hover {
  opacity: 1;
}

.report-rail span {
  font-family: var(--serif);
}

.result-hero {
  min-height: 1180px;
  background: rgba(14, 20, 24, 0.93);
  color: var(--paper-light);
  position: relative;
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: center;
  gap: 30px;
  place-items: center;
  padding: 130px 24px 100px;
  text-align: center;
}

.result-hero::before,
.result-hero::after {
  content: "";
  position: absolute;
  top: 76px;
  bottom: 0;
  width: 1px;
  background: rgba(247, 242, 233, 0.13);
}

.result-hero::before { left: 15%; }
.result-hero::after { right: 15%; }

.result-serial {
  position: absolute;
  left: clamp(24px, 7vw, 112px);
  top: 122px;
  text-align: left;
  display: grid;
  gap: 8px;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.result-serial strong {
  color: var(--rust);
  font-size: 15px;
}

.result-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 1000px;
}

.personality-portrait {
  width: min(340px, 68vw);
  aspect-ratio: 3 / 5;
  margin: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(247, 242, 233, 0.68);
  background: #b8a68d;
  color: var(--paper-light);
  box-shadow: 12px 12px 0 var(--rust);
  animation: portrait-arrive 680ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.personality-portrait::after {
  content: "";
  position: absolute;
  inset: 42% 0 0;
  z-index: 1;
  background: linear-gradient(to bottom, transparent, rgba(24, 22, 18, 0.9));
  pointer-events: none;
}

.personality-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 300ms ease;
}

.personality-portrait:hover img {
  transform: scale(1.025);
  filter: saturate(1) contrast(1.04);
}

.personality-portrait figcaption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 4px 10px;
  text-align: left;
  color: var(--paper-light);
}

.personality-portrait figcaption span {
  color: #e9a77e;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.16em;
}

.personality-portrait figcaption strong {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.1;
}

.personality-portrait figcaption small {
  grid-column: 1 / -1;
  color: rgba(247, 242, 233, 0.76);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.rarity-panel {
  width: min(680px, calc(100vw - 48px));
  margin: 34px auto 0;
  padding: 18px 20px 15px;
  border: 1px solid rgba(247, 242, 233, 0.46);
  background: rgba(247, 242, 233, 0.045);
  text-align: left;
}

.rarity-panel > span {
  display: block;
  color: var(--rust);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.rarity-panel > strong {
  display: block;
  margin-top: 10px;
  color: var(--paper-light);
  font-family: var(--serif);
  font-size: clamp(27px, 3.2vw, 42px);
  line-height: 1.25;
}

.rarity-panel > p {
  margin: 8px 0 0;
  color: rgba(247, 242, 233, 0.7);
  font-size: 12px;
}

.rarity-panel small {
  display: block;
  margin-top: 9px;
  color: rgba(247, 242, 233, 0.48);
  font-size: 9px;
  line-height: 1.5;
}

@keyframes portrait-arrive { from { opacity: 0; transform: translateY(20px) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes rarity-fill { from { transform: scaleX(0); transform-origin: left; } to { transform: scaleX(1); transform-origin: left; } }

.result-hero-copy h1 {
  font-family: var(--serif);
  font-size: clamp(76px, 12vw, 170px);
  line-height: 0.9;
  letter-spacing: -0.08em;
  margin: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.tag-row span {
  border: 1px solid rgba(247, 242, 233, 0.5);
  padding: 8px 12px;
  font-size: 11px;
}

.result-tagline {
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1.7;
  color: rgba(247, 242, 233, 0.72);
  max-width: 720px;
  margin: 34px auto 0;
}

.result-stamp {
  right: clamp(24px, 8vw, 130px);
  top: 150px;
  bottom: auto;
  background: transparent;
  width: 120px;
}

.result-stamp strong {
  font-family: var(--serif);
  font-size: 24px;
}

.scroll-cue {
  position: absolute;
  bottom: 32px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: rgba(247, 242, 233, 0.55);
}

.report-section {
  padding: clamp(80px, 10vw, 150px) clamp(24px, 10vw, 160px);
  scroll-margin-top: 20px;
}

.section-label {
  display: grid;
  grid-template-columns: 78px auto 1fr;
  gap: 20px;
  align-items: center;
  margin-bottom: 54px;
}

.section-label span {
  color: var(--rust);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 800;
}

.section-label h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(31px, 4vw, 50px);
  letter-spacing: -0.04em;
}

.section-label i {
  height: 1px;
  background: var(--ink);
}

.section-label.light h2,
.section-label.light span {
  color: var(--paper-light);
}

.section-label.light i {
  background: rgba(247, 242, 233, 0.5);
}

.persona-compare {
  background: rgba(238, 231, 219, 0.94);
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 70px 1fr;
  align-items: stretch;
}

.compare-grid article {
  border: 1px solid var(--ink);
  padding: clamp(30px, 5vw, 70px);
  min-height: 450px;
  display: flex;
  flex-direction: column;
}

.compare-grid article > p:first-child {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--rust);
}

.compare-grid h2 {
  font-family: var(--serif);
  font-size: clamp(46px, 6vw, 78px);
  line-height: 1;
  letter-spacing: -0.06em;
  margin: 28px 0;
}

.compare-grid article > p:nth-of-type(2) {
  line-height: 1.9;
  color: var(--ink-soft);
}

.compare-grid blockquote {
  margin: auto 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
}

.compare-grid .dark-card {
  background: var(--ink);
  color: var(--paper-light);
}

.compare-grid .dark-card > p:nth-of-type(2) {
  color: rgba(247, 242, 233, 0.7);
}

.compare-grid .dark-card blockquote {
  border-color: rgba(247, 242, 233, 0.2);
}

.compare-vs {
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 22px;
}

.permission-note {
  text-align: center;
  color: var(--rust);
  font-family: var(--serif);
  font-size: 21px;
  margin: 48px 0 0;
}

.contrast-section {
  background: rgba(129, 59, 45, 0.95);
  color: var(--paper-light);
}

.contrast-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: center;
}

.contrast-number {
  display: flex;
  align-items: end;
}

.contrast-number strong {
  font-family: var(--serif);
  font-size: clamp(150px, 20vw, 280px);
  line-height: 0.72;
  letter-spacing: -0.09em;
}

.contrast-number span {
  margin: 0 0 8px 22px;
  font-size: 14px;
}

.contrast-layout h2 {
  font-family: var(--serif);
  font-size: clamp(46px, 6vw, 78px);
  margin: 0;
  letter-spacing: -0.05em;
}

.contrast-scale {
  height: 7px;
  background: rgba(247, 242, 233, 0.25);
  margin-top: 36px;
}

.contrast-scale span {
  display: block;
  height: 100%;
  background: var(--paper-light);
}

.strongest-card {
  border-top: 1px solid rgba(247, 242, 233, 0.55);
  margin-top: 70px;
  padding-top: 32px;
  display: grid;
  grid-template-columns: 0.55fr 0.7fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.strongest-card > p:first-child {
  font-size: 11px;
  letter-spacing: 0.12em;
}

.strongest-card h3 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 47px);
  margin: 0;
  line-height: 1.1;
}

.strongest-card > p:last-child {
  margin: 0;
  font-size: 17px;
  line-height: 1.8;
}

.metrics-section {
  background: rgba(247, 242, 233, 0.94);
}

.section-intro {
  color: var(--ink-soft);
  margin: -24px 0 44px 98px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.metric-card {
  min-height: 260px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-content: space-between;
}

.metric-card > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.metric-card > div:first-child > span {
  color: var(--rust);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 800;
}

.metric-card p {
  margin: 0;
  font-size: 13px;
}

.metric-card > strong {
  font-family: var(--serif);
  font-size: 58px;
  line-height: 1;
}

.metric-track {
  grid-column: 1 / -1;
  height: 5px;
  background: rgba(37, 35, 31, 0.14);
}

.metric-track span {
  display: block;
  height: 100%;
  background: var(--rust);
}

.metric-card small {
  grid-column: 1 / -1;
  color: var(--ink-soft);
}

.manual-section {
  background: rgba(238, 231, 219, 0.94);
}

.manual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.manual-card {
  min-height: 330px;
  border: 1px solid var(--ink);
  padding: clamp(28px, 4vw, 52px);
  display: flex;
  flex-direction: column;
}

.manual-number {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--rust);
  margin: 0;
}

.manual-card h2 {
  font-family: var(--serif);
  font-size: clamp(39px, 5vw, 62px);
  margin: 30px 0;
  letter-spacing: -0.05em;
}

.manual-card > p:last-child,
.manual-card li {
  font-size: 16px;
  line-height: 1.8;
}

.manual-card ul {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  border-top: 1px solid var(--line);
}

.manual-card li {
  border-bottom: 1px solid var(--line);
  padding: 12px 0 12px 24px;
  position: relative;
}

.manual-card li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--rust);
}

.feature-card {
  background: var(--green);
  color: var(--paper-light);
}

.feature-card .manual-number,
.warning-card .manual-number {
  color: var(--paper-light);
}

.feature-card > p:last-child {
  margin: auto 0 0;
  font-family: var(--serif);
  font-size: 24px;
}

.warning-card {
  background: var(--rust);
  color: var(--paper-light);
}

.warning-card ul,
.warning-card li {
  border-color: rgba(247, 242, 233, 0.3);
}

.warning-card li::before {
  color: var(--paper-light);
}

.recharge-card {
  grid-column: 1 / -1;
  min-height: 260px;
}

.recharge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}

.recharge-tags span {
  border: 1px solid var(--ink);
  padding: 13px 16px;
  font-family: var(--serif);
  font-size: 18px;
}

.relationship-section {
  background: rgba(247, 242, 233, 0.94);
}

.timeline {
  margin-left: 98px;
  border-top: 1px solid var(--ink);
}

.timeline article {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 30px;
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
}

.timeline article > span {
  color: var(--rust);
  font-family: var(--serif);
  font-size: 30px;
}

.timeline h3 {
  font-family: var(--serif);
  font-size: 26px;
  margin: 0 0 10px;
}

.timeline p {
  margin: 0;
  line-height: 1.8;
  color: var(--ink-soft);
}

.closing-note {
  margin: 90px 0 0 98px;
  background: var(--ink);
  color: var(--paper-light);
  padding: clamp(32px, 6vw, 80px);
}

.closing-note > p {
  color: var(--rust);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.closing-note blockquote {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 40px);
  line-height: 1.65;
  margin: 28px 0 0;
}

.share-section {
  background: rgba(18, 42, 53, 0.95);
  color: var(--paper-light);
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(50px, 8vw, 120px);
  align-items: center;
  padding: clamp(80px, 10vw, 150px) clamp(24px, 10vw, 160px);
}

.share-copy > p {
  color: rgba(247, 242, 233, 0.7);
  margin-top: 28px;
}

.personality-card {
  width: min(560px, 100%);
  aspect-ratio: 3 / 4;
  justify-self: end;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  border-left: 12px solid var(--rust);
  box-shadow: 18px 18px 0 rgba(0, 0, 0, 0.22);
  padding: clamp(28px, 4vw, 52px);
  display: flex;
  flex-direction: column;
}

.pc-top {
  display: flex;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--ink);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.personality-card > p:first-of-type {
  color: var(--rust);
  font-size: 11px;
  font-weight: 700;
  margin: 34px 0 10px;
}

.personality-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(56px, 7vw, 94px);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.pc-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 20px 0;
}

.pc-tags span {
  border: 1px solid var(--ink);
  padding: 4px 7px;
  font-size: 9px;
}

.pc-tagline {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
  margin: 0 0 22px;
}

.pc-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  align-items: center;
}

.pc-compare div {
  display: grid;
  gap: 4px;
}

.pc-compare span {
  color: var(--ink-soft);
  font-size: 9px;
}

.pc-compare strong {
  font-family: var(--serif);
}

.pc-compare i {
  font-style: normal;
  font-size: 9px;
}

.pc-score {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 18px 0 0;
}

.pc-score > strong {
  color: var(--rust);
  font-family: var(--serif);
  font-size: 70px;
  line-height: 0.9;
}

.pc-score > div {
  display: grid;
  gap: 5px;
  font-size: 10px;
}

.personality-card blockquote {
  margin: auto 0 16px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.5;
}

.personality-card small {
  border-top: 1px solid var(--ink);
  padding-top: 11px;
  color: var(--ink-soft);
  font-size: 8px;
}

.dark-footer {
  background: rgba(18, 20, 21, 0.96);
  color: var(--paper-light);
  border-color: rgba(247, 242, 233, 0.35);
}

.dark-footer p {
  color: rgba(247, 242, 233, 0.55);
}

/* Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 19, 17, 0.74);
  display: grid;
  place-items: center;
  padding: 20px;
}

.dialog {
  width: min(540px, 100%);
  background: var(--paper-light);
  border: 1px solid var(--ink);
  box-shadow: 12px 12px 0 var(--rust);
  padding: clamp(28px, 5vw, 54px);
  position: relative;
}

.dialog h2 {
  font-family: var(--serif);
  font-size: 42px;
  line-height: 1.05;
  margin: 0 0 20px;
}

.dialog > p:not(.eyebrow) {
  color: var(--ink-soft);
  line-height: 1.75;
}

.dialog-actions {
  justify-content: flex-end;
}

.legal-dialog {
  width: min(680px, 100%);
}

.modal-close {
  position: absolute;
  right: 20px;
  top: 14px;
  font-family: var(--serif);
  font-size: 34px;
}

@media (max-width: 980px) {
  .landing-hero {
    grid-template-columns: 1fr;
    padding-bottom: 90px;
  }

  .hero-art {
    width: min(590px, 88vw);
    justify-self: center;
    margin: 80px 0 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .sample-section,
  .share-section {
    grid-template-columns: 1fr;
  }

  .sample-copy,
  .share-copy {
    max-width: 720px;
  }

  .sample-manual-card,
  .personality-card {
    justify-self: center;
    width: min(650px, 100%);
  }

  .contrast-layout {
    grid-template-columns: 1fr;
  }

  .strongest-card {
    grid-template-columns: 1fr 1fr;
  }

  .strongest-card > p:last-child {
    grid-column: 1 / -1;
  }

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

  .report-rail {
    display: none;
  }
}

@media (max-width: 720px) {
  .landing-nav,
  .result-header,
  .test-header {
    height: 64px;
    padding: 0 18px;
  }

  .nav-center,
  .result-header > div {
    display: none;
  }

  .landing-nav,
  .result-header,
  .test-header {
    grid-template-columns: 1fr auto;
  }

  .progress-readout {
    display: none;
  }

  .progress-track {
    top: 64px;
  }

  .landing-hero {
    min-height: auto;
    padding: 62px 20px 78px;
  }

  .landing-hero h1 {
    font-size: clamp(53px, 15.2vw, 78px);
  }

  .hero-description br {
    display: none;
  }

  .hero-actions,
  .share-actions,
  .dialog-actions {
    display: grid;
  }

  .hero-actions {
    grid-template-columns: minmax(0, 1fr);
    padding-right: 8px;
  }

  .primary-button,
  .outline-button {
    width: 100%;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-art {
    width: min(500px, 96vw);
    margin-top: 64px;
  }

  .personality-fan-slot {
    width: 36%;
  }

  .fan-note {
    right: 8%;
  }

  .round-stamp {
    width: 78px;
    right: 0;
  }

  .manifesto-strip {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .manifesto-strip i {
    transform: rotate(45deg);
  }

  .how-section,
  .sample-section,
  .final-cta-section,
  .report-section,
  .share-section {
    padding: 72px 20px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid article {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .steps-grid article:last-child {
    border-bottom: 0;
  }

  .steps-grid article > span {
    margin-bottom: 36px;
  }

  .sample-manual-card {
    padding: 28px;
    transform: none;
  }

  .sample-manual-card dl div {
    grid-template-columns: 86px 1fr;
  }

  .sample-warning {
    margin: 28px -28px -28px;
    padding: 18px 28px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-footer p {
    margin: 0;
  }

  .site-footer nav {
    justify-content: center;
  }

  .question-panel {
    width: min(100% - 32px, 940px);
    padding-top: 42px;
  }

  .question-panel h1 {
    font-size: 39px;
  }

  .question-title-row {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 14px;
    align-items: center;
  }

  .scene-icon {
    width: 112px;
    height: auto;
    box-shadow: 4px 4px 0 var(--rust);
  }

  .scene-icon figcaption { display: none; }

  .scenario-copy {
    font-size: 17px;
    line-height: 1.75;
  }

  .option-card {
    grid-template-columns: 34px 1fr 20px;
    gap: 10px;
    padding: 17px 14px;
    min-height: 74px;
    font-size: 14px;
  }

  .option-key {
    font-size: 22px;
  }

  .question-actions { align-items: center; }
  .auto-advance-hint { text-align: right; }

  .keyboard-hint {
    display: none;
  }

  .result-hero {
    min-height: 1160px;
    padding-inline: 20px;
    gap: 24px;
  }

  .result-hero::before,
  .result-hero::after {
    display: none;
  }

  .result-serial {
    top: 98px;
    left: 20px;
  }

  .result-stamp {
    width: 88px;
    top: 110px;
    right: 20px;
  }

  .result-hero-copy h1 {
    font-size: clamp(68px, 21vw, 108px);
  }

  .personality-portrait {
    width: min(310px, calc(100vw - 72px));
  }

  .personality-portrait figcaption {
    left: 16px;
    right: 16px;
    bottom: 14px;
  }

  .rarity-panel {
    width: calc(100vw - 42px);
    padding: 16px;
  }

  .section-label {
    grid-template-columns: 54px auto 1fr;
    gap: 12px;
    margin-bottom: 40px;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .compare-grid article {
    min-height: 390px;
  }

  .compare-vs {
    min-height: 70px;
  }

  .contrast-number strong {
    font-size: 44vw;
  }

  .strongest-card {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .strongest-card > p:last-child {
    grid-column: auto;
  }

  .section-intro {
    margin: -18px 0 36px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 220px;
  }

  .manual-grid {
    grid-template-columns: 1fr;
  }

  .recharge-card {
    grid-column: auto;
  }

  .timeline,
  .closing-note {
    margin-left: 0;
  }

  .timeline article {
    grid-template-columns: 60px 1fr;
    gap: 14px;
  }

  .closing-note {
    margin-top: 60px;
  }

  .personality-card {
    aspect-ratio: auto;
    min-height: 710px;
    padding: 28px;
  }

  .personality-card h3 {
    font-size: 70px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
