body.page-template-page-booth-map #top_title_area {
  display: none;
}

body.page-template-page-booth-map,
.booth-map-page {
  background: #fbf7ed;
}

.booth-map-page {
  padding: 24px 0 72px;
}

.booth-map-page__inner {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 0 24px;
}

.booth-map-page__content {
  max-width: 760px;
  margin: 0 0 28px;
  color: #333;
  font-size: 16px;
  line-height: 1.8;
}

.booth-map {
  position: relative;
  padding-right: 58px;
}

.booth-map__controls {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.booth-map__button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #c9c9c9;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #222;
  font-family: Arial, sans-serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.booth-map__button:hover,
.booth-map__button:focus-visible {
  background: #222;
  border-color: #222;
  color: #fff;
}

.booth-map__close {
  display: none;
}

.booth-map__viewport {
  --booth-map-viewport-height: min(72vh, 820px);
  position: relative;
  height: var(--booth-map-viewport-height);
  min-height: 520px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.booth-map__viewport.is-dragging {
  cursor: grabbing;
}

.booth-map__svg {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: min(1120px, 92%, calc(var(--booth-map-viewport-height) * 1282 / 903));
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.booth-map__svg svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

@media (max-width: 767px) {
  body.page-template-page-booth-map .l-content__body {
    margin: 0 auto;
  }

  .booth-map-page {
    display: flex;
    align-items: center;
    padding: 16px 0 56px;
    min-height: calc(100vh - var(--ark-header_height, 0px));
    min-height: calc(100svh - var(--ark-header_height, 0px));
  }

  .booth-map-page__inner {
    padding: 0 20px;
  }

  .booth-map-page__content {
    font-size: 14px;
  }

  .booth-map {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-right: 0;
  }

  .booth-map__controls {
    position: static;
    order: 2;
    justify-content: center;
    flex-direction: row;
    transform: none;
  }

  .booth-map__close {
    display: flex;
    align-items: center;
    gap: 6px;
    order: 3;
    width: max-content;
    margin: 4px auto 0;
    color: #222;
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-decoration: none;
  }

  .booth-map__close svg {
    display: block;
    flex: 0 0 auto;
    fill: currentColor;
  }

  .booth-map__close:hover,
  .booth-map__close:focus-visible {
    text-decoration: underline;
  }

  .booth-map__viewport {
    order: 1;
    height: auto;
    min-height: 0;
    aspect-ratio: 1282 / 903;
  }

  .booth-map__button {
    width: 38px;
    height: 38px;
    font-size: 26px;
  }

  .booth-map__svg {
    width: 100%;
  }
}
