:root {
  --bg: #0b0c0e;
  --panel: #121419;
  --ink: #e9e2d6;
  --ink-dim: #b9b1a4;
  --muted: #8b857a;
  --brass: #c6a15b;
  --brass-soft: rgba(198, 161, 91, 0.35);
  --line: rgba(233, 226, 214, 0.10);
  --line-strong: rgba(198, 161, 91, 0.28);
  --max: 720px;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

/* 长短页面切换时始终预留滚动条宽度：否则进入长页面时滚动条出现，
   会把进度条的百分比宽度挤小几个像素，看起来像“回退”。 */
html { scrollbar-gutter: stable; }
@supports not (scrollbar-gutter: stable) {
  html { overflow-y: scroll; }
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(1100px 700px at 70% -12%, rgba(198, 161, 91, 0.09), transparent 62%),
    radial-gradient(900px 600px at 8% 108%, rgba(90, 120, 140, 0.07), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.noscript { padding: 40px; text-align: center; color: var(--ink-dim); }

/* ---------- shared ---------- */

.shell { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 22px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(11, 12, 14, 0.94);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 22px 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--sans);
}

.topbar__brand { font-size: 12px; letter-spacing: 0.28em; color: var(--ink-dim); }
.topbar__meta { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }

.bar { position: sticky; top: 55px; z-index: 9; height: 2px; background: var(--line); }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7d5f2d, var(--brass)); transition: width 0.45s ease; }

.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--brass);
  text-transform: uppercase;
  margin: 0 0 14px;
}

h1, h2 { font-weight: 500; margin: 0; letter-spacing: 0.04em; }

.lede { color: var(--ink-dim); font-size: 16px; line-height: 1.9; margin: 16px 0 0; text-wrap: pretty; }

.btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(198, 161, 91, 0.14), rgba(198, 161, 91, 0.05));
  color: var(--ink);
  padding: 14px 20px;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.btn:hover { border-color: var(--brass); background: rgba(198, 161, 91, 0.12); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.btn--solid { background: var(--brass); border-color: var(--brass); color: #17140f; font-weight: 600; }
.btn--solid:hover { background: #d5b273; }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink-dim); }
.btn--ghost:hover { border-color: var(--line-strong); color: var(--ink); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  background: rgba(20, 22, 26, 0.96);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13px;
  padding: 11px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 6, 8, 0.72);
  backdrop-filter: blur(8px);
  animation: fade 0.18s ease both;
}

.modal__card {
  width: 100%;
  max-width: 380px;
  padding: 26px 24px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #14161a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.65);
}

.modal__card h2 { font-size: 20px; margin: 0 0 10px; }

.modal__card p {
  margin: 0 0 22px;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.8;
}

.modal__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

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

/* ---------- cover (gate) ---------- */

.cover {
  position: relative;
  flex: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 26px 26px calc(22px + env(safe-area-inset-bottom));
  overflow: hidden;
}

.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(520px 420px at 50% 40%, rgba(198, 161, 91, 0.12), transparent 68%),
    radial-gradient(800px 600px at 50% 110%, rgba(90, 120, 140, 0.06), transparent 60%);
  pointer-events: none;
}

.cover__top {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.cover__main {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0 30px;
  animation: rise 0.7s ease both;
}

.cover__eyebrow {
  margin: 0 0 26px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.34em;
  color: var(--brass);
}

.mirror__title {
  font-size: clamp(46px, 12.5vw, 68px);
  line-height: 1.02;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.mirror__title span { display: block; }
.mirror__title span + span { margin-left: 0.55em; }

.mirror__surface {
  height: 1px;
  margin: 20px 0 0;
  background: linear-gradient(90deg, rgba(198, 161, 91, 0.55), rgba(198, 161, 91, 0.08) 70%, transparent);
}

.cover__intro {
  margin: 20px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.cover__tagline {
  margin: 8px 0 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.cover form {
  margin-top: 34px;
}

.cover__label {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.cover input {
  width: 100%;
  margin-top: 10px;
  padding: 10px 0 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.18s ease;
}
.cover input::placeholder { color: #5f5a52; letter-spacing: 0.14em; }
.cover input:focus { border-color: var(--brass); }

.cover .btn {
  width: 100%;
  margin-top: 20px;
  border-radius: 2px;
  letter-spacing: 0.2em;
}

.cover__error {
  min-height: 20px;
  margin-top: 10px;
  color: #d98b7a;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
}

.cover__hint {
  margin: 16px 0 0;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
}

.cover__foot {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(23, 20, 15, 0.35);
  border-top-color: #17140f;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
}

/* ---------- intro ---------- */

.intro { flex: 1; padding: 32px 0 60px; animation: rise 0.5s ease both; }

.intro h1 { font-size: 36px; line-height: 1.2; margin-top: 4px; }

.intro__acts { list-style: none; padding: 0; margin: 26px 0 0; border-top: 1px solid var(--line); }

.intro__acts li {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  line-height: 1.6;
}
.intro__acts b { font-weight: 500; color: var(--brass); font-family: var(--sans); font-size: 12px; letter-spacing: 0.12em; }
.intro__acts span { color: var(--ink-dim); }
.intro__acts em { display: block; font-style: normal; color: var(--muted); font-size: 12px; letter-spacing: 0.06em; margin-top: 3px; }

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 22px 0 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-dim);
  cursor: pointer;
}
.consent input { margin-top: 3px; accent-color: var(--brass); }

.intro__actions { display: grid; gap: 10px; }

/* ---------- act ---------- */

.act {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 56px);
  padding: 0 0 18vh;
  text-align: center;
  animation: rise 0.5s ease both;
}

.act__num { font-family: var(--sans); font-size: 12px; letter-spacing: 0.3em; color: var(--brass); }

.act h1 { font-size: 44px; margin: 12px 0 10px; }

.act__keys { font-family: var(--sans); font-size: 12px; letter-spacing: 0.14em; color: var(--muted); }

.act__intro { margin: 24px auto 30px; max-width: 30em; }

.act__count { font-family: var(--sans); font-size: 12px; color: var(--muted); letter-spacing: 0.1em; margin-bottom: 26px; }

/* ---------- scene ---------- */

.scene { flex: 1; padding: 34px 0 80px; animation: rise 0.4s ease both; }

.scene__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 24px;
}

.scene__title {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--brass);
  margin: 0 0 10px;
}

.scene h2 { font-size: 30px; line-height: 1.35; margin-bottom: 24px; }

.scene__body p {
  margin: 0 0 9px;
  font-size: 17.5px;
  line-height: 1.95;
  letter-spacing: 0.01em;
  text-wrap: pretty;
}

.options { display: grid; gap: 11px; margin-top: 34px; }

.option {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  width: 100%;
  padding: 17px 17px;
  background: rgba(255, 255, 255, 0.014);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.75;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}
.option:hover { border-color: var(--line-strong); background: rgba(198, 161, 91, 0.05); transform: translateY(-1px); }
.option:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.option:disabled { cursor: default; transform: none; }
.option:disabled:not(.is-chosen) { opacity: 0.32; }
.option.is-chosen { border-color: var(--brass); background: rgba(198, 161, 91, 0.075); }

.option__label {
  flex: 0 0 auto;
  min-width: 2.1em;
  padding-top: 2px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--brass);
}

/* ---------- echo ---------- */

.echo {
  margin-top: 28px;
  padding: 22px 20px 18px;
  border-left: 2px solid var(--brass);
  background: linear-gradient(90deg, rgba(198, 161, 91, 0.075), rgba(198, 161, 91, 0.008));
  border-radius: 0 12px 12px 0;
  animation: rise 0.45s ease both;
}

.echo__label {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  color: var(--brass);
  text-transform: uppercase;
}

.echo p {
  margin: 12px 0 16px;
  font-size: 17px;
  line-height: 1.98;
  white-space: pre-wrap;
}

.echo .btn { width: 100%; }

/* ---------- result ---------- */

.result { flex: 1; padding: 44px 0 80px; animation: rise 0.5s ease both; }

.result h1 { font-size: 30px; line-height: 1.32; margin-top: 4px; text-wrap: balance; }

.result__stats {
  display: flex;
  gap: 26px;
  margin: 26px 0 34px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--sans);
}
.result__stats div { display: grid; gap: 5px; }
.result__stats b { font-size: 22px; font-weight: 500; color: var(--ink); }
.result__stats span { font-size: 10.5px; letter-spacing: 0.14em; color: var(--muted); }

.timeline { border-top: 1px solid var(--line); }

.entry { border-bottom: 1px solid var(--line); }

.entry__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  padding: 14px 0;
  background: none;
  border: 0;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
}
.entry__head:hover .entry__title { color: var(--brass); }

.entry__q { font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted); min-width: 40px; }
.entry__title { font-family: var(--serif); font-size: 16px; transition: color 0.16s ease; }
.entry__pick { margin-left: auto; font-size: 10.5px; letter-spacing: 0.12em; color: var(--brass); }

.entry__body {
  display: none;
  padding: 0 0 18px 52px;
  color: var(--ink-dim);
  font-size: 15px;
  line-height: 1.95;
  white-space: pre-wrap;
}
.entry.is-open .entry__body { display: block; animation: rise 0.3s ease both; }

.feedback { margin-top: 42px; padding-top: 28px; border-top: 1px solid var(--line); }

.feedback h2 { font-size: 22px; margin-bottom: 8px; }

.feedback__row {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-dim);
}

.scale { display: flex; gap: 8px; }

.scale button {
  flex: 1;
  padding: 10px 0;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 13px;
  cursor: pointer;
}
.scale button:hover { border-color: var(--line-strong); }
.scale button.is-on { border-color: var(--brass); color: var(--brass); background: rgba(198, 161, 91, 0.09); }

.feedback textarea {
  width: 100%;
  min-height: 92px;
  margin-top: 6px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.7;
  resize: vertical;
  outline: none;
}
.feedback textarea:focus { border-color: var(--brass); }

.result__actions { display: grid; gap: 10px; margin-top: 30px; }

.foot {
  padding: 26px 0 calc(30px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  margin-top: 10px;
  font-family: var(--sans);
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
}

.foot a { color: var(--ink-dim); }

/* ---------- motion ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes spin { to { transform: rotate(360deg); } }

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

@media (min-width: 760px) {
  .scene { padding: 52px 0 100px; }
  .scene__body p { font-size: 18px; }
  .option { font-size: 17px; }
  .gate h1 { font-size: 38px; }
  .intro h1 { font-size: 46px; }
}

/* ---------- profile result ---------- */

.profile { display: grid; gap: 26px; margin-top: 28px; }

.profile__sigil { display: grid; place-items: center; }

.sigil { width: 240px; height: 240px; display: block; }

.sigil text {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  fill: #8a857b;
}

.profile__dims { display: grid; gap: 18px; }

.profile__note {
  margin: 14px 0 0;
  font-family: var(--sans);
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted);
}

.dim__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
}
.dim__head b { font-family: var(--sans); font-size: 12px; color: var(--brass); font-weight: 500; }

.dim__track { position: relative; height: 1px; background: var(--line); margin: 10px 0 7px; }
.dim__track::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  width: 1px;
  height: 7px;
  background: rgba(233, 226, 214, 0.25);
}
.dim__track i {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: var(--brass);
  box-shadow: 0 0 0 4px rgba(198, 161, 91, 0.12);
}

.dim__poles {
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
}

.dim__meta {
  margin-top: 5px;
  font-family: var(--sans);
  font-size: 10.5px;
  color: #6f6a62;
  letter-spacing: 0.02em;
}

.block { margin-top: 38px; }
.block h2 { font-size: 20px; margin-bottom: 14px; }

.strategies { display: flex; flex-wrap: wrap; gap: 8px; }

.strategy {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-dim);
}
.strategy b { color: var(--brass); font-weight: 600; }

.contra {
  border-left: 2px solid var(--line-strong);
  padding: 2px 0 2px 16px;
  margin-bottom: 22px;
}
.contra__dim {
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin: 0 0 12px;
}
.contra__grid { display: grid; gap: 12px; }
.contra__item {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.contra__q {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}
.contra__tag { color: var(--brass); white-space: nowrap; }
.contra__item p { margin: 0; font-size: 14px; line-height: 1.75; color: var(--ink-dim); }
.contra__note { margin: 10px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }

.revisit { margin-top: 38px; padding-top: 26px; border-top: 1px solid var(--line); }
.revisit h3 { font-size: 22px; margin: 8px 0 12px; }
.revisit__pick { font-size: 14px; line-height: 1.8; color: var(--ink-dim); margin: 0 0 16px; }
.revisit__echo {
  margin-top: 16px;
  padding: 16px;
  border-left: 2px solid var(--brass);
  background: rgba(198, 161, 91, 0.05);
  font-size: 15px;
  line-height: 1.9;
  color: var(--ink);
  white-space: pre-wrap;
}

.all { margin-top: 38px; border-top: 1px solid var(--line); padding-top: 18px; }
.all summary {
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--ink-dim);
  list-style: none;
}
.all summary::-webkit-details-marker { display: none; }
.all summary::before { content: "+ "; color: var(--brass); }
.all[open] summary::before { content: "− "; }
.all .timeline { margin-top: 18px; }

.muted { color: var(--muted); font-size: 13px; line-height: 1.8; }

@media (min-width: 760px) {
  .profile { grid-template-columns: 260px 1fr; align-items: center; gap: 36px; }
  .profile__sigil { justify-content: start; }
}

