:root{--blue:#142e53;--ink:#172b49;--gold:#cfaa55;--line:#d5deea;--muted:#5d6d80}*{box-sizing:border-box}body{margin:0;color:var(--ink);background:#edf3fa;font-family:system-ui,"Microsoft YaHei",sans-serif;font-size:16px;line-height:1.6}button,input{font:inherit}button,a,input{touch-action:manipulation}button{cursor:pointer}a{color:inherit}a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible{outline:3px solid #a77815;outline-offset:4px}.skip{position:absolute;left:12px;top:-80px;background:white;padding:10px;z-index:3}.skip:focus{top:10px}.site-header{padding:14px max(24px,calc((100vw - 1280px)/2));background:var(--blue);border-bottom:3px solid var(--gold);display:flex;justify-content:space-between;gap:20px;align-items:center;color:#fff}.brand{display:flex;gap:12px;align-items:center;text-decoration:none}.brand img{object-fit:contain;background:#fff;border-radius:50%}.brand strong{display:block;font-size:20px}.brand small{display:block;color:#e2cb94;font-size:14px}.site-header nav{display:flex;gap:24px;flex-wrap:wrap}.site-header nav a{text-decoration:none;font-size:14px}main{max-width:1280px;margin:auto;padding:28px 24px 48px}.page-title{display:flex;justify-content:space-between;gap:16px;align-items:end;margin-bottom:24px}.eyebrow{color:#766023;font-size:13px;font-weight:700;letter-spacing:.18em;margin:0 0 4px}h1{font-size:32px;margin:0;font-weight:650}.zone{font-size:14px;color:var(--muted)}.workspace{display:grid;grid-template-columns:280px minmax(0,1fr);gap:28px;align-items:start}.controls{background:var(--blue);color:#fff;border-radius:16px;padding:24px;position:sticky;top:18px}.mode-switch{display:flex;gap:4px;background:#0d203e;padding:5px;border-radius:9px}.mode-switch button{flex:1;border:0;background:transparent;color:#d8e4f5;padding:9px 4px;font-size:14px;border-radius:6px}.mode-switch button[aria-pressed=true]{background:var(--gold);color:#162a43;font-weight:700}.controls h2{font-size:20px;margin:24px 0 6px}.controls p{font-size:14px;color:#c5d3e6;margin:0 0 20px}.controls label{display:block;font-size:14px;margin:16px 0 6px}.controls input{width:100%;min-width:0;padding:10px;border:1px solid #5a7090;border-radius:7px;background:#fff;color:var(--ink);height:46px}.primary,.secondary{width:100%;border-radius:7px;padding:11px 8px;margin-top:16px;border:1px solid var(--gold);font-weight:650}.primary{background:var(--gold);color:#132747}.secondary{background:transparent;color:#f3ddaa;margin-top:10px}.method{margin-top:25px;padding-top:20px;border-top:1px solid #50617b}.method strong{font-size:14px;color:#ead6a7}.method p{font-size:13px;margin:8px 0 12px}.utility button{background:none;border:0;color:#fff;padding:8px 0;text-decoration:underline;font-size:14px}.controls .error{margin-top:14px;color:#fff;background:#733c3c;padding:10px;border-radius:6px}.results{min-width:0}.result-heading{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;margin-bottom:14px;align-items:center}.result-heading span{color:#735923;font-weight:700}.result-heading strong{font-size:16px}.summary{display:grid;grid-template-columns:1fr 1.2fr;gap:16px}.pillars{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid var(--line);border-radius:12px;overflow:hidden;background:white}.pillar{text-align:center;border-right:1px solid var(--line)}.pillar:last-child{border:0}.pillar small{display:block;background:var(--blue);color:#fff;padding:5px;font-size:14px}.pillar b{display:block;font-size:28px;line-height:1.35;padding:10px 0 6px}.pillar span{font-size:12px;display:block;padding-bottom:9px}.info{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 16px;display:grid;grid-template-columns:repeat(2,1fr);gap:8px 14px}.info span{font-size:13px;color:var(--muted);display:block}.info b{font-size:14px;font-weight:600}.lunar{grid-column:1/-1}.chart-title{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:22px 0 10px}.chart-title h2{margin:0;font-size:20px}.chart-title span{font-size:13px;color:var(--muted)}.palaces{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));background:var(--gold);gap:2px;border:2px solid var(--gold);border-radius:12px;overflow:hidden}.palace{background:#fff;border:0;min-height:190px;padding:12px 14px;text-align:left;color:var(--ink);position:relative;display:flex;flex-direction:column;gap:7px}.palace:hover,.palace[aria-pressed=true]{background:#edf4ff;box-shadow:inset 0 0 0 2px #627fac}.palace-top,.symbols,.stems{display:flex;justify-content:space-between;gap:8px;align-items:center}.palace-top{font-size:13px;color:#65768a}.palace-top b{color:#715722}.symbols{font-size:15px}.door{font-size:30px;font-weight:600;text-align:center;line-height:1.5;margin:2px auto}.stems{font-size:22px}.stems small{font-size:12px;color:var(--muted);display:block}.flags{font-size:12px;color:#835515;min-height:19px}.center{background:#f3f6fa}.palace-detail{padding:18px 22px;background:#fff;border:1px solid var(--line);border-left:4px solid var(--gold);border-radius:8px;margin-top:18px}.palace-detail h3{font-size:18px;margin:0 0 7px}.palace-detail p{font-size:14px;margin:4px 0}.notes{font-size:14px;margin-top:20px;color:var(--muted)}.notes summary{cursor:pointer;color:var(--ink)}.hg-company-footer{margin-top:0}@media(max-width:850px){.workspace{grid-template-columns:1fr}.controls{position:static}.controls form{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px}.controls label{margin:4px 0;grid-row:1}.controls input{grid-row:2}.primary,.secondary{margin:6px 0}.method{margin-top:12px;padding-top:12px}.method p{display:inline-block;margin:8px 0 0}.controls h2{margin-top:16px}.controls p{margin-bottom:12px}.summary{grid-template-columns:1fr 1.2fr}.site-header{padding:12px 20px}.brand strong{font-size:17px}}@media(max-width:560px){main{padding:20px 12px 32px}.site-header{padding:12px;align-items:start}.site-header nav{flex-direction:column;gap:6px}.brand img{width:46px;height:46px}.brand strong{font-size:15px}.brand small{font-size:12px}.page-title{display:block}.zone{display:block;margin-top:7px}h1{font-size:27px}.controls{padding:18px}.summary{grid-template-columns:1fr}.palace{padding:8px 7px;min-height:166px;gap:5px}.palace-top,.flags{font-size:12px}.symbols{font-size:13px;gap:3px}.door{font-size:27px}.stems{font-size:20px}.chart-title span{font-size:12px}.chart-title h2{font-size:18px}.palace-detail{padding:14px}.result-heading strong{font-size:14px}.workspace{gap:20px}}@media print{body{background:white}.site-header nav,.controls,.notes,.skip,.hg-footer-contact,.hg-footer-qr{display:none!important}.site-header{background:white;color:var(--ink)}main{padding:12px 0}.workspace{display:block}.palace{min-height:155px;break-inside:avoid}.palaces,.summary{break-inside:avoid}.hg-company-footer{padding:12px}.hg-footer-grid{display:block}.page-title{margin-bottom:12px}}
@media(max-width:850px){.method p{display:block}.method strong{display:block}}
.natal-labels{font-size:12px;color:#725722;min-height:19px}.ages{font-size:13px;color:#5d6d80;text-align:center;border-top:1px solid #dde4ee;padding-top:4px}
/* Qimen brand correction: one blue-and-gold palette from header to footer. */
:root{--blue:#16385f;--ink:#f5f0df;--gold:#ddba68;--line:#43617f;--muted:#d2dfec}
body{background:#102c4c;color:var(--ink)}
.site-header{background:#102c4c;padding-top:18px;padding-bottom:18px}
.brand{gap:18px;min-width:0}.brand img{background:transparent;border-radius:0;width:92px;height:92px;flex-shrink:0}.brand strong{max-width:430px;font-size:22px;line-height:1.3;color:#f1d387}.brand small{font-size:16px;color:#eef2f7;margin-top:5px}
.site-header nav{gap:18px;align-items:center}.site-header nav a{font-size:14px;color:#eef3f9}.site-header nav a[aria-current]{color:#f1d387;border-bottom:1px solid #ddba68;padding-bottom:4px}
.page-title{display:block;text-align:center;margin:6px 0 18px}.page-title h1{color:#f1d387;font-size:38px;letter-spacing:.06em}.eyebrow{color:#e3c681}.zone{display:block;color:#d5e2ee;margin-top:8px}
.mode-switch{width:min(100%,440px);margin:0 auto 24px;border:1px solid #967f4b;background:#0c233f}.mode-switch button{padding:11px 18px;font-size:16px}.mode-switch button[aria-pressed=true]{background:#ddba68;color:#132b47}
.controls{background:#17395e;border:1px solid #4c6785;top:18px}.controls h2{margin-top:0;color:#f8f0dc}.controls p{color:#dae4ef}.controls input{background:#102b4d;color:#fff6e5;border-color:#8ca1b8;color-scheme:dark}.method{border-color:#59718e}.method strong{color:#f1d387}.utility button{color:#f1d387}
.result-heading span{color:#f1d387}.result-heading strong{color:#fff5dd}.pillars{background:#17395e;border-color:#6e85a1}.pillar{border-color:#6e85a1}.pillar small{background:#0d2747;color:#efd391}.pillar b{color:#fff5dd}.pillar span{color:#d6e3f1}
.info{background:#17395e;border-color:#6e85a1}.info span{color:#d0dfed}.info b{color:#fff5df}.chart-title span{color:#d0dfed}
.palaces{background:#ddba68;border-color:#ddba68}.palace{background:#193a61;color:#fff6e4}.palace:hover,.palace[aria-pressed=true]{background:#254f7c;box-shadow:inset 0 0 0 2px #efd18a}.center{background:#102c4c}.palace-top{color:#d3e0ed}.palace-top b{color:#f1d387}.symbols{color:#e3edf6}.symbols strong{color:#f1d387}.door{color:#fff0be}.stems small{color:#d3e0ed}.flags,.natal-labels{color:#f1d387}.ages{color:#e0e8f0;border-color:#5d7693}
.palace-detail{background:#17395e;border-color:#6e85a1;border-left-color:#ddba68}.palace-detail h3{color:#f1d387}.notes{color:#d7e3ef}.notes summary{color:#f1d387}.notes a{color:#f1d387}
footer.hg-company-footer{background:#102c4c;border-top:1px solid #ddba6877}.hg-company-footer strong{color:#f1d387}.hg-company-footer span,.hg-company-footer small,.hg-company-footer a,.hg-company-footer .hg-footer-copyright{color:#e7edf5}
@media(max-width:850px){.site-header{align-items:center}.brand strong{font-size:19px}.brand img{width:80px;height:80px}.site-header nav{gap:10px}.controls h2{margin-top:0}.method p{display:block}.method strong{display:block}}
@media(max-width:560px){.site-header{display:block;padding:16px}.brand{gap:14px}.brand img{width:76px;height:76px}.brand strong{font-size:18px;max-width:260px}.brand small{font-size:14px}.site-header nav{flex-direction:row;justify-content:center;gap:18px;margin-top:16px;flex-wrap:wrap}.site-header nav a{font-size:14px}.page-title h1{font-size:29px}.mode-switch{width:100%;margin-bottom:20px}.mode-switch button{font-size:16px}.palace-top,.flags,.natal-labels{color:#eed697}}
@media print{body{background:white;color:#172b49}.site-header{background:white}.brand strong,.brand small{color:#172b49}.mode-switch{display:none}.page-title h1,.zone,.eyebrow{color:#172b49}.pillars,.info,.palace,.palace-detail{background:white;color:#172b49}.pillar b,.pillar span,.info span,.info b,.palace-top,.palace-top b,.symbols,.symbols strong,.door,.stems small,.flags,.natal-labels,.ages,.palace-detail h3{color:#172b49}footer.hg-company-footer{background:white}.hg-company-footer strong,.hg-company-footer span,.hg-company-footer small,.hg-company-footer .hg-footer-copyright{color:#172b49}}
.strategy-visual{margin:0 0 36px;border:1px solid #b9934e70;border-radius:16px;overflow:hidden;background:#0a1c2c}.strategy-visual img{display:block;width:100%;height:auto}.strategy-visual figcaption{padding:16px 24px;display:flex;justify-content:space-between;gap:16px;align-items:center;color:#e4eaf1}.strategy-visual a,.strategy-link{color:#f1d387;font-weight:650;text-underline-offset:5px}#chart-tool{scroll-margin-top:24px}.strategy-next{margin-top:48px;padding:36px;border:1px solid #b9934e80;border-radius:16px;background:#143456}.strategy-next h2{font-size:30px;color:#f1d387;margin:8px 0 12px}.strategy-intro{max-width:850px;color:#e0e9f1}.strategy-options{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin-top:28px}.strategy-options article{padding:24px;background:#102c4c;border-top:2px solid #cfaa55}.strategy-number{color:#e5c27d;font-size:14px;letter-spacing:.08em}.strategy-options h3{font-size:21px;color:#fff1d1;margin:12px 0}.strategy-options p{color:#dce7f0;margin-bottom:24px}.strategy-link{display:inline-block;padding:10px 0}.strategy-reference{font-size:14px;color:#ccd9e7;margin:28px 0 0}@media(max-width:560px){.strategy-visual{margin-bottom:26px}.strategy-visual figcaption{padding:14px 16px;display:block;font-size:14px}.strategy-visual figcaption a{display:block;margin-top:8px}.strategy-next{padding:24px 18px;margin-top:32px}.strategy-next h2{font-size:25px}.strategy-options{grid-template-columns:1fr;gap:20px}.strategy-options article{padding:20px}}@media print{.strategy-visual,.strategy-next{display:none}}.stems{display:flex;flex-direction:column;gap:8px;margin:14px 0}.stems .stem-row{display:flex;align-items:center;justify-content:flex-start;gap:12px;text-align:left;padding:7px 10px;background:#0d2747;border-radius:6px}.stems .stem-row small{display:inline;font-size:14px;min-width:2em;color:#d3e0ed}.stems .stem-row b{font-size:28px;line-height:1.2}.stems .stem-row em{font-size:14px;font-style:normal;color:#dce7f0}.element-wood{color:#67dfba}.element-fire{color:#ff7378}.element-earth{color:#f1dfb2}.element-metal{color:#ffe066}.element-water{color:#77bbff}.flags .void-mark,.void-mark{color:#ff9298;font-weight:750}.flags{font-size:14px;min-height:22px}.palace-patterns{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px}.palace-patterns span{font-size:14px;line-height:1.4;color:#f2d69b;background:#0d2747;padding:4px 7px;border-radius:4px}.detail-stems{max-width:320px}.element-legend{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 20px;font-size:14px;margin:-8px 0 24px}.chart-patterns{margin:12px 0 20px;color:#f2d69b;font-size:16px}@media(max-width:560px){.stems .stem-row{padding:6px;gap:6px}.stems .stem-row b{font-size:24px}.stems .stem-row small,.stems .stem-row em{font-size:14px}.palace-patterns span{padding:3px 4px}}@media print{.stems .stem-row,.palace-patterns span{background:white}.stems .stem-row em{color:#172b49}.element-wood{color:#187638}.element-fire,.void-mark,.flags .void-mark{color:#b02430}.element-earth{color:#89501d}.element-metal{color:#886200}.element-water{color:#1264a1}}/* Brighter nine-palace board; keep the page's established blue and gold framing. */
.palaces{background:#c7a45d;border-color:#c7a45d}.palace{background:#faf4e6;color:#203650}.palace.center{background:#f2e5c8}.palace:hover,.palace[aria-pressed=true]{background:#fffaf0;box-shadow:inset 0 0 0 2px #b38b39}.palace .palace-top,.palace .palace-top b{color:#53647a}.palace .palace-top span{color:#203650;font-weight:700}.palace .symbols{color:#203650}.palace .symbols strong{color:#806019}.palace .door{color:#203650}.palace .stems .stem-row{background:#fffdf8;border:1px solid #dfd1b7}.palace .stems .stem-row small,.palace .stems .stem-row em{color:#485971}.palace .stems .stem-row b{padding:3px 8px;border-radius:5px;color:#152b3c}.palace .element-wood{background:#67dfba}.palace .element-fire{background:#ff7378}.palace .element-earth{background:#f1dfb2}.palace .element-metal{background:#ffe066}.palace .element-water{background:#77bbff}.palace .flags{color:#52627a}.palace .flags .void-mark{color:#b72532}.palace .palace-patterns span{background:#eee1c6;color:#554420;border:1px solid #d9c49b}.palace .natal-labels{color:#725212}.palace .ages{color:#53647a;border-color:#d4c29d}@media print{.palace,.palace.center{background:white}.palace .stems .stem-row{background:white}}.life-summary{padding:14px 18px;margin:14px 0;background:#141a22;color:#f5d583;border:1px solid #bfa25e;border-radius:8px;font-weight:700}.palace.natal-life{outline:3px solid #18202b;outline-offset:-3px}.life-badge{display:block;background:#151b24;color:#fff0bf;padding:5px 10px;margin:-4px -4px 12px;border-radius:5px;font-size:17px}.palace .natal-labels{font-size:14px;font-weight:650;line-height:1.8;padding-top:10px;border-top:1px solid #dacda9;margin-top:12px}@media print{.life-summary,.life-badge{background:#eee;color:#172b49}}
.palace-zone{display:inline-block;padding:3px 7px;border-radius:5px;font-size:14px;font-weight:750;white-space:nowrap}.palace .palace-top .palace-zone.zone-outer,.palace-zone.zone-outer{color:#fff;background:#197348}.palace .palace-top .palace-zone.zone-inner,.palace-zone.zone-inner{color:#fff;background:#2368ac}.palace .palace-top .palace-zone.zone-center,.palace-zone.zone-center{color:#53647a;background:#e9dec7}.palace-top b{display:flex;flex-wrap:wrap;align-items:center;gap:5px}.element-legend .zone-outer{color:#78e0a4}.element-legend .zone-inner{color:#8fc8ff}

.palace-zone{min-width:28px;height:28px;padding:0 5px;border-radius:50%;line-height:28px;text-align:center;font-size:18px}.palace .palace-top .palace-zone.zone-outer,.palace-zone.zone-outer{color:#12663e;background:#b8ebcf}.palace .palace-top .palace-zone.zone-inner,.palace-zone.zone-inner{color:#124f8c;background:#b8d9fb}

/* Five elements are expressed by the stem characters, without colored chips. */
.palace .stems .stem-row b{padding:0;border-radius:0;background:transparent}.palace .stems .stem-row b.element-wood{color:#16765a}.palace .stems .stem-row b.element-fire{color:#c83d46}.palace .stems .stem-row b.element-earth{color:#987442}.palace .stems .stem-row b.element-metal{color:#997000}.palace .stems .stem-row b.element-water{color:#2677b5}

.palace .door{background:transparent}.palace .door-wood{color:#16765a}.palace .door-fire{color:#c83d46}.palace .door-earth{color:#987442}.palace .door-metal{color:#997000}.palace .door-water{color:#2677b5}

.palace .door .palace-zone{margin-left:8px;font-size:18px;vertical-align:middle;background:transparent;border:2px solid currentColor;line-height:26px;height:30px;min-width:30px}.palace .door .zone-outer{color:#16765a}.palace .door .zone-inner{color:#2677b5}.palace .door .zone-center{color:#68717b}

/* Distinguish yellow metal from muted beige earth. */
.palace .door-metal,.palace .stems .stem-row b.element-metal{color:#d6ad00;text-shadow:0 .5px 0 #796600}.palace .door-earth,.palace .stems .stem-row b.element-earth{color:#95836b;text-shadow:none}

/* Keep natal separators, labels and age rows aligned at each palace bottom. */
.palace .natal-labels{margin-top:auto;padding-top:12px;min-height:calc(7.2em + 13px);flex-shrink:0}.palace .palace-patterns{margin-bottom:12px}.palace .ages{margin-top:0;min-height:26px;flex-shrink:0;border-top:0;padding-top:0}@media(max-width:560px){.palace .natal-labels{min-height:calc(10.8em + 13px)}}

/* Anchor all palace-specific notes together below the chart symbols. */
.palace .palace-bottom{margin-top:auto;display:flex;flex-direction:column;gap:7px;flex-shrink:0}
.palace .palace-bottom .palace-patterns{margin:0;min-height:28px;align-content:flex-start;align-items:flex-start}
.palace .palace-bottom .natal-labels{margin-top:0}
.palace .palace-bottom .ages{margin-top:0}

/* Compact life marker stays with palace meanings, without shifting chart rows. */
.palace .natal-labels .life-badge{display:inline-block;margin:0;padding:0 5px;font-size:inherit;line-height:inherit;border-radius:3px;vertical-align:baseline}

/* Compact board keeps the full nine palaces together on phones and paper. */
.chart-board-frame{width:100%}.palaces{transform-origin:top center}
.palace .natal-labels{min-height:0;padding-top:6px;line-height:1.4}
.palace .palace-bottom{gap:4px}
.palace .palace-bottom .palace-patterns{min-height:22px;gap:3px}
.palace .palace-patterns span{font-size:12px;padding:2px 4px}
.palace .ages{min-height:18px;font-size:12px;line-height:1.4}
.palace .stems{margin:6px 0;gap:4px}
@media(max-width:850px){
 .palace{padding:5px;gap:3px;min-height:0}
 .palace-top{font-size:10px;line-height:1.25;gap:2px}
 .symbols{font-size:11px;line-height:1.3;gap:2px}
 .palace .door{font-size:23px;line-height:1.3;margin:2px auto}
 .palace .door .palace-zone{font-size:13px;min-width:23px;height:23px;line-height:19px;margin-left:3px}
 .palace .stems .stem-row{padding:2px 4px;gap:5px}
 .palace .stems .stem-row small{font-size:10px}
 .palace .stems .stem-row b{font-size:22px}
 .palace .flags{font-size:10px;line-height:1.3;min-height:13px}
 .palace .palace-patterns span{font-size:10px;line-height:1.2;padding:2px 3px}
 .palace .natal-labels{font-size:10px;padding-top:4px}
 .palace .ages{font-size:10px;min-height:14px}
}
@page{size:A4 portrait;margin:10mm}
@media print{
 html,body{margin:0!important;padding:0!important;background:white!important}
 .site-header,.page-title,.strategy-visual,.strategy-next,.palace-detail,.chart-title span{display:none!important}
 main{width:190mm;max-width:none;padding:0!important;margin:0!important}
 .results{break-inside:avoid;page-break-inside:avoid}
 .result-heading{margin-bottom:3mm}.result-heading strong{font-size:11px}
 .summary{grid-template-columns:1fr 1.2fr;gap:3mm}
 .pillar small{padding:1px;font-size:10px}.pillar b{font-size:20px;padding:2px}.pillar span{font-size:9px;padding-bottom:2px}
 .info{padding:2mm;gap:2px 6px}.info span{font-size:9px}.info b{font-size:10px}
 .life-summary{grid-column:1/-1;margin:0;padding:2mm;font-size:11px}
 .chart-title{margin:3mm 0 2mm}.chart-title h2{font-size:14px}
 .chart-patterns{margin:2mm 0;font-size:11px}
 .chart-board-frame{height:auto!important}.palaces{transform:none!important;break-inside:avoid;page-break-inside:avoid;border-radius:0}
 .palace{min-height:0!important;padding:2mm;gap:2px}
 .palace-top,.symbols{font-size:11px;line-height:1.25}
 .palace .door{font-size:24px;line-height:1.2;margin:2px auto}
 .palace .stems{margin:3px 0;gap:3px}.palace .stems .stem-row{padding:2px 4px}
 .palace .stems .stem-row small{font-size:10px}.palace .stems .stem-row b{font-size:22px}
 .palace .flags{font-size:10px;min-height:12px;line-height:1.2}
 .palace .natal-labels,.palace .ages{font-size:10px;line-height:1.3}
 .palace .palace-bottom .palace-patterns{min-height:0!important}
 .palace .palace-patterns span{font-size:10px;line-height:1.2;padding:1px 3px}
 footer.hg-company-footer{padding:3mm 0!important;margin:3mm 0 0!important;break-inside:avoid}
 .hg-company-footer strong{font-size:11px}.hg-company-footer span,.hg-company-footer small,.hg-footer-copyright{font-size:9px}
 .palaces,.palace,.palace span,.palace b{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

.chart-print-footer{display:none}
@media print{
 footer.hg-company-footer{display:none!important}
 .chart-print-footer{display:flex;align-items:center;gap:3mm;margin-top:3mm;padding-top:2mm;border-top:1px solid #c7a45d;break-inside:avoid;page-break-inside:avoid;color:#172b49;line-height:1.35}
 .chart-print-footer img{width:10mm;height:10mm;object-fit:contain;flex-shrink:0}
 .chart-print-footer strong,.chart-print-footer span,.chart-print-footer small{display:block;font-size:9px;margin:0;padding:0}
 .workspace{margin:0!important;padding:0!important;gap:0!important}
 .results{margin:0!important;padding:0!important}
 .summary,.chart-board-frame{break-after:avoid;page-break-after:avoid}
}

.app-launch{display:none}.app-install{display:flex;align-items:center;gap:16px;margin-bottom:24px;padding:18px;border:1px solid #b9934e80;border-radius:12px;background:#102c4c}.app-install[hidden]{display:none}.app-install img{border-radius:12px;flex-shrink:0}.app-install strong{color:#f1d387;font-size:16px}.app-install p{margin:3px 0 8px;font-size:13px;color:#dce7f0}.app-install button{background:#cfaa55;color:#132747;padding:8px 14px;border:0;border-radius:6px;font-weight:650}.is-qimen-app .app-launch{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;background:radial-gradient(ellipse at center,#173955,#0b1d31 70%);color:#efd391;padding:24px}.app-launch img{width:min(64vw,300px);height:auto;border-radius:22%;box-shadow:0 18px 60px #0006}.app-launch h2{font-size:32px;letter-spacing:.2em;margin:22px 0 8px}.app-launch p{font-size:16px;margin:0 0 30px}.app-launch small{font-size:12px;color:#d4bc87}.is-qimen-app .strategy-visual{display:none}.is-qimen-app .site-header nav{display:none}.is-qimen-app .site-header{padding:10px 14px}.is-qimen-app .brand img{width:45px;height:45px}.is-qimen-app .brand strong{font-size:15px}.is-qimen-app .brand small{font-size:12px}@media print{.app-launch,.app-install{display:none!important}}

.header-install{display:inline-flex;align-items:center;gap:5px;white-space:nowrap;border:1px solid #cfaa5580;border-radius:6px;padding:5px 8px;background:transparent;color:#f1d387;font-size:12px;line-height:1.4}.header-install:hover{background:#cfaa5520}.header-install[hidden]{display:none}.site-header nav{align-items:center}@media(max-width:560px){.site-header nav{gap:10px}.header-install{font-size:12px;padding:4px 6px}}@media print{.header-install{display:none!important}}
