/* AtoZ カルタ
=========================================================================
=========================================================================*/
main {
  background-color: #EDF1C3;
  background-image: linear-gradient(135deg, #F0F5D2 25%, transparent 25%), linear-gradient(225deg, #F0F5D2 25%, transparent 25%), linear-gradient(45deg, #F0F5D2 25%, transparent 25%), linear-gradient(315deg, #F0F5D2 25%, #EDF1C3 25%);
  background-position: 100px 0, 100px 0, 0 0, 0 0;
  background-size: 100px 100px;
  background-repeat: repeat;
}

/* Page title
-----------------------------------------------------------*/
.title {
  position: relative;
  margin: 65px auto 57px;
  max-width: 984px;
}

@media screen and (max-width:1014px) {
  .title {
    padding: 0 15px;
  }
}

.title picture {
  display: block;
}

.title p {
  text-align: center;
}

/* Cards
-----------------------------------------------------------*/
.cards {
  position: relative;
  margin: 0 auto 100px;
  max-width: 1066px;
}

@media screen and (max-width:1116px) {
  .cards {
    padding: 0 25px;
  }
}

.cards ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 42px calc(54 / 1066 * 100%);
}

.cards ul li {
  width: calc(226 / 1066 * 100%);
}

.cards ul li img {
  cursor: pointer;
  transition: 0.6s;
}

@media(hover: hover) {
  .cards ul li img:hover {
    transform: scale(1.05, 1.05);
  }
}

/* Modal
-----------------------------------------------------------*/
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  text-align: center;
}

.modal_inner {
  overflow: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 80px 0 40px;
  max-width: 940px;
  width: 100%;
  max-height: 95%;
  background: #FFF;
  border-radius: 10px;
}

@media screen and (max-width:970px) {
  .modal_inner {
    width: 95%;
  }
}

.cards_layout {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 0 calc(50 / 940 * 100%);
  margin-bottom: 30px;
}

.cards_layout img {
  width: calc(269 / 940 * 100%);
  transition: transform 0.6s ease, opacity 0.6s ease;
  /* モーダル表示前は非表示 */
  opacity: 0;
  transform: rotateY(90deg);
}

.modal_text {
  margin: 0 auto;
  padding-top: 1.5em;
  max-width: 515px;
  font-size: 13px;
  line-height: 1.84em;
  text-align: left;
  border-top: 1px dashed #747474;
}

.close {
  position: absolute;
  top: 30px;
  right: calc(48 / 940 * 100%);
  width: 60px;
  cursor: pointer;
}

/*  スマホ（767px以下）
=========================================================================
=========================================================================*/
@media screen and (max-width:767px) {
  main {
    background-position: 60px 0, 60px 0, 0 0, 0 0;
    background-size: 60px 60px;
  }

  /* Page title
  -----------------------------------------------------------*/
  .title {
    margin: 30px auto 30px;
  }

  .title p {
    margin-top: 10px;
    font-size: 13px;
  }

  /* Cards
  -----------------------------------------------------------*/
  .cards {
    margin: 0 auto 50px;
  }
  .cards ul {
    gap: 42px calc(26 / 340 * 100%);
  }

  .cards ul li {
    width: calc(157 / 340 * 100%);
  }

  /* Modal
  -----------------------------------------------------------*/
  .modal_inner {
    padding: 70px 20px 40px;
    max-height: 90vh;
  }

  .cards_layout {
    position: relative;
    margin: 0 auto 40px;
    width: 339px;
    height: 514px;
  }

  .cards_layout img {
    max-width: 230px;
    width: 100%;
  }

  .cards_layout img:first-child {
    position: absolute;
    left: 0;
  }

  .cards_layout img:last-child {
    position: absolute;
    top: 172px;
    left: 109px;
  }

  .close {
    top: 12px;
    right: 12px;
    width: 50px;
  }
}

/*  スマホ（480px以下）
=========================================================================
=========================================================================*/
@media screen and (max-width:480px) {
  /* Page title
  -----------------------------------------------------------*/
  .title picture {
    margin: 0 auto;
    max-width: 342px;
  }

  /* Modal
  -----------------------------------------------------------*/
  .modal_inner {
    padding: 40px 20px;
  }

  .cards_layout {
    margin: 0 auto 20px;
    width: 300px;
    height: 445px;
  }

  .cards_layout img {
    max-width: 200px;
  }

  .cards_layout img:last-child {
    top: 148px;
    left: 100px;
  }

}
