:root {
  --navy-deep: #06111f;
  --navy-mid: #102846;
  --blue-active: #38bdf8;
  --sky: #7dd3fc;
  --orange-sun: #EA580C;
  --page-bg: #07111f;
  --card-bg-forecast: rgba(15, 32, 57, 0.74);
  --card-bg: rgba(18, 39, 68, 0.86);
  --border-light: rgba(255, 255, 255, 0.08);
  --text-primary: #f8fbff;
  --text-muted: #a8bad2;
  --text-dim: #7f94ad;
  --green-ok: #22c55e;
  --amber-alert: #f5a623;
  --surface-glass: rgba(12, 29, 53, 0.72);
  --surface-glass-strong: rgba(17, 40, 72, 0.88);
  --surface-highlight: rgba(56, 189, 248, 0.16);
  --soft-border: rgba(255, 255, 255, 0.08);
  --soft-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --card-radius: 20px;
  --nav-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

html {
  overscroll-behavior: none;
}

body {
  overflow: hidden;
  background: var(--page-bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

#app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  border-radius: 7px;
  background: var(--orange-sun);
}

.brand-mark svg {
  width: 23px;
  height: 23px;
}

.brand-name {
  font-family: var(--nav-font);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.035em;
  color: #fff;
}

.nav-item[data-target="view-edu"][hidden],
.severe-tile[data-target="view-edu"][hidden] {
  display: none !important;
}

.header-search {
  position: relative;
  height: 36px;
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 7px 0 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.72);
}

.header-search > .ti-search {
  font-size: 15px;
  flex: 0 0 auto;
}

#search-input-mobile {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
}

#search-input-mobile::placeholder {
  color: rgba(255, 255, 255, 0.64);
}

#gps-btn-mobile {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: var(--sky);
  padding: 0;
}

#gps-btn-mobile i {
  font-size: 14px;
}

#desktop-nav,
.desktop-forecast-panel {
  display: none;
}

.forecast-column {
  display: contents;
}

.suggestions {
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  z-index: 120;
  display: none;
  max-height: 260px;
  overflow-y: auto;
  border: 0.5px solid var(--border-light);
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 14px 36px rgba(15, 39, 68, 0.18);
}

.sug-item,
.sug-section {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  color: var(--text-dim);
  font-size: 12px;
}

.sug-item i {
  flex: 0 0 auto;
  color: var(--blue-active);
  font-size: 15px;
}

.sug-section {
  color: var(--text-muted);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.sug-item.hover,
.sug-item:hover {
  background: #eef6ff;
}

#app-main {
  position: fixed;
  top: 56px;
  bottom: 62px;
  left: 0;
  right: 0;
  overflow-y: auto;
  padding: 10px;
  background: var(--page-bg);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

#app-main.map-active,
#app-main:has(#view-radar.active),
#app-main:has(#view-alerts.active),
#app-main:has(#view-severe.active),
#app-main:has(#view-meso.active),
#app-main:has(#view-lsr.active),
#app-main:has(#view-edu.active) {
  padding: 0;
  background: linear-gradient(180deg, #07111f 0%, #0a1422 48%, #0d1e30 100%);
}
#app-main:has(#view-forecast.active) {
  background: linear-gradient(160deg, #0d1f3c 0%, #0f2744 40%, #102d50 100%);
}

#app-main.map-active {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.view {
  display: none;
  visibility: hidden;
  position: relative;
  z-index: 0;
}

.view.active,
.page-view.active {
  display: flex;
  visibility: visible;
  z-index: 1;
  flex-direction: column;
  gap: 7px;
}

.hero-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--navy-mid);
}

.hero-city {
  font-size: 15px;
  font-weight: 600;
  color: #a8d4f5;
}

.hero-cond {
  margin-top: 2px;
  color: #7ab4d8;
  font-size: 13px;
}

.hero-temp {
  margin-top: 3px;
  font-size: 52px;
  line-height: 0.95;
  font-weight: 200;
  color: #fff;
}

.hero-temp sup {
  font-size: 22px;
  line-height: 0;
}

.hero-feels {
  margin-top: 6px;
  color: #7ab4d8;
  font-size: 12px;
}

.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 72px;
}

.hero-icon {
  width: 72px;
  height: 72px;
}

.weather-icon {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.weather-icon--hero {
  width: 100%;
  height: 100%;
}

.weather-icon--hourly {
  width: 40px;
  height: 40px;
}

.weather-icon--daily {
  width: 40px;
  height: 40px;
}

.hero-date {
  color: #a8d4f5;
  font-size: 12px;
  text-align: right;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.stat-card {
  padding: 10px 4px;
  border: 0.5px solid var(--border-light);
  border-radius: 10px;
  background: var(--card-bg-forecast);
  text-align: center;
}

.stat-val {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}

.stat-key {
  margin-top: 2px;
  color: rgba(0,0,0,0.45);
  font-size: 11px;
}

.alerts-banner {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 0.5px solid var(--border-light);
  border-radius: 12px;
  background: var(--card-bg-forecast);
}

.alerts-banner.active-alert {
  border-radius: 12px;
}

.alert-ok {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  border-radius: 50%;
  background: var(--green-ok);
  color: #fff;
}

.alert-ok i {
  font-size: 15px;
}

.alert-title {
  color: #166534;
  font-size: 13px;
  font-weight: 500;
}

.alerts-banner.no-alerts .alert-title {
  color: var(--text-primary);
  font-weight: 700;
}

.alert-sub {
  display: none;
  color: var(--text-muted);
  font-size: 9px;
}

.active-alert .alert-sub {
  display: block;
}

.radar-thumb {
  position: relative;
  height: 240px;
  overflow: hidden;
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  background: #0d2b4a;
  padding: 0;
  text-align: right;
}

.radar-thumb iframe,
.radar-view-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: auto;
}

.radar-label {
  position: absolute;
  top: 9px;
  left: 11px;
  z-index: 2;
  color: var(--sky);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

#mini-radar-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.radar-arrow {
  position: absolute;
  right: 10px;
  top: 19px;
  z-index: 4;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.radar-view-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  flex: 1;
  overflow: hidden;
  background: #0d2b4a;
}

#view-radar {
  flex: 1;
  min-height: 100%;
}

#view-alerts,
#view-severe,
#view-meso,
#view-lsr,
#view-radar {
  isolation: isolate;
  contain: strict;
}

#view-radar.active,
#view-alerts.active,
#view-severe.active,
#view-meso.active,
#view-lsr.active {
  display: block;
  height: 100%;
  touch-action: none;
  overflow: hidden;
  overscroll-behavior: none;
  isolation: isolate;
  gap: 0;
}

#radar-map,
#alerts-map,
#outlook-map,
#meso-map,
#lsr-map {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  overflow: hidden;
  pointer-events: auto;
}

#alerts-map .maplibregl-canvas-container,
#outlook-map .maplibregl-canvas-container,
#meso-map .maplibregl-canvas-container,
#lsr-map .maplibregl-canvas-container,
#radar-map .maplibregl-canvas-container {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
}

#alerts-map .maplibregl-canvas,
#outlook-map .maplibregl-canvas,
#meso-map .maplibregl-canvas,
#lsr-map .maplibregl-canvas,
#radar-map .maplibregl-canvas {
  position: absolute !important;
  z-index: 0 !important;
}

/* ── LSR VIEW ── */
#view-lsr.active {
  display: block;
  height: 100%;
  padding: 0;
  gap: 0;
  overflow: hidden;
  touch-action: none;
  isolation: isolate;
}

#lsr-map {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* TOP LEFT */
#lsr-top-left {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}

#lsr-pill {
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border: 0.5px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
}

#lsr-pill span {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

#lsr-date-selector {
  position: relative;
}

#lsr-date-trigger {
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border: 0.5px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 6px 26px 6px 10px;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 120px;
  cursor: pointer;
}

#lsr-date-trigger-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

#lsr-date-label {
  font-size: 9px;
  color: rgba(255,255,255,0.45);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

#lsr-date-val {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

#lsr-date-chev {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
}

#lsr-date-trigger.open #lsr-date-chev {
  transform: translateY(-50%) rotate(180deg);
}

#lsr-date-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border: 0.5px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 10px;
  min-width: 210px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  z-index: 30;
}

#lsr-date-dropdown.open {
  display: block;
}

#lsr-quick-btns {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.lsr-q-btn {
  flex: 1;
  padding: 6px;
  border-radius: 7px;
  border: none;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.7);
}

.lsr-q-btn.active {
  background: #e8820c;
  color: #fff;
}

.lsr-cal-divider {
  height: 0.5px;
  background: rgba(255,255,255,0.12);
  margin: 6px 0;
}

.lsr-cal-label {
  font-size: 8px;
  font-weight: 700;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

#lsr-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.lsr-cal-nav {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1.15fr) 24px;
  gap: 4px;
  align-items: center;
  margin-bottom: 5px;
}

.lsr-cal-nav-btn,
.lsr-cal-select {
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.82);
}

.lsr-cal-nav-btn {
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 13px;
  font-weight: 800;
}

.lsr-cal-nav-btn:disabled {
  opacity: 0.25;
  cursor: default;
}

.lsr-cal-select {
  min-width: 0;
  padding: 0 5px;
  font-size: 10px;
  font-weight: 700;
  outline: none;
}

.lsr-cal-select option {
  color: #0f2744;
}

.lsr-cal-header {
  font-size: 8px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  font-weight: 600;
  padding: 2px 0;
}

.lsr-cal-day {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  text-align: center;
  padding: 5px 2px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  border: none;
  background: none;
}

.lsr-cal-day:hover { background: rgba(255,255,255,0.1); }
.lsr-cal-day.today { color: #fff; font-weight: 700; }
.lsr-cal-day.selected { background: #e8820c; color: #fff; font-weight: 700; }
.lsr-cal-day.disabled { opacity: 0.2; pointer-events: none; }
.lsr-cal-day.future { opacity: 0.15; pointer-events: none; }

/* FILTER PANEL */
#lsr-filter-panel {
  position: absolute;
  top: auto;
  right: auto;
  bottom: 10px;
  left: 10px;
  z-index: 10;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 0.5px solid rgba(255,255,255,0.12);
}

.lsr-f-btn {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  overflow: visible;
  white-space: nowrap;
  pointer-events: auto;
  position: relative;
  gap: 8px;
}

.lsr-f-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: block;
}

.lsr-f-btn[data-type="tornado"] { color: #ef4444; }
.lsr-f-btn[data-type="wind"] { color: #3b82f6; }
.lsr-f-btn[data-type="hail"] { color: #22c55e; }

.lsr-f-btn.on {
  background: rgba(255,255,255,0.14);
  border: 0.5px solid rgba(255,255,255,0.18);
}

.lsr-f-btn.off { opacity: 0.4; }

.lsr-f-label {
  color: rgba(255,255,255,0.85);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
}

.lsr-f-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  border-radius: 7px;
  font-size: 8px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
}

.lsr-count-tor  { background: #ef4444; }
.lsr-count-wind { background: #3b82f6; }
.lsr-count-hail { background: #22c55e; }

/* MARKERS */
.lsr-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  overflow: hidden;
}

.lsr-marker-tor { background: #ef4444; }
.lsr-marker-wind { background: #3b82f6; }
.lsr-marker-hail { background: #22c55e; }

.lsr-marker svg {
  display: block;
  width: 18px;
  height: 18px;
  overflow: visible;
}

#lsr-map .maplibregl-popup-anchor-top .maplibregl-popup-content,
#lsr-map .maplibregl-popup-anchor-bottom .maplibregl-popup-content,
#lsr-map .maplibregl-popup-anchor-left .maplibregl-popup-content,
#lsr-map .maplibregl-popup-anchor-right .maplibregl-popup-content,
#lsr-map .maplibregl-popup-content,
#outlook-map .maplibregl-popup-anchor-top .maplibregl-popup-content,
#outlook-map .maplibregl-popup-anchor-bottom .maplibregl-popup-content,
#outlook-map .maplibregl-popup-anchor-left .maplibregl-popup-content,
#outlook-map .maplibregl-popup-anchor-right .maplibregl-popup-content,
#outlook-map .maplibregl-popup-content {
  padding: 0 !important;
  width: 220px !important;
  max-width: 220px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.55) !important;
  border: none !important;
  overflow: hidden !important;
}

#lsr-map .maplibregl-popup,
#outlook-map .maplibregl-popup {
  max-width: 220px !important;
}

#lsr-map .maplibregl-popup-tip,
#outlook-map .maplibregl-popup-tip {
  display: none !important;
}

.reports-popup {
  width: 220px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
}

.reports-popup-header {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  flex-shrink: 0;
}

.reports-popup-header svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.reports-popup-header i {
  color: var(--popup-header-color, #fff);
  font-size: 16px;
  flex-shrink: 0;
}

.reports-popup-header span {
  color: var(--popup-header-color, #fff);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reports-popup-card {
  background: transparent;
}

.reports-popup-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.reports-popup-row:last-child {
  border-bottom: 0;
}

.reports-popup-row span:first-child {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  padding-top: 1px;
}

.reports-popup-row span:last-child {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-align: left;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.outlook-popup-card .reports-popup-row {
  align-items: center;
}

.outlook-popup-card .reports-popup-row span:first-child {
  padding-top: 0;
}

.reports-popup-details {
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.reports-popup-details-label {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
}

.reports-popup-details-text {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  line-height: 1.45;
  white-space: normal;
}

.ol-popup-card {
  width: 310px;
  max-width: 310px;
  overflow: hidden;
  border-radius: 14px;
  background: #0d1f38;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#outlook-map .maplibregl-popup:has(.ol-popup-card) {
  max-width: none !important;
  width: auto !important;
}

#outlook-map .maplibregl-popup-content:has(.ol-popup-card) {
  padding: 0 !important;
  background: transparent !important;
  border-radius: 14px;
  overflow: visible !important;
  max-width: none !important;
  width: auto !important;
}

.ol-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
}
.ol-popup-icon {
  font-size: 22px;
  flex-shrink: 0;
  opacity: 0.92;
}
.ol-popup-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
}
.ol-popup-close {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0.5px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.ol-popup-body {
  padding: 12px 14px 14px;
}
.ol-popup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.ol-popup-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 0.5px solid rgba(255,255,255,0.14);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.02em;
}
.ol-popup-desc {
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
  border-top: 0.5px solid rgba(255,255,255,0.08);
  padding-top: 10px;
}

@media (max-width: 1039px) {
  #outlook-map .maplibregl-popup.ol-mobile-popup-fixed {
    position: fixed !important;
    top: var(--ol-mobile-popup-top, 174px) !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 80 !important;
    width: min(316px, calc(100vw - 32px)) !important;
    max-width: min(316px, calc(100vw - 32px)) !important;
    transform: translateX(-50%) !important;
    pointer-events: auto;
  }

  #outlook-map .maplibregl-popup.ol-mobile-popup-fixed .maplibregl-popup-content {
    width: 100% !important;
    max-width: 100% !important;
    max-height: var(--ol-mobile-popup-max-height, 230px);
    overflow: hidden !important;
  }

  #outlook-map .maplibregl-popup.ol-mobile-popup-fixed .ol-popup-card {
    width: 100%;
    max-width: none;
    max-height: var(--ol-mobile-popup-max-height, 230px);
    display: flex;
    flex-direction: column;
  }

  #outlook-map .maplibregl-popup.ol-mobile-popup-fixed .ol-popup-header {
    min-height: 42px;
    padding: 10px 10px;
  }

  #outlook-map .maplibregl-popup.ol-mobile-popup-fixed .ol-popup-icon {
    font-size: 18px;
  }

  #outlook-map .maplibregl-popup.ol-mobile-popup-fixed .ol-popup-title {
    font-size: 13px;
  }

  #outlook-map .maplibregl-popup.ol-mobile-popup-fixed .ol-popup-close {
    display: inline-flex;
  }

  #outlook-map .maplibregl-popup.ol-mobile-popup-fixed .ol-popup-body {
    overflow-y: auto;
    padding: 10px 12px 12px;
  }

  #outlook-map .maplibregl-popup.ol-mobile-popup-fixed .ol-popup-meta {
    margin-bottom: 8px;
  }

  #outlook-map .maplibregl-popup.ol-mobile-popup-fixed .ol-popup-desc {
    font-size: 11px;
    line-height: 1.45;
    padding-top: 8px;
  }
}

/* ── MESO VIEW ── */
#view-meso.active {
  display: block;
  height: 100%;
  padding: 0;
  gap: 0;
  overflow: hidden;
  touch-action: none;
  isolation: isolate;
}

#meso-map {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* FLOATING CARDS */
.meso-cards {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.meso-card {
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border-radius: 12px;
  padding: 10px 12px;
  border: 0.5px solid rgba(255,255,255,0.15);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.meso-card.highlighted {
  border-color: #e8820c;
}

.meso-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.meso-card-num {
  font-size: 9px;
  font-weight: 700;
  color: #e8820c;
  letter-spacing: 0.04em;
}

.meso-card-time {
  font-size: 8px;
  color: rgba(255,255,255,0.4);
}

.meso-card-title {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 2px;
}

.meso-card-area {
  font-size: 9px;
  color: rgba(255,255,255,0.5);
}

.meso-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
}

.meso-card-read {
  font-size: 8px;
  font-weight: 600;
  color: #60b3ff;
}

/* EXPANDED BODY */
.meso-expanded-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  margin-top: 0;
}

.meso-expanded-body.open {
  max-height: 300px;
  margin-top: 8px;
}

.meso-expanded-inner {
  padding-top: 8px;
  border-top: 0.5px solid rgba(255,255,255,0.12);
}

.meso-expanded-inner p {
  font-size: 10px;
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
}

.meso-expanded-expires {
  font-size: 9px;
  font-weight: 700;
  color: #e8820c;
  margin-top: 6px;
}

.meso-loading {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  font-style: italic;
}

/* SEE ALL BUTTON */
.meso-see-all {
  background: rgba(255,255,255,0.08);
  border: 0.5px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  color: #60b3ff;
}

/* NO DISCUSSIONS STATE */
.meso-empty {
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border-radius: 12px;
  padding: 14px;
  border: 0.5px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  gap: 10px;
}

.meso-empty-check {
  width: 22px;
  height: 22px;
  background: #22c55e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.meso-empty span {
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

#view-meso.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  gap: 0;
  overflow: hidden;
  touch-action: none;
  isolation: isolate;
}

#meso-map {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: block;
  touch-action: none;
}

#meso-detail-panel {
  height: 230px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
}

#meso-panel-bar {
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  padding: 5px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

#meso-panel-title {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#meso-panel-count {
  font-size: 9px;
  font-weight: 700;
  color: #e8820c;
}

#meso-panel-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(5, 15, 30, 0.16);
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 211, 252, 0.55) rgba(255, 255, 255, 0.06);
}

#meso-panel-body::-webkit-scrollbar {
  width: 10px;
}

#meso-panel-body::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

#meso-panel-body::-webkit-scrollbar-thumb {
  border: 2px solid rgba(8, 24, 44, 0.78);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.78), rgba(56, 189, 248, 0.5));
}

#meso-panel-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.92), rgba(56, 189, 248, 0.68));
}

#meso-panel-empty {
  display: flex;
  flex-direction: column;
  background: rgba(5, 15, 30, 0.18);
  color: rgba(255,255,255,0.82);
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 6px;
  padding: 16px;
  text-align: center;
}

#meso-empty-icon {
  font-size: 40px;
  opacity: 1;
  color: var(--orange-sun);
  animation: meso-bounce 1.4s ease-in-out infinite;
}

@keyframes meso-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

#meso-empty-text {
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  line-height: 1.4;
}

#meso-empty-sub {
  font-size: 9px;
  color: rgba(255,255,255,0.75);
}

#meso-panel-content {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#meso-disc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#meso-disc-num {
  font-size: 9px;
  font-weight: 700;
  color: #e8820c;
  letter-spacing: 0.04em;
}

#meso-disc-time {
  font-size: 8px;
  color: rgba(255,255,255,0.58);
}

#meso-disc-headline {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-top: 2px;
}

#meso-disc-summary {
  font-size: 9px;
  color: rgba(255,255,255,0.74);
  line-height: 1.5;
  margin-top: 4px;
}

#meso-disc-expires {
  font-size: 8px;
  font-weight: 600;
  color: #e8820c;
  margin-top: 2px;
}

@media (min-width: 1040px) {
  #view-meso.active #meso-top-left {
    top: 18px;
    left: 18px;
  }

  #view-meso.active #meso-pill {
    border-radius: 999px;
    padding: 8px 18px;
    border-width: 1px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
  }

  #view-meso.active #meso-pill span {
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  #view-meso.active #meso-detail-panel {
    height: 340px;
    border-top: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 -18px 44px rgba(0,0,0,0.26);
  }

  #view-meso.active #meso-panel-bar {
    min-height: 48px;
    padding: 11px 22px;
  }

  #view-meso.active #meso-panel-title {
    font-size: 14px;
    letter-spacing: 0.08em;
  }

  #view-meso.active #meso-panel-count {
    font-size: 13px;
  }

  #view-meso.active #meso-panel-content {
    padding: 16px 22px 22px;
    gap: 8px;
  }

  #view-meso.active #meso-disc-num {
    font-size: 13px;
  }

  #view-meso.active #meso-disc-time {
    font-size: 12px;
  }

  #view-meso.active #meso-disc-headline {
    font-size: 17px;
    line-height: 1.35;
    margin-top: 4px;
  }

  #view-meso.active #meso-disc-summary {
    font-size: 14px;
    line-height: 1.65;
    margin-top: 8px;
    max-width: 980px;
  }

  #view-meso.active #meso-disc-expires {
    font-size: 12px;
    margin-top: 8px;
  }

  #view-meso.active #meso-empty-icon {
    font-size: 54px;
  }

  #view-meso.active #meso-empty-text {
    font-size: 15px;
  }

  #view-meso.active #meso-empty-sub {
    font-size: 12px;
  }
}

.section-label {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.hourly-card {
  border: 0.5px solid var(--border-light);
  border-radius: 12px;
  background: var(--card-bg-forecast);
  padding: 12px;
}
.wx101-promo-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  margin-top: 10px;
  background: linear-gradient(to right, rgba(6,14,30,0.82) 0%, rgba(6,14,30,0.55) 100%), url('elements/media/images/severewx101.png') center/cover no-repeat;
  border: 0.5px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  text-align: left;
}
.wx101-promo-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wx101-promo-icon {
  font-size: 28px;
  color: #60b3ff;
  flex-shrink: 0;
  line-height: 1;
}
.wx101-promo-text {
  flex: 1;
}
.wx101-promo-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}
.wx101-promo-sub {
  font-size: 11px;
  color: #7aaad0;
  line-height: 1.4;
}
.wx101-promo-arrow {
  font-size: 18px;
  color: #7aaad0;
  flex-shrink: 0;
}
.wx101-promo-card:hover .wx101-promo-arrow {
  color: #fff;
}
.hourly-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.daily-card {
  border: 0.5px solid var(--border-light);
  border-radius: 12px;
  background: var(--card-bg-forecast);
  overflow: hidden;
}
.daily-card-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 12px 0;
}

.hourly-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  scrollbar-color: rgba(125, 211, 252, 0.62) rgba(255, 255, 255, 0.06);
  scrollbar-width: thin;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.hourly-row::-webkit-scrollbar {
  height: 8px;
}

.hourly-row::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.hourly-row::-webkit-scrollbar-thumb {
  border: 2px solid rgba(15, 32, 57, 0.74);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.78), rgba(125, 211, 252, 0.58));
}

.hourly-row::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(90deg, rgba(125, 211, 252, 0.92), rgba(56, 189, 248, 0.76));
}

.hr-item {
  min-width: 58px;
  flex: 0 0 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.hr-item span:first-child {
  color: var(--text-muted);
  font-size: 11px;
}

.hr-item span:nth-child(2) {
  font-size: 28px;
  line-height: 1;
}

.hr-icon,
.hr-item span:nth-child(2) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hr-item strong {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.pop {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 3px;
  background: #e8f0fa;
}

.pop i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue-active);
}


.day-row {
  border-bottom: 0.5px solid #e8f0f8;
  cursor: pointer;
}

.day-row.is-night {
  background: #f7fafd;
}

.day-row:last-child {
  border-bottom: 0;
}

.day-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  min-height: 54px;
}

.day-row.is-night .day-main {
  padding: 10px 14px;
  min-height: 54px;
}

.day-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(15,39,68,0.07);
  border: 0.5px solid rgba(15,39,68,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
}

.day-row.is-night .day-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(0,0,0,0.05);
  border: 0.5px solid rgba(0,0,0,0.07);
  font-size: 20px;
}

.day-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.day-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f2744;
  display: block;
}

.day-row.is-night .day-name {
  font-size: 13px;
  font-weight: 700;
  color: rgba(0,0,0,0.38);
}

.day-row.today .day-name {
  color: #1a4a7a;
}

.day-row.tonight .day-name {
  color: rgba(0,0,0,0.38);
}

.day-cond {
  font-size: 11px;
  color: rgba(0,0,0,0.45);
  display: block;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.day-row.is-night .day-cond {
  color: rgba(0,0,0,0.28);
}

.day-temp {
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  width: 36px;
  text-align: right;
}

.day-hi {
  color: #0f2744;
  font-weight: 700;
}

.day-lo {
  font-size: 14px;
  font-weight: 600;
  color: rgba(0,0,0,0.35);
}

.day-expanded {
  display: none;
  padding: 10px 14px 12px;
  border-top: 0.5px solid #e8f0f8;
  background: #f8fafc;
}

.day-row.expanded + .day-expanded,
.day-expanded.is-open {
  display: block;
}

.day-expanded.is-open {
  display: block;
  grid-column: 1 / -1;
}

.day-detail-text {
  margin: 0;
  font-size: 12px;
  color: rgba(0,0,0,0.6);
  line-height: 1.65;
}

.day-metrics {
  display: none;
}


/* ── ALERTS VIEW ── */
#view-alerts.active {
  display: block;
  height: 100%;
  padding: 0;
  gap: 0;
  overflow: hidden;
  touch-action: none;
  isolation: isolate;
}

#alerts-map {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  position: relative;
}

@keyframes slideInFromRight {
  from { transform: translateX(100%); opacity: 1; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes alertModalDesktopIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes pulse-pill {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.72; transform: scale(1.03); }
}

.wm-spin {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: rgba(255,255,255,0.55);
  border-radius: 50%;
  animation: wmSpin .8s linear infinite;
}

@keyframes wmSpin {
  to { transform: rotate(360deg); }
}

.wm-table { width: 100%; border-collapse: collapse; }
.wm-table td { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.07); vertical-align: middle; }
.wm-table tr:last-child td { border-bottom: none; }

.alert-detail-grid {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: grid;
  grid-template-columns: 36px minmax(116px, 136px) minmax(0, 1fr);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
  margin: 4px 0 8px;
}

.alert-detail-grid strong {
  font-weight: 650;
}

.alert-detail-row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.14s ease;
}

.alert-detail-row + .alert-detail-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.alert-detail-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.alert-detail-icon-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
}

.alert-detail-icon-cell .material-symbols-rounded {
  opacity: 0.7;
}

.alert-detail-label-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 10px 12px 10px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.alert-detail-label-cell span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.73rem;
  font-weight: 600;
  white-space: normal;
  line-height: 1.18;
}

.alert-detail-value-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
}

.alert-detail-value-cell > span {
  color: #f8fbff;
  font-size: 0.82rem;
}

#watch-modal-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 211, 252, 0.58) rgba(255, 255, 255, 0.06);
}

#watch-modal-body::-webkit-scrollbar {
  width: 9px;
}

#watch-modal-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

#watch-modal-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(125, 211, 252, 0.72), rgba(59, 130, 246, 0.62));
  border: 2px solid rgba(8, 20, 36, 0.9);
  border-radius: 999px;
}

#watch-modal-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(186, 230, 253, 0.86), rgba(96, 165, 250, 0.78));
}

@supports not (grid-template-columns: subgrid) {
  .alert-detail-row {
    grid-template-columns: 36px minmax(116px, 136px) minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .alert-detail-grid {
    grid-template-columns: 34px minmax(96px, 112px) minmax(0, 1fr);
  }

  @supports not (grid-template-columns: subgrid) {
    .alert-detail-row {
      grid-template-columns: 34px minmax(96px, 112px) minmax(0, 1fr);
    }
  }
}

/* LAYER PANEL */
#alerts-bottom-left { display: contents; }

.alerts-layer-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 0.5px solid rgba(255,255,255,0.12);
  z-index: 10;
  cursor: pointer;
}

#view-alerts .alerts-layer-panel {
  display: none !important;
}

.alerts-layer-btn {
  display: flex;
  align-items: center;
  padding: 7px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
}

.alerts-layer-panel.expanded .alerts-layer-btn {
  pointer-events: auto;
  padding: 7px 10px;
}

.alerts-layer-btn.on {
  background: rgba(255,255,255,0.14);
  border: 0.5px solid rgba(255,255,255,0.18);
}

.alerts-layer-btn.off {
  opacity: 0.4;
}

.alerts-btn-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}

/* icon colors per button */
.alerts-layer-btn[data-layer="warnings"] .alerts-btn-icon i,
.alerts-layer-btn[data-layer="warnings"] .alerts-btn-icon svg { color: #e74c3c; stroke: #e74c3c; }
.alerts-layer-btn[data-layer="watches"]  .alerts-btn-icon i   { color: #f1c40f; }
.alerts-layer-btn[data-layer="flood"]    .alerts-btn-icon svg { color: #27ae60; stroke: #27ae60; }
.alerts-layer-btn[data-layer="radar"]    .alerts-btn-icon i   { color: #3498db; }

.alerts-btn-label {
  font-size: 10px;
  font-weight: 600;
  max-width: 0;
  overflow: hidden;
  padding-left: 0;
  color: rgba(255,255,255,0.85);
  transition: max-width 0.2s ease, padding 0.2s ease;
}

.alerts-layer-panel.expanded .alerts-btn-label {
  max-width: 120px;
  padding-left: 8px;
}

/* RADAR OPACITY SLIDER */
.alerts-radar-slider {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  border: 0.5px solid rgba(52,152,219,0.3);
  padding: 8px 6px;
}

.alerts-layer-panel.expanded .alerts-radar-slider.visible {
  display: flex;
}

.alerts-slider-label {
  font-size: 8px;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#alerts-radar-opacity {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 6px;
  height: 90px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to top, rgba(255,255,255,0.1) 0%, #3498db 100%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

#alerts-radar-opacity::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #3498db;
  margin-left: -4px;
}

.alerts-opacity-val {
  font-size: 9px;
  color: #3498db;
  font-weight: 700;
}

@media (max-width: 1039px) {
  #alerts-bottom-left {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
    border: 0.5px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    overflow: hidden;
    width: 220px;
    max-width: calc(100vw - 20px);
  }

  /* Left column: filter buttons stacked vertically */
  .alerts-layer-panel {
    position: static;
    top: auto; right: auto; left: auto; bottom: auto;
    background: rgba(0,0,0,0.15);
    border: none;
    border-radius: 0;
    border-right: 0.5px solid rgba(255,255,255,0.10);
    padding: 8px 6px;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 4px;
    cursor: default;
    justify-content: space-around;
    flex-shrink: 0;
    width: 54px;
  }

  .alerts-layer-btn {
    pointer-events: auto;
    width: 42px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    overflow: visible;
    border-radius: 8px;
    flex-shrink: 0;
    flex-grow: 0;
    white-space: normal;
  }

  .alerts-layer-panel.expanded .alerts-layer-btn {
    padding: 6px 4px;
  }

  .alerts-btn-label {
    max-width: none;
    padding-left: 0;
    font-size: 7px;
    line-height: 1.1;
    white-space: normal;
    text-align: center;
    display: block;
    overflow: visible;
  }

  .alerts-layer-panel.expanded .alerts-btn-label {
    max-width: none;
    padding-left: 0;
  }

  /* Hide radar slider on mobile combined card */
  .alerts-radar-slider { display: none !important; }

  /* ── alerts-legend: standalone mobile ── */
  #view-alerts.active #alerts-legend {
    width: 220px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 250px);
    overflow-y: auto;
  }

  /* ── alerts-card: mobile ── */
  .alerts-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    flex: 1 1 auto;
  }
  .alerts-card-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-bottom: 0.5px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
  }
  .alerts-card-header .header-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--orange-sun);
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 12px;
  }
  .alerts-card-header .header-title {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e8f2ff;
    line-height: 1;
  }
  .alerts-status-strip {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-bottom: 0.5px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
  }
  .alerts-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255,255,255,0.18);
    display: block;
  }
  .alerts-status-dot.active {
    background: #22c55e;
    animation: olWarnPulse 1.4s ease-in-out infinite;
  }
  .alerts-status-text {
    font-size: 8px;
    font-weight: 500;
    color: rgba(168,198,224,0.7);
    white-space: nowrap;
  }
  .alerts-viewport-list {
    max-height: 96px;
    overflow-y: auto;
    flex-shrink: 0;
  }
  .alerts-viewport-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 7px 10px;
    gap: 2px;
    text-align: center;
  }
  .alerts-vp-empty-icon { display: none; }
  .alerts-vp-empty-title {
    font-size: 8px;
    font-weight: 700;
    color: rgba(168,198,224,0.55);
  }
  .alerts-vp-empty-sub {
    font-size: 7px;
    color: rgba(168,198,224,0.35);
    line-height: 1.3;
    max-width: 160px;
  }
  .alerts-viewport-item {
    display: flex;
    align-items: center;
    border-bottom: 0.5px solid rgba(255,255,255,0.06);
    cursor: pointer;
  }
  .alerts-vp-rail { width: 3px; flex-shrink: 0; align-self: stretch; }
  .alerts-vp-icon { display: none; }
  .alerts-vp-text {
    flex: 1;
    min-width: 0;
    padding: 4px 7px 4px 6px;
  }
  .alerts-vp-title {
    font-size: 8px;
    font-weight: 700;
    color: #e8f2ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .alerts-vp-meta {
    font-size: 7px;
    color: rgba(168,198,224,0.55);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* LEGEND */
.alerts-legend {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border-radius: 10px;
  padding: 8px 10px;
  border: 0.5px solid rgba(255,255,255,0.12);
  width: max-content;
  max-width: calc(100vw - 20px);
  box-sizing: border-box;
  z-index: 10;
}

.alerts-no-active {
  display: none;
  align-items: center;
  gap: 7px;
}

.alerts-no-active-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
}

.alerts-no-active-icon i {
  font-size: 12px;
  font-weight: 700;
}

.alerts-no-active span {
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.alerts-legend-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.alerts-legend-title.critical {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,0.55);
}
.alerts-legend-title.critical i {
  font-size: 1.3em;
  line-height: 1;
  color: currentColor;
}
.alerts-legend-title.standard { color: rgba(255,255,255,0.4); margin-top: 7px; }

.alerts-legend-divider {
  height: 0.5px;
  background: rgba(255,255,255,0.15);
  margin: 6px 0;
}

.alerts-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.alerts-legend-item:last-child { margin-bottom: 0; }

.alerts-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  flex-shrink: 0;
}

.alerts-legend-item span:not(.alerts-legend-swatch) {
  font-size: 9px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  color: rgba(255,255,255,0.8);
}

/* critical alert colors */
.alerts-critical-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

[data-critical="tornado-emergency"]    .alerts-critical-dot { background: #ff00aa; box-shadow: 0 0 0 2px rgba(255,0,170,0.18); }
[data-critical="tornado-emergency"]    span                  { color: rgba(255,255,255,0.94); }
[data-critical="observed-tornado"]     .alerts-critical-dot { background: #FF0000; }
[data-critical="observed-tornado"]     span                  { color: rgba(255,255,255,0.92); }
[data-critical="tornado-emergency"] .alerts-critical-dot,
[data-critical="observed-tornado"] .alerts-critical-dot,
[data-critical="destructive-tstorm"] .alerts-critical-dot,
[data-critical="flash-flood-emergency"] .alerts-critical-dot {
  width: 32px;
  height: 32px;
  position: relative;
  display: block;
  border: 0;
  border-radius: 50%;
  flex-shrink: 0;
}
[data-critical="observed-tornado"] .alerts-critical-dot {
  border: 3px solid rgba(255,255,255,0.9);
}
[data-critical="tornado-emergency"] .alerts-critical-dot::after,
[data-critical="observed-tornado"] .alerts-critical-dot::after,
[data-critical="destructive-tstorm"] .alerts-critical-dot::after,
[data-critical="flash-flood-emergency"] .alerts-critical-dot::after {
  content: "!";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font: 900 23px/1 Arial, sans-serif;
}
[data-critical="destructive-tstorm"].critical-item {
  animation: none;
}
[data-critical="destructive-tstorm"] .alerts-critical-dot {
  background: #FFA500;
}
[data-critical="destructive-tstorm"] span {
  color: rgba(255,255,255,0.92);
}
[data-critical="flash-flood-emergency"] .alerts-critical-dot {
  background: #00bb00;
}
[data-critical="flash-flood-emergency"] span {
  color: rgba(255,255,255,0.92);
}

.critical-item {
  padding: 0;
  margin-left: 0;
  margin-right: 0;
  border-radius: 4px;
  background: transparent;
}

[data-alert-event="Tornado Warning"] .alerts-legend-swatch {
  background: #FF0000 !important;
}

[data-alert-event="Severe Thunderstorm Warning"] .alerts-legend-swatch {
  background: #FFA500 !important;
}

[data-alert-event="Flash Flood Warning"] .alerts-legend-swatch {
  background: #00ff66 !important;
}

[data-alert-event="Hurricane Warning"] .alerts-legend-swatch {
  background: #DC143C !important;
}

[data-alert-event="Tropical Storm Warning"] .alerts-legend-swatch {
  background: #B22222 !important;
}

[data-alert-event="Storm Surge Warning"] .alerts-legend-swatch {
  background: #B524F7 !important;
}

[data-alert-event="Tornado Watch"] .alerts-legend-swatch {
  background: #FFFF00 !important;
}

[data-alert-event="Severe Thunderstorm Watch"] .alerts-legend-swatch {
  background: #DB7093 !important;
}

[data-alert-event="Flash Flood Watch"] .alerts-legend-swatch {
  background: #3498db !important;
}

[data-alert-event="Hurricane Watch"] .alerts-legend-swatch {
  background: #FF00FF !important;
}

[data-alert-event="Tropical Storm Watch"] .alerts-legend-swatch {
  background: #F08080 !important;
}

[data-alert-event="Storm Surge Watch"] .alerts-legend-swatch {
  background: #DB70DB !important;
}
@keyframes alerts-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.critical-item {
  animation: none;
}

.recenter-btn {
  width: 29px;
  height: 29px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  margin-bottom: 4px;
  padding: 0;
}

.recenter-btn:active {
  background: #f0f0f0;
}

.recenter-btn svg {
  width: 16px;
  height: 16px;
}

.recenter-btn-wrap {
  position: absolute;
  bottom: 110px;
  right: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (min-width: 1040px) {
  #alerts-map .maplibregl-ctrl-bottom-right,
  #outlook-map .maplibregl-ctrl-bottom-right,
  #meso-map .maplibregl-ctrl-bottom-right {
    right: 18px;
    bottom: 18px;
  }

  #alerts-map .maplibregl-ctrl-bottom-right .maplibregl-ctrl,
  #outlook-map .maplibregl-ctrl-bottom-right .maplibregl-ctrl,
  #meso-map .maplibregl-ctrl-bottom-right .maplibregl-ctrl {
    margin: 0;
  }

  #alerts-map .maplibregl-ctrl-group,
  #outlook-map .maplibregl-ctrl-group,
  #meso-map .maplibregl-ctrl-group {
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.28);
  }

  #alerts-map .maplibregl-ctrl-group button,
  #outlook-map .maplibregl-ctrl-group button,
  #meso-map .maplibregl-ctrl-group button {
    width: 42px;
    height: 42px;
  }

  #alerts-map .maplibregl-ctrl-icon,
  #outlook-map .maplibregl-ctrl-icon,
  #meso-map .maplibregl-ctrl-icon {
    background-size: 24px 24px;
  }

  #alerts-map .recenter-btn,
  #outlook-map .recenter-btn,
  #meso-map .recenter-btn {
    width: 42px;
    height: 42px;
    box-sizing: border-box;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  #alerts-map .recenter-btn svg,
  #outlook-map .recenter-btn svg,
  #meso-map .recenter-btn svg {
    width: 23px;
    height: 23px;
  }

  #alerts-map .recenter-btn-wrap,
  #outlook-map .recenter-btn-wrap,
  #meso-map .recenter-btn-wrap {
    right: 18px;
    bottom: 124px;
  }
}

/* ── SEVERE OUTLOOK VIEW ── */
#view-severe.active {
  display: block;
  height: 100%;
  padding: 0;
  gap: 0;
  overflow: hidden;
  touch-action: none;
  isolation: isolate;
}

#outlook-map {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.outlook-pwo-banner {
  --pwo-top: 10px;
  --pwo-left: 10px;
  position: absolute;
  top: var(--pwo-top);
  left: var(--pwo-left);
  z-index: 21;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: #fe1100;
  box-shadow: 0 4px 18px rgba(254, 17, 0, 0.5);
  color: #fff;
  box-sizing: border-box;
}

.outlook-pwo-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.outlook-pwo-tag-desktop {
  display: none;
}

/* Change 2: paused until #view-severe.active so animation doesn't run at page load */
.outlook-pwo-tag-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: olWarnPulse 1.4s ease-in-out infinite;
  animation-play-state: paused;
  transform-origin: center;
}

.outlook-pwo-tag-mobile svg {
  width: 22px;
  height: 22px;
  display: block;
}

#view-severe.active .outlook-pwo-tag-mobile {
  animation-play-state: running;
}

.outlook-pwo-marquee {
  display: none;
}

/* DAY SELECTOR */
.outlook-day-selector {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 20;
}

#outlook-day-selector {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

#outlook-pill {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border: 0.5px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 3px 10px;
  margin-bottom: 4px;
}

#outlook-pill span {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.outlook-day-trigger {
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border: 0.5px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 7px 12px;
  position: relative;
  min-width: 140px;
}

.outlook-trigger-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.outlook-trigger-day {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.outlook-trigger-date {
  font-size: 9px;
  color: rgba(255,255,255,0.5);
  font-weight: 400;
  line-height: 1.2;
}

.outlook-day-nav {
  display: flex;
  gap: 6px;
  width: 100%;
}

.outlook-day-nav-btn {
  width: 34px;
  height: 30px;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border: 0.5px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  color: rgba(255,255,255,0.86);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: opacity 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.outlook-day-nav-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #143456 0%, #215a91 100%);
}

.outlook-day-nav-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.outlook-day-nav-btn:disabled {
  cursor: default;
  opacity: 0.36;
}

#outlook-top-left,
#outlook-bottom-left { display: contents; }
/* FILTER CONTROL PANEL */
.outlook-ctrl-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border: 0.5px solid rgba(255,255,255,0.12);
  z-index: 10;
  cursor: pointer;
}

.outlook-ctrl-btn {
  display: flex;
  align-items: center;
  padding: 7px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.06);
  cursor: pointer;
  overflow: hidden;
  white-space: nowrap;
  pointer-events: none;
}

.outlook-ctrl-panel.expanded .outlook-ctrl-btn {
  pointer-events: auto;
  padding: 7px 10px;
}

.outlook-ctrl-btn.on {
  background: rgba(255,255,255,0.14);
  border: 0.5px solid rgba(255,255,255,0.18);
}

.outlook-ctrl-btn.off { opacity: 0.4; }
.outlook-ctrl-btn.disabled { opacity: 0.18; pointer-events: auto !important; cursor: not-allowed; }

.outlook-btn-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
}

/* icon colors */
.outlook-ctrl-btn[data-layer="categorical"] .outlook-btn-icon i { color: #60b3ff; }
.outlook-ctrl-btn[data-layer="tornado"] .outlook-btn-icon svg { color: #e74c3c; stroke: #e74c3c; }
.outlook-ctrl-btn[data-layer="wind"] .outlook-btn-icon i { color: #60b3ff; }
.outlook-ctrl-btn[data-layer="hail"] .outlook-btn-icon svg { color: #a78bfa; stroke: #a78bfa; }
.outlook-ctrl-btn[data-layer="hail"] .outlook-btn-icon circle[fill="currentColor"] { fill: #a78bfa; }

.outlook-btn-label {
  font-size: 10px;
  font-weight: 600;
  max-width: 0;
  overflow: hidden;
  padding-left: 0;
  color: rgba(255,255,255,0.85);
  transition: max-width 0.2s ease, padding 0.2s ease;
}

.outlook-ctrl-panel.expanded .outlook-btn-label {
  max-width: 130px;
  padding-left: 8px;
}

.outlook-ctrl-divider {
  height: 0.5px;
  background: rgba(255,255,255,0.12);
  margin: 1px 0;
}

/* LEGEND */
.outlook-legend {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border-radius: 10px;
  padding: 8px 10px;
  border: 0.5px solid rgba(255,255,255,0.12);
  width: max-content;
  max-width: calc(100vw - 20px);
  box-sizing: border-box;
  height: auto;
  z-index: 10;
}

.outlook-legend-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 6px;
}

.outlook-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
}

.outlook-legend-item:last-child { margin-bottom: 0; }

.ol-warn-triangle {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  animation: olWarnPulse 1.4s ease-in-out infinite;
  transform-origin: center;
}
.ol-warn-triangle svg {
  width: 14px;
  height: 14px;
  display: block;
}
@keyframes olWarnPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(1.25); }
}

.outlook-legend-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  flex-shrink: 0;
}

.outlook-legend-item span:not(.outlook-legend-swatch) {
  font-size: 9px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  background: transparent;
  padding: 0;
  border-radius: 0;
  white-space: nowrap;
}

.outlook-legend-level {
  display: none;
}

@media (min-width: 1040px) {
  #view-severe.active #outlook-day-selector {
    top: 18px;
    left: 18px;
    gap: 0;
    align-items: stretch;
    --outlook-desktop-pill-width: 222px;
  }

  #view-severe.active #outlook-pill {
    border-radius: 999px;
    padding: 8px 18px;
    border-width: 1px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
    width: var(--outlook-desktop-pill-width);
    box-sizing: border-box;
    justify-content: center;
    margin-bottom: 8px;
  }

  #view-severe.active #outlook-pill span {
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  #view-severe.active .outlook-day-trigger {
    min-width: 0;
    width: var(--outlook-desktop-pill-width);
    min-height: 52px;
    padding: 10px 16px;
    border-radius: 16px 16px 0 0;
    border-width: 1px;
    box-shadow: 0 16px 42px rgba(0,0,0,0.28);
    box-sizing: border-box;
  }

  #view-severe.active .outlook-trigger-day {
    font-size: 15px;
  }

  #view-severe.active .outlook-trigger-date {
    font-size: 12px;
  }

  #view-severe.active .outlook-day-nav {
    gap: 0;
    width: var(--outlook-desktop-pill-width);
  }

  #view-severe.active .outlook-day-nav-btn {
    flex: 1 1 0;
    width: auto;
    height: 42px;
    border-radius: 0;
    border-width: 1px;
    border-top: 0;
    box-shadow: 0 12px 32px rgba(0,0,0,0.24);
  }

  #view-severe.active .outlook-day-nav-btn:first-child {
    border-radius: 0 0 0 16px;
    border-right-width: 0;
  }

  #view-severe.active .outlook-day-nav-btn:last-child {
    border-radius: 0 0 16px 0;
  }

  #view-severe.active .outlook-day-nav-btn i {
    font-size: 20px;
  }

  #view-severe.active #outlook-bottom-left {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    bottom: 18px;
    left: 18px;
    z-index: 10;
    background:
      radial-gradient(circle at 0% 0%, rgba(96, 179, 255, 0.14), transparent 38%),
      linear-gradient(135deg, #1b466d 0%, #143456 42%, #071827 100%);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    overflow: hidden;
    width: max-content;
    max-width: calc(100vw - 36px);
    min-height: 224px;
    box-shadow: 0 16px 42px rgba(0,0,0,0.34);
  }

  #view-severe.active .outlook-ctrl-panel {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    background: rgba(0,0,0,0.15);
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    gap: 3px;
    padding: 7px;
    border-radius: 0;
    box-shadow: none;
    cursor: default;
    justify-content: flex-start;
    flex-shrink: 0;
    width: auto;
    flex-direction: row;
  }

  #view-severe.active .outlook-ctrl-btn {
    position: relative;
    min-height: 42px;
    width: 46px;
    padding: 8px 6px;
    border-radius: 12px;
    overflow: visible;
    pointer-events: auto;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    white-space: normal;
  }

  #view-severe.active .outlook-ctrl-panel.expanded .outlook-ctrl-btn {
    padding: 8px 6px;
  }

  #view-severe.active .outlook-btn-icon {
    width: 28px;
  }

  #view-severe.active .outlook-btn-icon i,
  #view-severe.active .outlook-btn-icon svg {
    font-size: 22px;
    width: 22px;
    height: 22px;
  }

  #view-severe.active .outlook-btn-label {
    font-size: 10px;
    font-weight: 700;
    max-width: none;
    padding-left: 0;
    line-height: 1.1;
    white-space: normal;
    text-align: center;
    display: block;
  }

  #view-severe.active .outlook-ctrl-btn.off {
    opacity: 0.68;
  }

  #view-severe.active .outlook-ctrl-panel.expanded .outlook-btn-label {
    max-width: none;
    padding-left: 0;
  }

  #view-severe.active .outlook-ctrl-divider {
    display: none;
  }

  #view-severe.active .outlook-ctrl-btn::after {
    display: none;
  }

  #view-severe.active .outlook-ctrl-btn:hover::after,
  #view-severe.active .outlook-ctrl-btn:focus-visible::after {
    display: none;
  }

  #view-severe.active .outlook-legend {
    position: static;
    bottom: auto;
    left: auto;
    background: none;
    border: none;
    width: max-content;
    max-width: calc(100vw - 30px);
    height: auto;
    padding: 13px 15px;
    border-radius: 0;
    box-shadow: none;
    flex: none;
    min-width: 0;
  }

  #view-severe.active .outlook-legend-title {
    font-size: 12px;
    margin-bottom: 8px;
  }

  #view-severe.active .outlook-legend-item {
    gap: 5px !important;
    margin-bottom: 7px;
  }

  #view-severe.active .outlook-legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
  }

  #view-severe.active .outlook-legend-item span:not(.outlook-legend-swatch) {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    line-height: 1.4;
    display: block;
    width: auto;
    box-sizing: border-box;
    text-align: left;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

}

#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 62px;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border-top: none;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
}

.nav-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

.nav-icon {
  font-size: 24px;
  color: rgba(255, 255, 255, 0.55);
}

.nav-label {
  font-family: var(--nav-font);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.nav-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e8820c;
  opacity: 0;
}

.nav-tab.active .nav-icon {
  color: #e8820c;
}

.nav-tab.active .nav-label {
  color: #e8820c;
  font-weight: 600;
}

.nav-tab.active .nav-dot {
  opacity: 1;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 62px;
  left: 0;
  z-index: 200;
  display: none;
  background: rgba(5, 15, 30, 0.5);
}

.drawer-overlay.open {
  display: block;
}

.severe-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 62px;
  z-index: 201;
  display: none;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  box-shadow: 0 -18px 48px rgba(5, 15, 30, 0.42);
}

.severe-drawer.open {
  display: block;
}

.drawer-handle {
  width: 36px;
  height: 3px;
  margin: 10px auto 14px;
  border-radius: 2px;
  background: rgba(255,255,255,0.35);
}

.drawer-title {
  padding: 0 16px 10px;
  border-bottom: 0.5px solid rgba(255,255,255,0.16);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.severe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
}

.severe-tile {
  min-height: 82px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  border: 0.5px solid rgba(255,255,255,0.16);
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 14px 12px;
  text-align: left;
}

.severe-tile.active {
  border-color: transparent;
  background: linear-gradient(135deg, #1a4a7a, #2d6fad);
  color: #fff;
}

.severe-tile i {
  color: currentColor;
  font-size: 24px;
}

.severe-tile span {
  color: currentColor;
  font-size: 13px;
  font-weight: 700;
}

.severe-tile small {
  color: rgba(255,255,255,0.66);
  font-size: 11px;
}

.severe-tile.active small {
  color: #a8d4f5;
}


/* ── SEVERE WEATHER 101 ── */
#view-edu.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 0%, rgba(56, 189, 248, 0.18), transparent 34%),
    radial-gradient(circle at 88% 8%, rgba(234, 88, 12, 0.15), transparent 28%),
    linear-gradient(160deg, #06111f 0%, #0a1b31 48%, #07111f 100%);
  color: #fff;
}

.edu-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  background: transparent;
  -webkit-overflow-scrolling: touch;
}

.edu-title-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  padding: 16px clamp(16px, 4vw, 34px);
  background: rgba(6, 17, 31, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.edu-title-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(234, 88, 12, 0.92), rgba(245, 158, 11, 0.84));
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.edu-title-icon i { font-size: 25px; }

.edu-title-copy { min-width: 0; }

.edu-title-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
}

.edu-title-copy p {
  margin: 6px 0 0;
  color: rgba(219, 234, 254, 0.72);
  font-size: clamp(0.82rem, 1.8vw, 0.96rem);
  font-weight: 600;
  line-height: 1.35;
}

.edu-card-list {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 28px) clamp(12px, 3vw, 28px) calc(92px + env(safe-area-inset-bottom));
}

.edu-card {
  --edu-accent: #4fc3f7;
  position: relative;
  margin: 0 0 12px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(22, 48, 83, 0.86), rgba(9, 23, 42, 0.74)),
    rgba(15, 32, 57, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.edu-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--edu-accent);
  opacity: 0.9;
  pointer-events: none;
}

.edu-card.is-open {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--edu-accent) 48%, rgba(255, 255, 255, 0.12));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38), 0 0 0 1px color-mix(in srgb, var(--edu-accent) 18%, transparent);
}

.edu-accent-watch     { --edu-accent: #EA580C; }
.edu-accent-tornado   { --edu-accent: #ff4444; }
.edu-accent-thunder   { --edu-accent: #EA580C; }
.edu-accent-lightning { --edu-accent: #facc15; }
.edu-accent-flood     { --edu-accent: #3498db; }
.edu-accent-hail      { --edu-accent: #a78bfa; }
.edu-accent-wind      { --edu-accent: #4fc3f7; }
.edu-accent-winter    { --edu-accent: #e2e8f0; }

.edu-card-trigger {
  width: 100%;
  display: flex;
  flex-direction: column;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  padding: 0;
}

.edu-card-hero {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.edu-card.is-open .edu-card-hero {
  max-height: 220px;
}

.edu-card-hero img {
  width: 100%;
  height: clamp(164px, 24vw, 220px);
  object-fit: cover;
  object-position: center 40%;
  display: block;
  filter: brightness(0.76) saturate(1.14);
}

.edu-card-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 14px 18px;
  min-height: 72px;
}

.edu-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--edu-accent) 16%, rgba(255, 255, 255, 0.06));
  color: var(--edu-accent);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--edu-accent) 24%, rgba(255, 255, 255, 0.08));
}

.edu-card-icon i { font-size: 22px; }

.edu-card-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  flex: 1;
}

.edu-card-title {
  display: block;
  color: #fff;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.edu-card-teaser {
  display: block;
  margin-top: 4px;
  color: rgba(219, 234, 254, 0.66);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
}

.edu-card-chevron {
  color: rgba(219, 234, 254, 0.46);
  font-size: 19px;
  transition: transform 0.24s ease, color 0.24s ease;
  flex-shrink: 0;
}

.edu-card.is-open .edu-card-chevron {
  color: var(--edu-accent);
  transform: rotate(180deg);
}

.edu-card-body {
  max-height: 0;
  overflow: hidden;
  background: rgba(2, 8, 23, 0.32);
  color: rgba(248, 251, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.68;
  transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 1px solid transparent;
}

.edu-card.is-open .edu-card-body {
  max-height: 600px;
  border-top-color: rgba(255,255,255,0.06);
}

.edu-card-body > p {
  margin: 0;
  padding: 16px 18px 10px;
  color: rgba(219, 234, 254, 0.78);
}

.edu-tip-list {
  list-style: none;
  margin: 0;
  padding: 6px 18px 18px;
}

.edu-tip-list li {
  position: relative;
  padding: 8px 0 8px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(248, 251, 255, 0.88);
}

.edu-tip-list li:last-child { border-bottom: 0; }

.edu-tip-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--edu-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--edu-accent) 14%, transparent);
}

.edu-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 6px 18px 18px;
}

.edu-compare-col {
  min-width: 0;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.edu-compare-col h2 {
  margin: 0 0 6px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
}

.edu-compare-col p {
  margin: 0;
  color: rgba(219, 234, 254, 0.76);
  font-size: 0.78rem;
  line-height: 1.4;
}

.edu-compare-col strong {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.edu-compare-watch {
  background: rgba(234, 88, 12, 0.15);
  border-color: rgba(234, 88, 12, 0.42);
}

.edu-compare-warning {
  background: rgba(255, 68, 68, 0.14);
  border-color: rgba(255, 68, 68, 0.42);
}

@media (min-width: 720px) {
  .edu-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 14px;
  }

  .edu-card {
    margin: 0;
  }

  .edu-card:first-child {
    grid-column: 1 / -1;
  }

  .edu-title-bar {
    justify-content: center;
  }
}

@media (min-width: 1120px) {
  .edu-card-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .edu-card:first-child {
    grid-column: span 2;
  }
}

@media (max-width: 460px) {
  .edu-title-bar {
    min-height: 76px;
    padding: 12px 14px;
  }

  .edu-title-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .edu-card-list {
    padding-right: 10px;
    padding-left: 10px;
  }

  .edu-card-header-row {
    padding: 12px 12px 12px 14px;
    min-height: 68px;
  }

  .edu-card-icon {
    width: 38px;
    height: 38px;
  }

  .edu-compare {
    grid-template-columns: 1fr;
  }
}

#view-forecast.forecast-loading .hero-card,
#view-forecast.forecast-loading .stats-grid,
#view-forecast.forecast-loading .alerts-banner,
#view-forecast.forecast-loading .radar-thumb,
#view-forecast.forecast-loading .hourly-card,
#view-forecast.forecast-loading .daily-card,
#view-forecast.forecast-loading .section-label {
  opacity: 0;
  pointer-events: none;
}

#view-forecast:not(.forecast-loading) .hero-card,
#view-forecast:not(.forecast-loading) .stats-grid,
#view-forecast:not(.forecast-loading) .alerts-banner,
#view-forecast:not(.forecast-loading) .radar-thumb,
#view-forecast:not(.forecast-loading) .hourly-card,
#view-forecast:not(.forecast-loading) .daily-card,
#view-forecast:not(.forecast-loading) .section-label {
  opacity: 1;
  transition: opacity 0.3s ease;
}




#meso-top-left {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
  pointer-events: none;
}

#meso-pill {
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border: 0.5px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 3px 10px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

#meso-pill span {
  font-size: 9px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

@media (min-width: 1040px) {
  #view-alerts.active #alerts-bottom-left {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 10;
    background: radial-gradient(circle at 0% 0%, rgba(96,179,255,0.14), transparent 38%),
                linear-gradient(135deg, #1b466d 0%, #143456 42%, #071827 100%);
    border: 0.5px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    overflow: hidden;
    width: 340px;
    max-width: 340px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.42);
    max-height: calc(100vh - 36px);
  }

  #view-alerts.active .alerts-layer-panel {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    background: rgba(0,0,0,0.15);
    border: none;
    border-right: 1px solid rgba(255,255,255,0.10);
    gap: 8px;
    padding: 9px;
    border-radius: 0;
    box-shadow: none;
    flex-shrink: 0;
  }

  #view-alerts.active .alerts-layer-btn {
    min-height: 42px;
    padding: 10px;
    border-radius: 12px;
  }

  #view-alerts.active .alerts-layer-panel.expanded .alerts-layer-btn {
    padding: 10px 14px;
  }

  #view-alerts.active .alerts-btn-icon {
    width: 28px;
  }

  #view-alerts.active .alerts-btn-icon i,
  #view-alerts.active .alerts-btn-icon svg {
    font-size: 22px;
    width: 22px;
    height: 22px;
  }

  #view-alerts.active .alerts-btn-label {
    font-size: 13px;
    font-weight: 700;
  }

  #view-alerts.active .alerts-layer-panel.expanded .alerts-btn-label {
    max-width: 170px;
    padding-left: 10px;
  }

  #view-alerts.active .alerts-radar-slider {
    gap: 6px;
    padding: 10px 8px;
    border-radius: 12px;
  }

  #view-alerts.active .alerts-slider-label {
    font-size: 10px;
  }

  #view-alerts.active #alerts-radar-opacity {
    width: 8px;
    height: 128px;
  }

  #view-alerts.active #alerts-radar-opacity::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
  }

  #view-alerts.active .alerts-opacity-val {
    font-size: 12px;
  }

  #view-alerts.active #alerts-legend {
    position: absolute;
    bottom: 18px;
    left: 18px;
    z-index: 10;
    background: radial-gradient(circle at 0% 0%, rgba(96,179,255,0.14), transparent 38%),
                linear-gradient(135deg, #1b466d 0%, #143456 42%, #071827 100%);
    border: 0.5px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 13px 15px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.42);
    width: 260px;
    max-width: 260px;
    max-height: calc(100vh - 380px);
    overflow-y: auto;
  }

  #view-alerts.active .alerts-no-active {
    gap: 10px;
  }

  #view-alerts.active .alerts-no-active-icon {
    width: 24px;
    height: 24px;
  }

  #view-alerts.active .alerts-no-active-icon i {
    font-size: 16px;
  }

  #view-alerts.active .alerts-no-active span {
    font-size: 13px;
  }

  #view-alerts.active .alerts-legend-title {
    font-size: 12px;
    margin-bottom: 8px;
  }

  #view-alerts.active .alerts-legend-title.standard {
    margin-top: 11px;
  }

  #view-alerts.active .alerts-legend-divider {
    margin: 10px 0;
  }

  #view-alerts.active .alerts-legend-item {
    gap: 8px;
    margin-bottom: 6px;
  }

  #view-alerts.active .critical-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
    background: transparent;
  }

  #view-alerts.active .alerts-legend-swatch {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
  }

  #view-alerts.active .alerts-critical-dot {
    display: block;
  }

  #view-alerts.active [data-critical="tornado-emergency"] .alerts-critical-dot::after,
  #view-alerts.active [data-critical="observed-tornado"] .alerts-critical-dot::after,
  #view-alerts.active [data-critical="destructive-tstorm"] .alerts-critical-dot::after,
  #view-alerts.active [data-critical="flash-flood-emergency"] .alerts-critical-dot::after {
    content: "!";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font: 900 23px/1 Arial, sans-serif;
  }

  #view-alerts.active .alerts-legend-item span:not(.alerts-legend-swatch) {
    font-size: 12px;
    font-weight: 500;
    padding: 0;
    border-radius: 0;
    width: auto;
    text-align: left;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  /* ── alerts-card: desktop ── */
  #view-alerts.active .alerts-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    flex: 1 1 auto;
  }

  #view-alerts.active .alerts-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 0.5px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
  }

  #view-alerts.active .alerts-card-header .header-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--orange-sun);
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    color: #fff;
    font-size: 18px;
  }


  #view-alerts.active .alerts-card-header .header-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #e8f2ff;
    line-height: 1.2;
  }


  #view-alerts.active .alerts-status-strip {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 15px;
    border-bottom: 0.5px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
  }

  #view-alerts.active .alerts-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255,255,255,0.18);
  }

  #view-alerts.active .alerts-status-dot.active {
    background: #22c55e;
    animation: olWarnPulse 1.4s ease-in-out infinite;
  }

  #view-alerts.active .alerts-status-text {
    font-size: 11px;
    font-weight: 500;
    color: rgba(168,198,224,0.7);
  }

  #view-alerts.active .alerts-viewport-list {
    flex: 0 0 auto;
    overflow-y: scroll;
    max-height: 210px;
    min-height: 0;
  }

  #view-alerts.active .alerts-viewport-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 14px;
    gap: 4px;
    text-align: center;
  }

  #view-alerts.active .alerts-vp-empty-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    color: rgba(168,198,224,0.4);
    font-size: 14px;
  }

  #view-alerts.active .alerts-vp-empty-title {
    font-size: 11px;
    font-weight: 700;
    color: rgba(168,198,224,0.6);
  }

  #view-alerts.active .alerts-vp-empty-sub {
    font-size: 10px;
    color: rgba(168,198,224,0.38);
    line-height: 1.4;
    max-width: 190px;
  }

  #view-alerts.active .alerts-viewport-item {
    display: flex;
    align-items: center;
    border-bottom: 0.5px solid rgba(255,255,255,0.06);
    cursor: pointer;
    transition: background 0.12s;
  }

  #view-alerts.active .alerts-viewport-item:hover {
    background: rgba(255,255,255,0.04);
  }

  #view-alerts.active .alerts-vp-rail {
    width: 4px;
    flex-shrink: 0;
    align-self: stretch;
  }

  #view-alerts.active .alerts-vp-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 8px 7px;
  }

  #view-alerts.active .alerts-vp-text {
    flex: 1 1 auto;
    min-width: 0;
    padding: 8px 12px 8px 0;
  }

  #view-alerts.active .alerts-vp-title {
    font-size: 11px;
    font-weight: 700;
    color: #e8f2ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #view-alerts.active .alerts-vp-meta {
    font-size: 10px;
    color: rgba(168,198,224,0.56);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

}

#desktop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(5,15,30,0.88);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

#desktop-overlay.visible {
  display: flex;
}

#desktop-overlay-card {
  background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
  border: 1px solid rgba(79,195,247,0.2);
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

#desktop-overlay-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

#desktop-overlay-logo span {
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

#desktop-overlay-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: rgba(79,195,247,0.15);
  border: 1px solid rgba(79,195,247,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

#desktop-overlay-icon i {
  font-size: 32px;
  color: #4fc3f7;
}

#desktop-overlay-title {
  margin: 0 0 12px;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

#desktop-overlay-body {
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

#desktop-overlay-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 0 0 20px;
}

#desktop-overlay-hint {
  margin: 0 0 24px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}

#desktop-overlay-dismiss {
  background: rgba(79,195,247,0.15);
  border: 1px solid rgba(79,195,247,0.4);
  border-radius: 10px;
  color: #4fc3f7;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 24px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#desktop-overlay-dismiss:hover {
  background: rgba(79,195,247,0.25);
}

@media (min-width: 1200px) {
  #app-header {
    height: 64px;
    gap: 18px;
    padding: 10px 28px;
  }

  .brand {
    gap: 9px;
  }

  .brand-name {
    font-size: 23px;
  }

  .header-search {
    flex: 0 1 390px;
    height: 40px;
    border-radius: 8px;
    padding-left: 12px;
    padding-right: 8px;
  }

  #search-input-mobile {
    font-size: 14px;
  }

  #gps-btn-mobile {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  #desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-left: auto;
    min-width: 0;
  }

  .nav-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    padding: 0 10px;
    background: transparent;
    color: rgba(255,255,255,0.72);
    font-family: var(--nav-font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.035em;
    white-space: nowrap;
  }

  .nav-item i {
    width: 18px;
    flex-shrink: 0;
    font-size: 18px;
    color: currentColor;
  }

  .nav-item.active,
  .nav-item:hover {
    background: rgba(255,255,255,0.13);
    color: #fff;
  }

  #bottom-nav,
  #mobile-severe-menu,
  #menu-overlay,
  #desktop-overlay,
  #desktop-overlay.visible {
    display: none !important;
  }

  #app-main {
    top: 64px;
    bottom: 0;
    padding: 16px;
  }

  #app-main.map-active,
  #app-main:has(#view-radar.active),
  #app-main:has(#view-alerts.active),
  #app-main:has(#view-severe.active),
  #app-main:has(#view-meso.active),
  #app-main:has(#view-lsr.active),
  #app-main:has(#view-edu.active) {
    padding: 0;
  }

  #view-forecast.active {
    width: 100%;
    max-width: min(1840px, calc(100vw - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(350px, 430px) minmax(500px, 680px) minmax(360px, 420px);
    align-items: start;
    gap: 16px;
  }

  #view-forecast .forecast-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  #view-forecast .forecast-left-column {
    grid-column: 1;
  }

  #view-forecast .forecast-center-column {
    grid-column: 2;
  }

  #view-forecast .forecast-right-column {
    grid-column: 3;
    display: grid;
    grid-template-rows: repeat(4, 168px);
    gap: 8px;
  }

  #view-forecast .hero-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    background:
      radial-gradient(circle at 82% 18%, rgba(96,179,255,0.22), transparent 34%),
      linear-gradient(135deg, #123456 0%, #1a4a7a 58%, #226497 100%);
    box-shadow: 0 14px 34px rgba(15, 39, 68, 0.18);
  }

  #view-forecast .hero-card::after {
    content: "";
    position: absolute;
    right: -34px;
    bottom: -50px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
  }

  #view-forecast .hero-left,
  #view-forecast .hero-right {
    position: relative;
    z-index: 1;
  }

  #view-forecast .hero-city {
    color: #c8e7fb;
    font-size: 16px;
    font-weight: 750;
  }

  #view-forecast .hero-cond {
    color: #9bd0ef;
    font-size: 14px;
  }

  #view-forecast .hero-temp {
    margin-top: 4px;
    font-size: 62px;
    font-weight: 180;
    letter-spacing: 0;
    text-shadow: 0 8px 28px rgba(0,0,0,0.18);
  }

  #view-forecast .hero-feels {
    margin-top: 8px;
    color: #b7def4;
    font-size: 13px;
  }

  #view-forecast .hero-icon {
    width: 76px;
    height: 76px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.18));
  }

  #view-forecast .hero-date {
    color: #c8e7fb;
    font-weight: 650;
  }

  #view-forecast .stats-grid {
    gap: 7px;
  }

  #view-forecast .stat-card {
    min-height: 58px;
    padding: 9px 5px;
    border-radius: 9px;
  }

  #view-forecast .alerts-banner {
    min-height: 46px;
    border-radius: 10px;
  }

  #view-forecast #radar-thumb {
    height: clamp(180px, 22vh, 230px);
    min-height: 180px;
    border-radius: 10px;
  }

  #view-forecast .section-label {
    margin-top: 4px;
    color: #a8c8f0;
  }

  #view-forecast .forecast-center-column > .section-label:first-child {
    display: none;
  }

  #view-forecast .hourly-card {
    padding: 14px 14px 13px;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(15, 39, 68, 0.08);
  }

  #view-forecast .hourly-row {
    gap: 8px;
  }

  #view-forecast .hr-item {
    min-width: 68px;
    flex-basis: 68px;
    gap: 7px;
    padding: 2px 4px;
  }

  #view-forecast .hr-item span:first-child {
    font-size: 12px;
    font-weight: 700;
  }

  #view-forecast .hr-item span:nth-child(2) {
    font-size: 32px;
  }

  #view-forecast .hr-item strong {
    font-size: 15px;
    font-weight: 750;
  }

  #view-forecast .pop {
    height: 4px;
  }

  #view-forecast .daily-card {
    border-radius: 10px;
  }

  .desktop-forecast-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 9px;
    height: 198px;
    min-height: 0;
    border: 0.5px solid rgba(255,255,255,0.16);
    border-radius: 12px;
    background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
    color: #fff;
    padding: 13px 13px 12px;
    box-shadow: 0 14px 32px rgba(15, 39, 68, 0.22), inset 0 1px 0 rgba(255,255,255,0.12);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
  }

  .desktop-forecast-panel::after {
    content: "";
    position: absolute;
    inset: auto -42px -48px auto;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
  }

  .desktop-preview-card {
    cursor: pointer;
  }

  .desktop-preview-card:hover {
    border-color: rgba(45, 111, 173, 0.34);
    box-shadow: 0 12px 28px rgba(15, 39, 68, 0.13);
    transform: translateY(-1px);
  }

  .desktop-forecast-panel .desktop-preview-head,
  .desktop-forecast-panel .desktop-preview-body {
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .desktop-forecast-panel.is-ready .desktop-preview-head,
  .desktop-forecast-panel.is-ready .desktop-preview-body {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
  }

  .desktop-preview-card:focus-visible {
    outline: 3px solid rgba(96, 179, 255, 0.55);
    outline-offset: 2px;
  }

  .desktop-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 2px;
    min-height: 16px;
  }

  .desktop-preview-head h2 {
    margin: 0;
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .desktop-preview-status {
    display: none;
  }

  .desktop-status-ok {
    background: rgba(34, 197, 94, 0.22);
    color: #fff;
  }

  .desktop-preview-body {
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }

  .desktop-mini-map {
    position: relative;
    min-height: 126px;
    flex: 1 1 auto;
    width: 100%;
    overflow: hidden;
    border: none;
    border-radius: 9px;
    background:
      linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
      linear-gradient(0deg, rgba(255,255,255,0.08) 1px, transparent 1px),
      linear-gradient(135deg, #dcebf2 0%, #c9dfe8 48%, #dde9df 100%);
    background-size: 32px 32px, 32px 32px, auto;
    box-shadow: 0 4px 18px rgba(0,0,0,0.4);
  }

  .desktop-outlook-static-fallback,
  .desktop-live-mini-map {
    position: absolute;
    inset: 0;
  }

  .desktop-outlook-static-fallback {
    z-index: 1;
    transition: opacity 0.18s ease;
  }

  .desktop-live-mini-map {
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }

  .desktop-mini-empty-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(180deg, rgba(7, 20, 34, 0.18), rgba(7, 20, 34, 0.44));
    color: #fff;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    text-shadow: 0 1px 8px rgba(0,0,0,0.35);
    pointer-events: none;
  }

  .desktop-mini-map.show-empty-state .desktop-mini-empty-overlay {
    display: flex;
  }

  .desktop-mini-empty-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 2px solid rgba(255,255,255,0.92);
    border-radius: 50%;
    background: #16a34a;
    box-shadow: 0 6px 16px rgba(5, 30, 18, 0.28);
  }

  .desktop-mini-empty-icon i {
    color: #fff;
    font-size: 17px;
    line-height: 1;
  }

  .desktop-preview-copy strong,
  .desktop-preview-copy span,
  .desktop-preview-legend span {
    color: #fff;
  }

  .desktop-preview-copy span,
  .desktop-preview-legend span {
    opacity: 0.9;
  }

  .desktop-preview-legend i {
    border: 1px solid rgba(255,255,255,0.28);
  }

  .outlook-mini-map.has-live-map .desktop-live-mini-map {
    opacity: 1;
  }

  .alerts-mini-map.has-live-map .desktop-live-mini-map,
  .meso-mini-map.has-live-map .desktop-live-mini-map,
  .reports-mini-map.has-live-map .desktop-live-mini-map {
    opacity: 1;
  }

  .outlook-mini-map.has-live-map .desktop-outlook-static-fallback {
    opacity: 0;
  }

  .alerts-mini-map.has-live-map .desktop-outlook-static-fallback,
  .meso-mini-map.has-live-map .desktop-outlook-static-fallback,
  .reports-mini-map.has-live-map .desktop-outlook-static-fallback {
    opacity: 0;
  }

  .desktop-live-mini-map .maplibregl-control-container {
    display: none;
  }

  .desktop-live-mini-map .maplibregl-canvas {
    pointer-events: none;
  }

  .mini-map-water {
    position: absolute;
    inset: auto -12px -24px 34%;
    height: 70px;
    border-radius: 48% 0 0 0;
    background: rgba(70, 151, 203, 0.22);
    transform: rotate(-8deg);
  }

  .mini-map-land {
    position: absolute;
    background: rgba(132, 160, 119, 0.28);
    border: 1px solid rgba(66, 113, 88, 0.12);
  }

  .mini-map-land.land-one {
    left: -16px;
    top: 18px;
    width: 118px;
    height: 76px;
    border-radius: 26px 34px 30px 24px;
    transform: rotate(-12deg);
  }

  .mini-map-land.land-two {
    right: 18px;
    top: 8px;
    width: 96px;
    height: 92px;
    border-radius: 28px 36px 24px 32px;
    transform: rotate(14deg);
  }

  .mini-map-marker {
    position: absolute;
    left: 48%;
    top: 51%;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: var(--blue-active);
    box-shadow: 0 0 0 5px rgba(45, 111, 173, 0.18);
  }

  .mini-alert-zone,
  .mini-risk,
  .mini-meso-zone,
  .mini-report-marker {
    position: absolute;
    mix-blend-mode: normal;
  }

  .mini-alert-zone.zone-one {
    left: 20px;
    top: 24px;
    width: 96px;
    height: 42px;
    border: 1.5px solid rgba(255, 0, 0, 0.78);
    background: rgba(255, 0, 0, 0.12);
    clip-path: polygon(8% 18%, 82% 4%, 100% 45%, 76% 94%, 14% 82%, 0 42%);
    transform: rotate(-6deg);
  }

  .mini-alert-zone.zone-two {
    right: 28px;
    bottom: 20px;
    width: 84px;
    height: 36px;
    border: 1.5px solid rgba(255, 165, 0, 0.8);
    background: rgba(255, 165, 0, 0.14);
    clip-path: polygon(12% 8%, 88% 18%, 100% 62%, 70% 96%, 4% 78%, 0 28%);
    transform: rotate(7deg);
  }

  .mini-risk {
    border-radius: 0;
  }

  .risk-marginal {
    left: 28px;
    top: 22px;
    width: 132px;
    height: 76px;
    background: rgba(43, 163, 57, 0.26);
    clip-path: polygon(4% 34%, 28% 8%, 68% 0, 98% 30%, 86% 76%, 48% 100%, 10% 78%);
  }

  .risk-slight {
    left: 74px;
    top: 36px;
    width: 92px;
    height: 52px;
    background: rgba(246, 222, 0, 0.34);
    clip-path: polygon(6% 30%, 38% 4%, 80% 10%, 100% 48%, 72% 94%, 22% 84%);
  }

  .risk-enhanced {
    left: 112px;
    top: 48px;
    width: 46px;
    height: 28px;
    background: rgba(244, 128, 32, 0.42);
    clip-path: polygon(10% 18%, 72% 0, 100% 46%, 76% 100%, 18% 84%, 0 42%);
  }

  .mini-meso-zone.zone-one {
    left: 28px;
    top: 20px;
    width: 112px;
    height: 52px;
    border: 1.5px solid rgba(232, 130, 12, 0.84);
    border-radius: 0;
    background: rgba(232, 130, 12, 0.14);
    clip-path: polygon(8% 24%, 32% 4%, 76% 10%, 100% 44%, 78% 88%, 28% 100%, 0 62%);
    transform: rotate(-6deg);
  }

  .mini-meso-zone.zone-two {
    right: 22px;
    bottom: 18px;
    width: 88px;
    height: 44px;
    border: 1.5px solid rgba(96, 179, 255, 0.82);
    border-radius: 0;
    background: rgba(96, 179, 255, 0.14);
    clip-path: polygon(12% 10%, 86% 16%, 100% 58%, 72% 96%, 8% 78%, 0 34%);
    transform: rotate(8deg);
  }

  .mini-report-marker {
    z-index: 2;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 5px 13px rgba(15, 39, 68, 0.22);
  }

  .mini-report-marker i {
    font-size: 13px;
    line-height: 1;
  }

  .report-tornado {
    left: 30%;
    top: 22%;
    background: #dc2626;
  }

  .report-wind {
    left: 56%;
    top: 45%;
    background: #2563eb;
  }

  .report-wind-secondary {
    left: 68%;
    top: 20%;
    width: 18px;
    height: 18px;
    background: #2563eb;
    opacity: 0.88;
  }

  .report-wind-secondary i {
    font-size: 11px;
  }

  .report-hail {
    left: 42%;
    top: 64%;
    background: #7c3aed;
  }

  .desktop-preview-copy,
  .desktop-preview-legend {
    display: flex;
    min-width: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
  }

  .desktop-preview-copy {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px 8px;
  }

  .desktop-preview-copy strong {
    color: #fff;
    font-size: 11px;
    line-height: 1.25;
  }

  .desktop-preview-copy span {
    color: rgba(255,255,255,0.86);
    font-size: 9.5px;
    line-height: 1.4;
  }

  .desktop-preview-legend {
    flex-direction: row;
    justify-content: space-between;
    gap: 6px;
  }

  .desktop-preview-legend span {
    align-items: center;
    display: flex;
    gap: 6px;
    color: rgba(255,255,255,0.88);
    font-size: 9px;
    font-weight: 700;
  }

  .desktop-preview-legend i {
    width: 14px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
    border-color: rgba(255,255,255,0.34);
  }

  .legend-mrgl { background: #2ba339; }
  .legend-slight { background: #f6de00; }
  .legend-enh { background: #f48020; }

  @media (max-width: 1399px) {
    #view-forecast.active {
      grid-template-columns: minmax(330px, 360px) minmax(500px, 1fr) minmax(340px, 370px);
      gap: 12px;
    }

    #app-header {
      gap: 14px;
      padding-inline: 22px;
    }

    .header-search {
      flex-basis: 350px;
    }

    .desktop-forecast-panel {
      height: 188px;
      padding: 9px;
    }

    #view-forecast .forecast-right-column {
      grid-template-rows: repeat(4, 188px);
    }

    .desktop-preview-copy strong {
      font-size: 10.5px;
    }
  }

  @media (min-width: 1600px) {
    #view-forecast.active {
      grid-template-columns: minmax(390px, 470px) minmax(600px, 760px) minmax(400px, 460px);
    }

    .desktop-forecast-panel {
      height: 210px;
    }

    #view-forecast .forecast-right-column {
      grid-template-rows: repeat(4, 210px);
    }
  }
}

/* Modern dark dashboard forecast redesign */
body {
  background:
    radial-gradient(circle at 12% -8%, rgba(56, 189, 248, 0.18), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(59, 130, 246, 0.16), transparent 30%),
    linear-gradient(180deg, #06111f 0%, #08182b 52%, #06111f 100%);
  color: var(--text-primary);
}

button,
input {
  color-scheme: dark;
}

button:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
  outline: 3px solid rgba(125, 211, 252, 0.66);
  outline-offset: 2px;
}

#app-header {
  height: 68px;
  padding: 12px clamp(14px, 3vw, 32px);
  gap: clamp(10px, 1.5vw, 18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 0% 0%, rgba(96, 179, 255, 0.14), transparent 38%),
    linear-gradient(135deg, #1b466d 0%, #143456 42%, #071827 100%);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--orange-sun);
}

.brand-name {
  font-family: var(--nav-font);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.035em;
}

.header-search {
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.header-search:focus-within {
  border-color: rgba(125, 211, 252, 0.5);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

#gps-btn-mobile {
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

#gps-btn-mobile:hover {
  transform: translateY(-1px);
}

#desktop-nav {
  gap: 6px;
}

.nav-item {
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-item:hover {
  transform: translateY(-1px);
}

.nav-item.active {
  background: rgba(56, 189, 248, 0.14);
  color: #e0f7ff;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.18);
}

#app-main {
  top: 68px;
  bottom: 62px;
  padding: clamp(12px, 2.5vw, 28px);
  background:
    radial-gradient(circle at 18% 0%, rgba(56, 189, 248, 0.14), transparent 32%),
    radial-gradient(circle at 86% 16%, rgba(37, 99, 235, 0.14), transparent 30%),
    linear-gradient(160deg, #06111f 0%, #0a1b31 48%, #07111f 100%);
}

#app-main:has(#view-forecast.active) {
  background:
    radial-gradient(circle at 18% 0%, rgba(56, 189, 248, 0.16), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(30, 64, 175, 0.2), transparent 32%),
    linear-gradient(160deg, #06111f 0%, #0a1b31 48%, #07111f 100%);
}

#view-forecast.active {
  width: 100%;
  max-width: 1820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

#view-forecast .forecast-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-card,
.stat-card,
.alerts-banner,
.radar-thumb,
.hourly-card,
.daily-card,
.desktop-forecast-panel {
  border: 1px solid var(--soft-border);
  border-radius: var(--card-radius);
  background:
    linear-gradient(145deg, rgba(22, 48, 83, 0.82), rgba(9, 23, 42, 0.72)),
    radial-gradient(circle at 16% 0%, rgba(125, 211, 252, 0.12), transparent 36%);
  box-shadow: var(--soft-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.hero-card,
.radar-thumb,
.hourly-card,
.daily-card,
.desktop-forecast-panel {
  overflow: hidden;
}

.hero-card {
  position: relative;
  padding: clamp(18px, 3vw, 28px);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(20, 57, 97, 0.96), rgba(8, 24, 44, 0.94));
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 38%),
    linear-gradient(135deg, rgba(5, 13, 25, 0.2), rgba(5, 13, 25, 0.48));
  z-index: 1;
  pointer-events: none;
}

.hero-card > * {
  position: relative;
  z-index: 2;
}

.current-conditions-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  z-index: 0;
  pointer-events: none;
  filter: saturate(0.92) contrast(0.95);
}

.hero-left,
.hero-right {
  position: relative;
  z-index: 2;
}

.hero-city {
  color: #dff5ff;
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 800;
}

.hero-cond,
.hero-feels,
.hero-date,
.section-label,
.hourly-card-header,
.daily-card-header {
  color: var(--text-muted);
}

.hero-temp {
  margin-top: 6px;
  font-size: clamp(62px, 8vw, 96px);
  font-weight: 250;
  letter-spacing: 0;
  text-shadow: 0 16px 44px rgba(0, 0, 0, 0.34);
}

.hero-temp sup {
  font-size: 0.34em;
}

.hero-icon {
  width: clamp(78px, 9vw, 116px);
  height: clamp(78px, 9vw, 116px);
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.28));
}

.weather-icon--hero {
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.2));
}

.stats-grid {
  gap: 10px;
}

.stat-card {
  min-height: 78px;
  display: grid;
  align-content: center;
  padding: 14px 8px;
  border-radius: 18px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.stat-card:hover,
.desktop-preview-card:hover,
.radar-thumb:hover {
  border-color: rgba(125, 211, 252, 0.22);
  transform: translateY(-2px);
}

.stat-val {
  color: #f8fbff;
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 800;
}

.stat-key {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.section-label {
  margin: 10px 2px 0;
  font-size: 13px;
  font-weight: 850;
}

.alerts-banner {
  min-height: 62px;
  padding: 14px 16px;
  border-radius: 18px;
}

.alerts-banner.no-alerts .alert-title,
.alert-title {
  color: #f8fbff;
}

.alert-sub {
  color: var(--text-dim);
}

.radar-thumb {
  height: clamp(220px, 28vh, 340px);
  border-radius: 20px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.radar-arrow {
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 17, 31, 0.54);
  backdrop-filter: blur(10px);
}

.hourly-card,
.daily-card {
  padding: 18px;
  border-radius: 20px;
}

.daily-card {
  padding: 0;
}

.hourly-card-header,
.daily-card-header {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 850;
}

.hourly-row {
  gap: 10px;
  padding-bottom: 10px;
}

.hr-item {
  min-width: 76px;
  flex-basis: 76px;
  padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.hr-icon,
.hr-item span:nth-child(2) {
  width: 42px;
  height: 42px;
  min-height: 30px;
  overflow: hidden;
}

.weather-icon--hourly {
  width: 40px;
  height: 40px;
}

.hr-item span:first-child {
  color: var(--text-muted);
  font-weight: 750;
}

.hr-item strong {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.pop {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
}

.pop i {
  background: linear-gradient(90deg, #38bdf8, #2563eb);
}

.day-row,
.day-row.is-night {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  transition: background 0.18s ease;
}

.day-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.day-main,
.day-row.is-night .day-main {
  min-height: 68px;
  padding: 14px 18px;
}

.day-icon-wrap,
.day-row.is-night .day-icon-wrap {
  width: 42px;
  height: 42px;
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.day-icon-wrap .weather-icon--daily {
  width: 40px;
  height: 40px;
}

.day-name,
.day-row.is-night .day-name,
.day-row.today .day-name,
.day-row.tonight .day-name,
.day-hi {
  color: #f8fbff;
}

.day-cond,
.day-row.is-night .day-cond,
.day-lo,
.day-detail-text {
  color: var(--text-muted);
}

.day-expanded {
  border-top-color: rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.16);
}

.suggestions {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(10, 25, 45, 0.98);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.36);
}

.sug-item,
.sug-section {
  color: var(--text-muted);
}

.sug-item.hover,
.sug-item:hover {
  background: rgba(56, 189, 248, 0.12);
}

.desktop-forecast-panel {
  display: flex;
  min-height: 0;
  padding: 16px;
  border-radius: 20px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.desktop-preview-card:hover {
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.desktop-forecast-panel .desktop-preview-head,
.desktop-forecast-panel .desktop-preview-body {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.desktop-preview-head h2 {
  font-size: 12px;
  letter-spacing: 0.06em;
}

.desktop-preview-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
}

.desktop-mini-map {
  min-height: 108px;
  flex-basis: 112px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.desktop-preview-copy strong {
  font-size: 13px;
  font-weight: 800;
}

.desktop-preview-copy span,
.desktop-preview-legend span {
  color: var(--text-muted);
  font-size: 11px;
}

@media (min-width: 900px) {
  #bottom-nav,
  #mobile-severe-menu,
  #menu-overlay {
    display: none !important;
  }

  #app-main {
    bottom: 0;
  }

  #desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-left: auto;
  }

  .nav-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 0 13px;
    background: transparent;
    color: rgba(255,255,255,0.72);
    font-family: var(--nav-font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.035em;
    white-space: nowrap;
  }

  .nav-item i {
    width: 18px;
    flex-shrink: 0;
    font-size: 18px;
    color: currentColor;
  }
}

@media (min-width: 1040px) {
  #view-forecast.active {
    grid-template-columns: minmax(290px, 0.95fr) minmax(390px, 1.25fr) minmax(300px, 0.95fr);
    gap: 18px;
  }

  #view-forecast .forecast-left-column {
    grid-column: 1;
  }

  #view-forecast .forecast-center-column {
    grid-column: 2;
  }

  #view-forecast .forecast-right-column {
    grid-column: 3;
    display: grid;
    grid-template-rows: repeat(4, minmax(190px, auto));
    gap: 14px;
  }

  .forecast-center-column {
    position: sticky;
    top: 0;
  }
}

@media (min-width: 1440px) {
  #view-forecast.active {
    grid-template-columns: minmax(350px, 430px) minmax(520px, 1fr) minmax(360px, 430px);
    gap: 22px;
  }

  #view-forecast .forecast-column {
    gap: 16px;
  }
}

@media (max-width: 1199px) {
  #app-header {
    flex-wrap: wrap;
    height: auto;
    min-height: 68px;
  }

  #app-main {
    top: 68px;
  }
}

@media (min-width: 700px) and (max-width: 1039px) {
  #view-forecast.active {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  #view-forecast .forecast-left-column {
    grid-column: 1;
  }

  #view-forecast .forecast-center-column {
    grid-column: 2;
  }

  #view-forecast .forecast-right-column {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  #app-header {
    height: 64px;
    min-height: 64px;
    flex-wrap: nowrap;
    padding: 10px 12px 10px 0;
  }

  .brand-name {
    display: none;
  }

  #app-main {
    top: 64px;
    bottom: 62px;
    padding: 12px;
  }

  #view-forecast.active {
    gap: 12px;
  }

  #view-forecast .forecast-column {
    gap: 12px;
  }

  .hero-card {
    border-radius: 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-card {
    min-height: 72px;
  }

  .desktop-forecast-panel {
    min-height: 190px;
  }

  .desktop-preview-status {
    display: none;
  }
}

/* Two-column forecast dashboard layout */
#view-forecast.dashboard-layout.active {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

#view-forecast.dashboard-layout .main-weather-column,
#view-forecast.dashboard-layout .weather-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#view-forecast.dashboard-layout .current-conditions-card {
  display: grid;
  grid-template-columns: minmax(240px, 1.8fr) auto minmax(180px, 0.75fr);
  align-items: center;
  gap: clamp(14px, 2vw, 24px);
  min-height: 238px;
  padding: clamp(22px, 3.2vw, 34px);
}

#view-forecast.dashboard-layout .current-conditions-card .hero-left {
  min-width: 0;
}

#view-forecast.dashboard-layout .current-conditions-card .hero-right {
  align-items: center;
  justify-content: center;
  min-width: 96px;
}

#view-forecast.dashboard-layout .current-conditions-card .stats-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#view-forecast.dashboard-layout .current-conditions-card .stat-card {
  min-height: 76px;
}

#view-forecast.dashboard-layout .alert-strip {
  min-height: 54px;
  padding: 12px 16px;
}

#view-forecast.dashboard-layout .radar-card {
  height: clamp(340px, 39vh, 520px);
  min-height: 320px;
}

#view-forecast.dashboard-layout .daily-card {
  overflow: hidden;
}

#view-forecast.dashboard-layout .weather-sidebar {
  display: flex;
}

#view-forecast.dashboard-layout .sidebar-card {
  min-height: 224px;
  height: auto;
}

#view-forecast.dashboard-layout .sidebar-card::before {
  content: none;
}

#view-forecast.dashboard-layout .sidebar-card .desktop-preview-body {
  flex: 1;
}

#view-forecast.dashboard-layout .sidebar-card .desktop-mini-map {
  min-height: 148px;
  flex-basis: 148px;
}

#view-forecast.dashboard-layout .sidebar-card .desktop-preview-copy,
#view-forecast.dashboard-layout .sidebar-card .desktop-preview-legend {
  gap: 8px;
}

#view-forecast.dashboard-layout .sidebar-card .desktop-preview-copy strong {
  font-size: 14px;
  font-weight: 800;
}

#view-forecast.dashboard-layout .sidebar-card .desktop-preview-copy::after,
#view-forecast.dashboard-layout .sidebar-card .desktop-preview-legend::after {
  content: "\203A";
  margin-left: auto;
  color: rgba(248, 251, 255, 0.64);
  font-size: 20px;
  line-height: 1;
}

@media (min-width: 1101px) {
  #view-forecast.dashboard-layout.active {
    max-width: 1760px;
    grid-template-columns: minmax(0, 2.25fr) minmax(0, 2.75fr);
    gap: clamp(20px, 1.7vw, 24px);
    align-items: stretch;
  }

  #view-forecast.dashboard-layout .main-weather-column {
    grid-column: 1;
    height: 100%;
    gap: 16px;
  }

  #view-forecast.dashboard-layout .weather-sidebar {
    grid-column: 2;
    gap: 16px;
  }

  #view-forecast.dashboard-layout .radar-card {
    flex: 1 1 auto;
    height: auto;
  }

  #view-forecast.dashboard-layout .daily-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #view-forecast.dashboard-layout .daily-card-header {
    grid-column: 1 / -1;
  }

  #view-forecast.dashboard-layout .day-expanded {
    grid-column: 1 / -1;
  }

  #view-forecast.dashboard-layout .day-row:nth-child(even) {
    border-right: 1px solid rgba(255, 255, 255, 0.07);
  }
}

@media (min-width: 1440px) {
  #view-forecast.dashboard-layout.active {
    grid-template-columns: minmax(0, 2.25fr) minmax(0, 2.75fr);
  }
}

@media (max-width: 1100px) {
  #view-forecast.dashboard-layout.active {
    grid-template-columns: minmax(0, 1fr);
  }

  #view-forecast.dashboard-layout .main-weather-column,
  #view-forecast.dashboard-layout .weather-sidebar {
    grid-column: 1;
  }

  #view-forecast.dashboard-layout .weather-sidebar {
    display: flex;
  }

  #view-forecast.dashboard-layout .current-conditions-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #view-forecast.dashboard-layout .current-conditions-card .stats-grid {
    grid-column: 1 / -1;
  }

  #view-forecast.dashboard-layout .radar-card {
    height: clamp(300px, 42vh, 440px);
  }
}

@media (max-width: 760px) {
  #view-forecast.dashboard-layout .weather-sidebar {
    display: flex;
  }

  #view-forecast.dashboard-layout .current-conditions-card {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 0;
    padding: 18px;
    gap: 14px;
  }

  #view-forecast.dashboard-layout .current-conditions-card .hero-icon {
    width: 82px;
    height: 82px;
  }

  #view-forecast.dashboard-layout .radar-card {
    height: 280px;
    min-height: 260px;
  }

  #view-forecast.dashboard-layout .hourly-card,
  #view-forecast.dashboard-layout .daily-card,
  #view-forecast.dashboard-layout .sidebar-card {
    padding: 14px;
    border-radius: 18px;
  }

  #view-forecast.dashboard-layout .daily-card {
    padding: 0;
  }
}

@media (max-width: 480px) {
  #view-forecast.dashboard-layout .current-conditions-card {
    grid-template-columns: minmax(0, 1fr);
  }

  #view-forecast.dashboard-layout .current-conditions-card .hero-right {
    align-items: flex-start;
  }

  #view-forecast.dashboard-layout .current-conditions-card .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  #view-forecast.dashboard-layout.active {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  #view-forecast.dashboard-layout .main-weather-column {
    gap: 12px;
  }

  #view-forecast.dashboard-layout .weather-sidebar {
    display: flex;
  }

  #view-forecast.dashboard-layout .desktop-forecast-panel {
    display: none !important;
  }

  #view-forecast.dashboard-layout .current-conditions-card {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(20, 57, 97, 0.96), rgba(8, 24, 44, 0.94));
  }

  #view-forecast.dashboard-layout .current-conditions-card .hero-right {
    align-items: flex-end;
    justify-content: space-between;
    min-width: 72px;
  }

  #view-forecast.dashboard-layout .current-conditions-card .hero-icon {
    width: 72px;
    height: 72px;
  }

  #view-forecast.dashboard-layout .current-conditions-card .stats-grid {
    grid-column: 1 / -1;
    gap: 5px;
  }

  #view-forecast.dashboard-layout .current-conditions-card .stat-card {
    min-height: 72px;
    padding: 10px 4px;
  }

  #view-forecast.dashboard-layout .hero-temp {
    font-size: 52px;
    line-height: 0.95;
  }

  #view-forecast.dashboard-layout .alert-strip {
    min-height: 40px;
    padding: 8px 12px;
  }

  #view-forecast.dashboard-layout .radar-card {
    height: 240px;
    min-height: 240px;
  }

  #view-forecast.dashboard-layout .hourly-card {
    padding: 14px;
  }

  #view-forecast.dashboard-layout .daily-card {
    padding: 0;
  }
}

@media (max-width: 899px) {
  #view-forecast.dashboard-layout .desktop-forecast-panel {
    display: none !important;
  }
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
  }

  body {
    overflow-y: auto;
  }

  #app-header {
    height: 64px;
    min-height: 64px;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    overflow: visible;
    z-index: 1000;
  }

  .brand {
    min-width: 0;
    flex: 0 1 auto;
  }

  .brand-name {
    display: inline;
    max-width: 92px;
    overflow: hidden;
    color: #fff;
    font-family: var(--nav-font);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: 0.035em;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .header-search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    position: relative;
    z-index: 1001;
  }

  .suggestions {
    z-index: 1002;
  }

  #desktop-nav {
    display: none !important;
  }

  #bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    height: calc(62px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    display: flex;
    z-index: 100;
  }

  #app-main:has(#view-forecast.active) {
    position: relative;
    z-index: 1;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    min-height: auto;
    margin-top: 64px;
    padding: 12px 12px calc(84px + env(safe-area-inset-bottom));
    overflow: visible;
    -webkit-overflow-scrolling: auto;
  }

  #view-forecast.dashboard-layout.active {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex !important;
    flex-direction: column;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 0;
    overflow: visible;
  }

  #view-forecast.dashboard-layout .main-weather-column,
  #view-forecast.dashboard-layout .weather-sidebar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    overflow: visible;
  }

  #view-forecast.dashboard-layout .main-weather-column {
    order: 1;
  }

  #view-forecast.dashboard-layout .weather-sidebar {
    order: 99;
  }

  #view-forecast.dashboard-layout .desktop-forecast-panel {
    display: flex !important;
  }

  #view-forecast.dashboard-layout .desktop-alerts-preview {
    display: none !important;
  }

  #view-forecast.dashboard-layout .current-conditions-card,
  #view-forecast.dashboard-layout .alert-strip,
  #view-forecast.dashboard-layout .radar-card,
  #view-forecast.dashboard-layout .hourly-card,
  #view-forecast.dashboard-layout .daily-card,
  #view-forecast.dashboard-layout .sidebar-card,
  #view-forecast.dashboard-layout .section-label {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #view-forecast.dashboard-layout .current-conditions-card {
    order: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 0;
    gap: 12px;
    padding: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(20, 57, 97, 0.96), rgba(8, 24, 44, 0.94));
  }

  #view-forecast.dashboard-layout .current-conditions-card .hero-left,
  #view-forecast.dashboard-layout .current-conditions-card .hero-right {
    min-width: 0;
  }

  #view-forecast.dashboard-layout .current-conditions-card .hero-right {
    align-items: flex-end;
    justify-content: space-between;
  }

  #view-forecast.dashboard-layout .current-conditions-card .hero-icon {
    width: 72px;
    height: 72px;
  }

  #view-forecast.dashboard-layout .hero-temp {
    font-size: clamp(48px, 16vw, 62px);
    line-height: 0.95;
  }

  #view-forecast.dashboard-layout .current-conditions-card .stats-grid {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #view-forecast.dashboard-layout .current-conditions-card .stat-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 10px 8px;
    display: grid;
    align-content: center;
  }

  #view-forecast.dashboard-layout .current-conditions-card .stat-val,
  #view-forecast.dashboard-layout .current-conditions-card .stat-key {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  #view-forecast.dashboard-layout .main-weather-column > .section-label:nth-of-type(1) {
    order: 2;
  }

  #view-forecast.dashboard-layout .alert-strip {
    order: 3;
    min-height: 0;
  }

  #view-forecast.dashboard-layout .main-weather-column > .section-label:nth-of-type(2) {
    order: 4;
  }

  #view-forecast.dashboard-layout .radar-card {
    order: 5;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
  }

  #view-forecast.dashboard-layout .radar-card iframe,
  #view-forecast.dashboard-layout .radar-view-shell iframe {
    width: 100%;
    max-width: 100%;
  }

  #view-forecast.dashboard-layout .hourly-card {
    order: 6;
    overflow: hidden;
  }

  #view-forecast.dashboard-layout .hourly-row {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }

  #view-forecast.dashboard-layout .daily-card {
    order: 7;
    overflow: visible;
  }

  #view-forecast.dashboard-layout .sidebar-card {
    min-height: 0;
    height: auto;
    padding: 14px;
    overflow: hidden;
  }

  #view-forecast.dashboard-layout .desktop-outlook-preview {
    order: 8;
  }

  #view-forecast.dashboard-layout .desktop-meso-preview {
    order: 9;
  }

  #view-forecast.dashboard-layout .desktop-reports-preview {
    order: 10;
  }
}

@media (max-width: 340px) {
  .brand-name {
    display: none;
  }
}

@media (max-width: 768px) {
  #app-header .brand {
    flex: 0 0 auto;
    gap: 6px;
  }

  #app-header .brand-name {
    display: inline;
    max-width: none;
    overflow: visible;
    color: #fff;
    font-family: var(--nav-font);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.035em;
    line-height: 1;
    white-space: nowrap;
    text-overflow: clip;
  }

  #app-header .brand-mark {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    flex-shrink: 0;
  }

  #app-header .header-search {
    flex: 1 1 0;
    min-width: 0;
  }

  #view-forecast.dashboard-layout .desktop-forecast-panel,
  #view-forecast.dashboard-layout .desktop-outlook-preview,
  #view-forecast.dashboard-layout .desktop-meso-preview,
  #view-forecast.dashboard-layout .desktop-reports-preview,
  #view-forecast.dashboard-layout .desktop-alerts-preview,
  #view-forecast.dashboard-layout .severe-weather-outlook,
  #view-forecast.dashboard-layout .weather-discussions,
  #view-forecast.dashboard-layout .storm-reports,
  #view-forecast.dashboard-layout .weather-headlines,
  #view-forecast.dashboard-layout .sun-moon-card {
    display: none !important;
  }
}

#forecast-empty-state {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  align-items: center;
  justify-content: center;
  background: var(--navy-deep);
}
#forecast-empty-state.visible {
  display: flex;
}
#forecast-empty-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 32px;
}
#forecast-empty-inner h2 {
  font-size: 22px;
  font-weight: 600;
  color: #fff;
  margin: 0;
}
#forecast-empty-inner p {
  font-size: 15px;
  color: rgba(255,255,255,0.5);
  margin: 0;
}
#empty-state-gps-btn {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--navy-mid);
  color: var(--orange-sun);
  border: 1px solid rgba(234, 88, 12, 0.3);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
#empty-state-gps-btn:hover {
  background: var(--surface-highlight);
  border-color: var(--orange-sun);
  transform: translateY(-1px);
}
#empty-state-gps-btn i {
  font-size: 16px;
}

@media (min-width: 1040px) {
  #view-severe.active #outlook-day-selector {
    top: 18px;
    left: 18px;
    width: 318px;
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(135deg, #0f2744 0%, #1a4a7a 100%);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: none;
  }

  #view-severe.active #outlook-pill {
    position: relative;
    width: 100%;
    min-height: 58px;
    margin: 0;
    justify-content: flex-start;
    padding: 12px 16px 12px 62px;
    border: 0;
    border-bottom: 1px solid rgba(125, 211, 252, 0.12);
    border-radius: 0;
    background:
      radial-gradient(circle at 92% 10%, rgba(125, 211, 252, 0.16), transparent 38%),
      linear-gradient(135deg, rgba(35, 89, 137, 0.9), rgba(12, 36, 64, 0.92) 58%, rgba(8, 24, 44, 0.92));
    box-shadow: none;
  }

  #view-severe.active #outlook-pill::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 11px;
    background: linear-gradient(145deg, rgba(234, 88, 12, 0.28), rgba(245, 158, 11, 0.12));
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23fb923c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 18a4.5 4.5 0 0 0 .3-8.99A6 6 0 0 0 6.3 7.5 4.5 4.5 0 0 0 6.5 16H9'/%3E%3Cpath d='m13 11-3 5h4l-3 5'/%3E%3C/svg%3E"),
      linear-gradient(145deg, rgba(234, 88, 12, 0.28), rgba(245, 158, 11, 0.12));
    background-position: center;
    background-repeat: no-repeat;
    background-size: 21px 21px, auto;
    color: #fb923c;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 20px rgba(234, 88, 12, 0.14);
  }

  #view-severe.active #outlook-pill span {
    color: #f8fbff;
    font-size: 18px;
    font-weight: 880;
    line-height: 1;
    letter-spacing: 0.055em;
  }

  #view-severe.active .outlook-day-trigger {
    width: 100%;
    min-height: 66px;
    justify-content: center;
    padding: 10px 54px;
    border: 0;
    border-radius: 0;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(3, 10, 22, 0.14));
    box-shadow: none;
  }

  #view-severe.active .outlook-trigger-text {
    align-items: center;
    gap: 4px;
    min-width: 0;
    text-align: center;
  }

  #view-severe.active .outlook-trigger-day {
    color: #f8fbff;
    font-size: 18px;
    font-weight: 840;
    line-height: 1.05;
  }

  #view-severe.active .outlook-trigger-date {
    color: rgba(226, 242, 255, 0.62);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
  }

  #view-severe.active .outlook-day-nav {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 17px;
    width: auto;
    display: flex;
    justify-content: space-between;
    gap: 0;
    pointer-events: none;
  }

  #view-severe.active .outlook-day-nav-btn {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-radius: 10px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045));
    color: #e0f7ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    pointer-events: auto;
  }

  #view-severe.active .outlook-day-nav-btn + .outlook-day-nav-btn {
    margin-left: 0;
  }

  #view-severe.active .outlook-day-nav-btn:first-child,
  #view-severe.active .outlook-day-nav-btn:last-child {
    border-radius: 10px;
    border-right-width: 1px;
  }

  #view-severe.active .outlook-day-nav-btn:hover:not(:disabled) {
    background:
      linear-gradient(180deg, rgba(56, 189, 248, 0.2), rgba(56, 189, 248, 0.08));
    border-color: rgba(125, 211, 252, 0.34);
  }

  #view-severe.active .outlook-day-nav-btn i {
    font-size: 17px;
  }

  #view-severe.active #outlook-bottom-left {
    top: 142px;
    bottom: auto;
    left: 18px;
    width: 318px;
    min-height: 0;
    max-width: 318px;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, 0.18);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0 0 18px 18px;
    background:
      radial-gradient(circle at 0% 0%, rgba(96, 179, 255, 0.14), transparent 38%),
      linear-gradient(135deg, #1b466d 0%, #143456 42%, #071827 100%);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(20px) saturate(1.15);
  }

  #view-severe.active .outlook-ctrl-panel {
    position: static;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
    box-shadow: none;
  }

  #view-severe.active .outlook-ctrl-divider {
    display: none;
  }

  #view-severe.active .outlook-ctrl-btn {
    width: auto;
    min-height: 48px;
    padding: 7px 5px;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 12px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.045));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  #view-severe.active .outlook-ctrl-btn.on {
    border-color: rgba(56, 189, 248, 0.42);
    background:
      linear-gradient(180deg, rgba(14, 165, 233, 0.24), rgba(37, 99, 235, 0.14));
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.1), 0 10px 24px rgba(14, 165, 233, 0.14);
  }

  #view-severe.active .outlook-ctrl-btn.off {
    opacity: 0.58;
  }

  #view-severe.active .outlook-btn-icon {
    width: 22px;
    height: 20px;
  }

  #view-severe.active .outlook-btn-icon i,
  #view-severe.active .outlook-btn-icon svg {
    width: 19px;
    height: 19px;
    font-size: 19px;
  }

  #view-severe.active .outlook-btn-label {
    max-width: none;
    padding-left: 0;
    color: rgba(248, 251, 255, 0.9);
    font-size: 9.5px;
    font-weight: 760;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
  }

  #view-severe.active .outlook-legend {
    width: 100%;
    max-width: none;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 252px;
    padding: 13px 15px 15px 80px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #view-severe.active .outlook-legend::before {
    content: "";
    position: absolute;
    top: 43px;
    bottom: 20px;
    left: 18px;
    width: 38px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background:
      linear-gradient(
        to bottom,
        #ff00ff 0%,
        #ff00ff 15%,
        #ff0000 15%,
        #ff0000 31%,
        #ffc800 31%,
        #ffc800 48%,
        #ffff00 48%,
        #ffff00 65%,
        #009100 65%,
        #009100 82%,
        #55bb55 82%,
        #55bb55 100%
      );
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      inset 0 -18px 28px rgba(0, 0, 0, 0.22),
      0 12px 26px rgba(0, 0, 0, 0.24);
  }

  #view-severe.active .outlook-legend::after {
    content: "";
    position: absolute;
    top: 44px;
    bottom: 21px;
    left: 36px;
    width: 1px;
    background: rgba(255, 255, 255, 0.24);
    opacity: 0.42;
    pointer-events: none;
  }

  #view-severe.active .outlook-legend-title {
    order: 0;
    align-self: stretch;
    margin: 0 0 12px -65px;
    color: rgba(226, 242, 255, 0.62);
    font-size: 10px;
    font-weight: 860;
    letter-spacing: 0.11em;
    text-align: center;
  }

  #view-severe.active .outlook-legend-item {
    display: grid !important;
    position: relative;
    grid-template-columns: 16px minmax(0, 1fr) auto;
    gap: 9px !important;
    align-items: center;
    flex: 1 1 0;
    min-height: 29px;
    margin: 0;
    padding: 4px 0;
  }

  #view-severe.active .outlook-legend-item[style*="visibility:hidden"] {
    display: none !important;
  }

  #view-severe.active .outlook-legend-item:nth-of-type(2) { order: 7; }
  #view-severe.active .outlook-legend-item:nth-of-type(3) { order: 6; }
  #view-severe.active .outlook-legend-item:nth-of-type(4) { order: 5; }
  #view-severe.active .outlook-legend-item:nth-of-type(5) { order: 4; }
  #view-severe.active .outlook-legend-item:nth-of-type(6) { order: 3; }
  #view-severe.active .outlook-legend-item:nth-of-type(7) { order: 2; }
  #view-severe.active .outlook-legend-item:nth-of-type(8) { order: 1; }

  #view-severe.active .outlook-legend-item::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -30px;
    width: 22px;
    height: 1px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(226, 242, 255, 0.16), rgba(226, 242, 255, 0.52));
    opacity: 0.82;
  }

  #view-severe.active .outlook-legend-item::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -37px;
    width: 6px;
    height: 6px;
    transform: translateY(-50%);
    border-radius: 999px;
    background: rgba(226, 242, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(226, 242, 255, 0.06);
  }

  #view-severe.active .outlook-legend-item + .outlook-legend-item {
    border-top: 0;
  }

  #view-severe.active .outlook-legend-swatch {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04), 0 0 14px rgba(255, 255, 255, 0.12);
  }

  #view-severe.active .outlook-legend-item span:not(.outlook-legend-swatch):not(.outlook-legend-level) {
    min-width: 0;
    color: rgba(248, 251, 255, 0.9) !important;
    font-size: 12px;
    font-weight: 680;
    line-height: 1.2;
    white-space: nowrap;
  }

  #view-severe.active .outlook-legend-item .outlook-legend-level {
    display: block;
    justify-self: end;
    color: rgba(226, 242, 255, 0.44);
    font-size: 9px;
    font-weight: 640;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
  }
}

@media (min-width: 1040px) {
  #view-severe.active #outlook-top-left,
  #view-severe.active #outlook-bottom-left {
    display: contents;
  }

  #view-severe.active #outlook-day-selector.panel {
    top: 18px;
    left: 18px;
    width: 340px;
    max-width: 340px;
    gap: 0;
    overflow: hidden;
    border: 0.5px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    background:
      radial-gradient(circle at 0% 0%, rgba(96, 179, 255, 0.14), transparent 38%),
      linear-gradient(135deg, #1b466d 0%, #143456 42%, #071827 100%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    backdrop-filter: none;
  }

  #view-severe.active #outlook-pill.panel-header {
    min-height: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 16px 18px;
    border: 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #view-severe.active #outlook-pill::before {
    content: none;
  }

  #view-severe.active .header-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    border: 0;
    border-radius: 10px;
    background: var(--orange-sun);
    color: #fff;
    font-size: 18px;
    box-shadow: none;
  }

  #view-severe.active .header-title,
  #view-severe.active #outlook-pill .header-title span {
    color: #e8f2ff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  #view-severe.active .date-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
    background: transparent;
  }

  #view-severe.active .outlook-day-trigger.date-center {
    width: auto;
    min-height: 0;
    min-width: 0;
    justify-content: center;
    padding: 0 10px;
    border: 0;
    background: transparent;
  }

  #view-severe.active .outlook-trigger-text {
    align-items: center;
    gap: 0;
    text-align: center;
  }

  #view-severe.active .outlook-trigger-day.date-main {
    color: #e8f2ff;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
  }

  #view-severe.active .outlook-trigger-date.date-sub {
    margin-top: 2px;
    color: #6a7f90;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
  }

  #view-severe.active .date-nav,
  #view-severe.active .outlook-day-nav-btn.date-nav {
    position: static;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #a0b4c4;
    box-shadow: none;
    pointer-events: auto;
  }

  #view-severe.active .date-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
  }

  #view-severe.active .date-nav i {
    font-size: 14px;
  }

  #view-severe.active .outlook-ctrl-panel.tabs {
    position: static;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 12px 18px;
    border: 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.07);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #view-severe.active .outlook-ctrl-btn.tab {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    border: 0.5px solid transparent;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: #6a7f90;
    pointer-events: auto;
    transform: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  }

  #view-severe.active .outlook-ctrl-btn.tab.on {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
    opacity: 1;
  }

  #view-severe.active .outlook-ctrl-btn.tab.off {
    opacity: 1;
  }

  #view-severe.active .outlook-ctrl-btn.tab.disabled {
    opacity: 0.32;
  }

  #view-severe.active .outlook-ctrl-btn.tab .tab-icon,
  #view-severe.active .outlook-ctrl-btn.tab .outlook-btn-icon {
    width: auto;
    height: auto;
    color: #6a7f90;
    font-size: 18px;
    line-height: 1;
  }

  #view-severe.active .outlook-ctrl-btn.tab.on .tab-icon,
  #view-severe.active .outlook-ctrl-btn.tab.on .outlook-btn-icon {
    color: #e8f2ff;
  }

  #view-severe.active .outlook-ctrl-btn.tab .tab-label,
  #view-severe.active .outlook-ctrl-btn.tab .outlook-btn-label {
    max-width: none;
    padding: 0;
    color: #6a7f90;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
  }

  #view-severe.active .outlook-ctrl-btn.tab.on .tab-label,
  #view-severe.active .outlook-ctrl-btn.tab.on .outlook-btn-label {
    color: #e8f2ff;
  }

  #view-severe.active .risk-section {
    padding: 20px 18px;
  }

  #view-severe.active .outlook-legend {
    width: 100%;
    max-width: none;
    min-height: 395px;
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  #view-severe.active .outlook-legend::before,
  #view-severe.active .outlook-legend::after {
    content: none;
  }

  #view-severe.active .risk-title {
    margin: 0 0 20px;
    color: #7a91a8;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-align: center;
    text-transform: uppercase;
  }

  #view-severe.active .risk-body {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0;
  }

  #view-severe.active .risk-bar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px;
  }

  #view-severe.active .bar-outer {
    position: relative;
    flex: 0 0 auto;
    width: 48px;
    height: 300px;
    overflow: hidden;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: #1a2535;
    cursor: default;
  }

  #view-severe.active .bar-fill {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    transform-origin: bottom;
    will-change: transform;
  }

  #view-severe.active .connector-svg {
    flex: 0 0 28px;
    width: 28px;
    height: 300px;
    overflow: visible;
    pointer-events: none;
  }

  #view-severe.active .connector-svg line {
    stroke-width: 0.75;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  #view-severe.active .connector-svg line.lit-line {
    opacity: 0.45;
  }

  #view-severe.active .connector-svg line.active-line {
    stroke-width: 1.5;
    opacity: 1;
  }

  #view-severe.active .labels-col {
    flex: 0 0 210px;
    width: 210px;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    overflow: hidden;
  }

  #view-severe.active .level-row {
    display: flex;
    align-items: center;
    flex: 1 1 0;
    min-height: 0;
    gap: 8px;
    opacity: 0;
    cursor: default;
  }

  #view-severe.active .level-row.lit {
    opacity: 1;
  }

  #view-severe.active .level-row.dim {
    opacity: 0.32;
  }

  #view-severe.active .level-row.active-row .lname {
    font-weight: 600;
  }

  #view-severe.active .outlook-legend-swatch {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border: 0;
    border-radius: 999px;
    box-shadow: none;
  }

  #view-severe.active .level-copy {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  #view-severe.active .lname {
    color: #e8f2ff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #view-severe.active .lnum {
    margin-top: 1px;
    color: #4a6070;
    font-size: 10px;
    line-height: 1.15;
  }

  #view-severe.active .active-footer {
    margin-top: 14px;
    opacity: 0;
    text-align: center;
    transition: opacity 0.4s ease;
  }

  #view-severe.active .active-footer.visible {
    opacity: 1;
  }

  #view-severe.active .active-footer .fname {
    color: #f0f8ff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
  }

  #view-severe.active .active-footer .flvl {
    margin-top: 2px;
    color: #4a6070;
    font-size: 11px;
    line-height: 1.2;
  }

  #view-severe.active .risk-color-tstm { background-color: #55bb55; stroke: #55bb55; }
  #view-severe.active .risk-color-mrgl { background-color: #009100; stroke: #009100; }
  #view-severe.active .risk-color-slgt { background-color: #ffff00; stroke: #ffff00; }
  #view-severe.active .risk-color-enh { background-color: #ffc800; stroke: #ffc800; }
  #view-severe.active .risk-color-mdt { background-color: #ff0000; stroke: #ff0000; }
  #view-severe.active .risk-color-high { background-color: #ff00ff; stroke: #ff00ff; }
  #view-severe.active .risk-color-prob-2 { background-color: #008b00; stroke: #008b00; }
  #view-severe.active .risk-color-prob-5 { background-color: #8b4726; stroke: #8b4726; }
  #view-severe.active .risk-color-prob-10 { background-color: #ffa500; stroke: #ffa500; }
  #view-severe.active .risk-color-prob-15 { background-color: #ff0000; stroke: #ff0000; }
  #view-severe.active .risk-color-prob-30 { background-color: #ff00ff; stroke: #ff00ff; }
  #view-severe.active .risk-color-prob-45 { background-color: #912cee; stroke: #912cee; }
  #view-severe.active .risk-color-prob-60 { background-color: #104e8b; stroke: #104e8b; }
}

@media (max-width: 1039px) {
  #view-severe.active #outlook-day-selector.panel {
    display: contents;
    position: static;
    overflow: visible;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #view-severe.active #outlook-top-left,
  #view-severe.active #outlook-bottom-left {
    position: absolute;
    left: 10px;
    z-index: 20;
    width: max-content;
    max-width: calc(100vw - 20px);
    overflow: hidden;
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background:
      radial-gradient(circle at 0% 0%, rgba(96, 179, 255, 0.14), transparent 38%),
      linear-gradient(135deg, #1b466d 0%, #143456 42%, #071827 100%);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
  }

  #view-severe.active #outlook-top-left {
    top: 10px;
    display: flex;
    flex-direction: column;
  }

  #view-severe.active #outlook-bottom-left {
    bottom: 10px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 282px;
    max-height: calc(100dvh - 154px);
  }

  #view-severe.active #outlook-pill.panel-header {
    width: max-content;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 7px 12px 7px 8px;
    border: 0;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #view-severe.active .header-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--orange-sun);
    color: #fff;
    font-size: 15px;
  }

  #view-severe.active .header-title,
  #view-severe.active #outlook-pill .header-title span {
    color: #e8f2ff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  #view-severe.active .date-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    width: 100%;
    min-width: 180px;
    box-sizing: border-box;
  }

  #view-severe.active .outlook-day-trigger.date-center {
    width: auto;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  #view-severe.active .outlook-trigger-text {
    align-items: center;
    gap: 1px;
    min-width: 0;
    text-align: center;
  }

  #view-severe.active .outlook-trigger-day.date-main {
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.1;
  }

  #view-severe.active .outlook-trigger-date.date-sub {
    color: rgba(226, 242, 255, 0.62);
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
  }

  #view-severe.active .date-nav,
  #view-severe.active .outlook-day-nav-btn.date-nav {
    position: static;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.86);
  }

  #view-severe.active .outlook-ctrl-panel.tabs {
    position: static;
    flex: 0 0 54px;
    width: 54px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 7px 6px;
    border: 0;
    border-right: 0.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: none;
    box-sizing: border-box;
  }

  #view-severe.active .outlook-ctrl-btn.tab {
    width: 100%;
    min-width: 0;
    min-height: 38px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 5px 2px;
    border: 0.5px solid transparent;
    border-radius: 9px;
    background: transparent;
    box-shadow: none;
    pointer-events: auto;
  }

  #view-severe.active .outlook-ctrl-btn.tab.on {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    opacity: 1;
  }

  #view-severe.active .outlook-ctrl-btn.tab .tab-icon,
  #view-severe.active .outlook-ctrl-btn.tab .outlook-btn-icon {
    width: auto;
    height: auto;
    font-size: 15px;
    line-height: 1;
  }

  #view-severe.active .outlook-ctrl-btn.tab .tab-label,
  #view-severe.active .outlook-ctrl-btn.tab .outlook-btn-label {
    max-width: none;
    padding: 0;
    font-size: 8px;
    font-weight: 650;
    line-height: 1.05;
    text-align: center;
    white-space: nowrap;
  }

  #view-severe.active .risk-section {
    flex: 1 1 auto;
    padding: 9px 9px 9px 8px;
    overflow: hidden;
    max-height: none;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
  }

  #view-severe.active .outlook-legend {
    position: static;
    width: 100%;
    max-width: none;
    min-height: 0;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #view-severe.active .risk-title {
    margin: 0 0 7px;
    color: rgba(226, 242, 255, 0.62);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-align: left;
    text-transform: uppercase;
  }

  #view-severe.active .risk-body {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0;
  }

  #view-severe.active .risk-bar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 28px;
    width: 28px;
    min-width: 28px;
  }

  #view-severe.active .bar-outer {
    position: relative;
    flex: 0 0 auto;
    width: 28px;
    height: 190px;
    overflow: hidden;
    border: 0.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: #1a2535;
  }

  #view-severe.active .bar-fill {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    transform-origin: bottom;
    will-change: transform;
  }

  #view-severe.active .connector-svg {
    display: block;
    flex: 0 0 16px;
    width: 16px;
    height: 190px;
    overflow: visible;
    pointer-events: none;
  }

  #view-severe.active .connector-svg line {
    stroke-width: 0.9;
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  #view-severe.active .connector-svg line.active-line {
    stroke-width: 1.6;
  }

  #view-severe.active .labels-col {
    flex: 0 0 167px;
    width: 167px;
    max-width: calc(100vw - 137px);
    height: 190px;
    display: flex;
    flex-direction: column;
    overflow: visible;
  }

  #view-severe.active .level-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 0;
    min-height: 0;
    padding: 0;
    cursor: default;
  }

  #view-severe.active .outlook-legend-swatch {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border: 0;
    border-radius: 999px;
  }

  #view-severe.active .level-copy {
    min-width: 0;
    overflow: visible;
  }

  #view-severe.active .lname {
    color: rgba(248, 251, 255, 0.9);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.15;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
  }

  #view-severe.active .lnum {
    margin-top: 1px;
    color: rgba(226, 242, 255, 0.46);
    font-size: 8px;
    line-height: 1.1;
  }

  #view-severe.active .active-footer {
    display: none;
  }

  #view-severe.active .risk-color-tstm { background-color: #55bb55; stroke: #55bb55; }
  #view-severe.active .risk-color-mrgl { background-color: #009100; stroke: #009100; }
  #view-severe.active .risk-color-slgt { background-color: #ffff00; stroke: #ffff00; }
  #view-severe.active .risk-color-enh { background-color: #ffc800; stroke: #ffc800; }
  #view-severe.active .risk-color-mdt { background-color: #ff0000; stroke: #ff0000; }
  #view-severe.active .risk-color-high { background-color: #ff00ff; stroke: #ff00ff; }
  #view-severe.active .risk-color-prob-2 { background-color: #008b00; stroke: #008b00; }
  #view-severe.active .risk-color-prob-5 { background-color: #8b4726; stroke: #8b4726; }
  #view-severe.active .risk-color-prob-10 { background-color: #ffa500; stroke: #ffa500; }
  #view-severe.active .risk-color-prob-15 { background-color: #ff0000; stroke: #ff0000; }
  #view-severe.active .risk-color-prob-30 { background-color: #ff00ff; stroke: #ff00ff; }
  #view-severe.active .risk-color-prob-45 { background-color: #912cee; stroke: #912cee; }
  #view-severe.active .risk-color-prob-60 { background-color: #104e8b; stroke: #104e8b; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
