.sky-atlas {
  --atlas-gold: #edca79;
  --atlas-violet: #d0b0ff;
  --atlas-teal: #78d5d2;
  --atlas-void: #0b121e;
  max-width: 1160px;
}
.sky-atlas > section { margin-top: 3.2rem; scroll-margin-top: 5rem; }
.sky-atlas h1 { font-family: Georgia, serif; font-weight: 500; }
.sky-atlas h2, .sky-atlas h3 { line-height: 1.2; }
.sky-atlas h3 { color: var(--text); }
.atlas-jumps, .atlas-control-row, .atlas-layers, .atlas-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem;
}
.atlas-jumps { margin-top: 1.4rem; }
.atlas-jumps a { padding: .35rem .65rem; border: 1px solid var(--border); border-radius: 6px; }
.atlas-intro, .observe-steps { max-width: 80ch; }
.observe-steps li + li { margin-top: .75rem; }
.atlas-workbench, .atlas-lab, .atlas-history article, .constellation-card {
  border: 1px solid #2b374c; border-radius: 12px; background: #131c2b;
}
.atlas-workbench { padding: clamp(.6rem, 2vw, 1.4rem); }
.rashi-choices { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .45rem; }
.sky-atlas button, .sky-atlas select {
  background: #182336; color: var(--text); border: 1px solid #394765; border-radius: 8px;
  padding: .5rem .6rem; width: auto; min-width: 0; cursor: pointer;
}
.rashi-choices button { display: grid; justify-items: center; gap: .1rem; font-size: .85rem; }
.zodiac-glyph { font-family: "Segoe UI Symbol", "DejaVu Sans", sans-serif; color: var(--atlas-gold); }
.rashi-choices .zodiac-glyph { font-size: 1.45rem; line-height: 1.1; }
.sky-atlas button[aria-pressed="true"] { color: #ffe4a6; border-color: #d6a548; background: #382d22; }
.atlas-control-row { margin: 1rem 0 .65rem; font-size: .9rem; }
.atlas-control-row select { max-width: 100%; }
.atlas-layers { border: 0; padding: 0; margin: 0; min-width: 0; }
.atlas-layers legend { color: var(--muted); font-size: .8rem; }
.atlas-layers label { white-space: nowrap; }
.atlas-layers input { min-height: auto; accent-color: var(--atlas-teal); }
.atlas-map-frame { margin: 0; background: var(--atlas-void); border: 1px solid #273449; border-radius: 10px; }
.sky-atlas svg { display: block; width: 100%; height: auto; }
.atlas-legend { padding: .75rem 1rem; font-size: .82rem; border-top: 1px solid #243248; }
.atlas-legend span::before { content: ''; display: inline-block; width: .85rem; margin-right: .4rem; vertical-align: .15rem; border-top: 2px solid; }
.key-rashi { color: var(--atlas-gold); }
.key-station { color: var(--atlas-violet); }
.key-ecliptic, .key-figure { color: var(--atlas-teal); }
.atlas-legend .key-boundary::before { border-top-style: dashed; }
.key-star { color: #ffc878; }
.atlas-legend .key-star::before { width: .43rem; height: .43rem; border: 1px solid; border-radius: 50%; vertical-align: .05rem; }
.atlas-ruler { margin-top: 1rem; }
.atlas-ruler h3 { margin: 0 0 .55rem; }
#pada-ruler { display: flex; flex-wrap: wrap; gap: .4rem; }
#pada-ruler button { flex: var(--padas) 1 6rem; display: grid; gap: 0; }
#pada-ruler span { color: var(--atlas-violet); }
#pada-ruler small { color: #b9c5d7; }
#station-detail { margin-bottom: 0; }
.atlas-field { fill: #0e1828; }
.atlas-gridline { fill: none; stroke: #7284a4; stroke-opacity: .2; }
.atlas-ecliptic { fill: none; stroke: #a7ece2; stroke-width: 1.1; stroke-dasharray: 6 4; }
.map-rashi-zone { fill: #bd8732; fill-opacity: .14; }
.map-station-zone { fill: #a177e9; fill-opacity: .20; }
.map-rashi-line { stroke: #d9aa58; stroke-width: 1.4; }
.map-station-line { stroke: #c2a3ff; stroke-opacity: .43; stroke-dasharray: 2 4; }
.atlas-boundary { fill: none; stroke: #758aac; stroke-width: .85; stroke-dasharray: 4 4; opacity: .44; }
.atlas-boundary.is-selected { stroke: #b5c4df; opacity: .75; }
.atlas-figure { fill: none; stroke: #78b9d1; stroke-width: 1; opacity: .38; }
.atlas-figure.is-selected { stroke: #8ce2dc; stroke-width: 1.4; opacity: .9; }
.atlas-star { fill: #f0f5ff; opacity: .83; }
.atlas-landmark { stroke: #ffc878; fill: transparent; stroke-width: 1; }
.atlas-landmark.is-selected { stroke-width: 2; }
.map-tick,.map-axis,.map-band,.map-figure-name,.map-star-name { fill: #a9bada; font: 12px system-ui; }
.map-axis { font-size: 11px; letter-spacing: 1.2px; }
.map-band { fill: #dcc7ff; font-size: 10px; }
.map-band.is-selected { fill: #f2e1ff; font-weight: 700; }
.map-figure-name,.map-star-name { paint-order: stroke; stroke: #0b121e; stroke-width: 3px; stroke-linejoin: round; }
.map-figure-name { fill: #97b5cd; }
.map-star-name { fill: #f1d09a; font-size: 9px; }
.map-star-name.is-selected, .map-figure-name.is-selected { font-size: 12px; font-weight: 700; }
.constellation-gallery { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: .75rem; }
.constellation-card { margin: 0; overflow: hidden; }
.constellation-card svg { background: #0b1422; }
.constellation-card figcaption { padding: .65rem .55rem; display: flex; align-items: center; gap: .5rem; }
.constellation-card figcaption span { display: block; font-size: .83rem; color: #adbdd5; }
.constellation-card .zodiac-picture { width: 2.1rem; flex: 0 0 2.1rem; background: transparent; }
.zodiac-picture path { fill: none; stroke: var(--atlas-gold); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.atlas-labs, .atlas-history { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.atlas-lab, .atlas-history article { padding: clamp(.85rem, 2vw, 1.3rem); }
.atlas-lab h3, .atlas-history h3 { margin: .2rem 0 .7rem; }
.atlas-lab svg { background: var(--atlas-void); border-radius: 8px; margin-bottom: .7rem; }
.atlas-lab label, .pi-demo label { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.atlas-lab input, .pi-demo input { display: block; width: 100%; accent-color: var(--atlas-gold); }
.lab-result { display: block; color: #f6d990; font-weight: 650; margin-top: .5rem; overflow-wrap: anywhere; }
.atlas-lab svg text { text-anchor: middle; fill: #c4d6e9; font: 14px system-ui; }
.atlas-lab svg .lab-angle { fill: #f6d990; }
.lab-guide { fill: none; stroke: #7284a4; stroke-dasharray: 4 4; }
.lab-shape { fill: #264453; fill-opacity: .55; stroke: #91dfd6; stroke-width: 1.3; }
.lab-dot { fill: #ffd48c; }
.lab-cord { fill: none; stroke: #f6c87e; stroke-width: 2; stroke-dasharray: 5 3; }
.lab-board { fill: none; stroke: #e4aa61; stroke-width: 8; stroke-linecap: round; }
.atlas-history .atlas-memory { grid-column: 1 / -1; }
@media (max-width: 700px) {
  .rashi-choices { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .atlas-labs, .atlas-history { grid-template-columns: 1fr; }
  .map-band,.map-tick { font-size: 13px; }
}
@media (max-width: 400px) {
  .atlas-legend { gap: .45rem .75rem; }
  .rashi-choices { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
