/* ─────────────────────────────────────────────────────────
   Atmosphere page — diorama display layout
   ───────────────────────────────────────────────────────── */

/* Reset all text to cream on this page */
.atmos-page,
.atmos-page h1, .atmos-page h2, .atmos-page h3,
.atmos-page h4, .atmos-page h5, .atmos-page h6,
.atmos-page p, .atmos-page a, .atmos-page a:hover,
.atmos-page a:visited, .atmos-page span, .atmos-page li {
  color: #fbfbf4 !important;
}

/* Break out of the Bootstrap .row wrapper the theme injects */
.page-template-page-atmosphere #content .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  display: block !important;
  width: 100% !important;
}

.atmos-page {
  background-color: #232323;
  min-height: 100vh;
  padding-bottom: 4em;
  width: 100%;
}

/* ── Let Bootstrap .container handle its own sizing ── */

/* ── Header ─────────────────────────────────────────────── */
.atmos-header {
  position: relative;
  z-index: 10;
  width: 100%;
}

.atmos-header .container {
  padding-top: 0;
  padding-bottom: 0;
}

.atmos-header-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1em;
  padding-top: 0.7em;
  padding-bottom: 0.7em;
}

/* ── Saved cities bar ───────────────────────────────────── */
.atmos-saved-bar {
  display: flex;
  align-items: center;
  gap: 0.75em;
  margin-top: 0;
  padding: 0.7em 0 0.4em;
  border-top: 1px solid rgba(251,251,244,0.1);
}

.saved-bar-label {
  font-size: 0.7em;
  letter-spacing: 0.06em;
  opacity: 0.45;
  text-transform: uppercase;
  white-space: nowrap;
}

.saved-slots {
  display: flex;
  gap: 0.5em;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.saved-slots::-webkit-scrollbar { display: none; }

.saved-slot,
.atmos-page .saved-slot,
.atmos-saved-bar .saved-slot {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.4em !important;
  padding: 0.2em 0.6em !important;
  background: rgba(255,255,255,0.07) !important;
  background-color: rgba(255,255,255,0.07) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-radius: 2px !important;
  font-size: 0.78em !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: background 0.15s !important;
  color: #fbfbf4 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  line-height: 1.4 !important;
}

.saved-slot:hover,
.atmos-page .saved-slot:hover {
  background: rgba(255,255,255,0.14) !important;
  background-color: rgba(255,255,255,0.14) !important;
  color: #fbfbf4 !important;
}

.saved-slot.active,
.atmos-page .saved-slot.active {
  background: rgba(255,255,255,0.15) !important;
  background-color: rgba(255,255,255,0.15) !important;
  border-color: rgba(255,255,255,0.35) !important;
}

.saved-slot-remove {
  opacity: 0.4;
  font-size: 1.1em;
  line-height: 1;
  margin-left: 0.1em;
  cursor: pointer;
  transition: opacity 0.15s;
}

.saved-slot-remove:hover {
  opacity: 1;
}

.saved-slot-empty {
  padding: 0.3em 0.75em;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 2px;
  font-size: 0.8em;
  opacity: 0.4;
  cursor: default;
  color: #fbfbf4;
}

.save-city-btn,
.atmos-page .save-city-btn {
  background: rgba(255,255,255,0.07) !important;
  background-color: rgba(255,255,255,0.07) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  color: #fbfbf4 !important;
  font-size: 0.75em !important;
  font-weight: 400 !important;
  padding: 0.2em 0.6em !important;
  border-radius: 2px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: background 0.15s !important;
  box-shadow: none !important;
  line-height: 1.4 !important;
}

.save-city-btn:hover,
.atmos-page .save-city-btn:hover {
  background: rgba(255,255,255,0.14) !important;
  background-color: rgba(255,255,255,0.14) !important;
  color: #fbfbf4 !important;
}

.atmos-label {
  font-size: 1.4em;
  letter-spacing: 0.01em;
  opacity: 0.7;
  white-space: nowrap;
  flex: 0 0 auto;
}

.atmos-city {
  font-size: 2em !important;
  font-weight: 400 !important;
  margin: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  border: none !important;
  text-align: center;
  pointer-events: none;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.atmos-search-wrap {
  width: 240px;
  position: relative;
  justify-self: end;
}

.atmos-search-wrap .search-bar {
  display: flex;
  gap: 6px;
}

#cityInput {
  flex: 1;
  padding: 7px 10px;
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-bottom: 1px solid rgba(255,255,255,0.15) !important;
  border-radius: 2px;
  color: #fbfbf4 !important;
  font-size: 0.85em;
  box-shadow: none !important;
  outline: none;
}

#cityInput::placeholder { color: rgba(251,251,244,0.4); }

#searchButton {
  padding: 7px 14px !important;
  background: rgba(255,255,255,0.12) !important;
  background-color: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  border-radius: 2px !important;
  color: #fbfbf4 !important;
  cursor: pointer;
  font-size: 0.85em;
  transition: background 0.2s;
}
#searchButton:hover {
  background: rgba(255,255,255,0.22) !important;
  background-color: rgba(255,255,255,0.22) !important;
}

/* Kill any theme underline on the search bar area */
.atmos-search-wrap,
.atmos-search-wrap .search-bar,
.atmos-search-wrap input {
  border-bottom: none !important;
  box-shadow: none !important;
}

#suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #2a2a2a;
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 999;
  margin-top: 2px;
  border-radius: 2px;
}
#suggestions:empty {
  display: none;
}
#suggestions div {
  padding: 0.5em 0.75em;
  font-size: 0.83em;
  cursor: pointer;
}
#suggestions div:hover { background: rgba(255,255,255,0.1); }

/* ── Diorama box ────────────────────────────────────────── */
.atmos-diorama-wrap {
  padding-top: 1.5em;
  width: 100%;
}

.diorama-outer {
  max-width: 1475px;
  margin: 0 auto;
}

.diorama-inner {
  background: #0d1117;
  aspect-ratio: 4 / 3;
  position: relative;
  box-shadow:
    inset 0 0 80px rgba(0,0,0,0.95),
    inset 0 0 20px rgba(0,0,0,0.6);
  border: 1px solid #333;
  border-bottom: none;
  overflow: hidden;
}

/* Vignette corners */
.diorama-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(0,0,0,0.75) 100%);
  pointer-events: none;
  z-index: 5;
}

/* Sky layer — fills behind everything */
.diorama-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: background 2s ease;
  background: linear-gradient(180deg, #0d1117 0%, #111827 100%);
}

/* Time-of-day sky gradients */
.diorama-inner.morning   .diorama-sky { background: linear-gradient(180deg, #0f2744 0%, #1a5c8a 50%, #5ba0c8 100%); }
.diorama-inner.afternoon .diorama-sky { background: linear-gradient(180deg, #0c2340 0%, #1a5078 50%, #4a90b8 100%); }
.diorama-inner.evening   .diorama-sky { background: linear-gradient(180deg, #0d0820 0%, #3d1a5e 30%, #a03820 65%, #d47020 100%); }
.diorama-inner.night     .diorama-sky { background: linear-gradient(180deg, #020408 0%, #06101e 60%, #0a1828 100%); }

/* Weather sky overlays */
.diorama-inner.cloudy   .diorama-sky::after,
.diorama-inner.rainy    .diorama-sky::after,
.diorama-inner.rainyHeavy .diorama-sky::after,
.diorama-inner.stormy   .diorama-sky::after,
.diorama-inner.foggy    .diorama-sky::after {
  content: '';
  position: absolute;
  inset: 0;
}
.diorama-inner.cloudy    .diorama-sky::after { background: rgba(80,90,100,0.35); }
.diorama-inner.rainy     .diorama-sky::after { background: rgba(40,55,70,0.5); }
.diorama-inner.rainyHeavy .diorama-sky::after { background: rgba(20,30,45,0.6); }
.diorama-inner.stormy    .diorama-sky::after { background: rgba(10,12,18,0.7); }
.diorama-inner.foggy     .diorama-sky::after { background: rgba(140,148,155,0.45); }

/* Interior box perspective lines */
.diorama-walls {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 4;
}
.diorama-walls line,
.diorama-walls rect {
  stroke: rgba(251,251,244,0.09);
  stroke-width: 0.5;
  fill: none;
}

/* Stepped base — museum display case style */
.diorama-base {
  background: #2a2a2a;
  height: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  border-top: none;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
}
.diorama-base::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 5%;
  right: 5%;
  height: 12px;
  background: #232323;
  border: 1px solid rgba(255,255,255,0.06);
  border-top: none;
  clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
}

/* Weather effects — contained inside diorama */
#weatherEffect {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}

/* Loading spinner */
#loadingSpinner {
  display: none;
  width: 36px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fbfbf4;
  --_m: conic-gradient(#0000 10%, #000), linear-gradient(#000 0 0) content-box;
  -webkit-mask: var(--_m);
  mask: var(--_m);
  -webkit-mask-composite: source-out;
  mask-composite: subtract;
  animation: spin 1s linear infinite;
  position: absolute;
  z-index: 3;
}
@keyframes spin { to { transform: rotate(1turn); } }

/* ── Data panel ─────────────────────────────────────────── */
#weatherContainer {
  opacity: 0;
  transition: opacity 0.8s;
  width: 100%;
  padding-top: 0;
  margin-top: -6px;
}

.data-panel-grid {
  display: grid;
  grid-template-columns: 460px 1fr 280px;
  gap: 0;
  border-top: 1px solid rgba(251,251,244,0.1);
  margin-top: 0.75em;
}

/* Map column */
.panel-map {
  border-right: 1px solid rgba(251,251,244,0.1);
  overflow: hidden;
  position: relative;
  align-self: stretch;
}

.city-map {
  width: 100%;
  height: 100%;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.map-pin-wrap {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
}

.map-dot {
  width: 8px;
  height: 8px;
  background: #fbfbf4;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.5);
}

.map-ping {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid rgba(251,251,244,0.7);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  animation: map-pulse 3s ease-out infinite;
}
.map-ping-1 { animation-delay: 0s; }
.map-ping-2 { animation-delay: 1s; }
.map-ping-3 { animation-delay: 2s; }

@keyframes map-pulse {
  0%   { transform: translate(-50%, -50%) scale(0.1); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(1);   opacity: 0; }
}

/* Current conditions column */
.panel-current {
  padding: 1.5em 2em;
  border-right: 1px solid rgba(251,251,244,0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.panel-section-label {
  font-size: 0.75em !important;
  opacity: 0.6;
  letter-spacing: 0.04em;
  margin-bottom: 0.25em !important;
}

.current-temp-row {
  display: flex;
  align-items: center;
  gap: 0.25em;
}

.current-icon {
  width: 80px;
  height: auto;
}

.current-temp {
  font-size: 4.5em !important;
  font-weight: 300 !important;
  line-height: 1 !important;
  margin: 0 !important;
  border: none !important;
  letter-spacing: -0.02em;
}

.current-desc {
  margin: 0.5em 0 0.25em !important;
  font-size: 1.1em !important;
  opacity: 0.85;
  max-width: 320px;
}

.current-hilo {
  font-size: 1em !important;
  opacity: 0.6;
  margin: 0 !important;
}

.current-localtime {
  font-size: 0.85em !important;
  opacity: 0.5;
  margin: 0.2em 0 0 !important;
  letter-spacing: 0.03em;
}

.toggle-unit {
  font-size: 0.85em !important;
  opacity: 0.5;
  margin-top: 0.75em !important;
  cursor: pointer;
  display: inline-block;
  align-self: flex-start;
  text-decoration: none !important;
}
.toggle-unit:hover { opacity: 0.9 !important; text-decoration: underline !important; }

/* Short text forecast column */
.panel-shortcast {
  padding: 1.5em 1.5em;
}

.shortcast-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.shortcast-list li {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.4em 0;
  border-bottom: 1px solid rgba(251,251,244,0.1);
  font-size: 0.83em;
}
.shortcast-list li:last-child { border-bottom: none; }

.shortcast-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.sc-day {
  width: 30px;
  font-weight: 500;
  flex-shrink: 0;
}

.sc-temps {
  width: 55px;
  flex-shrink: 0;
  opacity: 0.8;
}

.sc-cond {
  opacity: 0.65;
  font-size: 0.92em;
}

/* ── Stats bar ──────────────────────────────────────────── */
.atmos-stats-bar {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-bottom: 1px solid rgba(251,251,244,0.1);
  margin-top: 0;
}

.stat-item {
  padding: 0.85em 1em;
  border-right: 1px solid rgba(251,251,244,0.1);
  display: flex;
  flex-direction: column;
  gap: 0.2em;
}
.stat-item:last-child { border-right: none; }

.stat-label {
  font-size: 0.7em !important;
  opacity: 0.55;
  letter-spacing: 0.03em;
}

.stat-value {
  font-size: 0.9em !important;
  font-weight: 400;
}

/* ── Hourly forecast bar ────────────────────────────────── */
.atmos-hourly-bar {
  display: grid;
  /* grid-template-columns set dynamically by JS */
  border-top: 1px solid rgba(251,251,244,0.1);
  border-bottom: 1px solid rgba(251,251,244,0.1);
}

.hourly-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3em;
  padding: 0.75em 0.4em;
  border-right: 1px solid rgba(251,251,244,0.1);
  min-width: 0;
  overflow: hidden;
}
.hourly-item:last-child { border-right: none; }

.hi-time {
  font-size: 0.7em;
  opacity: 0.55;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.hi-icon {
  width: 24px;
  height: 24px;
}
.hi-temp {
  font-size: 0.9em;
  font-weight: 400;
}
.hi-precip {
  font-size: 0.65em;
  opacity: 0.6;
  color: #a0c8f0;
}

/* ── Air quality bar ────────────────────────────────────── */
.atmos-aq-bar {
  padding: 1em 0 1.1em;
  border-bottom: 1px solid rgba(251,251,244,0.1);
}
.atmos-aq-bar:empty { display: none; }

.aq-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.65em;
  flex-wrap: wrap;
  gap: 0.3em;
}
.aq-section-label {
  font-size: 0.72em;
  opacity: 0.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.aq-value {
  font-size: 0.9em;
  font-weight: 500;
}
.aq-track {
  position: relative;
  height: 8px;
  border-radius: 4px;
  margin-bottom: 0.9em;
}
.aq-gradient {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(to right,
    #5d1a3a 0%,
    #7b3fa0 17%,
    #c0392b 33%,
    #d4681e 50%,
    #b5a020 67%,
    #4a9e5c 100%);
}
.aq-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fbfbf4;
  border: 2px solid rgba(0,0,0,0.5);
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
}
.aq-stats {
  display: flex;
  gap: 2em;
  flex-wrap: wrap;
}
.aq-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}
.aq-stat span:first-child {
  font-size: 0.65em;
  opacity: 0.45;
  letter-spacing: 0.03em;
}
.aq-stat span:last-child { font-size: 0.82em; }

/* ── Drought / hydrology bar ────────────────────────────── */
.atmos-drought-bar {
  padding: 1em 0 1.2em;
  border-bottom: 1px solid rgba(251,251,244,0.1);
}
.atmos-drought-bar:empty { display: none; }

.drought-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.2em;
  flex-wrap: wrap;
  gap: 0.3em;
}
.drought-section-label {
  font-size: 0.72em;
  opacity: 0.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.drought-status { font-size: 0.9em; }
.drought-meta {
  font-size: 0.7em;
  opacity: 0.5;
  margin-bottom: 0.9em;
}
.drought-track {
  position: relative;
  margin-bottom: 1.6em;
}
.drought-gradient {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(to right,
    #8b3a0f 0%,
    #d4681e 20%,
    #c8b88a 40%,
    #7ab87a 60%,
    #3a8ec8 80%,
    #1a4fa0 100%);
}
/* Each pin is a tick on the bar + label below */
.drought-pin {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.drought-tick {
  width: 2px;
  height: 8px;
  margin-bottom: 4px;
}
.drought-pin-hist .drought-tick { background: rgba(251,251,244,0.4); }
.drought-pin-curr .drought-tick { background: #fbfbf4; }
.drought-pin span {
  font-size: 0.6em;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.drought-pin-hist span { opacity: 0.5; }
.drought-pin-curr span { opacity: 0.9; }
.drought-axis-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6em;
  opacity: 0.35;
  margin-top: 0;
}

/* ── 7-day forecast cards ───────────────────────────────── */
.atmos-forecast-wrap {
  margin-top: 1.5em;
  width: 100%;
}


.forecast-cards {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  width: 100%;
}

.forecast-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4em;
  padding: 1.25em 0.5em 0.75em;
  border-right: 1px solid rgba(251,251,244,0.1);
  text-align: center;
}
.forecast-card:last-child { border-right: none; }

.fc-day {
  font-size: 0.78em !important;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.fc-icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.fc-icon {
  width: 60px;
  height: 60px;
}

.fc-precip {
  font-size: 0.65em;
  color: #7ab0d4;
  line-height: 1;
}

/* Desktop: lo / hi side-by-side, range bar hidden */
.fc-temps-wrap {
  display: flex;
  gap: 0.3em;
  align-items: center;
  font-size: 0.78em !important;
  opacity: 0.8;
  justify-content: center;
}
.fc-lo::after { content: ' /'; opacity: 0.4; }
.fc-range-track { display: none; }

.fc-cond {
  font-size: 0.7em !important;
  opacity: 0.55;
  line-height: 1.3;
}

/* ── Weather effect particles ───────────────────────────── */
.rain, .rain-heavy {
  position: absolute;
  top: -10px;
  width: 2px;
  height: 15px;
  background: rgba(255,255,255,0.15);
  animation: atmos-fall linear infinite;
  animation-delay: var(--delay);
}
.rain-heavy { background: rgba(255,255,255,0.2); }

@keyframes atmos-fall { to { transform: translateY(500px); } }

.snowflake {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  opacity: 0.7;
  animation: atmos-fall linear infinite;
  animation-delay: var(--delay);
}

.lightning {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.06);
  animation: atmos-flash linear infinite;
  animation-delay: var(--delay);
  pointer-events: none;
}
@keyframes atmos-flash {
  0%, 90%, 100% { opacity: 0; }
  92%, 96% { opacity: 1; }
}

/* ── Clouds — contained inside diorama ──────────────────── */
.diorama-inner .clouds {
  opacity: 0;
  transition: opacity 1.5s;
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}
.diorama-inner .clouds-1,
.diorama-inner .clouds-2,
.diorama-inner .clouds-3 {
  background-repeat: repeat-x;
  background-size: auto 100%;
  position: absolute;
  inset: 0;
  height: 100%;
}
.diorama-inner .clouds-1 {
  background-image: url('../images/clouds_2.png');
  animation: clouds-scroll 60s linear infinite;
}
.diorama-inner .clouds-2 {
  background-image: url('../images/clouds_1.png');
  animation: clouds-scroll 80s linear infinite;
  opacity: 0.6;
}
.diorama-inner .clouds-3 {
  background-image: url('../images/clouds_3.png');
  animation: clouds-scroll 100s linear infinite;
  opacity: 0.4;
}
@keyframes clouds-scroll { to { background-position: -2000px 0; } }


/* ── Utility ─────────────────────────────────────────────── */
.hide { display: none !important; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .atmos-header { padding-top: 1em; }
  .data-panel-grid {
    grid-template-columns: 1fr;
  }
  .panel-map { display: none; }
  .panel-current { border-right: none; padding-left: 0; padding-right: 0; }
  .panel-shortcast { border-top: 1px solid rgba(251,251,244,0.1); }
  .atmos-stats-bar { grid-template-columns: repeat(3, 1fr); }
  .forecast-cards { grid-template-columns: repeat(4, 1fr); }
  .forecast-card:nth-child(4) { border-right: none; }
  .forecast-card:nth-child(n+5) { border-top: 1px solid rgba(251,251,244,0.1); }
  .atmos-header-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
    padding-top: 0.9em;
    padding-bottom: 0.9em;
  }
  .atmos-label {
    font-size: 1em;
  }
  .atmos-city {
    font-size: 1.8em !important;
    text-align: left !important;
    margin: 0 !important;
  }
  .atmos-search-wrap {
    width: 100%;
    max-width: 100%;
    justify-self: unset;
  }
  .diorama-inner { aspect-ratio: 4 / 3; }
}

@media (max-width: 600px) {
  .atmos-header { padding-top: 1em; }
  .atmos-stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2n) { border-right: none; }
  .current-temp { font-size: 2.5em !important; }
  /* Hide shortcast panel — forecast cards below are the single source */
  .panel-shortcast { display: none !important; }
  .atmos-header-top { align-items: center; text-align: center; }
  .atmos-search-wrap { align-self: center; }
  .panel-current { align-items: center; text-align: center; }
  .current-temp-row { justify-content: center; }
  .toggle-unit { align-self: center; }

  /* Apple-style horizontal forecast rows */
  .forecast-cards { grid-template-columns: 1fr; }
  .forecast-card {
    display: grid;
    grid-template-columns: 4em 3em 3em 1fr 3em;
    grid-template-rows: auto;
    align-items: center;
    gap: 0 0.6em;
    padding: 0.6em 0;
    border-right: none;
    border-bottom: 1px solid rgba(251,251,244,0.1);
    text-align: left;
    flex-direction: unset;
  }
  .forecast-card:last-child { border-bottom: none; }
  .fc-day { font-size: 1em !important; font-weight: 500; }
  .fc-icon { width: 28px; height: 28px; }
  .fc-icon-wrap { flex-direction: row; gap: 4px; align-items: center; }
  .fc-precip { font-size: 0.7em; }
  /* Unpack temps wrapper into separate grid cells */
  .fc-temps-wrap {
    display: contents;
    font-size: inherit !important;
    opacity: 1;
  }
  .fc-lo { opacity: 0.5; font-size: 0.9em !important; }
  .fc-lo::after { content: ''; }
  .fc-hi { font-size: 0.9em !important; }
  .fc-range-track {
    display: block;
    height: 5px;
    border-radius: 3px;
    background: rgba(251,251,244,0.12);
    position: relative;
    overflow: hidden;
  }
  .fc-range-bar {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 3px;
  }
  .fc-hi { text-align: right; font-weight: 500; opacity: 1; }
  .fc-cond { display: none; }

  /* Hourly bar: scroll on mobile, show ~8 columns */
  .atmos-hourly-bar {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .atmos-hourly-bar::-webkit-scrollbar { display: none; }
  .hourly-item {
    flex: 0 0 calc(100% / 8);
    min-width: calc(100% / 8);
  }
}
