.map-selected-place {
  position: absolute;
  top: 14px;
  left: 50%;
  z-index: 430;
  width: min(360px, calc(100% - 260px));
  transform: translateX(-50%);
  pointer-events: none;
}

.map-selected-place[hidden] {
  display: none;
}

.map-selected-card {
  pointer-events: auto;
  display: grid;
  gap: 10px;
  max-height: min(180px, calc(100% - 24px));
  padding: 12px 14px;
  overflow-y: auto;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(18, 41, 57, 0.08);
  box-shadow: 0 18px 40px rgba(18, 41, 57, 0.2);
  backdrop-filter: blur(18px);
}

.map-selected-card__head,
.map-selected-card__hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.map-selected-card__city,
.map-selected-card__time,
.map-selected-card__condition {
  margin: 0;
}

.map-selected-card__city {
  font-family: "Archivo", sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.map-selected-card__time {
  margin-top: 4px;
  font-size: 0.74rem;
  line-height: 1.25;
  color: var(--text-soft);
}

.map-selected-card__close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 33, 42, 0.08);
  color: var(--text);
  font: inherit;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}

.map-selected-card__temp {
  font-family: "Archivo", sans-serif;
  font-size: clamp(1.35rem, 1.9vw, 1.7rem);
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.map-selected-card__condition {
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

.map-selected-card__hero .weather-icon {
  flex: 0 0 auto;
  font-size: 1.5rem;
}

.map-selected-card__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.map-selected-card__metric {
  display: grid;
  gap: 2px;
}

.map-selected-card__metric span {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.map-selected-card__metric strong {
  font-size: 0.84rem;
  line-height: 1.2;
  color: var(--text);
}

.weather-field-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  filter: brightness(1.44) saturate(1.38) contrast(1.12);
}

.map-layer-controls {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 440;
  display: grid;
  gap: 8px;
  padding: 9px;
  border-radius: 20px;
  background: rgba(9, 24, 31, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 34px rgba(9, 24, 31, 0.2);
  backdrop-filter: blur(14px);
}

.layer-menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
}

.layer-menu-toggle__icon {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: conic-gradient(from 30deg, #ffcf61, #4dc6b3, #59a7ff, #ffcf61);
  box-shadow: 0 0 12px rgba(116, 217, 196, 0.34);
}

.layer-menu-toggle__chevron {
  margin-left: auto;
  font-size: 1rem;
  line-height: 1;
  transition: transform 180ms ease;
}

.layer-toggle-list {
  display: grid;
  gap: 8px;
}

.layer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 106px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.layer-toggle:hover {
  transform: translateX(1px);
}

.layer-toggle.active {
  color: white;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
}

.layer-toggle__swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.layer-toggle__swatch--temperature {
  background: linear-gradient(180deg, #ffd166, #f76f57);
}

.layer-toggle__swatch--precipitation {
  background: linear-gradient(180deg, #9de0ff, #52a5ff);
}

.layer-toggle__swatch--clouds {
  background: linear-gradient(180deg, #f5f9fd, #9aa7b2);
}

.layer-toggle__swatch--wind {
  background: linear-gradient(180deg, #d4dae0, #6f7b86);
}

.layer-toggle__swatch--lightning {
  background: linear-gradient(180deg, #fff2ab, #ffbf47);
}

.map-scroll-gutter {
  display: none;
}

.map-timeline-shell {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 450;
  padding: 12px 18px 16px;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(9, 24, 31, 0) 0%, rgba(9, 24, 31, 0.74) 32%, rgba(9, 24, 31, 0.84) 100%);
  backdrop-filter: blur(16px);
}

.insight-panel {
  display: grid;
  gap: 14px;
  background: rgba(240, 247, 244, 0.82);
  padding: 14px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.metric-grid strong,
.risk-item strong {
  display: block;
  margin-top: 6px;
  font-family: "Archivo", sans-serif;
}

.metric-grid strong {
  font-size: 1.35rem;
}

.risk-stack {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.risk-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(16, 33, 42, 0.05);
  border: 1px solid rgba(16, 33, 42, 0.06);
  animation: riskBreath 6s ease-in-out infinite;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.risk-item strong {
  font-size: 1.14rem;
}

.risk-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.risk-item:nth-child(2) {
  animation-delay: 0.5s;
}

.risk-item:nth-child(3) {
  animation-delay: 1s;
}

.risk-item:nth-child(4) {
  animation-delay: 1.5s;
}

.risk-item:nth-child(5) {
  animation-delay: 2s;
}

.risk-item:hover {
  transform: translateY(-2px);
}

.risk-item--calm {
  background: rgba(16, 33, 42, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.risk-item--watch {
  background: linear-gradient(180deg, rgba(240, 180, 93, 0.18), rgba(16, 33, 42, 0.05));
  border-color: rgba(240, 180, 93, 0.32);
  box-shadow: 0 10px 24px rgba(240, 180, 93, 0.12);
}

.risk-item--alert {
  background: linear-gradient(180deg, rgba(15, 76, 129, 0.18), rgba(16, 33, 42, 0.06));
  border-color: rgba(15, 140, 123, 0.36);
  box-shadow: 0 12px 28px rgba(15, 76, 129, 0.14);
  animation: riskPulse 2.8s ease-in-out infinite;
}

