:root {
  --ink: #0d0918;
  --ink-2: #150e26;
  --ink-3: #1d1433;
  --gold: #c8a45c;
  --gold-dim: rgba(200, 164, 92, 0.32);
  --cream: #f3ebdd;
  --muted: #a79cb8;
  --line: rgba(200, 164, 92, 0.24);
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100dvh;
  background-image:
    radial-gradient(120% 60% at 50% -10%, rgba(74, 52, 122, 0.55) 0%, rgba(13, 9, 24, 0) 60%),
    radial-gradient(80% 40% at 100% 100%, rgba(38, 26, 66, 0.5) 0%, rgba(13, 9, 24, 0) 70%);
  background-attachment: fixed;
}
.wrap { max-width: 460px; margin: 0 auto; padding: 30px 22px 140px; }
.view { display: none; }
.view.on { display: block; animation: fade 0.35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.eyebrow {
  font-size: 11px; letter-spacing: 0.34em; color: var(--gold);
  text-transform: uppercase; margin: 0 0 18px; font-weight: 500;
}
.rule { height: 1px; background: var(--line); border: 0; margin: 26px 0; }
h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 8.6vw, 42px);
  line-height: 1.25; margin: 0 0 18px; letter-spacing: 0.01em;
}
h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.4; margin: 0 0 14px; }
.lead { color: var(--muted); font-size: 15.5px; margin: 0 0 26px; }
.small { font-size: 13px; color: var(--muted); line-height: 1.7; }
.gold { color: var(--gold); }

.btn {
  display: block; width: 100%; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: 0.04em;
  padding: 17px 20px; border-radius: 2px;
  background: var(--gold); color: #150f22;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.99); filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--cream); border: 1px solid var(--line); font-weight: 500; }
.btn.buy { text-align: center; text-decoration: none; }
.btn.buy[data-muted="1"] { background: transparent; border: 1px solid var(--line); color: var(--muted); font-weight: 500; pointer-events: none; }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-row { display: grid; gap: 12px; margin-top: 16px; }

/* 首页 */
.hero-card {
  margin: 8px 0 30px; padding: 26px 22px;
  border: 1px solid var(--line); border-radius: 2px;
  background: linear-gradient(160deg, rgba(40, 28, 68, 0.55), rgba(13, 9, 24, 0.2));
}
.hero-card .q { font-family: var(--serif); font-size: 21px; line-height: 1.6; margin: 0 0 12px; }
.steps { list-style: none; padding: 0; margin: 0 0 8px; }
.steps li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 15px; }
.steps li:first-child { border-top: 0; }
.steps .n { color: var(--gold); font-family: var(--serif); font-size: 15px; min-width: 22px; }
.meta-row { display: flex; gap: 16px; color: var(--muted); font-size: 12.5px; letter-spacing: 0.06em; margin-bottom: 26px; }

/* 测试 */
.qbar { height: 2px; background: rgba(200, 164, 92, 0.16); margin: 0 0 26px; }
.qbar > i { display: block; height: 100%; background: var(--gold); width: 0; transition: width 0.3s ease; }
.qcount { font-size: 12px; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 14px; }
.qtext { font-family: var(--serif); font-size: 24px; line-height: 1.55; margin: 0 0 26px; min-height: 76px; }
.opt {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: rgba(255, 255, 255, 0.025); color: var(--cream);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 16px 18px; margin-bottom: 12px;
  font-family: var(--sans); font-size: 15.5px; line-height: 1.65;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.opt:hover { border-color: rgba(200, 164, 92, 0.5); }
.opt.sel { border-color: var(--gold); background: rgba(200, 164, 92, 0.09); }
.qback { background: none; border: 0; color: var(--muted); font-size: 13px; padding: 8px 0; cursor: pointer; }

/* 结果 */
.card-art {
  position: relative; margin: 0 auto 24px; width: 176px; aspect-ratio: 2 / 3;
  border: 1px solid var(--gold-dim); border-radius: 3px;
  background: linear-gradient(165deg, #241a3d 0%, #120c22 70%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.card-art .numeral {
  position: absolute; top: 10px; left: 0; right: 0; text-align: center;
  font-family: var(--serif); font-size: 11px; letter-spacing: 0.3em; color: var(--gold);
  opacity: 0.85;
}
.card-art .glyph { width: 86px; height: 86px; opacity: 0.92; }
.result-head { text-align: center; margin-bottom: 8px; }
.result-head .name { font-family: var(--serif); font-size: 34px; letter-spacing: 0.08em; margin: 0 0 8px; }
.result-head .tagline { color: var(--gold); font-size: 14px; letter-spacing: 0.16em; margin: 0 0 14px; }
.oneline { font-family: var(--serif); font-size: 18px; line-height: 1.75; color: var(--cream); margin: 0 0 18px; text-align: center; }
.core { font-size: 15px; line-height: 1.9; color: var(--muted); text-align: center; margin: 0 auto 30px; max-width: 28em; }

.sec { margin-bottom: 28px; }
.sec h3 {
  font-size: 12px; letter-spacing: 0.26em; color: var(--gold);
  font-weight: 500; margin: 0 0 12px; text-transform: uppercase;
}
.sec p { margin: 0 0 10px; font-size: 16px; line-height: 1.85; color: #e8dfd0; }
.sec.quote p { font-family: var(--serif); font-size: 19px; color: var(--cream); }

.locked { position: relative; border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 18px; margin-bottom: 18px; }
.locked .blur-txt {
  filter: blur(5.5px); opacity: 0.42; font-size: 15.5px; line-height: 1.85;
  user-select: none; pointer-events: none;
}
.locked .lock-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 6px; }
.locked .lock-head b { font-size: 15px; font-weight: 600; letter-spacing: 0.04em; }
.locked .lock-head span { font-size: 11px; letter-spacing: 0.18em; color: var(--gold); }
.locked .teaser { color: var(--muted); font-size: 13.5px; margin: 0; }

.paywall {
  border: 1px solid var(--gold-dim); background: linear-gradient(170deg, rgba(200, 164, 92, 0.07), rgba(200, 164, 92, 0.01));
  padding: 22px 20px; border-radius: 3px; margin: 8px 0 22px;
}
.paywall .price { font-family: var(--serif); font-size: 36px; color: var(--gold); line-height: 1; }
.paywall .price small { font-size: 14px; color: var(--muted); margin-left: 8px; letter-spacing: 0.08em; }
.paywall ul { margin: 14px 0 0; padding: 0 0 0 18px; color: #ded5c7; font-size: 14px; line-height: 1.9; }
.paywall li::marker { color: var(--gold); }

.linkbtn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--gold);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; padding: 14px 22px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(13, 9, 24, 0.98) 40%, rgba(13, 9, 24, 0));
  z-index: 20;
}
.sticky .inner { max-width: 460px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.sticky .price-tag { font-family: var(--serif); color: var(--gold); font-size: 17px; white-space: nowrap; }
.sticky .btn { flex: 1; padding: 15px 16px; }

/* 购买弹层 */
.backdrop {
  position: fixed; inset: 0; background: rgba(6, 4, 12, 0.7); opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease; z-index: 30; backdrop-filter: blur(2px);
}
.backdrop.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31;
  background: #17102a; border-top: 1px solid var(--gold-dim);
  border-radius: 14px 14px 0 0;
  padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
  transform: translateY(102%); transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 92dvh; overflow-y: auto;
}
.sheet.on { transform: none; }
.sheet .inner { max-width: 460px; margin: 0 auto; }
.sheet .grab { width: 38px; height: 3px; background: rgba(255, 255, 255, 0.18); border-radius: 2px; margin: -8px auto 18px; }
.sheet h2 { font-size: 23px; margin-bottom: 6px; }
.sheet .price-line { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 4px; }
.sheet .price-line b { font-family: var(--serif); font-size: 32px; color: var(--gold); font-weight: 400; }
.sheet .price-line span { color: var(--muted); font-size: 13px; }
.sheet ul { padding-left: 18px; margin: 14px 0; color: #ded5c7; font-size: 14.5px; line-height: 1.9; }
.sheet li::marker { color: var(--gold); }
.code-input {
  width: 100%; padding: 15px 16px; margin: 6px 0 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 3px;
  color: var(--cream); font-size: 16px; letter-spacing: 0.12em; font-family: var(--sans);
  text-transform: uppercase;
}
.code-input:focus { outline: none; border-color: var(--gold); }
.err { color: #e08a7d; font-size: 13.5px; min-height: 20px; margin: 4px 0 8px; }
.pay-help { background: rgba(255, 255, 255, 0.035); border-left: 2px solid var(--gold-dim); padding: 12px 14px; font-size: 13.5px; color: #ded5c7; line-height: 1.8; margin: 6px 0 18px; }
.hr-soft { height: 1px; background: rgba(255, 255, 255, 0.08); margin: 20px 0; border: 0; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: #f3ebdd; color: #150f22; padding: 11px 18px; border-radius: 3px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 40;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.footer-note { padding: 6px 0 0; }
canvas { display: none; }
