.cm-directions {
  display: flex;
  min-height: 100%;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: center;
  gap: 13px;
  padding: 22px;
  border: 1px solid #e1e1e1;
  border-radius: 5px;
  color: #222;
  background: #fff;
  font: 400 14px/1.5 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

.cm-directions h2,
.cm-directions h3,
.cm-directions p {
  margin: 0;
}

.cm-directions h2 {
  font-size: 22px;
  font-weight: 700;
}

.cm-directions-studio {
  display: flex;
  gap: 9px 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 13px 14px;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
  background: #fafafa;
}

.cm-directions-studio > div {
  flex: 1 1 190px;
}

.cm-directions-studio h3 {
  font-size: 16px;
  font-weight: 700;
}

.cm-directions-studio p {
  margin-top: 4px;
  color: #454545;
}

.cm-directions-studio a,
.cm-directions-studio a:visited {
  display: inline-flex;
  min-height: 36px;
  box-sizing: border-box;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid #dfbdc0;
  border-radius: 4px;
  color: #a9000e;
  background: #fff;
  font-weight: 600;
  text-decoration: none;
}

.cm-directions-studio a:hover,
.cm-directions-studio a:focus-visible {
  border-color: #b0000e;
  background: #fff2f3;
}

@media (max-width: 1220px) {
  .cm-directions {
    gap: 11px;
    padding: 14px;
  }

  .cm-directions-studio a {
    min-height: 44px;
  }
}


.cm-directions:has(.cm-studio-location) {
  gap: 8px;
  padding: 12px;
}

.cm-directions .cm-directions-studio[hidden],
.cm-directions:has(.cm-live-map:not(.cm-map-pending)) .cm-studio-location {
  display: none;
}

.cm-studio-location {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
}

.cm-studio-location > iframe,
.cm-studio-map-window {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 244px;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  background: #f5f5f5;
}

/* Crop the 46px Google My Maps toolbar while keeping the map footer in view. */
.cm-studio-map-window {
  --map-toolbar-height: 46px;
  position: relative;
  overflow: hidden;
}

.cm-studio-location .cm-studio-map-window > iframe {
  position: absolute;
  inset: calc(-1 * var(--map-toolbar-height)) 0 auto;
  display: block;
  width: 100%;
  height: calc(100% + var(--map-toolbar-height));
  border: 0;
}

.cm-studio-location figcaption {
  display: grid;
  gap: 2px;
  overflow-wrap: anywhere;
}

.cm-studio-location small {
  color: #595959;
  font-size: 12px;
}

@media (max-width: 1220px) {
  .cm-contact-map .cm-studio-location > iframe,
  .cm-contact-map .cm-studio-map-window {
    height: clamp(260px, 70vw, 380px);
  }
}
