:root {
  --ink: #f7ead0;
  --paper: #190d0f;
  --paper-deep: #2b1414;
  --cinnabar: #8d171d;
  --cinnabar-dark: #530c13;
  --gold: #d7ae61;
  --gold-light: #f5d991;
  --blueblack: #111418;
  --muted: #c9ad83;
  --line: rgba(245, 217, 145, 0.22);
  --white: #241112;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(215, 174, 97, 0.18), transparent 34%),
    linear-gradient(180deg, #3b0c12 0%, #1a0d0f 48%, #101316 100%);
  color: var(--ink);
  line-height: 1.7;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 30% 78%, rgba(245, 217, 145, 0.09), transparent 32%),
    linear-gradient(90deg, rgba(255,255,255,0.025), transparent 18%, rgba(255,255,255,0.02) 52%, transparent 72%);
  mix-blend-mode: screen;
}

body.western-page {
  --paper: #07111f;
  --paper-deep: #0b1930;
  --cinnabar: #244a86;
  --cinnabar-dark: #071426;
  --gold: #c9b06d;
  --gold-light: #d8c68a;
  --muted: #9eb6d6;
  --line: rgba(122, 166, 230, 0.24);
  --white: #e7f0ff;
  background:
    radial-gradient(circle at 72% 8%, rgba(111, 153, 220, 0.22), transparent 28%),
    radial-gradient(circle at 18% 38%, rgba(201, 176, 109, 0.08), transparent 20%),
    linear-gradient(180deg, #071426 0%, #070b13 54%, #04070d 100%);
}

body.western-page::before {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.035), transparent 18%, rgba(122, 166, 230, 0.035) 48%, transparent 72%),
    radial-gradient(circle at 24% 20%, rgba(122, 166, 230, 0.1), transparent 24%);
}

body.western-page .site-header {
  background: rgba(7, 17, 31, 0.9);
}

body.western-page .brand-logo,
body.western-page .hero-emblem img {
  border-color: rgba(122, 166, 230, 0.38);
  box-shadow: 0 0 22px rgba(122, 166, 230, 0.18);
}

body.western-page .page-hero,
body.western-page .compact-hero {
  background:
    radial-gradient(circle at 72% 28%, rgba(45, 87, 151, 0.34), transparent 28%),
    linear-gradient(120deg, rgba(7, 20, 38, 0.95), rgba(6, 9, 15, 0.72));
}

body.western-page .flow-card,
body.western-page .daily-panel,
body.western-page .result-panel,
body.western-page .paywall,
body.western-page .module-card,
body.western-page .insight-panel article,
body.western-page .compatibility-band article,
body.western-page .name-option-grid article {
  background:
    linear-gradient(180deg, rgba(122, 166, 230, 0.08), rgba(255, 255, 255, 0.018)),
    rgba(6, 12, 22, 0.84);
  border-color: rgba(122, 166, 230, 0.22);
}

body.western-page .badge,
body.western-page .module-meta span,
body.western-page .tarot-card,
body.western-page .zodiac-chip {
  border-color: rgba(122, 166, 230, 0.34);
  background: rgba(122, 166, 230, 0.1);
  color: #dbe8ff;
}

/* Cultural-reference modules use a dedicated evergreen palette. */
body.culture-page {
  --paper: #091812;
  --paper-deep: #10261b;
  --cinnabar: #2f754e;
  --cinnabar-dark: #143523;
  --gold: #a9c978;
  --gold-light: #d7eaae;
  --muted: #b3c99d;
  --line: rgba(159, 199, 123, 0.26);
  --white: #14271b;
  background:
    radial-gradient(circle at 74% 8%, rgba(99, 157, 104, 0.24), transparent 29%),
    radial-gradient(circle at 16% 40%, rgba(183, 198, 109, 0.08), transparent 21%),
    linear-gradient(180deg, #0a2117 0%, #07140e 54%, #040a07 100%);
}

body.culture-page::before {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.028), transparent 18%, rgba(150, 198, 125, 0.04) 48%, transparent 72%),
    radial-gradient(circle at 24% 20%, rgba(137, 190, 123, 0.1), transparent 24%);
}

body.culture-page .site-header { background: rgba(8, 27, 18, 0.9); }
body.culture-page .brand-logo { border-color: rgba(157, 203, 128, 0.4); box-shadow: 0 0 22px rgba(127, 182, 114, 0.18); }
body.culture-page .page-hero,
body.culture-page .compact-hero {
  background:
    radial-gradient(circle at 72% 28%, rgba(51, 111, 72, 0.38), transparent 29%),
    linear-gradient(120deg, rgba(8, 30, 19, 0.96), rgba(4, 13, 9, 0.75));
}

body.culture-page .flow-card,
body.culture-page .hetu-workbench,
body.culture-page .guardian-workbench,
body.culture-page .four-symbols-overview,
body.culture-page .xingxiu-atlas,
body.culture-page .jieqi-workbench {
  border-color: rgba(154, 202, 124, 0.34);
  background-color: rgba(8, 25, 17, 0.9);
}

body.culture-page .btn {
  color: #102615;
  background: linear-gradient(180deg, #d7eaae, #89ae63);
  border-color: rgba(209, 234, 172, 0.74);
}

body.culture-page .top-nav a:hover,
body.culture-page .top-nav a[aria-current="page"] { border-color: rgba(161, 204, 128, 0.5); background: rgba(143, 190, 113, 0.11); color: var(--gold-light); }
body.culture-page .hetu-node:hover,
body.culture-page .hetu-node:focus-visible,
body.culture-page .hetu-node.is-selected,
body.culture-page .xingxiu-card:focus-visible,
body.culture-page .xingxiu-card.is-selected { border-color: #cde7a6; background-color: #203c29; }
body.culture-page .guardian-chart { border-color: rgba(183, 219, 137, 0.66); box-shadow: inset 0 0 0 16px rgba(131, 184, 108, 0.08), 0 18px 48px rgba(0, 0, 0, 0.26); }
body.culture-page .guardian-ring { border-color: rgba(161, 204, 128, 0.3); }
body.culture-page .jieqi-current-art img { border-color: rgba(198, 225, 158, 0.68); }
body.culture-page .jieqi-current-art span { background: #132819; border-color: rgba(162, 205, 129, 0.42); }
body.culture-page .jieqi-item.is-selected { outline-color: #d7eaae; background: #1e3725; }
body.culture-page .jieqi-item.is-current { border-left-color: #d7eaae; background: #1b3b28; box-shadow: inset 0 0 0 1px rgba(215, 234, 174, 0.7); }
body.culture-page .jieqi-spring { border-left-color: #9dc777; }
body.culture-page .jieqi-summer { border-left-color: #a7bd76; }
body.culture-page .jieqi-autumn { border-left-color: #b9c77b; }
body.culture-page .jieqi-winter { border-left-color: #72a88a; }

.tcm-hero .flow-card { border-left: 3px solid #83ad67; }
.tcm-library { padding: 28px; background: rgba(8, 25, 17, 0.9); border: 1px solid rgba(154, 202, 124, 0.34); }
.tcm-library-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.tcm-library-head h2 { margin: 0; }.tcm-library-head p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.tcm-count { display: grid; grid-template-columns: auto auto; column-gap: 10px; justify-items: end; align-items: end; color: var(--muted); font-size: 12px; }.tcm-count strong { color: var(--gold-light); font-family: Georgia, "Times New Roman", serif; font-size: 38px; line-height: 1; }.tcm-count strong:nth-of-type(2) { font-size: 24px; }.tcm-count span { padding-bottom: 3px; }
.tcm-boundary-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; margin-top: 22px; padding: 14px 16px; border-left: 3px solid #9ac879; background: rgba(117, 157, 87, 0.11); color: var(--muted); font-size: 13px; }.tcm-boundary-note strong { color: var(--gold-light); white-space: nowrap; }
.tcm-controls { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(360px, 1.25fr); gap: 26px; margin-top: 25px; align-items: end; }.tcm-search, .tcm-filter-wrap { display: grid; gap: 8px; color: var(--gold-light); font-size: 13px; }.tcm-search input { min-height: 46px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 0; color: var(--ink); background: #0d1d13; font: inherit; }.tcm-search input:focus { outline: 1px solid #c7e59d; outline-offset: 1px; }
.tcm-filters, .tcm-topic-row > div { display: flex; flex-wrap: wrap; gap: 7px; }.tcm-filter, .tcm-topic { min-height: 34px; padding: 6px 11px; border: 1px solid rgba(158, 202, 126, 0.28); border-radius: 0; color: #c8dfa9; background: rgba(111, 153, 86, 0.1); font: inherit; font-size: 13px; cursor: pointer; }.tcm-filter:hover, .tcm-topic:hover, .tcm-filter[aria-pressed="true"] { border-color: rgba(201, 231, 160, 0.68); color: #0f2716; background: #c1de98; }
.tcm-topic-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; margin: 22px 0; padding-top: 18px; border-top: 1px solid var(--line); }.tcm-topic-row > span { padding-top: 6px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tcm-catalog { margin: 28px 0; padding: 20px; border: 1px solid rgba(154, 202, 124, 0.26); background: rgba(8, 24, 16, 0.48); }.tcm-catalog-head { padding-bottom: 15px; border-bottom: 1px solid var(--line); }.tcm-catalog-head h3 { margin: 0; color: var(--gold-light); font-size: 21px; }.tcm-catalog-head p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 13px; }.tcm-book-catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 15px; border: 1px solid rgba(154, 202, 124, 0.18); background: rgba(154, 202, 124, 0.18); }.tcm-book-card { min-height: 152px; padding: 15px; background: #0d1d13; }.tcm-book-card.is-selected { background: #173520; box-shadow: inset 3px 0 0 #c1de98; }.tcm-book-card > div { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }.tcm-book-card b { color: #d1e8af; font-size: 11px; font-weight: 700; }.tcm-book-card h4 { margin: 10px 0 3px; color: var(--gold-light); font-size: 17px; }.tcm-book-card p { margin: 0; color: var(--muted); font-size: 12px; }.tcm-book-card footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 13px; }.tcm-book-card button, .tcm-book-card a { border: 0; padding: 0; color: #cbe5aa; background: transparent; font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tcm-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }.tcm-entry { min-height: 202px; display: flex; flex-direction: column; padding: 20px; background: #0e1c13; }.tcm-entry:hover { background: #13251a; }.tcm-entry-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }.tcm-entry-meta span { color: var(--gold-light); font-size: 15px; font-weight: 700; }.tcm-entry-meta small { color: var(--muted); font-size: 12px; text-align: right; }.tcm-entry blockquote { margin: 18px 0; color: #e1edc8; font-family: "Songti SC", "STSong", serif; font-size: 18px; line-height: 1.75; }.tcm-entry-foot { display: flex; justify-content: space-between; gap: 12px; align-items: end; margin-top: auto; }.tcm-entry-foot div { display: flex; flex-wrap: wrap; gap: 5px; }.tcm-entry-foot i { padding: 2px 7px; color: #b6d69d; border: 1px solid rgba(154, 202, 124, 0.22); font-size: 11px; font-style: normal; }.tcm-entry-foot a { color: #d2e9b1; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }.tcm-empty { margin: 24px 0 0; padding: 22px; color: var(--muted); text-align: center; border: 1px dashed var(--line); }
.tcm-search-book { min-height: 174px; border-left: 3px solid #a8cf82; background: #102518; }.tcm-search-book h4 { margin: 12px 0 4px; color: var(--gold-light); font-size: 20px; }.tcm-search-book p { margin: 0; color: var(--muted); font-size: 13px; }.tcm-search-book .tcm-entry-foot > span { color: #b8d69c; font-size: 12px; }.tcm-search-book .tcm-entry-foot div { justify-content: flex-end; }
.tcm-method-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; margin-top: 19px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }.tcm-method-note strong { color: var(--gold-light); }.tcm-reading { padding-top: 0; }
.tcm-book-card footer span { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.tcm-reader-note { color: #cbe5aa !important; }
.tcm-reader-page { max-width: 1440px; margin: 0 auto; padding: 34px clamp(18px, 4vw, 58px) 72px; }
.tcm-reader-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 330px); gap: 28px; align-items: end; padding: clamp(25px, 4vw, 48px); border: 1px solid rgba(154, 202, 124, 0.34); background: linear-gradient(120deg, rgba(14, 47, 29, 0.96), rgba(5, 16, 10, 0.78)); }
.tcm-reader-hero h1 { margin: 9px 0 5px; color: var(--gold-light); font-size: clamp(30px, 4vw, 48px); }.tcm-reader-hero p:not(.eyebrow) { margin: 0; color: var(--muted); }.tcm-reader-back { color: #cde7a6; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.tcm-reader-attribution { display: grid; gap: 5px; padding: 16px; border-left: 3px solid #9ac879; background: rgba(107, 153, 84, 0.1); }.tcm-reader-attribution strong { color: var(--gold-light); }.tcm-reader-attribution span { color: var(--muted); font-size: 13px; }.tcm-reader-attribution a { color: #d6ebb7; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.tcm-reader-boundary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; margin: 18px 0; padding: 13px 16px; border-left: 3px solid #9ac879; background: rgba(117, 157, 87, 0.11); color: var(--muted); font-size: 13px; }.tcm-reader-boundary strong { color: var(--gold-light); white-space: nowrap; }
.tcm-reader-shell { display: grid; grid-template-columns: minmax(245px, 0.36fr) minmax(0, 1fr); min-height: 650px; border: 1px solid rgba(154, 202, 124, 0.35); background: #09170f; }
.tcm-reader-sidebar { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid rgba(154, 202, 124, 0.3); background: #0c2014; }.tcm-reader-sidebar-head { padding: 19px 19px 14px; border-bottom: 1px solid rgba(154, 202, 124, 0.26); }.tcm-reader-sidebar-head h2 { margin: 3px 0 1px; color: var(--gold-light); font-size: 21px; }.tcm-reader-sidebar-head span { color: var(--muted); font-size: 12px; }
.tcm-reader-chapters { overflow: auto; max-height: 690px; padding: 8px; }.tcm-reader-chapter { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; width: 100%; padding: 11px 9px; border: 0; border-bottom: 1px solid rgba(154, 202, 124, 0.16); color: var(--ink); background: transparent; text-align: left; font: inherit; cursor: pointer; }.tcm-reader-chapter span { color: #85ae6c; font-family: Georgia, "Times New Roman", serif; font-size: 12px; }.tcm-reader-chapter strong { overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }.tcm-reader-chapter:hover, .tcm-reader-chapter[aria-current="true"] { color: #16351e; background: #c1de98; }.tcm-reader-chapter:hover span, .tcm-reader-chapter[aria-current="true"] span { color: #2d6543; }
.tcm-reader-main { min-width: 0; padding: 24px clamp(18px, 3vw, 42px) 42px; }.tcm-reader-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: end; padding-bottom: 16px; border-bottom: 1px solid rgba(154, 202, 124, 0.27); }.tcm-reader-search { display: grid; gap: 7px; color: var(--gold-light); font-size: 13px; }.tcm-reader-search input { min-height: 44px; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 0; color: var(--ink); background: #0c1d12; font: inherit; }.tcm-reader-search input:focus { outline: 1px solid #c7e59d; outline-offset: 1px; }.tcm-index-button { min-height: 44px; padding: 8px 14px; border: 1px solid rgba(201, 231, 160, 0.68); border-radius: 0; color: #17351f; background: #c1de98; font: inherit; cursor: pointer; }.tcm-index-button:disabled { cursor: wait; opacity: 0.72; }.tcm-reader-hint { margin: 12px 0 18px; color: var(--muted); font-size: 13px; }
.tcm-reader-results { margin-bottom: 18px; padding: 14px; border: 1px solid rgba(154, 202, 124, 0.3); background: rgba(76, 121, 69, 0.1); }.tcm-reader-results > strong, .tcm-reader-results > span { display: block; }.tcm-reader-results > strong { color: var(--gold-light); }.tcm-reader-results > span { margin-top: 4px; color: var(--muted); font-size: 13px; }.tcm-reader-result-list { display: grid; gap: 1px; margin-top: 12px; border: 1px solid rgba(154, 202, 124, 0.2); }.tcm-reader-result-list button { display: grid; gap: 3px; padding: 10px 12px; border: 0; color: var(--ink); background: #0c1d12; text-align: left; font: inherit; cursor: pointer; }.tcm-reader-result-list button:hover { background: #163520; }.tcm-reader-result-list small { color: #cbe5aa; font-size: 12px; }.tcm-reader-result-list span { color: var(--muted); font-size: 13px; }
.tcm-reader-content { min-height: 420px; padding: clamp(20px, 3vw, 44px); border: 1px solid rgba(154, 202, 124, 0.27); background: #0d1d13; }.tcm-reader-content-head { margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }.tcm-reader-content-head span { color: var(--muted); font-size: 12px; }.tcm-reader-content-head h2 { margin: 3px 0 0; color: var(--gold-light); font-family: "Songti SC", "STSong", serif; font-size: 27px; }.tcm-reader-paragraph, .tcm-reader-subhead { max-width: 850px; }.tcm-reader-paragraph { margin: 0 0 1em; color: #e0edc5; font-family: "Songti SC", "STSong", serif; font-size: 18px; line-height: 2; text-align: justify; }.tcm-reader-subhead { margin: 1.8em 0 0.72em; color: #d7eaae; font-family: "Songti SC", "STSong", serif; font-size: 21px; }.tcm-reader-content mark { padding: 0 2px; color: #17331e; background: #d7eaae; }.tcm-reader-placeholder { margin: 0; color: var(--muted); }.tcm-reader-placeholder.is-error { color: #e6c4a5; }.tcm-reader-placeholder a { color: #d7eaae; text-decoration: underline; text-underline-offset: 3px; }
.tcm-reader-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 18px; border: 1px solid rgba(154, 202, 124, 0.25); background: rgba(154, 202, 124, 0.25); }.tcm-reader-notes > div { padding: 17px; background: #0c1e13; }.tcm-reader-notes strong, .tcm-reader-notes span { display: block; }.tcm-reader-notes strong { color: var(--gold-light); font-size: 14px; }.tcm-reader-notes span { margin-top: 5px; color: var(--muted); font-size: 13px; }

.tarot-spread {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.tarot-card {
  min-height: 320px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(122, 166, 230, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(5, 10, 19, 0.72);
}

.tarot-card-art {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 10px;
  background: rgba(2, 7, 15, 0.56);
  border: 1px solid rgba(122, 166, 230, 0.22);
}

.tarot-card-art img {
  width: min(100%, 150px);
  aspect-ratio: 0.58;
  object-fit: cover;
  border: 1px solid rgba(216, 198, 138, 0.42);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.tarot-card-back {
  width: min(100%, 150px);
  aspect-ratio: 0.58;
  display: grid;
  place-items: center;
  padding: 16px;
  text-align: center;
  color: #d8c68a;
  background:
    linear-gradient(145deg, rgba(122, 166, 230, 0.18), rgba(5, 10, 19, 0.96)),
    #07111f;
  border: 1px solid rgba(216, 198, 138, 0.42);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
}

.tarot-card-back span,
.tarot-card-back strong {
  display: block;
}

.tarot-card-back span {
  color: #9eb6d6;
  font-size: 13px;
}

.tarot-card-back strong {
  color: #d8c68a;
  font-size: 30px;
}

.tarot-card-art.is-reversed img {
  transform: rotate(180deg);
}

.tarot-card-text {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.tarot-card strong {
  color: var(--gold-light);
  font-size: 21px;
}

.tarot-card span {
  color: var(--muted);
  font-size: 13px;
}

.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.zodiac-chip {
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  text-align: center;
}

.zodiac-chip strong,
.zodiac-chip span {
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(20px, 4vw, 64px);
  background: rgba(25, 13, 15, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border: 1px solid rgba(245, 217, 145, 0.42);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(215, 174, 97, 0.2);
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}

.top-nav a {
  padding: 8px 12px;
  border: 1px solid transparent;
}

.top-nav a:hover {
  border-color: var(--line);
  background: rgba(245, 217, 145, 0.08);
}

.top-nav a[aria-current="page"] {
  border-color: rgba(201, 162, 91, 0.5);
  background: rgba(245, 217, 145, 0.1);
  color: var(--gold-light);
}

.hetu-hero .flow-card {
  border-color: rgba(86, 147, 154, 0.46);
}

.hetu-workbench {
  padding: 28px;
  background: rgba(13, 18, 21, 0.88);
  border: 1px solid rgba(201, 162, 91, 0.34);
}

.hetu-workbench-head,
.hetu-layout {
  display: grid;
  gap: 22px;
}

.hetu-workbench-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.hetu-workbench-head h2 {
  margin: 0;
  font-size: 25px;
}

.hetu-workbench-head p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
}

.hetu-view-switch,
.hetu-focus-switch {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
}

.hetu-view-switch button,
.hetu-focus-switch button {
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.hetu-view-switch button:last-child,
.hetu-focus-switch button:last-child {
  border-right: 0;
}

.hetu-view-switch button[aria-selected="true"],
.hetu-focus-switch button[aria-pressed="true"] {
  color: var(--ink);
  background: var(--gold-light);
}

.hetu-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: stretch;
}

.hetu-stage {
  display: grid;
  place-items: center;
  min-height: 520px;
  padding: 26px;
  overflow: hidden;
  background: #101719;
  border: 1px solid rgba(201, 162, 91, 0.24);
}

.hetu-diagram,
.luoshu-diagram {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1;
}

.hetu-ring {
  position: absolute;
  inset: 8%;
  border: 1px solid rgba(201, 162, 91, 0.38);
  border-radius: 50%;
}

.hetu-ring.ring-inner {
  inset: 27%;
  border-color: rgba(86, 147, 154, 0.5);
}

.hetu-cross {
  position: absolute;
  z-index: 0;
  background: rgba(201, 162, 91, 0.28);
}

.cross-vertical {
  top: 11%;
  bottom: 11%;
  left: 50%;
  width: 1px;
}

.cross-horizontal {
  right: 11%;
  left: 11%;
  top: 50%;
  height: 1px;
}

.hetu-node {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 104px;
  aspect-ratio: 1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: #1d2426;
  font: inherit;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.hetu-node small {
  color: var(--muted);
  font-size: 12px;
}

.hetu-node strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
}

.hetu-node:hover,
.hetu-node:focus-visible,
.hetu-node.is-selected {
  border-color: var(--gold-light);
  background: #313025;
  outline: none;
  transform: translate(var(--node-x, 0), var(--node-y, 0)) scale(1.06);
}

.node-water { --node-x: -50%; --node-y: 0; top: 1%; left: 50%; border-color: rgba(86, 147, 154, 0.7); }
.node-fire { --node-x: -50%; --node-y: 0; bottom: 1%; left: 50%; border-color: rgba(188, 79, 59, 0.74); }
.node-wood { --node-x: 0; --node-y: -50%; top: 50%; left: 1%; border-color: rgba(104, 143, 91, 0.74); }
.node-metal { --node-x: 0; --node-y: -50%; top: 50%; right: 1%; border-color: rgba(166, 176, 170, 0.7); }
.node-earth { --node-x: -50%; --node-y: -50%; top: 50%; left: 50%; border-color: rgba(201, 162, 91, 0.78); }

.hetu-caption {
  position: absolute;
  right: 0;
  bottom: -28px;
  left: 0;
  margin: 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.luoshu-diagram {
  display: grid;
  place-items: center;
}

.luoshu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(100%, 410px);
  aspect-ratio: 1;
  border-top: 1px solid rgba(201, 162, 91, 0.56);
  border-left: 1px solid rgba(201, 162, 91, 0.56);
}

.luoshu-grid button {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 10px;
  border: 0;
  border-right: 1px solid rgba(201, 162, 91, 0.56);
  border-bottom: 1px solid rgba(201, 162, 91, 0.56);
  color: var(--ink);
  background: #182022;
  font: inherit;
  cursor: pointer;
}

.luoshu-grid button strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 35px;
  line-height: 1;
}

.luoshu-grid button span {
  color: var(--muted);
  font-size: 12px;
}

.luoshu-grid button:hover,
.luoshu-grid button:focus-visible,
.luoshu-grid button.is-selected {
  color: #2a1d0d;
  background: var(--gold-light);
  outline: none;
}

.luoshu-grid button:hover span,
.luoshu-grid button:focus-visible span,
.luoshu-grid button.is-selected span {
  color: #5f4018;
}

.hetu-inspector {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-left: 3px solid var(--gold-light);
  background: rgba(31, 37, 36, 0.82);
}

.hetu-inspector h3 {
  margin: 0;
  font-size: 22px;
}

.hetu-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 20px 0;
  background: var(--line);
}

.hetu-facts div {
  padding: 12px;
  background: #161d1f;
}

.hetu-facts dt {
  color: var(--muted);
  font-size: 12px;
}

.hetu-facts dd {
  margin: 5px 0 0;
  color: var(--gold-light);
  font-size: 18px;
}

.hetu-rule,
#hetuReading {
  margin: 0;
  color: var(--muted);
}

.hetu-focus-block {
  margin-top: auto;
  padding-top: 26px;
}

.hetu-focus-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  margin: 8px 0 14px;
}

.hetu-focus-switch button:nth-child(2) {
  border-right: 0;
}

.hetu-focus-switch button:nth-child(-n + 2) {
  border-bottom: 1px solid var(--line);
}

.hetu-method-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.hetu-method-note strong { color: var(--gold-light); }
.hetu-method-note span { color: var(--muted); }

.hetu-usage { padding-top: 0; }

.hetu-reading-path { padding-bottom: 0; }
.hetu-reading-path .section-title p:not(.eyebrow) { max-width: 760px; color: var(--muted); }
.hetu-path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.hetu-path-grid article { padding: 20px; border: 1px solid rgba(170, 209, 133, 0.26); background: rgba(11, 33, 22, 0.72); }
.hetu-path-grid span { color: #a9cf88; font-family: Georgia, "Times New Roman", serif; font-size: 14px; }
.hetu-path-grid h3 { margin: 7px 0 6px; color: var(--gold-light); font-size: 19px; }
.hetu-path-grid p { margin: 0; color: var(--muted); }

.hetu-reference,
.luoshu-reference,
.hetu-context {
  padding-top: 18px;
}

.hetu-reference-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: rgba(9, 24, 18, 0.64);
}

.hetu-reference-table th,
.hetu-reference-table td {
  padding: 13px 14px;
  border: 1px solid rgba(170, 209, 133, 0.2);
  text-align: left;
  vertical-align: top;
}

.hetu-reference-table th {
  color: var(--gold-light);
  background: rgba(47, 117, 78, 0.2);
  font-size: 13px;
}

.hetu-reference-table td { color: var(--muted); }
.hetu-reference-table td strong { color: var(--gold-light); font-family: Georgia, "Times New Roman", serif; font-size: 18px; }

.hetu-note-grid,
.hetu-context-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.hetu-note-grid article,
.hetu-context-grid article,
.luoshu-magic-panel {
  padding: 18px;
  border: 1px solid rgba(170, 209, 133, 0.24);
  background: rgba(11, 33, 22, 0.72);
}

.hetu-note-grid h3,
.hetu-context-grid h3,
.luoshu-magic-panel h3 { margin: 0; color: var(--gold-light); font-size: 18px; }
.hetu-note-grid p,
.hetu-context-grid p { margin: 8px 0 0; color: var(--muted); }

.luoshu-reference-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
}

.luoshu-sum-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  max-width: 270px;
  margin: 16px auto;
  border: 1px solid rgba(190, 224, 151, 0.42);
  background: rgba(190, 224, 151, 0.26);
}

.luoshu-sum-grid span {
  display: grid;
  min-height: 70px;
  place-items: center;
  background: #10291b;
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
}

.luoshu-sum-list { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
.luoshu-sum-list li + li { margin-top: 7px; }
.luoshu-reference-table { min-width: 480px; }

.xingxiu-hero .flow-card { border-left: 3px solid #6796a5; }

.jieqi-hero .flow-card { border-left: 3px solid #84985c; }

.jieqi-workbench {
  padding: 28px;
  background: rgba(13, 18, 21, 0.88);
  border: 1px solid var(--line);
}

.jieqi-workbench-head,
.jieqi-current,
.jieqi-yearbar {
  display: grid;
  gap: 22px;
}

.jieqi-workbench-head {
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.52fr);
  align-items: end;
}

.jieqi-workbench-head h2 { margin: 0; }
.jieqi-workbench-head p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.jieqi-form { display: grid; gap: 8px; }
.jieqi-form label, .jieqi-yearbar label { color: var(--gold-light); font-size: 13px; }
.jieqi-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.jieqi-input-row input, .jieqi-yearbar select { min-width: 0; }

.jieqi-live-status { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 22px; align-items: center; margin-top: 22px; padding: 16px 18px; border: 1px solid rgba(202, 231, 166, 0.48); border-left: 4px solid #cde7a6; background: linear-gradient(90deg, rgba(41, 78, 46, 0.72), rgba(17, 31, 24, 0.8)); }
.jieqi-live-label { display: inline-flex; align-items: center; gap: 8px; color: #dcefc2; font-size: 13px; white-space: nowrap; }
.jieqi-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #cde7a6; box-shadow: 0 0 0 5px rgba(205, 231, 166, 0.12); }
.jieqi-live-main { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 16px; }
.jieqi-live-main strong { color: #f0f7dc; font-family: Georgia, "Times New Roman", serif; font-size: 24px; font-weight: 600; }
.jieqi-live-main span { color: #bdd3b1; font-size: 13px; }
.jieqi-live-status p { grid-column: 2; margin: 0; color: #c7d7c2; font-size: 13px; line-height: 1.7; }

.jieqi-current {
  grid-template-columns: 172px minmax(0, 1fr);
  align-items: center;
  margin-top: 25px;
  padding: 20px;
  border: 1px solid rgba(170, 178, 116, 0.34);
  background: #161d1f;
}

.jieqi-current-art { position: relative; width: 150px; aspect-ratio: 1; }
.jieqi-current-art img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 1px solid rgba(201, 162, 91, 0.66); }
.jieqi-current-art span { position: absolute; inset: 37%; display: grid; place-items: center; border-radius: 50%; color: var(--gold-light); background: #151a18; border: 1px solid var(--line); font-family: Georgia, "Times New Roman", serif; font-size: 18px; }
.jieqi-current-copy h3 { margin: 0; font-size: 26px; }
.jieqi-current-copy > p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }

.jieqi-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 18px 0 0; background: var(--line); }
.jieqi-facts div { padding: 11px; background: #121819; }
.jieqi-facts dt { color: var(--muted); font-size: 12px; }
.jieqi-facts dd { margin: 4px 0 0; color: var(--gold-light); font-size: 13px; }
.jieqi-form-hint { margin: 14px 0 0; color: var(--muted); font-size: 13px; }

.jieqi-yearbar { grid-template-columns: auto 150px 1fr; align-items: center; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.jieqi-yearbar span { color: var(--muted); font-size: 13px; }
.jieqi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 15px; background: var(--line); border: 1px solid var(--line); }
.jieqi-item { min-height: 348px; padding: 15px 17px 17px; background: #141a1b; border-left: 3px solid transparent; }
.jieqi-item:hover { background: #1a2222; }
.jieqi-item span { color: var(--muted); font-size: 12px; }
.jieqi-card-head { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 11px; align-items: center; min-height: 69px; }
.jieqi-illustration { display: grid; place-items: center; width: 74px; aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(175, 214, 143, 0.26); border-radius: 50%; background: radial-gradient(circle at 50% 48%, rgba(178, 209, 123, 0.16), rgba(17, 45, 29, 0.12) 58%, transparent 59%); }
.jieqi-illustration svg { width: 68px; height: 46px; overflow: visible; fill: none; stroke: #c9e4a1; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; opacity: .94; }
.jieqi-illustration .jieqi-art-horizon { stroke: rgba(200, 228, 160, 0.38); }
.jieqi-illustration-snow svg, .jieqi-illustration-deep-snow svg, .jieqi-illustration-small-snow svg { stroke: #cae6dd; }
.jieqi-illustration-rain svg, .jieqi-illustration-dew svg, .jieqi-illustration-cold-dew svg { stroke: #a9d7c1; }
.jieqi-illustration-heat svg, .jieqi-illustration-summer-sun svg, .jieqi-illustration-small-sun svg { stroke: #e4d891; }
.jieqi-illustration-autumn-leaf svg, .jieqi-illustration-frost-leaf svg { stroke: #d2dc96; }
.jieqi-item h3 { margin: 4px 0 4px; color: var(--gold-light); font-size: 19px; }
.jieqi-item time { color: #d5d0bd; font-size: 12px; }
.jieqi-item p { margin: 11px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.jieqi-term-summary { color: #d0ddc2 !important; }
.jieqi-term-notes { display: grid; gap: 8px; margin: 12px 0 0; }
.jieqi-term-notes div { padding-top: 8px; border-top: 1px solid rgba(182, 216, 155, 0.15); }
.jieqi-term-notes dt { color: #b6d89b; font-size: 12px; }
.jieqi-term-notes dd { margin: 3px 0 0; color: #aeb8ae; font-size: 12px; line-height: 1.58; }
.jieqi-state { display: inline-block; margin-left: 5px; padding: 1px 5px; color: #d7eaae; border: 1px solid rgba(215, 234, 174, 0.45); font-size: 10px; font-weight: 500; line-height: 1.25; vertical-align: 1px; }
.jieqi-state-current { color: #f4f9e9; background: rgba(176, 211, 112, 0.2); border-color: #cde7a6; }
.jieqi-spring { border-left-color: #84985c; }
.jieqi-summer { border-left-color: #b77a51; }
.jieqi-autumn { border-left-color: #b69c58; }
.jieqi-winter { border-left-color: #6796a5; }
.jieqi-item.is-selected { outline: 1px solid var(--gold-light); outline-offset: -1px; background: #25251c; }
.jieqi-method-note { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; margin-top: 18px; padding: 15px 0 0; border-top: 1px solid var(--line); font-size: 13px; }
.jieqi-method-note strong { color: var(--gold-light); }.jieqi-method-note span { color: var(--muted); }
.jieqi-reading { padding-top: 0; }

.guardian-workbench {
  padding: 28px;
  background: rgba(13, 18, 21, 0.88);
  border: 1px solid rgba(103, 150, 165, 0.42);
}

.guardian-workbench-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
  gap: 28px;
  align-items: end;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.guardian-workbench-head h2 { margin: 0; }
.guardian-workbench-head p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }

.guardian-form { display: grid; gap: 8px; }
.guardian-form label { color: var(--gold-light); font-size: 14px; }
.guardian-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.guardian-input-row input { min-height: 46px; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-radius: 0; color: var(--ink); background: #11191b; font: inherit; }
.guardian-input-row .btn { min-height: 46px; white-space: nowrap; }
.form-hint { margin: 0; color: var(--muted); font-size: 12px; }
.form-hint.is-error { color: #efad93; }

.guardian-empty {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 180px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: rgba(17, 25, 27, 0.7);
}

.guardian-empty strong { color: var(--gold-light); font-size: 18px; }

.guardian-result {
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(300px, 0.72fr);
  gap: 30px;
  align-items: center;
  padding-top: 26px;
}

.guardian-chart-wrap { display: grid; justify-items: center; gap: 12px; }
.guardian-chart {
  position: relative;
  width: min(100%, 500px);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-conic-gradient(from -6.43deg, rgba(215, 174, 97, 0.20) 0deg 0.6deg, transparent 0.7deg 12.857deg),
    radial-gradient(circle, #142025 0 26%, #101719 26.2% 54%, #172426 54.2% 55%, #101719 55.2%);
  border: 1px solid rgba(215, 174, 97, 0.44);
  box-shadow: inset 0 0 0 16px rgba(103, 150, 165, 0.06), 0 18px 48px rgba(0, 0, 0, 0.25);
}

.guardian-ring { position: absolute; border: 1px solid rgba(215, 174, 97, 0.28); border-radius: 50%; }
.guardian-ring-outer { inset: 8%; }
.guardian-ring-inner { inset: 30%; border-color: rgba(103, 150, 165, 0.4); }
.guardian-chart-center { position: absolute; inset: 35%; display: grid; place-items: center; align-content: center; border: 1px solid rgba(215, 174, 97, 0.38); border-radius: 50%; background: rgba(17, 25, 27, 0.94); text-align: center; }
.guardian-chart-center span, .guardian-chart-center small { color: var(--muted); font-size: 12px; }
.guardian-chart-center strong { color: var(--gold-light); font-family: Georgia, "Times New Roman", serif; font-size: clamp(22px, 5vw, 34px); }

.guardian-marker { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(245, 217, 145, 0.26); border-radius: 50%; color: var(--muted); background: #172022; font-size: 12px; font-weight: 700; transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-205px) rotate(calc(-1 * var(--angle))); transition: transform 180ms ease, background 180ms ease, color 180ms ease; }
.guardian-marker.is-active { z-index: 2; border-color: var(--gold-light); color: #201607; background: var(--gold-light); box-shadow: 0 0 0 5px rgba(215, 174, 97, 0.16); transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-205px) rotate(calc(-1 * var(--angle))) scale(1.28); }
.guardian-chart-caption { margin: 0; color: var(--muted); text-align: center; font-size: 12px; }

.guardian-reading { padding: 22px; border-left: 3px solid #6796a5; background: rgba(31, 37, 36, 0.82); }
.guardian-reading h3 { margin: 0; color: var(--gold-light); font-size: 25px; }
.guardian-reading-intro { margin: 8px 0 16px; color: var(--muted); }
.guardian-image { display: block; width: min(100%, 260px); max-height: 360px; margin: 0 auto 18px; object-fit: contain; background: #0e1213; }
.guardian-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; background: var(--line); }
.guardian-facts div { padding: 10px; background: #161d1f; }
.guardian-facts dt { color: var(--muted); font-size: 12px; }
.guardian-facts dd { margin: 5px 0 0; color: var(--gold-light); font-size: 14px; }
.guardian-method { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.guardian-method strong { color: var(--gold-light); }
.guardian-method p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }

.four-symbols-overview {
  padding: 28px;
  background: rgba(13, 18, 21, 0.88);
  border: 1px solid rgba(201, 162, 91, 0.34);
}

.four-symbols-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.four-symbols-head h2 { margin: 0; }
.four-symbols-head p:not(.eyebrow) { margin: 8px 0 0; color: var(--muted); }
.four-symbols-count { color: var(--gold-light); font-size: 13px; white-space: nowrap; }

.four-symbols-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.84fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding-top: 24px;
}

.four-symbols-art {
  margin: 0;
  padding: 15px;
  background: #e8e0d0;
  border: 1px solid rgba(215, 174, 97, 0.72);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.four-symbols-art img {
  display: block;
  width: 100%;
  max-height: 430px;
  object-fit: contain;
  background: #e8e0d0;
}

.four-symbols-art figcaption {
  margin-top: 9px;
  color: #5f513a;
  font-size: 12px;
  text-align: center;
}

.four-symbols-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.four-symbol-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 12px;
  min-height: 138px;
  align-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold-light);
  background: rgba(31, 37, 36, 0.82);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.four-symbol-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  align-content: center;
}

.four-symbol-card img {
  display: block;
  width: 82px;
  height: 82px;
  align-self: center;
  object-fit: cover;
  border: 1px solid rgba(208, 226, 177, 0.42);
  border-radius: 50%;
  background: #050807;
  box-shadow: inset 0 0 0 4px rgba(169, 201, 120, 0.1), 0 8px 18px rgba(0, 0, 0, 0.28);
  filter: grayscale(1) sepia(0.24) hue-rotate(35deg) saturate(0.72) brightness(1.08);
  opacity: 0.9;
}

.four-symbol-card:hover,
.four-symbol-card:focus-visible {
  border-color: var(--gold-light);
  background: rgba(49, 48, 37, 0.92);
  outline: none;
  transform: translateY(-2px);
}

.four-symbol-card strong { color: var(--gold-light); font-family: Georgia, "Times New Roman", serif; font-size: 30px; line-height: 1.15; }
.four-symbol-card small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.four-symbol-direction { color: var(--muted); font-size: 12px; }
.four-symbol-east { border-left-color: #86a982; }
.four-symbol-west { border-left-color: #d4c28d; }
.four-symbol-south { border-left-color: #c98571; }
.four-symbol-north { border-left-color: #78a8ba; }
.four-symbols-source { margin: 18px 0 0; color: var(--muted); font-size: 12px; }
.four-symbols-source a { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }

.xingxiu-atlas {
  padding: 28px;
  background: rgba(13, 18, 21, 0.88);
  border: 1px solid rgba(201, 162, 91, 0.34);
}

.xingxiu-atlas-head,
.xingxiu-layout {
  display: grid;
  gap: 22px;
}

.xingxiu-atlas-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.xingxiu-atlas-head h2,
.xingxiu-detail h2 { margin: 0; }

.xingxiu-atlas-head p:not(.eyebrow),
.xingxiu-source-note,
.xingxiu-detail > p { margin: 8px 0 0; color: var(--muted); }

.xingxiu-count {
  color: var(--gold-light);
  font-size: 13px;
  white-space: nowrap;
}

.xingxiu-layout {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  align-items: start;
}

.xingxiu-groups { display: grid; gap: 24px; }

.xingxiu-group { padding-top: 2px; }

.xingxiu-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.xingxiu-group-head h3 { margin: 0; font-size: 18px; }
.xingxiu-group-head span { color: var(--muted); font-size: 12px; }

.xingxiu-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.xingxiu-card {
  position: relative;
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(245, 217, 145, 0.18);
  border-radius: 4px;
  color: var(--ink);
  background: #161d1f;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.xingxiu-card img {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 180ms ease, filter 180ms ease;
}

.xingxiu-card span {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 20px 8px 8px;
  background: linear-gradient(transparent, rgba(12, 14, 15, 0.94));
  font-size: 13px;
  font-weight: 700;
}

.xingxiu-card:hover img,
.xingxiu-card:focus-visible img,
.xingxiu-card.is-selected img { transform: scale(1.045); filter: saturate(1.08); }

.xingxiu-card:focus-visible,
.xingxiu-card.is-selected { border-color: var(--gold-light); outline: none; }

.xingxiu-group-east .xingxiu-group-head h3 { color: #9dbf9c; }
.xingxiu-group-west .xingxiu-group-head h3 { color: #d4c28d; }
.xingxiu-group-south .xingxiu-group-head h3 { color: #d59682; }
.xingxiu-group-north .xingxiu-group-head h3 { color: #8eb7c8; }

.xingxiu-detail {
  position: sticky;
  top: 94px;
  padding: 20px;
  border-left: 3px solid var(--gold-light);
  background: rgba(31, 37, 36, 0.82);
}

.xingxiu-detail-image {
  display: block;
  width: 100%;
  max-height: 520px;
  margin: 16px 0;
  object-fit: contain;
  object-position: center;
  background: #0e1213;
}

.xingxiu-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 16px 0;
  background: var(--line);
}

.xingxiu-facts div { padding: 10px; background: #161d1f; }
.xingxiu-facts dt { color: var(--muted); font-size: 12px; }
.xingxiu-facts dd { margin: 5px 0 0; color: var(--gold-light); font-size: 16px; }

.xingxiu-source-note {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .hetu-workbench-head,
  .hetu-layout,
  .hetu-path-grid,
  .luoshu-reference-layout,
  .guardian-workbench-head,
  .guardian-result,
  .four-symbols-head,
  .four-symbols-layout,
  .xingxiu-atlas-head,
  .xingxiu-layout {
    grid-template-columns: 1fr;
  }

  .hetu-view-switch { justify-self: start; }
  .hetu-stage { min-height: 460px; }
  .hetu-inspector { min-height: 0; }
  .xingxiu-detail { position: static; }
  .guardian-chart { width: min(100%, 480px); }
  .guardian-marker { transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-196px) rotate(calc(-1 * var(--angle))); }
  .guardian-marker.is-active { transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-196px) rotate(calc(-1 * var(--angle))) scale(1.28); }
}

@media (max-width: 560px) {
  .hetu-workbench { padding: 18px; }
  .hetu-stage { min-height: 390px; padding: 18px; }
  .hetu-node { width: 78px; padding: 8px; }
  .hetu-node small { font-size: 10px; }
  .hetu-node strong { font-size: 18px; }
  .luoshu-grid button strong { font-size: 28px; }
  .luoshu-grid button span { font-size: 10px; }
  .hetu-facts { grid-template-columns: 1fr; }
  .hetu-method-note { grid-template-columns: 1fr; gap: 6px; }
  .hetu-note-grid, .hetu-context-grid { grid-template-columns: 1fr; }
  .xingxiu-atlas { padding: 18px; }
  .xingxiu-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .xingxiu-facts { grid-template-columns: 1fr; }
  .guardian-workbench { padding: 18px; }
  .guardian-input-row { grid-template-columns: 1fr; }
  .guardian-result { gap: 20px; }
  .guardian-chart { width: min(100%, 330px); }
  .guardian-marker { width: 21px; height: 21px; font-size: 10px; transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-137px) rotate(calc(-1 * var(--angle))); }
  .guardian-marker.is-active { transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-137px) rotate(calc(-1 * var(--angle))) scale(1.25); }
  .guardian-facts { grid-template-columns: 1fr; }
  .four-symbols-overview { padding: 18px; }
  .four-symbols-list { grid-template-columns: 1fr; }
}

.nav-account {
  display: flex;
  justify-content: flex-end;
  min-width: 168px;
}

.nav-login,
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid rgba(245, 217, 145, 0.32);
  background: rgba(245, 217, 145, 0.08);
  color: var(--gold-light);
  white-space: nowrap;
}

.nav-login:hover,
.nav-user:hover {
  border-color: rgba(245, 217, 145, 0.58);
  background: rgba(245, 217, 145, 0.14);
}

.nav-user {
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  line-height: 1.25;
}

.nav-user-name {
  max-width: 150px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
}

.nav-user-points {
  color: var(--muted);
  font-size: 12px;
}

.nav-active-archive {
  max-width: 156px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gold-light);
  font-size: 11px;
}

.profile-picker {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-picker label { display: grid; gap: 7px; }
.profile-picker label > span { color: var(--muted); font-size: 13px; font-weight: 600; }
.profile-picker small { color: var(--muted); font-size: 12px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.56fr) minmax(300px, 0.62fr);
  gap: 36px;
  min-height: calc(100vh - 72px);
  padding: clamp(44px, 7vw, 92px) clamp(20px, 5vw, 80px) 48px;
  background:
    radial-gradient(circle at 68% 44%, rgba(245, 217, 145, 0.12), transparent 24%),
    linear-gradient(120deg, rgba(83, 12, 19, 0.92), rgba(16, 19, 22, 0.7));
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  align-self: center;
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-light);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.14;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  font-size: clamp(38px, 5vw, 72px);
}

h2 {
  font-size: clamp(28px, 3vw, 44px);
}

.hero-text {
  max-width: 720px;
  margin: 24px 0 0;
  color: #ddc6a0;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.btn,
button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--cinnabar);
  font: inherit;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(180deg, #e5c071, #a77732);
  color: #241112;
  border-color: rgba(245, 217, 145, 0.8);
  font-weight: 800;
}

.btn-secondary {
  background: rgba(245, 217, 145, 0.08);
  color: var(--gold-light);
  border-color: rgba(245, 217, 145, 0.38);
}

.hero-emblem {
  align-self: center;
  display: grid;
  place-items: center;
}

.hero-emblem img {
  width: min(100%, 330px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.46), 0 0 70px rgba(215, 174, 97, 0.18);
}

.daily-panel {
  align-self: center;
  padding: 26px;
  background:
    linear-gradient(145deg, rgba(255, 238, 181, 0.2), rgba(141, 23, 29, 0.16) 44%, rgba(20, 11, 13, 0.94)),
    rgba(42, 19, 19, 0.96);
  color: var(--ink);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.44), 0 0 0 1px rgba(255, 223, 150, 0.08) inset;
  border: 1px solid rgba(245, 217, 145, 0.46);
  position: relative;
  overflow: hidden;
}

.daily-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(245, 217, 145, 0.22);
}

.daily-panel::after {
  content: "";
  position: absolute;
  right: -36px;
  top: -42px;
  width: 132px;
  height: 132px;
  pointer-events: none;
  background: radial-gradient(circle, rgba(245, 217, 145, 0.22), transparent 64%);
}

.daily-panel .panel-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #f0d99a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.daily-panel .panel-head strong {
  color: #2a1111;
  background: linear-gradient(180deg, #f4d98f, #be8a3c);
  padding: 2px 9px;
  border: 1px solid rgba(255, 239, 186, 0.45);
}

.daily-date {
  position: relative;
  z-index: 1;
  margin: 16px 0 22px;
  color: #ffe6a5;
  font-size: 30px;
  font-weight: 800;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.daily-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.daily-grid div {
  min-height: 92px;
  padding: 14px;
  background: rgba(255, 239, 196, 0.12);
  border: 1px solid rgba(255, 232, 170, 0.26);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.daily-grid span,
.daily-grid strong {
  display: block;
}

.daily-grid span {
  color: #e4c981;
  font-size: 12px;
  font-weight: 800;
}

.daily-grid strong {
  margin-top: 4px;
  color: #fff1c9;
  font-size: 15px;
  line-height: 1.55;
}

.daily-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 16px;
  padding: 8px 14px;
  color: #241112;
  background: linear-gradient(180deg, #e5c071, #a77732);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid rgba(255, 239, 186, 0.38);
}

.section {
  padding: 72px clamp(20px, 5vw, 80px);
}

.band {
  background: rgba(16, 19, 22, 0.42);
  border-block: 1px solid rgba(245, 217, 145, 0.14);
}

.section-title {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-title p:not(.eyebrow) {
  color: var(--muted);
  margin: 14px 0 0;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.module-card {
  min-height: 230px;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(245, 217, 145, 0.07), rgba(255,255,255,0.02)),
    rgba(36, 17, 18, 0.9);
  border: 1px solid var(--line);
  box-shadow: 0 18px 42px rgba(0,0,0,0.2);
}

.module-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.module-card h3 {
  margin: 0;
  font-size: 21px;
}

.badge {
  padding: 3px 8px;
  background: rgba(215, 174, 97, 0.15);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 700;
}

.module-card p {
  color: #d7c19d;
  margin: 0 0 18px;
}

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

.module-meta span {
  padding: 5px 8px;
  background: rgba(199, 154, 66, 0.16);
  color: var(--gold-light);
  font-size: 12px;
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.split p {
  color: var(--muted);
}

.profile-list {
  display: grid;
  gap: 12px;
}

.profile-list article {
  display: flex;
  gap: 14px;
  padding: 18px;
  background: rgba(36, 17, 18, 0.88);
  border: 1px solid var(--line);
}

.profile-list p {
  margin: 4px 0 0;
}

.status-dot {
  width: 11px;
  height: 11px;
  margin-top: 7px;
  background: #c8b8a5;
}

.status-dot.active {
  background: var(--cinnabar);
}

.credit-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(220px, 0.6fr) minmax(0, 1fr);
  gap: 16px;
}

.credit-card,
.credit-actions,
.tiers {
  padding: 22px;
  background: rgba(36, 17, 18, 0.88);
  border: 1px solid var(--line);
}

.credit-card span,
.credit-card strong {
  display: block;
}

.credit-card strong {
  color: var(--gold-light);
  font-size: 64px;
  line-height: 1;
}

.credit-actions {
  display: grid;
  gap: 10px;
}

.credit-actions button {
  width: 100%;
  background: rgba(245, 217, 145, 0.08);
  color: var(--gold-light);
}

.tiers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tiers div {
  display: grid;
  place-items: center;
  min-height: 88px;
  background: rgba(245, 217, 145, 0.08);
  text-align: center;
}

.tiers strong,
.tiers span {
  display: block;
}

.tiers span {
  color: var(--muted);
  font-size: 12px;
}

.roadmap {
  display: grid;
  gap: 12px;
  max-width: 900px;
  padding: 0;
  list-style: none;
}

.roadmap li {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.roadmap strong {
  color: var(--gold-light);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(20px, 5vw, 80px);
  background: #0e1114;
  color: #d8c8a9;
  font-size: 13px;
}

.boundary-intro,
.boundary-panel {
  max-width: 1180px;
  margin: 0 auto;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.boundary-grid article,
.boundary-panel {
  padding: 24px;
  background: rgba(36, 17, 18, 0.88);
  border: 1px solid var(--line);
}

.boundary-grid strong,
.boundary-callout strong {
  display: block;
  color: var(--gold-light);
  font-size: 18px;
}

.boundary-grid p,
.boundary-panel p,
.boundary-list {
  color: var(--muted);
}

.boundary-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 22px;
}

.boundary-callout {
  display: grid;
  gap: 6px;
  margin-top: 22px;
  padding: 18px 20px;
  border-left: 3px solid var(--gold);
  background: rgba(141, 23, 29, 0.16);
}

.boundary-callout span {
  color: var(--muted);
}

.module-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-top: 18px;
  padding: 7px 12px;
  background: linear-gradient(180deg, #e5c071, #a77732);
  color: #241112;
  font-size: 13px;
  font-weight: 700;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 28px;
  padding: clamp(42px, 6vw, 76px) clamp(20px, 5vw, 80px);
  background:
    radial-gradient(circle at 74% 30%, rgba(245, 217, 145, 0.12), transparent 30%),
    linear-gradient(120deg, rgba(83, 12, 19, 0.94), rgba(16, 19, 22, 0.78));
}

.compact-hero {
  min-height: 360px;
  align-items: end;
}

.flow-card {
  align-self: end;
  padding: 22px;
  background: var(--blueblack);
  color: var(--white);
}

.flow-card strong,
.flow-card span {
  display: block;
}

.flow-card span {
  margin-top: 8px;
  color: #d8c8a9;
}

.bazi-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.bazi-form,
.result-panel {
  background: rgba(36, 17, 18, 0.88);
  border: 1px solid var(--line);
}

.bazi-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.form-head p:not(.eyebrow) {
  color: var(--muted);
  margin: 8px 0 0;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(16, 19, 22, 0.56);
  color: var(--ink);
  font: inherit;
  padding: 8px 10px;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

label small,
.form-hint {
  display: block;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-grid.form-row {
  align-items: start;
  gap: 14px;
}

.bazi-form .field-grid {
  grid-template-columns: 1fr;
}

.field-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.segmented-field {
  align-content: start;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 42px;
}

.segmented-control label {
  position: relative;
  display: block;
  min-width: 0;
  gap: 0;
  font-size: 13px;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: grid;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(16, 19, 22, 0.56);
  color: var(--muted);
  font-weight: 800;
}

.segmented-control input:checked + span {
  border-color: rgba(245, 217, 145, 0.72);
  background: rgba(245, 217, 145, 0.14);
  color: var(--gold-light);
}

.date-selects {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
  gap: 8px;
}

.date-selects select,
.segmented-control span {
  min-width: 0;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--muted);
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.password-toggle {
  margin-top: -4px;
  font-size: 13px;
}

.result-panel {
  min-height: 640px;
  padding: 24px;
}

.empty-state {
  display: grid;
  align-content: center;
  min-height: 520px;
  color: var(--muted);
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.result-head p {
  color: var(--muted);
  margin: 8px 0 0;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.pillar-grid div,
.analysis-grid article,
.element-panel,
.paywall {
  background: rgba(25, 13, 15, 0.62);
  border: 1px solid var(--line);
}

.pillar-grid div {
  min-height: 100px;
  padding: 16px;
  text-align: center;
}

.pillar-grid span,
.pillar-grid strong {
  display: block;
}

.pillar-grid span {
  color: var(--muted);
  font-size: 12px;
}

.pillar-grid strong {
  color: var(--gold-light);
  font-size: 32px;
}

.pillar-grid em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.analysis-grid article {
  padding: 18px;
}

.analysis-grid h3,
.element-panel h3 {
  margin: 0 0 8px;
}

.analysis-grid strong {
  color: var(--gold-light);
  font-size: 24px;
}

.analysis-grid p {
  color: var(--muted);
  margin: 8px 0 0;
}

.element-panel {
  margin-top: 10px;
  padding: 18px;
}

.element-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 42px;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.element-row div {
  height: 9px;
  background: rgba(245, 217, 145, 0.12);
  overflow: hidden;
}

.element-row i {
  display: block;
  height: 100%;
  background: var(--gold);
}

.yao-list {
  display: grid;
  gap: 8px;
}

.yao-row {
  display: grid;
  grid-template-columns: 54px 110px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  background: rgba(255, 250, 242, 0.045);
  border: 1px solid rgba(245, 217, 145, 0.12);
}

.yao-row span {
  color: var(--muted);
  font-size: 13px;
}

.yao-row strong {
  color: var(--gold-light);
}

.yao-row em {
  color: #d7c19d;
  font-style: normal;
}

.huangli-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.huangli-columns article {
  padding: 18px;
  background: rgba(25, 13, 15, 0.62);
  border: 1px solid var(--line);
}

.huangli-columns h3 {
  margin: 0 0 12px;
  color: var(--gold-light);
}

.dual-form,
.name-option-grid,
.compatibility-band {
  display: grid;
  gap: 10px;
}

.dual-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dual-form section,
.name-option-grid article,
.compatibility-band article {
  padding: 16px;
  background: rgba(25, 13, 15, 0.62);
  border: 1px solid var(--line);
}

.dual-form h3 {
  margin: 0 0 12px;
  color: var(--gold-light);
}

.name-option-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.name-option-grid article div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.name-option-grid strong {
  color: var(--gold-light);
  font-size: 24px;
}

.name-option-grid span,
.compatibility-band span {
  color: var(--muted);
  font-size: 12px;
}

.name-option-grid p,
.compatibility-band p {
  color: var(--muted);
  margin: 10px 0 0;
}

.name-option-grid em {
  display: block;
  margin-top: 10px;
  color: #d7c19d;
  font-style: normal;
  font-size: 13px;
}

.compatibility-band {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.compatibility-band strong {
  display: block;
  color: var(--gold-light);
  font-size: 18px;
  line-height: 1.7;
  margin-top: 6px;
}

.marriage-pillar-pair,
.ten-god-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.marriage-pillar-pair article,
.ten-god-grid article,
.rule-section,
.rule-details,
.relationship-summary div {
  padding: 16px;
  background: rgba(25, 13, 15, 0.62);
  border: 1px solid var(--line);
}

.marriage-pillar-pair p,
.rule-section > .section-title > p,
.rule-details p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.subsection-head,
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.subsection-head span,
.ten-god-grid article > span,
.rule-section article > span,
.relationship-summary span {
  color: var(--muted);
  font-size: 12px;
}

.subsection-head strong,
.section-title h3 {
  margin: 0;
  color: var(--gold-light);
}

.rule-section,
.rule-details {
  margin-top: 14px;
}

.section-title {
  display: block;
  margin-bottom: 12px;
}

.section-title .eyebrow {
  margin: 0 0 4px;
}

.relationship-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.relationship-summary span,
.relationship-summary strong {
  display: block;
}

.relationship-summary strong {
  margin-top: 6px;
  color: var(--gold-light);
  font-size: 20px;
}

.rule-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.rule-list li {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-left: 3px solid rgba(215, 174, 97, 0.45);
  background: rgba(255, 255, 255, 0.025);
}

.rule-list strong {
  color: var(--gold-light);
  font-size: 14px;
}

.rule-list span,
.rule-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.rule-list .rule-tension {
  border-left-color: #a84e4e;
  background: rgba(145, 42, 42, 0.12);
}

.rule-list .rule-support {
  border-left-color: #bd9a50;
}

.rule-empty {
  margin: 10px 0 0;
}

.ten-god-grid table,
.rule-details table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 13px;
}

.ten-god-grid th,
.ten-god-grid td,
.rule-details th,
.rule-details td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.ten-god-grid th,
.rule-details th {
  color: var(--muted);
  font-weight: 500;
}

.rule-details summary {
  cursor: pointer;
  color: var(--gold-light);
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
}

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

.tag-list span {
  padding: 6px 10px;
  background: rgba(199, 154, 66, 0.16);
  color: var(--gold-light);
  border: 1px solid rgba(245, 217, 145, 0.16);
  font-size: 13px;
}

.bazi-note {
  margin: 14px 0;
  padding: 14px 16px;
  background: rgba(245, 217, 145, 0.08);
  border-left: 4px solid var(--gold);
  color: #ddc6a0;
}

.insight-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.insight-panel article {
  padding: 16px;
  background: rgba(25, 13, 15, 0.62);
  border: 1px solid var(--line);
}

.insight-panel span,
.insight-panel strong {
  display: block;
}

.insight-panel span {
  color: var(--muted);
  font-size: 12px;
}

.insight-panel strong {
  color: var(--gold-light);
  font-size: 20px;
  margin-top: 4px;
}

.insight-panel p {
  color: var(--muted);
  margin: 8px 0 0;
}

.luck-panel {
  margin-top: 14px;
  padding: 18px;
  background: rgba(25, 13, 15, 0.62);
  border: 1px solid var(--line);
}

.luck-panel .workspace-head {
  margin-bottom: 12px;
}

.luck-panel h3 {
  margin: 0;
  color: var(--gold-light);
}

.luck-panel p {
  color: var(--muted);
  margin: 8px 0 0;
}

.paywall {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 18px;
  margin-top: 14px;
  padding: 20px;
}

.paywall p {
  color: var(--muted);
}

.report-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
  list-style: none;
}

.report-preview li {
  padding: 8px 10px;
  background: rgba(199, 154, 66, 0.16);
  color: var(--gold-light);
  font-size: 13px;
}

.pay-card {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
  background: var(--blueblack);
  color: var(--white);
}

.pay-card strong {
  color: var(--gold);
  font-size: 24px;
}

.pay-card button {
  background: transparent;
  color: #d8c8a9;
  border-color: rgba(255, 250, 242, 0.24);
  cursor: pointer;
}

.xuanjian-confirm {
  margin-top: 14px;
  padding: 20px;
  background: rgba(25, 13, 15, 0.72);
  border: 1px solid var(--line);
}

.service-boundary-confirm {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 16px 0;
  padding: 14px 16px;
  background: rgba(141, 23, 29, 0.14);
  border: 1px solid rgba(245, 217, 145, 0.24);
  color: var(--muted);
  cursor: pointer;
}

.service-boundary-confirm input {
  width: 16px;
  height: 16px;
  margin: 5px 0 0;
  accent-color: var(--gold);
}

.service-boundary-confirm a {
  color: var(--gold-light);
  text-decoration: underline;
}

.confirm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.confirm-grid div {
  min-height: 92px;
  padding: 14px;
  background: rgba(245, 217, 145, 0.08);
  border: 1px solid rgba(245, 217, 145, 0.18);
}

.confirm-grid span,
.confirm-grid strong {
  display: block;
}

.confirm-grid span {
  color: var(--muted);
  font-size: 12px;
}

.confirm-grid strong {
  color: var(--gold-light);
  margin-top: 8px;
}

.profile-page {
  min-height: 520px;
}

.saved-list {
  display: grid;
  gap: 14px;
}

.empty-library,
.saved-card {
  background: rgba(36, 17, 18, 0.88);
  border: 1px solid var(--line);
  padding: 22px;
}

.empty-library p,
.saved-card p {
  color: var(--muted);
}

.saved-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.saved-card h3 {
  margin: 0;
  font-size: 22px;
}

.saved-card header p {
  margin: 4px 0 0;
}

.saved-pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.saved-pillars span {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: rgba(245, 217, 145, 0.09);
  color: var(--gold-light);
  font-weight: 700;
  text-align: center;
}

.saved-pillars strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
}

.archive-chart-table {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
  overflow: hidden;
  font-size: 13px;
}

.archive-chart-table th,
.archive-chart-table td {
  padding: 10px 8px;
  border: 1px solid rgba(245, 217, 145, 0.14);
  text-align: center;
}

.archive-chart-table th {
  color: var(--gold-light);
  background: rgba(83, 12, 19, 0.42);
  font-weight: 700;
}

.archive-chart-table td {
  color: var(--ink);
  background: rgba(245, 217, 145, 0.045);
}

.archive-insight-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.archive-insight-grid div,
.archive-module-row {
  padding: 12px;
  background: rgba(245, 217, 145, 0.06);
  border: 1px solid rgba(245, 217, 145, 0.14);
}

.archive-insight-grid span,
.archive-module-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.archive-insight-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--gold-light);
}

.element-bars {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.element-bars div {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.element-bars i {
  height: 8px;
  background:
    linear-gradient(90deg, rgba(215, 174, 97, 0.86), rgba(141, 23, 29, 0.72)) 0 / var(--score) 100% no-repeat,
    rgba(245, 217, 145, 0.09);
}

.element-bars strong {
  color: var(--gold-light);
  text-align: right;
}

.archive-module-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.archive-module-row span {
  margin-right: 4px;
}

.archive-module-row strong {
  padding: 4px 9px;
  background: rgba(141, 23, 29, 0.24);
  border: 1px solid rgba(245, 217, 145, 0.14);
  color: var(--gold-light);
  font-size: 12px;
}

.saved-card small {
  color: var(--muted);
}

.account-grid,
.message-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.auth-panel,
.auth-rules,
.admin-tile {
  display: grid;
  gap: 14px;
  padding: 22px;
  background: rgba(36, 17, 18, 0.88);
  border: 1px solid var(--line);
}

a.admin-tile {
  color: inherit;
  text-decoration: none;
}

a.admin-tile:hover {
  border-color: rgba(245, 217, 145, 0.55);
  background: rgba(48, 22, 22, 0.92);
}

.auth-panel p,
.auth-rules li,
.admin-tile p {
  color: var(--muted);
}

.auth-panel .invite-referrer-note {
  display: block;
  margin-top: -6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.register-bonus-banner {
  display: grid;
  gap: 4px;
  padding: 14px 15px;
  color: #f4e8c1;
  border: 1px solid rgba(245, 217, 145, 0.58);
  border-left: 4px solid var(--gold-light);
  background: linear-gradient(100deg, rgba(99, 37, 30, 0.8), rgba(44, 25, 24, 0.56));
}

.register-bonus-banner span { color: var(--gold-light); font-size: 12px; }
.register-bonus-banner strong { color: #fff1c9; font-family: Georgia, "Times New Roman", serif; font-size: 22px; }
.register-bonus-banner strong b { color: #ffe2a0; font-size: 28px; }
.register-bonus-banner small { color: rgba(255, 242, 210, 0.74); font-size: 12px; line-height: 1.55; }

.auth-rules ul {
  margin: 0;
  padding-left: 20px;
}

.account-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.account-panel,
.quota-grid article {
  display: grid;
  gap: 12px;
  padding: 22px;
  background: rgba(36, 17, 18, 0.88);
  border: 1px solid var(--line);
}

.account-panel {
  cursor: pointer;
}

.account-profile-card {
  cursor: default;
}

.account-panel:hover,
.account-panel.active {
  border-color: rgba(245, 217, 145, 0.55);
  background: rgba(48, 22, 22, 0.92);
}

.account-profile-card:hover {
  border-color: var(--line);
  background: rgba(36, 17, 18, 0.88);
}

.account-panel span {
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 800;
}

.account-panel h3 {
  margin: 0;
  font-size: 22px;
}

.account-panel p,
.account-panel dd,
.quota-grid span {
  color: var(--muted);
}

.account-panel dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.account-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(245, 217, 145, 0.12);
  padding-bottom: 8px;
}

.account-panel dt,
.account-panel dd {
  margin: 0;
}

.inline-profile-form {
  display: grid;
  gap: 10px;
}

.inline-profile-form label,
.inline-profile-form div {
  display: grid;
  gap: 6px;
}

.inline-profile-form label span,
.inline-profile-form div span {
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 800;
}

.inline-profile-form strong {
  color: var(--text);
  font-size: 15px;
}

.archive-editor {
  margin-top: 16px;
}

.archive-editor textarea {
  width: 100%;
  resize: vertical;
}

.admin-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.admin-search label {
  display: grid;
  gap: 6px;
}

.admin-search span {
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 800;
}

.admin-user-edit-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.admin-user-edit-form .btn {
  align-self: end;
}

.readonly-field {
  display: grid;
  gap: 6px;
  min-height: 58px;
  padding: 10px 12px;
  background: rgba(245, 217, 145, 0.06);
  border: 1px solid rgba(245, 217, 145, 0.14);
}

.readonly-field span {
  color: var(--muted);
  font-size: 13px;
}

.readonly-field strong {
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 700;
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
}

.mini-table th,
.mini-table td {
  padding: 8px 0;
  border-bottom: 1px solid rgba(245, 217, 145, 0.12);
  text-align: left;
}

.quota-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quota-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.quota-list li {
  display: grid;
  grid-template-columns: minmax(120px, 180px) 1fr;
  gap: 18px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.quota-list strong {
  color: var(--gold);
  font-size: 15px;
}

.quota-list span {
  color: var(--muted);
}

.quota-grid strong,
.quota-grid span {
  display: block;
}

.session-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px 22px;
  background: rgba(17, 20, 24, 0.82);
  border: 1px solid var(--line);
}

.session-bar span,
.session-bar small {
  color: var(--muted);
}

.session-bar strong {
  display: block;
  color: var(--gold-light);
  font-size: 24px;
}

.session-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.panel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.panel-tabs button {
  min-height: 40px;
  padding: 8px 14px;
  color: var(--muted);
  background: rgba(245, 217, 145, 0.07);
  border: 1px solid rgba(245, 217, 145, 0.18);
  cursor: pointer;
}

.panel-tabs button.active {
  color: var(--paper);
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.workspace-panel {
  margin-top: 18px;
  padding: 22px;
  background: rgba(17, 20, 24, 0.72);
  border: 1px solid var(--line);
  scroll-margin-top: 92px;
}

.workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.workspace-head h3 {
  margin: 0;
  font-size: 26px;
}

.workspace-head p,
.workspace-panel p,
.status-line {
  color: var(--muted);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(245, 217, 145, 0.14);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--gold-light);
  font-size: 12px;
}

.data-table button {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--gold-light);
  background: rgba(245, 217, 145, 0.08);
  border: 1px solid rgba(245, 217, 145, 0.2);
  cursor: pointer;
}

.table-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--gold-light);
  background: rgba(245, 217, 145, 0.08);
  border: 1px solid rgba(245, 217, 145, 0.2);
}

.muted-link {
  color: var(--muted);
  cursor: not-allowed;
}

.warn-text {
  color: #f2b2a4;
}

.danger-link {
  color: #f2b2a4;
  border-color: rgba(210, 58, 47, 0.44);
  background: rgba(210, 58, 47, 0.12);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label {
  display: grid;
  gap: 6px;
}

.form-grid span {
  color: var(--muted);
  font-size: 13px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-strip div {
  padding: 14px;
  background: rgba(245, 217, 145, 0.07);
  border: 1px solid rgba(245, 217, 145, 0.14);
}

.summary-strip strong,
.summary-strip span {
  display: block;
}

.summary-strip strong {
  color: var(--gold-light);
  font-size: 22px;
}

.summary-strip span {
  color: var(--muted);
}

.identity-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.identity-card,
.edit-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: rgba(245, 217, 145, 0.07);
  border: 1px solid rgba(245, 217, 145, 0.14);
}

.identity-card span,
.edit-card span {
  color: var(--muted);
}

.identity-card strong {
  color: var(--gold-light);
  font-size: 34px;
}

.level-table {
  margin-top: 12px;
}

.message-list {
  display: grid;
  gap: 14px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-auth {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-tile span {
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 800;
}

.admin-tile strong {
  font-size: 22px;
}

.admin-tile.active {
  border-color: rgba(245, 217, 145, 0.55);
  background: rgba(48, 22, 22, 0.92);
}

.admin-message {
  min-height: 24px;
  margin: -40px clamp(20px, 5vw, 80px) 24px;
  color: var(--muted);
}

.admin-message[data-type="success"] {
  color: #c9f0b8;
}

.admin-message[data-type="error"] {
  color: #ffb3a8;
}

.password-panel {
  margin-top: 18px;
  max-width: 520px;
}

.xuanjian-cover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 28px;
  padding: clamp(42px, 6vw, 76px) clamp(20px, 5vw, 80px);
  background:
    radial-gradient(circle at 74% 30%, rgba(245, 217, 145, 0.12), transparent 30%),
    linear-gradient(120deg, rgba(83, 12, 19, 0.94), rgba(16, 19, 22, 0.78));
  border-bottom: 1px solid var(--line);
}

.xuanjian-meta {
  display: grid;
  gap: 8px;
  align-self: end;
  padding: 22px;
  background: rgba(17, 20, 24, 0.9);
  border: 1px solid var(--line);
}

.xuanjian-meta span {
  color: var(--muted);
  font-size: 12px;
}

.xuanjian-meta strong {
  color: var(--gold-light);
  overflow-wrap: anywhere;
}

.xuanjian-document {
  max-width: 980px;
  margin: 0 auto;
  padding: 44px 20px 80px;
}

.xuanjian-notice,
.xuanjian-chart,
.xuanjian-section {
  margin-bottom: 18px;
  padding: 24px;
  background: rgba(36, 17, 18, 0.88);
  border: 1px solid var(--line);
}

.xuanjian-notice p,
.xuanjian-section p,
.xuanjian-advice li {
  color: var(--muted);
}

.xuanjian-advice {
  margin-top: 16px;
  padding: 16px 18px;
  background: rgba(141, 23, 29, 0.18);
  border: 1px solid rgba(245, 217, 145, 0.2);
  border-left: 3px solid var(--gold);
}

.xuanjian-advice strong {
  display: block;
  margin-bottom: 8px;
  color: var(--gold-light);
}

.xuanjian-advice ul {
  margin: 0;
  padding-left: 20px;
}

.xuanjian-advice li + li {
  margin-top: 6px;
}

.xuanjian-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.xuanjian-summary div {
  padding: 16px;
  background: rgba(245, 217, 145, 0.07);
  border: 1px solid rgba(245, 217, 145, 0.14);
}

.xuanjian-summary span,
.xuanjian-summary strong {
  display: block;
}

.xuanjian-summary span {
  color: var(--muted);
  font-size: 12px;
}

.xuanjian-summary strong {
  color: var(--gold-light);
  margin-top: 6px;
}

.xuanjian-section h2,
.xuanjian-chart h2 {
  margin-bottom: 16px;
}

.xuanjian-section article {
  padding: 16px 0;
  border-top: 1px solid rgba(245, 217, 145, 0.14);
}

.xuanjian-section h3 {
  margin: 0 0 8px;
  color: var(--gold-light);
}

@media (max-width: 900px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header {
    display: flex;
  }

  .session-bar,
  .session-actions,
  .workspace-head {
    align-items: stretch;
    flex-direction: column;
  }

  .hero,
  .page-hero,
  .split,
  .bazi-workspace,
  .account-grid,
  .boundary-grid,
  .message-layout,
  .account-dashboard,
  .quota-grid,
  .summary-strip,
  .form-grid,
    .identity-layout,
    .admin-auth,
    .admin-grid,
    .credit-layout,
    .xuanjian-cover,
    .xuanjian-summary {
    grid-template-columns: 1fr;
  }

  .module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jieqi-workbench-head { grid-template-columns: 1fr; }
  .jieqi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tcm-controls { grid-template-columns: 1fr; }
  .tcm-reader-hero, .tcm-reader-shell { grid-template-columns: 1fr; }
  .tcm-reader-sidebar { border-right: 0; border-bottom: 1px solid rgba(154, 202, 124, 0.3); }
  .tcm-reader-chapters { max-height: 260px; }
}

@media (max-width: 620px) {
  .top-nav,
  .nav-account {
    justify-content: flex-start;
  }

  .nav-account,
  .nav-login,
  .nav-user {
    width: 100%;
  }

  .nav-user {
    align-items: flex-start;
  }

  .module-grid,
  .daily-grid,
  .pillar-grid,
  .analysis-grid,
  .huangli-columns,
  .dual-form,
  .name-option-grid,
  .compatibility-band,
  .marriage-pillar-pair,
  .ten-god-grid,
  .relationship-summary,
  .insight-panel,
  .paywall,
  .report-preview,
  .saved-pillars,
  .tiers {
    grid-template-columns: 1fr;
  }

  .field-grid,
  .field-grid.four {
    grid-template-columns: 1fr;
  }

  .date-selects {
    grid-template-columns: 1fr;
  }

  .yao-row {
    grid-template-columns: 1fr;
  }

  .roadmap li {
    grid-template-columns: 1fr;
  }

  .jieqi-current { grid-template-columns: 1fr; }
  .jieqi-current-art { width: 130px; }
  .jieqi-live-status { grid-template-columns: 1fr; gap: 8px; }
  .jieqi-live-status p { grid-column: auto; }
  .jieqi-facts, .jieqi-grid { grid-template-columns: 1fr; }
  .jieqi-yearbar { grid-template-columns: 1fr; align-items: stretch; }
  .jieqi-method-note { grid-template-columns: 1fr; gap: 6px; }
  .tcm-library-head, .tcm-boundary-note, .tcm-topic-row, .tcm-method-note { grid-template-columns: 1fr; gap: 8px; }
  .tcm-count { justify-items: start; }.tcm-book-catalog { grid-template-columns: 1fr; }.tcm-results { grid-template-columns: 1fr; }.tcm-entry { min-height: 0; }.tcm-entry blockquote { font-size: 17px; }
  .tcm-reader-page { padding: 20px 14px 46px; }.tcm-reader-hero { padding: 22px; }.tcm-reader-boundary { grid-template-columns: 1fr; gap: 5px; }.tcm-reader-toolbar { grid-template-columns: 1fr; }.tcm-index-button { width: 100%; }.tcm-reader-content { padding: 22px 16px; }.tcm-reader-paragraph { font-size: 17px; line-height: 1.95; text-align: left; }.tcm-reader-notes { grid-template-columns: 1fr; }
}

@media print {
  body {
    background: #fff;
    color: #221714;
  }

  body::before,
  .no-print {
    display: none !important;
  }

  .xuanjian-cover,
  .xuanjian-notice,
  .xuanjian-chart,
  .xuanjian-section,
  .xuanjian-summary div {
    background: #fff;
    color: #221714;
    border-color: #d8c8a9;
    box-shadow: none;
  }

  .xuanjian-cover {
    padding: 24px 0;
  }

  .xuanjian-document {
    max-width: none;
    padding: 0;
  }

  .xuanjian-section h3,
  .xuanjian-summary strong,
  .pillar-grid strong {
    color: #5d1519;
  }
}
