:root {
  color-scheme: dark;
  --bg: #0c0d0b;
  --surface: #151711;
  --surface-2: #1d2018;
  --ink: #f6f0df;
  --muted: #b9b09a;
  --gold: #d5ae5a;
  --gold-dark: #8d6b31;
  --line: rgba(213, 174, 90, 0.28);
  --green: #56896a;
  --red: #8f4844;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html { background: #080907; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; background: var(--bg); }
.screen { display: none; min-height: 100vh; padding: 26px 20px 110px; animation: appear .28s ease; }
.screen.active { display: block; }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } }
.hero-screen { position: relative; padding: 0; overflow: hidden; }
.hero-image {
  min-height: 58vh;
  background:
    linear-gradient(180deg, rgba(8,9,7,.03) 8%, rgba(12,13,11,.50) 70%, var(--bg) 100%),
    url("/assets/hero-starry.png") center/cover no-repeat;
}
.hero-content { margin-top: -112px; position: relative; padding: 0 22px 40px; }
.kicker, .step-label { margin: 0 0 8px; color: var(--gold); font-size: 13px; font-weight: 700; }
h1 { margin: 0 0 14px; max-width: 500px; font-size: clamp(42px, 11vw, 68px); line-height: 1.04; letter-spacing: 0; }
h2 { margin: 0 0 10px; font-size: 27px; letter-spacing: 0; }
h3 { margin: 0; font-size: 21px; line-height: 1.5; letter-spacing: 0; }
p { line-height: 1.75; }
.hero-lead { max-width: 590px; color: #f2d996; font-size: 19px; text-wrap: balance; }
.hero-points, .tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 24px; }
.hero-points span, .tag { border: 1px solid var(--line); padding: 7px 10px; color: #e8d8ac; font-size: 13px; }
.privacy-note, .lead-copy, .muted, .screen-subtitle, .engine-note { color: var(--muted); }
.screen-subtitle { margin: 6px 0 0; font-size: 14px; line-height: 1.5; }
.primary, .secondary, .icon-button {
  min-height: 46px; border: 0; padding: 0 16px; color: #171208; background: var(--gold); font-weight: 700;
}
.secondary { border: 1px solid var(--line); color: var(--gold); background: transparent; }
.icon-button { width: 42px; padding: 0; border: 1px solid var(--line); color: var(--gold); background: transparent; font-size: 20px; }
.wide { width: 100%; }
button:disabled { opacity: .4; cursor: not-allowed; }
.screen-header { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 24px; }
.screen-header.sticky { position: sticky; top: 0; z-index: 4; padding: 12px 0; background: rgba(12,13,11,.94); backdrop-filter: blur(10px); }
.form-layout { display: grid; gap: 18px; }
.form-section { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.form-section-head { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; padding-bottom: 2px; }
.form-section-head > span {
  display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line);
  color: var(--gold); font-weight: 700; font-size: 13px; background: rgba(213,174,90,.08);
}
.form-section-head h3 { margin: 0 0 4px; color: #efd38b; font-size: 18px; line-height: 1.35; }
.form-section-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
label, fieldset { display: grid; gap: 8px; min-width: 0; }
label > span, legend { color: #d8cba9; font-size: 14px; }
fieldset { margin: 0; border: 1px solid var(--line); padding: 14px; }
input, select, textarea {
  width: 100%; min-height: 48px; border: 1px solid rgba(255,255,255,.12); border-radius: 4px;
  padding: 10px 12px; color: var(--ink); background: var(--surface); outline: none;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(213,174,90,.1); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toggle-row { grid-template-columns: 22px 1fr; align-items: center; }
.toggle-row input { width: 18px; min-height: 18px; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.choice-grid label { display: flex; align-items: center; gap: 7px; padding: 10px; border: 1px solid rgba(255,255,255,.1); }
.choice-grid input { width: 17px; min-height: 17px; }
.chart-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 18px 0; }
.pillar { min-width: 0; padding: 14px 7px; border: 1px solid var(--line); background: var(--surface); text-align: center; }
.pillar small, .pillar span { display: block; color: var(--muted); font-size: 12px; }
.pillar strong { display: block; margin: 8px 0; color: #f0d58f; font-size: 25px; }
.info-card, .candidate-card, .report-card, .question-card, .wechat-section {
  margin-bottom: 14px; padding: 17px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow);
}
.info-card p, .candidate-card p, .report-card p, .report-card li, .wechat-section p { color: var(--muted); }
.fixed-actions {
  position: fixed; z-index: 10; left: 50%; bottom: 0; width: min(100%, 760px); transform: translateX(-50%);
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: rgba(12,13,11,.94); border-top: 1px solid var(--line); backdrop-filter: blur(12px);
}
.loading-screen { text-align: center; padding-top: 21vh; }
.engine-note { margin: 10px 0 0; font-size: 13px; }
.orbital-mark { position: relative; width: 150px; height: 150px; margin: 0 auto 28px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; animation: breathe 2s infinite; }
.orbital-mark::before, .orbital-mark::after { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(213,174,90,.18); border-radius: 50%; transform: rotate(48deg); }
.orbital-mark::after { inset: 38px; transform: rotate(-28deg); }
.orbital-mark span { color: var(--gold); font-size: 38px; }
@keyframes breathe { 50% { transform: scale(1.04); box-shadow: 0 0 35px rgba(213,174,90,.2); } }
.loading-line { width: 220px; height: 4px; margin: 24px auto; background: #24271f; overflow: hidden; }
.loading-line span { display: block; width: 45%; height: 100%; background: var(--gold); animation: travel 1.5s infinite; }
@keyframes travel { from { transform: translateX(-110%); } to { transform: translateX(250%); } }
.candidate-group h3 { margin: 26px 0 10px; color: #efd38b; }
.candidate-card strong { display: block; margin-bottom: 5px; }
.explain-block { margin: 12px 0; padding: 13px 14px; border: 1px solid rgba(213,174,90,.16); background: rgba(255,255,255,.025); }
.explain-block span { display: inline-block; margin-bottom: 4px; color: var(--gold); font-size: 12px; font-weight: 700; }
.explain-block p { margin: 0; }
.professional-detail { margin-top: 10px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 10px; color: var(--muted); }
.professional-detail summary { cursor: pointer; color: #e4cf9a; font-size: 14px; font-weight: 700; }
.professional-detail p { margin: 10px 0 0; }
.progress { height: 5px; margin: -10px 0 24px; background: #292c23; }
.progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s; }
.question-help { color: var(--gold); font-size: 13px; }
.answer-options { display: grid; gap: 9px; margin: 22px 0; }
.answer-option { width: 100%; min-height: 50px; border: 1px solid rgba(255,255,255,.1); padding: 10px 12px; color: var(--ink); background: var(--surface-2); text-align: left; }
.answer-option.selected { border-color: var(--gold); background: rgba(213,174,90,.11); box-shadow: 0 0 0 2px rgba(213,174,90,.08); }
.optional-note { margin-top: 16px; }
.report-toolbar { position: sticky; top: 0; z-index: 4; display: flex; justify-content: space-between; padding: 10px 0; background: rgba(12,13,11,.94); backdrop-filter: blur(10px); }
.report-cover { padding: 32px 4px 20px; }
.report-cover h1 { font-size: 38px; }
.confidence { color: var(--gold); }
.report-card h2 { color: #efd38b; font-size: 22px; }
.report-card h4 { margin: 18px 0 5px; color: #e4cf9a; }
.report-card ul { padding-left: 20px; }
.stages { display: grid; gap: 10px; }
.stage { padding: 14px; border-left: 3px solid var(--gold-dark); background: rgba(255,255,255,.025); }
.stage.extreme { border-left-color: var(--red); }
.stage.excellent { border-left-color: var(--green); }
.wechat-section { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 18px; margin-top: 24px; background: linear-gradient(135deg, rgba(21,23,17,.98), rgba(16,36,28,.76)); }
.wechat-section img { width: min(100%, 190px); justify-self: center; border: 8px solid #f7fff9; box-shadow: 0 14px 34px rgba(0,0,0,.34); }
.toast { position: fixed; left: 50%; bottom: 88px; z-index: 30; transform: translateX(-50%) translateY(20px); opacity: 0; padding: 10px 14px; background: #efe0b5; color: #15120b; transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (max-width: 520px) {
  .two-col { grid-template-columns: 1fr; }
  .chart-grid { gap: 5px; }
  .pillar strong { font-size: 21px; }
  .wechat-section { grid-template-columns: 1fr; }
  .wechat-section img { width: min(100%, 280px); margin: auto; }
}
