.escap-drought-page {
  --escap-accent: #5e72e4;
}

.escap-hero-card {
  border: 0;
  background: linear-gradient(135deg, #f8f9fe 0%, #ffffff 100%);
}

.escap-user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.escap-user-chip-main {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.escap-user-chip-main:hover,
.escap-user-chip-main:focus {
  color: inherit;
  text-decoration: none;
}

.escap-user-chip-avatar {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #dee2e6;
  flex-shrink: 0;
}

.escap-user-chip-text {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: 9rem;
}

.escap-user-chip-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #172b4d;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.escap-user-chip-main--guest {
  cursor: default;
}

.escap-user-chip-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  border: 1px solid #e9ecef;
  background: #fff;
  color: #525f7f;
  font-size: 0.72rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.escap-user-chip-auth:hover,
.escap-user-chip-auth:focus {
  color: #5e72e4;
  border-color: #cfd4da;
  text-decoration: none;
}

.escap-user-chip-auth-label {
  display: none;
}

@media (min-width: 576px) {
  .escap-user-chip-avatar {
    width: 2.5rem;
    height: 2.5rem;
  }

  .escap-user-chip-text {
    display: flex;
  }

  .escap-user-chip-auth-label {
    display: inline;
  }
}

@media (min-width: 768px) {
  .escap-user-chip-avatar {
    width: 2.75rem;
    height: 2.75rem;
  }
}

.escap-tabs .nav-link {
  border-radius: 999px;
  margin-right: 0.5rem;
}

.escap-map-mode-toggle {
  flex-shrink: 0;
}

.escap-control-panel[hidden] {
  display: none !important;
}

.escap-control-panel {
  margin-top: 0.75rem;
}

.escap-map-wrap {
  position: relative;
}

.escap-access-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 10rem);
  padding: 2rem 1rem;
}

.escap-access-alert {
  max-width: 34rem;
  width: 100%;
  text-align: center;
}

.escap-map-colorbar {
  display: none !important;
}

.escap-map-popup {
  position: absolute;
  min-width: 180px;
  max-width: 260px;
  padding: 0.55rem 0.7rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  display: none;
  z-index: 6;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #344767;
}

.escap-map-popup.visible {
  display: block;
}

.escap-popup-title {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.escap-popup-line {
  margin-bottom: 0.15rem;
}

.escap-popup-meta {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid #e9ecef;
  font-size: 0.72rem;
  color: #525f7f;
}

.escap-map {
  width: 100%;
  height: 520px;
  background: #eef2f8;
}

.escap-static-map[hidden] {
  display: none !important;
}

.escap-animation-controls {
  flex-wrap: wrap;
}

.escap-animation-speed-label,
.escap-animation-frame-label {
  align-self: center;
  font-size: 0.82rem;
  white-space: nowrap;
}

.escap-map-title-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  right: auto;
  transform: none;
  max-width: min(320px, 46%);
  padding: 0.35rem 0.75rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.92);
  color: #172b4d;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: right;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: none;
  z-index: 1000;
}

.escap-map-overlay-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1001;
  display: none;
  gap: 0.35rem;
  pointer-events: auto;
}

.escap-map-overlay-toggle {
  font-size: 0.72rem;
  line-height: 1.2;
  padding: 0.2rem 0.55rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}

.escap-map-overlay-toggle.active {
  color: #fff;
  background: #5e72e4;
  border-color: #5e72e4;
}

.escap-map-title-period {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: #525f7f;
}

.escap-map-title-overlay.visible {
  display: block;
}

.escap-map-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  min-width: 150px;
  padding: 0.65rem 0.75rem;
  border-radius: 0.35rem;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  display: none;
  z-index: 1000;
}

.escap-map-legend.visible,
.escap-map-title-overlay.visible {
  display: block;
}

.escap-map-legend-title {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: #344767;
}

.escap-map-legend-subtitle {
  margin-top: 0.65rem;
}

.escap-map-legend-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  line-height: 1.25;
  margin-bottom: 0.2rem;
  color: #525f7f;
}

.escap-map-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.escap-map-status {
  border-top: 1px solid #e9ecef;
  min-height: 2.5rem;
}

.escap-date-select {
  min-width: 8.5rem;
}

.escap-range-field {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.escap-range-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
  margin: 0;
  white-space: nowrap;
}

.escap-range-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.escap-range-error {
  margin: 0;
  font-size: 0.8rem;
  color: #f5365c;
  max-width: 100%;
  text-align: right;
}

.escap-date-select.is-invalid {
  border-color: #f5365c;
}

.escap-control-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.escap-select {
  min-width: 10rem;
}

.escap-station-select {
  min-width: 11rem;
  max-width: 14rem;
}

.escap-station-split {
  min-height: 640px;
}

.escap-station-chart-pane {
  border-right: 1px solid #e9ecef;
  background: #f8f9fa;
}

.escap-station-chart-pane-inner {
  min-height: 640px;
  height: 100%;
  padding: 0.75rem;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.escap-station-chart-placeholder {
  color: #8898aa;
  text-align: center;
  padding: 3rem 1.25rem;
  margin: auto 0;
}

.escap-station-chart-content {
  color: #344767;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.escap-station-map-wrap {
  min-height: 640px;
}

.escap-station-split-map {
  height: 640px;
}

.escap-station-hover-label {
  padding: 0.3rem 0.55rem;
  border-radius: 0.3rem;
  background: rgba(23, 43, 77, 0.94);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  display: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.escap-station-hover-label.visible {
  display: block;
}

.escap-station-chart-image,
.escap-station-popup-image {
  display: block;
  width: 100%;
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin-top: 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid #e9ecef;
  background: #fff;
  object-fit: contain;
}

.escap-station-image {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #f8f9fa;
}

.escap-report-figure {
  min-height: 320px;
}

.escap-badge {
  background: #edf2ff;
  color: #324cdd;
  font-weight: 600;
}

.escap-summary-table th,
.escap-summary-table td {
  vertical-align: middle;
}

.escap-layer-btn.active {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.escap-precip10d-split {
  display: flex;
  flex-direction: column;
}

.escap-precip10d-pane + .escap-precip10d-pane {
  border-top: 1px solid #e9ecef;
}

.escap-precip10d-pane-header {
  padding: 0.75rem 1rem 0.35rem;
  background: #fff;
}

.escap-precip10d-subtitle {
  margin-top: 0.15rem;
}

.escap-precip10d-map-wrap {
  position: relative;
  min-height: 360px;
}

.escap-precip10d-map {
  height: 360px;
}

.escap-precip10d-legend {
  z-index: 1000;
}

.escap-precip10d-gallery-section {
  background: #fff;
}

.escap-precip10d-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.escap-precip10d-gallery-card {
  border: 1px solid #e9ecef;
  border-radius: 0.35rem;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.escap-precip10d-gallery-card.is-active {
  border-color: #5e72e4;
  box-shadow: 0 0 0 2px rgba(94, 114, 228, 0.2);
}

.escap-precip10d-gallery-card a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.escap-precip10d-gallery-card a:hover {
  text-decoration: none;
}

.escap-precip10d-gallery-thumb {
  display: block;
  width: 100%;
  height: auto;
  background: #f8f9fa;
}

.escap-precip10d-gallery-caption {
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #344767;
}

.escap-map-png-gallery-single {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}

@media (max-width: 991.98px) {
  .escap-map-wrap.is-compact .escap-map-overlay-controls {
    display: flex;
  }

  .escap-map-wrap.is-compact .escap-map-title-overlay.visible,
  .escap-map-wrap.is-compact .escap-map-legend.visible {
    display: none;
  }

  .escap-map-wrap.is-compact.escap-show-title .escap-map-title-overlay.visible,
  .escap-map-wrap.is-compact.escap-measure-title .escap-map-title-overlay.visible {
    display: block;
  }

  .escap-map-wrap.is-compact.escap-measure-title .escap-map-title-overlay.visible {
    visibility: hidden;
  }

  .escap-map-wrap.is-compact.escap-show-legend .escap-map-legend.visible {
    display: block;
  }

  .escap-map-title-overlay {
    font-size: 0.78rem;
    max-width: min(240px, 58%);
    padding: 0.3rem 0.55rem;
  }

  .escap-map-legend {
    min-width: 128px;
    padding: 0.5rem 0.6rem;
    right: 8px;
    bottom: 8px;
  }

  .escap-map-legend-title {
    font-size: 0.68rem;
    margin-bottom: 0.35rem;
  }

  .escap-map-legend-item {
    font-size: 0.66rem;
    gap: 0.35rem;
  }

  .escap-map-legend-swatch {
    width: 12px;
    height: 12px;
  }

  .escap-map {
    height: 360px;
  }

  .escap-precip10d-map {
    height: 300px;
  }

  .escap-precip10d-map-wrap {
    min-height: 300px;
  }

  .escap-station-split,
  .escap-station-chart-pane-inner,
  .escap-station-map-wrap,
  .escap-station-split-map {
    min-height: 420px;
    height: 420px;
  }

  .escap-station-chart-pane {
    border-right: 0;
    border-bottom: 1px solid #e9ecef;
  }
}

@media (max-width: 767.98px) {
  .escap-map-title-overlay {
    font-size: 0.72rem;
    max-width: min(210px, 62%);
  }

  .escap-map-legend {
    min-width: 112px;
    max-width: calc(100% - 1rem);
  }

  .escap-precip10d-map {
    height: 260px;
  }

  .escap-precip10d-map-wrap {
    min-height: 260px;
  }
}

@media (max-width: 575.98px) {
  .escap-map-overlay-controls {
    top: 8px;
    right: 8px;
  }

  .escap-map-title-overlay {
    top: 8px;
    max-width: calc(100% - 5.5rem);
  }
}
