﻿/* =========================================================
   星座档案馆 · 样式
   单文件 H5，移动端优先；桌面端自动居中成「手机形态」
   ========================================================= */

:root {
  --bg: #06070f;
  --bg-2: #0a0c1a;
  --ink: #eef1f8;
  --ink-2: #b9bfd2;
  --ink-3: #7b8299;
  --ink-4: #4d5468;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --accent: #c9b6ff;
  --accent-2: #7ce3d0;
  --card: rgba(255, 255, 255, 0.035);
  --card-2: rgba(255, 255, 255, 0.06);
  --radius: 20px;
  --radius-sm: 14px;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

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

::selection { background: rgba(201, 182, 255, 0.3); }

/* ---------------- 背景 ---------------- */
.bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; }

.bg-nebula {
  position: absolute; border-radius: 50%;
  filter: blur(70px); opacity: 0.5;
  animation: nebula-drift 26s var(--ease-io) infinite alternate;
}
.bg-nebula--a {
  width: 78vmax; height: 78vmax; top: -34vmax; left: -26vmax;
  background: radial-gradient(circle at 50% 50%, rgba(114, 86, 210, 0.55), transparent 62%);
}
.bg-nebula--b {
  width: 66vmax; height: 66vmax; bottom: -30vmax; right: -24vmax;
  background: radial-gradient(circle at 50% 50%, rgba(34, 132, 150, 0.38), transparent 64%);
  animation-delay: -12s;
}
@keyframes nebula-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4%, 3%, 0) scale(1.12); }
}

#starfield { position: absolute; inset: 0; width: 100%; height: 100%; }

.bg-vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 40%, rgba(4, 5, 12, 0.65) 100%),
    linear-gradient(180deg, rgba(4, 5, 12, 0.45) 0%, transparent 24% 72%, rgba(4, 5, 12, 0.85) 100%);
}

/* ---------------- 布局壳 ---------------- */
.app {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; flex-direction: column;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 22px calc(18px + var(--safe-b));
}

.view {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  padding: calc(14px + var(--safe-t)) 22px calc(16px + var(--safe-b));
  opacity: 0; visibility: hidden;
  transform: translateY(14px);
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease),
    visibility 0s linear 0.55s;
  pointer-events: none;
}
.view.is-active {
  position: relative; inset: auto;
  opacity: 1; visibility: visible; transform: none;
  pointer-events: auto;
  flex: 1;
  min-height: 0;
  transition:
    opacity 0.55s var(--ease),
    transform 0.55s var(--ease),
    visibility 0s linear 0s;
}

/* ---------------- 品牌 ---------------- */
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; letter-spacing: 0.16em;
  color: var(--ink-3); text-transform: uppercase;
  padding-top: 4px; flex: none;
}
.brand__mark {
  width: 22px; height: 22px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 50%;
  color: var(--accent);
}
.brand__mark .ico { width: 11px; height: 11px; }

.ico { width: 16px; height: 16px; display: block; flex: none; }

/* ---------------- 首页 ---------------- */
.landing {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; justify-content: center;
  gap: 0;
  padding: 8px 0 4px;
}

.landing__seal {
  position: relative;
  width: 176px; height: 176px;
  margin: 0 auto 26px;
  display: grid; place-items: center;
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
.seal-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(201, 182, 255, 0.28);
}
.seal-ring--outer {
  border-style: dashed;
  animation: spin 46s linear infinite;
}
.seal-ring--inner { inset: 26px; border-color: rgba(124, 227, 208, 0.2); }
.seal-cross { position: absolute; background: rgba(201, 182, 255, 0.16); }
.seal-cross--v { width: 1px; top: 0; bottom: 0; left: 50%; }
.seal-cross--h { height: 1px; left: 0; right: 0; top: 50%; }
.seal-glyph {
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Symbola", var(--font-serif);
  font-variant-emoji: text;
  font-size: 58px; line-height: 1;
  color: #fff;
  text-shadow: 0 0 26px rgba(201, 182, 255, 0.9), 0 0 60px rgba(124, 227, 208, 0.45);
  animation: glow 5s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glow {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; text-shadow: 0 0 34px rgba(201, 182, 255, 1), 0 0 80px rgba(124, 227, 208, 0.6); }
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 11px; letter-spacing: 0.28em;
  color: var(--ink-3); text-transform: uppercase;
  text-align: center;
}
.eyebrow--tight { text-align: left; margin-bottom: 8px; }

.display {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(38px, 10.6vw, 50px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.01em;
  text-align: center;
}
.display em {
  font-style: normal;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(201, 182, 255, 0.55);
  position: relative;
}
.display em::after {
  content: ""; position: absolute; left: -8%; right: -8%; bottom: 4px; height: 10px;
  background: linear-gradient(90deg, transparent, rgba(124, 227, 208, 0.35), transparent);
  filter: blur(6px); z-index: -1;
}

.lede {
  margin: 0 auto 22px;
  max-width: 30ch;
  font-size: 14px; line-height: 1.95;
  color: var(--ink-2); text-align: center;
}

.stats {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-bottom: 30px;
  font-size: 12px; color: var(--ink-3); letter-spacing: 0.06em;
}
.stats b { color: var(--ink); font-weight: 600; font-size: 15px; margin-right: 3px; }
.stats i { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-4); }

/* ---------------- 大门（卡密） ---------------- */
.brand__badge {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 10.5px; letter-spacing: 0.08em;
  color: var(--accent-2);
  border: 1px solid rgba(124, 227, 208, 0.32);
  background: rgba(124, 227, 208, 0.08);
}
.brand__badge[hidden] { display: none; }
.brand__badge .ico { width: 11px; height: 11px; }

.gate {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 6px 0 2px;
}

.gate__seal {
  position: relative;
  width: 132px; height: 132px;
  margin: 0 auto 30px;
  display: grid; place-items: center;
}
.gate__lock {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0;
  color: var(--accent);
  background: radial-gradient(circle, rgba(201,182,255,0.22), rgba(201,182,255,0.03) 70%);
  box-shadow: 0 0 0 1px rgba(201,182,255,0.22), 0 0 42px -6px rgba(201,182,255,0.55);
  animation: lock-breathe 3.6s ease-in-out infinite;
}
.gate__lock .ico { width: 22px; height: 22px; }
@keyframes lock-breathe {
  0%, 100% { box-shadow: 0 0 0 1px rgba(201,182,255,0.22), 0 0 42px -6px rgba(201,182,255,0.55); }
  50%      { box-shadow: 0 0 0 1px rgba(201,182,255,0.38), 0 0 64px -4px rgba(201,182,255,0.85); }
}

.eyebrow--center { text-align: center; margin-bottom: 16px; }

.gate__title {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(27px, 7.4vw, 34px);
  font-weight: 600; line-height: 1.36;
  letter-spacing: -0.005em;
  text-align: center;
  color: var(--ink);
  text-wrap: balance;
}
.gate__title em {
  font-style: normal;
  color: var(--accent);
  text-shadow: 0 0 28px rgba(201, 182, 255, 0.55);
}

.gate__lede {
  margin: 0 auto 28px;
  font-size: 13.5px; line-height: 1.95;
  color: var(--ink-2); text-align: center;
  text-wrap: balance;
}

.gate__form { width: 100%; max-width: 320px; margin: 0 auto; }
.gate__label {
  display: block; margin-bottom: 9px;
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--ink-4); text-align: center;
}
.gate__field {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(201, 182, 255, 0.24);
  box-shadow: 0 0 32px -18px rgba(201, 182, 255, 0.8);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.gate__field:focus-within {
  border-color: rgba(201, 182, 255, 0.6);
  background: rgba(201, 182, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(201, 182, 255, 0.1);
}
.gate__field-ico { color: var(--ink-4); width: 15px; height: 15px; }
.gate__input {
  flex: 1; min-width: 0;
  appearance: none; border: 0; outline: 0; background: transparent;
  font-family: "SF Mono", "Consolas", "Menlo", monospace;
  font-size: 16px; font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--ink);
  padding: 9px 0;
}
.gate__input::placeholder { color: var(--ink-4); letter-spacing: 0.16em; }
.gate__submit {
  appearance: none; border: 0; cursor: pointer;
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  color: #12101c;
  background: linear-gradient(135deg, #d7c8ff, #b9e8df);
  box-shadow: 0 6px 22px -8px rgba(201, 182, 255, 0.9);
  transition: transform 0.2s var(--ease), opacity 0.2s;
}
.gate__submit:active { transform: scale(0.93); }
.gate__submit[disabled] { opacity: 0.45; cursor: default; }

.gate__error {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 12.5px; line-height: 1.6;
  color: #ff9d9d; text-align: center;
}
.gate__hint {
  margin: 18px 0 0;
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--ink-4); text-align: center;
  line-height: 1.8;
}

.gate__field.is-shake { animation: shake 0.42s var(--ease-io); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  18% { transform: translateX(-7px); }
  38% { transform: translateX(6px); }
  58% { transform: translateX(-4px); }
  78% { transform: translateX(3px); }
}
.gate__field.is-ok {
  border-color: rgba(124, 227, 208, 0.7);
  box-shadow: 0 0 0 3px rgba(124, 227, 208, 0.14);
}

/* ---------------- 按钮 ---------------- */
.btn {
  appearance: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 500;
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 26px; border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--line);
  transition: transform 0.25s var(--ease), background 0.3s, border-color 0.3s, box-shadow 0.3s;
  letter-spacing: 0.02em;
}
.btn:active { transform: scale(0.975); }

.btn--primary {
  position: relative;
  color: #12101c;
  background: linear-gradient(135deg, #d7c8ff 0%, #b9e8df 100%);
  border: 0;
  box-shadow: 0 10px 40px -10px rgba(201, 182, 255, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
  font-weight: 600;
}
.btn--primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.6), transparent 45%);
  opacity: 0.5; pointer-events: none;
}
.btn--primary .ico { color: #12101c; }
.btn--lg { width: 100%; max-width: 320px; margin: 0 auto; padding: 17px 26px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--ghost { flex: 1; font-size: 14px; padding: 13px 18px; color: var(--ink-2); }

.btn-icon {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: background 0.25s, color 0.25s;
}
.btn-icon:hover { background: var(--card); color: var(--ink); }
.btn-icon.is-ghost { pointer-events: none; }

.last-entry {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  margin: 14px auto 0;
  padding: 7px 14px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line);
  color: var(--ink-3); font-family: inherit; font-size: 12px;
  letter-spacing: 0.04em;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.last-entry[hidden] { display: none; }
.last-entry:hover { border-color: var(--line-2); color: var(--ink-2); background: var(--card); }
.last-entry__dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
}

.copy-block {
  appearance: none; cursor: pointer; width: 100%; text-align: left;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 17px; border-radius: var(--radius-sm);
  background: var(--card); border: 1px dashed var(--line-2);
  color: var(--ink-2); font-family: inherit; font-size: 13.5px; line-height: 1.75;
  transition: background 0.25s, border-color 0.25s;
}
.copy-block:hover { background: var(--card-2); border-color: var(--accent); }
.copy-block__text { flex: 1; }
.copy-block__tag {
  flex: none; font-size: 11px; letter-spacing: 0.06em;
  color: var(--accent); white-space: nowrap;
}

.micro {
  margin: 16px 0 0;
  font-size: 11.5px; letter-spacing: 0.1em;
  color: var(--ink-4); text-align: center;
}

.site-foot { flex: none; padding-bottom: 4px; }
.foot-line {
  display: block; width: 40px; height: 1px; margin: 0 auto 14px;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}
.site-foot p {
  margin: 0; text-align: center;
  font-size: 11.5px; line-height: 1.9; color: var(--ink-4);
  font-family: var(--font-serif);
}

/* ---------------- 答题 ---------------- */
.quiz-head {
  flex: none;
  display: flex; align-items: center; gap: 10px;
  padding-top: 2px;
}
.progress { flex: 1; display: flex; align-items: center; gap: 12px; }
.progress__track {
  flex: 1; height: 2px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.1); overflow: hidden;
}
.progress__fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 14px rgba(201, 182, 255, 0.7);
  transition: width 0.6s var(--ease);
}
.progress__count {
  font-size: 11.5px; letter-spacing: 0.1em; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.progress__count b { color: var(--ink-2); font-weight: 500; }

.quiz-body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: 7vh 0 10px;
  overflow-y: auto;
  scrollbar-width: none;
}
@media (max-height: 760px) {
  .quiz-body { padding-top: 3vh; }
}
.quiz-body::-webkit-scrollbar { display: none; }

.q-stage { animation: q-in 0.62s var(--ease) both; }
@keyframes q-in {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.q-index {
  margin: 0 0 12px;
  font-size: 11px; letter-spacing: 0.3em;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.q-text {
  margin: 0 0 30px;
  font-family: var(--font-serif);
  font-size: clamp(25px, 7.2vw, 31px);
  font-weight: 600; line-height: 1.42;
  letter-spacing: -0.005em;
  color: #fff;
}

.q-opts { display: flex; flex-direction: column; gap: 10px; }

.opt {
  appearance: none; cursor: pointer;
  width: 100%; text-align: left;
  display: flex; align-items: flex-start; gap: 13px;
  padding: 15px 16px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-family: inherit; font-size: 14.5px; line-height: 1.55;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.18s var(--ease);
  position: relative;
  overflow: hidden;
}
.opt::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(201, 182, 255, 0.14), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.opt:hover { background: var(--card-2); border-color: var(--line-2); color: var(--ink); }
.opt:hover::before { opacity: 1; }
.opt:active { transform: scale(0.985); }

.opt__key {
  flex: none; margin-top: 1px;
  width: 21px; height: 21px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
  transition: all 0.25s;
}
.opt__text { flex: 1; }

.opt.is-picked {
  border-color: var(--accent);
  color: var(--ink);
  background: rgba(201, 182, 255, 0.1);
  box-shadow: 0 0 0 1px rgba(201, 182, 255, 0.35), 0 8px 32px -14px rgba(201, 182, 255, 0.8);
}
.opt.is-picked .opt__key {
  background: var(--accent); color: #12101c; border-color: transparent;
}
.opt.is-dim { opacity: 0.35; }

.q-stage.is-out { animation: q-out 0.32s var(--ease-io) both; }
@keyframes q-out {
  to { opacity: 0; transform: translateY(-16px); filter: blur(5px); }
}

.quiz-hint {
  flex: none;
  margin: 12px 0 0;
  text-align: center;
  font-size: 11px; letter-spacing: 0.08em; color: var(--ink-4);
}

/* ---------------- 计算中 ---------------- */
.view--loading { align-items: center; justify-content: center; gap: 26px; }
.orbit {
  position: relative; width: 130px; height: 130px;
  display: grid; place-items: center;
}
.orbit__ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px solid rgba(201, 182, 255, 0.4);
  border-top-color: transparent;
  animation: spin 1.6s linear infinite;
}
.orbit__ring--2 {
  inset: 20px;
  border-color: rgba(124, 227, 208, 0.35);
  border-bottom-color: transparent;
  animation: spin 2.4s linear infinite reverse;
}
.orbit__core {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle, rgba(201, 182, 255, 0.45), rgba(201, 182, 255, 0.05) 70%);
  color: #fff;
  animation: pulse 2.2s ease-in-out infinite;
}
.orbit__core .ico { width: 22px; height: 22px; }
@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(201, 182, 255, 0.35); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 22px rgba(201, 182, 255, 0); }
}
.loading-text {
  margin: 0; font-family: var(--font-serif);
  font-size: 17px; letter-spacing: 0.06em; color: var(--ink-2);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

/* ---------------- 结果 ---------------- */
.view--result { overflow-y: auto; scrollbar-width: none; }
.view--result::-webkit-scrollbar { display: none; }

.result-head { flex: none; padding: 18px 0 4px; }
.result-head__title {
  margin: 0 0 22px;
  font-family: var(--font-serif); font-size: 26px; font-weight: 600;
  letter-spacing: 0.01em;
}

.result-content { flex: 1; }

/* 主卡 */
.hero {
  position: relative;
  border-radius: 26px;
  padding: 26px 22px 24px;
  background:
    radial-gradient(120% 90% at 50% -10%, var(--hero-glow, rgba(201,182,255,0.35)), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 30px 70px -40px var(--hero-color, #c9b6ff), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  animation: hero-in 0.9s var(--ease) both;
}
@keyframes hero-in {
  from { opacity: 0; transform: translateY(22px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(1.4px 1.4px at 22% 18%, rgba(255,255,255,0.9), transparent),
    radial-gradient(1.2px 1.2px at 78% 12%, rgba(255,255,255,0.65), transparent),
    radial-gradient(1.6px 1.6px at 62% 34%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.1px 1.1px at 14% 62%, rgba(255,255,255,0.55), transparent),
    radial-gradient(1.5px 1.5px at 88% 68%, rgba(255,255,255,0.75), transparent),
    radial-gradient(1.2px 1.2px at 40% 82%, rgba(255,255,255,0.5), transparent);
  opacity: 0.75; pointer-events: none;
}

.hero__top {
  position: relative;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 18px;
}
.hero__sign { display: flex; align-items: center; gap: 13px; }
.hero__glyph {
  width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Symbola", var(--font-serif);
  font-variant-emoji: text;
  font-size: 27px; line-height: 1;
  color: var(--hero-color);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 0 34px -8px var(--hero-color);
  flex: none;
}
.hero__signname {
  font-family: var(--font-serif); font-size: 21px;
  letter-spacing: 0.02em; color: var(--ink);
}
.hero__date {
  display: block; margin-top: 2px;
  font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-3);
}
.hero__badge {
  font-size: 10px; letter-spacing: 0.14em;
  padding: 5px 10px; border-radius: 999px;
  color: var(--hero-color);
  border: 1px solid color-mix(in srgb, var(--hero-color) 45%, transparent);
  background: color-mix(in srgb, var(--hero-color) 12%, transparent);
  white-space: nowrap;
}

.hero__cn {
  position: relative;
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: clamp(46px, 13.5vw, 60px);
  font-weight: 700; line-height: 1.05;
  letter-spacing: 0.04em;
  background: linear-gradient(120deg, #fff 10%, var(--hero-color) 92%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 30px color-mix(in srgb, var(--hero-color) 35%, transparent));
}
.hero__en {
  margin: 0 0 16px;
  font-size: 10px; letter-spacing: 0.34em;
  color: var(--ink-3); text-transform: uppercase;
}
.hero__quote {
  position: relative;
  margin: 0 0 16px;
  padding-left: 13px;
  font-family: var(--font-serif);
  font-size: 15px; line-height: 1.85; color: var(--ink);
  border-left: 2px solid color-mix(in srgb, var(--hero-color) 60%, transparent);
}
.hero__tags { display: flex; flex-wrap: wrap; gap: 7px; position: relative; }
.chip {
  font-size: 11px; padding: 4px 11px; border-radius: 999px;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 0.04em;
}
.hero__near {
  position: relative;
  margin: 15px 0 0;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 12.5px; line-height: 1.8; color: var(--ink-3);
}

/* 历史人物卡 */
.section { margin-top: 26px; }
.sec-head {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 13px;
}
.sec-num {
  font-size: 10px; letter-spacing: 0.2em; color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}
.sec-title {
  margin: 0; font-family: var(--font-serif);
  font-size: 17.5px; font-weight: 600; color: var(--ink);
  letter-spacing: 0.02em;
}
.sec-title em { font-style: normal; color: var(--accent); }

.figure-card {
  position: relative;
  border-radius: var(--radius);
  padding: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018));
  border: 1px solid var(--line);
  overflow: hidden;
}
.figure-card__top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.figure-card__label {
  font-size: 10.5px; letter-spacing: 0.2em; color: var(--ink-4);
}
.figure-card__match {
  font-size: 11px; color: var(--hero-color);
  letter-spacing: 0.06em;
}
.figure-card__name {
  margin: 10px 0 2px;
  font-family: var(--font-serif);
  font-size: 30px; font-weight: 600; letter-spacing: 0.06em;
  color: #fff;
}
.figure-card__sub {
  margin: 0 0 14px;
  font-size: 12.5px; color: var(--ink-3); line-height: 1.7;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.figure-card__poem {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 14px; line-height: 1.9; color: var(--ink-2);
}
.figure-card__poem::before { content: "「"; color: var(--ink-4); }
.figure-card__poem::after { content: "」"; color: var(--ink-4); }

/* 维度 */
.dims { display: flex; flex-direction: column; gap: 13px; }
.dim { display: grid; grid-template-columns: 52px 1fr 30px; align-items: center; gap: 12px; }
.dim__name { font-size: 12.5px; color: var(--ink-2); letter-spacing: 0.06em; }
.dim__track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.075); overflow: hidden; }
.dim__fill {
  height: 100%; width: 0;
  border-radius: 4px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--hero-color) 65%, #fff), var(--hero-color));
  box-shadow: 0 0 12px color-mix(in srgb, var(--hero-color) 70%, transparent);
  transition: width 1.1s var(--ease);
}
.dim__val {
  font-size: 11px; color: var(--ink-4); text-align: right;
  font-variant-numeric: tabular-nums;
}

/* 雷达 */
.radar-wrap {
  display: grid; grid-template-columns: 1fr; place-items: center;
  padding: 8px 0 4px;
}
.radar { width: 100%; max-width: 260px; height: auto; overflow: visible; }
.radar text { fill: var(--ink-3); font-size: 9.5px; letter-spacing: 0.08em; }
.radar .r-grid { fill: none; stroke: rgba(255, 255, 255, 0.08); }
.radar .r-axis { stroke: rgba(255, 255, 255, 0.06); }
.radar .r-area {
  fill: color-mix(in srgb, var(--hero-color) 26%, transparent);
  stroke: var(--hero-color);
  stroke-width: 1.4;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--hero-color) 55%, transparent));
}
.radar .r-dot { fill: #fff; }

/* 文案块 */
.prose {
  border-radius: var(--radius);
  padding: 19px 20px;
  background: var(--card);
  border: 1px solid var(--line);
}
.prose + .prose { margin-top: 12px; }
.prose__label {
  display: block;
  margin: 0 0 9px;
  font-size: 11px; letter-spacing: 0.2em; font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
}
.prose p {
  margin: 0; font-size: 14.5px; line-height: 1.95; color: var(--ink-2);
}
.prose p + p { margin-top: 12px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose b { color: var(--ink); font-weight: 600; }
.lucky-ink {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 7px; vertical-align: 1px;
  background: var(--lk, var(--accent));
  box-shadow: 0 0 10px var(--lk, var(--accent));
}

/* 配对 */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.pair__box {
  border-radius: var(--radius-sm);
  padding: 15px 15px 16px;
  background: var(--card);
  border: 1px solid var(--line);
}
.pair__box--good { border-color: color-mix(in srgb, var(--accent-2) 28%, transparent); }
.pair__box--bad { border-color: rgba(255, 140, 140, 0.2); }
.pair__k { font-size: 10.5px; letter-spacing: 0.16em; color: var(--ink-4); display: block; margin-bottom: 8px; }
.pair__v { font-family: var(--font-serif); font-size: 17px; color: var(--ink); }
.pair__box--good .pair__v { color: var(--accent-2); }
.pair__box--bad .pair__v { color: #ff9d9d; }
.pair__d { margin: 6px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--ink-3); }

/* 付费锁 */
.locked {
  position: relative;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(201, 182, 255, 0.1), rgba(124, 227, 208, 0.05) 70%),
    rgba(255, 255, 255, 0.02);
}
.locked__blur {
  padding: 20px;
  filter: blur(3.5px);
  opacity: 0.5;
  user-select: none; pointer-events: none;
}
.locked__blur p { margin: 0 0 10px; font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.locked__blur p:last-child { margin-bottom: 0; }
.locked__mask {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(8, 9, 20, 0.25), rgba(8, 9, 20, 0.88) 62%);
}
.locked__icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-2);
  color: var(--accent);
}
.locked__t { margin: 0; font-family: var(--font-serif); font-size: 17px; letter-spacing: 0.03em; }
.locked__s { margin: 0; font-size: 12px; line-height: 1.7; color: var(--ink-3); max-width: 26ch; }

/* 底部 */
.result-foot { flex: none; padding: 26px 0 10px; }
.result-actions { display: flex; gap: 10px; margin-bottom: 6px; }
.colophon {
  margin: 18px 0 0; text-align: center;
  font-size: 10px; letter-spacing: 0.24em; color: var(--ink-4);
  text-transform: uppercase;
}

/* ---------------- 分享图面板 ---------------- */
.sheet {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.sheet.is-open { opacity: 1; visibility: visible; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(2, 3, 8, 0.78); backdrop-filter: blur(6px); }
.sheet__panel {
  position: relative;
  width: 100%; max-width: 520px;
  max-height: 92dvh;
  overflow-y: auto;
  padding: 10px 20px calc(22px + var(--safe-b));
  border-radius: 26px 26px 0 0;
  background: linear-gradient(180deg, #12142a, #080912);
  border-top: 1px solid var(--line-2);
  transform: translateY(100%);
  transition: transform 0.45s var(--ease);
  scrollbar-width: none;
}
.sheet.is-open .sheet__panel { transform: none; }
.sheet__panel::-webkit-scrollbar { display: none; }
.sheet__bar { padding: 6px 0 14px; cursor: pointer; }
.sheet__bar span { display: block; width: 38px; height: 4px; border-radius: 4px; margin: 0 auto; background: var(--line-2); }
.sheet__img {
  width: 100%; border-radius: 16px; display: block;
  border: 1px solid var(--line); margin-bottom: 17px;
}
.sheet__tip { margin: 0 0 14px; text-align: center; font-size: 11.5px; color: var(--ink-4); }

/* ---------------- Toast ---------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--safe-b));
  transform: translate(-50%, 18px);
  z-index: 80;
  padding: 10px 20px; border-radius: 999px;
  background: rgba(20, 22, 38, 0.96);
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-size: 13px; letter-spacing: 0.03em;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s var(--ease);
  max-width: 84vw; text-align: center;
  backdrop-filter: blur(10px);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 桌面端：手机壳 ---------------- */
@media (min-width: 700px) {
  body { display: grid; place-items: center; background: #04050b; }
  body::before {
    content: ""; position: fixed; inset: 0;
    background:
      radial-gradient(60% 50% at 50% 30%, rgba(105, 78, 200, 0.16), transparent 70%),
      radial-gradient(50% 40% at 80% 80%, rgba(30, 120, 135, 0.1), transparent 70%);
  }
  .app {
    position: relative;
    height: min(880px, 94dvh);
    max-width: 430px;
    border-radius: 38px;
    background: rgba(8, 9, 18, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
      0 50px 120px -40px rgba(0, 0, 0, 0.9),
      0 0 0 1px rgba(255, 255, 255, 0.04) inset,
      0 0 90px -50px rgba(201, 182, 255, 0.55);
    backdrop-filter: blur(14px);
    overflow: hidden;
  }
  .view { padding-left: 30px; padding-right: 30px; }
  .bg { opacity: 0.55; }
}

@media (max-height: 720px) {
  .landing__seal { width: 130px; height: 130px; margin-bottom: 16px; }
  .seal-glyph { font-size: 42px; }
  .display { font-size: 34px; margin-bottom: 12px; }
  .lede { font-size: 13px; margin-bottom: 16px; line-height: 1.8; }
  .stats { margin-bottom: 20px; }
  .site-foot { display: none; }
  .q-text { margin-bottom: 20px; }
  .opt { padding: 12px 14px; font-size: 14px; }
}

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