/* Use the established jade controls in normal document flow at every width. */
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .luck-timeline {
  padding:24px 12px 0; background:#f6f9ef; mask-image:none; overflow:visible;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .luck-timeline::before {
  height:260px; background:url('/assets/luck-jade-ground-dde7c0a1f9d6.webp') center top/100% auto no-repeat;
  mask-image:linear-gradient(to right,transparent,#000 16px,#000 calc(100% - 16px),transparent),linear-gradient(transparent,#000 10%,#000 65%,transparent);
  mask-composite:intersect;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .luck-timeline>h3 {
  position:static; width:92%; max-width:360px; height:66px; min-height:0; margin:0 auto 18px; padding:0 12%;
  background:var(--axis-title) center/100% auto no-repeat;
  font-size:28px; line-height:1.25; letter-spacing:.04em;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .year-controls {
  position:static; width:100%; height:auto; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr) minmax(0,1fr);
  gap:8px; margin:0 0 20px;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .year-controls>* {
  height:44px; min-height:44px; padding:6px 3px; font-size:16px; line-height:1.3;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .year-controls>button {
  border:10px solid transparent; border-image:var(--axis-control) 20 30 fill / 10px 14px / 0 stretch;
  background:none; padding:0;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .year-controls>select {
  padding-left:4px; padding-right:18px; border:1px solid #c6b278; border-radius:9px;
  background-color:#fffef8; background-size:10px auto; background-position:right 7px center;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years {
  position:static; width:100%; height:auto; grid-template-columns:repeat(5,minmax(0,1fr));
  grid-template-rows:repeat(2,112px); gap:8px 0; margin:0;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button {
  height:112px; min-height:44px; padding:21px 0 0; gap:4px; font-size:13px; line-height:17px;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button::before {
  content:''; position:absolute; top:0; left:calc(50% - 7px); width:14px; height:14px;
  border:0; border-radius:0; background:var(--axis-node) center/contain no-repeat;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button::after {
  content:''; position:absolute; top:7px; left:0; right:0; height:1px; z-index:-1; background:#c6a555;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button b {font-size:22px;line-height:26px}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button small {
  padding:1px 4px; min-height:18px; font-size:11px; line-height:16px;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year {
  padding-top:21px; gap:4px; font-size:13px; line-height:17px;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year b {font-size:22px;line-height:26px}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year::before {
  top:-9px; left:2px; width:calc(100% - 4px); height:114px; background:var(--axis-token) center/100% 100% no-repeat;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year::after {content:none}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year small {
  top:72px; left:calc(50% - 17px); width:34px; height:19px; min-height:19px; padding:0; font-size:11px; line-height:17px;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year:has(small+small) small {
  left:calc(50% - 23px); width:23px; font-size:11px;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year:has(small+small) small+small {left:50%}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year:has(small+small) small:not(.handoff-mark) {display:none}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year:has(small+small) small.handoff-mark {
  left:calc(50% - 17px); width:34px; border:1px solid #d1ad5e; border-radius:999px; font-size:11px;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .viewing-year {
  position:static; width:100%; height:auto; min-height:58px; margin:12px 0 26px; padding:12px 18px;
  background:var(--axis-banner) center/100% 100% no-repeat; font-size:15px; line-height:1.45; gap:5px;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .viewing-year.is-multiline {
  min-height:72px; padding:12px 18px; gap:3px; font-size:13px; line-height:1.45;
 }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .viewing-year.is-multiline .viewing-year-luck {white-space:normal}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year::before {
    top: -5px;
    left: 0;
    width: 100%;
  }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button:not(.selected-year)::before {
    top: -4px;
    left: calc(50% - 11px);
    width: 22px;
    height: 22px;
  }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button:not(.selected-year)::after {
    background: linear-gradient(to right, #c6a555 0 calc(50% - 10px), transparent calc(50% - 10px) calc(50% + 10px), #c6a555 calc(50% + 10px));
  }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year::before {
    clip-path: inset(18% 0 0);
  }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year::after {
    content: '';
    position: absolute;
    top: 7px;
    left: 0;
    right: 0;
    height: 1px;
    z-index: -1;
    background: linear-gradient(to right, #c6a555 0 calc(50% - 12px), transparent calc(50% - 12px) calc(50% + 12px), #c6a555 calc(50% + 12px));
  }
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years>button.selected-year>span::before {
    content: ''; position:absolute; top:-4px; left:calc(50% - 11px);
    width:22px; height:22px; background:var(--axis-node) center/contain no-repeat;
    pointer-events:none;
  }
.celestial-site.celestial-palace .result-paper #chart-reading-content{box-sizing:border-box;width:100%;max-width:860px;margin-inline:auto}
.celestial-site.celestial-palace .result-paper #chart-reading-content :is(.chart-analysis,.pillar-inspector,.relation-explorer,.chart-supplements,.supplemental-reading,.name-depth){box-sizing:border-box;width:100%;max-width:none;margin-inline:0}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .luck-timeline{padding:24px 0 0;background:#f6f9ef;overflow:visible;mask-image:none}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .luck-timeline>h3{font-size:28px;height:66px;max-width:360px;padding:0 32px}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .year-controls{max-width:480px;margin:0 auto 24px;box-sizing:border-box}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .years{max-width:600px;margin:0 auto 12px;box-sizing:border-box}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .year-quick-controls{width:100%;max-width:480px;margin:0 auto 8px;padding:0;background:none;border:0}
.celestial-site.celestial-palace #chart-years .year-quick-controls .tool-controls{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:16px;margin:0}
.celestial-site.celestial-palace #chart-years .year-quick-controls label{display:flex;flex-direction:column;align-items:stretch;gap:4px;min-width:0;font-size:13px}
.celestial-site.celestial-palace #chart-years .year-quick-controls :is(button,input){box-sizing:border-box;width:100%!important;min-width:0;min-height:44px;margin:0}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .viewing-year{max-width:600px;margin:16px auto 24px}
.celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .year-reading{margin:0 auto 32px;padding-inline:0;background:none}
.celestial-site.celestial-palace .result-paper .jade-chart .chart-supplements .stars-grid{align-items:start;gap:10px 16px}
.celestial-site.celestial-palace .result-paper .jade-chart .chart-supplements .star-row{min-height:0;padding:12px 16px}
.celestial-site.celestial-palace .result-paper .jade-chart .chart-supplements .star-row:not(.star-present){background:transparent;border-color:#d7d6bf}
.celestial-site.celestial-palace .result-paper .jade-chart .chart-supplements .star-row p{margin-block:0}
.celestial-site.celestial-palace .result-paper .jade-chart .chart-supplements .star-empty{color:#506357}
@media(max-width:680px){
 .celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .luck-timeline>h3{font-size:24px}
 .celestial-site.celestial-palace #chart-years .year-quick-controls .tool-controls{gap:12px}
 .celestial-site.celestial-palace .result-paper .jade-chart .chart-supplements .star-row{padding:10px 12px}
}
/* Keep rows aligned while reducing space within the reference cards. */
.celestial-site.celestial-palace .result-paper .jade-chart .chart-supplements .stars-grid{align-items:stretch}
.celestial-site.celestial-palace .result-paper .jade-chart .chart-supplements .star-hit{line-height:1.6}
.celestial-site.celestial-palace .result-paper .jade-chart .chart-supplements .star-hit+.star-hit{margin-top:2px}
/* Compact related details without collapsing any chart content. */
@media(max-width:680px){
 .celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .year-reading{margin-bottom:16px;padding-bottom:8px}
 .celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .temporal-study{margin-top:0;padding-top:0}
 :root body .celestial-site.celestial-palace #chart-conclusion .relation-pillars{width:min(100%,300px);padding-bottom:12px}
}
@media(max-width:480px){
 .celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .journey-rail li,
 .celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .journey-rail li[data-active=true]{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-rows:auto auto;column-gap:8px;row-gap:2px;min-height:80px!important;padding:12px!important}
 .celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .journey-rail strong{grid-column:1;grid-row:1;align-self:end;text-align:center;font-size:22px;line-height:1.25}
 .celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .journey-dates{grid-column:1;grid-row:2;align-self:start;text-align:center;font-size:12px;line-height:1.5}
 .celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .journey-selected{grid-column:2;grid-row:1 / 3;align-self:center;min-width:0}
 .celestial-site.celestial-palace.celestial-palace #chart-years#chart-years .journey-current-label{max-width:100%;box-sizing:border-box}
}
