/* Layout follows data groups; keep short chart terms intact. */
.celestial-site.celestial-palace :is(.pillar-inspector,.temporal-study,.name-depth){box-sizing:border-box;width:100%;max-width:860px;margin-inline:auto}
.celestial-site.celestial-palace .ziwei-board{max-width:860px;margin-inline:auto}
.celestial-site.celestial-palace :is(.pillar-inspector,.temporal-study) :is(table,th,td){box-sizing:border-box}
.celestial-site.celestial-palace :is(.pillar-inspector,.temporal-study) table{width:100%;min-width:0!important;table-layout:fixed}
.celestial-site.celestial-palace :is(.pillar-inspector,.temporal-study) :is(th,td){padding:10px 2px!important;word-break:normal;overflow-wrap:normal}
.celestial-site.celestial-palace :is(.pillar-inspector,.temporal-study) th:first-child{width:64px!important;white-space:nowrap}
.celestial-site.celestial-palace :is(.pillar-inspector,.temporal-study) td{white-space:normal}
.celestial-site.celestial-palace .pillar-inspector :is(td,.tool-hidden){word-break:keep-all}
.celestial-site.celestial-palace .temporal-table-group td{word-break:keep-all}
.celestial-site.celestial-palace .temporal-tables{display:grid;gap:24px;margin-block:16px 24px}
.celestial-site.celestial-palace .pillar-inspector .tool-controls[aria-label$="定位"]{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;margin-block:16px}
.celestial-site.celestial-palace .pillar-inspector .tool-controls[aria-label$="定位"]>span{grid-column:1/-1}
.celestial-site.celestial-palace .pillar-inspector .tool-controls[aria-label$="定位"] button{min-width:0;padding:8px 2px;white-space:nowrap}
.celestial-site.celestial-palace .ziwei-majors{display:flex;flex-wrap:wrap;gap:0 5px;align-content:start}
.ziwei-star-name{display:inline-block;white-space:nowrap}
.celestial-site.celestial-palace #chart-years#chart-years .luck-timeline{display:flex;flex-direction:column}
.celestial-site.celestial-palace #chart-years#chart-years .year-reading{order:1;margin:24px auto 32px;width:100%;max-width:860px;box-sizing:border-box}
.celestial-site.celestial-palace #chart-years#chart-years .luck-journey{order:2}
.celestial-site.celestial-palace #chart-years#chart-years .handoff-note{order:3}
.celestial-site.celestial-palace #chart-years#chart-years .temporal-study{order:4}
.celestial-site.celestial-palace #chart-years#chart-years .journey-current-year{display:block!important}
@media(max-width:680px){
 .celestial-site.celestial-palace :is(.pillar-inspector,.temporal-study){padding-inline:0!important}
 .celestial-site.celestial-palace .pillar-inspector .tool-controls[aria-label="十神定位"]{grid-template-columns:repeat(4,minmax(0,1fr))}
 .celestial-site.celestial-palace #chart-years#chart-years .journey-rail li{min-height:76px!important;height:auto!important;grid-template-columns:30% 22% 48%!important;padding-block:12px!important}
 .celestial-site.celestial-palace #chart-years#chart-years .journey-selected{display:flex!important;flex-direction:column!important;align-items:center!important;gap:3px!important;white-space:normal!important}
 .celestial-site.celestial-palace #chart-years#chart-years .journey-current-label{white-space:normal!important;text-align:center;line-height:1.4!important}
}
