/* ============================================
   SCENE CONTROLS (top-right icon group)
   ============================================ */

.scene-controls {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scene-control-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.3s, color 0.3s, border-color 0.3s;
  opacity: 0.7;
}

.scene-control-btn:hover {
  opacity: 1;
  color: rgba(255, 255, 255, 0.9);
}

.scene-control-btn.active {
  opacity: 1;
  color: var(--accent);
  border-color: rgba(200, 155, 123, 0.35);
}

.scene-control-btn .eye-closed { display: none; }
.scene.ui-hidden .scene-control-btn .eye-open { display: none; }
.scene.ui-hidden .scene-control-btn .eye-closed { display: block; }

/* ============================================
   CITY SEARCH TRAY & ITEMS
   ============================================ */

.city-search-tray {
  position: relative;
  z-index: 12;
  padding: 10px;
  border-radius: 20px;
  border: 1px solid rgba(200, 155, 123, 0.08);
  background:
    linear-gradient(
      168deg,
      rgba(12, 18, 30, 0.97) 0%,
      rgba(7, 12, 21, 0.98) 50%,
      rgba(10, 14, 24, 0.97) 100%
    );
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
  margin-top: 10px;
  pointer-events: auto;
  width: min(320px, 80vw);
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 0.25s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
}

.city-search-tray.open {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.city-search-tray[hidden] {
  display: none;
}

/* Subtle top edge shine */
.city-search-tray::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16%;
  right: 16%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(200, 155, 123, 0.15),
    rgba(255, 255, 255, 0.06),
    rgba(200, 155, 123, 0.15),
    transparent
  );
  border-radius: 1px;
  pointer-events: none;
}

.city-search-input {
  width: 100%;
  min-width: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-1);
  font-family: var(--font-d);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  border-radius: 14px;
  padding: 11px 14px 11px 36px;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.2)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 13px center;
  background-size: 14px;
}

.city-search-input:focus {
  border-color: rgba(200, 155, 123, 0.2);
  background-color: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 3px rgba(200, 155, 123, 0.06);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(200,155,123,0.45)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
}

.city-search-input::placeholder {
  color: var(--text-3);
  font-family: var(--font-b);
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.06em;
}

.city-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.city-search-results {
  margin-top: 6px;
}

.city-search-item {
  padding: 2px 0;
  opacity: 0;
  transform: translateY(4px);
  animation: search-item-in 0.25s var(--ease-out-expo) forwards;
}

.city-search-item:nth-child(1) { animation-delay: 0ms; }
.city-search-item:nth-child(2) { animation-delay: 30ms; }
.city-search-item:nth-child(3) { animation-delay: 55ms; }
.city-search-item:nth-child(4) { animation-delay: 75ms; }
.city-search-item:nth-child(5) { animation-delay: 90ms; }
.city-search-item:nth-child(6) { animation-delay: 105ms; }
.city-search-item:nth-child(7) { animation-delay: 115ms; }

@keyframes search-item-in {
  to { opacity: 1; transform: translateY(0); }
}

.city-search-item.active .city-search-option {
  background: rgba(200, 155, 123, 0.06);
  border-color: rgba(200, 155, 123, 0.12);
}

.city-search-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 10px 14px;
  text-align: left;
  min-width: 0;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.city-search-option:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
  transform: translateX(2px);
}

.city-search-option-name {
  color: var(--text-1);
  font-family: var(--font-d);
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.city-search-option-key {
  color: var(--text-3);
  font-family: var(--font-b);
  font-size: 0.5rem;
  font-weight: 300;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.city-search-empty {
  padding: 14px 16px;
  color: var(--text-3);
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.04em;
}

.city-search-empty.is-loading {
  background: linear-gradient(90deg, transparent 30%, rgba(200, 155, 123, 0.04) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: search-shimmer 1.8s ease-in-out infinite;
}

@keyframes search-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Current Location item */
.city-search-item--location {
  padding-bottom: 4px;
  margin-bottom: 2px;
  position: relative;
}

.city-search-item--location::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 155, 123, 0.18), transparent);
}

.city-search-option--location {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.city-search-option--location .city-search-option-name {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.city-search-option--location:hover {
  background: rgba(200, 155, 123, 0.06);
  border-color: rgba(200, 155, 123, 0.1);
}

.city-search-item.active .city-search-option--location {
  background: rgba(200, 155, 123, 0.08);
  border-color: rgba(200, 155, 123, 0.14);
}

.city-search-location-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px rgba(200, 155, 123, 0.4);
  animation: location-pulse 2.4s ease-in-out infinite;
  flex-shrink: 0;
  font-size: 0;
  line-height: 0;
}

@keyframes location-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(200, 155, 123, 0.3); opacity: 0.8; }
  50% { box-shadow: 0 0 10px rgba(200, 155, 123, 0.6); opacity: 1; }
}

.city-search-geo-error {
  font-size: 0.54rem;
  font-weight: 300;
  color: rgba(220, 120, 100, 0.7);
  margin-left: auto;
  letter-spacing: 0.3px;
}

.hero-reset {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.hero-reset:hover:not(:disabled) {
  border-color: var(--glass-hl);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-1);
}

/* ============================================
   HERO CARD INLINE: City, Source, Reset
   ============================================ */

.hero-city-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
}

.hero-city-label {
  color: var(--text-2);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.hero-city-search-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  cursor: pointer;
  font-size: 0.82rem;
  padding: 0;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.hero-city-search-btn:hover {
  color: var(--text-1);
  border-color: rgba(255, 255, 255, 0.2);
}

.hero-status-row {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: auto;
}

.hero-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.54rem;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
}

.hero-source[data-mode="live"] {
  color: #8fe1b3;
  border-color: rgba(143, 225, 179, 0.22);
  background: rgba(143, 225, 179, 0.08);
}

.hero-source[data-mode="fallback"] {
  color: #f0c98f;
  border-color: rgba(240, 201, 143, 0.22);
  background: rgba(240, 201, 143, 0.08);
}

.hero-source[data-mode="forecast"] {
  color: #8fc7f0;
  border-color: rgba(143, 199, 240, 0.22);
  background: rgba(143, 199, 240, 0.08);
}

.hero-source[data-mode="simulated"] {
  color: var(--accent);
  border-color: rgba(200, 155, 123, 0.24);
  background: rgba(200, 155, 123, 0.08);
}

.hero-reset {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.54rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
}

.hero-reset:disabled {
  opacity: 0.45;
  cursor: default;
}

.hero-reset.enabled {
  color: var(--accent);
  border-color: rgba(200, 155, 123, 0.24);
}

/* ============================================
   SIMULATOR DRAWER (standalone, top-right)
   ============================================ */

.simulator-drawer {
  position: fixed;
  top: 24px;
  right: 72px;
  z-index: 99;
  width: min(420px, calc(100vw - 100px));
  max-height: min(74vh, 780px);
  overflow-y: auto;
  border-radius: 22px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(
    180deg,
    rgba(12, 18, 28, 0.94) 0%,
    rgba(8, 14, 22, 0.97) 36%,
    rgba(6, 10, 18, 0.98) 100%
  );
  backdrop-filter: blur(36px) saturate(1.5);
  -webkit-backdrop-filter: blur(36px) saturate(1.5);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s var(--ease-out-expo);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
}

.simulator-drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.simulator-drawer-body {
  padding: 20px 22px 26px;
}

.weather-stage {
  position: relative;
  min-width: 0;
  width: 100%;
}

.weather-stage-layout {
  position: relative;
  z-index: 1;
  display: grid;
  align-items: start;
}

.weather-stage-rail {
  display: grid;
  align-content: start;
}

.weather-stage-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  min-width: 0;
}

.scene.ui-hidden .scene-controls .scene-control-btn:not(#uiVisibilityToggle) {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.scene.ui-hidden .simulator-drawer,
.scene.ui-hidden .sky-controls,
.scene.ui-hidden .hero-temp-card {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.simulator-drawer,
.sky-controls,
.hero-temp-card {
  transition: opacity 0.4s ease;
}

.scene-control-btn--hidden {
  display: none;
}

.scene-control-btn--hidden.revealed {
  display: flex;
}

/* ---- Hero Temperature Card ---- */
.hero-temp-card {
  position: fixed;
  top: 22%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
  color: white;
}

.hero-temp-card.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ---- Weather Detail Cards Overlay ---- */
.weather-detail-cards {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 22;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.weather-detail-cards.visible {
  opacity: 1;
  pointer-events: auto;
}

.hero-temp-value {
  font-family: var(--font-d);
  font-size: clamp(6.2rem, 11vw, 9.5rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -4px;
  color: var(--text-1);
  text-shadow:
    0 0 36px rgba(255, 231, 188, 0.18),
    0 0 92px rgba(178, 219, 255, 0.14);
}

.hero-temp-condition {
  margin-top: 20px;
  color: var(--text-2);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-temp-feels {
  margin-top: 5px;
  color: var(--text-3);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-temp-datetime {
  margin-top: 16px;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.hero-temp-time {
  font-family: var(--font-d);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-2);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.hero-temp-date {
  font-size: 0.62rem;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

/* ---- Hero Scrub Bar ---- */
.hero-scrub-wrap {
  margin-top: 20px;
  width: min(320px, 70vw);
  pointer-events: auto;
  cursor: grab;
  position: relative;
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
}
.hero-scrub-wrap:active { cursor: grabbing; }

.hero-scrub-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-scrub-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-scrub-label {
  font-size: 0.42rem;
  color: var(--text-3);
  opacity: 0.6;
  width: 24px;
  flex-shrink: 0;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.hero-scrub-bar {
  flex: 1;
  height: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 3px;
  display: flex;
  overflow: hidden;
  position: relative;
}

.hero-scrub-segment {
  height: 100%;
  flex: 1;
  min-width: 1px;
}

.hero-scrub-segment:first-child { border-radius: 3px 0 0 3px; }
.hero-scrub-segment:last-child { border-radius: 0 3px 3px 0; }
.hero-scrub-segment:only-child { border-radius: 3px; }

.hero-scrub-indicator {
  position: absolute;
  top: 0;
  width: 2px;
  height: 27px;
  border-radius: 1px;
  background: white;
  box-shadow: 0 0 6px rgba(255,255,255,0.5);
  transform: translateX(-50%);
  pointer-events: none;
  transition: left 0.1s ease;
}
body.hero-scrubbing .hero-scrub-indicator {
  transition: none;
}

body.hero-scrubbing {
  touch-action: none;
  overscroll-behavior: none;
}

.hero-scrub-times {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.hero-scrub-label-spacer {
  width: 24px;
  flex-shrink: 0;
}
.hero-scrub-times span:not(.hero-scrub-label-spacer) {
  flex: 1;
  font-size: 0.42rem;
  color: var(--text-3);
  opacity: 0.5;
  letter-spacing: 0.2px;
  text-align: center;
}

@media (max-width: 600px) {
  .hero-temp-value {
    font-size: 5.2rem;
  }
  .scene-controls {
    top: 18px;
    right: 16px;
  }
}

.weather-stage-summary .panel-attribution {
  margin-top: 10px;
  text-align: center;
}

.weather-stage-celestial-band {
  width: min(720px, 100%);
  margin-top: 6px;
  display: grid;
  grid-template-columns: minmax(160px, 190px) minmax(220px, 320px) minmax(160px, 190px);
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
}

.weather-stage-celestial {
  position: relative;
  min-height: clamp(188px, 19vw, 252px);
  display: block;
}

.weather-stage-current {
  display: grid;
  gap: 10px;
  align-content: center;
  justify-items: stretch;
}

.weather-stage-current-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.weather-stage-current-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(12, 18, 28, 0.26) 0%, rgba(12, 18, 28, 0.08) 100%);
  backdrop-filter: blur(16px) saturate(1.08);
  -webkit-backdrop-filter: blur(16px) saturate(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 34px rgba(0, 0, 0, 0.12);
}

.weather-stage-current-label {
  color: var(--text-3);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.weather-stage-current-value {
  color: var(--text-1);
  font-size: 0.78rem;
}

.weather-stage-current-left {
  justify-self: end;
  width: min(190px, 100%);
}

.weather-stage-current-right {
  justify-self: start;
  width: min(190px, 100%);
}

.weather-stage-panel {
  min-width: 0;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(12, 18, 28, 0.3) 0%, rgba(12, 18, 28, 0.14) 100%);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.16);
}

.weather-shelf-section {
  margin-bottom: 0;
  padding: 14px 14px 12px;
}

.weather-shelf-section .panel-section-title {
  padding-left: 0;
}

.weather-shelf-section .panel-section-title::before {
  display: none;
}

.weather-stage-panel-hourly {
  width: 100%;
}

.weather-stage-panel-forecast,
.weather-stage-panel-metrics {
  width: 100%;
}

.weather-stage-forecast-list {
  max-height: 280px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.weather-stage-forecast-list::-webkit-scrollbar {
  width: 4px;
}

.weather-stage-forecast-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.weather-stage-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.weather-stage-metric-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 70px;
  padding: 12px 12px 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

.weather-stage-metric-label {
  color: var(--text-3);
  font-size: 0.54rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.weather-stage-metric-value {
  color: var(--text-1);
  font-size: 0.72rem;
  line-height: 1.35;
}

.weather-stage-kp-bar {
  margin-top: 14px;
}

.side-panel-scroll {
  max-height: min(62vh, 640px);
  overflow-y: auto;
  padding: 18px 22px 26px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.06) transparent;
  mask-image: linear-gradient(to bottom, black 0%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 92%, transparent 100%);
}

.side-panel-scroll::-webkit-scrollbar { width: 3px; }
.side-panel-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
}

.drawer-simulator-copy {
  margin-bottom: 20px;
}

.drawer-simulator-eyebrow,
.drawer-eyebrow {
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 0.58rem;
}

.drawer-simulator-title,
.drawer-title {
  color: var(--text-1);
  font-family: var(--font-d);
  font-size: 1.1rem;
  margin-top: 6px;
}

.drawer-simulator-text {
  margin: 10px 0 0;
  color: var(--text-2);
  font-size: 0.75rem;
  line-height: 1.5;
  max-width: 64ch;
}

.drawer-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

/* ============================================
   PANEL SECTIONS & HERO
   ============================================ */

.panel-section { margin-bottom: 28px; }

.panel-section-title {
  font-size: 0.54rem;
  font-weight: 500;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
  padding-left: 14px;
  position: relative;
}

.panel-section-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: -1px;
  bottom: -1px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), rgba(200, 155, 123, 0.3));
  border-radius: 1px;
}

.panel-hero {
  text-align: center;
  padding: 24px 0 28px;
  position: relative;
}

/* Warm ambient glow behind the hero temp */
.panel-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 120px;
  background: radial-gradient(ellipse, rgba(200, 155, 123, 0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: hero-glow 4s ease-in-out infinite;
}

@keyframes hero-glow {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.panel-hero-temp {
  font-family: var(--font-d);
  font-size: 4.8rem;
  font-weight: 300;
  line-height: 1;
  color: var(--text-1);
  text-shadow: 0 0 60px var(--accent-glow), 0 0 120px rgba(200, 155, 123, 0.06);
  letter-spacing: -2px;
  position: relative;
}

.panel-hero-condition {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-2);
  margin-top: 10px;
  letter-spacing: 0.8px;
}

.panel-hero-feelslike {
  font-size: 0.66rem;
  color: var(--text-3);
  margin-top: 6px;
  font-weight: 300;
  letter-spacing: 0.3px;
}

.panel-attribution {
  margin-top: 10px;
  font-size: 0.6rem;
  letter-spacing: 0.25px;
  color: var(--text-3);
  position: relative;
}

.panel-attribution a {
  color: var(--accent);
  text-decoration: none;
}

.panel-attribution a:hover {
  text-decoration: underline;
}


/* ============================================
   PANEL DATA ROWS
   ============================================ */

.panel-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 8px;
  font-size: 0.74rem;
  border-radius: 6px;
  transition: background 0.25s ease;
}

.panel-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.012);
}

.panel-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.panel-row-label {
  color: var(--text-2);
  font-weight: 300;
}

.panel-row-value {
  font-weight: 500;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}


/* ============================================
   KP BAR (SOLAR ACTIVITY)
   ============================================ */

.kp-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}

.kp-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s var(--ease-out-expo), background 0.6s ease;
  box-shadow: 0 0 8px currentcolor;
}


/* ============================================
   HOURLY FORECAST
   ============================================ */

.hourly-scroll-wrap {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.hourly-scroll-wrap::before,
.hourly-scroll-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  z-index: 2;
  pointer-events: none;
}

.hourly-scroll-wrap::before {
  left: 0;
  background: linear-gradient(90deg, rgba(8, 14, 22, 0.96) 0%, transparent 100%);
}

.hourly-scroll-wrap::after {
  right: 0;
  background: linear-gradient(-90deg, rgba(8, 14, 22, 0.96) 0%, transparent 100%);
}

.hourly-scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.hourly-scroll::-webkit-scrollbar { display: none; }

.hourly-item {
  flex: 0 0 56px;
  text-align: center;
  padding: 12px 6px 10px;
  border-radius: 14px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.012) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.65rem;
  transition: all 0.3s var(--ease-out-expo);
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
}

/* Subtle top shine on hourly cards */
.hourly-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  pointer-events: none;
}

.hourly-item:hover {
  background: linear-gradient(
    180deg,
    rgba(200, 155, 123, 0.1) 0%,
    rgba(200, 155, 123, 0.025) 100%
  );
  border-color: rgba(200, 155, 123, 0.18);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hourly-item-hour {
  color: var(--text-3);
  margin-bottom: 6px;
  font-weight: 400;
  font-size: 0.6rem;
}

.hourly-item-icon {
  font-size: 1.1rem;
  margin: 4px 0;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.3));
}

.hourly-item-temp {
  font-weight: 500;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}


/* ============================================
   7-DAY FORECAST
   ============================================ */

.forecast-day {
  display: grid;
  grid-template-columns: 50px 28px 1fr 58px 14px;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  font-size: 0.74rem;
  border-radius: 6px;
  transition: background 0.25s ease, transform 0.25s var(--ease-out-expo);
}

.forecast-day:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
}

.forecast-day-clickable {
  cursor: pointer;
}

.forecast-day:hover {
  background: rgba(255, 255, 255, 0.025);
  transform: translateX(3px);
}

.forecast-day-clickable:active {
  background: rgba(200, 155, 123, 0.08);
  transform: translateX(3px) scale(0.99);
}

body.forecast-scrubbing .forecast-day-bar-fill {
  box-shadow: 0 0 10px rgba(200, 155, 123, 0.35);
  transition: none;
}

body.forecast-scrubbing {
  cursor: ew-resize;
  touch-action: none;
  overscroll-behavior: none;
}


/* ============================================
   FORECAST DETAIL SCRUB AREA
   ============================================ */

.forecast-detail-scrub-area {
  position: relative;
  cursor: ew-resize;
  touch-action: none;
  overscroll-behavior: contain;
  -webkit-user-select: none;
  user-select: none;
}

.forecast-detail-scrub-area:hover {
  background: rgba(255, 255, 255, 0.015);
  border-radius: 6px;
}

/* ============================================
   FORECAST SCRUB INDICATOR
   ============================================ */

.forecast-scrub-indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.12s ease;
  transform: translateX(-50%);
}

.forecast-scrub-indicator.visible {
  opacity: 1;
}

.scrub-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--accent);
  border-radius: 1px;
  box-shadow:
    0 0 8px rgba(200, 155, 123, 0.5),
    0 0 16px rgba(200, 155, 123, 0.2);
}

.scrub-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--accent);
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 10px rgba(200, 155, 123, 0.7),
    0 0 20px rgba(200, 155, 123, 0.25);
}

.scrub-tooltip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  background: rgba(6, 10, 18, 0.95);
  border: 1px solid rgba(200, 155, 123, 0.3);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: var(--font-b);
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.4px;
  white-space: nowrap;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(200, 155, 123, 0.12);
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.scrub-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(200, 155, 123, 0.3);
}

.forecast-day-name {
  font-weight: 500;
  color: var(--text-1);
}

.forecast-day-icon {
  font-size: 0.95rem;
  text-align: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.forecast-day-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.forecast-day-bar-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cool), var(--accent-warm));
  box-shadow: 0 0 6px rgba(200, 155, 123, 0.15);
  transition: left 0.5s var(--ease-out-expo), right 0.5s var(--ease-out-expo);
}

.forecast-day-temps {
  text-align: right;
  font-size: 0.7rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.forecast-day-temps span:first-child {
  color: var(--text-3);
}

.forecast-day.expanded {
  background: rgba(255, 255, 255, 0.02);
  border-bottom-color: transparent;
}

.forecast-day-expand-chevron {
  font-size: 0.55rem;
  color: var(--text-3);
  transition: transform 0.3s var(--ease-out-expo), color 0.3s ease;
  margin-left: auto;
  width: 14px;
  text-align: center;
}

.forecast-day.expanded .forecast-day-expand-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

/* ============================================
   FORECAST EXPANDED DETAIL
   ============================================ */

.forecast-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out-expo), opacity 0.3s ease, padding 0.3s ease;
  opacity: 0;
  padding: 0 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
}

.forecast-detail.open {
  max-height: 240px;
  opacity: 1;
  padding: 6px 4px 14px;
}

.forecast-detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.forecast-detail-row:last-child {
  margin-bottom: 0;
}

.forecast-detail-label {
  font-size: 0.58rem;
  color: var(--text-3);
  font-weight: 400;
  width: 36px;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}

.forecast-detail-bar {
  flex: 1;
  height: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  display: flex;
  overflow: hidden;
  position: relative;
}

.forecast-detail-bar-segment {
  height: 100%;
  min-width: 1px;
  transition: flex 0.4s var(--ease-out-expo);
  position: relative;
}

/* Temperature bar gradient segments */
.forecast-detail-bar.temp-bar .forecast-detail-bar-segment {
  opacity: 0.85;
}

/* Weather condition colors */
.bar-clear { background: rgba(200, 175, 140, 0.25); }
.bar-cloudy { background: rgba(160, 170, 185, 0.4); }
.bar-rain { background: rgba(110, 140, 175, 0.55); }
.bar-heavy-rain { background: rgba(80, 115, 165, 0.7); }
.bar-thunderstorm { background: rgba(220, 185, 60, 0.6); }
.bar-snow { background: rgba(210, 220, 235, 0.55); }
.bar-blizzard { background: rgba(230, 235, 245, 0.65); }
.bar-fog { background: rgba(150, 160, 170, 0.35); }
.bar-haze { background: rgba(170, 160, 140, 0.35); }

/* Severity colors */
.bar-warning { background: rgba(230, 195, 50, 0.6); }
.bar-severe { background: rgba(220, 70, 60, 0.6); }

.forecast-detail-bar-segment:first-child {
  border-radius: 4px 0 0 4px;
}
.forecast-detail-bar-segment:last-child {
  border-radius: 0 4px 4px 0;
}
.forecast-detail-bar-segment:only-child {
  border-radius: 4px;
}

/* Time labels under the bars — aligned with bar segments */
.forecast-detail-times {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin-top: 2px;
}

.forecast-detail-label-spacer {
  width: 36px;
  flex-shrink: 0;
}

.forecast-detail-times span:not(.forecast-detail-label-spacer) {
  flex: 1;
  font-size: 0.48rem;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
  text-align: center;
}

/* Precip chance text */
.forecast-detail-precip {
  font-size: 0.6rem;
  color: var(--text-2);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.2px;
}

.forecast-detail-precip-value {
  color: var(--cool);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.weather-stage {
  min-height: min(68vh, 780px);
  padding: 38px 10px 18px;
}

.weather-stage-layout {
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 500px) minmax(240px, 1fr);
  gap: clamp(24px, 4vw, 76px);
}

.weather-stage-rail {
  gap: 18px;
  padding-top: 46px;
}

.weather-stage-top {
  padding-top: 40vh;
  gap: 0;
}

.weather-stage-summary {
  width: min(500px, 100%);
  gap: 4px;
}

.weather-stage-temp {
  font-size: clamp(5.6rem, 9vw, 8.2rem);
  line-height: 0.98;
  margin-top: 14px;
}

.weather-stage-hero-inline {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  max-width: 460px;
  color: var(--text-2);
}

.weather-stage-hero-inline-item {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  position: relative;
}

.weather-stage-hero-inline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -9px;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%);
}

.weather-stage-hero-inline-label {
  color: var(--text-3);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.weather-stage-hero-inline-value {
  color: var(--text-1);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.weather-stage-hero-inline-item.is-condition .weather-stage-hero-inline-label {
  color: var(--text-1);
  font-size: 0.9rem;
  letter-spacing: 0.18em;
}

.weather-stage-celestial-band {
  width: min(430px, 100%);
  margin-top: -10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.weather-stage-celestial {
  min-height: clamp(130px, 14vw, 180px);
  width: 100%;
  margin-top: 0;
}

.weather-stage-panel,
.weather-stage-panel-hourly,
.weather-stage-panel-forecast {
  border: none;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.weather-shelf-section {
  padding: 0;
}

.weather-shelf-section .panel-section-title {
  margin-bottom: 12px;
  padding-left: 0;
}

.weather-shelf-section .panel-section-title::before {
  display: none;
}

.hourly-scroll-wrap::before,
.hourly-scroll-wrap::after {
  display: none;
}

.hourly-scroll {
  gap: 10px;
  padding: 0;
}

.hourly-item {
  flex: 0 0 54px;
  padding: 4px 0;
  border-radius: 0;
  border: none;
  background: none;
  box-shadow: none;
}

.hourly-item::before {
  display: none;
}

.hourly-item:hover {
  background: none;
  border: none;
  box-shadow: none;
  transform: translateY(-2px);
}

.weather-stage-forecast-list {
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.forecast-day {
  padding: 8px 0;
  border-radius: 0;
}

.forecast-day:hover {
  background: none;
  transform: translateX(2px);
}

/* ============================================
   CONDITIONS GRID (center column)
   ============================================ */

.weather-stage-conditions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: min(460px, 100%);
  margin-top: 18px;
}

.weather-stage-condition-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.weather-stage-condition-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.025) 100%);
}

.weather-stage-condition-card-label {
  color: var(--text-3);
  font-size: 0.48rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.weather-stage-condition-card-value {
  color: var(--text-1);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}


/* ============================================
   FORECAST DETAIL PERIODS
   ============================================ */

.forecast-detail-periods {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
}

.forecast-detail-period {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 2px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.forecast-detail-period:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.07);
}

.forecast-detail-period-time {
  font-size: 0.46rem;
  color: var(--text-3);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.forecast-detail-period-icon {
  font-size: 0.82rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.forecast-detail-period-temp {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.weather-stage-kp-bar {
  margin-top: 12px;
}


/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .simulator-drawer {
    right: 60px;
    width: min(360px, calc(100vw - 80px));
  }

  .simulator-drawer-body {
    padding: 16px;
  }

  .weather-stage {
    min-height: 72vh;
    padding: 52px 10px 18px;
  }

  .weather-stage-layout {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .weather-stage-rail {
    padding-top: 0;
  }

  .weather-stage-top {
    width: 100%;
    min-height: 0;
    order: 0;
  }

  .weather-stage-summary {
    width: 100%;
    max-width: none;
  }

  .weather-stage-celestial-band {
    width: min(360px, 100%);
    gap: 0;
    margin-top: -2px;
  }

  .weather-stage-celestial {
    min-height: 164px;
    margin-top: 0;
  }

  .weather-stage-hero-inline {
    max-width: 100%;
    gap: 8px 12px;
    margin-top: 8px;
  }

  .weather-stage-hero-inline-item {
    gap: 4px;
  }

  .weather-stage-hero-inline-item:not(:last-child)::after {
    right: -7px;
  }

  .weather-stage-hero-inline-item.is-condition {
    width: 100%;
    justify-content: center;
  }

  .weather-stage-hero-inline-item.is-condition::after {
    display: none;
  }

  .weather-stage-rail-left {
    order: 1;
  }

  .weather-stage-rail-right {
    order: 2;
  }

  .weather-stage-temp {
    font-size: 4.6rem;
  }

  .weather-stage-forecast-list {
    max-height: none;
  }

  .weather-stage-rail-right {
    gap: 14px;
  }

  .weather-stage-conditions-grid {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  .forecast-detail-periods {
    grid-template-columns: repeat(4, 1fr);
  }

  .weather-stage-metric-grid {
    grid-template-columns: 1fr;
  }

  .side-panel-scroll {
    max-height: 58vh;
    padding: 16px;
  }

  .city-search-tray {
    width: min(300px, 85vw);
  }
}
