.avrm-map {
  position: relative;
  width: 100%;
  height: 560px;
  margin: 26px 0 44px;
  overflow: hidden;
  background: #eef2ed;
  font-family: Verdana, "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}

.avrm-loading,
.avrm-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #4c564e;
  background: #eef2ed;
}

.avrm-route-panel {
  display: none;
  width: 220px;
  margin: 12px 0 0 12px;
  color: #222;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
  font: inherit;
}

.avrm-route-panel.is-visible {
  display: block;
}

.avrm-panel-heading {
  padding: 8px 10px 7px;
  border-left: 5px solid;
}

.avrm-panel-heading strong,
.avrm-panel-heading span {
  display: block;
}

.avrm-panel-heading strong {
  margin-bottom: 2px;
  font-size: 17px;
  line-height: 1.35;
}

.avrm-panel-heading span {
  color: #777;
  font-size: 12px;
}

.avrm-panel-heading img,
.avrm-route-panel th img {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 6px;
  object-fit: contain;
  vertical-align: -3px;
}

.avrm-route-panel table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font: inherit;
  font-size: 13px;
}

.avrm-route-panel th,
.avrm-route-panel td {
  padding: 6px 8px;
  border: 1px solid #e5e5e5;
}

.avrm-route-panel th {
  color: #666;
  font-weight: 500;
  text-align: left;
}

.avrm-route-panel td {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.avrm-legend {
  display: grid;
  gap: 4px;
  margin: 0 0 24px 10px;
  padding: 10px 12px;
  color: #333;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 0;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  line-height: 1.25;
}

.avrm-legend strong {
  margin-bottom: 2px;
  font-size: 11px;
}

.avrm-legend button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 64px;
  padding: 1px 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.avrm-legend button:hover,
.avrm-legend button:focus-visible {
  color: #00692f;
  outline: none;
  font-weight: 700;
}

.avrm-legend i {
  display: inline-block;
  width: 19px;
  height: 4px;
}

.avrm-photo-pin {
  display: flex;
  width: 34px;
  height: 34px;
  padding: 0;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.38);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.avrm-photo-pin:hover,
.avrm-photo-pin:focus-visible,
.avrm-photo-pin.is-active {
  z-index: 2;
  outline: none;
  transform: scale(1.18);
  box-shadow: 0 5px 13px rgba(0, 0, 0, 0.48);
}

.avrm-photo-pin img {
  display: block;
  width: 19px;
  height: 19px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.avrm-photo-popup {
  width: 220px;
  color: #222;
  font-family: Verdana, "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
}

/* Keep the final photo-popup treatment after moving from the post-specific map ID. */
.avrm-map .gm-style-iw-c {
  max-width: 240px !important;
  padding: 10px 10px 12px !important;
  overflow: visible !important;
}

.avrm-map .gm-style-iw-d {
  max-width: 220px !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.avrm-map .gm-style-iw-chr,
.avrm-map .gm-style-iw button.gm-ui-hover-effect {
  display: none !important;
}

.avrm-photo-popup > img {
  display: block;
  width: 220px;
  height: 140px;
  object-fit: cover;
}

.avrm-photo-copy {
  padding: 10px 2px 0;
}

.avrm-photo-copy strong,
.avrm-photo-copy span {
  display: block;
}

.avrm-photo-copy strong {
  font-size: 15px;
}

.avrm-photo-copy span {
  margin-top: 2px;
  color: #777;
  font-size: 11px;
}

.avrm-photo-copy p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

@media (max-width: 767px) {
  .avrm-map {
    height: 480px;
    margin: 22px 0 36px;
  }

  .avrm-route-panel {
    margin: 8px 0 0 8px;
  }

  .avrm-legend {
    margin: 0 0 18px 8px;
  }
}
