.single-works-wrapper {
  padding: clamp(140px, 12vw, 220px) max(20px, 6.21vw) clamp(12rem, 10vw, 20rem);
}

.single-works-inner {
  max-width: 168rem;
  margin: 0 auto;
}

/* category */

.single-works-category {
  color: rgb(0, 0, 0, 0.4);
  font-size: 1.4rem;
}

/* title */

.single-works-title {
  margin-top: 4rem;
  font-size: clamp(3.2rem, 4vw, 4.8rem);
  line-height: 1.4;
}

/* fv */

.single-works-fv {
  position: relative;

  margin-top: 8rem;
}

.single-works-image {
  width: 100%;
  display: block;
}

/* contact */

.single-works-contact {
  position: fixed;
  right: max(20px, 2.14vw);
  bottom: 6rem;
  padding: 1.6rem 3.6rem 1.8rem;
  background: #000;
  color: #fff;
  border-radius: 5px;
  max-width: 338px;
  transition: 0.4s;
  z-index: 999;
}

.single-works-contact:hover {
  background: #282828;
  transition: 0.4s;
}

.single-works-contact span {
  display: block;
  font-size: clamp(1.5rem, 1.43rem + 0.36vw, 1.7rem);
  font-weight: 700;
  line-height: 1.5;
}

.single-works-contact small {
  display: block;
  margin-top: 1rem;
  font-size: clamp(1.2rem, 1.13rem + 0.12vw, 1.4rem);
  line-height: 1.75;
}

/* overview */

.single-works-overview-wrap {
  display: grid;
  grid-template-columns:
    50.86vw
    22.36vw;
  gap: 14.29vw;
  margin-top: clamp(6rem, 8.57vw, 14.4rem);
}

/* label */

.single-works-label,
.single-works-info-label {
  color: rgb(0, 0, 0, 0.4);
  font-size: 1.8rem;
  letter-spacing: 0;
}

/* text */

.single-works-text {
  margin-top: 3rem;
  font-size: clamp(1.4rem, 1.143vw, 1.8rem);
  line-height: 2.25;
}

/* info */

.single-works-info-row + .single-works-info-row {
  margin-top: 4rem;
}

.single-works-info-row {
  display: flex;
}

.single-works-info-label {
  width: 80px;
}

.single-works-info-text {
  font-size: clamp(1.4rem, 1.14vw, 1.7rem);
  line-height: 1.5;
  margin-top: -3px;
}

/* content */

.single-works-content {
  margin-top: clamp(6rem, 8.57vw, 14.4rem);
}

.single-works-content > * + * {
  margin-top: 6rem;
}

.single-works-content .wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
}

.single-works-content .wp-block-gallery {
  gap: 2rem;
}

.single-works-content p {
  line-height: 2.25;
}

.single-works-section + .single-works-section {
  margin-top: clamp(6rem, 8.57vw, 14.4rem);
}

.single-works-content img {
  width: 100%;
  height: auto;

  display: block;
}

.single-works-content figure {
  margin-top: 8rem;
}

/* section */

.single-works-section {
  margin-top: clamp(6rem, 8.57vw, 14.4rem);
  width: 50.86vw;
}
/* ========================================
画像コンテンツ
======================================== */

.single-works-content p:has(img) {
  line-height: 1;
}

/* 2枚以上ある時だけ */
.single-works-content p:has(img + img) {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.6rem, 2.14vw, 3rem);
}

/* 画像共通 */
.single-works-content p img {
  width: 100%;
  height: auto;
  display: block;
}

/* ========================================
back link
======================================== */

.single-works-back {
  margin-top: clamp(8rem, 5.71vw, 12rem);
  text-align: center;
}

.single-works-back-link {
  position: relative;
  display: inline-block;
  padding-bottom: 0.6rem;
  font-size: clamp(1.6rem, 1.43vw, 2.2rem);
  line-height: 1;
  transition: opacity 0.3s ease;
}

.single-works-back-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: #111;
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

@media (hover: hover) {
  .single-works-back-link:hover::after {
    transform-origin: left;
    transform: scaleX(0);
  }
}
/* sp */

@media screen and (max-width: 768px) {
  .single-works-wrapper {
    padding: 8rem 3rem;
  }
  .single-works-title {
    font-size: 3rem;
  }
  .single-works-overview-wrap {
    grid-template-columns: 1fr;
    gap: 6rem;
    margin-top: 6rem;
  }

  .single-works-contact {
    bottom: 4rem;
  }

  .single-works-section {
    width: 100%;
  }
  .single-works-contact span {
    font-size: 1.6rem;
  }
}

@media screen and (max-width: 599px) {
  .single-works-wrapper {
    padding: 6rem 3rem 9.6rem;
  }
  .single-works-title {
    font-size: 2.4rem;
    margin-top: 3rem;
  }
  .single-works-title br {
    display: none;
  }
  .single-works-fv {
    margin-top: 3.6rem;
  }
  .single-works-overview-wrap {
    gap: 3.6rem;
    margin-top: 3.6rem;
  }

  .single-works-contact {
    bottom: 4rem;
    padding: 1.2rem 2rem 1.4rem;
  }
  .single-works-contact span {
    font-size: 1.3rem;
    text-align: center;
  }
  .single-works-label,
  .single-works-info-label {
    font-size: 1.5rem;
  }
  .single-works-info-label {
    width: 6rem;
  }
  .single-works-content {
    margin-top: 4.8rem;
  }
  .single-works-content > * + * {
    margin-top: 3.6rem;
  }
  .single-works-section {
    margin-top: 3.6rem;
  }
  .single-works-contact {
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    width: 18rem;
  }
  .single-works-contact small {
    display: none;
  }
  .single-works-back {
    margin-top: 6rem;
  }
}
