.kuzbass-map {
  container-type: inline-size;
  margin: 26px 0;
  color: #173454;
}
.kuzbass-map *, .kuzbass-map *::before { box-sizing: border-box; }
.kuzbass-map .km-heading {
  margin: 0 0 24px;
  color: #000;
  font-family: "Roboto", serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 36px;
  text-align: left;
}
.kuzbass-map .km-layout {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 4px 12px 16px;
}
.kuzbass-map .km-map { position: relative; min-width: 0; }
.kuzbass-map .km-region { display: block; width: 100%; max-width: 540px; margin: auto; overflow: visible; }
.kuzbass-map .km-land { filter: drop-shadow(0 5px 4px #153d6729); pointer-events: none; }
.kuzbass-map .km-relief { fill: url(#km-relief-fill); stroke: #5787b7; stroke-width: 1; stroke-linejoin: round; }
.kuzbass-map .km-boundary { stroke: #3977b4; stroke-width: 1.25; stroke-linejoin: round; }
.kuzbass-map .km-edge-light { fill: none; stroke: #fff; stroke-width: 1; stroke-opacity: .7; }
.kuzbass-map .km-river { fill: none; stroke: #438bc4; stroke-width: 1.35; stroke-opacity: .54; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.kuzbass-map .km-context { fill: #3c5974; font-size: 11px; }
.kuzbass-map .km-context text { paint-order: stroke; stroke: #eaf4ff; stroke-width: 2px; }
.kuzbass-map .km-context-dot { fill: #577b9b; }
.kuzbass-map .km-city-name {
  fill: #123e66;
  font-size: 12px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #eaf4ff;
  stroke-width: 2.5px;
}
.kuzbass-map .km-marker { cursor: pointer; text-decoration: none; }
.kuzbass-map .km-marker.is-active .km-city-name { fill: #003e77; }
.kuzbass-map .km-hit { fill: transparent; }
.kuzbass-map .km-dot { fill: #fff; pointer-events: none; }
.kuzbass-map .km-marker.is-active .km-dot { fill: #ff4433; }
.kuzbass-map .km-ring { fill: #0061b2; stroke: #fff; stroke-width: 1.5; pointer-events: none; }
.kuzbass-map .km-marker.is-active .km-ring,
.kuzbass-map .km-marker:focus-visible .km-ring { fill: #003e77; stroke: #b5dbff; stroke-width: 3; }
.kuzbass-map .km-marker.is-active .km-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: km-mark 450ms ease-out;
}
.kuzbass-map .km-column { display: grid; gap: 12px; min-width: 0; }
.kuzbass-map .km-card {
  position: relative;
  z-index: 1;
  padding: 12px 15px;
  scroll-margin-top: 100px;
  border: 1px solid #d2deeb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 5px #1734540a;
  font-size: 14px;
  line-height: 1.4;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.kuzbass-map .km-card.is-active, .kuzbass-map .km-card:target {
  border-color: #2d7bbb;
  background: #f5faff;
  box-shadow: 0 4px 14px #10406e1a;
}
.kuzbass-map .km-card h3 { margin: 0 0 6px; color: #123e66; font-size: 17px; font-weight: 700; line-height: 1.2; }
.kuzbass-map .km-shop + .km-shop { margin-top: 7px; }
.kuzbass-map .km-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 9px; }
.kuzbass-map .km-shop a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  color: #0061b2;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.kuzbass-map .km-shop .km-route { gap: 4px; font-size: 12px; font-weight: 500; }
.kuzbass-map .km-route::before {
  width: 16px;
  height: 16px;
  flex: none;
  background: url("yandex-maps.png") center / contain no-repeat;
  content: "";
}
.kuzbass-map .km-route[aria-busy="true"] { cursor: wait; }
.kuzbass-map.km-interactive .km-card:not(.is-active) .km-route { visibility: hidden; }
.kuzbass-map .km-hours {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid #e1eaf4;
  color: #42607d;
  font-size: 13px;
}
.kuzbass-map .km-connections { display: none; }
.kuzbass-map .km-map-credit {
  position: absolute;
  z-index: 1;
  top: 4px;
  right: 4px;
  color: #42607d;
  font-size: 11px;
  line-height: 1.5;
}
.kuzbass-map .km-map-credit summary {
  display: grid;
  place-items: center;
  min-width: 24px;
  min-height: 24px;
  cursor: pointer;
}
.kuzbass-map .km-map-credit summary::-webkit-details-marker { display: none; }
.kuzbass-map .km-map-credit[open] summary { justify-self: end; }
.kuzbass-map .km-map-credit div { padding: 4px 8px; background: #fff; }
.kuzbass-map .km-map-credit a { color: inherit; text-decoration: underline; }
.kuzbass-map a:focus-visible, .kuzbass-map .km-card:focus-visible { outline: 2px solid #0061b2; outline-offset: 3px; }
@container (min-width: 560px) {
  .kuzbass-map .km-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kuzbass-map .km-map { grid-column: 1 / -1; }
}
@container (min-width: 820px) {
  .kuzbass-map .km-layout {
    grid-template-columns: minmax(195px, 1fr) minmax(360px, 2.35fr) minmax(195px, 1fr);
    align-items: center;
    gap: 18px;
    padding: 12px 22px 18px;
  }
  .kuzbass-map .km-map { grid-column: 2; grid-row: 1; }
  .kuzbass-map .km-left { grid-column: 1; grid-row: 1; }
  .kuzbass-map .km-right { grid-column: 3; grid-row: 1; }
  .kuzbass-map .km-connections {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
  }
  .kuzbass-map .km-card::after {
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    transform: translateY(-50%);
    border: 1px solid #fff;
    border-radius: 50%;
    background: #83a9ce;
    content: "";
    pointer-events: none;
  }
  .kuzbass-map .km-left .km-card::after { right: -4px; }
  .kuzbass-map .km-right .km-card::after { left: -4px; }
  .kuzbass-map .km-card.is-active::after { background: #0061b2; }
  .kuzbass-map .km-line { fill: none; stroke: #2d7bbb; stroke-width: 1; opacity: .5; transition: opacity 180ms, stroke 180ms; }
  .kuzbass-map .km-line.is-active { stroke: #0061b2; stroke-width: 2; opacity: 1; }
  .kuzbass-map .km-pulse {
    fill: none;
    stroke: #8ddcff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 11 89;
    opacity: 0;
  }
  .kuzbass-map .km-pulse.is-active { animation: km-pulse 720ms ease-out both; }
}
@keyframes km-mark { 45% { transform: scale(1.3); } }
@keyframes km-pulse {
  from { stroke-dashoffset: 11; opacity: 0; }
  18%, 75% { opacity: 1; }
  to { stroke-dashoffset: -100; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .kuzbass-map .km-card, .kuzbass-map .km-line { transition: none; }
  .kuzbass-map .km-marker.is-active .km-ring { animation: none; }
  .kuzbass-map .km-pulse.is-active { animation: none; }
}
