:root {
  color-scheme: dark;
  --ink: #100e10;
  --paper: #fbf4ef;
  --muted: #b4a2aa;
  --hot: #f12850;
  --soft: #ff718a;
  --line: #39292f;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: #0c0a0c; }
body {
  margin: 0;
  color: var(--paper);
  font-family: var(--font);
  background:
    repeating-linear-gradient(138deg, transparent 0 123px, #bd194314 124px, transparent 125px 159px),
    radial-gradient(ellipse at 50% 20%, #461020 0, #190d14 45%, #0c0a0c 78%);
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible { outline: 2px solid #ff9bb0; outline-offset: 3px; }
h1:focus { outline: none; }
h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; }
.app {
  width: min(100%, 500px);
  min-height: 100svh;
  margin-inline: auto;
  background: var(--ink);
  padding-top: env(safe-area-inset-top);
  border-inline: 1px solid #44222e;
  box-shadow: 0 0 88px #0504069c;
}
.app[data-page="home"], .app[data-page="quiz"] {
  display: flex;
  flex-direction: column;
}
.masthead {
  min-height: 57px;
  flex: 0 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.brand { display: flex; gap: 10px; align-items: center; font-weight: 800; font-size: 13px; letter-spacing: .04em; white-space: nowrap; min-width: 0; }
button.brand { background: none; border: 0; padding: 0; min-height: 40px; touch-action: manipulation; }
.header-tools { display: flex; gap: 14px; align-items: center; }
.header-tools .fullscreen, .desktop-mode-title { display: none; }
.brand-icon {
  display: grid; place-items: center;
  width: 29px; height: 29px;
  background: var(--hot);
  color: white;
  transform: skewX(-9deg);
}
.brand-icon svg { width: 20px; height: 20px; transform: skewX(9deg); stroke-width: 1.7; }
.header-tag {
  color: #f5c2cd;
  font-size: 11px;
  letter-spacing: .13em;
  padding: 5px 8px;
  border: 1px solid #683044;
  transform: skewX(-9deg);
}
.hero, .result-hero {
  isolation: isolate;
  position: relative;
  overflow: hidden;
  background-color: #24101a;
  background-image:
    repeating-linear-gradient(0deg, #ccb9bd13 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, #ccb9bd13 0 1px, transparent 1px 28px),
    radial-gradient(ellipse at 55% 26%, #5c1631, #1a0f15 78%);
}
.hero {
  flex: 1 0 auto;
  min-height: clamp(293px, calc(100svh - 348px), 545px);
  max-height: 620px;
}
.hero-field {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(146deg, #811334 3%, #f8244d 55%, #a91036);
  clip-path: polygon(26% 0, 100% 0, 100% 86%, 31% 96%, 55% 42%, 13% 54%);
  animation: field-in .53s cubic-bezier(.2,.75,.2,1) both;
}
.hero-stripe {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(-31deg, #fff2eb 0 1px, transparent 1px 7px);
  opacity: .28;
  clip-path: polygon(0 0, 15% 0, 0 29%, 0 89%, 74% 43%, 100% 42%, 0 97%);
}
.candle-chart {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  color: #ffacbd;
  opacity: .42;
  z-index: -1;
  pointer-events: none;
}
.hero-orbit {
  position: absolute;
  z-index: -1;
  width: 77%; aspect-ratio: 1;
  right: -3%; top: 7%;
  border: 1px solid #ffd4df7d;
  border-radius: 50%;
  box-shadow: 0 0 0 12px #ffd4df1a, 0 0 0 24px #ffd4df12;
  background-image: radial-gradient(circle, #f9b1bf7a 0 .7px, transparent 1px);
  background-size: 6px 6px;
  mask-image: linear-gradient(#000 0 76%, transparent);
}
.hero-character {
  position: absolute;
  top: 2%;
  right: 1.5%;
  width: min(94%, 465px);
  height: 102%;
  object-fit: contain;
  object-position: right top;
  filter: drop-shadow(3px 0 #ffeded) drop-shadow(-2px 0 #ffeded) drop-shadow(0 3px #ffeded) drop-shadow(8px 10px 0 #0a0620a6);
  animation: art-in .6s cubic-bezier(.2,.75,.2,1) both;
}
.hero::after, .result-hero::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(0deg, #100e10 0%, #100e10ec 11%, #170e17a8 24%, transparent 55%);
}
.spark { position: absolute; z-index: 1; color: #fff3ee; font-size: 34px; text-shadow: 2px 2px #841130; animation: spark 2.6s ease-in-out infinite alternate; }
.spark-one { top: 20%; left: 17%; }
.spark-two { top: 11%; right: 8%; font-size: 23px; animation-delay: -.8s; }
.hero-copy { position: absolute; z-index: 2; bottom: 9px; left: 24px; right: 16px; }
.hero h1 { width: max-content; max-width: 100%; font-weight: 950; transform: skew(-7deg) rotate(-5deg); transform-origin: left bottom; }
.hero h1 span, .hero h1 strong { display: table; line-height: 1.13; }
.hero h1 span {
  color: var(--paper);
  background: #141016;
  font-size: clamp(22px, 6.5vw, 32px);
  box-shadow: 5px 4px #7a0a28;
  padding: 4px 10px 5px 6px;
}
.hero h1 strong {
  color: var(--paper);
  font-size: clamp(42px, 13vw, 64px);
  letter-spacing: -.075em;
  padding: 2px 20px 5px 6px;
  background: var(--hot);
  clip-path: polygon(0 0, 100% 0, calc(100% - 13px) 100%, 0 100%);
  text-shadow: 3px 3px #860b2f;
}
.hero-copy p { margin: 14px 0 0; color: #e2cdd3; font-size: 12px; line-height: 1.45; }
.home-controls { padding: 0 24px max(12px, env(safe-area-inset-bottom)); }
.cast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 49px;
  font-size: 11px;
  color: #d7bac4;
  border-bottom: 1px solid var(--line);
  margin-bottom: 13px;
}
.cast-portraits { display: flex; align-items: center; padding-left: 4px; }
.cast-portraits img {
  width: 30px; height: 30px;
  object-fit: cover; object-position: center top;
  border: 1.5px solid #e98aa0;
  border-radius: 50%;
  margin-left: -4px;
  background: #772745;
}
.cast-portraits .cast-mochiko { background: #513562; }
.cast-portraits .cast-mebuki { background: #83592b; }
.cast-portraits .cast-yasuko { background: #4a314f; }
.mode-select { display: grid; gap: 9px; }
.mode {
  --mode-fill: #25151f;
  display: flex; align-items: center; text-align: left;
  min-height: 66px;
  width: 100%;
  position: relative;
  isolation: isolate;
  border: 0;
  padding: 0 12px 0 13px;
  gap: 11px;
  background: transparent;
  transition: transform .16s ease, filter .16s ease;
}
.mode::before, .mode::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  background: #88435b;
}
.mode::after { inset: 1px; background: var(--mode-fill); }
.mode-quick { --mode-fill: linear-gradient(105deg, #a30e31, #e91943 57%, #ba1039); }
.mode-quick::before { background: #ff8da3; }
.mode:active:not(:disabled), .button:active:not(:disabled) { transform: translateY(2px); }
@media (hover: hover) { .mode:hover:not(:disabled), .button:hover:not(:disabled) { filter: brightness(1.17); } }
.mode:disabled { opacity: .72; }
.mode-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: 0 0 auto;
  color: #fff4f4;
  background: #160e16b0;
  transform: skewX(-9deg);
}
.mode-icon svg { width: 20px; height: 20px; transform: skewX(9deg); }
.mode-full .mode-icon { background: #64223c; color: #ffadbd; }
.mode-copy { display: grid; gap: 3px; flex: 1; white-space: nowrap; }
.mode-copy strong { font-size: 20px; line-height: 1.15; letter-spacing: .02em; }
.mode-copy small { font-size: 11px; color: #f6c9d2; }
.mode-lock, .mode-arrow { display: flex; align-items: center; flex: 0 0 auto; }
.mode-lock { gap: 3px; color: #ffc1d1; font-size: 10px; white-space: nowrap; }
.mode-lock svg { width: 13px; height: 13px; }
.mode-arrow { margin-left: auto; }
.mode-arrow svg { width: 23px; height: 23px; }
footer { margin-top: 14px; color: var(--muted); text-align: center; font-size: 10px; letter-spacing: .12em; }

.quiz-inner { padding: clamp(17px, 4svh, 34px) 24px max(16px, env(safe-area-inset-bottom)); }
.progress-meta { display: flex; align-items: baseline; justify-content: space-between; color: #d9aebc; font-size: 13px; }
.progress-meta strong { color: #ffd5df; letter-spacing: .12em; }
.progress-meta span { font: 600 15px var(--mono); }
.progress-meta b { color: var(--soft); font-size: 28px; line-height: 1; }
.progress { height: 4px; margin-top: 9px; background: #432430; overflow: hidden; }
.progress i { display: block; width: var(--progress); height: 100%; background: var(--hot); }
.question-card {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(136px, 24svh, 205px);
  padding: 18px 19px 20px;
  margin: clamp(13px, 3.4svh, 30px) 0 13px;
  border-inline-start: 3px solid var(--hot);
  background:
    repeating-linear-gradient(135deg, #ff709315 0 1px, transparent 1px 9px) right top / 31% 100% no-repeat,
    linear-gradient(130deg, #41202f, #21121b);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%);
}
.question-number {
  right: 11px; top: -12px; z-index: -1;
  position: absolute;
  color: #c5486c29;
  font: italic 900 clamp(82px, 25vw, 134px) / 1 var(--mono);
  letter-spacing: -.12em;
}
.question-card h1 { font-size: clamp(20px, 6vw, 28px); line-height: 1.46; text-wrap: pretty; }
.answers { display: grid; gap: 8px; }
.answer {
  background: #1e151b;
  border: 1px solid #452d39;
  text-align: left;
  min-height: clamp(45px, 7.1svh, 63px);
  padding: 6px 13px;
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
  font-weight: 680;
  font-size: 15px;
  transition: background-color .15s ease, border-color .15s ease;
}
@media (hover: hover) { .answer:hover { border-color: #c6637e; } }
.answer[aria-pressed="true"] { background: #731a37; border-color: var(--soft); }
.letter {
  font: italic 800 16px var(--mono);
  color: #ffc8d5;
  background: #512238;
  width: 32px; height: 30px;
  display: grid; place-items: center;
  transform: skewX(-7deg);
}
.radio { height: 13px; width: 13px; border: 1px solid #b1788d; border-radius: 50%; margin-left: auto; }
.answer[aria-pressed="true"] .radio { background: var(--soft); box-shadow: inset 0 0 0 2px #731a37; }
.scale-answers { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 4px 0 7px; }
.scale-answer {
  min-height: 48px;
  border: 1px solid var(--rowBorder);
  background: var(--rowBg);
  color: var(--muted);
  display: grid; place-items: center;
  font: 800 15px var(--mono);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
@media (hover: hover) { .scale-answer:hover { border-color: var(--soft); color: var(--paper); } }
.scale-answer[aria-pressed="true"] {
  background: var(--rowActive);
  border-color: var(--soft);
  color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--soft);
}
.scale-ends { display: grid; grid-template-columns: 1fr 1fr 1fr; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.scale-ends span:nth-child(2) { text-align: center; }
.scale-ends span:last-child { text-align: right; }
.quiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 11px; color: var(--muted); gap: 8px; }
.text-button {
  background: none;
  border: 0;
  color: #e3bcc8;
  font-weight: 650; font-size: 12px;
  min-height: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 0 3px;
}
.text-button:disabled { opacity: .45; }
.text-button svg { width: 15px; height: 15px; }

.result-hero { height: clamp(392px, 57svh, 510px); }
.result-character {
  position: absolute;
  top: 4%; right: -1%;
  width: min(89%, 450px); height: 94%;
  object-fit: contain; object-position: right top;
  filter: drop-shadow(2px 0 #fff2ed) drop-shadow(-2px 0 #fff2ed) drop-shadow(6px 8px #420924a6);
  animation: art-in .59s cubic-bezier(.2,.75,.2,1) both;
}
.result-id { position: absolute; inset: 0; z-index: 1; pointer-events: none; padding: 0 24px 19px; display: flex; flex-direction: column; justify-content: end; align-items: start; }
.fit { margin-bottom: 21px; display: grid; color: #fff6f6; transform: skewX(-8deg); }
.fit b {
  font: 900 clamp(50px, 16vw, 78px) / 1 var(--mono);
  letter-spacing: -.11em;
  text-shadow: 3px 3px #930a37, -1px -1px #100e10, 1px -1px #100e10, -1px 1px #100e10;
}
.fit b small { font-size: .48em; letter-spacing: 0; margin-left: 5px; }
.fit > span, .match-label {
  width: fit-content; font-size: 11px; background: #171019; color: #fdd1dd;
  padding: 4px 7px;
}
.match-label { background: #a20e37; color: #fff7f4; letter-spacing: .09em; transform: skewX(-8deg); }
.result-id h1 { font-size: clamp(35px, 10vw, 49px); line-height: 1.24; letter-spacing: -.075em; text-shadow: 2px 3px #901333; }
.result-caption { color: #f5acbf; font-size: 12px; letter-spacing: .14em; }
.result-body { padding: 0 24px max(22px, env(safe-area-inset-bottom)); }
.reading, .stats { margin-bottom: 18px; border: 1px solid #503142; background: linear-gradient(135deg, #271822, #1a131a); padding: 18px 16px; }
.reading h2, .stats h2 { color: #fff2f5; font-size: 21px; position: relative; padding-left: 12px; line-height: 1.25; }
.reading h2::before, .stats h2::before { content: ""; width: 4px; height: 82%; left: 0; top: 10%; background: var(--hot); position: absolute; transform: skewX(-10deg); }
.reading p { margin-top: 11px; color: #e2cfd7; font-size: 14px; line-height: 1.75; }
.reading-footer { display: grid; gap: 10px; border-top: 1px solid #583047; margin-top: 13px; padding-top: 10px; }
.reading .best-fit { color: #ffd3df; font-size: 12px; margin: 0; }
.best-fit span { color: #ff91a9; margin-right: 5px; }
.best-fit b { margin-left: 4px; font-family: var(--mono); }
.scores { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.scores li { display: grid; grid-template-columns: minmax(84px, auto) 1fr auto; gap: 9px; align-items: center; color: #fbd9e3; font-size: 13px; }
.scores li > span:first-child { font-weight: 750; }
.scores li > span small { display: block; font-size: 10px; color: #c3a5b4; font-weight: 400; }
.scores li > span .score-people { display: block; margin-top: 1px; font-size: 10px; font-style: normal; font-weight: 500; color: #b9c7e6; white-space: nowrap; }
.scores b { min-width: 60px; text-align: right; color: var(--soft); font: 750 16px var(--mono); }
.scores b small { color: #d4b4c2; font-size: 10px; }
.score-track { height: 5px; background: #532b40; }
.score-track i { width: var(--score); height: 100%; display: block; background: linear-gradient(90deg, #c51c4b, #ff7294); }
.result-actions { display: grid; gap: 8px; }
.button {
  min-height: 46px;
  display: flex; gap: 7px; justify-content: center; align-items: center;
  color: var(--paper);
  padding: 9px 10px;
  font: 750 14px var(--font);
  border: 1px solid transparent;
  text-decoration: none;
  transition: filter .15s ease, transform .15s ease;
}
.button svg { width: 17px; height: 17px; }
.button svg:nth-of-type(2) { width: 13px; height: 13px; opacity: .85; }
[data-test-unlocked="true"] .mode-lock,
[data-test-unlocked="true"] .result-actions .button svg:nth-of-type(2) { display: none; }
.button.primary { background: #ce1741; border-color: #ff6282; }
.button.secondary { background: #361b2a; border-color: #9d516b; }
.button.ghost { background: #231620; border-color: #523448; color: #eed3de; }
.button:disabled { opacity: .66; }
dialog {
  max-height: calc(100svh - 26px);
  width: min(calc(100% - 36px), 370px);
  border: 1px solid #a44a68;
  border-top: 4px solid var(--hot);
  background: #21141f;
  color: var(--paper);
  padding: 20px;
  box-shadow: 0 14px 70px #060307ba;
}
dialog::backdrop { background: #0d070bba; backdrop-filter: blur(4px); }
.dialog-icon { width: 36px; height: 36px; display: grid; place-items: center; background: #6c2341; transform: skewX(-8deg); margin-bottom: 9px; }
.dialog-icon svg { width: 20px; height: 20px; transform: skewX(8deg); }
dialog h2 { font-size: 24px; }
dialog p { font-size: 14px; color: #ecd1dc; margin: 8px 0 17px; line-height: 1.6; }
dialog .button { width: 100%; margin-top: 7px; }
.action-checks:not([hidden]) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.action-checks { list-style: none; margin: -4px 0 14px; padding: 0; }
.action-checks li { padding: 7px 3px; text-align: center; font-size: 13px; color: #e9c7d5; border: 1px solid #553142; }
.action-checks li[data-done="true"] { color: #ffb7c9; background: #462131; border-color: #9b5069; }
.action-checks small { display: block; margin-top: 2px; font-size: 10px; }
dialog[data-kind="reading"] { width: min(calc(100% - 36px), 560px); padding: clamp(20px, 4vw, 32px); }
dialog[data-kind="reading"] h2 { font-size: clamp(20px, 4vw, 27px); outline: none; }
dialog .dialog-reading { margin: 14px 0 22px; color: #f1dce5; font-size: 15px; line-height: 1.85; }
.toast {
  position: fixed; z-index: 3;
  inset: auto auto max(18px, env(safe-area-inset-bottom)) 50%;
  transform: translate(-50%, 9px);
  max-width: min(calc(100% - 30px), 390px);
  width: max-content;
  pointer-events: none; opacity: 0;
  background: #391f2f; color: #fff5f7; border: 1px solid #9c4e69;
  padding: 9px 15px; font-size: 13px;
  box-shadow: 0 4px 24px #190b14b5;
  transition: opacity .15s ease, transform .15s ease;
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes art-in { from { opacity: 0; transform: translate(22px, 9px) scale(1.025); } }
@keyframes field-in { from { opacity: .34; transform: translateX(24px); } }
@keyframes spark { from { opacity: .57; transform: scale(.82); } to { opacity: 1; transform: scale(1.05); } }

@media (max-width: 500px) {
  .app { border-inline: 0; }
  .brand { gap: 7px; font-size: 12px; letter-spacing: .04em; }
  .brand-icon { width: 25px; height: 25px; }
  .header-tag { display: none; }
  .header-tools { gap: 8px; }
  .author-home { font-size: 11px; padding: 0 7px; }
  .author-home svg { width: 13px; height: 13px; }
  .header-exit { font-size: 11px; padding: 0 7px; }
}
@media (max-width: 355px) {
  .masthead, .home-controls, .quiz-inner, .result-body { padding-inline: 17px; }
  .hero-copy { left: 17px; }
  .mode { gap: 7px; }
  .mode-icon { width: 32px; height: 32px; }
}
@media (max-height: 680px) {
  .masthead { min-height: 46px; }
  .hero { min-height: max(262px, calc(100svh - 284px)); }
  .cast { min-height: 40px; margin-bottom: 8px; }
  .cast-portraits img { width: 27px; height: 27px; }
  .mode { min-height: 57px; }
  footer { margin-top: 9px; }
  .quiz-inner { padding-top: 16px; }
  .question-card { margin-top: 13px; }
}

.test-tabs-mobile-note { display: none; }
@media (min-width: 880px) and (orientation: landscape) {
  .app { --desktop-pad: clamp(26px, 3.7vw, 65px); width: min(100%, 1600px); }
  .app[data-page="home"], .app[data-page="result"] {
    display: grid;
    grid-template-rows: auto 1fr;
  }
  .app[data-page="home"] { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .app[data-page="result"] { grid-template-columns: minmax(0, 43fr) minmax(0, 57fr); }
  .masthead { grid-column: 1 / -1; min-height: 58px; padding-inline: var(--desktop-pad); }
  .header-tools .fullscreen { display: inline-flex; padding-inline: 9px; }
  .brand { font-size: 15px; }

  .hero { min-height: 0; max-height: none; }
  .hero, .result-hero { border-right: 1px solid var(--line); }
  .hero-orbit { width: 68%; }
  .hero-character {
    top: 3%; right: 4%;
    width: 80%; height: 107%;
    filter: drop-shadow(3px 0 #ffeded) drop-shadow(-2px 0 #ffeded) drop-shadow(0 3px #ffeded) drop-shadow(11px 13px #0a0620a6);
  }
  .hero-copy { left: var(--desktop-pad); bottom: clamp(22px, 8svh, 90px); }
  .hero h1 span { font-size: clamp(27px, 3vw, 50px); padding-inline: 10px 15px; }
  .hero h1 strong { font-size: clamp(60px, 7vw, 112px); padding-inline: 10px 30px; }
  .hero-copy p { font-size: clamp(14px, 1.2vw, 19px); margin-top: 24px; }
  .home-controls {
    display: grid;
    align-content: center;
    padding: 26px var(--desktop-pad);
    background: radial-gradient(ellipse at 100% 0, var(--heroBg1), transparent 68%), var(--ink);
  }
  .desktop-mode-title { display: block; font-size: clamp(25px, 2.4vw, 38px); letter-spacing: -.05em; }
  .cast { min-height: 59px; font-size: 12px; margin-bottom: 18px; }
  .cast-portraits img { width: 35px; height: 35px; }
  .mode-select { gap: 12px; }
  .mode { min-height: clamp(65px, 10svh, 93px); padding-inline: 16px; }
  .mode-copy strong { font-size: clamp(20px, 2vw, 29px); }
  .mode-copy small { font-size: 12px; }
  .home-controls footer { margin-top: 22px; }

  .quiz-inner {
    width: 100%; margin-block: auto;
    display: grid; align-items: stretch;
    grid-template-columns: minmax(0, 1.24fr) minmax(0, 1fr);
    column-gap: clamp(24px, 3vw, 52px);
    row-gap: 12px;
    padding: clamp(18px, 5svh, 57px) var(--desktop-pad);
  }
  .progress-meta, .progress, .quiz-nav { grid-column: 1 / -1; }
  .progress-meta { font-size: 15px; }
  .progress-meta b { font-size: clamp(29px, 4.7svh, 48px); }
  .progress { margin: 0 0 10px; }
  .question-card { min-height: 0; margin: 0; padding: 24px clamp(22px, 3vw, 47px); }
  .question-card h1 { font-size: clamp(26px, 3.1vw, 49px); }
  .question-number { font-size: clamp(92px, 15vw, 200px); }
  .answers { gap: 10px; }
  .answer { min-height: clamp(47px, 8.2svh, 79px); font-size: clamp(15px, 1.55vw, 24px); }
  .quiz-nav { margin: 0; font-size: 13px; }

  .result-hero { height: auto; min-height: 400px; }
  .result-character { top: 3%; right: 3%; width: 88%; height: 99%; }
  .result-id { padding: 0 var(--desktop-pad) clamp(24px, 7svh, 76px); }
  .fit b { font-size: clamp(64px, 7.5vw, 105px); }
  .result-id h1 { font-size: clamp(37px, 5.1vw, 78px); }
  .result-caption { font-size: 14px; }
  .result-body {
    min-width: 0;
    display: grid; align-content: center; gap: clamp(9px, 1.8svh, 20px);
    padding: clamp(14px, 3svh, 35px) clamp(18px, 3.1vw, 48px);
  }
  .reading, .stats { margin: 0; padding: clamp(13px, 2svh, 20px) clamp(12px, 1.6vw, 24px); }
  .reading p { margin-top: 8px; line-height: 1.65; }
  .reading-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding-top: 7px; }
  .reading-more { min-height: 34px; padding: 5px 9px; font-size: 12px; }
  .stats {
    display: grid; align-items: center;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: clamp(8px, 1.35vw, 20px);
  }
  .stats h2 { grid-column: 1 / -1; }
  .scores { gap: clamp(6px, 1svh, 12px); }
  .scores li { grid-template-columns: max-content minmax(0, 1fr) auto; gap: 7px; }
  .scores li > span small { display: none; }
  .scores b { min-width: 0; white-space: nowrap; }
  .result-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr); }
  .result-actions .button { gap: 5px; padding-inline: 4px; }
  .result-body footer { margin-top: 0; }
}

@media (min-width: 880px) and (orientation: landscape) and (max-height: 650px) {
  .masthead { min-height: 49px; }
  .result-body { padding-block: 12px; gap: 8px; }
  .reading, .stats { padding-block: 10px; }
  .reading h2, .stats h2 { font-size: 18px; }
  .reading p { font-size: 13px; line-height: 1.55; }
  .reading-footer { margin-top: 6px; padding-top: 6px; }
  .reading-more { min-height: 31px; }
  .result-actions .button { min-height: 40px; }
}

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

/* ============================================================
 * 二次元测试 · 外观
 * 默认配色 = MBTI（星紫 / 电光青 / 金）
 * 新增测试时在 :root 之后追加：
 *   body[data-test="<theme>"] { --ink: ...; --hot: ...; ... }
 * 切换测试时 app.js 会把 body[data-test] 设成新主题
 * ============================================================ */
:root {
  color-scheme: dark;
  --ink: #0b0a1e;
  --paper: #f3f0ff;
  --muted: #a49ec9;
  --line: #2b2650;
  --hot: #7b5cff;
  --soft: #59d0ff;
  --gold: #ffd76a;
  --blood: #ff5d7a;
  --bg1: #241a5e;
  --bg2: #0d0a20;
  --bg3: #07050f;
  --fieldA: #1b1450;
  --fieldB: #3a1a6e;
  --heroBg1: #160f36;
  --heroBg2: #0b0a1e;
  --grid: #b8a6ff12;
  --stripe: #f3f0ff;
  --chart: #59d0ff;
  --orbit: #7b5cff;
  --sparkShadow: #2a1a5e;
  --strongShadow: #2a1a5e;
  --cardA: #17123a;
  --cardB: #0f0c26;
  --accentText: #cfc6ff;
  --rowBg: #151133;
  --rowBorder: #2e2858;
  --rowActive: #1e1850;
  --dialogBg: #120e2c;
  --dialogBorder: #3a3270;
  --modeFullA: #1a1448;
  --modeFullB: #241a5e;
  --letterBg: #241a5e;
  --letterBorder: #6a5a20;
  --letterText: #ffe9b8;
  --matchBg: #3a2a8e;
  --tabBg: #151133;
  --tabActiveBg: linear-gradient(135deg, #7b5cff, #59d0ff);
  --tabActiveText: #07050f;
}

/* 动漫男主测试：暗红 / 金 */
body[data-test="dmnz"] {
  --ink: #120a0a;
  --paper: #fff1f2;
  --muted: #b89a9e;
  --line: #3a2024;
  --hot: #d92b4a;
  --soft: #ff8fa3;
  --gold: #ffd76a;
  --blood: #ff4b5c;
  --bg1: #3a0d14;
  --bg2: #120a0a;
  --bg3: #0a0607;
  --fieldA: #3a0d14;
  --fieldB: #5a1420;
  --heroBg1: #250a0e;
  --heroBg2: #120a0a;
  --grid: #ffb3c010;
  --stripe: #fff1f2;
  --chart: #ff8fa3;
  --orbit: #d92b4a;
  --sparkShadow: #5a1420;
  --strongShadow: #5a1420;
  --cardA: #1e0e12;
  --cardB: #150a0d;
  --accentText: #ffd6dc;
  --rowBg: #1a0d10;
  --rowBorder: #3a2024;
  --rowActive: #261218;
  --dialogBg: #180b0e;
  --dialogBorder: #4a2830;
  --modeFullA: #2a0e14;
  --modeFullB: #3a1420;
  --letterBg: #3a1420;
  --letterBorder: #6a5a20;
  --letterText: #ffe9b8;
  --matchBg: #5a1420;
  --tabBg: #1a0d10;
  --tabActiveBg: linear-gradient(135deg, #d92b4a, #ff8fa3);
  --tabActiveText: #0a0607;
}

body[data-test="wnnz"] {
  --ink: #070b0a;
  --paper: #f4efe3;
  --muted: #9aa8a1;
  --line: #24332e;
  --hot: #2f8f6b;
  --soft: #c9a227;
  --gold: #e6c15a;
  --blood: #c0392b;
  --bg1: #10251f;
  --bg2: #070b0a;
  --bg3: #040706;
  --fieldA: #0d211c;
  --fieldB: #153b30;
  --heroBg1: #0a1714;
  --heroBg2: #060a09;
  --grid: #d6c07a12;
  --stripe: #f4efe3;
  --chart: #c9a227;
  --orbit: #2f8f6b;
  --sparkShadow: #153b30;
  --strongShadow: #153b30;
  --cardA: #0c1512;
  --cardB: #08100e;
  --accentText: #eadfbf;
  --rowBg: #0b1411;
  --rowBorder: #24332e;
  --rowActive: #13211c;
  --dialogBg: #0a1210;
  --dialogBorder: #2b4038;
  --modeFullA: #0f201b;
  --modeFullB: #18382d;
  --letterBg: #18382d;
  --letterBorder: #5a4a20;
  --letterText: #f0dfa8;
  --matchBg: #18382d;
  --tabBg: #0b1411;
  --tabActiveBg: linear-gradient(135deg, #2f8f6b, #c9a227);
  --tabActiveText: #06100c;
}

body[data-test="meimei"] {
  --ink: #150b12;
  --paper: #fff7f2;
  --muted: #c4aab6;
  --line: #3c2331;
  --hot: #e86a92;
  --soft: #ffb3c9;
  --gold: #ffe1a3;
  --blood: #ff5c7a;
  --bg1: #3b1730;
  --bg2: #180c15;
  --bg3: #0d060a;
  --fieldA: #3b1730;
  --fieldB: #5a2443;
  --heroBg1: #2a1020;
  --heroBg2: #150b12;
  --grid: #ffd6e60f;
  --stripe: #fff7f2;
  --chart: #ffb3c9;
  --orbit: #e86a92;
  --sparkShadow: #5a2443;
  --strongShadow: #5a2443;
  --cardA: #241019;
  --cardB: #180c12;
  --accentText: #ffe1ea;
  --rowBg: #1d0f17;
  --rowBorder: #3c2331;
  --rowActive: #2b1621;
  --dialogBg: #1a0d13;
  --dialogBorder: #4a2a3a;
  --modeFullA: #2a1020;
  --modeFullB: #3b1730;
  --letterBg: #3b1730;
  --letterBorder: #6a4a20;
  --letterText: #ffe6b8;
  --matchBg: #5a2443;
  --tabBg: #1d0f17;
  --tabActiveBg: linear-gradient(135deg, #e86a92, #ffd1a1);
  --tabActiveText: #1a0810;
}

body[data-test="xp"] {
  --ink: #071018;
  --paper: #f2fbff;
  --muted: #96b4c7;
  --line: #1d3444;
  --hot: #38bdf8;
  --soft: #67e8f9;
  --gold: #fbbf24;
  --blood: #fb7185;
  --bg1: #0d2b3d;
  --bg2: #071018;
  --bg3: #040a10;
  --fieldA: #0b2433;
  --fieldB: #134c63;
  --heroBg1: #081a26;
  --heroBg2: #071018;
  --grid: #7dd3fc12;
  --stripe: #f2fbff;
  --chart: #67e8f9;
  --orbit: #38bdf8;
  --sparkShadow: #134c63;
  --strongShadow: #134c63;
  --cardA: #0a1c27;
  --cardB: #07131c;
  --accentText: #d9f6ff;
  --rowBg: #0a1922;
  --rowBorder: #1d3444;
  --rowActive: #102a38;
  --dialogBg: #08161f;
  --dialogBorder: #24465a;
  --modeFullA: #0d2836;
  --modeFullB: #134052;
  --letterBg: #134052;
  --letterBorder: #6a5420;
  --letterText: #ffe6b8;
  --matchBg: #134c63;
  --tabBg: #0a1922;
  --tabActiveBg: linear-gradient(135deg, #38bdf8, #fbbf24);
  --tabActiveText: #04121a;
}


body[data-test="zhenying"] {
  --ink: #0e0c09;
  --paper: #fff7e6;
  --muted: #c9b894;
  --line: #3a2f1e;
  --hot: #b8862f;
  --soft: #e8c76a;
  --gold: #ffd98a;
  --blood: #b03a5b;
  --bg1: #2a1f10;
  --bg2: #0e0c09;
  --bg3: #070604;
  --fieldA: #241a0d;
  --fieldB: #4a3518;
  --heroBg1: #1a1309;
  --heroBg2: #0e0c09;
  --grid: #ffd98a10;
  --stripe: #fff7e6;
  --chart: #e8c76a;
  --orbit: #b8862f;
  --sparkShadow: #4a3518;
  --strongShadow: #4a3518;
  --cardA: #1a140b;
  --cardB: #120e08;
  --accentText: #f4e4bf;
  --rowBg: #171108;
  --rowBorder: #3a2f1e;
  --rowActive: #241a0d;
  --dialogBg: #141009;
  --dialogBorder: #4a3a22;
  --modeFullA: #241a0d;
  --modeFullB: #3a2a12;
  --letterBg: #3a2a12;
  --letterBorder: #6a5420;
  --letterText: #ffe6b8;
  --matchBg: #4a3518;
  --tabBg: #171108;
  --tabActiveBg: linear-gradient(135deg, #b8862f, #ffd98a);
  --tabActiveText: #140e06;
}

body[data-test="zhapi"] {
  --ink: #0b0805;
  --paper: #fff3d8;
  --muted: #d6b58a;
  --line: #4a2f18;
  --hot: #ff7a3c;
  --soft: #ffc857;
  --gold: #ffd166;
  --blood: #ff5c72;
  --bg1: #2a1408;
  --bg2: #0b0805;
  --bg3: #060403;
  --fieldA: #241207;
  --fieldB: #5a2c10;
  --heroBg1: #1a0e07;
  --heroBg2: #0b0805;
  --grid: #ffcf6a12;
  --stripe: #fff3d8;
  --chart: #ffc857;
  --orbit: #ff7a3c;
  --sparkShadow: #5a2c10;
  --strongShadow: #5a2c10;
  --cardA: #1b1008;
  --cardB: #120b06;
  --accentText: #ffe6b8;
  --rowBg: #1a1008;
  --rowBorder: #4a2f18;
  --rowActive: #2a1a0c;
  --dialogBg: #160d07;
  --dialogBorder: #5a3a1e;
  --modeFullA: #2a1a0c;
  --modeFullB: #4a2a10;
  --letterBg: #4a2a10;
  --letterBorder: #8a5a20;
  --letterText: #ffe6b8;
  --matchBg: #5a2c10;
  --tabBg: #1a1008;
  --tabActiveBg: linear-gradient(135deg, #ff7a3c, #ffd166);
  --tabActiveText: #1a0e07;
}

body[data-test="taluo"] {
  --ink: #0d0a16;
  --paper: #f7f0ff;
  --muted: #b7aecb;
  --line: #34264a;
  --hot: #8b5cf6;
  --soft: #c9a2ff;
  --gold: #ffd98a;
  --blood: #ff5c8a;
  --bg1: #1b1230;
  --bg2: #0d0a16;
  --bg3: #07050c;
  --fieldA: #1b1230;
  --fieldB: #2a1846;
  --heroBg1: #160f27;
  --heroBg2: #0d0a16;
  --grid: #d9c7ff12;
  --stripe: #f7f0ff;
  --chart: #c9a2ff;
  --orbit: #8b5cf6;
  --sparkShadow: #2a1846;
  --strongShadow: #2a1846;
  --cardA: #171024;
  --cardB: #100b1b;
  --accentText: #e8ddff;
  --rowBg: #140e21;
  --rowBorder: #34264a;
  --rowActive: #211633;
  --dialogBg: #120c1d;
  --dialogBorder: #40305a;
  --modeFullA: #1b1230;
  --modeFullB: #2a1846;
  --letterBg: #2a1846;
  --letterBorder: #6a5a20;
  --letterText: #ffe6b8;
  --matchBg: #2a1846;
  --tabBg: #140e21;
  --tabActiveBg: linear-gradient(135deg, #8b5cf6, #ffd98a);
  --tabActiveText: #12091f;
}

body[data-test="qian"] {
  --ink: #140a0c;
  --paper: #fff6ea;
  --muted: #c9b5a5;
  --line: #4a2520;
  --hot: #b8343e;
  --soft: #e8b56a;
  --gold: #ffd98a;
  --blood: #d94b4b;
  --bg1: #2a1013;
  --bg2: #140a0c;
  --bg3: #090506;
  --fieldA: #3a1014;
  --fieldB: #5a1a20;
  --heroBg1: #2a0c10;
  --heroBg2: #100608;
  --grid: #ffd98a12;
  --stripe: #fff4e8;
  --chart: #e8b56a;
  --orbit: #b8343e;
  --sparkShadow: #3a1014;
  --strongShadow: #3a1014;
  --cardA: #24100f;
  --cardB: #160908;
  --accentText: #ffe6c7;
  --rowBg: #1e0d0d;
  --rowBorder: #4a2520;
  --rowActive: #331414;
  --dialogBg: #1e0d0d;
  --dialogBorder: #5a2a24;
  --modeFullA: #3a1014;
  --modeFullB: #5a1a20;
  --letterBg: #3a1014;
  --letterBorder: #7a5a2a;
  --letterText: #ffe6b8;
  --matchBg: #3a1014;
  --tabBg: #1e0d0d;
  --tabActiveBg: linear-gradient(135deg, #b8343e, #ffd98a);
  --tabActiveText: #1a0709;
}

html { background: #05070a; }
body {
  color: var(--paper);
  background:
    repeating-linear-gradient(138deg, transparent 0 123px, rgba(255,255,255,.03) 124px, transparent 125px 159px),
    radial-gradient(ellipse at 50% 20%, var(--bg1) 0, var(--bg2) 45%, var(--bg3) 78%);
}
.app { background: var(--ink); border-inline: 1px solid var(--line); box-shadow: 0 0 88px #030409cc; }
.masthead { border-bottom-color: var(--line); }
.brand-icon { background: linear-gradient(135deg, var(--hot), var(--soft)); color: var(--ink); }
.header-tag { color: var(--accentText); border-color: var(--line); }

/* 测试切换 */
.test-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 9px 14px 9px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
  z-index: 2;
}
.test-tabs {
  display: flex; gap: 7px; align-items: center;
  flex: 1 1 auto; min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.test-tabs::-webkit-scrollbar { display: none; }
.test-tabs.overflow { cursor: grab; }
.test-tabs.dragging { cursor: grabbing; user-select: none; }
.test-tab {
  flex: none;
  padding: 6px 13px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  color: var(--muted);
  background: var(--tabBg);
  border: 1px solid var(--rowBorder);
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}
.test-tab.active {
  background: var(--tabActiveBg);
  color: var(--tabActiveText);
  border-color: transparent;
  font-weight: 800;
}
.test-tab:active { opacity: .82; }
.test-tab.external { color: var(--accentText); }
.test-ext { margin-left: 4px; font-size: 10px; opacity: .72; }
.test-more, .history-more {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--gold);
  background: var(--cardB);
  color: var(--gold);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.test-more svg, .history-more svg { width: 18px; height: 18px; transition: transform .18s ease; }
.test-more.open, .history-more.open { background: var(--gold); color: var(--ink); }
.test-more.open svg, .history-more.open svg { transform: rotate(180deg); }
.test-more[hidden], .history-more[hidden] { display: none; }
.test-menu, .history-menu {
  position: absolute;
  top: calc(100% - 2px);
  right: 14px;
  z-index: 20;
  min-width: 170px;
  max-height: 60svh;
  overflow-y: auto;
  display: grid;
  gap: 4px;
  padding: 6px;
  background: var(--cardA);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px #0009;
}
.test-menu[hidden], .history-menu[hidden] { display: none; }
.test-menu-item, .history-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--paper);
  background: var(--rowBg);
  border: 1px solid var(--rowBorder);
}
.test-menu-item.active, .history-menu-item.active {
  background: var(--tabActiveBg);
  color: var(--tabActiveText);
  border-color: transparent;
}
.test-menu-item span, .history-menu-item span { font-size: 11px; }
.history-menu { right: 0; }

.hero, .result-hero {
  background-color: var(--heroBg1);
  background-image:
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 28px),
    radial-gradient(ellipse at 55% 26%, var(--heroBg1), var(--heroBg2) 78%);
}
.hero { min-height: clamp(270px, calc(100svh - 400px), 520px); }
.hero-field { background: linear-gradient(146deg, var(--fieldA) 3%, var(--hot) 55%, var(--fieldB)); }
.hero-stripe { background: repeating-linear-gradient(-31deg, var(--stripe) 0 1px, transparent 1px 7px); opacity: .22; }
.candle-chart { color: var(--chart); opacity: .32; }
.hero-orbit {
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 0 0 12px rgba(255,255,255,.05), 0 0 0 24px rgba(255,255,255,.03);
  background-image: radial-gradient(circle, rgba(255,255,255,.22) 0 .7px, transparent 1px);
}
.hero-character, .result-character {
  top: 8%; right: 5%;
  width: min(62%, 330px); height: auto; aspect-ratio: 1;
  object-fit: cover; object-position: center top;
  border-radius: 50%;
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 10px rgba(255,255,255,.06), 0 0 0 22px rgba(0,0,0,.18), 10px 14px 0 #0a0a0a99;
  filter: none;
  background: var(--cardA);
}
.result-character { top: 6%; width: min(60%, 320px); }
.hero::after, .result-hero::after {
  background: linear-gradient(0deg, var(--ink) 0%, var(--ink) 11%, transparent 55%);
}
.spark { color: var(--gold); text-shadow: 2px 2px var(--sparkShadow); font-weight: 900; }
.spark-one { font-size: 30px; }
.spark-two { font-size: 21px; }
.hero h1 span { background: var(--cardB); box-shadow: 5px 4px var(--strongShadow); }
.hero h1 strong {
  background: linear-gradient(135deg, var(--hot), var(--soft));
  color: var(--ink);
  text-shadow: 3px 3px var(--strongShadow);
}
.hero-copy p { color: var(--accentText); }
.cast { color: var(--accentText); border-bottom-color: var(--line); }
.cast-portraits img { border-color: var(--gold); background: var(--cardA); }
.mode::before { background: var(--fieldA); }
.mode::after { background: var(--mode-fill); }
.mode-quick { --mode-fill: linear-gradient(105deg, var(--fieldA), var(--hot) 57%, var(--fieldB)); }
.mode-quick::before { background: var(--soft); }
.mode-full { --mode-fill: linear-gradient(105deg, var(--modeFullA), var(--modeFullB) 57%, var(--modeFullA)); }
.mode-full::before { background: var(--rowBorder); }
.mode-icon { background: var(--cardB); color: var(--paper); border: 1px solid var(--line); }
.mode-full .mode-icon { background: var(--modeFullA); color: var(--soft); }
.mode-copy small { color: var(--accentText); }
.mode-badge {
  color: var(--gold); font-size: 10px; white-space: nowrap;
  border: 1px solid #6a5a20; background: #2a2410;
  padding: 3px 6px; transform: skewX(-9deg);
}
.mode-arrow { color: var(--accentText); }
.quota-line { margin: 12px 0 0; text-align: center; font-size: 11px; color: var(--gold); letter-spacing: .05em; }
.quota-line.empty { color: var(--blood); }
.home-links { margin-top: 8px; display: flex; justify-content: center; }
.home-links .text-button { color: var(--accentText); font-size: 11px; }
.home-stat { display: block; margin-top: 5px; color: var(--gold); font-size: 10px; letter-spacing: .05em; }
.result-stat { display: block; margin-top: 5px; color: var(--gold); font-size: 10px; }
footer { color: var(--muted); }
.progress-meta { color: var(--accentText); }
.progress-meta strong { color: var(--paper); }
.progress-meta b { color: var(--soft); }
.progress { background: var(--rowBg); }
.progress i { background: linear-gradient(90deg, var(--hot), var(--soft)); }
.question-card {
  border-inline-start: 3px solid var(--soft);
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 1px, transparent 1px 9px) right top / 31% 100% no-repeat,
    linear-gradient(130deg, var(--cardA), var(--cardB));
}
.question-number { color: rgba(255,255,255,.08); }
.answer { background: var(--rowBg); border-color: var(--rowBorder); }
@media (hover: hover) { .answer:hover { border-color: var(--soft); } }
.answer[aria-pressed="true"] { background: var(--rowActive); border-color: var(--soft); }
.letter {
  color: var(--letterText); background: var(--letterBg); border: 1px solid var(--letterBorder);
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.radio { border-color: var(--muted); }
.answer[aria-pressed="true"] .radio { background: var(--soft); box-shadow: inset 0 0 0 2px var(--rowActive); }
.quiz-nav { color: var(--muted); }
.text-button { color: var(--accentText); }
.result-id { color: var(--paper); }
.fit b {
  color: var(--paper);
  text-shadow: 3px 3px var(--strongShadow), -1px -1px var(--ink), 1px -1px var(--ink), -1px 1px var(--ink), 1px 1px var(--ink);
}
.fit > span { background: var(--cardB); color: var(--accentText); }
.match-label { background: var(--matchBg); color: var(--paper); }
.result-id h1 { color: var(--paper); text-shadow: 2px 3px var(--strongShadow); }
.result-caption { color: var(--soft); }
.reading, .stats, .top5 {
  border-color: var(--rowBorder);
  background: linear-gradient(135deg, var(--cardA), var(--cardB));
}
.reading h2, .stats h2, .top5 h2 { color: var(--paper); }
.reading h2::before, .stats h2::before, .top5 h2::before { background: var(--soft); }
.reading p { color: var(--paper); }
.reading-footer { border-top-color: var(--rowBorder); }
.best-fit { color: var(--accentText); }
.best-fit span { color: var(--soft); }
.best-fit b { color: var(--gold); }
.scores li { color: var(--paper); }
.scores li > span small { color: var(--muted); }
.scores b { color: var(--soft); }
.scores b small { color: var(--muted); }
.score-track { background: var(--rowBg); }
.score-track i { background: linear-gradient(90deg, var(--hot), var(--soft)); }
.stats { display: block; }
.stats.locked { display: block; text-align: center; }
.stats-lock {
  margin: 14px 0; display: flex; align-items: center; justify-content: center;
  gap: 7px; color: var(--accentText); font-size: 12px; line-height: 1.6;
}
.stats-lock svg { width: 18px; height: 18px; color: var(--gold); }
.stats.locked .button { width: 100%; }
.result-actions .button { width: 100%; }
.button { clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.button.primary {
  background: linear-gradient(135deg, var(--hot), var(--soft));
  border-color: var(--soft);
  color: var(--ink);
}
.button.secondary { background: var(--cardA); border-color: var(--rowBorder); color: var(--paper); }
.button.ghost { background: var(--cardB); border-color: var(--rowBorder); color: var(--accentText); }
.reading-more { width: 100%; }
.top5 { margin-bottom: 18px; padding: 18px 16px; border: 1px solid var(--rowBorder); }
.top5-list { display: grid; gap: 8px; margin-top: 12px; }
.top5-row {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 8px; background: var(--rowBg); border: 1px solid var(--rowBorder);
}
.top5-rank { width: 18px; text-align: center; font: 800 12px var(--mono); color: var(--gold); }
.top5-avatar {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--gold); background: var(--cardA); flex: none;
}
.top5-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.top5-main b { font-size: 14px; }
.top5-main small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top5-pct { font: 750 15px var(--mono); color: var(--soft); }
.top5-lock { color: var(--gold); }
.top5-lock svg { width: 15px; height: 15px; }
.xp-combo {
  display: grid; gap: 3px; margin: 12px 0 12px; padding: 10px 12px;
  background: var(--rowBg); border: 1px solid var(--rowBorder);
}
.xp-combo b {
  color: var(--gold); font-size: clamp(10px, 3.05vw, 13px); line-height: 1.5;
  letter-spacing: .02em; white-space: nowrap;
}
.xp-combo small { color: var(--muted); font-size: 10.5px; }
.fit.xp-fit b {
  display: grid; gap: 2px; font-size: clamp(14px, 4.2vw, 20px);
  line-height: 1.35; letter-spacing: .01em; font-family: var(--font);
  white-space: nowrap;
}
.fit.xp-fit b span { display: block; }
.xp-binary-legend {
  display: flex; align-items: center; gap: 5px; margin: 2px 0 4px;
  color: var(--muted); font-size: 10px;
}
.xp-binary-legend i { width: 8px; height: 8px; display: inline-block; }
.xp-binary-legend i.same { background: #5fd0a0; }
.xp-binary-legend i.diff { background: #6b2a35; }
.xp-dots { display: inline-flex; align-items: center; gap: 2px; }
.xp-dots i { display: block; width: 5px; height: 11px; border-radius: 1px; }
.xp-dots i.same { background: #5fd0a0; }
.xp-dots i.diff { background: #6b2a35; }
.xp-bi-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.xp-bi {
  display: grid; gap: 5px; padding-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.xp-bi:first-child { border-top: 0; padding-top: 0; }
.xp-bi-head {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  color: var(--muted); font-size: 11px;
}
.xp-bi-head > span:last-child { text-align: right; }
.xp-bi-tag {
  justify-self: center; padding: 2px 8px; border: 1px solid; white-space: nowrap;
  font-size: 9.5px; font-weight: 700; line-height: 1.4;
}
.xp-bi.same .xp-bi-tag { color: #5fd0a0; border-color: #2f6b55; background: #0e2a20; }
.xp-bi.diff .xp-bi-tag { color: #fb7185; border-color: #6b2a35; background: #2a0f15; }
.xp-bi-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xp-bi-side {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 9px; background: var(--rowBg); border: 1px solid var(--rowBorder);
}
.xp-bi-side em { font-style: normal; color: var(--muted); font-size: 9.5px; }
.xp-bi-side b { color: var(--paper); font-size: 13px; white-space: nowrap; }
.xp-bi-side.you { border-color: rgba(251, 191, 36, .45); }
.xp-bi-side.role { border-color: rgba(255, 255, 255, .18); }
.top5-pct small { color: var(--muted); font-size: 10px; font-weight: 600; }
@media (max-width: 879px) {
  .xp-bi-list { gap: 7px; }
  .xp-bi-head { gap: 6px; }
  .xp-bi-tag { font-size: 9px; padding: 2px 6px; }
  .xp-bi-side { padding: 6px 7px; }
}
.top5-pct small { color: var(--muted); font-size: 10px; font-weight: 600; }
@media (max-width: 879px) {
  .xp-compare-list { gap: 10px; }
  .xp-bar-row { grid-template-columns: 14px minmax(0, 1fr) 35px; gap: 5px; }
  .xp-compare-head { gap: 6px; }
  .xp-fit-tag { font-size: 9px; padding: 2px 5px; }
}

/* 阵营测试：二维坐标与角色列表 */
.zy-hero .result-id h1 { font-size: clamp(34px, 9vw, 58px); line-height: 1.15; }
.zy-hero-scores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.zy-hero-scores span {
  padding: 4px 9px; border: 1px solid var(--rowBorder); background: var(--rowBg);
  color: var(--muted); font-size: 11px;
}
.zy-hero-scores b { margin-left: 5px; color: var(--gold); font: 800 18px var(--mono); }
.zy-hero-scores em { font-style: normal; color: var(--muted); font-size: 10px; }
.zy-coord canvas { display: block; width: 100%; max-width: 380px; height: auto; margin: 10px auto 6px; }
.zy-score-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 4px; }
.zy-score {
  display: flex; align-items: baseline; gap: 6px; padding: 10px 12px;
  background: var(--rowBg); border: 1px solid var(--rowBorder);
}
.zy-score span { color: var(--muted); font-size: 11px; }
.zy-score b { color: var(--gold); font: 800 26px var(--mono); }
.zy-score small { color: var(--muted); font-size: 10px; }
.zy-score em { font-style: normal; color: var(--muted); font-size: 10px; }
.zy-chart-note { margin: 4px 0 0; text-align: center; color: var(--muted); font-size: 10px; }
.zy-role-num { width: 18px; text-align: center; font: 800 12px var(--mono); color: var(--gold); }
.zy-role-score { color: var(--muted); font-size: 9.5px; }
.zy-close { flex: none; display: grid; justify-items: end; gap: 1px; text-align: right; white-space: nowrap; }
.zy-close em { font-style: normal; color: var(--muted); font-size: 9px; }
.zy-close b { color: var(--soft); font: 750 15px var(--mono); }
.zy-row { cursor: default; }
@media (max-width: 879px) {
  .zy-score-row { gap: 8px; }
  .zy-score { padding: 8px 9px; }
  .zy-score b { font-size: 22px; }
  .zy-hero-scores span { font-size: 10px; }
}

.top5-pending { color: var(--muted); font: 750 15px var(--mono); }
.history-page { padding: 22px 24px max(22px, env(safe-area-inset-bottom)); }
.page-title {
  color: var(--paper); font-size: 28px; line-height: 1.25;
  position: relative; padding-left: 12px;
}
.page-title::before {
  content: ""; width: 4px; height: 82%; left: 0; top: 10%;
  background: var(--soft); position: absolute; transform: skewX(-10deg);
}
.page-sub { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.history-filter-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-top: 14px;
}
.history-filters {
  display: flex; gap: 6px; align-items: center; overflow-x: auto;
  flex: 1 1 auto; min-width: 0;
  margin-top: 0;
  padding-bottom: 2px; scrollbar-width: none;
}
.history-filters::-webkit-scrollbar { display: none; }
.history-filters.overflow { cursor: grab; }
.history-filters.dragging { cursor: grabbing; user-select: none; }
.filter-tab {
  flex: none; padding: 5px 11px; font-size: 11.5px; font-weight: 700;
  color: var(--muted); background: var(--tabBg); border: 1px solid var(--rowBorder);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  white-space: nowrap;
}
.filter-tab.active { background: var(--tabActiveBg); color: var(--tabActiveText); border-color: transparent; }
.history-list { display: grid; gap: 9px; margin-top: 14px; }
.history-row {
  display: flex; align-items: center; gap: 11px; width: 100%;
  text-align: left; padding: 11px 12px;
  background: var(--rowBg); border: 1px solid var(--rowBorder); color: var(--paper);
  font: inherit;
}
.history-row:active { background: var(--rowActive); }
.history-avatar {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover;
  border: 1.5px solid var(--gold); background: var(--cardA); flex: none;
}
.history-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.history-main b { font-size: 15px; }
.history-main small { color: var(--muted); font-size: 11px; }
.history-pct {
  display: grid; justify-items: end; gap: 2px;
  color: var(--soft); font: 750 16px var(--mono);
}
.history-pct small { color: var(--muted); font: 400 9px var(--font); }
.history-pct svg { width: 15px; height: 15px; color: var(--gold); }
.history-empty { text-align: center; padding: 56px 0; color: var(--muted); }
.history-empty span { display: block; font-size: 15px; color: var(--accentText); }
.history-empty small { display: block; margin-top: 6px; font-size: 12px; }
.history-export { display: flex; margin: 18px auto 0; align-items: center; gap: 6px; font-size: 12px; }
dialog {
  background: var(--dialogBg);
  border-color: var(--dialogBorder);
  border-top-color: var(--soft);
  color: var(--paper);
  overflow-y: auto;
}
dialog::backdrop { background: #04060bba; backdrop-filter: blur(4px); }
.dialog-icon { background: var(--cardA); color: var(--soft); }
dialog p { color: var(--accentText); }
.action-checks li { color: var(--accentText); border-color: var(--rowBorder); }
.action-checks li[data-done="true"] { color: #ffe9b8; background: #2a2410; border-color: #6a5a20; }
.action-checks li[data-done="miss"] { color: #ffb4bc; background: #2a1016; border-color: #6a2030; }
.action-checks.checks-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.action-checks.checks-1 { grid-template-columns: 1fr; }
.toast {
  background: var(--cardA); color: var(--paper); border-color: var(--dialogBorder);
  box-shadow: 0 4px 24px #04060bb5;
}
@media (min-width: 880px) and (orientation: landscape) {
  .home-controls { background: radial-gradient(ellipse at 100% 0, var(--heroBg1), transparent 68%), var(--ink); }
  .stats { display: block; }
  .hero-character { top: 8%; right: 8%; width: min(48%, 360px); }
  .result-character { top: 6%; right: 8%; width: min(50%, 380px); }
}
@media (max-width: 355px) {
  .mode-badge { display: none; }
  .top5 { padding-inline: 12px; }
  .history-page { padding-inline: 17px; }
}
@keyframes art-in { from { transform: translate(22px, 9px) scale(1.025); } }
.top5-row {
  width: 100%; font: inherit; color: var(--paper); text-align: left; cursor: pointer;
}
.top5-row.selected {
  border-color: var(--soft);
  background: var(--rowActive);
  box-shadow: inset 3px 0 var(--gold);
}
.top5-row:active { background: var(--rowActive); }
.result-home { margin-top: 8px; width: 100%; }

/* 点评里的生活建议 */
.reading-advice {
  margin-top: 10px;
  padding-left: 10px;
  border-left: 2px solid var(--soft);
  color: var(--muted);
  font-size: .92em;
  line-height: 1.6;
}
.reading-advice b { color: var(--soft); font-weight: 700; }

/* 六维对比图 */
.radar-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 4px 0 12px;
}
.radar-block canvas { display: block; max-width: 100%; height: auto; }
.radar-key { display: flex; gap: 18px; font-size: 12px; color: var(--muted); }
.radar-key i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}
@media (max-width: 400px) {
  .brand { font-size: 11.5px; letter-spacing: 0; gap: 7px; }
  .brand-icon { width: 22px; height: 22px; }
  .brand-icon svg { width: 17px; height: 17px; }
}

/* 桌面端：hero 固定左栏，测试选择放到右栏顶部（参考原项目左右分栏） */
.test-tabs-title { display: none; }
@media (min-width: 880px) and (orientation: landscape) {
  .app[data-page="home"] { grid-template-rows: auto auto minmax(0, 1fr); }
  .masthead { grid-column: 1 / -1; grid-row: 1; }
  .hero { grid-column: 1; grid-row: 2 / 4; }
  .test-bar {
    grid-column: 2; grid-row: 2;
    align-self: start;
    min-width: 0;
    padding: 42px var(--desktop-pad) 12px;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .test-tabs { flex-wrap: nowrap; }
  .test-menu { right: var(--desktop-pad); }
  .test-tabs-title {
    display: block;
    position: absolute;
    top: 20px;
    left: var(--desktop-pad);
    font-size: 11px;
    letter-spacing: .16em;
    color: var(--muted);
    white-space: nowrap;
  }
  .test-tabs-title small {
    margin-left: 6px;
    font-size: 10px;
    letter-spacing: .04em;
    opacity: .72;
  }
  .test-tab { font-size: 12.5px; padding: 7px 15px; }
  .home-controls { grid-column: 2; grid-row: 3; }
  .hero, .result-hero { border-right-color: var(--line); }

  /* 结果页：左栏固定在首屏，契合度/角色名不再被右侧长内容推到折叠下方 */
  .result-hero {
    position: sticky;
    top: 0;
    height: 100svh;
    min-height: 0;
    align-self: start;
  }
  .result-id { padding-bottom: clamp(70px, 9svh, 96px); }
}

/* 背景音乐开关 */
.bgm-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  flex: none;
  border: 1px solid var(--line);
  background: var(--cardB);
  color: var(--accentText);
  -webkit-tap-highlight-color: transparent;
}
.bgm-toggle svg { width: 18px; height: 18px; }
.bgm-toggle.off { color: var(--muted); opacity: .55; }
.bgm-toggle:active { background: var(--rowActive); }

/* 龙族：暗红 / 金 */

/* 绝区零：霓虹黄 / 青 */

/* 蔚蓝档案：青蓝 / 白 */

/* 碧蓝航线：海蓝 / 白 */

/* hero联盟：金 / 蓝 */

/* 王者荣耀：金 / 赤 */

/* 约会大作战：紫 / 粉 */

/* 少女乐队番：粉 / 青 */

/* FGO：深蓝 / 金 */

/* 少女前线：枪铁 / 琥珀 */

/* AI娘：霓虹紫 / 青 */

/* NIKKE：橙 / 黑 / 金 */

/* 分享 */
.share-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  flex: none;
  border: 1px solid var(--line);
  background: var(--cardB);
  color: var(--accentText);
  -webkit-tap-highlight-color: transparent;
}
.share-toggle svg { width: 18px; height: 18px; }
.share-toggle:active { background: var(--rowActive); }

/* 头部文字按钮统一加框，和声音/分享开关保持一致 */
.author-home, .header-exit, .header-tools .fullscreen {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--cardB);
  color: var(--accentText);
  gap: 6px;
}
.author-home:active, .header-exit:active, .header-tools .fullscreen:active { background: var(--rowActive); }
.share-box {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 14px 0 18px;
}
.share-qr {
  width: 196px;
  height: 196px;
  padding: 8px;
  background: #fff;
  image-rendering: pixelated;
}
.share-link {
  width: 100%;
  padding: 10px 12px;
  background: var(--rowBg);
  border: 1px solid var(--rowBorder);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  word-break: break-all;
  text-align: center;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
}
.share-hint { color: var(--muted); font-size: 10px; text-align: center; }
dialog p.share-status {
  min-height: 18px; margin: 6px 0 0; text-align: center;
  font-size: 12px; color: var(--muted);
}
dialog p.share-status.ok { color: var(--gold); }
dialog p.share-status.fail { color: var(--blood); }

/* 赛马娘：草地绿 / 金 */

/* 战双帕弥什：红潮 / 冷白 / 金 */

/* 虚拟歌姬：初音青 / 樱花粉 */

/* VTB：霓虹粉 / 电光蓝 */


/* ============================================================
 * 二次元测试 · 新增组件
 * ============================================================ */

/* 三个测试模式 */
.mode-normal { --mode-fill: linear-gradient(105deg, var(--modeFullA), var(--modeFullB) 57%, var(--modeFullA)); }
.mode-normal::before { background: var(--rowBorder); }
.mode-normal .mode-icon { background: var(--modeFullA); color: var(--soft); }
.mode-deep { --mode-fill: linear-gradient(105deg, #2a1a5e, #3a2a8e 57%, #241a5e); }
.mode-deep::before { background: var(--gold); }
.mode-deep .mode-icon { background: #2a2410; color: var(--gold); }

/* 结果页：4 字母类型 */
.mbti-fit b {
  font-size: clamp(50px, 14vw, 72px);
  letter-spacing: .01em;
  font-family: var(--mono);
}
.mbti-fit > span { margin-top: 2px; }

/* 四项红蓝对照 */
.mbti-axis-list { display: grid; gap: 14px; margin-top: 14px; }
.mbti-axis { display: grid; gap: 7px; }
.axis-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.axis-head .pole { flex: 1; color: var(--muted); font-weight: 700; white-space: nowrap; }
.axis-head .pole.b { text-align: right; }
.axis-head .pole.on { color: var(--paper); }
.axis-head .axis-pcts { display: flex; align-items: center; gap: 4px; font: 700 12px var(--mono); color: var(--muted); }
.axis-head .axis-pcts b { color: var(--accentText); font-weight: 800; }
.axis-head .axis-pcts i { font-style: normal; opacity: .45; }
.axis-track { display: flex; height: 10px; background: var(--rowBg); border: 1px solid var(--rowBorder); overflow: hidden; }
.axis-track i { display: block; height: 100%; }
.axis-track .axis-a { background: linear-gradient(90deg, #3f7dff, #6fa2ff); }
.axis-track .axis-b { background: linear-gradient(90deg, #ff5d7a, #ff8fa3); }
.mbti-note { margin-top: 12px; font-size: 11px; color: var(--muted); line-height: 1.6; }

/* 同款角色 */
.mbti-char { cursor: default; }
.mbti-char-mark {
  flex: none; font-size: 10px; color: var(--gold);
  border: 1px solid #6a5a20; background: #2a2410; padding: 3px 6px;
}
.mbti-chars-sub { margin-top: 6px; font-size: 12px; color: var(--muted); }
.mbti-chars.locked .stats-lock { margin: 12px 0 14px; }
.reading-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.reading-tags span {
  font-size: 11px; color: var(--soft);
  border: 1px solid var(--rowBorder); background: var(--rowBg); padding: 3px 8px;
}
.reading.locked .reading-footer { margin-top: 8px; }

/* 历史记录右侧类型 */
.history-type {
  flex: none; font: 700 12px var(--font); color: var(--gold);
  background: var(--rowBg); border: 1px solid var(--rowBorder); padding: 4px 7px;
  white-space: nowrap;
}

/* 未解锁：抽象占位，不提前暴露同款角色 */
.result-char-lock {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 34% 28%, var(--cardA), var(--cardB) 68%),
    repeating-linear-gradient(-31deg, rgba(255,255,255,.06) 0 1px, transparent 1px 9px);
  color: var(--soft);
  font: 900 clamp(52px, 14vw, 96px) var(--mono);
  text-shadow: 4px 4px var(--strongShadow);
}

/* 桌面端：四项对照占满整行，不要被 .stats 的两列网格挤成半宽 */
@media (min-width: 880px) and (orientation: landscape) {
  .stats.mbti-axes { display: block; }
  .mbti-axis-list { gap: 12px; }
}

/* 窄屏：类型码不撑破 */
@media (max-width: 355px) {
  .mbti-fit b { font-size: 44px; }
  .axis-head { font-size: 11px; }
  .axis-head .axis-pcts { font-size: 11px; }
}

/* ============================================================
 * 无头像测试（网文男主）：文字印记
 * ============================================================ */
.seal-avatar {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-radius: 50%;
  color: #fffdf6;
  font: 800 10px var(--font);
  line-height: 1.05;
  text-align: center;
  border: 1.5px solid var(--gold);
  flex: none;
  letter-spacing: 0;
}
.cast-portraits .seal-avatar { width: 34px; height: 34px; margin-left: -4px; font-size: 9px; line-height: 1.02; }
.hero-character.hero-seal {
  width: min(66%, 330px);
  height: auto;
  aspect-ratio: 1;
  top: 13%; right: 9%;
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  object-fit: unset;
  font: 900 clamp(40px, 11vw, 64px) / 1.05 var(--font);
  text-align: center;
  color: var(--paper);
  text-shadow: 0 6px 0 rgba(0, 0, 0, .35);
  filter: drop-shadow(10px 12px 0 rgba(0, 0, 0, .28));
}
.history-avatar.seal-avatar { font-size: 12px; line-height: 1.02; }
.top5-avatar.top5-seal { width: 36px; height: 36px; display: flex; flex-direction: column; align-items: center; justify-content: center; font: 800 9.5px var(--font); line-height: 1.02; color: #fffdf6; }
.result-seal {
  position: absolute;
  top: 8%; right: 7%;
  width: min(64%, 350px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--gold);
  display: grid; place-items: center;
  box-shadow: 0 0 0 10px rgba(230, 193, 90, .06), 0 18px 40px rgba(0, 0, 0, .35);
  transform: rotate(-3deg);
  animation: art-in .6s cubic-bezier(.2, .75, .2, 1) both;
  z-index: 0;
}
.result-seal span {
  font: 900 clamp(38px, 10vw, 58px) / 1.06 var(--font);
  text-align: center;
  color: var(--paper);
  text-shadow: 0 8px 0 rgba(0, 0, 0, .35);
}
@media (min-width: 880px) and (orientation: landscape) {
  .hero-character.hero-seal { width: min(45%, 430px); right: 8%; }
  .result-seal { width: min(40%, 430px); right: 8%; }
}
@media (max-width: 355px) {
  .hero-character.hero-seal { width: 70%; }
}
.cast-seal {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 8px;
  border-radius: 15px;
  border: 1.5px solid var(--gold);
  color: #fffdf6;
  font: 800 10px var(--font);
  white-space: nowrap;
  flex: none;
}
.cast-seal + .cast-seal { margin-left: 4px; }

/* ============================================================
 * 二次元御神签测试
 * ============================================================ */
.qian-kicker {
  display: inline-block;
  color: var(--gold);
  font: 750 11px var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.qian-home-hero .hero-copy { max-width: 68%; }
.qian-hero-copy h1 { margin-top: 7px; }
.qian-home-seal {
  position: absolute; z-index: 1;
  right: 9%; top: 13%;
  width: 112px; height: 112px;
  display: grid; place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  background: radial-gradient(circle at 50% 38%, #5a1a20, #1a0709 72%);
  box-shadow: 0 18px 44px #05020b88, inset 0 0 26px #ffd98a22;
  transform: rotate(8deg);
}
.qian-home-seal span {
  font: 900 58px / 1 var(--font);
  text-shadow: 0 0 22px #ffd98a55;
}
.qian-home-visual {
  position: absolute; z-index: 1;
  right: 3%; top: 5%;
  width: 50%; height: 76%;
  pointer-events: none;
}
.qian-home-slip {
  position: absolute;
  width: 46%; height: 92%;
  background:
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(122,48,37,.08) 17px 18px),
    linear-gradient(150deg, #fff9e9, #ead6b6);
  border: 1px solid #d8bf95;
  border-radius: 3px 3px 7px 7px;
  box-shadow: 0 14px 30px #05020b88;
  color: #5a1515;
  font-family: "Songti SC", "SimSun", serif;
}
.qian-home-slip.back { left: 1%; top: 13%; transform: rotate(-13deg); opacity: .5; }
.qian-home-slip.mid { left: 23%; top: 6%; transform: rotate(-4deg); opacity: .72; }
.qian-home-slip.front { left: 45%; top: 0; transform: rotate(5deg); z-index: 2; }
.qian-home-slip-top {
  position: absolute; left: 0; right: 0; top: 8px;
  text-align: center; font-size: 9px; letter-spacing: .26em;
}
.qian-home-slip-no {
  position: absolute; left: 0; right: 0; top: 24px;
  text-align: center; color: #9a5a43; font-size: 8px;
}
.qian-home-slip-portrait {
  position: absolute; left: 50%; top: 48px;
  width: 48px; height: 48px; margin-left: -24px;
  border: 2px solid #b8343e; border-radius: 50%;
  overflow: hidden; background: #fff3d9;
}
.qian-home-slip-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.qian-home-slip-fortune {
  position: absolute; left: 50%; top: 108px;
  transform: translateX(-50%);
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: 22px; font-weight: 900; letter-spacing: 3px;
  line-height: 1.05;
  color: #7a1a18;
}
.qian-home-slip-stamp {
  position: absolute; right: 9px; bottom: 10px;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 2px solid #b8343e; border-radius: 3px;
  color: #b8343e; font-size: 14px; font-weight: 900;
  transform: rotate(-8deg);
  opacity: .85;
}
.qian-home-controls { overflow-y: auto; }
.qian-block { margin-bottom: 14px; }
.qian-block-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-bottom: 8px;
}
.qian-block-title h2 { font-size: 15px; color: var(--paper); }
.qian-block-title span { font-size: 10px; color: var(--muted); }
.qian-level-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.qian-level-tag {
  display: grid; gap: 2px;
  padding: 7px 6px;
  border: 1px solid var(--rowBorder);
  border-radius: 7px;
  background: var(--rowBg);
  text-align: center;
}
.qian-level-tag b { color: var(--qian-color); font-size: 11px; line-height: 1.25; }
.qian-level-tag small { color: var(--muted); font-size: 8px; line-height: 1.25; }
.qian-start-btn { width: 100%; margin-top: 6px; }

.qian-draw-page {
  min-height: 100%;
  padding: 26px 24px max(30px, env(safe-area-inset-bottom));
  max-width: 640px; margin: 0 auto;
  text-align: center;
}
.qian-draw-heading h1 { margin-top: 6px; font-size: clamp(26px, 7vw, 38px); }
.qian-box {
  position: relative;
  width: 154px; height: 188px;
  margin: 30px auto 12px;
  border: 2px solid var(--gold);
  border-radius: 10px 10px 16px 16px;
  background: linear-gradient(160deg, #6a2a24, #2a0d10);
  box-shadow: 0 18px 40px #05020b88, inset 0 0 28px #00000055;
  animation: qian-box-breathe 2.2s ease-in-out infinite;
}
.qian-box::before {
  content: '';
  position: absolute; left: 12px; right: 12px; top: 12px; height: 36px;
  border-radius: 50%;
  border: 1px solid #ffd98a66;
  background: #170608;
}
.qian-stick {
  position: absolute; bottom: 44px;
  width: 10px; height: 116px;
  border-radius: 5px 5px 2px 2px;
  border: 1px solid #7a5a2a;
  background: linear-gradient(90deg, #b88b4a, #ffe8b0 48%, #b88b4a);
  transform-origin: 50% 100%;
}
.qian-stick.s1 { left: 34px; transform: rotate(-12deg); }
.qian-stick.s2 { left: 58px; transform: rotate(-4deg); height: 128px; }
.qian-stick.s3 { left: 82px; transform: rotate(5deg); height: 122px; }
.qian-stick.s4 { left: 106px; transform: rotate(12deg); }
.qian-box-seal {
  position: absolute; left: 50%; bottom: 11px;
  transform: translateX(-50%);
  color: var(--gold); font: 900 20px / 1 var(--font);
  letter-spacing: .12em;
}
.qian-draw-hint { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 16px 0; }
.qian-draw-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.qian-draw-actions .button { min-width: 128px; }
.qian-draw-footer { margin-top: 24px; }
.qian-reveal {
  margin: 18px auto 0;
  padding: 16px 18px;
  max-width: 360px;
  border: 1px solid var(--qian-color);
  border-radius: 10px;
  background: linear-gradient(160deg, var(--rowBg), var(--cardB));
  box-shadow: 0 14px 34px #05020b66;
}
.qian-reveal-no { display: block; color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.qian-reveal b { display: block; margin-top: 5px; color: var(--qian-color); font-size: 30px; line-height: 1.3; }
.qian-reveal small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.qian-reveal-char {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 10px; color: var(--paper); font-size: 12px;
}
.qian-reveal-char img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 1px solid var(--qian-color); }

.qian-paper-wrap {
  display: flex; justify-content: center;
  margin: 28px auto 0;
  perspective: 900px;
}
.qian-paper {
  position: relative;
  width: 180px; height: 392px;
  border: 1px solid #d8bf95;
  border-radius: 3px 3px 8px 8px;
  background:
    repeating-linear-gradient(0deg, transparent 0 19px, rgba(122,48,37,.075) 19px 20px),
    linear-gradient(150deg, #fffaf0, #ead6b6);
  box-shadow: 0 20px 42px #05020b99, inset 0 0 26px #b88b4a22;
  color: #5a1515;
  font-family: "Songti SC", "SimSun", serif;
  animation: qian-paper-rise .55s cubic-bezier(.2,.8,.25,1) both;
}
.qian-paper::after {
  content: '';
  position: absolute; left: -1px; right: -1px; bottom: -13px; height: 24px;
  border-radius: 0 0 50% 50%;
  background: linear-gradient(180deg, #d8bf95, #b89463);
  box-shadow: 0 8px 14px #05020b55;
}
.qian-paper-cord {
  position: absolute; left: 50%; top: -16px;
  width: 2px; height: 18px; margin-left: -1px;
  background: #b8343e;
  box-shadow: 0 0 0 2px #b8343e22;
}
.qian-paper-head {
  position: absolute; left: 0; right: 0; top: 14px;
  text-align: center; font-size: 10px; letter-spacing: .32em;
}
.qian-paper-no {
  position: absolute; left: 0; right: 0; top: 34px;
  text-align: center; color: #9a5a43; font-size: 9px;
}
.qian-paper-main {
  position: absolute; left: 50%; top: 224px;
  transform: translateX(-50%);
  height: 96px;
  writing-mode: vertical-rl; text-orientation: upright;
  text-align: center;
}
.qian-paper-main b {
  font-size: 28px; line-height: 1.08; letter-spacing: 3px;
  color: #7a1a18;
}
.qian-paper-main small {
  display: block; margin-right: 7px;
  writing-mode: vertical-rl;
  font-size: 9px; color: #9a5a43; letter-spacing: .12em;
}
.qian-paper-portrait {
  position: absolute; left: 50%; top: 58px;
  width: 116px; height: 138px; margin-left: -58px;
  border: 2px solid #b8343e; border-radius: 7px;
  overflow: hidden; background: #fff3d9;
}
.qian-paper-char {
  position: absolute; left: 0; right: 0; top: 200px;
  text-align: center; color: #7a1a18; font-size: 11px; letter-spacing: .06em;
}
.qian-paper-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.qian-paper-type {
  position: absolute; left: 0; right: 0; bottom: 38px;
  text-align: center; color: #7a1a18; font-size: 10px; letter-spacing: .06em;
}
.qian-paper-stamp {
  position: absolute; right: 15px; bottom: 11px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 2px solid #b8343e; border-radius: 3px;
  color: #b8343e; font-size: 17px; font-weight: 900;
  transform: rotate(-8deg); opacity: .86;
}
@keyframes qian-paper-rise {
  from { opacity: 0; transform: translateY(22px) rotateX(-10deg); }
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

.qian-result-hero {
  min-height: 300px;
  background: radial-gradient(circle at 76% 28%, var(--qian-color), transparent 34%), linear-gradient(145deg, var(--heroBg1), var(--heroBg2));
}
.qian-result-portrait {
  position: absolute; z-index: 1;
  right: 8%; top: 10%;
  width: min(32%, 260px); aspect-ratio: 1;
  border: 2px solid var(--qian-color);
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 38%, #5a1a20, #1a0709 72%);
  box-shadow: 0 20px 44px #05020b88, 0 0 0 10px #ffd98a10;
}
.qian-result-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.qian-result-copy { position: absolute; z-index: 2; left: 24px; right: 18px; bottom: 22px; }
.qian-result-copy h1 {
  margin-top: 7px;
  font-size: clamp(42px, 13vw, 76px);
  line-height: 1.06;
  color: var(--qian-color);
  letter-spacing: .02em;
  text-shadow: 0 8px 30px #05020b88;
}
.qian-result-copy p { margin-top: 7px; color: var(--muted); font-size: 12px; }
.qian-result-body { display: grid; gap: 12px; align-content: start; }
.qian-character-card {
  display: flex; align-items: center; gap: 14px;
  padding: 12px;
  border: 1px solid var(--qian-color);
  border-radius: 10px;
  background: linear-gradient(150deg, var(--cardA), var(--cardB));
}
.qian-character-art {
  flex: none; width: 104px; aspect-ratio: 1;
  border-radius: 50%; overflow: hidden;
  border: 2px solid var(--qian-color);
  background: var(--qian-color);
}
.qian-character-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.qian-character-copy span { color: var(--muted); font-size: 10px; }
.qian-character-copy h2 { margin-top: 2px; font-size: 20px; color: var(--paper); }
.qian-character-copy p { margin-top: 2px; color: var(--muted); font-size: 11px; }
.qian-character-copy b { display: inline-block; margin-top: 5px; color: var(--qian-color); font-size: 12px; }
.qian-reading, .qian-advice-grid {
  padding: 12px 14px;
  border: 1px solid var(--rowBorder);
  border-radius: 9px;
  background: var(--rowBg);
}
.qian-reading h2 { font-size: 14px; color: var(--gold); }
.qian-reading p { margin-top: 7px; color: var(--paper); font-size: 14px; line-height: 1.9; }
.qian-advice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qian-advice-grid span { color: var(--muted); font-size: 10px; }
.qian-advice-grid p { margin-top: 4px; color: var(--paper); font-size: 12px; line-height: 1.75; }
@keyframes qian-box-breathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@media (max-width: 560px) {
  .qian-level-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .qian-level-tag { padding: 6px 3px; }
  .qian-level-tag b { font-size: 10px; }
  .qian-level-tag small { font-size: 7px; }
  .qian-character-art { width: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .qian-box { animation: none; }
}

/* ============================================================
 * 塔罗牌测试
 * ============================================================ */
.tarot-kicker {
  display: inline-block;
  color: var(--gold);
  font: 750 11px var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.tarot-home-hero .hero-copy { max-width: 68%; }
.tarot-hero-copy h1 { margin-top: 7px; }
.tarot-fan {
  position: absolute;
  z-index: 0;
  right: 6%; top: 9%;
  width: 38%; height: 64%;
  pointer-events: none;
}
.tarot-mini {
  position: absolute;
  width: 40%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  transform-origin: 50% 100%;
  border: 1px solid var(--gold);
  border-radius: 8px;
  background:
    repeating-linear-gradient(135deg, rgba(255,217,138,.16) 0 1px, transparent 1px 8px),
    linear-gradient(145deg, #241738, #0d0915);
  box-shadow: 0 10px 30px #05020ba6;
}
.tarot-mini.face { background: #0d0915; }
.tarot-mini-art {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
}
.tarot-mini.anime .tarot-mini-art { object-position: center 18%; }
.tarot-mini-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 16px 4px 5px;
  color: #fff;
  font-size: 8px; line-height: 1.2;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(transparent, rgba(5, 2, 11, .86));
}
.tarot-mini:first-child { left: 0; top: 12%; transform: rotate(-9deg); }
.tarot-mini.two { left: 30%; top: 6%; transform: rotate(0); }
.tarot-mini.three { left: 60%; top: 0; transform: rotate(9deg); }
.tarot-home-controls { overflow-y: auto; }
.tarot-block { margin-bottom: 14px; }
.tarot-block-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-bottom: 8px;
}
.tarot-block-title h2 { font-size: 15px; color: var(--paper); }
.tarot-block-title span { font-size: 10px; color: var(--muted); }
.tarot-deck-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tarot-deck {
  display: grid; gap: 3px; text-align: left;
  min-height: 55px; padding: 8px 10px;
  border: 1px solid var(--rowBorder);
  background: var(--rowBg);
  color: var(--paper);
}
.tarot-deck b { font-size: 13px; }
.tarot-deck small { color: var(--muted); font-size: 9.5px; line-height: 1.35; }
.tarot-deck.active {
  border-color: var(--soft);
  background: linear-gradient(135deg, var(--rowActive), var(--bg1));
  box-shadow: inset 3px 0 var(--gold);
}
.tarot-topic-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.tarot-topic {
  display: grid; gap: 2px; text-align: left;
  padding: 7px 9px; min-height: 50px;
  border: 1px solid var(--rowBorder);
  background: var(--rowBg);
  color: var(--paper);
}
.tarot-topic b { font-size: 12px; font-weight: 750; }
.tarot-topic b span { color: var(--gold); margin-right: 3px; }
.tarot-topic small { font-size: 9px; color: var(--muted); line-height: 1.35; }
.tarot-topic.active {
  border-color: var(--soft);
  background: var(--rowActive);
  box-shadow: inset 3px 0 var(--gold);
}
.tarot-start-btn { width: 100%; margin-top: 4px; }
.tarot-home-controls footer { margin-top: 12px; }

/* 卡牌 */
.tarot-card {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--card-color, var(--gold));
  border-radius: 8px;
  padding: 10px 7px 7px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  gap: 4px;
  background:
    radial-gradient(circle at 50% 25%, rgba(201, 162, 255, .18), transparent 55%),
    linear-gradient(160deg, #211532, #0d0915 75%);
  box-shadow: 0 8px 22px #05020b73;
  overflow: hidden;
}
.tarot-card.rev .tarot-art,
.tarot-card.rev .tarot-glyph,
.tarot-card.rev .tarot-original { transform: rotate(180deg); }
.tarot-card.face-original {
  display: block;
  aspect-ratio: auto;
  padding: 0;
  gap: 0;
  background: #0d0915;
}
.tarot-original {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 7px 7px 0 0;
}
.tarot-face-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  padding: 5px 6px 6px;
  background: #120b1d;
  border-radius: 0 0 7px 7px;
}
.tarot-face-caption b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  color: var(--paper);
}
.tarot-face-caption small {
  flex: none;
  font-size: 8px;
  color: var(--muted);
}
.tarot-num {
  align-self: flex-start;
  color: var(--card-color, var(--gold));
  font: 800 11px var(--mono);
  letter-spacing: .04em;
}
.tarot-glyph {
  color: var(--card-color, var(--gold));
  font: 900 clamp(38px, 10vw, 62px) / 1 var(--font);
  text-shadow: 0 0 18px var(--card-color, var(--gold));
}
.tarot-art {
  width: 72%; aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  border: 2px solid var(--card-color, var(--gold));
  filter: saturate(.95);
}
.tarot-name { font-size: 12px; font-weight: 800; color: var(--paper); text-align: center; line-height: 1.2; }
.tarot-sub { font-size: 8px; color: var(--muted); text-align: center; line-height: 1.25; max-width: 100%; }
.tarot-card.back {
  --card-color: var(--gold);
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, rgba(255,217,138,.12) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(-45deg, rgba(201,162,255,.08) 0 1px, transparent 1px 11px),
    radial-gradient(circle at 50% 35%, #32204c, #0c0814 70%);
  border-color: var(--gold);
}
.tarot-back-mark {
  color: var(--gold);
  font: 900 clamp(36px, 11vw, 60px) / 1 var(--font);
  text-shadow: 0 0 24px #ffd98a66;
}
.tarot-back-text { color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.tarot-slot {
  display: flex; flex-direction: column; gap: 5px;
  border: 0; padding: 0; background: none; color: inherit;
  min-width: 0;
}
button.tarot-slot { cursor: pointer; }
.tarot-position { font: 750 11px var(--mono); color: var(--gold); letter-spacing: .08em; }
.tarot-orientation { font-size: 9px; color: var(--muted); }
.tarot-draw-page {
  min-height: 100%;
  padding: 22px 24px max(24px, env(safe-area-inset-bottom));
  max-width: 980px; margin: 0 auto;
}
.tarot-draw-heading { text-align: center; }
.tarot-draw-heading h1 { font-size: clamp(22px, 6vw, 34px); line-height: 1.4; margin-top: 6px; }
.tarot-draw-heading p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.tarot-draw-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px; max-width: 760px; margin: 20px auto 8px;
}
.tarot-draw-hint { text-align: center; color: var(--muted); font-size: 11px; margin: 8px 0 14px; }
.tarot-draw-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.tarot-draw-actions .button { min-width: 130px; }

/* 生成解析等待页 */
.tarot-reading-page {
  min-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 40px 24px calc(48px + env(safe-area-inset-bottom));
  text-align: center;
}
.tarot-reading-deck {
  position: relative; width: 82px; height: 118px;
  margin-bottom: 28px;
  animation: tarot-read-float 1.9s ease-in-out infinite;
}
.tarot-reading-deck i {
  position: absolute; inset: 0;
  border: 1px solid rgba(255, 217, 138, .55);
  border-radius: 8px;
  background:
    repeating-linear-gradient(45deg, rgba(255,217,138,.12) 0 1px, transparent 1px 9px),
    repeating-linear-gradient(-45deg, rgba(201,162,255,.09) 0 1px, transparent 1px 11px),
    radial-gradient(circle at 50% 38%, #332052, #0d0916 72%);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
}
.tarot-reading-deck i:nth-child(1) {
  transform: translateX(-24px) rotate(-11deg);
  opacity: .72;
}
.tarot-reading-deck i:nth-child(2) {
  transform: translateX(24px) rotate(11deg);
  opacity: .72;
}
.tarot-reading-deck i:nth-child(3) {
  transform: translateY(-5px) rotate(0);
}
.tarot-reading-deck b {
  position: absolute; inset: 0;
  z-index: 2; display: grid; place-items: center;
  color: var(--gold);
  font: 900 30px / 1 var(--font);
  text-shadow: 0 0 22px rgba(255, 217, 138, .55);
}
.tarot-reading-title {
  margin: 0;
  font-size: clamp(23px, 6vw, 32px);
  letter-spacing: .06em;
}
.tarot-reading-sub {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.tarot-reading-track {
  width: min(310px, 78vw);
  height: 6px;
  margin-top: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
}
.tarot-reading-bar {
  display: block; width: 0; height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c9a2ff, #ffd98a);
  box-shadow: 0 0 16px rgba(255, 217, 138, .45);
  transition-property: width;
  transition-timing-function: linear;
}
@keyframes tarot-read-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@media (prefers-reduced-motion: reduce) {
  .tarot-reading-deck { animation: none; }
}

/* 结果 */
.tarot-result-hero .tarot-result-copy {
  position: absolute; z-index: 2; left: 24px; right: 18px; bottom: 22px;
}
.tarot-result-copy h1 {
  margin-top: 7px;
  font-size: clamp(25px, 7vw, 44px);
  line-height: 1.3; color: var(--paper);
  letter-spacing: -.04em;
}
.tarot-result-copy p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.tarot-result-body { display: grid; gap: 14px; align-content: start; }
.tarot-result-cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px; max-width: 760px; width: 100%; margin: 0 auto;
}
.tarot-result-card { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tarot-readings { display: grid; gap: 8px; }
.tarot-meaning {
  border: 1px solid var(--rowBorder);
  background: var(--rowBg);
  padding: 10px 12px;
}
.tarot-meaning-head { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.tarot-meaning-head span { color: var(--gold); font: 750 10px var(--mono); letter-spacing: .08em; }
.tarot-meaning-head b { font-size: 15px; color: var(--paper); }
.tarot-meaning-head em { margin-left: auto; color: var(--soft); font: 700 10px var(--mono); font-style: normal; }
.tarot-meaning p { margin-top: 5px; color: var(--accentText); font-size: 12px; line-height: 1.65; }
.tarot-meaning p.tarot-topic-line {
  margin-top: 7px;
  padding-left: 8px;
  border-left: 2px solid var(--gold);
  color: var(--paper);
  opacity: .92;
}
.tarot-meaning small { display: block; margin-top: 4px; color: var(--muted); font-size: 9.5px; }
.tarot-summary { border-left: 3px solid var(--soft); padding: 2px 0 2px 11px; }
.tarot-summary h2 { font-size: 15px; color: var(--paper); }
.tarot-summary p { margin-top: 6px; color: var(--accentText); font-size: 12px; line-height: 1.7; }
.tarot-saved { text-align: center; color: var(--muted); font-size: 10px; }
.tarot-history-seal {
  display: grid; place-items: center;
  color: #fff; font: 800 20px var(--font);
  text-shadow: 0 1px 2px #0008;
}
@media (max-width: 400px) {
  .tarot-draw-page { padding-inline: 17px; }
  .tarot-result-body { padding-inline: 17px; }
  .tarot-card { padding-inline: 5px; }
  .tarot-card.face-original { padding-inline: 0; }
  .tarot-face-caption { padding-inline: 4px; }
  .tarot-face-caption b { font-size: 9.5px; }
  .tarot-name { font-size: 10px; }
  .tarot-sub { font-size: 7.5px; }
  .tarot-draw-grid, .tarot-result-cards { gap: 6px; }
}
.tarot-result-fan {
  top: 14%; left: 8%; right: auto; width: 62%; height: 48%;
  opacity: .82; transform: rotate(-4deg);
}

@media (max-width: 879px) {
  .test-bar {
    flex-wrap: wrap;
    padding: 5px 14px 7px 18px;
    row-gap: 3px;
  }
  .test-tabs { flex: 1 1 0; min-width: 0; }
  .test-more { flex: 0 0 auto; }
  .test-tabs-mobile-note {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    order: -1;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.4;
    letter-spacing: .06em;
    white-space: nowrap;
  }
}
