* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --font-sans-serif: "Helvetica Neue", "Helvetica", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Arial", "Yu Gothic", "Meiryo", sans-serif;
  --font-serif: "A1明朝", "游明朝", "YuMincho", "Hiragino Mincho ProN",
    "HG明朝E", "ＭＳ Ｐ明朝", "ＭＳ 明朝", serif;
  --duration-short: 0.3s;
  --color-black: #222222;
  --color-dark-gray: #666666;
  --color-medium-gray: #cccccc;
  --color-light-gray: #f0f0f0;
  --color-white: #ffffff;
  --color-assortment-blue: #264095;
  --color-assortment-green: #5a95cf;
}

body {
  font: 14px/1.5 var(--font-serif);
  color: var(--color-black);
}

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

button {
  all: unset;
  cursor: pointer;
}

header {
  display: block;
  position: relative;
  z-index: 1;
  padding: 2rem 1rem;
}

.header-title {
  font-size: 22px;
  margin-bottom: 18px;
}

.header-description {
  font-size: 13px;
}

footer {
  display: block;
  position: relative;
  padding: 2rem 1rem;
  text-align: center;
  font-size: 12px;
}

.wrapper {
  display: grid;
  place-items: center;
  position: relative;
  background: url("./images/background.jpg") no-repeat left top / auto 100%;
  min-height: 100vh;
  overflow: hidden;
}

.container {
  position: relative;
  width: 100%;
  max-width: 1440px;
}

.map-wrapper {
  position: relative;
  width: 100%;
}

.map-wrapper::before {
  content: "";
  display: block;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(-8%, -47%);
  z-index: 0;
  border-radius: 50%;
  width: 150%;
  aspect-ratio: 1;
  background-color: #fff;
}

.map-scroll {
  padding-top: 6rem;
  padding-left: 20%;
  overflow-x: auto;
}

.map {
  display: block;
  position: relative;
  z-index: 1;
  margin: 0 auto;
  width: 80%;
  aspect-ratio: 1300 / 873;
  background: url("./images/map.png") no-repeat center center / contain;
}

.area {
  --pin-size: 1.5rem;
  display: flex;
  position: absolute;
  color: inherit;
  text-decoration: none;
  pointer-events: none;
}

.area-balloon {
  border-radius: 0.5rem;
  padding: 0.5rem;
  box-shadow: 0 0 0.5rem rgb(0 0 0 / 0.2);
  background-color: #f6f6f6;
  border: 1px solid #828282;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: auto;
}

.area-balloon-top {
  font-size: 0.7rem;
}

.area-balloon-middle {
  font-size: 0.8rem;
  font-weight: 700;
}

.area-balloon-bottom {
  font-size: 10px;
}

.icon-jiseikai {
  display: inline-block;
  height: 1em;
  width: auto;
  margin-right: 0.1em;
}

.area-pin {
  border-radius: 50%;
  border: 1px solid black;
  padding: 0.2rem;
  width: var(--pin-size);
  height: var(--pin-size);
  background-color: #fff;
  transition: transform var(--duration-short),
    background-color var(--duration-short);
  animation: fuwafuwa ease-out 0.6s infinite alternate;
  pointer-events: auto;
}

.area[href="#jskhhp"] .area-pin {
  border-color: #58c531;
}
.area[href="#jskhhp"]:hover .area-pin {
  background-color: #58c531;
}
.area[href="#nursing"] .area-pin {
  border-color: #fea632;
}
.area[href="#nursing"]:hover .area-pin {
  background-color: #fea632;
}
.area[href="#shinryukai"] .area-pin {
  border-color: #ff54f4;
}
.area[href="#shinryukai"]:hover .area-pin {
  background-color: #ff54f4;
}
.area[href="#school"] .area-pin {
  border-color: #1f7de9;
}
.area[href="#school"]:hover .area-pin {
  background-color: #1f7de9;
}
.area:hover .area-pin {
  animation-duration: 0.25s;
}
.area .area-pin-icon {
  display: block;
}
.area:hover .area-pin-icon {
  display: none;
}
.area .area-pin-icon-white {
  display: none;
}
.area:hover .area-pin-icon-white {
  display: block;
}

.area[href="#jskhhp"] {
  flex-direction: column;
  bottom: 77%;
  left: 61%;
  transform: translate(calc(var(--pin-size) / -2), calc(var(--pin-size) / 2));
}

.area-line {
  pointer-events: auto;
}
.area-line::after {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
}
.area[href="#jskhhp"] .area-line {
  padding: 0 calc(var(--pin-size) / 2);
  width: 0;
  height: 4rem;
}
.area[href="#jskhhp"] .area-line::after {
  border-right: 2px dotted;
  transform: translateX(-1px);
}

.area[href="#nursing"] {
  flex-direction: column;
  align-items: flex-end;
  bottom: 68%;
  right: 56%;
  transform: translate(calc(var(--pin-size) / 2), calc(var(--pin-size) / 2));
}

.area[href="#nursing"] .area-line {
  padding: 0 calc(var(--pin-size) / 2);
  width: 0;
  height: 4rem;
}
.area[href="#nursing"] .area-line::after {
  border-right: 2px dotted;
  transform: translateX(-1px);
}

.area[href="#shinryukai"] {
  flex-direction: column;
  align-items: flex-end;
  bottom: 46%;
  right: 66%;
  transform: translate(calc(var(--pin-size) / 2), calc(var(--pin-size) / 2));
}

.area[href="#shinryukai"] .area-line {
  padding: 0 calc(var(--pin-size) / 2);
  width: 0;
  height: 1rem;
}
.area[href="#shinryukai"] .area-line::after {
  border-right: 2px dotted;
  transform: translateX(-1px);
}

.area[href="#school"] {
  flex-direction: row-reverse;
  align-items: center;
  bottom: 32%;
  left: 56%;
  transform: translate(calc(var(--pin-size) / -2), 50%);
}

.area[href="#school"] .area-line {
  padding: calc(var(--pin-size) / 2) 0;
  height: 0;
  width: 1rem;
}
.area[href="#school"] .area-line::after {
  border-top: 2px dotted;
  transform: translateY(-1px);
}

.modal {
  opacity: 0;
  visibility: hidden;
  position: fixed;
  display: grid;
  place-items: center;
  top: 0;
  left: 0;
  padding: 1rem;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  background-color: rgb(255 255 255 / 0.8);
  z-index: 2;
  transition: opacity var(--duration-short), visibility var(--duration-short);
  cursor: pointer;
}

.modal.is-active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  position: relative;
  max-width: 60rem;
  background-color: #fff;
  padding: 4rem 1rem 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.2);
  cursor: default;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: grid;
  place-items: center;
  border: 1px solid;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  color: var(--color-assortment-green);
  font-size: 1.4rem;
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.modal-subheading {
  font-size: 1rem;
}

.modal-heading {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-heading::after {
  content: "";
  display: block;
  margin: 0.2rem 0 0.4rem auto;
  width: 100%;
  height: 1px;
  background-color: var(--color-medium-gray);
}

.modal-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.modal-link {
  display: block;
  padding: 0.5rem 2rem;
  border: 1px solid;
  text-decoration: none;
  text-align: center;
  color: var(--color-dark-gray);
  font-family: var(--font-sans-serif);
  transition: background-color var(--duration-short),
    color var(--duration-short);
}

.modal-link:hover {
  background-color: var(--color-dark-gray);
  color: var(--color-white);
}

@media (min-width: 375px) {
  .map-scroll {
    padding-left: 2rem;
  }
}

@media (min-width: 430px) {
  .map-scroll {
    padding-left: 0;
  }
}

@media (min-width: 768px) {
  body {
    font-size: 16px;
  }

  .header-title {
    font-size: 25px;
  }

  .header-description {
    font-size: 14px;
  }

  .area {
    --pin-size: 3rem;
  }

  .area-balloon {
    padding: 0.8rem 1.2rem;
  }

  .area-balloon-top {
    font-size: 0.8rem;
  }

  .area-balloon-middle {
    font-size: 1rem;
  }

  .area-balloon-bottom {
    font-size: 0.8rem;
  }

  .area-pin {
    padding: 0.5rem;
  }

  .area[href="#nursing"] .area-line {
    height: 6rem;
  }

  .area[href="#shinryukai"] .area-line {
    height: 4rem;
  }

  .area[href="#school"] .area-line {
    width: 3rem;
  }

  footer {
    padding: 0 1rem 1rem;
    font-size: 15px;
  }
}

@media (min-width: 1024px) {
  /* .wrapper {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
      } */
  .container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    margin: auto;
    aspect-ratio: 1280 / 720;
  }

  header {
    position: absolute;
    top: 0;
    left: 0;
    /* padding-top: 4rem; */
  }

  .header-title {
    margin-bottom: 2rem;
    font-size: 28px;
  }

  .header-description {
    line-height: 1.9;
  }

  .map-wrapper {
    margin-left: auto;
    /* padding-top: 10rem; */
    width: 60%;
  }

  .map {
    margin-top: 0;
    width: 100%;
  }

  .area[href="#jskhhp"] .area-line {
    height: 6rem;
  }

  .modal-box {
    padding: 3rem 2rem;
  }

  .modal-body {
    align-items: end;
    grid-template-columns: 3fr 2fr;
  }

  .modal-heading::after {
    width: 70%;
  }

  /* footer {
        padding-bottom: 4rem;
      } */
}

@media (min-width: 1280px) {
  .area-balloon-top {
    font-size: 1rem;
  }

  .area-balloon-middle {
    font-size: 1.2rem;
  }

  .area-balloon-bottom {
    font-size: 1rem;
  }
}

@keyframes fuwafuwa {
  0% {
    transform: translateY(0) scale(0.85);
    box-shadow: 0 0 0 rgba(0, 0, 0, 0.2);
  }

  100% {
    transform: translateY(-5px) scale(1);
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.05);
  }
}
