.map-shell{max-width:1540px;margin:0 auto}.map-shell .hero h1{font-size:clamp(1.9rem,3vw,2.8rem)}.chart-workspace{display:grid;grid-template-columns:320px minmax(0,1fr);gap:24px;align-items:start}.chart-inputs h2,.combined-card h2{font-size:1.15rem;margin:0}.chart-inputs label{display:flex;flex-direction:column;gap:8px;font-weight:700;font-size:.86rem;margin-top:18px}.chart-inputs input,.chart-inputs select{font:inherit;font-weight:500;color:var(--ink);padding:12px;border:1px solid #cdc7bb;border-radius:9px;background:#fff;min-width:0;width:100%;box-sizing:border-box}.chart-inputs input:focus,.chart-inputs select:focus{outline:2px solid var(--gold);outline-offset:2px}.chart-inputs .hint{font-size:.72rem;line-height:1.6}.chart-divider{height:1px;background:var(--line);margin:22px 0 8px}.chart-options{margin:18px 0;font-size:.8rem}.chart-options summary{cursor:pointer}.chart-inputs .primary{width:100%;margin-top:12px}.chart-output{min-width:0}.combined-card{padding:24px}.combined-card>p{font-size:.85rem;line-height:1.7}.chart-legend{display:flex;flex-wrap:wrap;gap:12px 20px;font-size:.75rem;padding:12px 0 18px;color:#344c43}.chart-legend span{display:inline-flex;gap:6px;align-items:center}.chart-legend i{display:inline-block;width:8px;height:8px;border-radius:50%}.legend-mountain{background:#295d47}.legend-period{background:#b64232}.legend-facing{background:#315e95}.combined-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:#d7cebc;border:1px solid #d7cebc;border-radius:12px;overflow:hidden}.combined-cell{position:relative;background:#fff;padding:14px;min-width:0;text-align:center}.combined-cell[data-palace="Trung Cung"]{background:#fff}.combined-cell.is-facing{box-shadow:inset 0 0 0 2px #a87920}.combined-cell.is-sitting{box-shadow:inset 0 0 0 2px #517763}.cell-heading{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:7px;min-height:28px;font-size:.86rem}.cell-heading h3{font-size:inherit;margin:0}.cell-badge{font-size:.65rem;border-radius:5px;background:#efe5cf;padding:3px 6px}.natal-stars{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;margin:12px 0 14px}.star-entry{margin:0;display:flex;flex-direction:column;align-items:center;gap:2px}.star-entry dt{font-size:.66rem;font-weight:700}.star-entry dd{font-size:2rem;font-weight:800;margin:0;line-height:1.3}.star-mountain{color:#295d47}.star-period{color:#b64232}.star-facing{color:#315e95}.temporal-cell-stars{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 12px;padding-top:12px;border-top:1px solid #e5dfd2}.temporal-cell-stars .star-entry{flex-direction:row;justify-content:space-between}.temporal-cell-stars dt{font-size:.68rem;color:#5c625b}.temporal-cell-stars dd{font-size:1.15rem;color:#263d34}.chart-placeholder{grid-column:1/-1;background:#fffefa;padding:80px 24px;text-align:center;color:var(--muted);margin:0;line-height:1.8}.combined-card .chart-reading{font-size:.74rem;color:var(--muted);margin-bottom:0}.chart-warnings{margin-top:16px;padding:12px 16px;border-left:3px solid #b67524;border-radius:6px;background:#fff5dc;color:#825119;font-size:.85rem;line-height:1.65}.chart-warnings p{margin:4px 0}.chart-interpretation{margin-top:24px}.chart-interpretation h2{font:1.5rem/1.35 'DM Serif Display',serif;margin:0}.chart-interpretation .hk-guest-summary{margin-top:18px}.chart-interpretation .chart-scope{font-size:.78rem;line-height:1.7;color:#5f675f}.chart-admin-pattern{margin-top:16px;line-height:1.7}.chart-admin-pattern h3{font-size:1rem}.chart-status-error{color:#a33120}.chart-status-success{color:#295d47}#chart-status{font-size:.8rem;line-height:1.65;overflow-wrap:anywhere}#chart-calendar{overflow-wrap:anywhere}
@media(max-width:1000px){.chart-workspace{grid-template-columns:270px minmax(0,1fr);gap:16px}.combined-card{padding:16px}.combined-cell{padding:10px}.temporal-cell-stars{gap:6px}.star-entry dd{font-size:1.7rem}}
@media(max-width:800px){.chart-workspace{display:block}.chart-inputs{margin-bottom:20px}.chart-inputs form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}.chart-inputs .hint,.chart-divider,.chart-options,#chart-submit,#chart-status{grid-column:1/-1}.chart-inputs .analysis-title{margin-bottom:0}.combined-card{padding:16px}.chart-interpretation{padding:18px}}
@media(max-width:480px){.chart-inputs form{display:block}.combined-card{padding:12px}.combined-cell{padding:8px 5px}.cell-heading{min-height:38px;gap:3px;font-size:.69rem}.cell-badge{font-size:.56rem;padding:2px 4px}.natal-stars{gap:0;margin:8px 0 10px}.star-entry dt{font-size:.55rem}.star-entry dd{font-size:1.35rem}.temporal-cell-stars{gap:6px 4px;padding-top:8px}.temporal-cell-stars .star-entry{flex-direction:column;gap:0}.temporal-cell-stars dt{font-size:.57rem}.temporal-cell-stars dd{font-size:1rem}.chart-legend{gap:8px 12px;font-size:.66rem}.chart-interpretation .interpretation-head{display:block}.chart-interpretation h2{font-size:1.35rem}}

/* Keep names available to screen readers; show only the four temporal numbers. */
.temporal-cell-stars dt{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}.temporal-cell-stars .star-entry{justify-content:center}

.natal-stars>.star-mountain{grid-column:1;grid-row:1}.natal-stars>.star-facing{grid-column:3;grid-row:1}.natal-stars>.star-period{grid-column:2;grid-row:2}

/* Number color follows the star's element, independently of its layer. */
.natal-stars .star-entry dt{color:#42564c}.star-entry dd[data-element="water"]{color:#111111}.star-entry dd[data-element="wood"]{color:#00843d}.star-entry dd[data-element="fire"]{color:#df2028}.star-entry dd[data-element="earth"]{color:#ad6800}.star-entry dd[data-element="metal"]{color:#666666}
.chart-legend .element-water{background:#111111}.chart-legend .element-wood{background:#00843d}.chart-legend .element-fire{background:#df2028}.chart-legend .element-earth{background:#ad6800}.chart-legend .element-metal{background:#666666}

.chart-orientation{margin:16px 0;padding:16px;border:1px solid var(--line);border-radius:10px;background:#fff}.chart-orientation h3{margin:0 0 12px;font-size:1rem}.chart-orientation p{font-size:.82rem;line-height:1.7;margin:6px 0}.chart-orientation-block{margin:12px 0;padding-bottom:8px;border-bottom:1px solid var(--line)}.chart-orientation-block strong{font-size:.88rem}.chart-admin-pattern{padding:16px;border:1px solid var(--line);border-radius:10px;background:#fff}.chart-admin-pattern summary{font-weight:800;cursor:pointer}

.palace-reading{background:#fff;border:1px solid #d9e1dc;border-radius:12px;padding:20px;margin:18px 0;overflow-wrap:anywhere}.palace-reading h3{margin-top:0}.palace-assessment{font-weight:600;color:#665222}.palace-reading-section{margin-top:16px}.palace-reading-section h4{margin:0 0 5px;font-size:1rem}.palace-reading-section p{margin:0;line-height:1.7}@media(max-width:480px){.palace-reading{padding:14px}}

.palace-brief{padding-left:20px;margin:12px 0}.palace-brief li{margin:8px 0;line-height:1.6}.palace-technical{border-top:1px solid #e4e8e5;padding-top:12px;margin-top:14px}.palace-technical summary{cursor:pointer;color:#365944;font-weight:600}

.palace-star-facts{padding:10px 0;border-bottom:1px solid #e4e8e5}.palace-star-facts p{margin:5px 0;line-height:1.6}

.cell-gua{display:block;font-size:11px;font-weight:400;color:#59675f;line-height:1.4}.annual-palace-reading{padding:16px 0;border-top:1px solid #d9e1dc;overflow-wrap:anywhere}.annual-palace-reading h4{margin:0;font-size:1rem}.annual-palace-reading p{line-height:1.7;margin:8px 0}.annual-palace-reading summary{cursor:pointer;color:#365944}.annual-palace-reading li{margin:7px 0}

.cell-top{min-height:116px}.cell-top .cell-heading{justify-content:center;align-items:center;text-align:center;padding-right:0;flex-direction:column;gap:3px}.cell-markers{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px 8px;margin-top:8px}.direction-marker{display:inline-flex;align-items:center;justify-content:flex-end;gap:3px;border:0;border-radius:4px;background:transparent;padding:4px 2px;font-weight:600;font-family:inherit;font-size:11px;line-height:1.3;cursor:pointer;color:#923e38;white-space:nowrap}.direction-marker:hover{background:#f5f1e9}.direction-marker:focus-visible{outline:2px solid #376885;outline-offset:2px}.direction-marker svg{width:15px;height:15px;flex-shrink:0}.marker-mountain{color:#825817}.marker-water{color:#246c92}.chart-marker-scope{font-size:.78rem;line-height:1.6;color:#59675f}#chart-marker-dialog{width:min(440px,calc(100% - 32px));max-height:80vh;overflow:auto;border:1px solid #d9e1dc;border-radius:12px;padding:22px;color:#263d34;background:white;box-sizing:border-box}#chart-marker-dialog::backdrop{background:#0006}#chart-marker-dialog p{line-height:1.65}#marker-dialog-close{float:right;padding:8px 12px;cursor:pointer}#marker-dialog-title{margin:8px 0 18px}
@media(max-width:1100px){.cell-top{min-height:142px}.cell-top .cell-heading{justify-content:center;text-align:center;padding-right:0}.cell-markers{margin-top:8px}.direction-marker{font-size:10px;padding:3px 2px}.direction-marker svg{width:13px;height:13px}}
@media(max-width:480px){.cell-top{min-height:148px}.cell-markers{margin-top:6px}.direction-marker{font-size:10px}.cell-top .cell-heading{min-height:46px}}

/* Facing/sitting badges stay separate from the centered palace heading. */
.cell-top{position:relative}.cell-top .cell-badge{position:absolute;top:0;right:0;margin:0}
@media(max-width:480px){.cell-top .cell-badge{font-size:.5rem;padding:1px 2px;right:-3px;top:-6px}}

/* Ring only annual 2 and 5; keep the original element color and number alignment. */
.annual-star-highlight{position:relative}.annual-star-highlight::after{content:"";position:absolute;left:50%;top:50%;width:1.65em;height:1.65em;transform:translate(-50%,-50%);border:1.5px solid currentColor;border-radius:50%;pointer-events:none;box-sizing:border-box}

.cheng-men-marker{display:inline-flex;justify-content:center;max-width:100%;white-space:normal;border:1px solid currentColor;border-radius:5px;padding:3px 5px;font-weight:600;font-family:inherit;font-size:10px;line-height:1.4;background:#fff;cursor:pointer;color:#62665f}.cheng-formal_match{color:#286044}.cheng-review_five{color:#895b1f}.cheng-men-marker:focus-visible{outline:2px solid #376885;outline-offset:2px}
