/* Night sky on phones and small tablets (Matt, 2026-10-23: the pinned map left "an inch" of screen to scroll the story
   through). Now the star map, its time controls and tonight's story carousel share ONE screen-sized panel (.sky__stage)
   that snaps into place under the header when people scroll near it; nothing scrolls underneath it. The title and intro
   come before the panel, the facts and "how to read the map" after it. sky-phone.js moves the existing nodes into the
   panel (and back on wider screens). Desktop unchanged. Previous pinned version: work/archive/sky-phone-pinned-20261022c. */
.sky__stage, .sky__dots { display: none; }
@media (max-width: 900px) {
  .sky__grid { grid-template-columns: minmax(0, 1fr); }
  .sky__grid > * { min-width: 0; }  /* the card row must not widen the text column */
  .sky__copy { position: relative; }
  .sky__stage { display: flex; flex-direction: column; position: relative; margin: 26px calc(-1 * var(--gutter)) 0; padding: 4px var(--gutter) 18px; }
  .sky__mapbox { display: grid; place-items: center; padding: 22px; }  /* room for the N E S W letters around the dome */
  .sky__stage .sky__dome { order: 0; width: min(calc(100vw - 2 * var(--gutter) - 48px), 52svh); max-width: none; margin: 0; opacity: 1; transform: none; }
  .sky__stage .sky__dome canvas { touch-action: pan-y; }  /* up and down scrolls the page; sideways drags move through the night */

  .sky__stage .sky__when { margin: 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 12px; }
  .sky__stage .sky__when label { grid-row: 1; grid-column: 1; margin: 0; font-size: 24px; white-space: nowrap; }
  .sky__stage .sky__when .sky__days { grid-row: 1; grid-column: 2; margin: 0; justify-self: end; gap: 8px; flex-wrap: nowrap; }
  .sky__stage .sky__when input[type=range] { grid-row: 2; grid-column: 1 / -1; margin: 0; height: 28px; }
  .sky__stage .sky__days .sky__date { width: auto; min-width: 0; height: 32px; padding: 0 12px; font-size: 13px; white-space: nowrap; flex: 0 0 auto; }
  .sky__stage .sky__days button[data-sky-day] { width: 30px; height: 30px; flex: 0 0 auto; }
  .sky__stage .sky__days .sky__today { position: absolute; right: 0; top: calc(100% + 2px); white-space: nowrap; }
  .sky__cal { position: fixed; left: 12px; right: 12px; bottom: 12px; top: auto; width: auto; max-width: 420px; margin: 0 auto; }

  /* Tonight's story: one card at a time, the next one peeking, dots underneath. */
  .sky__stage .sky__storytitle { margin: 12px 0 8px; }
  .sky__stage #skyStory { margin-top: 12px; }
  .sky__story { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-padding: 0 var(--gutter); border-top: 0; -webkit-overflow-scrolling: touch; }
  .sky__story::-webkit-scrollbar { display: none; }
  .sky__story > div { flex: 0 0 91%; scroll-snap-align: start; display: block; padding: 11px 13px 12px; border: 1px solid rgba(231,201,166,.24);
    border-radius: 14px; background: rgba(255,255,255,.045); }
  .sky__story dt { margin-bottom: 4px; font-family: inherit; font-size: 11px; line-height: 1.4; letter-spacing: .2em; text-transform: uppercase; color: #e7c9a6; }
  .sky__story dd { font-size: 14px; line-height: 1.45; }
  .sky__dots { display: flex; justify-content: center; gap: 4px; margin: 6px 0 0; }
  .sky__dots button { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
  .sky__dots button::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: rgba(231,201,166,.35); transition: background .2s, transform .2s; }
  .sky__dots button[aria-current="true"]::before { background: #e7c9a6; transform: scale(1.3); }
  .sky__stage + * { margin-top: 26px; }
}
/* Screens tall enough for the whole panel: it is exactly one screen under the header, the map takes whatever height the
   controls and the tallest card leave, and the page snaps to it when a scroll stops near it (proximity, so a long flick
   still carries straight past). Short screens (phones on their side) keep the same pieces in plain page flow. */
@media (max-width: 900px) and (min-height: 560px) {
  html { scroll-snap-type: y proximity; }
  .sky__stage { height: calc(100svh - var(--sky-top, 60px)); scroll-snap-align: start; scroll-margin-top: var(--sky-top, 60px); }
  .sky__mapbox { flex: 1 1 0; min-height: 0; container-type: size; padding: 0; }
  .sky__stage .sky__dome { width: calc(min(100cqw, 100cqh) - 44px); }
  .sky__stage .sky__storytitle { display: none; }  /* the date button and the card labels already say which night and what */
  html.menu-open { scroll-snap-type: none; }
  /* The website's floating "Ask about this home" button would sit on the cards and dots: it steps aside while the panel
     fills the screen (sky-phone.js sets the class) and comes back as soon as people scroll on. */
  html.sky-stage-in #gg-tour-chat { opacity: 0; transform: translateY(12px); pointer-events: none; }
}
@media (max-width: 380px) {
  .sky__stage .sky__when label { font-size: 21px; }
  .sky__stage .sky__days .sky__date span { font-size: 12px; }
}
