/* One mobile navigation system shared by the static forecast and React pages. */
.astro-mobile-nav, .astro-mobile-menu-button, .astro-mobile-more { display: none; }
.astro-mobile-details > summary { display: none; }
.astro-mobile-details:not([open]) > :not(summary) { display: block; }
.astro-mobile-details:not([open]) > .conditions-grid { display: grid; }
.astro-mobile-month { display: none; }
.astro-location-details > summary { display: none; }
[hidden] { display: none !important; }
.score-card #summary { color: #8fa3b6; font-size: 13px; max-width: 275px; margin: 16px auto 0; }

@media (max-width: 767px) {
  :root { --astro-mobile-bar: calc(68px + env(safe-area-inset-bottom, 0px)); }
  body { padding-bottom: var(--astro-mobile-bar); }
  html { scroll-padding-bottom: calc(var(--astro-mobile-bar) + 16px); }
  .astro-mobile-nav {
    position: fixed; inset: auto 0 0; z-index: 1100;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    background: #0b192a; border-top: 1px solid #283e53;
    box-shadow: 0 -8px 28px #0003;
  }
  .astro-mobile-nav a {
    min-height: 56px; display: flex; flex-direction: column; gap: 4px;
    align-items: center; justify-content: center; border-radius: 12px;
    color: #a8bbcf; font: 600 11px/1.2 system-ui, sans-serif; text-decoration: none;
  }
  .astro-mobile-nav svg { width: 22px; height: 22px; flex-shrink: 0; }
  .astro-mobile-nav a[aria-current="page"] { color: #7dd3fc; background: #7dd3fc0d; }
  .astro-mobile-nav a:focus-visible, .astro-mobile-menu-button:focus-visible { outline: 2px solid #7dd3fc; outline-offset: -3px; }
  .star-motion-toggle { bottom: calc(var(--astro-mobile-bar) + 10px) !important; right: 10px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px !important; }
  .astro-page { padding: 12px 16px 24px; }
  .astro-page h1 { font-size: 28px; line-height: 1.2; }
  .astro-page h2 { font-size: 22px; }
  .astro-page button, .astro-page a[data-slot="button"] { min-height: 44px; }
  .astro-page section.rounded-3xl { padding: 18px; border-radius: 20px; }
  .astro-page-header { margin-bottom: 20px; }
  .astro-page-header > svg { display: none; }
  .astro-page-header p { overflow-wrap: anywhere; }
  .astro-auth-page { min-height: calc(100svh - var(--astro-mobile-bar)); padding: 24px 16px; }
  .astro-auth-page > section { padding: 22px; border-radius: 20px; }
  .astro-auth-page h1 { font-size: 28px; }
  .astro-auth-page button { min-height: 46px; }
  .astroplan-main-header { position: relative; display: flex; flex-direction: row; justify-content: space-between; gap: 12px; padding-bottom: 10px; margin-bottom: 20px; }
  .astroplan-main-header .astroplan-brand { height: 60px; }
  .astroplan-main-header .astroplan-brand img { height: 56px; max-width: 170px; }
  .astroplan-main-header > .astroplan-desktop-nav, .astroplan-main-header > .astroplan-header-actions { display: none; }
  .astro-mobile-menu-button { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; background: #102237; color: #e8f2ff; border: 1px solid #2b425a; border-radius: 12px; }
  .astro-mobile-more { display: block; }
  .astro-mobile-more[hidden] { display: none; }
  .astro-mobile-more {
    position: absolute; top: calc(100% - 4px); right: 0; z-index: 1200;
    width: min(300px, calc(100vw - 32px)); padding: 12px; background: #0b192a;
    border: 1px solid #30445f; border-radius: 16px; box-shadow: 0 16px 36px #0006;
  }
  .astro-mobile-more a, .astro-mobile-more button { display: flex; width: 100%; min-height: 44px; align-items: center; padding: 10px 12px; border-radius: 8px; color: #e8f2ff; font-size: 14px; text-decoration: none; }
  .astro-mobile-more a:hover { background: #7dd3fc15; }
  .astro-mobile-more .astroplan-header-actions { flex-direction: column; margin-top: 8px; }
  .site-footer { margin-top: 28px; padding-bottom: 64px; }

  /* Account and saved locations: readable cards and full-width primary actions. */
  .astro-locations-heading { align-items: flex-start; flex-wrap: wrap; }
  .astro-saved-location { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); padding: 16px; gap: 12px; }
  .astro-saved-location > svg { margin-top: 3px; }
  .astro-saved-location-actions { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; }
  .astro-saved-location-actions > a:first-child { grid-column: 1 / -1; width: 100%; min-height: 46px; }
  .astro-saved-location-actions > a:not(:first-child) { grid-column: 1 / -1; }
  .astro-saved-location-actions > button:last-child { grid-column: 2; }
  .astro-account-links { display: flex; overflow-x: auto; gap: 8px; margin: 0 0 20px; padding-bottom: 6px; }
  .astro-account-links a { flex-shrink: 0; padding: 11px 14px; border: 1px solid #2b425a; border-radius: 999px; color: #a8bbcf; font-size: 13px; text-decoration: none; }
  .astro-account-links a[aria-current="page"] { background: #7dd3fc; color: #07111f; border-color: #7dd3fc; }
  .astro-calendar-intro p { font-size: 15px; line-height: 1.6; margin-top: 8px; }
  .astro-mobile-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; padding: 8px; border: 1px solid #2b425a; border-radius: 16px; background: #0b192a; color: #e8f2ff; }
  .astro-mobile-month button { min-width: 44px; }
  .astro-calendar-layout { display: flex; flex-direction: column; gap: 20px; }
  .astro-calendar-grid { order: 1; }
  .astro-calendar-events { order: 2; }
  .astro-event-card { padding: 16px; border-radius: 20px; }
  .astro-event-card h4 { font-size: 19px; }
  .astro-event-card .astro-event-heading { flex-wrap: wrap; }
  .astro-event-card p { overflow-wrap: anywhere; }
  .astro-event-card .astro-event-follow { width: 100%; white-space: normal; }
  .astro-event-card a[data-slot="button"] { width: 100%; white-space: normal; height: auto; padding: 12px; }
  .astro-event-card p.flex { flex-wrap: wrap; align-items: flex-start; gap: 6px; }
  .astro-event-card p.flex > svg { flex-shrink: 0; }

  /* Forecast layout: actual live values, compact hero, weather and Moon disclosures. */
  .site-header { display: flex; flex-wrap: nowrap; min-height: 76px; padding: 8px 16px; gap: 12px; position: relative; }
  .site-header .brand { width: auto; height: 60px; }
  .site-header .brand img { height: 56px; max-width: 170px; }
  .site-header > nav, .site-header > .header-actions { display: none; }
  .site-header .astro-mobile-more nav { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .site-header .astro-mobile-more .header-actions { display: flex; flex-direction: column; padding-top: 8px; }
  .hero, .registered-user .hero { padding: 16px; gap: 16px; margin-bottom: 0; }
  .hero-intro h1 { font-size: 36px; line-height: 1.15; }
  .hero-intro p { font-size: 15px; line-height: 1.6; }
  .hero-intro p + p { display: none; }
  .hero-intro .eyebrow { font-size: 10px; letter-spacing: .08em; }
  .search-card { padding: 16px; min-width: 0; border-radius: 18px; }
  .location-selected .hero-intro { display: none; }
  .location-selected .astro-location-details > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; cursor: pointer; color: #c8eaf6; font-size: 14px; list-style: none; }
  .location-selected .astro-location-details > summary::after { content: "+"; margin-left: 8px; font-size: 20px; }
  .location-selected .astro-location-details[open] > summary::after { content: "−"; }
  .astro-location-details > summary::-webkit-details-marker { display: none; }
  .astro-location-details[open] > summary { margin-bottom: 12px; }
  .search-row { flex-direction: column; }
  .search-row button, .current-location-button, .saved-location-actions button { min-height: 46px; }
  .saved-location-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .saved-location-actions select { width: 100%; flex-basis: 100%; min-height: 46px; }
  .saved-location-actions button { flex: 1; }
  .saved-location-actions a { padding: 12px 4px; font-size: 13px; }
  .location-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .location-choice > span { display: none; }
  .location-choice .current-location-button { width: 100%; padding: 10px; }
  .current-location-button strong { font-size: 12px; }
  .current-location-button small { display: none; }
  .location-start { margin: 12px 16px 24px; padding: 16px; }
  .forecast-subnav { margin: 8px 16px 16px; padding: 5px; gap: 4px; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; }
  .forecast-subnav a { min-height: 44px; padding: 10px 12px; white-space: nowrap; font-size: 12px; }
  .forecast-shell { padding: 0 16px; }
  .forecast-head { flex-wrap: wrap; margin-bottom: 16px; }
  .forecast-head h2 { font-size: 24px; }
  .forecast-actions { flex-wrap: wrap; }
  .save-location-button { min-height: 44px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .score-card, .window-card, .hourly-card { padding: 18px; border-radius: 18px; min-width: 0; }
  .score-card { text-align: left; }
  .score-ring { display: block; width: auto; height: auto; margin: 12px 0; background: none; }
  .score-ring::before { display: none; }
  .score-ring strong { font-size: 48px; color: #7dd3fc; }
  .score-ring span { font-size: 18px; padding-left: 6px; }
  .score-card #summary { font-size: 14px; line-height: 1.6; color: #a8bbcf; margin: 12px 0; }
  .conditions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .conditions-grid > div { padding: 12px; min-width: 0; }
  .conditions-grid p { font-size: 12px; color: #a8bbcf; }
  .conditions-grid strong { font-size: 17px; }
  .astro-mobile-details { margin-top: 12px; }
  .astro-mobile-details > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 10px 12px; border: 1px solid #2b425a; border-radius: 12px; color: #c8eaf6; font-size: 14px; cursor: pointer; list-style: none; }
  .astro-mobile-details > summary::after { content: "+"; font-size: 20px; margin-left: 8px; }
  .astro-mobile-details[open] > summary::after { content: "−"; }
  .astro-mobile-details > summary::-webkit-details-marker { display: none; }
  .astro-mobile-details:not([open]) > :not(summary), .astro-mobile-details:not([open]) > .conditions-grid { display: none; }
  .astro-mobile-details[open] > .conditions-grid { margin-top: 10px; }
  .astro-mobile-details .moon-score-impact { margin-top: 10px; }
  .window-card .best-score-summary { margin-bottom: 0; }
  .window-card .best-score-summary > strong { color: #7dd3fc; }
  .hourly-card { margin-top: 12px; }
  .hourly-card .card-heading { flex-wrap: wrap; gap: 12px; }
  .hourly-chart { overflow-x: auto; overscroll-behavior-x: contain; }
  .public-footer { margin-top: 28px; padding-bottom: 64px; }
  .toast { bottom: calc(var(--astro-mobile-bar) + 14px); max-width: calc(100vw - 32px); }
  .map-picker-dialog { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .map-picker-panel { padding: 16px; }
}

@media (min-width: 768px) { .astro-account-links { display: none; } }
@media (prefers-reduced-motion: reduce) { .astro-mobile-nav * { transition: none; } }
