:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #10131c;
  color: #f5efe8;
  --muted: #b6b5c3;
  --line: #383b4a;
  --pink: #ff9b9e;
  --red: #a1243a;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; background: radial-gradient(ellipse at 85% 26%, #1c2336, transparent 56%), #10131c; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.top { min-height: 76px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-size: .95rem; font-weight: 700; letter-spacing: .09em; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #9d4e5d; color: var(--pink); }
.top-note { color: var(--muted); font-size: .875rem; }
.hero { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(30px, 6vw, 90px); align-items: center; padding-block: 54px 45px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--pink); font-size: .875rem; font-weight: 700; letter-spacing: .12em; }
.eyebrow span { width: 16px; height: 1px; background: currentColor; }
h1 { margin: 12px 0 18px; font-family: "Songti SC", SimSun, Georgia, serif; font-size: clamp(56px, 8.3vw, 110px); font-weight: 800; line-height: 1.04; letter-spacing: .03em; }
h1 em { color: var(--pink); font-style: normal; }
.lead { font-size: clamp(1.22rem, 2.5vw, 1.65rem); font-weight: 680; line-height: 1.5; margin: 0 0 12px; }
.intro-text, .description { color: var(--muted); line-height: 1.85; margin: 0 0 24px; }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; gap: 16px; min-height: 48px; padding: 10px 19px; border-radius: 6px; font-weight: 700; text-decoration: none; cursor: pointer; }
.primary { border: 1px solid #b83d51; background: var(--red); color: #fff8f4; }
.primary:hover { background: #b82d47; }
.primary:disabled { opacity: .5; cursor: default; background: var(--red); }
.secondary { color: #f5efe8; background: #1d2030; border: 1px solid var(--line); }
.secondary:hover { border-color: var(--pink); }
.text-button { margin-top: 16px; min-height: 44px; padding: 0; border: 0; color: var(--pink); background: transparent; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
:focus-visible { outline: 2px solid #f6afba; outline-offset: 4px; }
.meta { color: var(--muted); font-size: .875rem; margin: 12px 0 0; }
.meta span { margin-inline: 6px; }
.hero-art { margin: 0; position: relative; overflow: hidden; border: 1px solid #4a4858; border-radius: 8px; isolation: isolate; background: #1b2435; }
.hero-art img { display: block; width: 100%; height: auto; aspect-ratio: 1.24; object-fit: cover; }
.hero-art::after { content: ""; position: absolute; inset: 50% 0 0; z-index: 0; background: linear-gradient(transparent, #10111bdf); pointer-events: none; }
.hero-art figcaption { position: absolute; z-index: 1; display: flex; justify-content: space-between; gap: 8px; inset: auto 0 0; padding: 18px; color: #f5efe8; font-size: .78rem; letter-spacing: .17em; font-weight: 650; }
.hero-art figcaption span { color: #ffd2d3; }
.cast { display: flex; align-items: center; gap: 20px; border-block: 1px solid var(--line); padding-block: 15px; }
.cast-label { color: var(--pink); font-size: .875rem; flex-shrink: 0; }
.cast ul, .traits { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; margin: 0; padding: 0; }
.cast li, .traits li { color: #e1dce1; font-size: .875rem; padding: 6px 10px; border: 1px solid var(--line); border-radius: 4px; }
.footer { padding-block: 23px 30px; color: var(--muted); font-size: .875rem; }
.panel { margin: 38px auto 0; padding: clamp(20px, 4vw, 38px); background: #181c2a; border: 1px solid var(--line); border-radius: 12px; }
.quiz { max-width: 720px; }
.quiz-meta, .quiz-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.count { font-variant-numeric: tabular-nums; color: var(--muted); }
progress { width: 100%; height: 7px; appearance: none; border: 0; border-radius: 20px; background: #31374b; color: #ee8293; margin-top: 14px; display: block; overflow: hidden; }
progress::-webkit-progress-bar { background: #31374b; }
progress::-webkit-progress-value { background: #ee8293; }
progress::-moz-progress-bar { background: #ee8293; }
h2 { font-size: clamp(1.5rem, 3.8vw, 2rem); line-height: 1.43; margin: 20px 0; }
fieldset { padding: 0; margin: 0 0 22px; min-width: 0; border: 0; display: grid; gap: 10px; }
.option { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 7px; background: #1d2232; line-height: 1.5; cursor: pointer; }
.option:hover, .option.selected { border-color: #ea8494; background: #312436; }
.option input { margin: 0; width: 18px; height: 18px; flex: 0 0 18px; accent-color: #e48598; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.result { display: grid; grid-template-columns: minmax(0, 350px) minmax(0, 1fr); align-items: center; gap: clamp(22px, 5vw, 60px); max-width: 880px; }
.result-art img, #image-preview { display: block; width: 100%; height: auto; border-radius: 8px; }
.result-art { max-width: 350px; width: 100%; margin-inline: auto; }
.result-heading h2 { font-family: "Songti SC", SimSun, Georgia, serif; font-size: clamp(2.6rem, 6vw, 4rem); margin: 0; }
.match-label { color: var(--muted); margin: 22px 0 0; }
.role { font-weight: 700; color: var(--pink); margin: 8px 0 16px; }
.traits { margin-bottom: 20px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-status { color: var(--muted); line-height: 1.5; margin: 0; }
.share-status:empty { display: none; }
.share-link { display: block; width: 100%; padding: 9px; margin-top: 10px; border: 1px solid var(--line); border-radius: 4px; background: #10131c; color: #f5efe8; }
dialog { width: min(400px, calc(100% - 26px)); max-height: 94vh; color: #f5efe8; background: #191c28; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
dialog::backdrop { background: #090910cc; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dialog-head p { margin: 0; }
@media (max-width: 680px) {
  .shell { width: calc(100% - 36px); }
  .top { min-height: 62px; }
  .top-note { display: none; }
  .hero { grid-template-columns: 1fr; gap: 22px; padding-block: 23px 24px; }
  h1 { margin-block: 12px 15px; }
  .hero-art img { aspect-ratio: 1.78; }
  .hero-art figcaption { padding: 12px; }
  .desktop { display: none; }
  .cast { gap: 9px; align-items: flex-start; flex-direction: column; }
  .panel { margin-top: 22px; }
  .result { grid-template-columns: 1fr; }
  .result-copy { display: contents; }
  .result-heading { grid-row: 1; }
  .result-heading .role { margin-bottom: 0; }
  .result-art { grid-row: 2; }
}
