.hk-map-frame {
  position: relative;
  min-width: 0;
  background: #eef5f9;
  color: #15314b;
}

.hk-map-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 720 / 410;
  min-height: 225px;
  touch-action: pan-y;
}

.hk-map-frame:not([data-zoom="0"]) .hk-map-canvas {
  cursor: grab;
}

.hk-map-canvas:active {
  cursor: grabbing;
}

.hk-map-canvas:focus-visible {
  outline: 2px solid #0868ef;
  outline-offset: -2px;
}

.hk-map-region {
  cursor: pointer;
  outline: none;
}

.hk-map-region path {
  stroke: #fff;
  stroke-width: 2px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.hk-map-region:is(:hover, :focus-visible, .is-highlighted) path {
  fill: #f3ca80;
  stroke: #0860d0;
  stroke-width: 2.5px;
}

.hk-map-label {
  font-size: 13px;
  font-weight: 760;
  fill: #12324f;
  paint-order: stroke;
  stroke: #fff;
  stroke-opacity: .74;
  stroke-width: 2.25px;
  stroke-linejoin: round;
  cursor: pointer;
}

.hk-map-label[data-detail="1"],
.hk-map-label[data-detail="2"] {
  display: none;
}

.hk-map-label.is-highlighted,
.hk-map-frame[data-zoom="1"] .hk-map-label[data-detail="1"],
.hk-map-frame[data-zoom="2"] .hk-map-label[data-detail="1"],
.hk-map-frame[data-zoom="3"] .hk-map-label {
  display: inline;
}

.hk-map-frame[data-zoom="1"] .hk-map-label { font-size: 10.5px; }
.hk-map-frame[data-zoom="2"] .hk-map-label { font-size: 8.5px; }
.hk-map-frame[data-zoom="3"] .hk-map-label { font-size: 7px; }

.hk-map-label.is-highlighted {
  fill: #0755bb;
  stroke-opacity: .95;
}

.hk-map-compass {
  font-size: 12px;
  font-weight: 650;
  fill: #526d84;
}

.hk-map-tools {
  position: absolute;
  display: grid;
  top: 12px;
  right: 12px;
  overflow: hidden;
  border: 1px solid #d4e2f1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px #18374f0c;
}

.hk-map-tools button {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #3c5870;
  cursor: pointer;
}

.hk-map-tools button + button { border-top: 1px solid #e6edf6; }
.hk-map-tools button:not(:disabled):hover { background: #eff6ff; color: #095dcc; }
.hk-map-tools button:disabled { color: #8d9eae; cursor: default; }
.hk-map-tools button:focus-visible { outline: 2px solid #0868ef; outline-offset: -3px; }
.hk-map-tools svg { width: 20px; height: 20px; }

.hk-map-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 0 13px 10px;
  color: #34526e;
  font-size: .78rem;
}

.hk-map-footer a { color: #0757b6; }
.hk-map-source { position: relative; }
.hk-map-source summary { cursor: pointer; white-space: nowrap; }
.hk-map-credits {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 2;
  width: min(255px, 65vw);
  padding: 11px;
  border: 1px solid #d4e2f1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 12px #18374f14;
}

.hk-map-credits a { display: block; margin-top: 5px; }

@media (max-width: 550px) {
  .hk-map-tools { top: 8px; right: 8px; }
  .hk-map-tools button { width: 38px; height: 38px; }
  .hk-map-label { font-size: 17px; }
  .hk-map-frame[data-zoom="1"] .hk-map-label { font-size: 13px; }
  .hk-map-frame[data-zoom="2"] .hk-map-label { font-size: 11px; }
  .hk-map-frame[data-zoom="3"] .hk-map-label { font-size: 9px; }
}
