@charset "UTF-8";

/* ============================================================
   DESIGN TOKENS — UDP Corporate Design
   ============================================================ */
:root {
  --primary: #0AB4FF;
  --primary-hover: #0099e0;
  --primary-light: rgba(10, 180, 255, 0.10);
  --primary-glow: rgba(10, 180, 255, 0.25);

  --bg: #F6F6F6;
  --card-bg: #FFFFFF;
  --surface: #FAFAFA;

  --text: #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted: #9ca3af;

  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: var(--primary);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.10);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --radius-full: 999px;

  --font-ui: 'Outfit', sans-serif;
  --font-text: 'Roboto', sans-serif;

  /* Status colors */
  --color-online: #4CAF50;
  --color-stale: #FF9800;
  --color-error: #EF4444;

  /* Chart parameter colors */
  --chart-peg: #2196F3;
  --chart-temp: #FF5722;
  --chart-osat: #4CAF50;
  --chart-odis: #9C27B0;
  --chart-conductivity: #FFC107;
  --chart-ph: #00BCD4;
  --chart-redox: #795548;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-ui);
  font-weight: 600;
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration: none;
}

/* ============================================================
   APP SHELL
   ============================================================ */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================================
   HEADER
   ============================================================ */
.app-header {
  padding: 14px 0 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  flex-shrink: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-inner h1 {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.header-icon {
  font-size: 1.5rem;
}

.header-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.header-loading {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   MAIN CONTENT — MAP + SIDEBAR GRID
   ============================================================ */
.main-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  flex: 1;
  min-height: 480px;
}

/* ============================================================
   MAP
   ============================================================ */
#map {
  height: 100%;
  min-height: 420px;
  max-height: calc(100vh - 240px);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  z-index: 1;
}

.leaflet-container {
  font-family: var(--font-text);
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.leaflet-popup-content {
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 12px 16px;
}

.marker-popup strong {
  display: block;
  font-family: var(--font-ui);
  font-weight: 600;
  margin-bottom: 4px;
  font-size: 1rem;
}

.marker-popup div {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
#sidebar {
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 420px;
  max-height: calc(100vh - 200px);
}

.sidebar-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sidebar-title-row h2 {
  font-size: 1.05rem;
  font-weight: 600;
}

.station-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Filter controls */
.filters {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-input,
.filter-select {
  width: 100%;
  font-family: var(--font-text);
  font-size: 0.85rem;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.filter-input::placeholder {
  color: var(--text-muted);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Station list */
.station-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.station-list::-webkit-scrollbar {
  width: 6px;
}

.station-list::-webkit-scrollbar-track {
  background: transparent;
}

.station-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.station-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Station item */
.station-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  border-left: 3px solid transparent;
}

.station-item:hover {
  background: var(--surface);
}

.station-item.active {
  background: var(--primary-light);
  border-left-color: var(--primary);
}

.station-item.active .station-item-name {
  color: var(--primary);
}

/* Status dot */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 4px rgba(0,0,0,0.15);
}

.status-dot.online {
  background: var(--color-online);
}

.status-dot.stale {
  background: var(--color-stale);
}

.status-dot.offline,
.status-dot.error {
  background: var(--color-error);
}

/* Assessment dot in station list */
.assessment-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
}
.assessment-red   { background: #DC2626; }
.assessment-yellow{ background: #D97706; }
.assessment-green { background: #16A34A; }
.assessment-gray  { background: #9CA3AF; }

/* Assessment badge in station detail header */
.asm-header-badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 12px;
  white-space: nowrap;
  margin-left: 8px;
}
.asm-header-badge.asm-red    { background: #FEE2E2; color: #DC2626; }
.asm-header-badge.asm-yellow { background: #FEF3C7; color: #D97706; }
.asm-header-badge.asm-green  { background: #DCFCE7; color: #16A34A; }
.asm-header-badge.asm-gray   { background: #F3F4F6; color: #6B7280; }

/* Assessment disclaimer */
.asm-disclaimer {
  font-size: 0.75rem;
  color: #9CA3AF;
  margin-top: 8px;
  margin-bottom: 16px;
  padding: 6px 12px;
  background: #F9FAFB;
  border-radius: 6px;
  line-height: 1.4;
}

/* Assessment badge in chart card */
.asm-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  margin-left: auto;
}
.asm-badge.asm-red    { background: #FEE2E2; color: #DC2626; }
.asm-badge.asm-yellow { background: #FEF3C7; color: #D97706; }
.asm-badge.asm-green  { background: #DCFCE7; color: #16A34A; }
.asm-badge.asm-gray   { background: #F3F4F6; color: #6B7280; }

/* Chart card assessment border */
.chart-card--red    { border-left: 3px solid #DC2626; }
.chart-card--yellow { border-left: 3px solid #D97706; }
.chart-card--green  { border-left: 3px solid #16A34A; }
.chart-card--gray   { border-left: 3px solid #D1D5DB; }

/* Device parameter section */
.device-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #E5E7EB;
}
.device-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.chart-grid--device .chart-card {
  background: #FAFAFA;
}
.chart-grid--device .chart-card-name {
  color: #9CA3AF;
}

/* Station item info */
.station-item-info {
  flex: 1;
  min-width: 0;
}

.station-item-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station-item-water {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.station-item-params {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.param-tag {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
}
.param-tag--red    { background: #FEE2E2; color: #DC2626; }
.param-tag--yellow { background: #FEF3C7; color: #D97706; }
.param-tag--green  { background: #DCFCE7; color: #16A34A; }

/* ============================================================
   DETAIL SECTION
   ============================================================ */
.detail-section {
  margin-top: 16px;
  margin-bottom: 20px;
}

.detail-placeholder {
  text-align: center;
  padding: 60px 20px 48px;
  color: var(--text-muted);
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.6;
}

.placeholder-text {
  font-size: 1.05rem;
  font-weight: 500;
}

.detail-loading,
.detail-error {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.detail-error p {
  margin-bottom: 8px;
}

.detail-error-msg {
  font-size: 0.85rem;
  color: var(--color-error);
}

/* Detail header */
.detail-header {
  margin-bottom: 16px;
}

.detail-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.detail-title-row h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

.thing-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.thing-link:hover {
  color: var(--primary);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge.online {
  background: rgba(76, 175, 80, 0.12);
  color: var(--color-online);
}

.status-badge.stale {
  background: rgba(255, 152, 0, 0.12);
  color: var(--color-stale);
}

.status-badge.online::before,
.status-badge.stale::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.online::before {
  background: var(--color-online);
}

.status-badge.stale::before {
  background: var(--color-stale);
}

.detail-meta-row {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
  flex-wrap: wrap;
}

.detail-water {
  color: var(--text-muted);
}

/* Time range pills */
.detail-ranges {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.pill {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* ============================================================
   CHART GRID
   ============================================================ */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Chart card */
.chart-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}

.chart-card:hover {
  box-shadow: var(--shadow-lg);
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.chart-card-name {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

.chart-card-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Data-source link below chart cards */
.chart-source {
  padding: 14px 16px 4px;
  font-size: 0.8rem;
  border-top: 1px solid var(--border-light);
  text-align: right;
  flex-shrink: 0;
  line-height: 1.3;
  margin-top: 0;
}
.chart-source a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  opacity: 0.75;
}
.chart-source a:hover {
  color: var(--primary);
  opacity: 1;
}

.chart-card-value {
  font-family: var(--font-ui);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.2;
}

.chart-card-body {
  position: relative;
  height: 200px;
  flex-shrink: 0;
}

.chart-canvas {
  width: 100% !important;
  height: 100% !important;
}

.chart-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
}

/* ============================================================
   SPINNER
   ============================================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner--small {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-hover);
}

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
  margin-top: auto;
  padding: 16px 0 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-main {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-brand {
  font-weight: 500;
}

/* Hint banner (in footer) */
.hint-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #8D6E00;
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  max-width: 680px;
  line-height: 1.4;
}

.hint-icon {
  flex-shrink: 0;
  font-size: 0.9rem;
}

/* ============================================================
   LEGEND BUTTON + MODAL
   ============================================================ */

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

/* Legend trigger button — sits at bottom of filter controls */.filter-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.legend-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--card-bg);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  line-height: 1;
}

.legend-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Overlay backdrop — covers full viewport, semi-transparent */
.legend-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Floating card */
.legend-modal {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  width: 92vw;
  max-width: 540px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: legend-in 0.2s ease-out;
}

@keyframes legend-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header */
.legend-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.legend-modal-header h3 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.legend-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: background 0.15s, color 0.15s;
  line-height: 1;
  flex-shrink: 0;
}

.legend-close:hover {
  background: var(--surface);
  color: var(--text);
}

/* Scrollable body */
.legend-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 20px 8px;
}

.legend-modal-body::-webkit-scrollbar {
  width: 5px;
}

.legend-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.legend-modal-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

/* Footer disclaimer */
.legend-modal-footer {
  padding: 10px 20px 14px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

.legend-modal-footer p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Legend content */
.legend-intro {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.legend-group {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.legend-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.legend-group h4 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.legend-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  line-height: 1.3;
}

/* Compact table */
.legend-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.legend-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 6px 3px 0;
  border-bottom: 1px solid var(--border-light);
}

.legend-table td {
  padding: 3px 6px 3px 0;
  color: var(--text-secondary);
  vertical-align: middle;
  line-height: 1.3;
}

.legend-range {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  font-size: 0.73rem;
}

.legend-note {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Colored dot */
.legend-color {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
  vertical-align: middle;
}

.legend-red    { background: #DC2626; }
.legend-yellow { background: #D97706; }
.legend-green  { background: #16A34A; }
.legend-gray   { background: #9CA3AF; }

/* Subtle row tinting by level */
.legend-row--red td    { color: #991B1B; }
.legend-row--yellow td { color: #92400E; }
.legend-row--green td  { color: #166534; }
.legend-row--gray td   { color: var(--text-muted); }

.legend-row--red .legend-range    { color: #DC2626; }
.legend-row--yellow .legend-range { color: #D97706; }
.legend-row--green .legend-range  { color: #16A34A; }

/* ============================================================
   RESPONSIVE: TABLET (<1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .chart-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   RESPONSIVE: MOBILE (<768px)
   ============================================================ */
@media (max-width: 768px) {
  #app {
    padding: 0 12px;
  }

  .header-inner h1 {
    font-size: 1.15rem;
  }

  .main-content {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  #map {
    height: 300px;
    min-height: 300px;
  }

  #sidebar {
    max-height: none;
    min-height: auto;
  }

  .station-list {
    max-height: 380px;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .chart-card-body {
    height: 180px;
  }

  .detail-title-row h2 {
    font-size: 1.15rem;
  }

  .detail-ranges {
    flex-wrap: wrap;
  }

  .hint-banner {
    font-size: 0.72rem;
    padding: 6px 10px;
  }

  .legend-modal {
    width: 96vw;
    max-width: none;
    max-height: 75vh;
  }

  .legend-modal-header {
    padding: 12px 16px 10px;
  }

  .legend-modal-body {
    padding: 10px 16px 6px;
  }
}

/* ============================================================
   RESPONSIVE: SMALL MOBILE (<480px)
   ============================================================ */
@media (max-width: 480px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  #map {
    height: 240px;
    min-height: 240px;
  }

  .legend-modal {
    max-height: 80vh;
  }

  .legend-modal-header h3 {
    font-size: 0.85rem;
  }
}
