@view-transition { navigation: auto; }

:root {
  --paper: #f0ede5;
  --paper-bright: #f8f6f0;
  --ink: #1b1a17;
  --ink-soft: #34322d;
  --muted: #77736a;
  --line: #c9c3b7;
  --line-dark: #8e897f;
  --red: #a13a2d;
  --red-dark: #74261f;
  --green: #315b49;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --serif: "Songti TC", "Noto Serif TC", "PMingLiU", "MingLiU", serif;
  --ease-out: cubic-bezier(.22, .68, 0, 1);
  --max: 1480px;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); font-family: var(--sans); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .2; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E"); z-index: 50; }
button, input, textarea, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
button { border: 0; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--red); color: var(--paper-bright); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 4px; }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; transform: translateY(-160%); padding: 8px 12px; background: var(--ink); color: var(--paper); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: relative; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 78px; padding: 0 clamp(20px, 3.2vw, 52px); border-bottom: 1px solid var(--line-dark); background: rgba(240, 237, 229, .96); }
.brand { justify-self: start; display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand__name { font-family: var(--serif); font-size: 23px; letter-spacing: .12em; }
.brand__mark { display: grid; grid-template-columns: repeat(2, 7px); grid-template-rows: repeat(2, 7px); gap: 2px; width: 16px; height: 16px; transform: rotate(45deg); }
.brand__mark i { display: block; background: var(--ink); transition: transform .28s var(--ease-out), background .28s; }
.brand:hover .brand__mark i:nth-child(2), .brand:focus-visible .brand__mark i:nth-child(2) { transform: translate(3px, -3px); background: var(--red); }
.site-status { display: flex; gap: 22px; margin: 0; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.site-nav { justify-self: end; display: flex; align-items: center; gap: clamp(14px, 2.2vw, 34px); font-size: 13px; }
.site-nav a { position: relative; padding: 8px 0; color: var(--muted); text-decoration: none; }
.site-nav a::after { content: ""; position: absolute; right: 0; bottom: 4px; left: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .25s var(--ease-out); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.site-footer { display: flex; justify-content: space-between; gap: 30px; padding: 24px clamp(20px, 3.2vw, 52px) 34px; border-top: 1px solid var(--line-dark); color: var(--muted); font-size: 12px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--ink); }
.eyebrow, .ledger-label, .preview-method, .result-meta { margin: 0; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.back-link { display: inline-block; color: var(--muted); font-size: 12px; text-decoration: none; transition: color .2s, transform .2s; }
.back-link:hover { color: var(--ink); transform: translateX(-4px); }
.text-link, .text-button { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid currentColor; background: transparent; color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.text-link::after { content: "↗"; color: var(--red); }
.primary-action { display: inline-flex; align-items: center; justify-content: space-between; gap: 70px; min-width: 230px; padding: 15px 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper-bright); font-weight: 600; text-decoration: none; transition: background .22s, color .22s, transform .22s var(--ease-out); }
.primary-action:hover { background: var(--red-dark); border-color: var(--red-dark); transform: translateY(-2px); }
.primary-action--button { width: 100%; cursor: pointer; }
.primary-action--button:disabled { cursor: wait; opacity: .6; transform: none; }
.status-word { align-self: start; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.status-word[data-status="available"] { color: var(--red); }
.status-word[data-status="soon"] { color: var(--muted); }

/* Opening workbench */
.opening-page { max-width: var(--max); margin: 0 auto; padding: clamp(38px, 5vw, 76px) clamp(20px, 3.2vw, 52px) 70px; }
.opening-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(410px, .82fr); gap: clamp(46px, 7vw, 110px); align-items: start; }
.opening-copy { max-width: 720px; padding-bottom: clamp(30px, 4vw, 52px); }
.opening-copy h1 { margin: 7px 0 24px; font-family: var(--serif); font-size: clamp(50px, 6.3vw, 92px); font-weight: 500; line-height: .94; letter-spacing: -.055em; }
.opening-copy > p:last-child { max-width: 650px; margin: 0; color: var(--ink-soft); font-size: 15px; }
.opening-form { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.opening-field, .opening-number-field { margin: 0; padding: 24px 0 28px; border: 0; border-bottom: 1px solid var(--line-dark); }
.opening-field__head { display: flex; justify-content: space-between; gap: 24px; align-items: baseline; }
.opening-field__head label, .opening-field__head legend { padding: 0; font-weight: 650; }
.opening-field__head span { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.opening-form textarea { min-height: 128px; margin-top: 10px; padding: 10px 0; font-size: clamp(19px, 1.7vw, 25px); }
.luoshu-picker { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 440px; margin-top: 18px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.luoshu-picker label { min-width: 0; cursor: pointer; }
.luoshu-picker input { position: absolute; opacity: 0; pointer-events: none; }
.luoshu-picker span { display: flex; align-items: baseline; justify-content: space-between; min-height: 63px; padding: 10px 12px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transition: background .2s, color .2s; }
.luoshu-picker strong { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.luoshu-picker small { color: var(--muted); font-size: 9px; }
.luoshu-picker input:checked + span { background: var(--ink); color: var(--paper-bright); }
.luoshu-picker input:checked + span small { color: #bdb8ac; }
.luoshu-picker input:focus-visible + span { outline: 2px solid var(--red); outline-offset: -4px; }
.opening-field-note { max-width: 520px; margin: 11px 0 0; color: var(--muted); font-size: 10px; }
.opening-submit { display: flex; justify-content: space-between; width: 100%; padding: 18px 0; border-bottom: 1px solid var(--ink); background: transparent; font-size: 15px; font-weight: 700; cursor: pointer; transition: padding .22s var(--ease-out), color .22s; }
.opening-submit:hover { padding-right: 12px; padding-left: 12px; color: var(--red); }
.opening-submit:disabled { opacity: .5; cursor: wait; }
.opening-privacy { margin: 12px 0 18px; color: var(--muted); font-size: 10px; }
.opening-preview { position: sticky; top: 28px; padding-left: clamp(28px, 4vw, 58px); border-left: 1px solid var(--line-dark); }
.opening-preview__head { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 16px; }
.opening-preview__head h2 { margin: 2px 0 0; font-family: var(--serif); font-size: clamp(32px, 3.6vw, 52px); font-weight: 500; line-height: 1; }
.opening-preview__head > span { color: var(--red); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.opening-plate .atlas-palace { min-height: clamp(88px, 8vw, 122px); }
.opening-preview__facts { margin: 20px 0 0; border-top: 1px solid var(--line-dark); }
.opening-preview__facts div { display: grid; grid-template-columns: 82px 1fr; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.opening-preview__facts dt { color: var(--muted); }.opening-preview__facts dd { margin: 0; }
.opening-process { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(56px, 7vw, 100px); border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.opening-process p { display: flex; gap: 16px; margin: 0; padding: 15px 18px; font-size: 11px; }
.opening-process p + p { border-left: 1px solid var(--line); }
.opening-process span { color: var(--red); font-size: 9px; }

/* Dedicated chart page */
.chart-page { max-width: var(--max); min-height: calc(100vh - 78px); margin: 0 auto; padding: 0 clamp(20px, 3.2vw, 52px) 84px; }
.chart-loading { display: grid; min-height: calc(100vh - 160px); place-content: center; justify-items: center; gap: 26px; text-align: center; }
.chart-loading p { display: flex; flex-direction: column; margin: 0; }.chart-loading p span { color: var(--muted); font-size: 11px; }
.chart-masthead { display: grid; grid-template-columns: minmax(360px, .8fr) minmax(0, 1.2fr); gap: clamp(50px, 7vw, 120px); align-items: end; padding: clamp(50px, 6vw, 86px) 0 42px; }
.chart-masthead h1 { margin: 5px 0 0; font-family: var(--serif); font-size: clamp(52px, 6.7vw, 96px); font-weight: 500; line-height: .92; letter-spacing: -.055em; }
.chart-question { margin: 0 0 .25em; padding-left: 26px; border-left: 2px solid var(--red); font-family: var(--serif); font-size: clamp(21px, 2.4vw, 34px); line-height: 1.45; }
.chart-meta-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.chart-meta-strip p { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 14px 18px; }
.chart-meta-strip p + p { border-left: 1px solid var(--line); }
.chart-meta-strip span { color: var(--muted); font-size: 9px; letter-spacing: .11em; }.chart-meta-strip strong { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.chart-stage { display: grid; grid-template-columns: minmax(520px, 1.3fr) minmax(280px, .7fr); gap: clamp(48px, 7vw, 110px); align-items: start; padding: clamp(52px, 6vw, 86px) 0; }
.chart-figure { min-width: 0; margin: 0; }.chart-section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 14px; }.chart-section-head h2 { margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 500; }
.plate-orbit { display: grid; grid-template-columns: 38px repeat(3, minmax(0, 1fr)) 38px; grid-template-rows: 38px repeat(3, minmax(0, 1fr)) 38px; aspect-ratio: 1 / 1; }
.chart-plate { grid-area: 2 / 2 / 5 / 5; width: 100%; height: 100%; }
.chart-plate .atlas-palace { min-height: 0; padding: clamp(7px, 1vw, 13px); }
.chart-plate .atlas-palace__main { font-size: clamp(18px, 2vw, 29px); }
.chart-plate .atlas-palace__detail { font-size: clamp(8px, .75vw, 11px); }.chart-plate .atlas-palace__stems { font-size: clamp(7px, .68vw, 10px); }
.branch-marker { display: grid; place-self: center; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink-soft); font-family: var(--serif); font-size: 13px; }
.branch-si { grid-area: 1 / 2; }.branch-wu { grid-area: 1 / 3; }.branch-wei { grid-area: 1 / 4; }
.branch-shen { grid-area: 2 / 5; }.branch-you { grid-area: 3 / 5; }.branch-xu { grid-area: 4 / 5; }
.branch-hai { grid-area: 5 / 4; }.branch-zi { grid-area: 5 / 3; }.branch-chou { grid-area: 5 / 2; }
.branch-yin { grid-area: 4 / 1; }.branch-mao { grid-area: 3 / 1; }.branch-chen { grid-area: 2 / 1; }
.chart-figure figcaption { max-width: 760px; margin: 12px 38px 0; color: var(--muted); font-size: 10px; }
.chart-ledger { position: sticky; top: 28px; padding-top: 2px; border-top: 1px solid var(--ink); }
.chart-ledger__intro { padding: 20px 0 24px; }.chart-ledger__intro h2 { margin: 5px 0 12px; font-family: var(--serif); font-size: 30px; font-weight: 500; }.chart-ledger__intro > p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.chart-facts { margin: 0; border-top: 1px solid var(--line-dark); }.chart-facts div { display: grid; grid-template-columns: 82px 1fr; gap: 18px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 12px; }.chart-facts dt { color: var(--muted); }.chart-facts dd { margin: 0; }
.chart-next { display: flex; justify-content: space-between; gap: 40px; align-items: end; padding-top: 28px; border-top: 1px solid var(--ink); }.chart-next > div { display: flex; gap: 28px; align-items: center; }.chart-next p { max-width: 290px; margin: 0; color: var(--muted); font-size: 10px; }

/* Home atlas */
.atlas-page { max-width: var(--max); margin: 0 auto; padding: clamp(34px, 5vw, 76px) clamp(20px, 3.2vw, 52px) 70px; }
.atlas-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, 35%); grid-template-areas: "eyebrow copy" "title copy"; align-items: end; gap: 4px clamp(30px, 6vw, 110px); padding-bottom: clamp(32px, 4vw, 58px); }
.atlas-intro .eyebrow { grid-area: eyebrow; }
.atlas-intro h1 { grid-area: title; margin: 0; font-family: var(--serif); font-size: clamp(48px, 6vw, 88px); font-weight: 500; line-height: .98; letter-spacing: -.045em; }
.atlas-intro > p:last-child { grid-area: copy; margin: 0 0 .35em; color: var(--ink-soft); font-size: 15px; }
.atlas-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(370px, .85fr); gap: clamp(34px, 5vw, 84px); align-items: start; }
.route-index-wrap { min-width: 0; }
.index-heading { display: grid; grid-template-columns: 1fr 190px 84px; padding: 0 0 10px 76px; color: var(--muted); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.route-index { border-bottom: 1px solid var(--line-dark); }
.loading-copy, .load-error { min-height: 90px; margin: 0; padding: 30px 0; color: var(--muted); }
.route-row { position: relative; display: grid; grid-template-columns: 56px minmax(190px, 1fr) 190px 84px; align-items: center; min-height: 94px; border-top: 1px solid var(--line-dark); color: inherit; text-decoration: none; transition: background .32s var(--ease-out), color .32s var(--ease-out), padding .32s var(--ease-out); }
.route-row::before { content: ""; position: absolute; top: -1px; bottom: 0; left: 0; width: 3px; background: var(--red); transform: scaleY(0); transform-origin: top; transition: transform .32s var(--ease-out); }
.route-row:hover, .route-row:focus-visible, .route-row.is-active { padding-right: 14px; padding-left: 14px; background: var(--ink); color: var(--paper-bright); }
.route-row.is-active::before { transform: scaleY(1); }
.route-row__number { align-self: start; padding-top: 23px; color: var(--muted); font-family: var(--serif); font-size: 12px; }
.route-row__title-wrap { display: flex; flex-direction: column; justify-content: center; }
.route-row__group { color: var(--muted); font-size: 9px; letter-spacing: .11em; }
.route-row__name { font-family: var(--serif); font-size: clamp(24px, 2.15vw, 34px); font-weight: 500; line-height: 1.25; letter-spacing: -.02em; }
.route-row__method { padding-right: 16px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.route-row__status { justify-self: end; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; }
.route-row[data-status="available"] .route-row__status { color: var(--red); }
.route-row:hover .route-row__number, .route-row:hover .route-row__group, .route-row:hover .route-row__method, .route-row:hover .route-row__status,
.route-row.is-active .route-row__number, .route-row.is-active .route-row__group, .route-row.is-active .route-row__method { color: #bdb8ac; }
.route-row[data-status="available"]:hover .route-row__status, .route-row[data-status="available"].is-active .route-row__status { color: #e27668; }
.route-preview { position: sticky; top: 28px; padding-top: 2px; }
.route-preview__head { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 16px; }
.route-preview__head h2 { margin: 2px 0 0; font-family: var(--serif); font-size: clamp(28px, 3vw, 44px); font-weight: 500; line-height: 1.1; }
.route-preview__summary { min-height: 3.3em; margin: 17px 0 13px; color: var(--ink-soft); font-size: 13px; }
.method-line { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 68px; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.method-line p { margin: 0; padding: 15px 0; color: var(--muted); font-size: 10px; letter-spacing: .11em; text-align: center; }
.method-line p + p { border-left: 1px solid var(--line); }

/* Shared chart plate */
.plate-figure { margin: 0; }
.plate-figure figcaption { margin-top: 9px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.atlas-plate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); background: var(--paper-bright); transition: opacity .18s, transform .32s var(--ease-out); }
.atlas-plate.is-changing { opacity: .45; transform: translateY(5px); }
.atlas-palace { position: relative; display: flex; flex-direction: column; min-height: clamp(100px, 9.2vw, 138px); padding: 10px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); overflow: hidden; }
.atlas-palace__head { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.atlas-palace__main { margin: auto 0 2px; font-family: var(--serif); font-size: clamp(17px, 1.7vw, 25px); font-weight: 500; line-height: 1; }
.atlas-palace__detail, .atlas-palace__stems { color: var(--muted); font-size: 9px; line-height: 1.4; }
.atlas-palace__stems { min-height: 1.4em; }
.atlas-palace--center { background: #e4dfd4; }
.atlas-palace--focus { box-shadow: inset 0 0 0 3px var(--red); }
.atlas-palace__void { position: absolute; top: 27px; right: 8px; color: var(--red); font-size: 9px; font-weight: 700; }
.atlas-plate[data-plate-mode="structure"] .atlas-palace__main { color: var(--red-dark); }

/* Route detail */
.route-page, .start-page, .result-page, .info-page { max-width: var(--max); margin: 0 auto; padding: 28px clamp(20px, 3.2vw, 52px) 80px; }
.route-hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .72fr); gap: clamp(50px, 8vw, 130px); align-items: end; padding: clamp(42px, 6vw, 88px) 0 64px; }
.route-title-line { display: flex; gap: 18px; align-items: flex-start; margin: 12px 0 26px; }
.shared-route-number { flex: none; padding-top: 10px; color: var(--red); font-family: var(--serif); font-size: 13px; }
.route-title-line h1 { margin: 0; font-family: var(--serif); font-size: clamp(58px, 7.8vw, 116px); font-weight: 500; line-height: .9; letter-spacing: -.055em; }
.route-lead { max-width: 680px; margin: 0 0 16px; font-family: var(--serif); font-size: clamp(22px, 2.2vw, 33px); line-height: 1.35; }
.route-description { max-width: 670px; margin: 0; color: var(--muted); }
.route-action-line { margin-top: 34px; }
.plate-meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 12px; color: var(--muted); font-size: 10px; }
.soon-message { display: grid; grid-template-columns: 100px 1fr; max-width: 560px; padding-top: 15px; border-top: 1px solid var(--line-dark); }
.soon-message strong { color: var(--red); }
.soon-message span { color: var(--muted); font-size: 13px; }
.route-ledger { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.route-ledger > div { min-height: 210px; padding: 24px clamp(16px, 2vw, 28px) 30px; }
.route-ledger > div + div { border-left: 1px solid var(--line); }
.plain-list { margin: 26px 0 0; padding: 0; list-style: none; }
.plain-list li { position: relative; padding: 8px 0 8px 18px; border-top: 1px solid var(--line); font-size: 13px; }
.plain-list li::before { content: "·"; position: absolute; left: 3px; color: var(--red); }

/* Start form */
.start-heading { display: grid; grid-template-columns: 1fr minmax(280px, 36%); gap: 60px; align-items: end; padding: clamp(42px, 5vw, 72px) 0 38px; }
.start-heading h1 { margin: 4px 0 0; font-family: var(--serif); font-size: clamp(42px, 4.7vw, 68px); font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.start-heading > p { margin: 0; color: var(--muted); }
.start-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(50px, 7vw, 110px); align-items: start; }
.question-form { border-bottom: 1px solid var(--line-dark); }
.form-step { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 24px; padding: 32px 0 38px; border-top: 1px solid var(--line-dark); }
.form-step h2 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 500; }
.step-heading { display: flex; flex-direction: column; gap: 7px; }
.step-heading > span { color: var(--red); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.field { min-width: 0; }
.field label, .field legend { color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.field legend { padding: 0; }
.field-heading { display: flex; justify-content: space-between; gap: 20px; }
.field-heading span, .field-note { color: var(--muted); font-size: 11px; }
textarea, select, input[type="datetime-local"] { width: 100%; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; }
textarea { display: block; min-height: 176px; margin-top: 12px; padding: 16px 0; resize: vertical; font-family: var(--serif); font-size: clamp(19px, 1.85vw, 26px); line-height: 1.5; }
textarea::placeholder { color: #9b968d; }
select, input[type="datetime-local"] { height: 48px; padding: 0; }
.question-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.question-examples button { padding: 5px 0; border-bottom: 1px solid var(--line-dark); background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.question-examples button:hover { color: var(--red); border-color: var(--red); }
.form-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; }
.time-field, .number-field { margin: 0; padding: 0; border: 0; }
.plain-options { display: flex; min-height: 48px; margin-top: 8px; border-bottom: 1px solid var(--ink); }
.plain-options label { display: flex; flex: 1; align-items: center; gap: 7px; cursor: pointer; }
.plain-options input { accent-color: var(--red); }
.custom-time { margin-top: 18px; }
.custom-time label { display: block; margin-bottom: 5px; }
.number-options { display: grid; grid-template-columns: 1.5fr repeat(9, 1fr); margin-top: 22px; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.number-options label { min-width: 0; cursor: pointer; }
.number-options input { position: absolute; opacity: 0; }
.number-options span { display: grid; min-height: 54px; place-items: center; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-size: 12px; transition: background .2s, color .2s; }
.number-options input:checked + span { background: var(--ink); color: var(--paper-bright); }
.number-options input:focus-visible + span { outline: 2px solid var(--red); outline-offset: -4px; }
.form-error { margin: 18px 0; padding: 13px 16px; border-left: 3px solid var(--red); background: #ead9d4; color: var(--red-dark); }
.submit-row { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: center; padding: 30px 0; border-top: 1px solid var(--line-dark); }
.submit-row p { margin: 0; color: var(--muted); font-size: 11px; }
.start-context { position: sticky; top: 28px; padding-top: 12px; border-top: 1px solid var(--ink); }
.start-context ol { margin: 24px 0; padding: 0; list-style: none; }
.start-context li { display: grid; grid-template-columns: 34px 1fr; padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px; }
.start-context li span { color: var(--red); font-size: 10px; }
.start-context > p:last-child { color: var(--muted); font-size: 12px; }
.loading-veil { position: fixed; z-index: 80; inset: 0; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 24px; background: rgba(240, 237, 229, .96); }
.loading-veil p { display: flex; flex-direction: column; align-items: center; margin: 0; }
.loading-veil p span { color: var(--muted); font-size: 12px; }
.loading-mark { display: grid; grid-template-columns: repeat(2, 24px); grid-template-rows: repeat(2, 24px); gap: 4px; transform: rotate(45deg); }
.loading-mark i { background: var(--ink); animation: loading-cell 1.2s var(--ease-out) infinite alternate; }
.loading-mark i:nth-child(2) { animation-delay: .16s; }.loading-mark i:nth-child(3) { animation-delay: .32s; }.loading-mark i:nth-child(4) { animation-delay: .48s; }
@keyframes loading-cell { to { transform: scale(.35); background: var(--red); } }

/* Results */
.result-masthead { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; padding: clamp(56px, 7vw, 100px) 0 32px; }
.result-masthead h1 { margin: 5px 0 18px; font-family: var(--serif); font-size: clamp(46px, 6vw, 86px); font-weight: 500; line-height: 1; letter-spacing: -.045em; }
.result-question { max-width: 880px; margin: 0; font-family: var(--serif); font-size: clamp(20px, 2.3vw, 32px); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 18px; }
.result-meta { padding: 12px 0; border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.verdict-section { display: grid; grid-template-columns: 230px 1fr; gap: 50px; padding: clamp(42px, 6vw, 84px) 0; border-bottom: 1px solid var(--line-dark); }
.verdict-label p { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.verdict-label strong { color: var(--red); font-family: var(--serif); font-size: 22px; font-weight: 500; }
.verdict-copy h2 { max-width: 900px; margin: 0; font-family: var(--serif); font-size: clamp(34px, 4.7vw, 70px); font-weight: 500; line-height: 1.08; letter-spacing: -.035em; }
.verdict-copy p { max-width: 820px; margin: 26px 0 0; color: var(--ink-soft); font-size: 16px; }
.signal-ledger { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line-dark); }
.signal-item { min-height: 290px; padding: 34px clamp(20px, 3vw, 44px) 40px; }
.signal-item + .signal-item { border-left: 1px solid var(--line); }
.signal-item__label { margin: 0 0 42px; color: var(--red); font-size: 10px; letter-spacing: .1em; }
.signal-item h2 { margin: 0 0 20px; font-family: var(--serif); font-size: clamp(23px, 2.4vw, 35px); font-weight: 500; line-height: 1.25; }
.signal-item > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.action-section { display: grid; grid-template-columns: 260px 1fr; gap: 60px; padding: 70px 0; border-bottom: 1px solid var(--line-dark); }
.section-intro p { margin: 0 0 7px; color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.section-intro h2 { margin: 0; font-family: var(--serif); font-size: clamp(24px, 2.7vw, 40px); font-weight: 500; line-height: 1.2; }
.action-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.action-item { display: grid; grid-template-columns: 50px 230px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.action-item__number { color: var(--red); font-size: 10px; }
.action-item strong { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.action-item p { margin: 0; color: var(--muted); font-size: 13px; }
.evidence-disclosure { border-bottom: 1px solid var(--line-dark); }
.evidence-disclosure summary { display: flex; justify-content: space-between; align-items: center; padding: 22px 0; cursor: pointer; list-style: none; }
.evidence-disclosure summary::-webkit-details-marker { display: none; }
.evidence-disclosure summary span { font-family: var(--serif); font-size: 24px; }
.evidence-disclosure summary small { color: var(--muted); }
.evidence-disclosure summary::after { content: "+"; margin-left: 20px; color: var(--red); }
.evidence-disclosure[open] summary::after { content: "−"; }
.evidence-body { border-top: 1px solid var(--line); }
.qimen-evidence { padding: 60px 0; }
.qimen-layout { display: grid; grid-template-columns: minmax(420px, .9fr) minmax(300px, .6fr); gap: clamp(40px, 6vw, 90px); margin-top: 34px; }
.result-plate .atlas-palace { min-height: clamp(110px, 10vw, 152px); }
.chart-summary h3 { margin: 0; font-family: var(--serif); font-size: clamp(25px, 3vw, 42px); font-weight: 500; }
.chart-summary > p { margin: 5px 0 30px; color: var(--muted); }
.fact-list { margin: 0; border-top: 1px solid var(--ink); }
.fact-list div { display: grid; grid-template-columns: 100px 1fr; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.fact-list dt { color: var(--muted); font-size: 11px; }
.fact-list dd { margin: 0; font-size: 13px; }
.system-row { display: grid; grid-template-columns: 260px 1fr; gap: 60px; padding: 52px 0; border-top: 1px solid var(--line); }
.hexagram-line { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 0; font-family: var(--serif); font-size: clamp(23px, 2.6vw, 37px); }
.source-line { color: var(--muted); font-size: 12px; }
.transmissions { border-top: 1px solid var(--ink); }
.transmission { display: grid; grid-template-columns: 160px 1fr; padding: 15px 0; border-bottom: 1px solid var(--line); }
.transmission__label { display: flex; gap: 12px; }
.transmission__label strong { color: var(--red); font-family: var(--serif); font-size: 18px; }.transmission__label span { color: var(--muted); font-size: 11px; }
.transmission p { margin: 0; }
.reflection-section { display: grid; grid-template-columns: 260px 1fr; gap: 60px; padding: 65px 0; }
.reflection-section h2 { margin: 8px 0 0; font-family: var(--serif); font-size: 34px; font-weight: 500; }
.reflection-section ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.reflection-section li { display: grid; grid-template-columns: 50px 1fr; padding: 18px 0; border-bottom: 1px solid var(--line); }
.reflection-section li span { color: var(--red); font-size: 10px; }.reflection-section li p { margin: 0; }
.boundary-note { display: flex; justify-content: space-between; gap: 30px; padding: 20px 0; border-top: 1px solid var(--line-dark); color: var(--muted); font-size: 11px; }
.boundary-note p { max-width: 900px; margin: 0; }.boundary-note a { color: var(--ink); }
.missing-result { max-width: 760px; padding: 100px 0; }
.missing-result h1 { margin: 8px 0 22px; font-family: var(--serif); font-size: clamp(42px, 5vw, 70px); font-weight: 500; line-height: 1.05; }
.missing-result p:not(.eyebrow) { color: var(--muted); }.missing-result .primary-action { margin-top: 25px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 70; padding: 10px 14px; background: var(--ink); color: var(--paper); font-size: 12px; }

/* Editorial info */
.info-masthead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .55fr); gap: 70px; align-items: end; padding: clamp(70px, 9vw, 140px) 0 70px; border-bottom: 1px solid var(--line-dark); }
.info-masthead .eyebrow { grid-column: 1 / -1; }
.info-masthead h1 { margin: 0; font-family: var(--serif); font-size: clamp(55px, 7vw, 105px); font-weight: 500; line-height: .95; letter-spacing: -.045em; }
.info-masthead > p:last-child { margin: 0; color: var(--ink-soft); }
.process-ledger, .boundary-ledger { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line-dark); }
.process-ledger > div, .boundary-ledger > div { min-height: 320px; padding: 30px clamp(18px, 2.4vw, 36px); }
.process-ledger > div + div, .boundary-ledger > div + div { border-left: 1px solid var(--line); }
.process-ledger span, .boundary-ledger span { color: var(--red); font-size: 10px; }
.process-ledger h2, .boundary-ledger h2 { margin: 46px 0 18px; font-family: var(--serif); font-size: 28px; font-weight: 500; }
.process-ledger p, .boundary-ledger p { color: var(--muted); font-size: 13px; }
.editorial-section { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; padding: 64px 0; border-bottom: 1px solid var(--line-dark); }
.editorial-section h2 { max-width: 480px; margin: 10px 0 0; font-family: var(--serif); font-size: clamp(30px, 3.5vw, 51px); font-weight: 500; line-height: 1.1; }
.editorial-section > div:last-child { max-width: 650px; }.editorial-section > div:last-child p { margin-top: 0; color: var(--ink-soft); }

/* Cross-document shared elements */
.route-row.is-transition-source .route-row__name, .shared-route-title { view-transition-name: route-title; }
.route-row.is-transition-source .route-row__number, .shared-route-number { view-transition-name: route-number; }
.route-preview .atlas-plate.is-transition-source, .shared-route-plate { view-transition-name: route-plate; }
.brand__mark { view-transition-name: brand-mark; }
::view-transition-old(root) { animation: root-out .42s var(--ease-out) both; }
::view-transition-new(root) { animation: root-in .58s var(--ease-out) both; }
::view-transition-group(route-title) { animation-duration: .68s; animation-timing-function: var(--ease-out); }
::view-transition-group(route-number) { animation-duration: .56s; animation-timing-function: var(--ease-out); }
::view-transition-group(route-plate) { animation-duration: .76s; animation-timing-function: var(--ease-out); }
::view-transition-group(brand-mark) { animation-duration: .48s; }
::view-transition-old(route-plate), ::view-transition-new(route-plate) { height: 100%; object-fit: cover; }
@keyframes root-out { to { opacity: 0; transform: translateY(-7px); } }
@keyframes root-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1080px) {
  .site-status span:first-child { display: none; }
  .opening-stage { grid-template-columns: minmax(0, 1fr) minmax(350px, .78fr); gap: 42px; }.opening-preview { padding-left: 28px; }
  .chart-stage { grid-template-columns: minmax(470px, 1.15fr) minmax(260px, .7fr); gap: 42px; }
  .atlas-layout { grid-template-columns: minmax(0, 1fr) minmax(340px, .8fr); gap: 34px; }
  .route-row { grid-template-columns: 48px minmax(160px, 1fr) 120px 70px; }
  .route-row__method { font-size: 9px; }
  .route-ledger { grid-template-columns: repeat(2, 1fr); }.route-ledger > div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }.route-ledger > div:nth-child(4) { border-top: 1px solid var(--line); }
  .qimen-layout { grid-template-columns: minmax(360px, 1fr) minmax(270px, .65fr); gap: 36px; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .site-header { position: sticky; top: 0; grid-template-columns: 1fr auto; min-height: 60px; padding: 0 16px; }
  .brand__name { font-size: 19px; }.site-status { display: none; }.site-nav { gap: 14px; font-size: 11px; }
  .site-footer { flex-direction: column; gap: 8px; padding: 18px 16px 28px; }
  .atlas-page, .opening-page, .chart-page, .route-page, .start-page, .result-page, .info-page { padding-right: 16px; padding-left: 16px; }
  .opening-page { padding-top: 30px; padding-bottom: 48px; }.opening-stage { grid-template-columns: 1fr; gap: 38px; }.opening-copy { padding-bottom: 24px; }.opening-copy h1 { margin-bottom: 16px; font-size: 50px; }.opening-copy > p:last-child { font-size: 12px; }
  .opening-field, .opening-number-field { padding: 20px 0 24px; }.opening-form textarea { min-height: 112px; font-size: 20px; }.luoshu-picker { max-width: none; }.luoshu-picker span { min-height: 54px; padding: 7px 9px; }.luoshu-picker strong { font-size: 21px; }.opening-preview { position: static; padding: 24px 0 0; border-top: 1px solid var(--line-dark); border-left: 0; }.opening-preview__head h2 { font-size: 34px; }.opening-plate .atlas-palace { min-height: 65px; padding: 6px; }.opening-plate .atlas-palace__main { font-size: 16px; }.opening-plate .atlas-palace__head, .opening-plate .atlas-palace__detail, .opening-plate .atlas-palace__stems { font-size: 7px; }.opening-process { grid-template-columns: 1fr 1fr; margin-top: 44px; }.opening-process p { padding: 11px 8px; font-size: 9px; }.opening-process p:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }.opening-process p:nth-child(4) { border-top: 1px solid var(--line); }
  .chart-page { padding-bottom: 56px; }.chart-loading { min-height: calc(100vh - 130px); }.chart-masthead { grid-template-columns: 1fr; gap: 26px; padding: 42px 0 28px; }.chart-masthead h1 { font-size: 53px; }.chart-question { padding-left: 16px; font-size: 21px; }.chart-meta-strip { grid-template-columns: 1fr 1fr; }.chart-meta-strip p { padding: 10px 8px; }.chart-meta-strip p:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }.chart-meta-strip p:nth-child(4) { border-top: 1px solid var(--line); }.chart-meta-strip strong { font-size: 10px; }
  .chart-stage { grid-template-columns: 1fr; gap: 42px; padding: 44px 0; }.plate-orbit { grid-template-columns: 27px repeat(3, minmax(0, 1fr)) 27px; grid-template-rows: 27px repeat(3, minmax(0, 1fr)) 27px; }.branch-marker { width: 24px; height: 24px; font-size: 10px; }.chart-section-head h2 { font-size: 28px; }.chart-plate .atlas-palace { padding: 5px; }.chart-plate .atlas-palace__head { font-size: 8px; }.chart-plate .atlas-palace__main { font-size: 17px; }.chart-plate .atlas-palace__detail, .chart-plate .atlas-palace__stems { font-size: 7.5px; }.chart-plate .atlas-palace__void { top: 20px; right: 4px; font-size: 7px; }.chart-figure figcaption { margin-right: 27px; margin-left: 27px; font-size: 8px; }.chart-ledger { position: static; }.chart-next { flex-direction: column; align-items: stretch; }.chart-next > div { flex-direction: column; align-items: stretch; }.chart-next .primary-action { width: 100%; }.chart-next p { max-width: none; }
  .atlas-page { padding-top: 28px; }
  .atlas-intro { display: block; padding-bottom: 22px; }.atlas-intro h1 { margin: 4px 0 10px; font-size: 43px; }.atlas-intro > p:last-child { font-size: 12px; line-height: 1.5; }
  .atlas-layout { display: flex; flex-direction: column; gap: 24px; }.route-preview { position: static; order: -1; width: 100%; }
  .route-preview__head { margin-bottom: 7px; }.route-preview__head h2 { font-size: 25px; }.preview-method { display: none; }.route-preview__summary, .route-preview > .text-link { display: none; }
  .route-preview .atlas-palace { min-height: 39px; padding: 4px 5px; }.route-preview .atlas-palace__head { font-size: 7px; }.route-preview .atlas-palace__head span:last-child, .route-preview .atlas-palace__detail, .route-preview .atlas-palace__stems { display: none; }.route-preview .atlas-palace__main { margin: auto 0 0; font-size: 13px; }.route-preview .plate-figure figcaption { margin-top: 4px; font-size: 8px; }
  .index-heading { display: none; }.route-row { grid-template-columns: 38px minmax(0, 1fr) 70px; min-height: 76px; }.route-row__method { display: none; }.route-row__number { padding-top: 18px; }.route-row__name { font-size: 25px; }.route-row__status { font-size: 9px; }
  .method-line { margin-top: 38px; }.method-line p { padding: 12px 5px; font-size: 8px; }
  .back-link { margin-top: 2px; }.route-hero { grid-template-columns: 1fr; gap: 45px; padding: 45px 0; }.route-title-line { margin: 10px 0 22px; }.route-title-line h1 { font-size: 62px; }.route-lead { font-size: 23px; }.route-description { font-size: 13px; }.route-plate-figure { max-width: 540px; }
  .route-ledger { grid-template-columns: 1fr; }.route-ledger > div { min-height: auto; padding: 22px 0; }.route-ledger > div + div, .route-ledger > div:nth-child(3), .route-ledger > div:nth-child(4) { border-top: 1px solid var(--line); border-left: 0; }
  .start-heading { grid-template-columns: 1fr; gap: 16px; padding: 42px 0 28px; }.start-heading h1 { font-size: 45px; }.start-heading > p { font-size: 12px; }
  .start-layout { grid-template-columns: 1fr; gap: 45px; }.form-step { grid-template-columns: 1fr; gap: 18px; padding: 25px 0 30px; }.step-heading { flex-direction: row; align-items: baseline; }.form-grid { grid-template-columns: 1fr; gap: 28px; }
  textarea { min-height: 150px; font-size: 21px; }.number-options { grid-template-columns: repeat(5, 1fr); }.number-options label:first-child { grid-column: span 2; }.number-options span { min-height: 48px; }.submit-row { grid-template-columns: 1fr; }.start-context { position: static; }
  .result-masthead { grid-template-columns: 1fr; gap: 25px; padding: 45px 0 24px; }.result-masthead h1 { font-size: 52px; }.result-actions { justify-content: start; }.result-question { font-size: 22px; }
  .verdict-section { grid-template-columns: 1fr; gap: 18px; padding: 40px 0; }.verdict-copy h2 { font-size: 38px; }.verdict-copy p { margin-top: 18px; font-size: 14px; }
  .signal-ledger { grid-template-columns: 1fr; }.signal-item { min-height: auto; padding: 28px 0 32px; }.signal-item + .signal-item { border-top: 1px solid var(--line); border-left: 0; }.signal-item__label { margin-bottom: 20px; }.signal-item h2 { font-size: 27px; }
  .action-section, .system-row, .reflection-section { grid-template-columns: 1fr; gap: 30px; padding: 45px 0; }.action-item { grid-template-columns: 36px 1fr; }.action-item p { grid-column: 2; }.qimen-evidence { padding: 42px 0; }.qimen-layout { grid-template-columns: 1fr; }.result-plate .atlas-palace { min-height: 91px; padding: 7px; }.result-plate .atlas-palace__main { font-size: 17px; }.result-plate .atlas-palace__detail, .result-plate .atlas-palace__stems { font-size: 7px; }
  .system-row { gap: 24px; }.transmission { grid-template-columns: 120px 1fr; gap: 10px; font-size: 12px; }.boundary-note { flex-direction: column; }
  .info-masthead { grid-template-columns: 1fr; gap: 25px; padding: 55px 0 45px; }.info-masthead .eyebrow { grid-column: auto; }.info-masthead h1 { font-size: 54px; }.process-ledger, .boundary-ledger { grid-template-columns: 1fr; }.process-ledger > div, .boundary-ledger > div { min-height: auto; padding: 28px 0; }.process-ledger > div + div, .boundary-ledger > div + div { border-top: 1px solid var(--line); border-left: 0; }.process-ledger h2, .boundary-ledger h2 { margin: 25px 0 12px; }.editorial-section { grid-template-columns: 1fr; gap: 25px; padding: 45px 0; }
}

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

@media print {
  @page { margin: 14mm; }
  body { background: white; font-size: 11pt; }.site-header, .site-footer, .result-actions, .toast { display: none !important; }.result-page { max-width: none; padding: 0; }.result-masthead { padding-top: 0; }.evidence-disclosure { display: block; }.evidence-body { display: block !important; }.signal-item { min-height: 0; }.atlas-palace { break-inside: avoid; }
}

/* v0.4 — Rich data-driven Qimen plate */
:root {
  --element-wood: #1f6a4a;
  --element-fire: #ad332c;
  --element-earth: #9a671d;
  --element-metal: #505a5b;
  --element-water: #315f7a;
  --element-wood-bg: #edf3e9;
  --element-fire-bg: #f6ebe7;
  --element-earth-bg: #f3eee1;
  --element-metal-bg: #eceeea;
  --element-water-bg: #e8eff2;
  --plate-white: #fbfaf6;
  --plate-line: #bcb7aa;
}

.rich-home-body, .rich-chart-body { background: #ebe7dc; }
.rich-site-header { background: rgba(235, 231, 220, .96); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(161, 58, 45, .1); }
.tone-wood { color: var(--element-wood) !important; }
.tone-fire { color: var(--element-fire) !important; }
.tone-earth { color: var(--element-earth) !important; }
.tone-metal { color: var(--element-metal) !important; }
.tone-water { color: var(--element-water) !important; }
.tone-neutral { color: var(--ink-soft) !important; }
.qimen-order-0 { --palace-order: 0; }.qimen-order-1 { --palace-order: 1; }.qimen-order-2 { --palace-order: 2; }
.qimen-order-3 { --palace-order: 3; }.qimen-order-4 { --palace-order: 4; }.qimen-order-5 { --palace-order: 5; }
.qimen-order-6 { --palace-order: 6; }.qimen-order-7 { --palace-order: 7; }.qimen-order-8 { --palace-order: 8; }

/* Shared four pillars */
.qimen-pillars { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--plate-line); background: var(--plate-white); }
.qimen-pillar { position: relative; min-width: 0; padding: 10px 8px 12px; text-align: center; }
.qimen-pillar + .qimen-pillar { border-left: 1px solid var(--plate-line); }
.qimen-pillar__label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .14em; }
.qimen-pillar__value { display: flex; justify-content: center; gap: 2px; font-family: var(--serif); font-size: clamp(21px, 2.1vw, 30px); font-weight: 600; line-height: 1; }
.qimen-pillar__value b { font-weight: inherit; }

/* Shared 5x5 branch ring + 3x3 live plate */
.qimen-orbit { display: grid; grid-template-columns: 34px repeat(3, minmax(0, 1fr)) 34px; grid-template-rows: 34px repeat(3, minmax(0, 1fr)) 34px; width: 100%; aspect-ratio: 1; }
.qimen-plate.atlas-plate { grid-area: 2 / 2 / 5 / 5; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; width: 100%; height: 100%; border: 1px solid var(--ink); background: var(--ink); transition: opacity .25s var(--ease-out), transform .45s var(--ease-out); }
.qimen-branch { position: relative; display: flex; place-self: center; align-items: center; justify-content: center; width: 25px; height: 25px; border: 1px solid var(--plate-line); border-radius: 50%; background: rgba(251, 250, 246, .66); color: var(--ink-soft); font-family: var(--serif); font-size: 11px; line-height: 1; }
.qimen-branch i { position: absolute; top: -5px; right: -7px; min-width: 13px; color: var(--red); font-family: var(--sans); font-size: 6px; font-style: normal; font-weight: 800; text-align: center; }
.qimen-branch.is-horse { border-color: var(--element-water); color: var(--element-water); }
.qimen-branch.is-void { border-style: dashed; color: var(--red); }
.qimen-branch.b1 { grid-area: 1 / 2; }.qimen-branch.b2 { grid-area: 1 / 3; }.qimen-branch.b3 { grid-area: 1 / 4; }
.qimen-branch.b4 { grid-area: 2 / 5; }.qimen-branch.b5 { grid-area: 3 / 5; }.qimen-branch.b6 { grid-area: 4 / 5; }
.qimen-branch.b7 { grid-area: 5 / 4; }.qimen-branch.b8 { grid-area: 5 / 3; }.qimen-branch.b9 { grid-area: 5 / 2; }
.qimen-branch.b10 { grid-area: 4 / 1; }.qimen-branch.b11 { grid-area: 3 / 1; }.qimen-branch.b12 { grid-area: 2 / 1; }

.qimen-palace.atlas-palace { position: relative; display: block; min-width: 0; min-height: 0; aspect-ratio: 1; padding: 0; border: 0; overflow: hidden; background: var(--plate-white); color: var(--ink); font-family: var(--sans); text-align: left; appearance: none; }
button.qimen-palace { cursor: pointer; }
.qimen-palace::before { content: ""; position: absolute; z-index: 1; top: 0; right: 0; left: 0; height: 3px; background: var(--line-dark); }
.qimen-palace.palace-tone-wood { background: var(--element-wood-bg); }.qimen-palace.palace-tone-wood::before { background: var(--element-wood); }
.qimen-palace.palace-tone-fire { background: var(--element-fire-bg); }.qimen-palace.palace-tone-fire::before { background: var(--element-fire); }
.qimen-palace.palace-tone-earth { background: var(--element-earth-bg); }.qimen-palace.palace-tone-earth::before { background: var(--element-earth); }
.qimen-palace.palace-tone-metal { background: var(--element-metal-bg); }.qimen-palace.palace-tone-metal::before { background: var(--element-metal); }
.qimen-palace.palace-tone-water { background: var(--element-water-bg); }.qimen-palace.palace-tone-water::before { background: var(--element-water); }
.qimen-palace--center { background: #e6e1d5 !important; }
.qimen-palace--void { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M-3 3L3-3M0 12L12 0M9 15L15 9' fill='none' stroke='%23a13a2d' stroke-opacity='.12' stroke-width='1'/%3E%3C/svg%3E"); }
.qimen-palace__status { position: absolute; z-index: 4; top: 7px; right: 6px; display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.qimen-marker { min-width: 18px; padding: 2px 3px; border: 1px solid currentColor; background: rgba(251, 250, 246, .86); font-size: 7px; font-weight: 800; line-height: 1; text-align: center; }
.qimen-marker.is-duty-star { color: var(--element-wood); }.qimen-marker.is-duty-gate { color: var(--element-fire); }.qimen-marker.is-void { color: var(--red); }.qimen-marker.is-horse { color: var(--element-water); }
.qimen-palace__deity { position: absolute; z-index: 2; top: 10px; right: 26px; left: 26px; overflow: hidden; color: var(--muted); font-size: clamp(7px, .72vw, 10px); font-weight: 700; letter-spacing: .08em; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.qimen-palace__gate { position: absolute; z-index: 2; top: 29%; right: 5px; left: 5px; font-family: var(--serif); font-size: clamp(19px, 2vw, 30px); font-weight: 650; line-height: 1; letter-spacing: .06em; text-align: center; }
.qimen-palace__star { position: absolute; z-index: 2; top: 52%; right: 5px; left: 5px; overflow: hidden; color: var(--ink-soft); font-family: var(--serif); font-size: clamp(9px, 1vw, 14px); font-weight: 600; line-height: 1; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.qimen-palace__stems { position: absolute; z-index: 2; right: 6px; bottom: 19px; display: grid; gap: 1px; }
.qimen-palace__heaven, .qimen-palace__earth { display: flex; align-items: baseline; justify-content: flex-end; gap: 3px; line-height: 1; }
.qimen-palace__heaven em, .qimen-palace__earth em { color: var(--muted); font-size: clamp(5px, .48vw, 7px); font-style: normal; }
.qimen-palace__heaven b { font-family: var(--serif); font-size: clamp(11px, 1.2vw, 17px); font-weight: 700; }.qimen-palace__earth b { font-family: var(--serif); font-size: clamp(8px, .88vw, 12px); font-weight: 600; }
.qimen-palace__label { position: absolute; z-index: 2; right: 4px; bottom: 4px; left: 4px; display: flex; justify-content: center; gap: 5px; color: var(--muted); font-size: clamp(6px, .57vw, 8px); line-height: 1; }
.qimen-palace__label b { color: var(--ink-soft); font-family: var(--serif); font-weight: 700; }.qimen-palace__label em { font-style: normal; }
.qimen-palace__center-note { position: absolute; right: 4px; bottom: 22px; left: 4px; overflow: hidden; color: var(--muted); font-size: 6px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.qimen-palace.is-focus { z-index: 3; box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 7px rgba(161, 58, 45, .08); }
button.qimen-palace:hover { z-index: 2; box-shadow: inset 0 0 0 2px var(--ink); }
button.qimen-palace.is-focus:hover { box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 7px rgba(161, 58, 45, .08); }
button.qimen-palace:focus-visible { z-index: 5; outline: 3px solid var(--red); outline-offset: -3px; }

/* Homepage: instrument first, form second */
.rich-home { display: grid; grid-template-columns: minmax(620px, 1.18fr) minmax(390px, .72fr); max-width: 1480px; min-height: calc(100vh - 78px); margin: 0 auto; padding: clamp(28px, 3vw, 44px) clamp(20px, 3.2vw, 52px) 42px; }
.rich-home__instrument { display: flex; flex-direction: column; min-width: 0; padding-right: clamp(34px, 4vw, 62px); border-right: 1px solid var(--line-dark); }
.instrument-bar { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 10px 0 12px; border-bottom: 1px solid var(--line-dark); color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.instrument-bar > div { display: flex; align-items: center; gap: 8px; }.instrument-bar strong { color: var(--ink); font-size: 10px; }.instrument-bar p { margin: 0; color: var(--red); font-family: var(--serif); font-size: 12px; letter-spacing: .06em; }
.qimen-pillars--home { margin: 12px 0 9px; }
.instrument-meta { display: grid; grid-template-columns: 1fr 1fr 1.2fr; border-top: 1px solid var(--plate-line); border-bottom: 1px solid var(--plate-line); }
.instrument-meta p { min-width: 0; margin: 0; padding: 8px 10px; }.instrument-meta p + p { border-left: 1px solid var(--plate-line); }
.instrument-meta span { display: block; color: var(--muted); font-size: 7px; letter-spacing: .12em; }.instrument-meta strong { display: block; overflow: hidden; margin-top: 2px; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.rich-plate-figure { width: min(100%, 660px); margin: 10px auto 0; }
.rich-plate-figure figcaption { margin: 2px 34px 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.instrument-focus { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line-dark); }
.instrument-focus > div { display: grid; grid-template-columns: auto auto; gap: 7px; align-items: baseline; white-space: nowrap; }.instrument-focus span { color: var(--muted); font-size: 8px; letter-spacing: .1em; }.instrument-focus strong { color: var(--red); font-family: var(--serif); font-size: 17px; font-weight: 650; }
.instrument-focus p { max-width: 510px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.rich-home__query { display: flex; flex-direction: column; min-width: 0; padding: clamp(12px, 2vw, 28px) 0 0 clamp(34px, 4vw, 62px); }
.query-intro .eyebrow { color: var(--red); }.query-intro h1 { margin: 10px 0 18px; font-family: var(--serif); font-size: clamp(52px, 5.5vw, 78px); font-weight: 500; line-height: .93; letter-spacing: -.055em; }.query-intro h1 em { color: var(--red); font-style: normal; }.query-intro > p:last-child { max-width: 500px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.rich-opening-form { margin-top: auto; border-top: 1px solid var(--ink); }
.rich-opening-field, .rich-number-field { margin: 0; padding: 16px 0; border: 0; border-bottom: 1px solid var(--plate-line); }
.rich-opening-field__head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 8px; }.rich-opening-field__head label, .rich-opening-field__head legend { font-size: 10px; font-weight: 750; letter-spacing: .08em; }.rich-opening-field__head span { color: var(--muted); font-size: 8px; }
.rich-opening-form textarea { width: 100%; min-height: 82px; resize: vertical; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line-dark); border-radius: 0; outline: 0; background: transparent; font-family: var(--serif); font-size: 19px; line-height: 1.45; }.rich-opening-form textarea:focus { border-color: var(--red); }.rich-opening-form textarea::placeholder { color: #9b978d; }
.rich-luoshu-picker { display: grid; grid-template-columns: repeat(3, 1fr); max-width: none; border-top: 1px solid var(--line-dark); border-left: 1px solid var(--line-dark); }
.rich-luoshu-picker label { position: relative; }.rich-luoshu-picker input { position: absolute; opacity: 0; pointer-events: none; }
.rich-luoshu-picker span { display: flex; align-items: baseline; justify-content: space-between; min-height: 42px; padding: 7px 10px; border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); background: rgba(251, 250, 246, .35); cursor: pointer; transition: background .18s, color .18s, transform .18s var(--ease-out); }.rich-luoshu-picker strong { font-family: var(--serif); font-size: 21px; font-weight: 650; line-height: 1; }.rich-luoshu-picker small { color: var(--muted); font-size: 8px; }
.rich-luoshu-picker input:checked + span { background: var(--ink); color: var(--plate-white); }.rich-luoshu-picker input:checked + span small { color: #c9c5bb; }.rich-luoshu-picker input:focus-visible + span { outline: 2px solid var(--red); outline-offset: -3px; }.rich-luoshu-picker label:hover span { transform: translateY(-1px); }
.rich-number-field .opening-field-note { margin: 7px 0 0; color: var(--muted); font-size: 8px; }
.rich-opening-submit { width: 100%; margin-top: 14px; min-height: 50px; }.rich-opening-submit span:last-child { color: #d9a696; }
.rich-opening-form .opening-privacy { margin: 8px 0 0; color: var(--muted); font-size: 8px; line-height: 1.4; }
.rich-opening-form .form-error { margin: 10px 0 0; color: var(--red); font-size: 10px; }

/* Chart */
.rich-chart-page { max-width: 1480px; min-height: calc(100vh - 78px); margin: 0 auto; padding: 0 clamp(20px, 3.2vw, 52px) 70px; }
.rich-chart-loading { display: grid; min-height: calc(100vh - 160px); place-items: center; align-content: center; gap: 24px; text-align: center; }.rich-chart-loading p { display: flex; flex-direction: column; gap: 4px; margin: 0; }.rich-chart-loading strong { font-family: var(--serif); font-size: 28px; font-weight: 500; }.rich-chart-loading span { color: var(--muted); font-size: 10px; }
.loading-compass { position: relative; display: grid; grid-template-columns: repeat(2, 20px); grid-template-rows: repeat(2, 20px); gap: 4px; width: 44px; height: 44px; transform: rotate(45deg); animation: compass-breathe 1.5s ease-in-out infinite; }.loading-compass i { border: 1px solid var(--ink); background: var(--plate-white); }.loading-compass i:nth-child(2) { background: var(--red); }.loading-compass b { position: absolute; inset: 16px; background: var(--ink); }
.rich-chart-lead { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(50px, 8vw, 120px); align-items: end; padding: clamp(46px, 6vw, 82px) 0 34px; border-bottom: 1px solid var(--line-dark); }.rich-chart-lead h1 { margin: 6px 0 11px; font-family: var(--serif); font-size: clamp(58px, 6vw, 88px); font-weight: 500; line-height: .95; letter-spacing: -.055em; }.rich-chart-lead__hint { max-width: 470px; margin: 0; color: var(--muted); font-size: 11px; }.rich-chart-question { margin: 0; padding-left: 22px; border-left: 3px solid var(--red); font-family: var(--serif); font-size: clamp(24px, 2.7vw, 39px); line-height: 1.3; }
.rich-chart-overview { display: grid; grid-template-columns: minmax(390px, .72fr) minmax(0, 1.28fr); gap: 0; margin-top: 18px; border-bottom: 1px solid var(--line-dark); }.qimen-pillars--chart { border-bottom: 0; }.rich-chart-meta { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--plate-line); border-right: 1px solid var(--plate-line); }.rich-chart-meta p { min-width: 0; margin: 0; padding: 11px 12px; border-bottom: 1px solid var(--plate-line); }.rich-chart-meta p + p { border-left: 1px solid var(--plate-line); }.rich-chart-meta span { display: block; color: var(--muted); font-size: 7px; letter-spacing: .12em; }.rich-chart-meta strong { display: block; overflow: hidden; margin-top: 3px; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.rich-chart-workspace { display: grid; grid-template-columns: minmax(560px, 1.28fr) minmax(300px, .62fr); gap: clamp(34px, 5vw, 76px); align-items: start; padding: clamp(40px, 5vw, 68px) 0; }
.rich-chart-figure { min-width: 0; margin: 0; padding: clamp(18px, 2.3vw, 30px); border: 1px solid var(--line-dark); background: rgba(251, 250, 246, .56); }.rich-chart-section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 8px; }.rich-chart-section-head h2 { margin: 2px 0 0; font-family: var(--serif); font-size: clamp(30px, 3vw, 45px); font-weight: 500; line-height: 1; }.rich-chart-section-head > p { display: flex; align-items: center; gap: 5px; margin: 0; color: var(--muted); font-size: 7px; }.legend-focus { width: 12px; height: 12px; border: 2px solid var(--red); }.legend-void, .legend-horse { display: inline-grid; min-width: 13px; height: 13px; place-items: center; border: 1px solid currentColor; color: var(--red); font-size: 6px; }.legend-horse { color: var(--element-water); }
.qimen-orbit--chart { max-width: 740px; margin: 0 auto; }.rich-chart-figure figcaption { margin: 5px 34px 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.palace-inspector { position: sticky; top: 24px; border-top: 3px solid var(--red); border-bottom: 1px solid var(--line-dark); background: rgba(251, 250, 246, .52); }.palace-inspector > header { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--plate-line); }.palace-inspector > header > span { color: var(--muted); font-size: 9px; }.palace-inspector__title { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; padding: 23px 0 13px; }.palace-inspector__title h2 { margin: 0; font-family: var(--serif); font-size: clamp(32px, 3.3vw, 48px); font-weight: 500; }.palace-inspector__title strong { font-family: var(--serif); font-size: clamp(24px, 2.7vw, 39px); font-weight: 650; }.palace-inspector > p { margin: 0 0 18px; color: var(--ink-soft); font-size: 11px; }
.palace-inspector__facts { margin: 0; border-top: 1px solid var(--ink); }.palace-inspector__facts div { display: grid; grid-template-columns: 78px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--plate-line); font-size: 10px; }.palace-inspector__facts dt { color: var(--muted); }.palace-inspector__facts dd { margin: 0; font-weight: 650; text-align: right; }.palace-inspector .palace-inspector__note { margin: 15px 0 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.rich-chart-ledger { display: grid; grid-template-columns: minmax(230px, .42fr) 1fr; gap: clamp(34px, 5vw, 76px); padding: 36px 0; border-top: 1px solid var(--line-dark); }.rich-chart-ledger header h2 { margin: 7px 0 0; font-family: var(--serif); font-size: clamp(26px, 3vw, 42px); font-weight: 500; line-height: 1.15; }.rich-chart-ledger dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; border-top: 1px solid var(--ink); }.rich-chart-ledger dl div { min-width: 0; padding: 12px 13px; border-right: 1px solid var(--plate-line); border-bottom: 1px solid var(--plate-line); }.rich-chart-ledger dt { color: var(--muted); font-size: 8px; letter-spacing: .08em; }.rich-chart-ledger dd { margin: 4px 0 0; font-size: 10px; font-weight: 650; line-height: 1.45; }
.rich-chart-next { border-top: 1px solid var(--ink); }

/* Motion: hierarchy, state, route continuity */
body.is-preview-ready .rich-home__instrument .qimen-pillar { animation: pillar-land .46s var(--ease-out) both; animation-delay: calc(var(--palace-order, 0) * 35ms); }
body.is-preview-ready .rich-home__instrument .qimen-palace { animation: palace-land .58s var(--ease-out) both; animation-delay: calc(var(--palace-order) * 42ms); }
.rich-chart-content .qimen-pillar, .rich-chart-content .qimen-palace, .rich-chart-content .palace-inspector { opacity: 0; }
.rich-chart-content.is-revealed .qimen-pillar { animation: pillar-land .44s var(--ease-out) both; animation-delay: calc(var(--palace-order, 0) * 34ms); }
.rich-chart-content.is-revealed .qimen-palace { animation: palace-land .62s var(--ease-out) both; animation-delay: calc(100ms + var(--palace-order) * 48ms); }
.rich-chart-content.is-revealed .palace-inspector { animation: inspector-in .48s var(--ease-out) .5s both; }
.rich-chart-content.is-revealed .qimen-palace.is-focus { animation: palace-land .62s var(--ease-out) calc(100ms + var(--palace-order) * 48ms) both, focus-settle .7s var(--ease-out) .9s both; }
.palace-inspector.is-updating .palace-inspector__title, .palace-inspector.is-updating .palace-inspector__facts { animation: inspector-data .34s var(--ease-out) both; }
html.is-starting-chart .rich-home__query { opacity: .46; transform: translateY(-5px); transition: opacity .25s, transform .35s var(--ease-out); }
@keyframes palace-land { from { opacity: 0; transform: translateY(12px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes pillar-land { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
@keyframes inspector-in { from { opacity: 0; transform: translateX(15px); } to { opacity: 1; transform: none; } }
@keyframes inspector-data { from { opacity: .25; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes focus-settle { 0%, 100% { box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 7px rgba(161, 58, 45, .08); } 50% { box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 12px rgba(161, 58, 45, .15); } }
@keyframes compass-breathe { 0%, 100% { transform: rotate(45deg) scale(.92); opacity: .62; } 50% { transform: rotate(45deg) scale(1); opacity: 1; } }

@media (max-width: 1080px) {
  .rich-home { grid-template-columns: minmax(520px, 1.12fr) minmax(340px, .72fr); }.rich-home__instrument { padding-right: 28px; }.rich-home__query { padding-left: 28px; }.query-intro h1 { font-size: 56px; }
  .rich-chart-workspace { grid-template-columns: minmax(500px, 1.15fr) minmax(270px, .62fr); gap: 34px; }.rich-chart-overview { grid-template-columns: 360px 1fr; }
}

@media (max-width: 760px) {
  .rich-site-header { min-height: 60px; }
  .rich-home { display: flex; flex-direction: column; min-height: 0; padding: 24px 14px 44px; }.rich-home__query { order: -1; padding: 0; }.query-intro h1 { margin: 7px 0 13px; font-size: 49px; }.query-intro > p:last-child { font-size: 11px; line-height: 1.6; }.rich-opening-form { margin-top: 25px; }.rich-opening-field, .rich-number-field { padding: 14px 0; }.rich-opening-form textarea { min-height: 80px; padding-top: 7px; font-size: 18px; }.rich-luoshu-picker span { min-height: 50px; }.rich-opening-submit { min-height: 52px; }
  .rich-home__instrument { margin-top: 34px; padding: 18px 0 0; border-top: 1px solid var(--line-dark); border-right: 0; }.instrument-bar { font-size: 7px; }.instrument-bar p { font-size: 9px; }.instrument-bar > div > span:last-child { display: none; }.qimen-pillars--home { margin-top: 9px; }.instrument-meta { grid-template-columns: 1fr 1fr; }.instrument-meta p:last-child { display: none; }.rich-plate-figure { width: 100%; }.instrument-focus { grid-template-columns: 1fr; gap: 5px; }.instrument-focus p { font-size: 8px; }
  .qimen-orbit { grid-template-columns: 27px repeat(3, minmax(0, 1fr)) 27px; grid-template-rows: 27px repeat(3, minmax(0, 1fr)) 27px; }.qimen-branch { width: 22px; height: 22px; font-size: 9px; }.qimen-plate.atlas-plate { gap: 2px; }.qimen-palace::before { height: 2px; }.qimen-palace__status { top: 5px; right: 4px; gap: 1px; }.qimen-marker { min-width: 14px; padding: 1px 2px; font-size: 5.5px; }.qimen-palace__deity { top: 7px; right: 20px; left: 20px; font-size: 7px; letter-spacing: 0; }.qimen-palace__gate { top: 29%; font-size: 17px; }.qimen-palace__star { top: 51%; font-size: 8px; }.qimen-palace__stems { right: 4px; bottom: 16px; gap: 0; }.qimen-palace__heaven em, .qimen-palace__earth em { font-size: 5px; }.qimen-palace__heaven b { font-size: 10px; }.qimen-palace__earth b { font-size: 7.5px; }.qimen-palace__label { bottom: 3px; gap: 3px; font-size: 6.5px; }.qimen-palace__center-note { display: none; }
  .rich-chart-page { padding: 0 14px 52px; }.rich-chart-lead { grid-template-columns: 1fr; gap: 24px; padding: 36px 0 24px; }.rich-chart-lead h1 { font-size: 48px; }.rich-chart-lead__hint { font-size: 9px; }.rich-chart-question { padding-left: 14px; font-size: 20px; line-height: 1.35; }.rich-chart-overview { display: block; margin-top: 12px; }.qimen-pillars--chart { border-bottom: 1px solid var(--plate-line); }.qimen-pillar { padding: 8px 4px 9px; }.qimen-pillar__label { font-size: 7px; }.qimen-pillar__value { font-size: 21px; }.rich-chart-meta { grid-template-columns: 1fr 1fr; border-left: 1px solid var(--plate-line); }.rich-chart-meta p:nth-child(3) { border-left: 0; }.rich-chart-meta strong { font-size: 8px; }
  .rich-chart-workspace { grid-template-columns: 1fr; gap: 30px; padding: 34px 0; }.rich-chart-figure { margin-right: -4px; margin-left: -4px; padding: 13px 5px 14px; }.rich-chart-section-head { padding: 0 9px; }.rich-chart-section-head h2 { font-size: 29px; }.rich-chart-section-head > p { display: none; }.qimen-orbit--chart { max-width: none; }.rich-chart-figure figcaption { margin: 5px 28px 0; font-size: 7px; }
  .palace-inspector { position: static; padding: 0 4px; }.palace-inspector__title { padding-top: 18px; }.palace-inspector__title h2 { font-size: 35px; }.palace-inspector__title strong { font-size: 29px; }.palace-inspector > p { font-size: 10px; }.palace-inspector__facts div { font-size: 10px; }
  .rich-chart-ledger { grid-template-columns: 1fr; gap: 22px; padding: 31px 0; }.rich-chart-ledger header h2 { font-size: 29px; }.rich-chart-ledger dl { grid-template-columns: 1fr 1fr; }.rich-chart-ledger dl div:nth-child(odd) { border-left: 1px solid var(--plate-line); }
  .rich-chart-next { flex-direction: column; align-items: stretch; }.rich-chart-next > div { flex-direction: column; align-items: stretch; }.rich-chart-next .primary-action { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-compass, body.is-preview-ready .rich-home__instrument .qimen-pillar, body.is-preview-ready .rich-home__instrument .qimen-palace,
  .rich-chart-content.is-revealed .qimen-pillar, .rich-chart-content.is-revealed .qimen-palace, .rich-chart-content.is-revealed .palace-inspector,
  .rich-chart-content.is-revealed .qimen-palace.is-focus, .palace-inspector.is-updating .palace-inspector__title, .palace-inspector.is-updating .palace-inspector__facts { animation: none !important; opacity: 1 !important; transform: none !important; }
}
