.mcmap,
.mcmap-list,
.mcmap__tooltip {
  --mcmap-active: #69b34c;
  --mcmap-active-dark: #4d9435;
  --mcmap-empty: #b7b7b7;
  --mcmap-border: #ffffff;
  --mcmap-text: #1f2933;
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  overflow: visible;
}

.mcmap__map {
  position: relative;
  width: 100%;
  overflow: visible;
}

.mcmap__svg {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.mcmap__svg g.state > path,
.mcmap__svg circle.state {
  transition: fill 160ms ease, filter 160ms ease;
}

.mcmap__svg g.state > path,
.mcmap__svg circle.state {
  fill: var(--mcmap-empty) !important;
  stroke: var(--mcmap-border);
  stroke-width: 1.5;
  outline: none;
}

.mcmap__svg g.state > path.mcmap-has-chapters,
.mcmap__svg circle.mcmap-has-chapters {
  fill: var(--mcmap-active) !important;
  cursor: pointer;
}

.mcmap__svg g.state > path.mcmap-has-chapters:hover,
.mcmap__svg g.state > path.mcmap-has-chapters:focus,
.mcmap__svg g.state > path.mcmap-has-chapters.mcmap-is-active,
.mcmap__svg circle.mcmap-has-chapters:hover,
.mcmap__svg circle.mcmap-has-chapters:focus,
.mcmap__svg circle.mcmap-has-chapters.mcmap-is-active {
  fill: var(--mcmap-active-dark) !important;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
}

.mcmap__svg .borders path,
.mcmap__svg path.borders,
.mcmap__svg path.separator1 {
  fill: none !important;
  pointer-events: none;
}

.mcmap__svg path.separator1 {
  display: none;
}

.mcmap__tooltip {
  position: fixed;
  z-index: 99999;
  width: min(320px, calc(100% - 24px));
  padding: 14px 16px;
  color: var(--mcmap-text);
  background: #ffffff;
  border: 1px solid rgba(31, 41, 51, 0.12);
  border-radius: 6px;
  box-shadow: 0 18px 40px rgba(31, 41, 51, 0.18);
  pointer-events: auto;
}

.mcmap__tooltip h3 {
  margin: 0 28px 14px 0;
  font-size: 16px;
  line-height: 1.25;
}

.mcmap__panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mcmap__count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  color: #ffffff;
  background: var(--mcmap-active);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.mcmap__panel-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #5d6975;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.mcmap__panel-close:hover,
.mcmap__panel-close:focus {
  color: var(--mcmap-text);
  background: rgba(31, 41, 51, 0.08);
}

.mcmap__tooltip ul,
.mcmap-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mcmap__tooltip li {
  display: grid;
  gap: 2px;
  padding: 8px 0;
  border-top: 1px solid rgba(31, 41, 51, 0.1);
}

.mcmap__tooltip li:first-child {
  border-top: 0;
}

.mcmap__tooltip a,
.mcmap-list a {
  color: var(--mcmap-active-dark);
  text-decoration: none;
  pointer-events: auto;
}

.mcmap__tooltip a:hover,
.mcmap__tooltip a:focus,
.mcmap-list a:hover,
.mcmap-list a:focus {
  text-decoration: underline;
}

.mcmap__tooltip li > span {
  color: #5d6975;
  font-size: 13px;
}

.mcmap-list {
  margin-top: 28px;
  z-index: 1;
}

.mcmap-list ul {
  column-count: 3;
  column-gap: clamp(32px, 8vw, 96px);
}

.mcmap-list li {
  display: block;
  break-inside: avoid;
  margin: 0 0 10px;
  color: #666666;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
}

.mcmap-list a,
.mcmap-list span {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

.mcmap-list a {
  color: #1594ff;
  text-decoration: none;
}

.mcmap-list span {
  color: #666666;
}

.mcmap__detail-link {
  display: block;
  font-size: 13px;
}

@media (max-width: 700px) {
  .mcmap {
    max-width: 100%;
  }

  .mcmap__map {
    margin: 0 auto;
  }

  .mcmap__svg {
    width: 100%;
  }

  .mcmap__tooltip {
    width: auto;
    max-height: min(70vh, 460px);
    overflow: auto;
    border-radius: 8px;
  }

  .mcmap-list ul {
    column-count: 1;
  }

  .mcmap-list li {
    margin-bottom: 9px;
    font-size: 16px;
  }
}

@media (min-width: 701px) and (max-width: 900px) {
  .mcmap-list ul {
    column-count: 2;
  }
}
