/* ===== Retro mobile repair ===== */
@media (max-width: 900px) {
  body:not(.theme-aero) {
    font-size: 16px !important;
  }
  body:not(.theme-aero) #app {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
  body:not(.theme-aero) #top-bar {
    flex-wrap: wrap;
    gap: 0.2rem 0.35rem;
    padding: 0.2rem 0.35rem;
    align-items: center;
  }
  body:not(.theme-aero) .header-slide-title {
    font-size: 1.02rem !important;
    padding: 0 0.2rem;
    flex: 1 1 auto;
  }
  body:not(.theme-aero) .location-info,
  body:not(.theme-aero) #clock {
    display: none !important;
  }
  body:not(.theme-aero) .controls {
    margin-left: auto;
  }
  body:not(.theme-aero) .search-wrap {
    flex: 1 1 auto;
    order: 5;
    max-width: none !important;
    width: auto;
    height: 32px;
    min-width: 0;
  }
  body:not(.theme-aero) #city-search {
    font-size: 16px;
    height: 34px;
  }
  body:not(.theme-aero) .slide {
    padding: 0.2rem 0.45rem 0.15rem !important;
  }
  body:not(.theme-aero) .slide-inner,
  body:not(.theme-aero) .almanac-inner,
  body:not(.theme-aero) .slide[data-slide="moon"] .almanac-inner,
  body:not(.theme-aero) .local-period-panel,
  body:not(.theme-aero) .local-forecast-text,
  body:not(.theme-aero) .forecast-large,
  body:not(.theme-aero) .slide[data-slide="current"] .current-grid,
  body:not(.theme-aero) .slide[data-slide="radar"] .slide-inner,
  body:not(.theme-aero) .slide[data-slide="regional-radar"] .slide-inner,
  body:not(.theme-aero) .slide[data-slide="regional-forecast"] .slide-inner {
    max-width: 100% !important;
    width: 100% !important;
    margin-inline: 0 !important;
  }
  body:not(.theme-aero) .slide[data-slide="current"] .slide-inner {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  body:not(.theme-aero) .slide[data-slide="current"] .current-grid {
    grid-template-columns: 1fr !important;
    gap: 0.2rem !important;
    justify-items: center;
    text-align: center;
  }
  body:not(.theme-aero) .current-city-heading {
    font-size: 1.15rem !important;
    width: 100%;
    text-align: center;
  }
  body:not(.theme-aero) .details-block {
    width: 100%;
    max-width: 100% !important;
    text-align: left;
  }
  body:not(.theme-aero) .big-temp {
    font-size: clamp(2.4rem, 12vw, 3.2rem) !important;
  }
  body:not(.theme-aero) .desc,
  body:not(.theme-aero) .local-forecast-text,
  body:not(.theme-aero) .local-period-panel {
    font-size: 1.05rem !important;
  }
  body:not(.theme-aero) .detail span,
  body:not(.theme-aero) .detail strong {
    font-size: 0.95rem !important;
  }
  body:not(.theme-aero) .forecast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.45rem;
  }
  body:not(.theme-aero) .almanac-sun-row {
    grid-template-columns: 4.6rem 1fr 1fr !important;
    gap: 0.3rem !important;
    font-size: 0.9rem !important;
  }
  body:not(.theme-aero) .almanac-moon-grid {
    gap: 0.35rem !important;
  }
  body:not(.theme-aero) .almanac-moon-icon {
    height: 2.6rem !important;
    width: 2.6rem !important;
  }
  body:not(.theme-aero) .almanac-moon-icon img,
  body:not(.theme-aero) .almanac-moon-icon svg {
    width: 2.4rem !important;
  }
  body:not(.theme-aero) .regional-city-row {
    grid-template-columns: 32px 1fr auto !important;
    gap: 0.35rem !important;
    padding: 0.28rem 0.1rem !important;
  }
  body:not(.theme-aero) .regional-city-name { font-size: 0.85rem; }
  body:not(.theme-aero) .regional-city-temp { font-size: 1.1rem; }
  body:not(.theme-aero) .lt-ticker {
    font-size: 0.72rem !important;
    letter-spacing: 0.06em !important;
  }
  body:not(.theme-aero) .lower-third-inner {
    padding: 0.28rem 0.4rem;
  }
  .slide:not(.active) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
  .slide.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  #slide-dots {
    flex-wrap: wrap !important;
    justify-content: center;
    overflow: visible;
    gap: 0.2rem 0.25rem;
    padding: 0.25rem 0.3rem;
    max-height: none;
  }
  #slide-dots .dot {
    flex: 0 0 auto;
    font-size: 0.55rem;
    padding: 0.18rem 0.32rem;
    white-space: nowrap;
  }
  #music-bar {
    flex-wrap: wrap;
    gap: 0.2rem 0.45rem;
    padding: 0.25rem 0.45rem 0.2rem;
  }
  #music-bar .music-info,
  #music-bar #now-playing {
    flex: 1 1 100%;
    min-width: 0;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Pause chip sits in the music bar, not on the dots */
  #pause-badge {
    top: auto !important;
    bottom: 2.35rem;
    left: auto !important;
    right: 0.5rem;
    transform: none;
    padding: 0.12rem 0.4rem;
    font-size: 0.58rem;
    letter-spacing: 0.06em;
    max-width: 46vw;
    white-space: nowrap;
  }

  /* Current: shrink hero so details fit */
  body:not(.theme-aero) .big-temp {
    font-size: clamp(2.4rem, 12vw, 3.2rem) !important;
    line-height: 0.88;
  }
  body:not(.theme-aero) #feels-like {
    font-size: 0.78rem;
    margin: 0.1rem 0 0.15rem;
  }
  body:not(.theme-aero) .desc {
    font-size: 0.95rem !important;
    margin: 0.1rem 0;
  }
  body:not(.theme-aero) .weather-icon img,
  body:not(.theme-aero) .current-icon img {
    width: 3.4rem !important;
    height: auto !important;
  }
  body:not(.theme-aero) .current-city-heading {
    font-size: 1.15rem !important;
    margin-bottom: 0.15rem;
    padding-bottom: 0.15rem;
  }
  body:not(.theme-aero) .details-block {
    display: flex !important;
    flex-direction: column;
    gap: 0;
  }
  body:not(.theme-aero) .detail {
    display: flex !important;
    justify-content: space-between;
    align-items: baseline;
    width: 100%;
    padding: 0.06rem 0 !important;
    font-size: 0.88rem;
  }
  body:not(.theme-aero) .detail span,
  body:not(.theme-aero) .detail strong {
    font-size: 0.88rem !important;
  }

  /* Local text scrolls instead of clipping */
  body:not(.theme-aero) .slide[data-slide="localtext"] .slide-inner,
  body:not(.theme-aero) .local-period-inner {
    overflow: hidden !important;
    min-height: 0;
    height: 100%;
  }
  body:not(.theme-aero) .local-forecast-text,
  body:not(.theme-aero) .local-period-panel {
    font-size: 0.88rem !important;
    line-height: 1.32;
    max-height: 100%;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 0.15rem 0.15rem 0.6rem;
  }
  body:not(.theme-aero) .local-period-name {
    font-size: 1.05rem !important;
    margin-bottom: 0.3rem;
  }

  /* Regional radar: map + scrollable full region list */
  .regional-radar-inner {
    min-height: 0;
    height: 100%;
  }
  .regional-radar-container,
  #regional-radar-map {
    flex: 1 1 52%;
    min-height: 28vh !important;
    height: 28vh !important;
  }
  .regional-radar-buttons {
    flex: 0 0 auto;
    max-height: 26vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 0.18rem;
    padding: 0.15rem 0.1rem 0.35rem;
  }
  .regional-radar-buttons button {
    font-size: 0.55rem;
    padding: 0.16rem 0.32rem;
  }
}

@media (max-width: 700px) {
  body:not(.theme-aero) .rwx-bug-top { font-size: 0.62rem; }
  body:not(.theme-aero) .rwx-bug-bot { font-size: 0.48rem; }
  body:not(.theme-aero) #share-btn { display: none; }
  body:not(.theme-aero) .forecast-grid.forecast-large {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body:not(.theme-aero) .header-slide-title {
    font-size: 0.92rem !important;
  }
  body:not(.theme-aero) #clock {
    font-size: 0.68rem;
  }
  body:not(.theme-aero) .search-wrap,
  body:not(.theme-aero) #city-search {
    height: 30px;
  }
}
