/* ==========================================================================
   PokéSoul · 宝可梦灵魂共鸣
   A warm editorial interface built around a single resonance idea.
   ========================================================================== */

:root {
  --paper: #f4f1e8;
  --paper-deep: #ece7da;
  --paper-light: #fbf8f0;
  --ink: #171814;
  --ink-soft: #30312b;
  --muted: #767467;
  --muted-deep: #5b5a50;
  --red: #d9483b;
  --red-deep: #a82f26;
  --green: #5c7652;
  --line: rgba(23, 24, 20, 0.14);
  --line-strong: rgba(23, 24, 20, 0.28);
  --cream-line: rgba(244, 241, 232, 0.2);
  --font-sans: "Avenir Next", "Helvetica Neue", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Iowan Old Style", "Baskerville", "Palatino Linotype", "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-mono: "SFMono-Regular", "Cascadia Mono", "Roboto Mono", "Liberation Mono", Consolas, monospace;
  --gutter: clamp(22px, 4.4vw, 76px);
  --container: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: var(--red);
  color: var(--paper);
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

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

p,
h1,
h2,
h3,
h4,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.page-gutter {
  width: min(100%, calc(var(--container) + var(--gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --------------------------------------------------------------------------
   Type & utility
   -------------------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow-line {
  display: inline-block;
  width: 30px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.eyebrow-invert {
  color: rgba(244, 241, 232, 0.55);
}

.button {
  --button-bg: var(--ink);
  --button-fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 56px;
  padding: 0 20px 0 26px;
  border: 1px solid var(--button-bg);
  border-radius: 999px;
  background: var(--button-bg);
  color: var(--button-fg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease), transform 0.35s var(--ease);
}

.button:hover {
  transform: translateY(-2px);
}

.button-arrow {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  transition: transform 0.35s var(--ease), background-color 0.35s var(--ease);
}

.button:hover .button-arrow {
  transform: rotate(45deg);
}

.button-primary {
  --button-bg: var(--ink);
  --button-fg: var(--paper);
  min-height: 62px;
  padding-left: 30px;
  padding-right: 22px;
}

.button-primary:hover {
  --button-bg: var(--red);
}

.button-ink {
  --button-bg: var(--ink);
  --button-fg: var(--paper);
}

.button-ink:hover {
  --button-bg: var(--red);
}

.button-compact {
  min-height: 42px;
  padding-left: 18px;
  padding-right: 10px;
  gap: 12px;
  font-size: 12px;
}

.button-compact .button-arrow {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.button-outline {
  --button-bg: transparent;
  --button-fg: var(--ink);
  border-color: var(--line-strong);
}

.button-outline:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.button-ghost-cream {
  --button-bg: transparent;
  --button-fg: var(--paper);
  border-color: var(--cream-line);
}

.button-ghost-cream:hover {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0 8px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.4;
  transition: color 0.25s ease, border-color 0.25s ease, gap 0.25s var(--ease);
}

.text-link span {
  font-family: var(--font-mono);
  font-size: 12px;
}

.text-link:hover {
  gap: 13px;
  color: var(--red);
  border-color: var(--red);
}

.quiet-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--muted);
  font-size: 12px;
  transition: color 0.2s ease;
}

.quiet-button span {
  font-family: var(--font-mono);
}

.quiet-button:hover {
  color: var(--ink);
}

.icon-button {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease);
}

.icon-button span {
  position: absolute;
  width: 15px;
  height: 1px;
  background: currentColor;
}

.icon-button span:first-child {
  transform: rotate(45deg);
}

.icon-button span:last-child {
  transform: rotate(-45deg);
}

.icon-button:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  transform: rotate(90deg);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 88px;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 232, 0.86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--ink);
  transition: transform 0.5s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(22deg);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-type {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.brand-type strong {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-type small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.16em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: auto;
  margin-right: clamp(25px, 4vw, 70px);
}

.nav-link {
  position: relative;
  padding: 6px 0;
  color: var(--muted-deep);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-archive {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link sup {
  display: inline-grid;
  min-width: 24px;
  height: 17px;
  padding: 0 5px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.system-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(92, 118, 82, 0.13);
  animation: statusPulse 2.8s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* --------------------------------------------------------------------------
   Landing hero
   -------------------------------------------------------------------------- */

.landing-view {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(470px, 0.97fr);
  gap: clamp(30px, 4vw, 74px);
  align-items: center;
  min-height: calc(100vh - 88px);
  padding-top: clamp(40px, 6vh, 78px);
  padding-bottom: clamp(50px, 7vh, 92px);
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding-top: 10px;
}

.hero-eyebrow {
  margin-bottom: 23px;
}

.hero-title {
  max-width: 760px;
  font-size: clamp(54px, 5.7vw, 88px);
  font-weight: 800;
  letter-spacing: -0.072em;
  line-height: 1.02;
}

.hero-highlight {
  position: relative;
  display: inline-block;
  color: var(--red);
  letter-spacing: -0.08em;
}

.hero-highlight::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -0.02em;
  bottom: 0.04em;
  left: -0.02em;
  height: 0.11em;
  background: currentColor;
  opacity: 0.2;
  transform: rotate(-1.1deg);
}

.hero-highlight::after {
  content: "✦";
  position: absolute;
  top: -0.28em;
  right: -0.36em;
  color: var(--red);
  font-size: 0.24em;
  font-weight: 400;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 505px;
  margin-top: clamp(24px, 4vh, 34px);
  color: var(--muted-deep);
  font-size: 15px;
  letter-spacing: 0.005em;
  line-height: 1.95;
  text-wrap: pretty;
}

.hero-lede span {
  display: block;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 30px;
  margin-top: 35px;
}

.hero-facts {
  display: flex;
  gap: clamp(26px, 4.5vw, 58px);
  margin-top: clamp(38px, 6vh, 58px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-facts > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.hero-facts dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.hero-facts dd {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.hero-facts strong {
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero-facts span {
  color: var(--muted);
  font-size: 10px;
}

/* Hero collage */
.hero-art {
  position: relative;
  z-index: 1;
  height: clamp(520px, 62vw, 680px);
  max-height: 680px;
}

.hero-ghost-word {
  position: absolute;
  top: 2%;
  left: -6%;
  z-index: -1;
  color: transparent;
  font-family: var(--font-serif);
  font-size: clamp(120px, 15vw, 215px);
  font-weight: 600;
  letter-spacing: -0.1em;
  line-height: 0.8;
  -webkit-text-stroke: 1px rgba(23, 24, 20, 0.12);
  pointer-events: none;
  user-select: none;
}

.hero-index {
  position: absolute;
  right: -4px;
  bottom: 20px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
}

.orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-a {
  top: 8%;
  right: 0;
  width: 82%;
  aspect-ratio: 1;
}

.orbit-b {
  top: 16%;
  right: 8%;
  width: 68%;
  aspect-ratio: 1;
  border-style: dashed;
  opacity: 0.65;
}

.art-dot {
  position: absolute;
  border-radius: 50%;
}

.dot-a {
  top: 14%;
  left: 8%;
  width: 9px;
  height: 9px;
  background: var(--red);
}

.dot-b {
  right: 7%;
  bottom: 33%;
  width: 6px;
  height: 6px;
  background: var(--ink);
}

.art-cross {
  position: absolute;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 300;
}

.cross-a {
  top: 26%;
  right: 1%;
}

.cross-b {
  bottom: 17%;
  left: 22%;
}

.hero-main-card {
  position: absolute;
  top: 9%;
  left: 22%;
  z-index: 3;
  display: flex;
  width: min(56%, 352px);
  min-width: 272px;
  aspect-ratio: 0.7;
  flex-direction: column;
  padding: 17px 18px 18px;
  border: 1px solid rgba(23, 24, 20, 0.16);
  border-radius: 190px 190px 22px 22px;
  background:
    radial-gradient(circle at 52% 33%, rgba(255, 249, 224, 0.96) 0, rgba(245, 223, 159, 0.5) 38%, transparent 66%),
    #e7d7b4;
  box-shadow: 0 34px 75px -38px rgba(23, 24, 20, 0.42);
  transform: rotate(2.1deg);
  animation: artFloat 9s ease-in-out infinite;
}

.hero-main-card::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(23, 24, 20, 0.08);
  border-radius: inherit;
  pointer-events: none;
}

.specimen-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  color: rgba(23, 24, 20, 0.58);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.hero-main-image {
  position: relative;
  display: grid;
  flex: 1;
  min-height: 0;
  place-items: center;
}

.image-halo {
  position: absolute;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 249, 218, 0.35) 45%, transparent 72%);
  filter: blur(4px);
}

.hero-main-image img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 92%;
  object-fit: contain;
  filter: drop-shadow(0 22px 17px rgba(85, 57, 9, 0.16));
  transform: scale(1.1) translateY(2%);
}

.hero-main-card figcaption {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 0 8px 3px;
}

.specimen-name {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 1;
}

.specimen-sub {
  color: rgba(23, 24, 20, 0.55);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-align: right;
}

.card-code {
  position: absolute;
  top: 48%;
  left: -25px;
  color: rgba(23, 24, 20, 0.45);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  transform: rotate(-90deg);
  transform-origin: center;
}

.hero-side-card {
  position: absolute;
  z-index: 2;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 40px -28px rgba(23, 24, 20, 0.4);
}

.hero-side-card img {
  width: 100%;
  height: 70%;
  object-fit: contain;
  transition: transform 0.6s var(--ease);
}

.hero-side-card:hover img {
  transform: translateY(-5px) scale(1.04);
}

.hero-side-card figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 12px;
  font-size: 11px;
  font-weight: 700;
}

.hero-side-card figcaption span {
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.08em;
}

.side-number {
  position: absolute;
  top: 11px;
  left: 13px;
  color: rgba(23, 24, 20, 0.47);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.hero-side-left {
  bottom: 8%;
  left: 2%;
  width: 29%;
  min-width: 142px;
  aspect-ratio: 0.94;
  border-radius: 18px;
  background: #ddd6e2;
  transform: rotate(-5deg);
  animation: artFloatAlt 8s 1.2s ease-in-out infinite;
}

.hero-side-left img {
  padding: 15% 7% 0;
}

.hero-side-right {
  top: 21%;
  right: -1%;
  z-index: 4;
  width: 26%;
  min-width: 132px;
  aspect-ratio: 0.85;
  border-radius: 60px 60px 16px 16px;
  background: #e8e0d7;
  transform: rotate(4.5deg);
  animation: artFloat 10s 0.5s ease-in-out infinite;
}

.hero-side-right img {
  padding: 16% 4% 0;
}

.hero-side-right figcaption {
  color: rgba(23, 24, 20, 0.62);
}

.hero-stamp {
  position: absolute;
  right: 5%;
  bottom: 12%;
  z-index: 3;
  width: 92px;
  height: 92px;
  color: var(--red);
  transform: rotate(9deg);
  opacity: 0.82;
}

.hero-stamp svg {
  width: 100%;
  height: 100%;
}

.hero-stamp text {
  fill: currentColor;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.24em;
}

.hero-stamp .stamp-center {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.hero-stamp .stamp-small {
  font-size: 5px;
  letter-spacing: 0.16em;
}

.hero-note {
  position: absolute;
  top: 24%;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  max-width: 145px;
}

.hero-note .note-line {
  width: 20px;
  height: 1px;
  margin-top: 7px;
  background: var(--red);
  flex: none;
}

.hero-note p {
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 11px;
  line-height: 1.65;
}

@keyframes artFloat {
  0%, 100% { transform: translateY(0) rotate(2.1deg); }
  50% { transform: translateY(-9px) rotate(1.4deg); }
}

@keyframes artFloatAlt {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-7px) rotate(-4deg); }
}

/* Type ticker */
.type-ticker {
  position: relative;
  overflow: hidden;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 240, 0.35);
}

.ticker-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 17px;
  animation: tickerMove 48s linear infinite;
}

.ticker-track span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.17em;
}

.ticker-track i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
  opacity: 0.55;
}

@keyframes tickerMove {
  to { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   Method section
   -------------------------------------------------------------------------- */

.method-section {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  padding: clamp(72px, 9vw, 120px) max(var(--gutter), calc((100vw - var(--container)) / 2));
  background: var(--ink);
  color: var(--paper);
}

.method-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(250px, 0.55fr);
  gap: 30px 80px;
  align-items: end;
  margin-bottom: clamp(46px, 6vw, 74px);
}

.method-head .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.method-head h2 {
  max-width: 620px;
  font-size: clamp(36px, 4.3vw, 60px);
  font-weight: 700;
  letter-spacing: -0.065em;
  line-height: 1.12;
}

.method-head > p:last-child {
  max-width: 330px;
  padding-bottom: 7px;
  color: rgba(244, 241, 232, 0.55);
  font-size: 12px;
  line-height: 1.9;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--cream-line);
}

.method-card {
  position: relative;
  min-height: 270px;
  padding: 27px 30px 34px;
  border-right: 1px solid var(--cream-line);
  transition: background-color 0.35s ease;
}

.method-card:last-child {
  border-right: 0;
}

.method-card:hover {
  background: rgba(244, 241, 232, 0.035);
}

.method-number {
  color: rgba(244, 241, 232, 0.38);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.method-icon {
  width: 30px;
  height: 30px;
  margin-top: 32px;
  color: var(--red);
}

.method-icon svg {
  width: 100%;
  height: 100%;
}

.method-card h3 {
  margin-top: 23px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.method-card p {
  max-width: 260px;
  margin-top: 12px;
  color: rgba(244, 241, 232, 0.52);
  font-size: 11px;
  line-height: 1.85;
}

.method-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--cream-line);
}

.method-bottom > p {
  color: rgba(244, 241, 232, 0.38);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

/* --------------------------------------------------------------------------
   Quiz
   -------------------------------------------------------------------------- */

.quiz-view {
  min-height: calc(100vh - 88px);
  padding-top: clamp(36px, 6vh, 72px);
  padding-bottom: clamp(60px, 9vh, 100px);
  background:
    radial-gradient(circle at 85% 15%, rgba(225, 213, 184, 0.32), transparent 31%),
    var(--paper);
}

.quiz-shell {
  display: grid;
  grid-template-columns: 270px minmax(0, 850px);
  justify-content: space-between;
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}

.quiz-aside {
  position: sticky;
  top: 125px;
  padding-right: 35px;
  border-right: 1px solid var(--line);
}

.quiz-aside-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 55px;
}

.scan-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.scan-label i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
  animation: statusPulse 1.8s ease-in-out infinite;
}

.scan-live {
  color: var(--red);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.quiz-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 16px;
}

.quiz-count > span:first-child {
  font-family: var(--font-serif);
  font-size: clamp(64px, 7vw, 85px);
  font-weight: 600;
  letter-spacing: -0.09em;
  line-height: 0.9;
}

.quiz-count-total {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.quiz-progress {
  width: 100%;
  height: 2px;
  margin-top: 22px;
  overflow: hidden;
  background: rgba(23, 24, 20, 0.11);
}

.quiz-progress span {
  display: block;
  width: 8.333%;
  height: 100%;
  background: var(--red);
  transition: width 0.55s var(--ease);
}

.quiz-progress-copy {
  margin-top: 13px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
}

.quiz-dots {
  display: grid;
  width: max-content;
  grid-template-columns: repeat(var(--dot-columns, 12), 5px);
  gap: 7px;
  margin-top: 25px;
}

.quiz-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(23, 24, 20, 0.16);
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.quiz-dots span.is-done {
  background: var(--ink);
}

.quiz-dots span.is-current {
  background: var(--red);
  transform: scale(1.5);
}

.quiz-quote {
  margin-top: 72px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.8;
}

.quiz-aside .quiet-button {
  margin-top: 30px;
}

.question-panel {
  position: relative;
  min-height: 560px;
  padding-top: 4px;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.13em;
}

.keyboard-hint {
  color: var(--muted);
}

.question-body {
  padding-top: clamp(34px, 5vh, 56px);
  animation: questionIn 0.55s var(--ease) both;
}

.question-body.is-leaving {
  animation: questionOut 0.25s ease both;
}

@keyframes questionIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes questionOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-8px); }
}

.question-title {
  max-width: 750px;
  font-size: clamp(31px, 4vw, 50px);
  font-weight: 700;
  letter-spacing: -0.062em;
  line-height: 1.28;
}

.question-title:focus {
  outline: none;
}

.question-note {
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.01em;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: clamp(28px, 4.5vh, 42px);
}

.option {
  position: relative;
  display: grid;
  min-height: 142px;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 15px;
  align-content: start;
  padding: 20px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(251, 248, 240, 0.36);
  text-align: left;
  transition: border-color 0.28s ease, background-color 0.28s ease, color 0.28s ease, transform 0.32s var(--ease);
}

.option:hover {
  border-color: var(--ink);
  background: var(--paper-light);
  transform: translateY(-2px);
}

.option-key {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.option-copy {
  padding-top: 1px;
}

.option-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.55;
}

.option-sub {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
  transition: color 0.25s ease;
}

.option-arrow {
  grid-column: 2;
  align-self: end;
  margin-top: 15px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.25s ease, transform 0.25s var(--ease);
}

.option:hover .option-arrow {
  opacity: 1;
  transform: translateX(0);
}

.option.is-selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-2px);
}

.option.is-selected .option-key {
  border-color: rgba(244, 241, 232, 0.4);
  background: var(--paper);
  color: var(--ink);
}

.option.is-selected .option-sub {
  color: rgba(244, 241, 232, 0.55);
}

.option.is-selected .option-arrow {
  color: var(--red);
  opacity: 1;
  transform: translateX(0);
}

.option:disabled {
  cursor: default;
}

.question-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 25px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.question-footer-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.question-tip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.next-question {
  color: var(--ink);
  font-weight: 600;
}

.next-question span {
  color: var(--red);
}

.tip-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--red);
}

#prevQuestion:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   Result view
   -------------------------------------------------------------------------- */

.result-view {
  --accent: var(--red);
  --accent-deep: var(--red-deep);
  --type-soft: #f0e6d8;
  --type-wash: #f7f2e7;
  --type-ink: var(--ink);
  position: relative;
  padding-top: clamp(48px, 6vw, 78px);
  padding-bottom: clamp(65px, 9vw, 110px);
  background:
    radial-gradient(circle at 83% 4%, var(--type-wash) 0, transparent 28%),
    var(--paper);
}

.result-shell {
  max-width: 1180px;
}

.result-heading {
  position: relative;
  z-index: 1;
}

.result-heading .eyebrow-line {
  background: var(--accent);
}

.result-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: 16px;
}

.result-heading h1 {
  max-width: 780px;
  font-size: clamp(38px, 5.3vw, 68px);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 1.08;
}

#resultNameInline {
  color: var(--accent);
}

.result-heading-note {
  display: flex;
  max-width: 250px;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
  padding-bottom: 10px;
  text-align: left;
}

.result-mode-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--type-wash);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.result-index {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.result-heading-note p {
  color: var(--muted-deep);
  font-size: 11px;
  line-height: 1.75;
}

.partner-card {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  margin-top: clamp(30px, 4.2vw, 52px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--paper-light);
  box-shadow: 0 32px 80px -60px rgba(23, 24, 20, 0.5);
  animation: resultCardIn 0.8s var(--ease) both;
}

@keyframes resultCardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.partner-visual {
  position: relative;
  display: flex;
  min-height: 570px;
  flex-direction: column;
  overflow: hidden;
  padding: 25px 27px 22px;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.55) 0, transparent 41%),
    linear-gradient(148deg, var(--type-soft) 0%, var(--type-wash) 100%);
}

.partner-visual::before {
  content: "";
  position: absolute;
  top: -16%;
  right: -17%;
  width: 68%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.7;
}

.partner-visual::after {
  content: "";
  position: absolute;
  right: 27px;
  bottom: 55px;
  left: 27px;
  height: 1px;
  background: var(--line);
}

.visual-topline {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted-deep);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.rarity-badge {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 8px;
  letter-spacing: 0.05em;
}

.visual-watermark {
  position: absolute;
  z-index: 0;
  bottom: 5%;
  left: 1%;
  color: transparent;
  font-family: var(--font-serif);
  font-size: clamp(155px, 21vw, 275px);
  font-weight: 600;
  letter-spacing: -0.12em;
  line-height: 0.7;
  -webkit-text-stroke: 1px rgba(23, 24, 20, 0.12);
  user-select: none;
}

.visual-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: min(68%, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(23, 24, 20, 0.14);
  border-radius: 50%;
  transform: translate(-50%, -48%);
}

.visual-orbit span {
  position: absolute;
  inset: 11%;
  border: 1px dashed rgba(23, 24, 20, 0.13);
  border-radius: 50%;
}

.visual-orbit span:nth-child(2) {
  inset: 23%;
  border-style: solid;
  border-color: rgba(23, 24, 20, 0.09);
}

.visual-orbit span:nth-child(3) {
  inset: -2.8%;
  border-style: solid;
  border-color: transparent;
}

.visual-orbit span:nth-child(3)::before,
.visual-orbit span:nth-child(3)::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.visual-orbit span:nth-child(3)::before {
  top: 2%;
  left: 30%;
}

.visual-orbit span:nth-child(3)::after {
  right: 1%;
  bottom: 26%;
}

.visual-cross {
  position: absolute;
  z-index: 2;
  color: rgba(23, 24, 20, 0.35);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 300;
}

.visual-cross-a {
  top: 30%;
  left: 8%;
}

.visual-cross-b {
  right: 9%;
  bottom: 25%;
}

.partner-image {
  position: relative;
  z-index: 2;
  width: 94%;
  height: auto;
  max-height: 455px;
  margin: auto;
  object-fit: contain;
  filter: drop-shadow(0 25px 21px rgba(23, 24, 20, 0.16));
  animation: partnerFloat 7.5s ease-in-out infinite;
}

@keyframes partnerFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.visual-footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.visual-footer-line {
  width: 35px;
  height: 1px;
  background: var(--line-strong);
}

.partner-info {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(27px, 3.5vw, 48px) clamp(27px, 3.8vw, 54px) 32px;
}

.partner-info::after {
  content: "";
  position: absolute;
  top: 0;
  right: 27px;
  width: 60px;
  height: 3px;
  background: var(--accent);
}

.partner-info-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.type-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 27px;
  padding: 3px 11px 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.type-pill i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pill-color, var(--ink));
}

.type-pill em {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  font-style: normal;
  letter-spacing: 0.07em;
}

.type-pill.type-large {
  min-height: 32px;
  padding: 5px 14px 5px 9px;
  font-size: 11px;
}

.match-badge {
  position: relative;
  display: flex;
  width: 85px;
  height: 85px;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--match-score, 0) * 1%), rgba(23, 24, 20, 0.11) 0);
  color: var(--accent);
  transform: rotate(5deg);
}

.match-badge::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-light);
}

.match-badge strong,
.match-badge span {
  position: relative;
  z-index: 1;
}

.match-badge strong {
  font-family: var(--font-serif);
  font-size: 33px;
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 1;
}

.match-badge span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.partner-kicker {
  margin-top: 33px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.15em;
}

.partner-name {
  margin-top: 5px;
  font-size: clamp(48px, 5.6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1.05;
}

.partner-lore {
  max-width: 510px;
  margin-top: 14px;
  color: var(--muted-deep);
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.9;
  text-wrap: pretty;
}

.lore-lead {
  display: block;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.9;
}

.lore-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

.lore-label::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent, var(--red));
  opacity: 0.8;
}

.lore-detail {
  display: block;
  color: var(--muted-deep);
  font-size: 13px;
  line-height: 1.9;
}

.soul-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 19px;
}

.soul-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted-deep);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.soul-tag::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.partner-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 26px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.partner-facts > div {
  min-width: 0;
  padding: 13px 15px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.partner-facts span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.09em;
}

.partner-facts strong {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resonance-dims {
  display: grid;
  gap: 11px;
  margin-top: auto;
  padding-top: 24px;
}

.dim-row {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 28px;
  gap: 10px;
  align-items: center;
}

.dim-row > span:first-child {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.dim-track {
  height: 3px;
  overflow: hidden;
  background: rgba(23, 24, 20, 0.1);
}

.dim-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 1s var(--ease);
}

.dim-value {
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 8px;
  text-align: right;
}

/* Analysis panels */
.analysis-grid,
.detail-grid {
  display: grid;
  gap: 17px;
  margin-top: 17px;
}

.analysis-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.detail-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  margin-top: 17px;
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper-light);
}

.panel-head {
  position: relative;
  padding: 25px 28px 0;
}

.panel-index {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.panel-head h2 {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.2;
}

.panel-aside {
  position: absolute;
  right: 28px;
  bottom: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.07em;
}

.why-panel {
  padding-bottom: 27px;
}

.reason-list {
  display: grid;
  gap: 20px;
  padding: 26px 28px 8px;
}

.reason-item {
  display: grid;
  grid-template-columns: 27px 1fr;
  gap: 13px;
}

.reason-number {
  padding-top: 1px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.07em;
}

.reason-item h3 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.reason-item p {
  margin-top: 5px;
  color: var(--muted-deep);
  font-size: 11.5px;
  line-height: 1.85;
}

.answer-echo {
  margin: 15px 28px 0;
  padding: 16px 18px;
  border-left: 2px solid var(--accent);
  background: var(--type-wash);
}

.echo-label {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.answer-echo p {
  margin-top: 7px;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.8;
}

.stats-panel {
  padding-bottom: 25px;
}

.radar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  gap: 8px;
  align-items: center;
  padding: 5px 18px 0 16px;
}

.radar-wrap {
  min-width: 0;
}

.radar-wrap svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.radar-grid-line {
  fill: none;
  stroke: rgba(23, 24, 20, 0.1);
  stroke-width: 1;
}

.radar-axis {
  stroke: rgba(23, 24, 20, 0.1);
  stroke-width: 1;
}

.radar-area {
  fill: var(--accent);
  fill-opacity: 0.15;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transform-origin: 180px 155px;
  animation: radarGrow 0.9s var(--ease) both;
}

.radar-dot {
  fill: var(--paper-light);
  stroke: var(--accent);
  stroke-width: 1.8;
}

@keyframes radarGrow {
  from { transform: scale(0.2); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.radar-label {
  fill: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.radar-value {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.stat-list {
  display: grid;
  gap: 11px;
}

.stat-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-line-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
}

.stat-line-head span {
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.stat-line-head strong {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
}

.stat-line-track {
  height: 3px;
  background: rgba(23, 24, 20, 0.08);
}

.stat-line-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--type-ink);
  opacity: 0.64;
  transition: width 0.85s var(--ease);
}

.stat-line.is-highest .stat-line-track span {
  background: var(--accent);
  opacity: 1;
}

.stat-line.is-highest .stat-line-head strong {
  color: var(--accent);
}

/* Field notes */
.field-panel {
  padding-bottom: 28px;
}

.field-note {
  max-width: 640px;
  padding: 22px 28px 0;
  color: var(--ink-soft);
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: 0.005em;
  line-height: 2;
}

.field-sub {
  display: inline-block;
  margin-bottom: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  line-height: 1.4;
}

.result-heading h1:focus {
  outline: none;
}

.field-bottom {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  margin: 26px 28px 0;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

.fact-label {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.11em;
}

.field-bottom p {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.8;
}

.move-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.move-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 9px;
  line-height: 1.2;
}

.companion-panel {
  overflow: hidden;
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.companion-panel::before {
  content: "";
  position: absolute;
  top: -42px;
  right: -35px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(244, 241, 232, 0.17);
  border-radius: 50%;
}

.companion-panel::after {
  content: "";
  position: absolute;
  top: 22px;
  right: 23px;
  width: 48px;
  height: 48px;
  border: 1px dashed rgba(244, 241, 232, 0.18);
  border-radius: 50%;
}

.companion-panel .panel-index {
  color: rgba(244, 241, 232, 0.45);
}

.companion-panel .panel-head h2 {
  color: var(--paper);
}

.companion-copy {
  position: relative;
  z-index: 1;
  max-width: 360px;
  padding: 27px 28px 0;
  color: rgba(244, 241, 232, 0.7);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 2;
}

.companion-signature {
  position: absolute;
  right: 27px;
  bottom: 25px;
  left: 28px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding-top: 18px;
  border-top: 1px solid var(--cream-line);
  color: rgba(244, 241, 232, 0.4);
  font-family: var(--font-mono);
  font-size: 7px;
  line-height: 1.65;
  letter-spacing: 0.05em;
}

.signature-mark {
  display: grid;
  width: 26px;
  height: 26px;
  flex: none;
  place-items: center;
  border: 1px solid rgba(244, 241, 232, 0.25);
  border-radius: 50%;
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 10px;
}

.companion-signature b {
  color: rgba(244, 241, 232, 0.75);
  font-weight: 500;
}

/* Alternatives */
.alternatives {
  margin-top: clamp(36px, 5vw, 60px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.alternatives-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 21px;
}

.alternatives-head h2 {
  margin-top: 5px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.2;
}

.alternatives-head p {
  max-width: 230px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.alternative-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.alt-card {
  display: grid;
  grid-template-columns: 89px 1fr auto;
  gap: 13px;
  align-items: center;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(251, 248, 240, 0.4);
  text-align: left;
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease);
}

.alt-card:hover {
  border-color: var(--line-strong);
  background: var(--paper-light);
  transform: translateY(-3px);
}

.alt-image {
  display: grid;
  width: 89px;
  height: 89px;
  place-items: center;
  border-radius: 10px;
  background: var(--alt-soft, var(--paper-deep));
}

.alt-image img {
  width: 96%;
  height: 96%;
  object-fit: contain;
  transition: transform 0.45s var(--ease);
}

.alt-card:hover .alt-image img {
  transform: scale(1.07);
}

.alt-copy {
  min-width: 0;
}

.alt-number {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.alt-name {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.25;
}

.alt-types {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.alt-types i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.alt-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  align-self: stretch;
  padding: 4px 2px;
}

.alt-score strong {
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.alt-score span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.alt-score em {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
}

.result-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-top: 42px;
  padding-top: 27px;
  border-top: 1px solid var(--line);
}

.result-actions .text-link {
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   Test depth picker
   -------------------------------------------------------------------------- */

.overlay.mode-overlay {
  z-index: 190;
  align-items: flex-start;
  overflow-y: auto;
  padding: clamp(16px, 4vw, 46px);
}

.mode-shell {
  position: relative;
  width: min(1160px, 100%);
  margin: auto;
  padding: clamp(28px, 4.4vw, 56px);
  overflow: hidden;
  border-radius: 27px;
  background:
    radial-gradient(circle at 87% 10%, rgba(224, 213, 184, 0.35), transparent 28%),
    var(--paper);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.28);
  animation: overlayUp 0.55s var(--ease) both;
}

.mode-shell::before {
  content: "";
  position: absolute;
  top: -190px;
  left: -130px;
  width: 440px;
  height: 440px;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}

.mode-close {
  position: absolute;
  top: clamp(22px, 3vw, 36px);
  right: clamp(22px, 3vw, 36px);
  z-index: 4;
  background: rgba(244, 241, 232, 0.72);
  backdrop-filter: blur(7px);
}

.mode-head {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(255px, 0.43fr);
  gap: 28px 70px;
  align-items: end;
  padding-bottom: clamp(27px, 3.5vw, 42px);
  border-bottom: 1px solid var(--line);
}

.mode-heading {
  padding-right: 50px;
}

.mode-heading h2 {
  margin-top: 16px;
  font-size: clamp(42px, 5.2vw, 68px);
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 1.03;
}

.mode-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 295px;
  padding-bottom: 5px;
}

.mode-head-side p {
  color: var(--muted-deep);
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1.9;
}

.mode-recommend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.05em;
}

.mode-recommend i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--red);
}

.mode-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: clamp(22px, 3.3vw, 36px);
}

.mode-card {
  position: relative;
  display: flex;
  min-height: clamp(330px, 30vw, 392px);
  flex-direction: column;
  overflow: hidden;
  padding: clamp(19px, 2.2vw, 27px);
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(251, 248, 240, 0.62);
  color: var(--ink);
  text-align: left;
  transition: transform 0.38s var(--ease), background-color 0.32s ease, border-color 0.32s ease, box-shadow 0.38s var(--ease);
}

.mode-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  background: var(--paper-light);
  box-shadow: 0 24px 36px -30px rgba(23, 24, 20, 0.5);
}

.mode-card:focus-visible {
  outline-offset: 4px;
}

.mode-card.is-featured {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.mode-card.is-featured:hover {
  background: #22231e;
  border-color: #22231e;
}

.mode-card-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.mode-card.is-featured .mode-card-top {
  color: rgba(244, 241, 232, 0.5);
}

.mode-tag {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-deep);
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.mode-card.is-featured .mode-tag {
  border-color: var(--red);
  background: var(--red);
  color: var(--paper);
}

.mode-watermark {
  position: absolute;
  top: 62px;
  right: 12px;
  z-index: 0;
  color: transparent;
  font-family: var(--font-serif);
  font-size: clamp(94px, 9.5vw, 128px);
  font-weight: 600;
  letter-spacing: -0.09em;
  line-height: 0.8;
  -webkit-text-stroke: 1px rgba(23, 24, 20, 0.09);
  pointer-events: none;
  user-select: none;
}

.mode-card.is-featured .mode-watermark {
  -webkit-text-stroke-color: rgba(244, 241, 232, 0.11);
}

.mode-name {
  position: relative;
  z-index: 2;
  margin-top: 56px;
  font-size: clamp(27px, 2.7vw, 35px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1.15;
}

.mode-summary {
  position: relative;
  z-index: 2;
  max-width: 295px;
  margin-top: 12px;
  color: var(--muted-deep);
  font-size: 11px;
  line-height: 1.9;
}

.mode-card.is-featured .mode-summary {
  color: rgba(244, 241, 232, 0.6);
}

.mode-metrics {
  position: relative;
  z-index: 2;
  display: flex;
  gap: clamp(22px, 3vw, 36px);
  margin-top: 25px;
}

.mode-metrics > span {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.mode-metrics strong {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.mode-metrics small {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.02em;
}

.mode-card.is-featured .mode-metrics small {
  color: rgba(244, 241, 232, 0.45);
}

.mode-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.mode-card.is-featured .mode-bottom {
  border-color: var(--cream-line);
  color: rgba(244, 241, 232, 0.45);
}

.mode-arrow {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 11px;
  transition: transform 0.3s var(--ease), background-color 0.3s ease, color 0.3s ease;
}

.mode-card:hover .mode-arrow {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
  transform: rotate(45deg);
}

.mode-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(21px, 3vw, 31px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.mode-foot p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.mode-foot .text-link {
  border-color: transparent;
  color: var(--muted);
  white-space: nowrap;
}

.mode-foot .text-link:hover {
  border-color: var(--red);
}

/* --------------------------------------------------------------------------
   Scanning state
   -------------------------------------------------------------------------- */

.scan-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  overflow: hidden;
  place-items: center;
  padding: 25px;
  background:
    radial-gradient(circle at 50% 49%, rgba(232, 216, 177, 0.11), transparent 25%),
    var(--ink);
  color: var(--paper);
}

.scan-overlay::before,
.scan-overlay::after {
  content: "";
  position: absolute;
  width: min(60vw, 760px);
  aspect-ratio: 1;
  border: 1px solid rgba(244, 241, 232, 0.09);
  border-radius: 50%;
}

.scan-overlay::after {
  width: min(42vw, 520px);
  border-style: dashed;
  animation: slowTurn 32s linear infinite;
}

@keyframes slowTurn {
  to { transform: rotate(360deg); }
}

.scan-overlay-inner {
  position: relative;
  z-index: 1;
  display: flex;
  max-width: 670px;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.scan-ball {
  position: relative;
  width: 68px;
  height: 68px;
  margin-bottom: 30px;
  overflow: hidden;
  border: 1px solid rgba(244, 241, 232, 0.55);
  border-radius: 50%;
  animation: scanBall 2.4s var(--ease) infinite;
}

.scan-ball::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 50%;
  background: var(--red);
}

.scan-ball::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(244, 241, 232, 0.8);
}

.scan-ball span {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(244, 241, 232, 0.8);
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

@keyframes scanBall {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.04); }
}

.scan-overlay .eyebrow {
  justify-content: center;
  color: rgba(244, 241, 232, 0.46);
}

.scan-overlay h2 {
  margin-top: 18px;
  font-size: clamp(35px, 5vw, 55px);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 1.15;
}

.scan-status {
  min-height: 20px;
  margin-top: 20px;
  color: rgba(244, 241, 232, 0.52);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.scan-progress {
  width: min(270px, 65vw);
  height: 2px;
  margin-top: 20px;
  overflow: hidden;
  background: rgba(244, 241, 232, 0.16);
}

.scan-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
  transition: width 0.25s linear;
}

.scan-terms {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}

.scan-terms span {
  padding: 4px 10px;
  border: 1px solid rgba(244, 241, 232, 0.16);
  border-radius: 999px;
  color: rgba(244, 241, 232, 0.42);
  font-size: 8px;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Archive overlay
   -------------------------------------------------------------------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(21, 22, 18, 0.74);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  animation: overlayIn 0.3s ease both;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.archive-shell {
  display: flex;
  width: min(1400px, 100%);
  height: min(900px, calc(100vh - 48px));
  flex-direction: column;
  overflow: hidden;
  border-radius: 23px;
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.27);
  animation: overlayUp 0.5s var(--ease) both;
}

@keyframes overlayUp {
  from { opacity: 0; transform: translateY(20px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.archive-header {
  display: flex;
  flex: none;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
  padding: 28px 36px 20px;
}

.archive-header h2 {
  margin-top: 8px;
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: 1.1;
}

.archive-header .eyebrow {
  color: var(--muted);
}

.archive-controls {
  display: flex;
  flex: none;
  align-items: center;
  gap: 18px;
  padding: 0 36px 16px;
  border-bottom: 1px solid var(--line);
}

.archive-search {
  display: flex;
  width: 260px;
  flex: none;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-light);
}

.archive-search svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--muted);
}

.archive-search input {
  width: 100%;
  height: 37px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.archive-search input::placeholder {
  color: var(--muted);
}

.type-filter {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.type-filter::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: none;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-deep);
  font-size: 9px;
  line-height: 1.2;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.filter-chip:hover {
  border-color: var(--line-strong);
}

.filter-chip.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.archive-summary {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  padding: 15px 36px 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.07em;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  align-content: start;
  gap: 12px;
  overflow-y: auto;
  padding: 0 36px 36px;
  scrollbar-color: rgba(23, 24, 20, 0.25) transparent;
  scrollbar-width: thin;
}

.archive-card {
  min-width: 0;
  padding: 9px 9px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.3s var(--ease);
}

.archive-card:hover {
  border-color: var(--line-strong);
  background: var(--paper-light);
  transform: translateY(-3px);
}

.archive-thumb {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  place-items: center;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.9), transparent 61%),
    var(--thumb-soft, var(--paper-deep));
}

.archive-thumb::after {
  content: "";
  position: absolute;
  right: 11px;
  bottom: 9px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(23, 24, 20, 0.14);
  border-radius: 50%;
}

.archive-thumb img {
  position: relative;
  z-index: 1;
  width: 96%;
  height: 96%;
  object-fit: contain;
  transition: transform 0.45s var(--ease);
}

.archive-card:hover .archive-thumb img {
  transform: translateY(-3px) scale(1.06);
}

.archive-number {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.06em;
}

.archive-name {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.archive-meta span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  white-space: nowrap;
}

.archive-meta i {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
}

.archive-empty {
  padding: 80px 30px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  line-height: 1.9;
}

.archive-empty span {
  color: var(--muted);
  font-size: 11px;
}

/* --------------------------------------------------------------------------
   Archive detail
   -------------------------------------------------------------------------- */

.detail-overlay {
  z-index: 250;
  background: rgba(21, 22, 18, 0.76);
}

.detail-modal {
  position: relative;
  width: min(950px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.3);
  animation: overlayUp 0.45s var(--ease) both;
  scrollbar-width: thin;
}

.detail-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 3;
  background: rgba(244, 241, 232, 0.68);
  backdrop-filter: blur(8px);
}

.detail-top {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  min-height: 360px;
}

.detail-visual {
  position: relative;
  display: flex;
  min-height: 360px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 45%, rgba(255, 255, 255, 0.66), transparent 45%),
    var(--detail-soft, var(--paper-deep));
}

.detail-dex {
  position: absolute;
  top: 22px;
  left: 25px;
  z-index: 2;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.11em;
}

.detail-visual::before {
  content: "";
  position: absolute;
  width: 67%;
  aspect-ratio: 1;
  border: 1px solid rgba(23, 24, 20, 0.15);
  border-radius: 50%;
}

.detail-visual img {
  position: relative;
  z-index: 2;
  width: 91%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 19px 17px rgba(23, 24, 20, 0.16));
}

.detail-watermark {
  position: absolute;
  right: -2%;
  bottom: 2%;
  color: transparent;
  font-family: var(--font-serif);
  font-size: 150px;
  font-weight: 600;
  letter-spacing: -0.1em;
  line-height: 0.8;
  -webkit-text-stroke: 1px rgba(23, 24, 20, 0.13);
}

.detail-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 50px 48px 34px;
}

.detail-info h2 {
  margin-top: 18px;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 800;
  letter-spacing: -0.08em;
  line-height: 1.05;
}

.detail-lore {
  max-width: 455px;
  margin-top: 11px;
  color: var(--muted-deep);
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.9;
  text-wrap: pretty;
}

.detail-lore .lore-lead {
  font-size: 14px;
}

.detail-lore .lore-detail {
  font-size: 12.5px;
}

.detail-lore .lore-label {
  margin-top: 13px;
}

.detail-info .soul-tags {
  margin-top: 15px;
}

.detail-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px 20px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.detail-facts span {
  display: block;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
}

.detail-facts strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-bottom {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 25px;
  padding: 25px 38px 34px;
  border-top: 1px solid var(--line);
}

.detail-radar {
  margin-top: 5px;
}

.detail-radar svg {
  display: block;
  width: 100%;
  max-width: 315px;
  height: auto;
}

.detail-moves {
  padding-top: 4px;
}

.detail-moves .move-list {
  margin-top: 11px;
}

.detail-footnote {
  margin-top: 25px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-top: 56px;
  padding-bottom: 31px;
  border-top: 1px solid var(--line);
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 35px;
  padding-bottom: 54px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo .brand-mark {
  width: 42px;
  height: 42px;
}

.footer-logo > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-logo strong {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.13em;
}

.footer-logo small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.13em;
}

.footer-note {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 13px;
  line-height: 1.8;
  text-align: right;
}

.footer-link {
  color: var(--muted-deep);
  white-space: nowrap;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.footer-bottom p:nth-child(2) {
  opacity: 0.7;
}

.footer-bottom > span {
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Toast
   -------------------------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 400;
  max-width: calc(100vw - 40px);
  padding: 12px 20px;
  border: 1px solid rgba(244, 241, 232, 0.12);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.8fr);
    gap: 25px;
  }

  .hero-art {
    height: 550px;
  }

  .hero-main-card {
    left: 21%;
  }

  .hero-side-right {
    right: -4%;
    width: 28%;
  }

  .hero-side-left {
    bottom: 6%;
    width: 31%;
  }

  .quiz-shell {
    grid-template-columns: 230px minmax(0, 760px);
    gap: 45px;
  }

  .quiz-aside {
    padding-right: 25px;
  }

  .radar-layout {
    grid-template-columns: minmax(0, 1fr) 84px;
    padding-right: 12px;
  }
}

@media (max-width: 980px) {
  .site-nav {
    margin-right: 22px;
    gap: 23px;
  }

  .system-status {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 55px;
    padding-bottom: 28px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-title {
    font-size: clamp(53px, 8vw, 78px);
  }

  .hero-art {
    width: min(660px, 100%);
    height: 585px;
    margin: 12px auto 0;
  }

  .hero-ghost-word {
    left: 2%;
  }

  .hero-main-card {
    top: 10%;
    left: 28%;
    width: 47%;
  }

  .hero-side-left {
    bottom: 5%;
    left: 7%;
    width: 24%;
  }

  .hero-side-right {
    top: 16%;
    right: 6%;
    width: 22%;
  }

  .hero-note {
    top: 18%;
    bottom: auto;
    left: 1%;
  }

  .hero-stamp {
    right: 9%;
    bottom: 6%;
  }

  .type-ticker {
    margin-top: 20px;
  }

  .method-head {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .method-head > p:last-child {
    max-width: 470px;
    padding-bottom: 0;
  }

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

  .method-card {
    min-height: auto;
    padding: 24px 3px;
    border-right: 0;
    border-bottom: 1px solid var(--cream-line);
  }

  .method-card:last-child {
    border-bottom: 0;
  }

  .method-icon {
    position: absolute;
    top: 27px;
    right: 5px;
    margin: 0;
  }

  .method-card h3 {
    margin-top: 10px;
  }

  .method-card p {
    max-width: 430px;
    margin-top: 8px;
  }

  .quiz-shell {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .quiz-aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 18px;
    padding: 0;
    border-right: 0;
  }

  .quiz-aside-top {
    grid-column: 1 / -1;
    margin-bottom: 2px;
  }

  .quiz-count {
    margin: 0;
  }

  .quiz-count > span:first-child {
    font-size: 58px;
  }

  .quiz-progress {
    grid-column: 2;
    grid-row: 2;
    width: 150px;
    align-self: center;
    margin: 0;
  }

  .quiz-progress-copy {
    grid-column: 1 / -1;
    margin-top: 1px;
  }

  .quiz-dots {
    grid-column: 1 / -1;
    margin-top: 7px;
  }

  .quiz-quote,
  .quiz-aside .quiet-button {
    display: none;
  }

  .question-panel {
    min-height: 0;
    padding-top: 0;
  }

  .mode-head {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-bottom: 24px;
  }

  .mode-head-side {
    max-width: 470px;
    padding-bottom: 0;
    gap: 9px;
  }

  .mode-head-side p br {
    display: none;
  }

  .mode-grid {
    grid-template-columns: 1fr;
    margin-top: 19px;
  }

  .mode-card {
    min-height: 218px;
  }

  .mode-watermark {
    top: 48px;
    font-size: 100px;
  }

  .mode-name {
    margin-top: 31px;
  }

  .mode-metrics {
    margin-top: 18px;
  }

  .result-heading-row {
    align-items: flex-start;
  }

  .result-heading-note {
    max-width: 200px;
    padding-top: 10px;
    padding-bottom: 0;
  }

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

  .partner-visual {
    min-height: 470px;
  }

  .partner-image {
    width: min(500px, 82%);
    max-height: 370px;
  }

  .analysis-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .radar-layout {
    grid-template-columns: minmax(0, 1fr) 150px;
    padding: 5px 26px 0;
  }

  .stat-list {
    gap: 14px;
  }

  .companion-panel {
    min-height: 285px;
  }

  .companion-copy {
    max-width: 500px;
  }

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

  .archive-controls {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .archive-search {
    width: 100%;
  }

  .archive-controls .type-filter {
    flex-wrap: wrap;
    overflow: visible;
    gap: 5px;
    padding-bottom: 2px;
  }

  .detail-top {
    grid-template-columns: 0.75fr 1.25fr;
  }

  .detail-info {
    padding: 45px 32px 30px;
  }

  .detail-bottom {
    padding: 24px 28px 28px;
  }
}

@media (max-width: 700px) {
  .site-header {
    min-height: 73px;
    padding-top: 13px;
    padding-bottom: 13px;
  }

  .site-nav {
    display: none;
  }

  .brand-type small {
    display: none;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .brand-type strong {
    font-size: 12px;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-title {
    font-size: clamp(43px, 12.6vw, 63px);
    letter-spacing: -0.08em;
  }

  .hero-lede {
    max-width: 95%;
    font-size: 13px;
    line-height: 1.9;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    margin-top: 27px;
  }

  .button-primary {
    min-height: 56px;
  }

  .hero-facts {
    gap: 28px;
    margin-top: 37px;
  }

  .hero-facts strong {
    font-size: 25px;
  }

  .hero-facts span {
    font-size: 9px;
  }

  .hero-art {
    height: 475px;
    margin-top: 5px;
  }

  .hero-main-card {
    top: 8%;
    left: 19%;
    width: 61%;
    min-width: 232px;
    padding: 13px 13px 14px;
  }

  .specimen-name {
    font-size: 30px;
  }

  .specimen-sub {
    font-size: 8px;
  }

  .hero-side-left {
    bottom: 5%;
    left: 0;
    width: 27%;
    min-width: 112px;
  }

  .hero-side-right {
    display: none;
  }

  .hero-stamp {
    right: 2%;
    bottom: 12%;
    width: 79px;
    height: 79px;
  }

  .hero-ghost-word {
    top: 7%;
    left: -7%;
    font-size: 122px;
  }

  .hero-index {
    display: none;
  }

  .orbit-a {
    top: 13%;
    right: -8%;
    width: 90%;
  }

  .type-ticker {
    margin-top: 5px;
  }

  .method-section {
    padding-top: 67px;
    padding-bottom: 67px;
  }

  .method-head h2 {
    font-size: 36px;
  }

  .method-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
  }

  .method-bottom .button {
    width: 100%;
    justify-content: space-between;
  }

  .quiz-view {
    padding-top: 33px;
    padding-bottom: 55px;
  }

  .quiz-aside {
    grid-template-columns: auto 1fr;
    gap: 5px 15px;
  }

  .quiz-aside-top {
    margin-bottom: 5px;
  }

  .quiz-count > span:first-child {
    font-size: 53px;
  }

  .quiz-progress {
    width: 100%;
    max-width: 180px;
    justify-self: end;
  }

  .quiz-progress-copy {
    font-size: 9px;
  }

  .quiz-dots {
    gap: 6px;
  }

  .question-meta {
    font-size: 8px;
  }

  .keyboard-hint {
    display: none;
  }

  .question-body {
    padding-top: 28px;
  }

  .question-title {
    font-size: clamp(29px, 8vw, 39px);
    line-height: 1.32;
  }

  .question-note {
    font-size: 11px;
  }

  .option-grid {
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: 25px;
  }

  .option {
    min-height: 0;
    padding: 15px 16px 14px;
    grid-template-columns: 28px 1fr;
    column-gap: 12px;
  }

  .option-key {
    width: 27px;
    height: 27px;
    font-size: 9px;
  }

  .option-title {
    font-size: 14px;
  }

  .option-sub {
    margin-top: 3px;
    font-size: 9px;
  }

  .option-arrow {
    display: none;
  }

  .question-footer {
    margin-top: 15px;
  }

  .question-tip {
    font-size: 9px;
  }

  .result-view {
    padding-top: 43px;
    padding-bottom: 62px;
  }

  .result-heading-row {
    display: block;
    margin-top: 11px;
  }

  .result-heading h1 {
    font-size: clamp(35px, 9.5vw, 51px);
  }

  .result-heading-note {
    display: block;
    max-width: 300px;
    margin-top: 17px;
  }

  .result-heading-note .result-mode-chip {
    margin-bottom: 8px;
  }

  .result-heading-note .result-index {
    display: block;
  }

  .result-heading-note p {
    margin-top: 5px;
    font-size: 10px;
  }

  .partner-card {
    margin-top: 24px;
    border-radius: 19px;
  }

  .partner-visual {
    min-height: 348px;
    padding: 18px 18px 16px;
  }

  .partner-image {
    width: 89%;
    max-height: 280px;
  }

  .visual-watermark {
    font-size: 153px;
  }

  .visual-footer {
    font-size: 7px;
  }

  .partner-info {
    padding: 25px 21px 24px;
  }

  .partner-info::after {
    right: 21px;
  }

  .match-badge {
    width: 71px;
    height: 71px;
  }

  .match-badge strong {
    font-size: 28px;
  }

  .partner-kicker {
    margin-top: 23px;
    font-size: 7px;
  }

  .partner-name {
    font-size: 49px;
  }

  .partner-lore {
    font-size: 12px;
    line-height: 1.85;
  }

  .partner-lore .lore-lead {
    font-size: 14px;
    line-height: 1.85;
  }

  .partner-lore .lore-detail {
    font-size: 12.5px;
    line-height: 1.85;
  }

  .partner-lore .lore-label {
    margin-top: 13px;
  }

  .partner-facts {
    margin-top: 20px;
  }

  .partner-facts > div {
    padding: 11px 11px 10px;
  }

  .partner-facts strong {
    font-size: 10px;
  }

  .resonance-dims {
    margin-top: 18px;
    padding-top: 18px;
  }

  .panel-head {
    padding: 21px 19px 0;
  }

  .panel-head h2 {
    font-size: 22px;
  }

  .panel-aside {
    right: 19px;
    font-size: 7px;
  }

  .reason-list {
    gap: 17px;
    padding: 22px 19px 5px;
  }

  .reason-item p {
    font-size: 11px;
  }

  .answer-echo {
    margin: 13px 19px 0;
    padding: 13px 14px;
  }

  .radar-layout {
    display: block;
    padding: 3px 12px 0;
  }

  .radar-wrap {
    max-width: 360px;
    margin: 0 auto;
  }

  .stat-list {
    grid-template-columns: 1fr 1fr;
    gap: 13px 17px;
    margin-top: 12px;
    padding: 15px 8px 0;
    border-top: 1px solid var(--line);
  }

  .field-note {
    padding: 18px 19px 0;
    font-size: 14px;
    line-height: 1.95;
  }

  .field-bottom {
    grid-template-columns: 1fr;
    gap: 21px;
    margin: 22px 19px 0;
  }

  .companion-copy {
    padding: 23px 19px 80px;
    font-size: 15px;
  }

  .companion-signature {
    right: 19px;
    bottom: 20px;
    left: 19px;
  }

  .alternatives {
    margin-top: 34px;
    padding-top: 22px;
  }

  .alternatives-head {
    display: block;
    margin-bottom: 16px;
  }

  .alternatives-head p {
    margin-top: 8px;
    font-size: 9px;
  }

  .alternative-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .alt-card {
    grid-template-columns: 72px 1fr auto;
    padding: 8px;
  }

  .alt-image {
    width: 72px;
    height: 72px;
  }

  .alt-name {
    font-size: 17px;
  }

  .result-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-top: 32px;
  }

  .result-actions .button {
    width: 100%;
    justify-content: space-between;
  }

  .result-actions .text-link {
    align-self: center;
    margin: 8px 0 0;
  }

  .footer-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 23px;
    padding-bottom: 36px;
  }

  .footer-note {
    grid-column: 1 / -1;
    grid-row: 2;
    margin: 0;
    text-align: left;
  }

  .footer-link {
    justify-self: end;
    font-size: 9px;
  }

  .footer-bottom {
    display: block;
    padding-top: 16px;
  }

  .footer-bottom p:nth-child(2) {
    display: none;
  }

  .footer-bottom > span {
    display: block;
    margin-top: 9px;
  }

  .overlay.mode-overlay {
    align-items: flex-start;
    overflow-y: auto;
    padding: 0;
  }

  .mode-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 24px 19px 30px;
    border-radius: 0;
  }

  .mode-close {
    top: 15px;
    right: 15px;
    width: 38px;
    height: 38px;
    background: rgba(244, 241, 232, 0.86);
  }

  .mode-head {
    display: block;
    padding-bottom: 21px;
  }

  .mode-heading {
    padding-right: 48px;
  }

  .mode-heading h2 {
    margin-top: 11px;
    font-size: 43px;
  }

  .mode-head-side {
    max-width: 100%;
    margin-top: 16px;
  }

  .mode-head-side p {
    font-size: 11px;
    line-height: 1.8;
  }

  .mode-grid {
    gap: 9px;
    margin-top: 16px;
  }

  .mode-card {
    min-height: 248px;
    padding: 18px;
  }

  .mode-watermark {
    top: 48px;
    right: 10px;
    font-size: 88px;
  }

  .mode-name {
    margin-top: 37px;
    font-size: 29px;
  }

  .mode-summary {
    max-width: 270px;
    margin-top: 8px;
    font-size: 10px;
    line-height: 1.8;
  }

  .mode-metrics {
    gap: 24px;
    margin-top: 17px;
  }

  .mode-metrics strong {
    font-size: 23px;
  }

  .mode-bottom {
    padding-top: 12px;
  }

  .mode-foot {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-top: 19px;
    padding-top: 16px;
  }

  .mode-foot p {
    align-items: flex-start;
    font-size: 8px;
  }

  .archive-overlay,
  .detail-overlay {
    align-items: flex-start;
    padding: 0;
  }

  .archive-shell {
    width: 100%;
    height: 100vh;
    max-height: none;
    border-radius: 0;
  }

  .archive-header {
    padding: 22px 19px 15px;
  }

  .archive-header h2 {
    font-size: 33px;
  }

  .archive-controls {
    gap: 10px;
    padding: 0 19px 13px;
  }

  .archive-summary {
    padding: 13px 19px 9px;
  }

  .archive-grid {
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 8px;
    padding: 0 19px 28px;
  }

  .archive-card {
    padding: 6px 6px 9px;
  }

  .archive-number {
    margin-top: 6px;
  }

  .archive-name {
    font-size: 13px;
  }

  .archive-meta {
    font-size: 7px;
  }

  .detail-modal {
    width: 100%;
    min-height: 100vh;
    max-height: none;
    border-radius: 0;
  }

  .detail-top {
    grid-template-columns: 1fr;
  }

  .detail-visual {
    min-height: 305px;
  }

  .detail-info {
    padding: 27px 20px 27px;
  }

  .detail-info h2 {
    font-size: 48px;
  }

  .detail-bottom {
    grid-template-columns: 1fr;
    gap: 17px;
    padding: 20px 20px 27px;
  }

  .detail-radar svg {
    max-width: 310px;
    margin-inline: auto;
  }

  .detail-close {
    top: 13px;
    right: 13px;
    width: 38px;
    height: 38px;
    color: var(--paper);
    background: rgba(23, 24, 20, 0.33);
    border-color: rgba(244, 241, 232, 0.2);
  }

  .detail-close:hover {
    background: var(--ink);
  }

  .scan-overlay::before {
    width: 100vw;
  }

  .scan-overlay::after {
    width: 72vw;
  }

  .scan-overlay h2 {
    font-size: 37px;
  }

  .scan-terms {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
