.wth-map {
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: #112b53;
  font-size: .82rem;
}

.wth-map .wth-map-board {
  position: relative;
  isolation: isolate;
  border: 1px solid #d3e5ef;
  border-radius: 13px;
  background: #bbeafa;
}

.wth-map .wth-map-base {
  display: block;
  width: 100%;
  height: clamp(185px, 24cqw, 305px);
  object-fit: fill;
  border-radius: inherit;
}

.wth-map .wth-map-markers { position: absolute; inset: 0; }
.wth-map .wth-map-marker,
.wth-map .wth-map-start {
  position: absolute;
  left: var(--marker-x);
  top: var(--marker-y);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 9px 4px 4px;
  border: 1px solid #ffffffd9;
  border-radius: 999px;
  background: var(--marker-bg, #fff);
  color: #122447;
  box-shadow: 0 2px 5px #18345331;
  font-size: clamp(.72rem, 1.35cqw, .91rem);
  font-weight: 750;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.wth-map .wth-map-marker svg,
.wth-map .wth-map-start svg { display: block; flex: none; width: 17px; height: 17px; color: var(--marker-ink, #0069e9); }
.wth-map .wth-map-city { --marker-ink: #762f8b; --marker-bg: #f4e9ff; }
.wth-map .wth-map-coast { --marker-ink: #08744d; --marker-bg: #e6faef; }
.wth-map .wth-map-border { --marker-ink: #bb266d; --marker-bg: #fbeafa; }
.wth-map .wth-map-marker:is(:hover, :focus-visible, .is-active, [aria-current="true"]) {
  z-index: 2;
  border-color: #0065ec;
  outline: 2px solid #0059ca;
  outline-offset: 2px;
  color: #112449;
}
.wth-map .wth-map-marker.is-muted {
  border-color: #b6c6d9;
  color: #405571;
  background: #f5f8fc;
  box-shadow: none;
}
.wth-map .wth-map-marker.is-muted svg { color: #435a77; }
.wth-map .wth-map-marker-number { display: none; }
.wth-map .wth-map-start {
  --marker-x: 51.33%;
  --marker-y: 61.2%;
  --marker-bg: #005ee7;
  --marker-ink: #fff;
  z-index: 1;
  padding: 4px 11px 5px 6px;
  color: #fff;
  flex-direction: row-reverse;
  pointer-events: none;
  transform: translate(calc(-100% + 19px), -50%);
}
.wth-map .wth-map-north {
  position: absolute;
  inset: auto 10px 8px auto;
  color: #174772;
  font-size: .67rem;
  font-weight: 750;
}

.wth-map .wth-map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .73rem;
}
.wth-map .wth-map-legend li { display: flex; align-items: center; gap: 5px; margin: 0; }
.wth-map .wth-map-legend i { width: 18px; border-top: 2px dashed #234a7c; }
.wth-map .wth-map-legend .wth-map-line-ferry { border-color: #00739c; border-top-style: dotted; }
.wth-map .wth-map-legend .wth-map-line-road { border-color: #087451; border-top-style: dotted; }
.wth-map .wth-map-legend .wth-map-line-air { border-color: #6e4fad; }
.wth-map .wth-map-caption { color: #455978; font-size: .71rem; line-height: 1.35; }
.wth-map .wth-map-caption a { color: #214e87; text-underline-offset: .16em; }
.wth-map .wth-map-list { display: none; }
.wth-map .wth-map-detail:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 7px 10px; border: 1px solid #ccdbec; border-radius: 8px; background: #f1f6fd; }

@container (min-width: 639px) {
  .wth-map [data-wth-map-marker="dapeng"] { transform: translate(-12px, -50%); }
}

@container (min-width: 760px) {
  .wth-map .wth-map-board { grid-area: 1 / 1; }
  .wth-map .wth-map-legend {
    z-index: 1;
    grid-area: 1 / 1;
    align-self: start;
    justify-self: end;
    display: grid;
    gap: 7px;
    width: 142px;
    margin: 10px;
    padding: 10px;
    border: 1px solid #fff;
    border-radius: 10px;
    background: #fbfdfff5;
    box-shadow: 0 3px 14px #3456732b;
  }
}

@container (max-width: 638px) {
  .wth-map .wth-map-base { height: clamp(190px, 35cqw, 225px); }
  .wth-map .wth-map-marker {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 2px solid #fff;
    background: var(--marker-ink);
    color: #fff;
    font-size: .83rem;
  }
  .wth-map .wth-map-marker:is(:hover, :focus-visible, .is-active, [aria-current="true"]) { color: #fff; }
  .wth-map .wth-map-marker.is-muted { background: #4b6079; color: #fff; }
  .wth-map .wth-map-marker :is(svg, .wth-map-marker-name) { display: none; }
  .wth-map .wth-map-marker-number { display: inline; }
  .wth-map .wth-map-start { width: 25px; height: 25px; padding: 0; transform: translate(-50%, -50%); }
  .wth-map .wth-map-start span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .wth-map .wth-map-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .wth-map .wth-map-list li { margin: 0; }
  .wth-map .wth-map-list a {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 32px;
    height: 100%;
    padding: 3px 4px;
    border: 1px solid #d8e5f4;
    border-radius: 6px;
    color: #143869;
    background: #f6faff;
    font-size: .72rem;
    font-weight: 650;
    line-height: 1.15;
    text-decoration: none;
  }
  .wth-map .wth-map-list a:hover { background: #dcecff; }
  .wth-map .wth-map-list b {
    display: grid;
    place-items: center;
    flex: none;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--marker-ink);
    color: #fff;
    font-size: .66rem;
  }
}

@container (max-width: 360px) {
  .wth-map .wth-map-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wth-map .wth-map-north { inset-inline-end: 6px; }
  .wth-map .wth-map-start { width: 22px; height: 22px; }
}
