.scrollMessageWrapper {
  position: relative;
  width: 100%;
  z-index: 10;
  font-family:"Kosugi Maru", sans-serif;
  font-size: 2rem;
  overflow: hidden;
}
.scrollMessage {
  animation: scrollText 2s infinite ease;
}

.map-section {
  position: relative;
  height: calc(var(--vh, 1vh) *600);
  background: snow;
  justify-content: center;
  align-items: center;
}

.map-wrapper {
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  aspect-ratio: 1/1;
  justify-content: center;
  align-items: center;
}

.map-img {
  position: absolute;
  width: 100%;
  height: auto;
  opacity: 0;
}

/* 順にフェードイン */
.map-img.visible {
  animation: show .5s both;
}
.map-img.hide {
  animation: hideanime .3s both;
}

.map-img.visible#map-pin {
  animation: dropPin .5s both;
}
.map-img.visible#map-arrow {
  animation: showarrow .5s both;
}
/* アニメーションを確認しやすくするための枠線 */
.map-img-wrapper {
  position: absolute;
  width: fit-content;
  height: fit-content;
  transform-origin: center center;
  top: 50%;
  left: 50%;
}
#map-gelande-wrapper {
  top: 30%;
  left: 0;
  transform: rotate(-15deg);
}
#map-bus-wrapper {
  width: 40%;
  transform: rotate(20deg);
}
#map-bustext-wrapper {
  width: 20rem;
  aspect-ratio: 17/5;
  transform: translate(-50%, 150%);
  left: 50%;
}

#map-section-wrapper {
  padding: 2rem 0;
}
#map-gelande {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 12rem;
  aspect-ratio: 2/1;
  background: snow;
  border: .2rem solid #1E8EA4; /* ← 枠線を追加 */
  border-radius: 50%;          /* ← 楕円を作る */
}
#map-gelande p {
  margin: auto 0;
  padding: 0;
  text-align: center;
  font-size: 1.3rem;
  line-height: 1.2;
  position: relative;
}
#map-gelande p span {
  font-size: 1.6rem;
  line-height: 1.2;
}
#map-bus {
  position: relative;
  width: 100%;
}
#map-bustext {
  position: relative;
}

#map-bustext {
  display: flex;
  position: absolute;
  background-color: snow;
  border: .2rem solid #1E8EA4;
  border-radius: 2rem;
  justify-content: center;
  align-items: center;
  width: 20rem;
  aspect-ratio: 17/5;
  gap: 2rem;
  padding: .7rem 1.2rem;
  font-size: 1rem;

}
#map-bustext p {
  margin: auto 0;
  padding: 0;
  height: fit-content;
}
#map-bustext p:nth-child(1) {
  text-align: center;
  /*transform: rotate(-10deg);*/
}
#map-bustext p:nth-child(2) {
  font-size: 1.5rem;
  margin: 0;
}


@keyframes show {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  80% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes hideanime {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes dropPin {
  from {
    opacity: 0;
    transform: translateY(-10%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes showarrow {
  from {
    opacity: 0;
    transform: scale(0) rotate(100deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@media (min-width: 1024px) {
.map-wrapper {
  width: 50%;
  transform: translate(-50%, -50%);
  left: 50%;
}
#map-gelande-wrapper {
  top: 30%;
  transform: translateY(0) rotate(-15deg);
}
#map-bustext-wrapper {
  width: 30rem;
  transform: translate(-50%, 100%);
}
#map-gelande {
  width: 15rem;
  border-width: .3rem;
}
#map-gelande p {
  font-size: 1.5rem;
}
#map-gelande p span {
  font-size: 1.8rem;
}
#map-bustext {
  width: 30rem;
  font-size: 1.5rem;
  border-width: .3rem;
}
#map-bustext p:nth-child(2) {
  font-size: 2.3rem;
}
.scrollMessageWrapper {
  font-size: 3rem;
}
}
@keyframes scrollText {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  10% {
    transform: translateY(0);
    opacity: 1;
  }
  30% {
    transform: translateY(20%);
    opacity: 1;
  }
  50% {
    transform: translateY(-150%);
    opacity: 0;
  }
  80% {
    transform: translateY(0);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}