*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  width: 100%;
  height: 100%;
  font-family: "Zen Maru Gothic", sans-serif;
  font-weight: 200;
  font-style: normal;
  letter-spacing: 0.1em;
  font-size: var(--fs14);
  font-weight: bold;
  color: var(--main-color1);
  background-color: var(--sub-color1);
}

:root {
  --main-color1: #424242;
  /* --main-color2: #9C1A4E; */
   --main-color2: #906E6B;
  --sub-color1: #e7d8e2;
  --sub-color2: #CBA1AB;
  --sub-color3: #A9E7B9;
  --fs10: calc(10 / 16 * 1rem);
  --fs11: calc(11 / 16 * 1rem);
  --fs12: calc(12 / 16 * 1rem);
  --fs13: calc(13 / 16 * 1rem);
  --fs14: calc(14 / 16 * 1rem);
  --fs15: calc(15 / 16 * 1rem);
  --fs16: calc(16 / 16 * 1rem);
  --fs17: calc(17 / 16 * 1rem);
  --fs18: calc(18 / 16 * 1rem);
  --fs19: calc(19 / 16 * 1rem);
  --fs20: calc(20 / 16 * 1rem);
  --fs21: calc(21 / 16 * 1rem);
  --fs22: calc(22 / 16 * 1rem);
  --fs23: calc(23 / 16 * 1rem);
  --fs24: calc(24 / 16 * 1rem);
  --fs25: calc(25 / 16 * 1rem);
  --fs26: calc(26 / 16 * 1rem);
  --fs27: calc(27 / 16 * 1rem);
  --fs28: calc(28 / 16 * 1rem);
  --fs29: calc(29 / 16 * 1rem);
  --fs30: calc(30 / 16 * 1rem);
  --fs31: calc(31 / 16 * 1rem);
  --fs32: calc(32 / 16 * 1rem);
  --fs33: calc(33 / 16 * 1rem);
  --fs34: calc(34 / 16 * 1rem);
  --fs35: calc(35 / 16 * 1rem);
  --fs36: calc(36 / 16 * 1rem);
  --fs37: calc(37 / 16 * 1rem);
  --fs38: calc(38 / 16 * 1rem);
  --fs39: calc(39 / 16 * 1rem);
  --fs40: calc(40 / 16 * 1rem);
  --fs42: calc(42 / 16 * 1rem);
  --fs44: calc(44 / 16 * 1rem);
  --fs46: calc(46 / 16 * 1rem);
  --fs48: calc(48 / 16 * 1rem);
  --fs50: calc(50 / 16 * 1rem);
  --fs52: calc(52 / 16 * 1rem);
  --fs54: calc(54 / 16 * 1rem);
  --fs56: calc(56 / 16 * 1rem);
  --fs58: calc(58 / 16 * 1rem);
  --fs60: calc(60 / 16 * 1rem);
  --fs70: calc(70 / 16 * 1rem);
  --fs80: calc(80 / 16 * 1rem);
}

p {
  font-size: var(--fs14);
  /* ↑上の変数を反映させる書き方 */
  /*  margin-bottom: 1em; */
}

.wrapper {
  width: 100%;
  height: 100%;
  position: relative;
}



/* ===================================================================== */
/* Link * /
/* ===================================================================== */

/* リンク部分 ここも先に指定しておくとラク*/
a,
a:link,
a:active {
  text-decoration: none;
  outline: none;
  transition: 0.2s;
  color: inherit;
}

a:hover {
  /* color: var(--sub-color1); */
  text-decoration: none;
  transition: 0.2s;
}

a img {
  border: none;
  transition: 0.2s;
}

a:hover img {
  opacity: 0.5;
  transition: 0.2s;
}

/* ===================================================================== */
/* Image * /
/* ===================================================================== */

/* イメージ画像を歪ませないで、綺麗にするために必要な考え方。 */
img {
  max-width: 100%;
  max-height: 100%;
  /* filter: brightness(1.1) contrast(1.1) grayscale(0.2); */
}

.object-fit {
  object-fit: cover;
  font-family: "object-fit: cover;";
  /*IE対策*/
}

.img-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 2;

  &::before {
    content: "";
    display: block;
    width: 100%;
    height: 0;
    padding-bottom: 66.6666%;
  }

  &::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
  }

  img {
    position: absolute;
    top: 0;
    left: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    object-fit: cover;
    font-family: "object-fit: cover;";
    object-position: center center;
  }
}

.btn {
  display: block;
  justify-content: center;
  text-align: center;
  width: fit-content;
  margin-inline: auto;
  padding: 1.2rem 3rem;
  background-color: var(--main-color2);
  color: #fff !important;
  border-radius: 40px;
}

.address-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 340px;
  margin: 0 auto;
  padding: 1.2rem 3rem;
  background-color: var(--main-color2);
  border-radius: 40px;
  margin-bottom: 120px;
}

.btn-icon {
  height: 40px;
}

.address-btn span {
  color: #fff !important;
}

/* loop-template-content */
.template-list {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.template-list-item {
  width: 340px;
  /* アイテム自体の幅を固定 */
  display: flex;
  flex-direction: column;
}

.template-list-img {
  width: 340px;
  height: 230px;
background-color: #fff;
border-radius: 16px 16px 0 0;
}

.template-list-img a {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.template-list-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.template-list-container {
  width: 340px;
  background-color: #fff;
  border-radius: 0 0 16px 16px;
  padding: 0.5rem;
}

.template-tag {
  font-size: var(--fs12);
  color: var(--sub-color2);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--sub-color2);
  display: inline-block;
}

.template-list-flex {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.template-day {
  font-size: var(--fs12);
  color: var(--sub-color2);
  margin-top: 0.2rem;
}

.template-list-title {
  font-size: var(--fs16);
  color: var(--main-color2) !important;
  display: block;
  padding: 0.2rem 0.3rem;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.6);
  overflow-y: auto;
  padding: 1rem 0;
}

/* 白枠のコンテンツエリア */
.modal__content {
  position: relative;
  /* translate(-50%, -50%)を解除するために relative に変更 */
  background: #fdfdfd;
  width: 90%;
  max-width: 450px;
  margin: 0 auto;
  padding: 40px 20px;
  border-radius: 20px;
  color: var(--main-color1);
  text-align: center;
}

.modal__title {
  font-size: var(--fs18);
  margin: 1rem auto 5px auto;
}

.modal__date {
  font-size: var(--fs14);
  margin-bottom: 20px;
}

.modal__image {
  width: 100%;
  max-width: 300px;
  /* aspect-ratio: 1 / 1; */
  background: #fdfdfd;
  margin: 0 auto;
  margin-bottom: 2rem;
  /* overflow: hidden; */
  /* display: flex;
  justify-content: center;
  align-items: center; */
  
}

.modal__image img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  box-shadow: 1px 4px 4px rgba(0, 0, 0, 0.4);
}

.modal__address {
  margin-top: 1rem;
  font-size: var(--fs13);
  line-height: 1.6;
  text-align: left;
  display: inline-block;
}

.modal__content .btn {
  display: inline-block;
  width: 100%;
  max-width: 280px;
  padding: 15px;
  background-color: var(--main-color2);
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  margin: 20px 0;
}

/* 閉じるボタン */
.modal__close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: var(--fs14);
  color: #fff !important;
  padding: 0.5rem 0.8rem;
  border-radius: 30px;
  background-color: var(--main-color2);
}

@media screen and (max-width: 768px) {
  .template-list {
    flex-direction: column;
    align-items: center;
  }
}