:root {
  --paper: #f2eee4;
  --surface: #fffdf7;
  --ink: #25231f;
  --muted: #746d61;
  --line: #d9cfbd;
  --line-strong: #bcaf99;
  --accent: #9f3126;
  --accent-dark: #7f251d;
  --accent-soft: #f2ded8;
  --wood: #3f7652;
  --fire: #b74d35;
  --earth: #9a7138;
  --metal: #6d7480;
  --water: #356a83;
  --shadow: 0 20px 60px rgba(61, 46, 27, 0.09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }

.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(217, 207, 189, 0.82);
  background: rgba(255, 253, 247, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 720;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: "Songti SC", STSong, serif;
  font-size: 20px;
}

.top-note {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--wood); }

.hero {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: clamp(44px, 7vw, 92px);
  align-items: center;
  padding-block: 70px 84px;
}

.hero-copy { position: relative; padding-right: 24px; }
.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }

h1, h2, .report-title {
  font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif;
  font-weight: 600;
  letter-spacing: -0.035em;
}

h1 { margin-bottom: 25px; font-size: clamp(42px, 5.7vw, 76px); line-height: 1.08; }
h2 { margin-bottom: 0; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.2; }

.hero-lead {
  max-width: 690px;
  margin-bottom: 34px;
  color: #514c43;
  font-family: "Songti SC", STSong, serif;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.8;
}

.promise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-block: 1px solid var(--line);
}

.promise-grid div { padding: 19px 16px 19px 0; }
.promise-grid div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.promise-grid strong { display: block; margin-bottom: 4px; font-size: 14px; }
.promise-grid span { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; }

.hero-seal {
  position: absolute;
  right: -24px;
  bottom: -66px;
  width: 74px;
  height: 110px;
  display: grid;
  place-items: center;
  border: 4px double var(--accent);
  color: var(--accent);
  font-family: "Songti SC", STSong, serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transform: rotate(-3deg);
  opacity: 0.82;
}

.report-form {
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-heading {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.form-heading h2 { font-size: 31px; }
.step-label { color: var(--muted); font-size: 12px; white-space: nowrap; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px 16px; }
.field-wide { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span, .field legend { color: #4b463e; font-size: 13px; font-weight: 720; }
.field b { color: var(--accent); }
.field small { color: var(--muted); font-size: 11px; line-height: 1.5; }

input, select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  color: var(--ink);
  background: #fffefa;
  outline: none;
}

input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(159, 49, 38, 0.12); }

.sect-field {
  margin: 0;
  padding: 0;
  border: 0;
  align-content: end;
  grid-template-columns: 1fr 1fr;
}

.sect-field legend { grid-column: 1 / -1; margin-bottom: 7px; }
.sect-field label { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.sect-field input, .consent input { width: 17px; min-height: 17px; accent-color: var(--accent); }

.boundary-note {
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: #63332d;
  font-size: 12px;
}

.consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  margin: 24px 0 14px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.form-error { min-height: 20px; margin-bottom: 8px; color: #a33c2e; font-size: 13px; }

.primary-button, .secondary-button {
  min-height: 48px;
  border-radius: 5px;
  font-weight: 760;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.primary-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  border: 1px solid var(--accent);
  color: #fff;
  background: var(--accent);
}

.primary-button:hover { background: var(--accent-dark); }
.primary-button:disabled { cursor: wait; opacity: 0.65; }
.button-arrow { font-size: 22px; font-weight: 400; }

.how-it-works { padding-block: 82px 96px; border-top: 1px solid var(--line); }
.section-intro { max-width: 700px; margin-bottom: 36px; }
.method-list { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; border-block: 1px solid var(--line); }
.method-list li { padding: 26px 28px 26px 0; }
.method-list li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.method-list span { display: block; margin-bottom: 28px; color: var(--accent); font-family: Georgia, serif; font-size: 13px; }
.method-list strong { display: block; margin-bottom: 8px; font-family: "Songti SC", STSong, serif; font-size: 22px; }
.method-list p { margin-bottom: 0; color: var(--muted); font-size: 14px; }

.result-section { scroll-margin-top: 64px; padding: 72px 0 104px; border-top: 1px solid var(--line); background: #e4ddd1; }
.result-toolbar { width: min(880px, calc(100% - 40px)); display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.toolbar-actions { display: flex; gap: 10px; }
.secondary-button { padding: 0 16px; border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); }
.secondary-button:hover { color: var(--accent); border-color: var(--accent); }

.report {
  width: min(880px, calc(100% - 40px));
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fffdf8;
  box-shadow: 0 24px 72px rgba(52, 39, 26, 0.15);
  font-family: "Songti SC", STSong, "Noto Serif CJK SC", serif;
}

.report-header {
  position: relative;
  min-height: 500px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-content: end;
  padding: 88px 72px 66px;
  overflow: hidden;
  color: #fffaf0;
  background: #742119;
}
.report-header::before {
  content: "命理档案  ·  BAZI REPORT";
  position: absolute;
  top: 42px;
  left: 72px;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.2em;
  opacity: 0.74;
}
.report-header::after {
  content: "";
  position: absolute;
  top: -160px;
  right: -120px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(255, 250, 240, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 46px rgba(255, 250, 240, 0.035), 0 0 0 92px rgba(255, 250, 240, 0.025);
}
.report-title { position: relative; z-index: 1; margin-bottom: 20px; max-width: 620px; color: #fffaf0; font-size: clamp(42px, 6vw, 64px); line-height: 1.12; letter-spacing: -0.04em; }
.report-title span { display: block; }
.report-owner { margin-bottom: 8px; font-size: 0.72em; opacity: 0.9; }
.report-summary { position: relative; z-index: 1; max-width: 650px; margin-bottom: 0; color: rgba(255, 250, 240, 0.82); font-size: 17px; line-height: 1.9; }
.report-seal { position: relative; z-index: 1; width: 96px; height: 96px; display: grid; place-items: center; border: 4px double rgba(255, 250, 240, 0.88); color: #fffaf0; font-size: 21px; font-weight: 700; line-height: 1.2; text-align: center; white-space: pre-line; transform: rotate(-2deg); }
.report-meta { position: relative; z-index: 1; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px 22px; margin: 32px 0 0; padding-top: 20px; border-top: 1px solid rgba(255, 250, 240, 0.25); color: rgba(255, 250, 240, 0.7); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 12px; }

.report-block { padding: 64px 72px; border-bottom: 1px solid var(--line); }
.report-block:last-child { border-bottom: 0; }
.report-block-heading { display: flex; flex-direction: column-reverse; gap: 9px; align-items: flex-start; margin-bottom: 34px; }
.report-block-heading h3 { margin-bottom: 0; font-size: 34px; line-height: 1.25; }
.report-block-heading span { color: var(--accent); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 11px; font-weight: 800; letter-spacing: 0.18em; }

.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); background: #f8f2e8; }
.pillar-card { min-width: 0; padding: 26px 10px 24px; border: 0; border-top: 4px solid var(--accent); border-radius: 0; background: transparent; text-align: center; }
.pillar-card + .pillar-card { border-left: 1px solid var(--line); }
.pillar-label { color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 11px; font-weight: 700; }
.pillar-ganzhi { margin: 14px 0 19px; color: #2a201b; font-size: clamp(38px, 5vw, 52px); line-height: 1; letter-spacing: 0.12em; text-indent: 0.12em; }
.pillar-detail { margin: 5px 0 0; color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 11px; }
.pillar-detail strong { color: var(--ink); font-weight: 650; }

.chart-grid { display: grid; grid-template-columns: 1fr 220px; gap: 48px; align-items: center; margin-top: 42px; }
.element-chart { display: grid; gap: 13px; }
.element-row { display: grid; grid-template-columns: 24px 1fr 24px; gap: 11px; align-items: center; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 12px; }
.element-track { height: 7px; overflow: hidden; background: #e8e0d2; }
.element-bar { height: 100%; min-width: 2px; }
.element-木 { background: var(--wood); } .element-火 { background: var(--fire); } .element-土 { background: var(--earth); } .element-金 { background: var(--metal); } .element-水 { background: var(--water); }
.master-card { padding: 26px 24px; border: 1px solid #e2c9c2; border-left: 4px solid var(--accent); background: var(--accent-soft); }
.master-card span { color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 11px; }
.master-card strong { display: block; margin: 5px 0; font-size: 38px; }

.analysis-block { max-width: none; }
.analysis-lead { max-width: 700px; margin-bottom: 30px; color: #453e35; font-size: 20px; line-height: 1.8; }
.analysis-prose { max-width: 700px; }
.analysis-prose p { margin-bottom: 1.35em; font-size: 17px; line-height: 1.95; }
.evidence-box, .reflection-box, .limit-box { max-width: 700px; margin-top: 30px; padding: 22px 24px; border-left: 3px solid var(--accent); background: #f7f1e7; }
.evidence-box h4, .reflection-box h4, .limit-box h4 { margin: 0 0 9px; color: var(--accent); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 11px; letter-spacing: 0.08em; }
.evidence-box ul, .limit-box ul { margin: 0; padding-left: 1.2em; }
.reflection-box p { margin-bottom: 0; }

.luck-table { width: 100%; border-collapse: collapse; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 13px; }
.luck-table th, .luck-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.luck-table th { color: var(--muted); font-size: 11px; }
.report-footer { color: var(--muted); font-family: ui-sans-serif, system-ui, sans-serif; font-size: 12px; }
.report-footer p:last-child { margin-bottom: 0; }

.footer { display: flex; justify-content: space-between; gap: 20px; padding-block: 32px; color: var(--muted); font-size: 12px; }
.footer p { margin-bottom: 0; }

[hidden] { display: none !important; }

/* Final report follows the supplied WeChat reference: black textured paper,
   muted gold hierarchy, restrained rules, and a two-column editorial spread. */
.result-section { background: #090908; }
.result-toolbar .eyebrow { color: #c3a044; }
.result-toolbar h2 { color: #d6bd78; }
.result-toolbar .secondary-button { border-color: #5a4927; color: #d2bd86; background: #121210; }
.result-toolbar .secondary-button:hover { border-color: #c3a044; color: #e3c86f; }

.report {
  border-color: #28231a;
  color: #a99d88;
  background-color: #0d0d0c;
  background-image: radial-gradient(rgba(211, 188, 126, 0.07) 0.55px, transparent 0.7px);
  background-size: 3px 3px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.report-header {
  min-height: 650px;
  display: block;
  padding: 136px 78px 92px;
  color: #aa9d87;
  text-align: center;
  background: transparent;
}
.report-header::before {
  content: "四 柱 命 理 分 析 报 告";
  top: 76px;
  left: 0;
  width: 100%;
  color: #c7a747;
  font-size: 12px;
  letter-spacing: 0.34em;
  opacity: 1;
}
.report-header::after {
  top: auto;
  right: auto;
  bottom: 58px;
  left: 50%;
  width: 58px;
  height: 1px;
  border: 0;
  border-radius: 0;
  background: #c7a747;
  box-shadow: none;
  transform: translateX(-50%);
}
.report-title {
  max-width: none;
  margin: 54px auto 34px;
  color: #d2b65d;
  font-size: 46px;
  line-height: 1.45;
  letter-spacing: 0.16em;
}
.report-owner { margin-bottom: 10px; font-size: 0.55em; letter-spacing: 0.22em; }
.report-summary { max-width: 650px; margin: 0 auto; color: #a99d88; font-size: 17px; line-height: 2.05; text-align: left; }
.report-seal { display: none; }
.report-meta {
  display: flex;
  justify-content: center;
  margin-top: 42px;
  padding-top: 22px;
  border-top-color: #3e3420;
  color: #8e826f;
}

.report-block { padding: 82px 78px; border-bottom-color: #28231a; }
.report-block-heading { align-items: center; margin-bottom: 62px; padding-bottom: 30px; text-align: center; }
.report-block-heading::after { display: none; }
.report-block-heading h3 { color: #d2b65d; font-size: 34px; font-weight: 500; letter-spacing: 0.24em; text-indent: 0.24em; }
.report-block-heading h3::after { content: ""; display: block; width: 58px; height: 1px; margin: 24px auto 0; background: #c7a747; }
.report-block-heading span { color: #c7a747; font-size: 12px; letter-spacing: 0.34em; }

.pillar-grid { border-color: #4c4025; background: transparent; }
.pillar-card { border-top-color: #9e8438; background: rgba(255, 255, 255, 0.012); }
.pillar-card + .pillar-card { border-left-color: #3d3524; }
.pillar-label { color: #aa914f; }
.pillar-ganzhi { color: #d0b45e; }
.pillar-detail { color: #918570; }
.element-track { background: #2b2923; }
.element-bar { background: #b89b45; }
.master-card { border-color: #5a4927; border-left-color: #c3a044; background: rgba(195, 160, 68, 0.06); }
.master-card span { color: #918570; }
.master-card strong { color: #d2b65d; }

.analysis-lead { max-width: none; color: #afa38e; font-size: 17px; line-height: 2.05; }
.analysis-prose { max-width: none; }
.analysis-prose p { color: #a99d88; font-size: 17px; line-height: 2.05; }
.analysis-columns { columns: 2 300px; column-gap: 50px; }
.analysis-item { break-inside: avoid; margin: 0 0 42px; }
.analysis-item-title {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #4b3e21;
  color: #c7a747;
  font-family: "Songti SC", STSong, serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.28em;
}
.evidence-box, .reflection-box, .limit-box {
  max-width: none;
  margin-top: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9f927e;
}
.evidence-box h4, .reflection-box h4, .limit-box h4 {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #4b3e21;
  color: #c7a747;
  font-family: "Songti SC", STSong, serif;
  font-size: 13px;
  letter-spacing: 0.24em;
}
.luck-table { color: #a99d88; }
.luck-table th, .luck-table td { border-bottom-color: #3a3222; }
.luck-table th { color: #c7a747; }
.report-footer { color: #827866; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-copy { padding-right: 0; }
  .hero-seal { right: 0; bottom: -48px; }
  .method-list { grid-template-columns: 1fr; }
  .method-list li, .method-list li + li { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .method-list li:last-child { border-bottom: 0; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 24px, 1180px); }
  .topbar { padding-inline: 12px; }
  .top-note { font-size: 0; }
  .top-note .status-dot { width: 8px; height: 8px; }
  .hero { padding-block: 48px 66px; gap: 64px; }
  h1 { font-size: 43px; }
  .promise-grid { grid-template-columns: 1fr; }
  .promise-grid div, .promise-grid div + div { padding: 14px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .promise-grid div:last-child { border-bottom: 0; }
  .hero-seal { display: none; }
  .report-form { padding: 24px 18px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .result-section { padding: 46px 0 70px; }
  .result-toolbar { width: min(100% - 24px, 880px); align-items: start; flex-direction: column; }
  .toolbar-actions { width: 100%; }
  .toolbar-actions button { flex: 1; }
  .report { width: min(100% - 24px, 880px); }
  .report-header { min-height: auto; display: block; padding: 96px 24px 78px; }
  .report-header::before { top: 40px; left: 0; }
  .report-header::after { top: auto; right: auto; bottom: 36px; left: 50%; }
  .report-title { margin: 38px 0 25px; font-size: 32px; letter-spacing: 0.12em; }
  .report-summary { font-size: 15px; line-height: 2; }
  .report-seal { width: 70px; height: 70px; }
  .report-meta { grid-column: auto; justify-content: flex-start; margin-top: 32px; text-align: left; }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
  .pillar-card:nth-child(3) { border-left: 0; }
  .pillar-card:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .chart-grid { grid-template-columns: 1fr; gap: 26px; }
  .report-block { padding: 58px 24px; }
  .report-block-heading { margin-bottom: 44px; }
  .report-block-heading h3 { font-size: 27px; }
  .analysis-columns { columns: 1; column-rule: 0; }
  .luck-table { font-size: 11px; }
  .footer { flex-direction: column; }
}

@media print {
  @page { size: A4; margin: 13mm; }
  body { background: #fff; }
  .topbar, .hero, .how-it-works, .result-toolbar, .footer { display: none !important; }
  .result-section { padding: 0; background: #fff; }
  .result-section[hidden] { display: none !important; }
  .report { width: 100%; padding: 0; border: 0; box-shadow: none; }
  .report-header { min-height: 245mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report-block { break-inside: avoid; }
  .analysis-block { break-before: page; }
}
