/* Public map layout. Colours and the dark/light tokens live in theme.css. */
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  background: var(--bg);
  overflow: hidden;
}
::selection {
  background: #2b6f80;
  color: #fff;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.skip-link {
  position: fixed;
  z-index: 2000;
  top: -5rem;
  left: 1rem;
  background: #fff;
  color: #073b4c;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}
.skip-link:focus {
  top: 1rem;
}
[hidden] {
  display: none !important;
}

#gis-app {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
}
.stage {
  position: relative;
  min-height: 0;
}
#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--map-bg);
}

/* Header: brand, status ribbon, report link, band filters */
.app-bar {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  padding: 0.55rem 1rem;
  padding-top: max(0.55rem, env(safe-area-inset-top));
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  z-index: 800;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.brand img {
  object-fit: contain;
}
.brand p,
.brand h1 {
  margin: 0;
}
.brand p {
  font-size: 0.72rem;
  color: var(--ink-2);
}
.brand h1 {
  font-size: 1rem;
  line-height: 1.25;
}
.ribbon {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem 1.4rem;
  margin: 0 0 0 auto;
  font-size: 0.82rem;
  color: var(--ink-2);
}
.ribbon b {
  color: var(--ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.public-report-link {
  border: 1px solid var(--line-strong);
  border-radius: 0.55rem;
  padding: 0.45rem 0.7rem;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.public-report-link:hover,
.public-report-link:focus-visible {
  background: var(--ink);
  color: var(--bg);
}
.filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}
.band-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  font-size: 0.8rem;
}
.chip i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--c);
}
.chip b {
  font-variant-numeric: tabular-nums;
}
.chip:hover {
  background: var(--panel-2);
}
.chip[aria-pressed="true"] {
  background: var(--panel-2);
  border-color: var(--c, var(--accent));
}
.band-filters {
  margin-right: auto;
  min-width: 0;
}
.theme-toggle {
  justify-content: center;
  width: 40px;
  padding: 0;
}
.heat-toggle::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: linear-gradient(90deg, #00bff3, #fdc04e, #cd0000);
  opacity: 0.5;
}
.heat-toggle[aria-pressed="true"]::before {
  opacity: 1;
}
.chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.chip:disabled:hover {
  background: transparent;
}

/* Station panel: same structure as the original page (search + list, detail card + 24-hour chart), sorted by PM2.5 */
.station-panel {
  position: absolute;
  z-index: 750;
  left: 1rem;
  top: 1rem;
  bottom: 1rem;
  width: 360px;
  background: var(--rail);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 14px 45px var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.station-panel.has-selection {
  width: min(710px, calc(100% - 2rem));
}
.station-panel.collapsed {
  bottom: auto;
}
/* A collapsed bar is always list-width, even if a station is still selected (also works when cached JS has not closed it). */
@media (min-width: 768px) {
  .station-panel.has-selection.collapsed {
    width: 360px;
  }
}
.panel-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 0;
  background: transparent;
  padding: 0.8rem 1rem;
  text-align: left;
  color: inherit;
  min-height: 56px;
}
.panel-toggle small,
.panel-toggle strong {
  display: block;
}
.panel-toggle small {
  color: var(--ink-2);
  font-size: 0.7rem;
}
.panel-toggle strong {
  font-size: 1rem;
}
.panel-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.65rem;
  padding: 0.1rem 0.8rem 0.8rem;
}
.station-panel.has-selection .panel-body {
  grid-template-columns: minmax(250px, 335px) minmax(0, 1fr);
}
.station-panel.collapsed .panel-body {
  display: none;
}
.station-list-card {
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.station-panel.has-selection .station-list-card {
  grid-row: 1 / 3;
}
.search-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.search-row {
  display: flex;
  gap: 0.4rem;
}
.search-row input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.65rem;
  background: var(--field);
  color: var(--ink);
  caret-color: var(--accent);
}
.search-row input::placeholder {
  color: var(--placeholder);
}
.search-row button,
.retry-button {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 0.65rem;
  background: var(--btn);
  color: var(--btn-ink);
  padding: 0.55rem 0.8rem;
}
.search-row button:hover,
.retry-button:hover {
  background: var(--btn-hover);
}
.map-status,
.last-updated {
  font-size: 0.73rem;
  color: var(--ink-2);
  margin: 0.6rem 0;
}
.map-status.error {
  color: var(--danger);
}
.station-list {
  flex: 1;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0.4rem;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll) transparent;
}
.station-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--card);
  padding: 0.55rem;
  text-align: left;
  color: inherit;
}
.station-card:hover,
.station-card:focus-visible {
  border-color: var(--accent);
  outline: 2px solid var(--accent-soft);
}
.station-card small {
  color: var(--ink-2);
}
.station-card > span {
  margin-left: auto;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.station-rank {
  display: none;
}
.station-dot {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: var(--station-color, #94a3b8);
  flex: 0 0 auto;
}
.map-meta {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.73rem;
}
.station-panel.has-selection .map-meta {
  grid-column: 2;
}
.map-meta .last-updated {
  margin: 0.25rem 0;
}

/* Detail card + history */
.station-selection-card {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--card);
  padding: 0.85rem;
}
.station-detail {
  margin: 0;
}
.detail-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-right: 3rem;
}
.detail-heading h2,
.detail-heading small {
  margin: 0;
}
.detail-heading h2 {
  font-size: 1rem;
}
.detail-heading small {
  color: var(--ink-2);
}
.detail-heading span {
  font-size: 0.72rem;
  white-space: nowrap;
}
.pm-reading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.55rem 0;
}
.pm-reading strong {
  font-size: 2.4rem;
  color: var(--station-color, var(--ink));
  font-variant-numeric: tabular-nums;
}
.pm-reading span,
.pm-reading small {
  display: block;
  font-size: 0.72rem;
}
.report-link {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--link);
  font-weight: 700;
}
.station-history {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}
.station-history h2 {
  font-size: 0.9rem;
  margin: 0;
}
.station-history p {
  margin: 0.25rem 0 0.5rem;
  color: var(--ink-2);
  font-size: 0.72rem;
}
.chart-wrap {
  height: 150px;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.75rem;
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.7rem;
  color: var(--ink-2);
}
.chart-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.chart-legend li::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--c);
}
.selection-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}
.selection-close:hover {
  background: var(--hover);
}
@media (min-width: 1100px) {
  .chart-wrap {
    height: 180px;
  }
}

/* Layer panel, zoom, legend */
.layer-toggle {
  position: absolute;
  z-index: 850;
  right: 1rem;
  top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0.65rem 1rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  box-shadow: 0 5px 20px #0006;
  font-weight: 700;
}
.layer-toggle:hover {
  background: var(--panel-2);
}
.layer-toggle[aria-expanded="true"] {
  background: var(--ink);
  color: var(--bg);
}
.layer-panel {
  position: absolute;
  z-index: 900;
  right: 1rem;
  top: 4.4rem;
  width: 340px;
  max-height: calc(100% - 5.4rem);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--panel);
  box-shadow: 0 14px 45px #0008;
  overscroll-behavior: contain;
}
.layer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  gap: 0.5rem;
}
.layer-heading small {
  color: var(--ink-2);
  font-size: 0.75rem;
}
.layer-heading h2 {
  font-size: 1.05rem;
  margin: 0.15rem 0 0;
}
.layer-heading button {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: var(--panel-2);
  font-size: 1.5rem;
}
.layer-content {
  padding: 1rem;
}
.layer-content fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
  min-width: 0;
}
.layer-content legend {
  font-weight: 700;
  margin-bottom: 0.65rem;
  width: 100%;
  font-size: 0.9rem;
}
.layer-content legend small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--ink-2);
  margin-top: 0.15rem;
}
.base-map-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
.base-option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  padding: 0.5rem;
  cursor: pointer;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.base-option input {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  margin: 0;
}
.base-option:has(input:checked) {
  border: 2px solid var(--accent);
  padding: calc(0.5rem - 1px);
  background: var(--panel-2);
}
.base-option small {
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.base-swatch {
  display: block;
  height: 45px;
  border-radius: 0.3rem;
  background:
    linear-gradient(
      35deg,
      transparent 38%,
      #fff 39%,
      #fff 46%,
      transparent 47%
    ),
    linear-gradient(115deg, #dce7d4 30%, #b5d8e3 31%, #b5d8e3 46%, #e9e4d4 47%);
}
.base-option-dark .base-swatch {
  filter: invert(1) hue-rotate(180deg) brightness(0.8);
}
.base-option-satellite .base-swatch {
  background: linear-gradient(35deg, #5e7450, #35484a);
  opacity: 0.7;
}
.base-option:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.overlay-row {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}
.overlay-row label {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
}
.overlay-row input {
  accent-color: var(--accent);
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.overlay-row strong,
.overlay-row small {
  display: block;
}
.overlay-row strong {
  font-size: 0.9rem;
}
.overlay-row small {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.layer-status {
  font-size: 0.75rem;
  color: var(--ink-2);
  margin: 0.3rem 0;
}
.layer-status:empty {
  display: none;
}
.layer-status.error {
  color: var(--danger);
}
.layer-retry {
  min-height: 44px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-size: 0.8rem;
  padding: 0.5rem;
}
.opacity-control label {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
}
.opacity-control output {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.opacity-control input {
  width: 100%;
  height: 44px;
  margin: 0;
  accent-color: var(--accent);
}
.opacity-control small,
.layer-note {
  color: var(--ink-2);
  font-size: 0.75rem;
  line-height: 1.6;
}
.layer-reset {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  background: var(--panel-2);
  font-size: 0.85rem;
  font-weight: 700;
}
.layer-reset:hover,
.layer-retry:hover {
  background: var(--hover);
}

.legend {
  position: absolute;
  z-index: 700;
  right: 1rem;
  bottom: 1.25rem;
  background: var(--rail);
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  padding: 0.6rem 0.8rem;
  font-size: 0.74rem;
}
.legend-toggle {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: default;
}
.legend .legend-dots {
  display: none;
}
.legend-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  margin: 0.45rem 0 0.25rem;
  width: 230px;
  padding: 0;
  list-style: none;
}
.legend-bar li {
  flex: 1;
  background: var(--c);
}
.legend-bar span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.legend-ticks {
  display: flex;
  justify-content: space-between;
  width: 230px;
  color: var(--ink-2);
}
.legend-note {
  margin: 0.4rem 0 0;
  max-width: 230px;
  color: var(--ink-2);
  line-height: 1.5;
}
.map-attribution {
  display: none;
}
.leaflet-control-attribution {
  display: block !important;
  max-width: calc(100vw - 1.5rem);
  font-size: 10px;
  background: var(--rail) !important;
  color: var(--ink-2) !important;
}
.leaflet-control-attribution a {
  color: var(--accent) !important;
}
.leaflet-top.leaflet-right .leaflet-control-zoom {
  margin-top: 4.4rem;
  margin-right: 1rem;
  border: 0;
  box-shadow: none;
}
.leaflet-control-zoom a {
  width: 44px !important;
  height: 44px !important;
  line-height: 44px !important;
  margin-bottom: 0.4rem;
  border: 1px solid var(--line) !important;
  border-radius: 0.6rem !important;
  background: var(--panel) !important;
  color: var(--ink) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--panel-2) !important;
}

/* Map: dim base tiles, heat surface, tambon labels */
:root[data-theme="light"] .leaflet-municipality-pane path {
  stroke: #0b4a5c;
}
:root[data-theme="light"] .leaflet-subdistricts-pane path {
  stroke: #1d6f84;
  /* Lighter tint than the stroke: the dark teal fill muddied the heat surface beneath it. Opacity stays under the slider's control. */
  fill: #5fb8cc;
}
:root[data-theme="light"] .heat-surface {
  opacity: 0.88 !important;
}
.basemap-tiles-dark {
  filter: invert(1) hue-rotate(180deg) brightness(0.7) saturate(0.5);
  opacity: 0.4;
}
.leaflet-pane path.leaflet-interactive:focus {
  outline: none;
}
.heat-surface {
  filter: blur(4px);
  mix-blend-mode: normal;
}
.leaflet-tooltip {
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px #0007;
}
.leaflet-tooltip-top::before {
  border-top-color: var(--panel);
}
.leaflet-tooltip.tambon-label {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  color: var(--label);
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0.92;
  text-shadow:
    0 0 4px var(--halo),
    0 0 4px var(--halo),
    0 0 8px var(--halo);
  pointer-events: none;
}
.leaflet-tooltip.tambon-label::before {
  display: none;
}

/* Station markers: ring + core, value above when zoomed in, rank badge for the five highest */
.sensor-dot {
  background: transparent;
  border: 0;
}
.sd {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  color: var(--ink);
  transition:
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.2s;
}
.sd-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--c);
  background: var(--ring-bg);
}
.sd-core {
  position: absolute;
  inset: 3.5px;
  border-radius: 50%;
  background: var(--c);
  border: 1.5px solid var(--halo);
}
.sd-val {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%);
  margin-bottom: 1px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  text-shadow:
    0 0 3px var(--halo),
    0 0 3px var(--halo),
    0 0 6px var(--halo);
  white-space: nowrap;
}
.sd-rank {
  display: none;
  position: absolute;
  right: -8px;
  top: -8px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--rank-bg);
  color: var(--rank-ink);
  font-size: 0.6rem;
  font-weight: 800;
  font-style: normal;
  place-items: center;
}
.sensor-dot.top .sd-rank {
  display: grid;
}
[data-zoom="near"] .sd-val,
[data-zoom="close"] .sd-val {
  display: block;
}
[data-zoom="far"] .sensor-dot:not(.top):not(.sel) .sd {
  transform: scale(0.85);
}
.sensor-dot.offline .sd-ring {
  border-style: dashed;
  border-color: #8aa3aa;
}
.sensor-dot.offline .sd-core {
  opacity: 0.7;
}
.sensor-dot.no-data .sd-core {
  background: #cbd5db;
}
.sensor-dot.no-data .sd-ring {
  border-color: #8aa3aa;
}
.sensor-dot.sel .sd-ring {
  border-color: var(--ink);
  border-width: 2px;
}
.sensor-dot.dim {
  opacity: 0.14;
  pointer-events: none;
}
.sensor-dot:focus-visible .sd-ring,
.sensor-dot:focus .sd-ring {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Phones: the station panel is a bottom sheet (list, then detail below it), as on the original page */
@media (max-width: 767px) {
  .brand {
    flex: 1;
    min-width: 0;
  }
  .brand img {
    width: 34px;
    height: 34px;
  }
  .brand h1 {
    font-size: 0.88rem;
  }
  .ribbon {
    margin-left: 0;
    font-size: 0.76rem;
    gap: 0.1rem 0.9rem;
    width: 100%;
    order: 3;
  }
  .public-report-link {
    margin-left: auto;
    font-size: 0.68rem;
    padding: 0.35rem 0.5rem;
  }
  .band-filters {
    flex: 1;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .chip {
    flex: 0 0 auto;
  }
  .station-panel,
  .station-panel.has-selection {
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: auto;
    height: min(52dvh, calc(100% - 4.5rem));
    border-radius: 1rem 1rem 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .station-panel.collapsed {
    height: auto;
    bottom: 0;
  }
  .panel-body,
  .station-panel.has-selection .panel-body {
    display: block;
    overflow-y: auto;
  }
  /* Must follow the rule above: with a station selected it has equal specificity and would keep the body open. */
  .station-panel.collapsed .panel-body,
  .station-panel.has-selection.collapsed .panel-body {
    display: none;
  }
  .station-list-card {
    display: block;
  }
  .station-list {
    max-height: 34dvh;
  }
  .station-selection-card {
    margin-top: 0.65rem;
  }
  .map-meta {
    padding-bottom: 0.4rem;
  }
  .chart-wrap {
    height: 130px;
  }
  .layer-toggle {
    top: 0.6rem;
    right: 0.6rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    min-height: 44px;
  }
  .layer-panel {
    top: auto;
    bottom: 4.2rem;
    left: 0.6rem;
    right: 0.6rem;
    width: auto;
    max-height: calc(100% - 5rem);
  }
  .layers-open .legend {
    display: none;
  }
  .legend {
    top: 4rem;
    bottom: auto;
    right: 0.6rem;
    padding: 0.5rem 0.6rem;
    font-size: 0.66rem;
  }
  .legend-toggle {
    cursor: pointer;
    min-height: 32px;
  }
  .legend-toggle strong::after {
    content: " ▾";
    font-weight: 400;
  }
  .legend.collapsed .legend-toggle strong::after {
    content: " ▸";
  }
  .legend.collapsed .legend-bar,
  .legend.collapsed .legend-ticks,
  .legend.collapsed .legend-note {
    display: none;
  }
  .legend.collapsed .legend-dots {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.15rem;
  }
  .legend-dots i {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: var(--c);
  }
  .legend-bar,
  .legend-ticks {
    width: 190px;
  }
  .legend-note {
    max-width: 190px;
  }
  .leaflet-top.leaflet-right .leaflet-control-zoom {
    margin-top: 7.6rem;
    margin-right: 0.6rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

