:root {
  --bazi-ink: #0b0d0a;
  --bazi-ink-2: #12150f;
  --bazi-paper: #eee9dc;
  --bazi-paper-2: #d8d0bd;
  --bazi-copper: #bd8251;
  --bazi-gold: #d7a963;
  --bazi-gold-soft: rgba(215, 169, 99, .2);
  --bazi-line: rgba(230, 211, 170, .18);
  --bazi-muted: #a9a594;
  --wood: #7ea76d;
  --fire: #cf6a4f;
  --earth: #b9955d;
  --metal: #c7c1b0;
  --water: #6f9eaa;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.bazi-column {
  margin: 0;
  color: var(--bazi-paper);
  background:
    radial-gradient(circle at 12% 0%, rgba(105, 83, 45, .12), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(121, 65, 36, .1), transparent 28rem),
    var(--bazi-ink);
  font-family: "Noto Serif SC", "Songti SC", "STSong", serif;
  min-width: 320px;
}

button, select, input { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--bazi-gold);
  outline-offset: 4px;
}

.bazi-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 8px clamp(18px, 4vw, 58px);
  color: #211d16;
  background: rgba(238, 233, 220, .96);
  border-bottom: 1px solid rgba(68, 51, 29, .16);
  backdrop-filter: blur(16px);
  transition: transform .35s ease, background .35s ease;
}

.bazi-header.is-hidden { transform: translateY(-105%); }

.bazi-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

.bazi-seal {
  display: inline-grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
}

.bazi-brand-copy { display: grid; text-align: left; }
.bazi-brand-copy b { font-size: 15px; font-weight: 650; letter-spacing: .13em; }
.bazi-brand-copy small { font-family: ui-sans-serif, system-ui, sans-serif; font-size: 9px; letter-spacing: .22em; opacity: .56; }

.bazi-nav { display: flex; align-items: center; gap: 2px; }

.bazi-nav-link,
.bazi-more summary,
.bazi-theme {
  border: 0;
  background: transparent;
  color: inherit;
  min-height: 42px;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.bazi-nav-link {
  position: relative;
}

.bazi-nav-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 1px;
  background: #a36c3f;
  transform: scaleX(0);
  transition: transform .25s ease;
}

.bazi-nav-link:hover::after,
.bazi-nav-link.is-active::after { transform: scaleX(1); }

.bazi-more { position: relative; }
.bazi-more summary::-webkit-details-marker { display: none; }
.bazi-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 150px;
  padding: 8px;
  background: #eee9dc;
  border: 1px solid rgba(55, 39, 18, .16);
  box-shadow: 0 18px 45px rgba(10, 8, 4, .22);
}
.bazi-dropdown a {
  display: block;
  padding: 10px 12px;
  color: #211d16;
  text-decoration: none;
  font-size: 13px;
}
.bazi-dropdown a:hover { background: rgba(146, 93, 47, .09); }
.bazi-theme { width: 42px; padding: 0; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 18px; }

.bazi-view { animation: view-in .55s ease both; }
.bazi-view[hidden] { display: none; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

.bazi-hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 62px);
  display: grid;
  grid-template-columns: minmax(340px, .86fr) minmax(520px, 1.14fr);
  align-items: center;
  gap: clamp(44px, 7vw, 110px);
  padding: clamp(70px, 10vh, 120px) clamp(24px, 6vw, 96px);
}

.bazi-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .23;
  background-image:
    linear-gradient(var(--bazi-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--bazi-line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent, #000 20%, transparent 95%);
  pointer-events: none;
}

.bazi-hero-glow {
  position: absolute;
  width: 42vw;
  height: 42vw;
  right: 5vw;
  top: 20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185, 124, 69, .17), transparent 66%);
  filter: blur(12px);
}

.bazi-hero-copy,
.pillar-theatre { position: relative; z-index: 1; }

.eyebrow,
.article-label {
  display: inline-block;
  color: var(--bazi-gold);
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.bazi-hero-copy h1 {
  margin: 25px 0 25px;
  font-size: clamp(54px, 6vw, 94px);
  line-height: .99;
  font-weight: 550;
  letter-spacing: .03em;
}

.bazi-hero-copy h1 em {
  display: inline-block;
  margin-top: 14px;
  color: var(--bazi-copper);
  font-size: .46em;
  line-height: 1.16;
  font-style: normal;
  letter-spacing: .12em;
}

.bazi-hero-copy > p {
  max-width: 650px;
  margin: 0;
  color: #a9aa9e;
  font-size: 16px;
  line-height: 2;
}

.hero-actions { display: flex; align-items: center; gap: 24px; margin-top: 34px; }
.primary-action,
.text-action {
  border: 0;
  cursor: pointer;
}
.primary-action {
  padding: 14px 22px;
  color: #17140f;
  background: var(--bazi-gold);
  box-shadow: 0 0 30px rgba(215, 169, 99, .14);
}
.primary-action:hover { background: #e8bd78; }
.text-action { padding: 12px 0; color: #b9b4a4; background: none; }
.text-action span { display: inline-block; margin-left: 8px; transition: transform .2s ease; }
.text-action:hover span { transform: translateY(4px); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 560px;
  margin: 45px 0 0;
  padding-top: 21px;
  border-top: 1px solid var(--bazi-line);
}
.hero-stats div { display: grid; gap: 4px; border-right: 1px solid var(--bazi-line); padding-left: 20px; }
.hero-stats div:first-child { padding-left: 0; }
.hero-stats div:last-child { border: 0; }
.hero-stats dt { color: var(--bazi-gold); font-size: 26px; }
.hero-stats dd { margin: 0; color: #77796f; font-size: 11px; letter-spacing: .16em; }

.pillar-theatre {
  min-height: 600px;
  display: grid;
  align-content: center;
  padding: 36px 26px;
  border: 1px solid rgba(215, 169, 99, .12);
  background:
    linear-gradient(150deg, rgba(255,255,255,.025), transparent 45%),
    rgba(19, 19, 14, .55);
  box-shadow: inset 0 0 80px rgba(0,0,0,.2);
}
.pillar-theatre-title { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.pillar-theatre-title span { color: var(--bazi-gold); font-size: 12px; letter-spacing: .2em; }
.pillar-theatre-title small { color: #6f7269; font-size: 11px; }
.pillar-sky { display: flex; justify-content: space-around; align-items: center; height: 54px; color: #7c6647; }
.pillar-sky span { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(215,169,99,.18); border-radius: 50%; font-size: 12px; }

.pillar-set {
  display: grid;
  grid-template-columns: repeat(4, minmax(84px, 1fr));
  align-items: end;
  gap: clamp(8px, 1.5vw, 18px);
  min-height: 330px;
}
.pillar-card {
  position: relative;
  min-height: 272px;
  display: grid;
  grid-template-rows: auto 1fr 1fr auto;
  place-items: center;
  padding: 18px 10px;
  border: 1px solid rgba(215,169,99,.18);
  background:
    linear-gradient(90deg, transparent, rgba(194,130,74,.09), transparent),
    repeating-linear-gradient(90deg, rgba(89,54,31,.26) 0 8px, rgba(40,30,20,.2) 8px 15px);
  cursor: pointer;
  transition: transform .35s ease, border-color .35s ease, filter .35s ease;
}
.pillar-card:nth-child(2) { min-height: 292px; }
.pillar-card:nth-child(3) { min-height: 320px; }
.pillar-card:nth-child(4) { min-height: 250px; }
.pillar-card:hover { transform: translateY(-8px); border-color: rgba(215,169,99,.42); }
.pillar-card.is-selected { transform: translateY(-16px); border-color: var(--bazi-gold); box-shadow: 0 0 40px rgba(206,148,83,.12); }
.pillar-card span { color: #8f887a; font-size: 10px; letter-spacing: .16em; }
.pillar-card b, .pillar-card i {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: #dbb679;
  border: 1px solid rgba(215,169,99,.26);
  font-size: clamp(28px, 3vw, 44px);
  font-style: normal;
  font-weight: 500;
}
.pillar-card i { border-radius: 50%; }
.pillar-card small { color: #80796c; font-size: 10px; }
.pillar-card-day::after {
  content: "日主";
  position: absolute;
  top: -13px;
  right: -8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--bazi-gold);
  background: #16150f;
  border: 1px solid var(--bazi-gold);
  border-radius: 50%;
  font-size: 10px;
}

.pillar-reading {
  min-height: 124px;
  margin-top: 24px;
  padding: 18px 20px 16px;
  border-top: 1px solid rgba(215,169,99,.22);
  background: rgba(0,0,0,.13);
}
.pillar-reading span { color: var(--bazi-gold); font-size: 11px; letter-spacing: .16em; }
.pillar-reading h2 { margin: 7px 0 8px; font-size: 17px; font-weight: 500; }
.pillar-reading p { margin: 0; color: #8f9188; font-size: 12px; line-height: 1.8; }

.column-intro {
  padding: clamp(90px, 10vw, 150px) clamp(24px, 6vw, 96px);
  background: #e8e1d1;
  color: #211d16;
}
.section-head {
  max-width: 1280px;
  margin: 0 auto 55px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .55fr);
  align-items: end;
  gap: 80px;
}
.section-head h2 { max-width: 800px; margin: 14px 0 0; font-size: clamp(36px, 4.5vw, 64px); font-weight: 520; line-height: 1.24; }
.section-head p { margin: 0 0 7px; color: #6e6659; line-height: 1.9; }
.column-map { max-width: 1280px; margin: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.column-card {
  position: relative;
  min-height: 310px;
  display: grid;
  grid-template-columns: 70px 120px 1fr;
  align-items: center;
  gap: 18px;
  padding: 34px 32px;
  overflow: hidden;
  border: 1px solid rgba(50,39,25,.16);
  color: #241e16;
  background: rgba(255,255,255,.22);
  text-align: left;
  cursor: pointer;
  transition: transform .3s ease, background .3s ease, box-shadow .3s ease;
}
.column-card:hover { transform: translateY(-6px); background: rgba(255,255,255,.45); box-shadow: 0 20px 45px rgba(47,34,19,.1); }
.column-no { align-self: start; color: #9d8264; font-size: 11px; letter-spacing: .2em; }
.column-mark {
  display: grid;
  place-items: center;
  width: 110px;
  height: 150px;
  color: #e0b875;
  background: #1a1914;
  border: 1px solid #937044;
  font-size: 54px;
  box-shadow: inset 0 0 30px rgba(210,160,90,.08);
}
.column-card small { color: #9c805e; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 10px; letter-spacing: .18em; }
.column-card h3 { margin: 9px 0 12px; font-size: 29px; font-weight: 560; }
.column-card p { margin: 0; color: #6d655a; font-size: 14px; line-height: 1.85; }
.column-card > b { position: absolute; right: 28px; bottom: 24px; color: #9c6b3f; font-size: 12px; font-weight: 500; }

.five-flow {
  display: grid;
  grid-template-columns: .65fr 1.35fr;
  align-items: center;
  gap: clamp(50px, 8vw, 130px);
  padding: clamp(90px, 11vw, 160px) clamp(24px, 7vw, 110px);
}
.five-flow-copy h2 { margin: 14px 0 20px; font-size: clamp(36px, 4vw, 62px); font-weight: 520; line-height: 1.22; }
.five-flow-copy p { color: #999b92; line-height: 1.95; }
.five-flow-track { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 1.3vw, 22px); }
.five-flow-track > span {
  display: grid;
  place-items: center;
  width: clamp(72px, 8vw, 110px);
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: clamp(24px, 3vw, 42px);
  box-shadow: inset 0 0 35px rgba(255,255,255,.03);
}
.five-flow-track span small { margin-top: -15px; color: #777970; font-size: 9px; letter-spacing: .15em; }
.five-flow-track i { color: #615b4f; font-size: 10px; font-style: normal; }
.wood { color: var(--wood); }.fire { color: var(--fire); }.earth { color: var(--earth); }.metal { color: var(--metal); }.water { color: var(--water); }
.column-note {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 30px;
  margin: 0 clamp(24px, 7vw, 110px) 100px;
  padding: 25px 0;
  border-top: 1px solid var(--bazi-line);
  border-bottom: 1px solid var(--bazi-line);
}
.column-note b { color: var(--bazi-gold); letter-spacing: .15em; }
.column-note p { margin: 0; color: #898b82; line-height: 1.9; }

.inner-hero {
  min-height: 390px;
  display: grid;
  align-content: end;
  padding: 100px clamp(24px, 7vw, 110px) 65px;
  border-bottom: 1px solid var(--bazi-line);
  background:
    radial-gradient(circle at 80% 40%, rgba(171, 109, 58, .13), transparent 28rem),
    linear-gradient(135deg, rgba(255,255,255,.025), transparent 50%);
}
.inner-hero h1 { margin: 18px 0 14px; font-size: clamp(44px, 6vw, 84px); font-weight: 520; line-height: 1.08; }
.inner-hero p { max-width: 780px; margin: 0; color: #999b92; font-size: 16px; line-height: 1.9; }

.stem-tabs, .branch-tabs {
  position: sticky;
  top: 62px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  padding: 0 clamp(16px, 5vw, 80px);
  background: rgba(12,14,11,.95);
  border-bottom: 1px solid var(--bazi-line);
  backdrop-filter: blur(14px);
}
.branch-tabs { grid-template-columns: repeat(12, 1fr); }
.stem-tabs button, .branch-tabs button {
  min-height: 64px;
  border: 0;
  border-right: 1px solid var(--bazi-line);
  color: #74766d;
  background: none;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.stem-tabs button:first-child, .branch-tabs button:first-child { border-left: 1px solid var(--bazi-line); }
.stem-tabs button:hover, .stem-tabs button.is-selected,
.branch-tabs button:hover, .branch-tabs button.is-selected { color: var(--bazi-gold); background: rgba(215,169,99,.07); }
.stem-tabs button b, .branch-tabs button b { font-size: 21px; font-weight: 500; }
.stem-tabs button small, .branch-tabs button small { display: block; margin-top: 2px; font-size: 9px; }

.stem-explorer, .branch-explorer {
  max-width: 1320px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(330px, .72fr) minmax(0, 1.28fr);
  align-items: center;
  gap: clamp(50px, 8vw, 130px);
  padding: clamp(80px, 10vw, 145px) clamp(24px, 6vw, 90px);
}
.stem-portrait {
  position: relative;
  min-height: 500px;
  display: grid;
  place-items: center;
  align-content: center;
  color: var(--wood);
}
.stem-portrait::before {
  content: "";
  position: absolute;
  width: 65%;
  height: 65%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, currentColor 18%, transparent), transparent 70%);
  filter: blur(10px);
}
.stem-portrait-rings, .stem-portrait-rings i { position: absolute; inset: 10%; border: 1px solid color-mix(in srgb, currentColor 24%, transparent); border-radius: 50%; }
.stem-portrait-rings i:nth-child(1) { inset: 12%; }
.stem-portrait-rings i:nth-child(2) { inset: 25%; border-style: dashed; animation: orbit 18s linear infinite reverse; }
.stem-portrait-rings i:nth-child(3) { inset: 38%; }
@keyframes orbit { to { transform: rotate(360deg); } }
.stem-portrait > span { position: absolute; top: 17%; left: 21%; font-size: 13px; letter-spacing: .2em; }
.stem-portrait > b { position: relative; z-index: 1; font-size: clamp(130px, 17vw, 230px); line-height: 1; font-weight: 500; text-shadow: 0 0 50px color-mix(in srgb, currentColor 25%, transparent); }
.stem-portrait > small { position: absolute; bottom: 17%; right: 19%; color: #92958b; letter-spacing: .24em; }
.stem-article h2, .branch-article h2 { margin: 16px 0 20px; max-width: 760px; font-size: clamp(38px, 4.5vw, 65px); line-height: 1.2; font-weight: 520; }
.stem-lead, .branch-lead { max-width: 760px; margin: 0; color: #b2b3aa; font-size: 17px; line-height: 2.05; }
.stem-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 36px 0 28px;
  background: var(--bazi-line);
  border: 1px solid var(--bazi-line);
}
.stem-facts div { min-height: 112px; display: grid; align-content: center; gap: 10px; padding: 20px; background: var(--bazi-ink); }
.stem-facts small { color: #777970; font-size: 10px; letter-spacing: .16em; }
.stem-facts b { color: #d7d1c1; font-size: 14px; font-weight: 500; line-height: 1.7; }
.conditional-copy { margin: 0; padding: 18px 20px; color: #97998f; background: rgba(215,169,99,.06); border-left: 2px solid var(--bazi-gold); line-height: 1.85; }

.growth-section, .god-library, .same-branch-days, .hidden-stem-table, .reading-order, .concept-notes {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(24px, 6vw, 90px) clamp(90px, 10vw, 150px);
}
.growth-section > header, .god-library > header, .hidden-stem-table > header {
  display: grid;
  grid-template-columns: 1fr minmax(260px, .5fr);
  align-items: end;
  gap: 60px;
  margin-bottom: 35px;
}
.growth-section h2, .god-library h2, .hidden-stem-table h2,
.same-branch-days h2, .reading-order h2 {
  margin: 11px 0 0;
  font-size: clamp(31px, 3.6vw, 50px);
  font-weight: 520;
}
.growth-section header p, .god-library header p, .hidden-stem-table header p { color: #85877e; line-height: 1.85; }
.growth-board { padding: 32px; border: 1px solid var(--bazi-line); background: rgba(255,255,255,.015); }
#growthCanvas { display: block; width: 100%; height: 330px; }
.month-tabs { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 20px; }
.month-tabs button {
  min-height: 52px;
  border: 1px solid var(--bazi-line);
  color: #81837a;
  background: rgba(255,255,255,.018);
  cursor: pointer;
}
.month-tabs button.is-selected { color: var(--bazi-ink); background: var(--bazi-gold); }
.month-tabs b { display: block; font-size: 13px; }.month-tabs small { font-size: 9px; }
.month-reading { min-height: 106px; display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 25px; margin-top: 20px; padding: 20px 24px; background: #171914; }
.month-reading b { color: var(--bazi-gold); font-size: 25px; }.month-reading p { margin: 0; color: #9a9c93; line-height: 1.8; }

.pillar-positions { padding: clamp(90px, 10vw, 140px) clamp(24px, 7vw, 110px); background: #e8e1d1; color: #211d16; }
.pillar-positions header { max-width: 1260px; margin: 0 auto 40px; }
.pillar-positions h2 { margin: 12px 0 0; max-width: 850px; font-size: clamp(34px, 4vw, 58px); font-weight: 520; }
.position-grid { max-width: 1260px; margin: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(50,39,25,.18); border: 1px solid rgba(50,39,25,.18); }
.position-grid article { min-height: 260px; padding: 30px; background: #e8e1d1; }
.position-grid span { color: #9b7249; font-size: 11px; letter-spacing: .15em; }
.position-grid h3 { margin: 38px 0 16px; font-size: 25px; font-weight: 560; }
.position-grid p { color: #6e675c; line-height: 1.9; }

.god-lab {
  max-width: 1320px;
  margin: auto;
  padding: clamp(70px, 9vw, 120px) clamp(24px, 6vw, 90px);
}
.god-controls { display: flex; justify-content: center; align-items: end; gap: 24px; margin-bottom: 52px; }
.god-controls label { display: grid; gap: 9px; color: #82847b; font-size: 11px; letter-spacing: .14em; }
.god-controls select {
  min-width: 170px;
  padding: 14px 38px 14px 15px;
  color: var(--bazi-paper);
  background: #171914;
  border: 1px solid rgba(215,169,99,.3);
}
.god-controls > span { padding-bottom: 14px; color: var(--bazi-gold); }
.relation-stage { display: grid; grid-template-columns: 1.1fr .9fr; gap: 38px; align-items: stretch; }
.relation-orbit {
  position: relative;
  min-height: 550px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 32px;
  border: 1px solid var(--bazi-line);
  background: radial-gradient(circle at center, rgba(215,169,99,.11), transparent 35%);
}
.relation-orbit button {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 7px;
  padding: 20px;
  border: 1px solid var(--bazi-line);
  color: #878980;
  background: rgba(255,255,255,.018);
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.relation-orbit button:nth-child(5) { grid-column: 1 / -1; }
.relation-orbit button:hover, .relation-orbit button.is-active { color: var(--bazi-gold); border-color: var(--bazi-gold); transform: translateY(-3px); }
.relation-orbit button span { font-size: 11px; letter-spacing: .16em; }.relation-orbit button b { font-size: 18px; font-weight: 500; }
.relation-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  align-content: center;
  border: 1px solid var(--bazi-gold);
  border-radius: 50%;
  color: var(--bazi-gold);
  background: #11130f;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 40px rgba(215,169,99,.12);
}
.relation-center small { font-size: 10px; }.relation-center b { font-size: 45px; font-weight: 500; }
.relation-result { min-height: 550px; display: grid; align-content: center; padding: clamp(36px, 5vw, 70px); background: #e8e1d1; color: #211d16; }
.relation-result > span { color: #976d43; font-size: 11px; letter-spacing: .18em; }
.relation-formula { display: flex; align-items: center; gap: 13px; margin: 38px 0 28px; }
.relation-formula b { padding: 10px 13px; border: 1px solid rgba(51,39,23,.22); font-weight: 500; }
.relation-formula i { color: #9b6f42; font-size: 11px; font-style: normal; }
.relation-result h2 { margin: 0 0 20px; color: #9a5c2d; font-size: clamp(58px, 7vw, 95px); font-weight: 500; }
.relation-result p { color: #625b50; line-height: 1.95; }

.god-library { padding-top: 35px; }
.god-library-layout { display: grid; grid-template-columns: 350px 1fr; border: 1px solid var(--bazi-line); }
.god-list { display: grid; grid-template-columns: 1fr 1fr; padding: 18px; border-right: 1px solid var(--bazi-line); }
.god-list button {
  min-height: 90px;
  border: 0;
  border-bottom: 1px solid var(--bazi-line);
  color: #83857c;
  background: none;
  cursor: pointer;
}
.god-list button:nth-last-child(-n+2) { border-bottom: 0; }
.god-list button.is-selected { color: var(--bazi-gold); background: rgba(215,169,99,.06); }
.god-list b { display: block; font-size: 20px; font-weight: 500; }.god-list small { font-size: 9px; letter-spacing: .1em; }
.god-reading { min-height: 510px; padding: clamp(35px, 6vw, 80px); }
.god-reading > span { color: var(--bazi-gold); font-size: 11px; letter-spacing: .16em; }
.god-reading h3 { margin: 15px 0 22px; font-size: clamp(42px, 5vw, 70px); font-weight: 500; }
.god-reading > p { color: #aaaca2; font-size: 16px; line-height: 2; }
.god-keywords { display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0; }
.god-keywords i { padding: 7px 11px; border: 1px solid rgba(215,169,99,.25); color: #bd9b69; font-size: 11px; font-style: normal; }
.god-two-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 25px; }
.god-two-sides div { padding: 20px; border: 1px solid var(--bazi-line); }
.god-two-sides b { color: #d8d2c2; font-size: 13px; }.god-two-sides p { margin: 9px 0 0; color: #85877e; line-height: 1.8; }

.branch-explorer { grid-template-columns: .82fr 1.18fr; }
.earth-vault {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(185,149,93,.25);
  background:
    radial-gradient(ellipse at 50% 90%, rgba(185,149,93,.19), transparent 60%),
    repeating-linear-gradient(0deg, rgba(185,149,93,.04) 0 2px, transparent 2px 45px);
}
.earth-vault::before, .earth-vault::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(215,169,99,.36), transparent);
}
.earth-vault::before { top: 31%; }.earth-vault::after { bottom: 31%; }
.vault-door {
  position: absolute;
  inset: 16% 24%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px solid rgba(215,169,99,.28);
  border-radius: 50% 50% 6px 6px;
  color: var(--water);
  background: #11130f;
  box-shadow: inset 0 0 50px rgba(255,255,255,.02), 0 0 60px rgba(0,0,0,.4);
}
.vault-door span { font-size: 115px; line-height: 1; }.vault-door small { color: #817b6c; letter-spacing: .2em; }
.hidden-stems { position: absolute; left: 7%; right: 7%; bottom: 32px; display: flex; justify-content: center; align-items: end; gap: 13px; }
.hidden-stem {
  min-width: 82px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 12px 10px;
  color: #19150e;
  background: var(--bazi-gold);
  transform: translateY(80px);
  opacity: 0;
  animation: rise-from-earth .6s ease forwards;
}
.hidden-stem:nth-child(2) { transform: translateY(95px); animation-delay: .1s; opacity: 0; scale: .9; }
.hidden-stem:nth-child(3) { transform: translateY(110px); animation-delay: .2s; opacity: 0; scale: .82; }
.hidden-stem b { font-size: 28px; }.hidden-stem small { font-size: 9px; }
@keyframes rise-from-earth { to { transform: translateY(0); opacity: 1; } }
.branch-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 36px 0 28px; border-top: 1px solid var(--bazi-line); border-bottom: 1px solid var(--bazi-line); }
.branch-facts div { padding: 19px 16px; border-right: 1px solid var(--bazi-line); }.branch-facts div:last-child { border: 0; }
.branch-facts dt { color: #777970; font-size: 9px; letter-spacing: .15em; }.branch-facts dd { margin: 8px 0 0; color: #d2cbbb; }

.same-branch-days header { margin-bottom: 25px; }
.day-combinations { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.day-combination { min-height: 170px; display: grid; align-content: center; gap: 8px; padding: 20px; border: 1px solid var(--bazi-line); background: rgba(255,255,255,.014); }
.day-combination b { color: var(--bazi-gold); font-size: 29px; font-weight: 500; }.day-combination span { color: #9a9c93; font-size: 12px; }.day-combination small { color: #686a62; line-height: 1.6; }

.hidden-table-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.hidden-table-card { min-height: 150px; display: grid; align-content: center; gap: 15px; padding: 20px; border: 1px solid var(--bazi-line); }
.hidden-table-card > b { color: var(--bazi-gold); font-size: 28px; font-weight: 500; }
.hidden-table-card div { display: flex; align-items: end; gap: 8px; }
.hidden-table-card i { font-style: normal; }
.hidden-table-card i:first-child { font-size: 24px; }.hidden-table-card i:nth-child(2) { font-size: 18px; opacity: .75; }.hidden-table-card i:nth-child(3) { font-size: 14px; opacity: .5; }

.balance-lab {
  max-width: 1320px;
  margin: auto;
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 70px;
  padding: clamp(80px, 10vw, 140px) clamp(24px, 6vw, 90px);
}
.balance-copy h2 { margin: 15px 0 20px; font-size: clamp(38px, 4vw, 58px); font-weight: 520; }
.balance-copy > p { color: #9a9c93; line-height: 1.95; }
.factor-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 30px; }
.factor-buttons button {
  min-height: 86px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 14px 18px;
  border: 1px solid var(--bazi-line);
  color: #989a91;
  background: rgba(255,255,255,.015);
  text-align: left;
  cursor: pointer;
}
.factor-buttons button:hover, .factor-buttons button[aria-pressed="true"] { color: var(--bazi-gold); border-color: var(--bazi-gold); background: rgba(215,169,99,.07); }
.factor-buttons small { color: #66685f; }
.balance-stage {
  min-height: 590px;
  display: grid;
  align-content: center;
  padding: 40px;
  border: 1px solid var(--bazi-line);
  background: radial-gradient(circle at 50% 52%, rgba(215,169,99,.08), transparent 38%);
}
.balance-caption { display: flex; justify-content: space-between; align-items: center; color: #72746c; font-size: 11px; }
.balance-caption b { color: var(--bazi-gold); font-size: 15px; font-weight: 500; }
.scale { position: relative; height: 280px; margin: 25px 0 0; }
.scale-post { position: absolute; left: 50%; top: 65px; width: 5px; height: 190px; background: #765b39; transform: translateX(-50%); }
.scale-post i { position: absolute; left: 50%; top: -23px; width: 44px; height: 44px; border: 1px solid var(--bazi-gold); border-radius: 50%; transform: translateX(-50%); background: #13140f; }
.scale-beam { position: absolute; left: 8%; right: 8%; top: 82px; height: 3px; background: #a47b47; transform-origin: 50% 50%; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.scale-pan { position: absolute; top: 0; width: 145px; height: 95px; border-bottom: 1px solid var(--bazi-gold); border-radius: 0 0 50% 50%; }
.scale-pan::before, .scale-pan::after { content: ""; position: absolute; top: 0; width: 1px; height: 75px; background: #755e3e; transform-origin: top; }
.scale-pan::before { left: 20px; transform: rotate(18deg); }.scale-pan::after { right: 20px; transform: rotate(-18deg); }
.scale-pan-left { left: -40px; }.scale-pan-right { right: -40px; }
.scale-pan span { position: absolute; left: 50%; bottom: 12px; color: var(--bazi-gold); font-size: 28px; transform: translateX(-50%); }
.balance-meter { position: relative; height: 4px; margin: 0 8%; background: linear-gradient(90deg, #8e5c4d, #777164, #54727c); }
.balance-meter::after { content: ""; position: absolute; left: 50%; top: -5px; width: 1px; height: 14px; background: #d7a963; }
.balance-meter i { position: absolute; top: -6px; left: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--bazi-gold); transform: translateX(-50%); transition: left .5s ease; }
.balance-stage > p { min-height: 52px; margin: 24px auto 10px; max-width: 520px; color: #8f9188; text-align: center; line-height: 1.8; }
.reset-balance { justify-self: center; padding: 9px 16px; border: 1px solid var(--bazi-line); color: #8b8d84; background: none; cursor: pointer; }

.reading-order { padding-top: 40px; }
.reading-order header { margin-bottom: 35px; }
.reading-order ol { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--bazi-line); }
.reading-order li { min-height: 270px; display: grid; align-content: space-between; padding: 25px; border-right: 1px solid var(--bazi-line); }
.reading-order li:last-child { border: 0; }
.reading-order li > span { color: #755e3f; font-size: 11px; }
.reading-order h3 { margin: 0 0 12px; color: var(--bazi-gold); font-size: 20px; font-weight: 500; }
.reading-order p { margin: 0; color: #83857c; line-height: 1.8; }
.concept-notes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.concept-notes article { min-height: 230px; padding: 25px; border: 1px solid var(--bazi-line); }
.concept-notes b { display: block; color: var(--bazi-gold); font-size: 27px; font-weight: 500; }.concept-notes span { display: block; margin-top: 7px; color: #706f65; font-size: 10px; letter-spacing: .15em; }.concept-notes p { margin: 40px 0 0; color: #8a8c83; line-height: 1.85; }

.bazi-footer {
  min-height: 130px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 28px clamp(24px, 6vw, 90px);
  border-top: 1px solid var(--bazi-line);
  color: #8e9087;
}
.bazi-footer div { display: grid; gap: 3px; }.bazi-footer b { color: #d4cebd; font-weight: 500; }.bazi-footer small { font-size: 10px; }
.bazi-footer button { margin-left: auto; border: 0; color: var(--bazi-gold); background: none; cursor: pointer; }

body.is-light {
  --bazi-ink: #e9e2d3;
  --bazi-ink-2: #ddd4c1;
  --bazi-paper: #262117;
  --bazi-paper-2: #4e4538;
  --bazi-line: rgba(53, 42, 27, .17);
  --bazi-muted: #645d52;
  background: #e9e2d3;
}
body.is-light .bazi-header { color: #e8dfcc; background: rgba(25,23,18,.96); }
body.is-light .bazi-dropdown { background: #24211a; }.is-light .bazi-dropdown a { color: #e8dfcc; }
body.is-light .column-intro, body.is-light .pillar-positions, body.is-light .relation-result { background: #171914; color: #e8e1d1; }
body.is-light .section-head p, body.is-light .column-card p, body.is-light .relation-result p, body.is-light .position-grid p { color: #999b92; }
body.is-light .column-card, body.is-light .position-grid article { color: #e8e1d1; background: rgba(255,255,255,.025); border-color: rgba(255,255,255,.08); }
body.is-light .column-map, body.is-light .position-grid { background: rgba(255,255,255,.08); }
body.is-light .stem-tabs, body.is-light .branch-tabs { background: rgba(233,226,211,.95); }
body.is-light .stem-facts div { background: #e9e2d3; }
body.is-light .relation-result h2 { color: var(--bazi-copper); }
body.is-light .god-controls select { color: #262117; background: #ded5c3; }
body.is-light .vault-door { background: #ded5c3; }

@media (max-width: 1080px) {
  .bazi-header { gap: 10px; padding-inline: 18px; }
  .bazi-brand-copy small { display: none; }
  .bazi-nav-link, .bazi-more summary { padding-inline: 9px; font-size: 12px; }
  .bazi-hero { grid-template-columns: 1fr; }
  .bazi-hero-copy { max-width: 800px; }
  .pillar-theatre { min-height: 550px; }
  .column-card { grid-template-columns: 50px 90px 1fr; }.column-mark { width: 80px; height: 125px; }
  .five-flow { grid-template-columns: 1fr; }
  .stem-explorer, .branch-explorer { gap: 45px; }
  .relation-stage, .balance-lab { grid-template-columns: 1fr; }
  .god-library-layout { grid-template-columns: 280px 1fr; }
  .reading-order ol { grid-template-columns: repeat(3, 1fr); }
  .reading-order li:nth-child(3) { border-right: 0; }.reading-order li:nth-child(-n+3) { border-bottom: 1px solid var(--bazi-line); }
  .hidden-table-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 760px) {
  .bazi-header { min-height: 58px; align-items: center; }
  .bazi-brand-copy b { font-size: 12px; }
  .bazi-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 120;
    justify-content: space-around;
    padding: 6px;
    color: #e8dfcc;
    background: rgba(22,21,16,.96);
    border: 1px solid rgba(215,169,99,.25);
    box-shadow: 0 15px 45px rgba(0,0,0,.35);
  }
  .bazi-nav-link { min-height: 44px; padding: 0 7px; font-size: 10px; }
  .bazi-nav-link::after { left: 7px; right: 7px; }
  .bazi-more { display: none; }
  .bazi-theme { width: 32px; }
  .bazi-hero { min-height: auto; padding: 75px 18px 70px; gap: 60px; }
  .bazi-hero-copy h1 { font-size: clamp(46px, 15vw, 72px); }
  .bazi-hero-copy > p { font-size: 14px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 5px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }
  .hero-stats div:nth-child(2) { border: 0; }.hero-stats div:nth-child(3) { padding-left: 0; }
  .pillar-theatre { min-height: auto; padding: 24px 12px; }
  .pillar-theatre-title { align-items: start; flex-direction: column; }
  .pillar-set { min-height: 265px; gap: 6px; }
  .pillar-card, .pillar-card:nth-child(2), .pillar-card:nth-child(3), .pillar-card:nth-child(4) { min-height: 230px; padding: 12px 4px; }
  .pillar-card b, .pillar-card i { width: 48px; height: 48px; font-size: 27px; }
  .pillar-card small { font-size: 8px; writing-mode: vertical-rl; }
  .pillar-card-day::after { width: 34px; height: 34px; right: -4px; }
  .column-intro { padding-inline: 18px; }
  .section-head, .growth-section > header, .god-library > header, .hidden-stem-table > header { grid-template-columns: 1fr; gap: 20px; }
  .column-map { grid-template-columns: 1fr; }
  .column-card { min-height: 250px; grid-template-columns: 42px 76px 1fr; padding: 25px 18px; }
  .column-mark { width: 68px; height: 106px; font-size: 38px; }
  .column-card h3 { font-size: 24px; }.column-card p { font-size: 12px; }
  .five-flow { padding-inline: 18px; }
  .five-flow-track { flex-wrap: wrap; }
  .five-flow-track > span { width: 72px; }
  .column-note { grid-template-columns: 1fr; margin-inline: 18px; }
  .inner-hero { min-height: 330px; padding: 90px 18px 50px; }
  .inner-hero h1 { font-size: 45px; }
  .stem-tabs, .branch-tabs { top: 58px; padding: 0; overflow-x: auto; display: flex; }
  .stem-tabs button, .branch-tabs button { flex: 0 0 62px; }
  .stem-explorer, .branch-explorer { grid-template-columns: 1fr; padding-inline: 18px; }
  .stem-portrait { min-height: 340px; }
  .stem-facts { grid-template-columns: 1fr; }
  .growth-section, .god-library, .same-branch-days, .hidden-stem-table, .reading-order, .concept-notes { padding-inline: 18px; }
  .growth-board { padding: 14px; } #growthCanvas { height: 250px; }
  .month-tabs { grid-template-columns: repeat(6, 1fr); }.month-reading { grid-template-columns: 1fr; }
  .position-grid { grid-template-columns: 1fr; }
  .position-grid article { min-height: 205px; }
  .god-lab { padding-inline: 18px; }
  .god-controls { align-items: stretch; flex-direction: column; }
  .god-controls > span { text-align: center; padding: 0; }
  .relation-orbit { min-height: 600px; padding: 12px; }
  .relation-orbit button { padding: 12px; }
  .relation-result { min-height: 420px; }
  .god-library-layout { grid-template-columns: 1fr; }
  .god-list { border-right: 0; border-bottom: 1px solid var(--bazi-line); }
  .god-reading { min-height: 600px; padding: 30px 20px; }
  .god-two-sides { grid-template-columns: 1fr; }
  .earth-vault { min-height: 430px; }.vault-door { inset: 16% 18%; }.vault-door span { font-size: 88px; }
  .day-combinations { grid-template-columns: 1fr 1fr; }
  .hidden-table-grid { grid-template-columns: 1fr 1fr; }
  .balance-lab { padding-inline: 18px; gap: 45px; }
  .factor-buttons { grid-template-columns: 1fr; }
  .balance-stage { min-height: 520px; padding: 25px 12px; }
  .scale-pan { width: 100px; }.scale-pan-left { left: -18px; }.scale-pan-right { right: -18px; }
  .reading-order ol { grid-template-columns: 1fr; }
  .reading-order li { min-height: 190px; border-right: 0; border-bottom: 1px solid var(--bazi-line); }
  .concept-notes { grid-template-columns: 1fr; }
  .bazi-footer { margin-bottom: 78px; }.bazi-footer button { display: none; }
}

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

/* 2026-07 knowledge-system revision */
.bazi-nav {
  gap: 1px;
}

.bazi-nav-link {
  padding-inline: 10px;
  white-space: nowrap;
}

.bazi-nav-search {
  margin-left: 5px;
  color: #fff7e8;
  background: #2a251d;
  border-radius: 999px;
}

.bazi-nav-search::after { display: none; }

.system-hero {
  min-height: 720px;
  padding: 92px clamp(44px, 6vw, 96px) 58px;
  display: grid;
  grid-template-columns: minmax(340px, .78fr) minmax(540px, 1.22fr);
  align-items: center;
  gap: clamp(30px, 5vw, 82px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(9, 11, 8, .98), rgba(9, 11, 8, .82)),
    repeating-linear-gradient(90deg, transparent 0 88px, rgba(215,169,99,.035) 89px 90px);
}

.system-copy { position: relative; z-index: 2; }

.system-copy h1 {
  margin: 24px 0;
  font-size: clamp(58px, 6vw, 98px);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -.045em;
}

.system-copy h1 em {
  color: var(--bazi-copper);
  font-style: normal;
}

.system-copy > p {
  max-width: 610px;
  color: #b9b4a5;
  font-size: 17px;
  line-height: 2;
}

.system-legend {
  margin-top: 34px;
  display: flex;
  gap: 24px;
  color: #8e897b;
  font-size: 12px;
}

.system-legend span { display: inline-flex; align-items: center; gap: 8px; }
.system-legend i { width: 18px; height: 1px; background: var(--bazi-gold); }
.system-legend span:nth-child(2) i { background: var(--water); }
.system-legend span:nth-child(3) i { background: var(--fire); }

.knowledge-map {
  position: relative;
  width: min(100%, 640px);
  aspect-ratio: 1;
  margin-inline: auto;
  isolation: isolate;
}

.map-ring {
  position: absolute;
  inset: 9%;
  border: 1px solid rgba(215, 169, 99, .16);
  border-radius: 50%;
  pointer-events: none;
}

.map-ring-inner {
  inset: 28%;
  border-style: dashed;
  animation: map-spin 36s linear infinite;
}

.map-ring-outer::before,
.map-ring-outer::after {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px solid rgba(111, 158, 170, .08);
  border-radius: 50%;
}

.map-ring-outer::after { inset: -8%; border-style: dashed; }

@keyframes map-spin { to { transform: rotate(360deg); } }

.map-core,
.map-node {
  position: absolute;
  z-index: 4;
  border: 1px solid rgba(215, 169, 99, .27);
  background: rgba(12, 14, 10, .92);
  cursor: pointer;
  transition: transform .3s ease, border-color .3s ease, background .3s ease;
}

.map-core:hover,
.map-node:hover {
  transform: translateY(-4px) scale(1.025);
  border-color: var(--bazi-gold);
  background: #17180f;
}

.map-core {
  left: 50%;
  top: 50%;
  width: 126px;
  height: 126px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(189, 130, 81, .14);
}

.map-core:hover { transform: translate(-50%, -53%) scale(1.025); }
.map-core b { display: block; color: var(--bazi-gold); font-size: 34px; font-weight: 400; }
.map-core small { color: #77766d; }

.map-node {
  width: 146px;
  min-height: 70px;
  padding: 13px 16px;
  text-align: left;
  border-radius: 4px;
}

.map-node b { display: block; margin-bottom: 5px; color: #e4dcc9; font-size: 18px; font-weight: 500; }
.map-node small { color: #7e7d74; font-size: 11px; }
.map-node-pillars { left: 50%; top: 2%; transform: translateX(-50%); }
.map-node-pillars:hover { transform: translate(-50%, -4px) scale(1.025); }
.map-node-elements { right: 2%; top: 19%; }
.map-node-gods { right: 2%; bottom: 19%; }
.map-node-structure { left: 50%; bottom: 2%; transform: translateX(-50%); }
.map-node-structure:hover { transform: translate(-50%, -4px) scale(1.025); }
.map-node-branches { left: 2%; bottom: 19%; }
.map-node-stems { left: 2%; top: 19%; }
.map-node-luck { right: 0; top: 48%; transform: translateY(-50%); }
.map-node-luck:hover { transform: translateY(calc(-50% - 4px)) scale(1.025); }

.map-path {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 34%;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(215,169,99,.7), transparent);
}

.map-path::after {
  content: "";
  position: absolute;
  top: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bazi-gold);
  animation: map-pulse 3s ease-in-out infinite;
}

.path-a { transform: rotate(-90deg); }
.path-b { transform: rotate(-26deg); }
.path-c { transform: rotate(90deg); }
.path-d { transform: rotate(206deg); }
@keyframes map-pulse { from { left: 0; opacity: 0; } 40% { opacity: 1; } to { left: 95%; opacity: 0; } }

.system-entries {
  padding: 74px clamp(36px, 6vw, 92px) 84px;
  color: #2a241c;
  background: var(--bazi-paper);
}

.compact-section-head,
.deep-reading > header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 36px;
  margin-bottom: 38px;
}

.compact-section-head h2,
.deep-reading h2 {
  margin: 10px 0 0;
  font-size: clamp(34px, 4vw, 58px);
  font-weight: 400;
}

.compact-section-head > p { max-width: 470px; color: #7e7567; line-height: 1.9; }

.entry-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid rgba(74, 57, 35, .18);
}

.entry-rail button {
  min-height: 178px;
  padding: 22px 18px;
  border: 0;
  border-right: 1px solid rgba(74, 57, 35, .16);
  color: #28231c;
  background: rgba(255,255,255,.12);
  text-align: left;
  cursor: pointer;
  transition: background .25s ease, transform .25s ease;
}

.entry-rail button:last-child { border-right: 0; }
.entry-rail button:hover { z-index: 2; background: #fffaf0; transform: translateY(-5px); }
.entry-rail span { display: block; color: #a57b51; font-size: 11px; }
.entry-rail b { display: block; margin: 32px 0 12px; font-size: 20px; font-weight: 500; }
.entry-rail small { color: #817768; line-height: 1.6; }

.home-relation-preview {
  padding: 80px clamp(44px, 7vw, 108px);
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 70px;
  align-items: center;
  background: #11130f;
}

.home-relation-preview h2 { margin: 15px 0; font-size: clamp(36px, 4.2vw, 66px); font-weight: 400; }
.home-relation-preview p { color: #969487; line-height: 2; }
.relation-chain { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.relation-chain span { min-width: 92px; padding: 25px 16px; border: 1px solid var(--bazi-line); color: var(--bazi-gold); text-align: center; }
.relation-chain i { color: #66665e; font-style: normal; }

.compact-hero {
  padding: 118px clamp(44px, 7vw, 100px) 58px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 60px;
  align-items: end;
  background:
    linear-gradient(90deg, #0a0c09, rgba(20, 18, 13, .92)),
    repeating-linear-gradient(90deg, transparent 0 90px, rgba(215,169,99,.03) 91px 92px);
  border-bottom: 1px solid var(--bazi-line);
}

.compact-hero h1 {
  margin: 14px 0 0;
  font-size: clamp(52px, 6vw, 88px);
  line-height: 1.12;
  font-weight: 400;
}

.compact-hero > p { color: #aaa696; font-size: 16px; line-height: 2; }

.basics-stage {
  padding: 68px clamp(44px, 7vw, 100px);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  background: #0d0f0b;
}

.basics-pillars { align-self: stretch; }
.basics-reading { align-self: stretch; min-height: 100%; display: flex; flex-direction: column; justify-content: center; }

.foundation-grid {
  padding: 76px clamp(44px, 7vw, 100px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  color: #29231b;
  background: #cfc6b4;
}

.foundation-grid article { padding: 42px; background: var(--bazi-paper); }
.foundation-grid span { color: #a07950; font-size: 12px; }
.foundation-grid h2 { margin: 14px 0 22px; font-size: 34px; font-weight: 400; }
.foundation-grid p { color: #6e665b; line-height: 2; }

.time-system {
  padding: 82px clamp(44px, 8vw, 120px);
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 80px;
  align-items: center;
  background: #11130f;
}

.time-system h2 { font-size: clamp(38px, 4vw, 64px); font-weight: 400; }
.time-system p { color: #979588; line-height: 2; }

.time-orbits { position: relative; min-height: 400px; }
.time-orbits > span { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; border: 1px solid rgba(215,169,99,.25); border-radius: 50%; transform: translate(-50%,-50%); }
.time-orbits span small { display: block; color: #77766e; font-size: 11px; }
.orbit-origin { z-index: 3; width: 120px; height: 120px; color: var(--bazi-gold); background: #17180f; }
.orbit-decade { width: 245px; height: 245px; color: var(--water); animation: orbit-breathe 5s ease-in-out infinite; }
.orbit-year { width: 380px; height: 380px; color: var(--fire); animation: orbit-breathe 5s 1.5s ease-in-out infinite; }
@keyframes orbit-breathe { 50% { box-shadow: 0 0 45px rgba(215,169,99,.1); transform: translate(-50%,-50%) scale(1.03); } }

.element-lab {
  padding: 58px clamp(44px, 6vw, 92px) 76px;
  display: grid;
  grid-template-columns: 120px minmax(500px, 720px) minmax(310px, 1fr);
  gap: 34px;
  align-items: center;
  background: #0b0d0a;
}

.element-controls { display: grid; gap: 10px; }
.element-controls button {
  padding: 12px;
  border: 1px solid var(--bazi-line);
  color: #88877d;
  background: transparent;
  cursor: pointer;
}
.element-controls button.is-active { color: var(--bazi-gold); border-color: var(--bazi-gold); background: rgba(215,169,99,.08); }

.element-wheel {
  position: relative;
  width: min(100%, 680px);
  aspect-ratio: 1;
  margin-inline: auto;
}

.element-wheel::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px dashed rgba(215,169,99,.12);
  border-radius: 50%;
}

.element-node {
  position: absolute;
  z-index: 5;
  width: 104px;
  height: 104px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: #11130f;
  cursor: pointer;
  transition: transform .3s ease, box-shadow .3s ease, opacity .3s ease;
}
.element-node:hover,.element-node.is-selected { transform: translate(-50%,-50%) scale(1.09); box-shadow: 0 0 34px color-mix(in srgb, currentColor 22%, transparent); }
.element-node b { display: block; font-size: 34px; font-weight: 400; }
.element-node small { opacity: .65; }
.node-wood { left: 50%; top: 10%; color: var(--wood); transform: translate(-50%,-50%); }
.node-fire { left: 86%; top: 36%; color: var(--fire); transform: translate(-50%,-50%); }
.node-earth { left: 72%; top: 82%; color: var(--earth); transform: translate(-50%,-50%); }
.node-metal { left: 28%; top: 82%; color: var(--metal); transform: translate(-50%,-50%); }
.node-water { left: 14%; top: 36%; color: var(--water); transform: translate(-50%,-50%); }

.wheel-center {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 116px;
  height: 116px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(215,169,99,.24);
  border-radius: 50%;
  background: #0b0d0a;
}
.wheel-center small { color: #76766d; }
.wheel-center b { color: var(--bazi-gold); font-size: 36px; font-weight: 400; }

.flow-line {
  position: absolute;
  z-index: 2;
  height: 2px;
  transform-origin: left center;
  transition: opacity .3s ease;
}
.flow-line::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: flow-dot 2.7s linear infinite;
}
.gen-line { background: rgba(126,167,109,.45); }
.gen-line::after { background: var(--wood); }
.ctrl-line { height: 1px; background: rgba(207,106,79,.36); }
.ctrl-line::after { background: var(--fire); animation-duration: 3.4s; }
@keyframes flow-dot { from { left: 0; opacity: 0; } 25% { opacity: 1; } to { left: calc(100% - 8px); opacity: 0; } }
.gen-1 { left: 50%; top: 10%; width: 43%; transform: rotate(35deg); }
.gen-2 { left: 86%; top: 36%; width: 50%; transform: rotate(108deg); }
.gen-3 { left: 72%; top: 82%; width: 44%; transform: rotate(180deg); }
.gen-4 { left: 28%; top: 82%; width: 50%; transform: rotate(252deg); }
.gen-5 { left: 14%; top: 36%; width: 43%; transform: rotate(325deg); }
.ctrl-1 { left: 50%; top: 10%; width: 76%; transform: rotate(73deg); }
.ctrl-2 { left: 72%; top: 82%; width: 71%; transform: rotate(212deg); }
.ctrl-3 { left: 14%; top: 36%; width: 72%; transform: rotate(0deg); }
.ctrl-4 { left: 86%; top: 36%; width: 75%; transform: rotate(107deg); }
.ctrl-5 { left: 28%; top: 82%; width: 75%; transform: rotate(287deg); }
.element-wheel.mode-generate .ctrl-line { opacity: .05; }
.element-wheel.mode-control .gen-line { opacity: .05; }

.element-reading {
  min-height: 420px;
  padding: 34px;
  border: 1px solid var(--bazi-line);
  background: rgba(255,255,255,.015);
}
.element-reading > span { color: var(--bazi-gold); font-size: 12px; }
.element-reading h2 { margin: 16px 0; font-size: 40px; font-weight: 400; }
.element-reading p { color: #a09d91; line-height: 1.9; }
.element-relations { display: grid; gap: 8px; margin-top: 28px; }
.element-relations div { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--bazi-line); }
.element-relations b { color: #ddd4c1; font-weight: 400; }
.element-relations small { color: #77766d; }

.relation-key {
  padding: 0 clamp(44px, 6vw, 92px) 78px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: #0b0d0a;
}
.relation-key article { padding: 28px 24px; border: 1px solid var(--bazi-line); }
.relation-key span { color: var(--bazi-gold); font-size: 12px; }
.relation-key b { display: block; margin: 12px 0; font-size: 20px; font-weight: 400; }
.relation-key p { color: #85847a; line-height: 1.7; }

.structure-route {
  --support-power: 0;
  --drain-power: 0;
  position: relative;
  min-height: 330px;
  display: grid;
  grid-template-columns: 1fr 126px 1fr;
  gap: 22px;
  align-items: center;
}

.route-center {
  z-index: 3;
  width: 126px;
  height: 126px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid var(--bazi-gold);
  border-radius: 50%;
  background: #13150f;
  box-shadow: 0 0 44px rgba(215,169,99,.1);
}
.route-center small { color: #77766e; }
.route-center b { color: var(--bazi-gold); font-size: 30px; font-weight: 400; }

.route-side {
  position: relative;
  min-height: 150px;
  padding: 28px 22px;
  display: grid;
  place-content: center;
  text-align: center;
  border: 1px solid var(--bazi-line);
  background: rgba(255,255,255,.015);
}
.route-side span { color: #86847a; font-size: 12px; }
.route-side b { margin-top: 10px; color: #ddd4c1; font-size: 18px; font-weight: 400; }
.route-side i {
  position: absolute;
  top: 50%;
  width: 45px;
  height: 2px;
  background: rgba(215,169,99,.25);
}
.route-side i::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: route-flow 2.5s ease-in-out infinite;
}
.route-support i { right: -46px; background: var(--wood); opacity: calc(.25 + var(--support-power) * .75); }
.route-drain i { left: -46px; background: var(--fire); opacity: calc(.25 + var(--drain-power) * .75); }
.route-support i::after { background: var(--wood); }
.route-drain i::after { background: var(--fire); animation-direction: reverse; }
@keyframes route-flow { from { left: 0; opacity: .15; } 50% { opacity: 1; } to { left: 37px; opacity: .15; } }

.inner-hero {
  min-height: 390px !important;
  padding-top: 116px !important;
  padding-bottom: 48px !important;
}

.inner-hero h1 { font-size: clamp(48px, 6vw, 82px) !important; }

.deep-reading {
  padding: 76px clamp(44px, 7vw, 100px);
  color: #28231b;
  background: #eee9dc;
  border-top: 1px solid rgba(74,57,35,.12);
}

.deep-reading > header button {
  padding: 12px 18px;
  border: 1px solid rgba(74,57,35,.25);
  color: #5d4732;
  background: transparent;
  cursor: pointer;
}

.deep-section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid rgba(74,57,35,.18);
}

.deep-section-grid article,
.deep-section-grid details {
  padding: 34px 36px;
  border-right: 1px solid rgba(74,57,35,.14);
  border-bottom: 1px solid rgba(74,57,35,.14);
}
.deep-section-grid article:nth-child(even) { border-right: 0; }
.deep-section-grid h3 { margin: 0 0 16px; font-size: 25px; font-weight: 400; }
.deep-section-grid p { margin: 0; color: #6f675c; line-height: 2; }
.deep-section-grid details { grid-column: 1 / -1; }
.deep-section-grid summary { color: #795838; cursor: pointer; }
.deep-section-grid details div { columns: 2; column-gap: 48px; margin-top: 26px; }
.deep-section-grid details p { margin-bottom: 18px; break-inside: avoid; }

.library-hero { background: #0b0d0a; }
.library-shell {
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(300px, 34%) 1fr;
  color: #28231b;
  background: var(--bazi-paper);
}
.library-sidebar {
  padding: 34px;
  border-right: 1px solid rgba(74,57,35,.15);
  background: #e3ddcf;
}
.library-sidebar label { display: grid; gap: 8px; margin-bottom: 18px; color: #786e60; font-size: 12px; }
.library-sidebar input,.library-sidebar select {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(74,57,35,.18);
  color: #29231c;
  background: #f5f0e5;
}
.library-chips { display: flex; gap: 7px; flex-wrap: wrap; margin: 8px 0 20px; }
.library-chips button { padding: 7px 10px; border: 1px solid rgba(74,57,35,.18); color: #6f5a43; background: transparent; cursor: pointer; }
.library-count { margin-bottom: 12px; color: #8c7a65; font-size: 12px; }
.library-results { display: grid; gap: 8px; max-height: 520px; overflow-y: auto; }
.library-result {
  padding: 16px;
  border: 1px solid rgba(74,57,35,.12);
  color: #302a22;
  background: rgba(255,255,255,.2);
  text-align: left;
  cursor: pointer;
}
.library-result.is-active { border-color: #9c7045; background: #f8f2e7; }
.library-result span { display: block; margin-bottom: 7px; color: #9d7650; font-size: 10px; }
.library-result b { font-weight: 500; }
.library-result p { margin: 7px 0 0; color: #847a6d; font-size: 12px; line-height: 1.6; }
.library-result mark,.library-article mark { color: inherit; background: #e8c88e; }
.library-article { padding: 56px clamp(38px, 6vw, 88px) 90px; max-width: 1000px; }
.library-article h2 { margin: 14px 0 26px; font-size: clamp(38px, 4.5vw, 68px); font-weight: 400; }
.library-article > p { color: #6c6459; line-height: 2.05; }
.library-article-body { margin-top: 38px; }
.library-article-body h3 { margin: 36px 0 14px; color: #5c422b; font-size: 24px; font-weight: 400; }
.library-article-body p { color: #5f584e; font-size: 16px; line-height: 2.15; }

@media (max-width: 1100px) {
  .bazi-nav-link { padding-inline: 7px; font-size: 12px; }
  .system-hero { grid-template-columns: 1fr; padding-top: 92px; }
  .knowledge-map { max-width: 590px; }
  .entry-rail { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .entry-rail button { border-bottom: 1px solid rgba(74,57,35,.16); }
  .element-lab { grid-template-columns: 1fr 1.25fr; }
  .element-controls { grid-column: 1 / -1; display: flex; justify-content: center; }
  .relation-key { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 760px) {
  .bazi-nav .bazi-nav-link:not(.is-active):not(.bazi-nav-search) { display: none; }
  .bazi-nav-search { display: inline-flex; }
  .system-hero { min-height: auto; padding: 88px 20px 42px; }
  .system-copy h1 { font-size: 52px; }
  .knowledge-map { width: 100%; min-height: 590px; aspect-ratio: auto; }
  .map-node { width: 126px; padding: 10px; }
  .map-node b { font-size: 15px; }
  .map-node-luck { display: none; }
  .system-entries,.home-relation-preview,.compact-hero,.basics-stage,.foundation-grid,.time-system,.deep-reading { padding-inline: 20px; }
  .compact-section-head,.deep-reading > header { align-items: flex-start; flex-direction: column; }
  .entry-rail { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .home-relation-preview,.compact-hero,.basics-stage,.time-system { grid-template-columns: 1fr; }
  .compact-hero { padding-top: 92px; }
  .compact-hero h1 { font-size: 48px; }
  .foundation-grid { grid-template-columns: 1fr; }
  .element-lab { padding-inline: 12px; grid-template-columns: 1fr; }
  .element-wheel { min-width: 0; }
  .element-reading { min-height: auto; }
  .relation-key { padding-inline: 20px; grid-template-columns: 1fr; }
  .deep-section-grid { grid-template-columns: 1fr; }
  .deep-section-grid article { border-right: 0; padding-inline: 0; }
  .deep-section-grid details div { columns: 1; }
  .library-shell { grid-template-columns: 1fr; }
  .library-sidebar { border-right: 0; border-bottom: 1px solid rgba(74,57,35,.15); }
  .library-results { max-height: 330px; }
  .library-article { padding-inline: 22px; }
  .structure-route { grid-template-columns: 1fr; }
  .route-center { margin-inline: auto; }
  .route-side i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .map-ring-inner,.map-path::after,.time-orbits > span,.flow-line::after,.route-side i::after { animation: none !important; }
}
