.health-map {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #c5d9ec;
  border-radius: 16px;
  background: #f9fcff;
  color: #153a5d;
  box-shadow: 0 16px 29px #153d6924;
}

.health-map-stage {
  position: relative;
  isolation: isolate;
  aspect-ratio: 720 / 550;
  background: #102b47;
}

.health-map-stage > img,
.health-map-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.health-map-label {
  position: absolute;
  right: 4.5%;
  bottom: 6%;
  display: inline-block;
  max-width: 86%;
  padding: .48em .8em;
  border: 1px solid #bfd9ef;
  border-radius: 8px;
  background: #f4faff;
  color: #153f68;
  font-size: clamp(.69rem, 1.4vw, .85rem);
  font-weight: 700;
  line-height: 1.2;
  pointer-events: none;
  box-shadow: 0 4px 14px #10274130;
}

.health-map-label::before {
  display: inline-block;
  width: .58em;
  height: .58em;
  margin-right: .52em;
  border-radius: 50%;
  background: #196197;
  content: "";
}

.health-map [hidden],
.health-map:not([data-health-map-ready]) .health-map-controls,
.health-map:not([data-health-map-ready]) .health-map-label,
.health-map-tile:not(.has-records) .health-map-record-dot {
  display: none;
}

.health-map-hit {
  fill: transparent;
  pointer-events: none;
}

[data-health-map-ready] .health-map-hit {
  pointer-events: fill;
  cursor: pointer;
}

@media (hover: hover) {
  [data-health-map-ready] .health-map-hit:hover {
    fill: #ffffff58;
  }
}

.health-map-tile {
  transition: transform 240ms cubic-bezier(.2, .8, .2, 1);
}

.health-map-tile-face {
  fill: transparent;
  stroke: #285f8978;
  stroke-width: 1.05;
  stroke-linejoin: round;
}

.health-map-tile-wall {
  fill: url(#health-map-wall);
  opacity: 0;
  transition: opacity 160ms ease;
}

.health-map-city-halo {
  fill: #eaf7ff;
  opacity: .32;
}

.health-map-city-dot,
.health-map-record-dot {
  fill: #24618c;
  stroke: #e9f6ff;
  stroke-width: 1.7;
}

.health-map-city-label {
  fill: #123955;
  stroke: #d7eefd;
  stroke-width: 2.3;
  stroke-linejoin: round;
  paint-order: stroke fill;
  font: 720 15px system-ui, sans-serif;
}

.health-map-tile.is-raised {
  transform: translateY(calc(-1 * var(--health-map-lift)));
  filter: drop-shadow(0 5px 4px #102b4775);
}

.health-map-tile.is-raised .health-map-tile-face {
  fill: url(#health-map-face);
  stroke: #f2faff;
  stroke-width: 1.65;
}

.health-map-tile.is-raised .health-map-tile-wall {
  opacity: 1;
}

.health-map-controls {
  padding: 12px 15px 10px;
  border-top: 1px solid #c5d9ec;
}

.health-map-controls label {
  display: block;
  margin: 0 0 5px;
  font-size: .78rem;
  font-weight: 730;
}

.health-map-controls-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.health-map-controls select,
.health-map-reset {
  min-width: 0;
  min-height: 44px;
  border: 1px solid #c1d7ea;
  border-radius: 7px;
  color: #153f68;
  font: inherit;
  font-size: .9rem;
}

.health-map-controls select {
  flex: 1;
  padding: 6px 8px;
  background: #fff;
}

.health-map-reset {
  flex: none;
  padding: 5px 9px;
  background: #e9f3fc;
  font-weight: 650;
  cursor: pointer;
}

.health-map-reset:hover {
  background: #dcecfb;
}

.health-map-panel {
  padding: 12px 15px 10px;
  border-top: 1px solid #d3e3ef;
}

.health-map-panel-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 11px;
  align-items: baseline;
}

.health-map-panel-heading h2 {
  margin: 0;
  color: #153a5d;
  font: 750 1.15rem/1.25 system-ui, sans-serif;
  letter-spacing: -.015em;
}

.health-map-panel-heading > span,
.health-map-empty {
  margin: 0;
  color: #445f7a;
  font-size: .83rem;
}

.health-map-empty {
  margin-top: 6px;
}

.health-map-results {
  max-height: 10rem;
  margin: 6px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.health-map-results li + li {
  border-top: 1px solid #dce9f3;
}

.health-map-results a {
  display: block;
  min-height: 40px;
  padding: 9px 4px;
  color: #174e80;
  font-size: .87rem;
  font-weight: 650;
  line-height: 1.3;
}

.health-map-results a:hover {
  background: #e9f3fc;
  text-decoration: underline;
}

.health-map-results li:has(.health-map-record-status) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.health-map-record-status {
  max-width: min(12rem, 35vw);
  margin: 4px;
  padding: 3px 7px;
  border: 1px solid #edd1a9;
  border-radius: 5px;
  background: #fff4e3;
  color: #753d0b;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.health-map-credit {
  padding: 2px 15px 10px;
  color: #4b6580;
  font-size: .68rem;
  line-height: 1.4;
}

.health-map-credit a {
  text-decoration: underline;
}

.health-map :is(a, select, button):focus-visible {
  outline: 2px solid #1b6098;
  outline-offset: 2px;
}

.health-map-results a:focus-visible {
  outline-offset: -2px;
}

.health-map-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .health-map {
    border-radius: 12px;
  }

  .health-map-controls select {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .health-map-tile,
  .health-map-tile-wall {
    transition: none;
  }
}
