body {
  min-width: unset;
}

.case-detail {
  position: relative;
  background-image: linear-gradient(to bottom, #fff 80%, #f0f4fc 100%);
  background-color: #fff;
  background-repeat: no-repeat;
}

.case-detail .youtube {
  width: 100%;
  max-width: 600px;
  margin: 20px auto 50px;
  padding: 10px 10px 0;
  border-radius: 5px;
}
.case-detail .youtube_inner { position: relative; padding-bottom: calc(315 / 560 * 100%); }
.case-detail .youtube_iframe { position: absolute; top: 0; right: 0; width: 100%; height: 100%; }
.case-detail .youtube_caption {
  display: none;
}

.case-detail::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  height: 300px;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
}

.case-detail::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  background: #1366a1;
}

.case-detail > * {
  position: relative;
}

.case-detail a:hover {
  opacity: 0.8;
}

.case-detail .case-details-inner,
.case-detail .title-case-box,
.case-detail .title-text,
.case-detail .mainVisual_bg {
  max-width: none;
  margin: 0;
  padding: 0;
}

.case-detail .main-title {
  position: relative;
  z-index: 1;
}

.case-detail .hdg-l1 {
  margin: 0;
  color: #fff;
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  line-height: 1.45;
}

.case-detail .hdg-l1-sub {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  margin-right: 0;
  margin-bottom: 0;
  border: 1px solid #1366a1;
  border-radius: 8px;
  background: #fff;
  color: #1366a1;
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 700;
}

.case-detail .mainVisual_content {
  position: relative;
  z-index: 1;
  display: block;
}

.case-detail .mainVisual_content > img {
  display: block;
  width: 100%;
  background: #f5f5f5;
  object-fit: cover;
}

.case-detail .list_name_wrap {
  border-radius: 0 0 8px 8px;
  background: #fff;
}

.case-detail .list_name {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-detail .list_name > li {
  margin: 0;
}

.case-detail .list_name > li:first-child {
  display: flex;
  flex: 1;
  align-items: center;
  max-height: 100px;
}

/* ロゴは 幅202px × 高さ100px の枠に収める（縦長・横長どちらも縦横比を保って縮小。枠からはみ出さない） */
.case-detail .list_name > li:first-child p {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
  width: 202px;
  max-width: 100%;
  height: 100px;
}

.case-detail .list_name > li:first-child img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.case-detail .list_name > li:last-child {
  flex: 1;
  min-width: 0;
}

/* ロゴ未登録（会社名・業種の列だけ）のとき：ロゴ用の指定（高さ制限など）を打ち消す */
.case-detail .list_name > li:only-child {
  display: block;
  max-height: none;
}

.case-detail .h2_company {
  margin: 0;
  color: #222;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

.case-detail .table_genre,
.case-detail .table_genre tbody {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 14px 0 0;
  border-collapse: collapse;
}

.case-detail .table_genre tr {
  display: flex;
  gap: 10px;
}

.case-detail .table_genre th,
.case-detail .table_genre td {
  display: block;
  padding: 0;
  color: #676767;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.case-detail .genre {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 5px 16px 6px;
  border-radius: 16px;
  background: #1366a1;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.case-summary {
  margin-top: 30px;
}

.case-summary__ttl {
  display: inline-flex;
  align-items: center;
  margin: 0;
  border-radius: 8px;
  background: #1366a1;
  color: #fff;
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 700;
  line-height: 1.4;
}

.case-summary__icon {
  flex: 0 0 auto;
}

.case-summary__list {
  margin: 15px 0 0;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  list-style: none;
}

.case-summary__list > li {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin: 0;
  color: #454545;
  font-weight: 500;
  line-height: 1.6;
}

.case-summary__list > li + li {
  border-top: 1px solid #ddd;
}

.case-summary__check {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
}

.case-summary__list + .case-summary__ttl {
  margin-top: 30px;
}

.case-detail .hdg-main-step {
  margin-right: 0;
  margin-left: 0;
  padding-top: 4px;
  padding-right: 0;
  padding-bottom: 4px;
  border-left: 4px solid #1366a1;
  color: #222;
  font-size: clamp(20px, 1.8vw, 24px);
  font-weight: 700;
  line-height: 1.5;
}

.case-detail .hdg-main-step:first-child {
  margin-top: 0;
}

.case-detail .border_B_pnk {
  display: inline;
  border: none;
}

.case-detail .sub_ttl {
  margin: 0 0 12px;
  color: #222;
  font-weight: 700;
  line-height: 1.5;
}

.case-detail .case-details-contents p.mb_30 {
  margin: 0 0 18px;
  color: #454545;
  font-weight: 500;
  line-height: 1.6;
}

.case-detail .case-details-contents p.mb_30:last-child {
  margin-bottom: 0;
}

.case-detail .marker {
  background: linear-gradient(transparent 70%, #e57a9f45 70%);
  font-weight: inherit;
}

.case-detail .item-center {
  display: block;
  max-width: none;
  margin-right: 0;
  margin-left: 0;
  text-align: left;
}

.case-detail figure {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  object-fit: contain;
}

.case-detail .type-2 {
  border: 1px solid #ddd;
}

.case-detail .case-details-inner picture {
  display: block;
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
}

.case-detail .type-bnr picture,
.case-detail .type-2 picture {
  border: none;
  border-radius: 0;
}

.case-detail .case-details-inner picture > img {
  width: 100%;
}

.case-detail .img_caption {
  padding: 20px;
  color: #676767;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.7;
  text-align: left;
  word-wrap: break-word;
}

.case-detail .type-1 .img_caption {
  text-align: center;
}

.case-detail .type-2 .img_caption {
  background: #f0f4fc;
}

.case-detail .m_bside_2 {
  max-width: 800px;
  margin-right: 0;
  margin-left: 0;
}

.case-detail .m_bside_2 img {
  display: block;
  width: 100%;
  height: auto;
}

.case-detail__foot-inner {
  max-width: 1194px;
  margin: 0 auto;
}

.case-detail__cta {
  display: flex;
  max-width: 800px;
  overflow: hidden;
  border: 1px solid #1d4383;
  background: #fff;
}

.case-detail__cta-col {
  position: relative;
  display: flex;
  flex: 1 1 50%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-width: 0;
}

.case-detail__cta-col + .case-detail__cta-col::before {
  content: '';
  position: absolute;
  background: #1d4383;
}

.case-detail__cta-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 69px;
}

.case-detail__cta-icon {
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
}

.case-detail__cta-head p {
  margin: 0;
  color: #1d4383;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.case-detail__cta-head em {
  font-weight: 700;
}

.case-detail__cta-head span {
  color: #ce1e54;
}

.case-detail__cta-btnwrap {
  position: relative;
  width: 310px;
  max-width: 100%;
}

.case-detail__cta-free {
  position: absolute;
  top: -14px;
  left: 50%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px 6px;
  border-radius: 100px;
  background: #fada29;
  color: #454545;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%);
}

.case-detail__cta-free::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  border-top: 7px solid #fada29;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  transform: translateX(-50%);
}

.case-detail__cta-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 22px 0;
  border-radius: 6px;
  background: linear-gradient(90deg, #e26c90 0%, #ce2156 100%);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.1);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.case-detail .case-detail__cta-btn:hover {
  box-shadow: none;
  opacity: 1;
  transform: translateY(4px);
}

.case-detail__cta-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
}

.case-detail__cta-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 26px;
  width: 6px;
  height: 6px;
  border-top: 2px solid #ce2156;
  border-right: 2px solid #ce2156;
  transform: translate(-1px, -50%) rotate(45deg);
}

.case-cta-bnr::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 30px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
}

.case-cta-bnr::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 45px;
  width: 6px;
  height: 6px;
  border-top: 2px solid #1d4383;
  border-right: 2px solid #1d4383;
  transform: translate(-1px, -50%) rotate(45deg);
}

.case-cta-bnr--request::after {
  border-color: #ce2156;
}

.case-detail__back {
  max-width: 800px;
  margin: 40px 0 0;
  text-align: center;
}

.case-detail__back a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-left: 38px;
  color: #1d4383;
  font-size: 16px;
  font-weight: 700;
}

.case-detail__back a::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 28px;
  height: 28px;
  border: 1px solid #1d4383;
  border-radius: 50%;
  background: #fff;
  transform: translateY(-50%);
}

.case-detail__back a::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 11px;
  width: 6px;
  height: 6px;
  border-top: 2px solid #1d4383;
  border-right: 2px solid #1d4383;
  transform: translate(1px, -50%) rotate(-135deg);
}

.case-related {
  overflow: hidden;
  padding-top: 20px;
  background: #fff;
}

.case-related__ttl {
  margin: 0 0 16px;
  color: #222;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}

.case-related__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-related__list a {
  display: block;
  color: inherit;
}

.case-related__img {
  aspect-ratio: 300 / 142;
  overflow: hidden;
  background: #f5f5f5;
}

.case-related__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-related__body {
  padding: 17px;
}

.case-related__company {
  margin: 0;
  color: #1366a1;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.case-related__meta {
  margin: 9px 0 0;
  color: #676767;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.case-detail__side-bnr {
  margin-top: 26px;
  overflow: hidden;
}

.case-detail__side-bnr img {
  width: 100%;
  height: 100%;
}

@media screen and (min-width: 769px) {
  .case-detail {
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding: 0 2%;
  }

  .case-detail::before {
    background-image: url("https://tp-img.imgix.net/s/case/common/bg/bg_details-mv_pc.png?auto=compress,format&lossless=0&q=45");
  }

  .case-detail::after {
    height: 300px;
  }

  .case-detail__main {
    flex: 0 0 auto;
    width: min(800px, 70%);
    padding-top: 25px;
  }

  .case-detail__side {
    position: relative;
    z-index: 1;
    width: min(300px, 30%);
    margin-left: 5%;
    padding-top: 25px;
  }

  .case-detail__foot,
  .case-detail > .case-bottom,
  .case-detail > [data-common_cta],
  .case-detail > [data-inc_contentsLink] {
    grid-column: 1 / -1;
  }

  .case-detail .main-title {
    margin-bottom: 30px;
  }

  .title-text {
    border-left: 6px solid #fff;
  }

  .case-detail .hdg-l1 {
    padding-left: 20px;
  }

  .case-detail .hdg-l1-sub {
    margin-left: 20px;
    padding: 10px 15px;
  }

  .case-detail .list_name_wrap {
    padding: 24px 25px;
  }

  .case-detail .list_name {
    flex-direction: row-reverse;
    gap: 24px;
  }

  .case-detail .list_name > li:first-child {
    padding-left: 24px;
    border-left: 1px solid #f0f4fc;
    max-width: calc(203px + 24px);
  }

  .case-detail .list_name > li:only-child {
    padding-left: 0;
    border-left: 0;
    max-width: none;
  }

  .case-detail .table_genre tr {
    align-items: center;
  }

  .case-summary__ttl {
    gap: 12px;
    padding: 5px 20px 6px 15px;
  }

  .case-summary__icon {
    width: 40px;
    height: 40px;
  }

  .case-summary__list {
    padding: 0 16px;
  }

  .case-summary__list > li {
    padding: 20px 0;
    font-size: 16px;
  }

  .case-detail .case-details-contents {
    margin-top: 60px;
  }

  .case-detail .hdg-main-step {
    margin-top: 60px;
    margin-bottom: 30px;
    padding-left: 20px;
  }

  .case-detail .sub_ttl {
    font-size: 18px;
  }

  .case-detail .case-details-contents p.mb_30 {
    font-size: 16px;
  }

  .case-detail .item-center,
  .case-detail .m_bside_2 {
    margin-top: 60px;
    margin-bottom: 60px;
  }

  .case-detail__foot {
    margin-top: 80px;
  }

  .case-detail__foot-inner {
    padding: 60px 20px 80px;
  }

  .case-detail__cta {
    border-radius: 20px;
  }

  .case-detail__cta-col {
    padding: 22px 30px 29px;
  }

  .case-detail__cta-col + .case-detail__cta-col::before {
    top: 50%;
    left: 0;
    width: 1px;
    height: 148px;
    transform: translateY(-50%);
  }

  .case-related {
    border: 1px solid #ddd;
    border-radius: 12px;
  }

  .case-related__list > li {
    margin: 0;
  }

  .case-related__list > li + li {
    border-top: 1px solid #ddd;
  }

  .case-related__nav {
    display: none;
  }

  .case-detail__side-bnrs {
    position: sticky;
    top: 110px;
  }

  .case-detail__side-bnr {
    max-width: 260px;
    margin: 26px auto 0;
  }
}

@media screen and (max-width: 768px) {
  .case-detail::before {
    background-image: url("https://tp-img.imgix.net/s/case/common/bg/bg_details-mv_sp.png?auto=compress,format&lossless=0&q=45");
  }

  .case-detail::after {
    height: 240px;
  }

  .case-detail__main {
    padding: 20px 16px 0;
    background: linear-gradient(180deg, #F0F4FC 0%, #FFF 100%);
  }

  .case-detail__side {
    padding: 0 16px 40px;
  }

  .case-detail .main-title {
    margin-bottom: 20px;
  }

  .title-text {
    border-left: 4px solid #fff;
  }

  .case-detail .hdg-l1 {
    padding-left: 12px;
  }

  .case-detail .hdg-l1-sub {
    margin-left: 12px;
    padding: 8px 12px;
  }

  .case-detail .list_name_wrap {
    padding: 20px 16px;
  }

  .case-detail .list_name {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 16px;
  }

  .case-detail .list_name > li:first-child {
    width: auto;
    max-width: 203px;
    border-top: 1px solid #f0f4fc;
    margin: auto;
    padding-top: 20px;
  }

  .case-detail .list_name > li:only-child {
    width: 100%;
    max-width: none;
    border-top: 0;
    margin: 0;
    padding-top: 0;
  }

  .case-detail .list_name > li:last-child {
    width: 100%;
  }

  .case-detail .table_genre tr {
    align-items: flex-start;
  }

  .case-summary__ttl {
    gap: 8px;
    padding: 5px 16px 6px 12px;
  }

  .case-summary__icon {
    width: 32px;
    height: 32px;
  }

  .case-summary__list {
    padding: 0 12px;
  }

  .case-summary__list > li {
    padding: 16px 0;
    font-size: 15px;
  }

  .case-detail .case-details-contents {
    margin-top: 40px;
  }

  .case-detail .hdg-main-step {
    margin-top: 40px;
    margin-bottom: 20px;
    padding-left: 12px;
  }

  .case-detail .sub_ttl {
    font-size: 16px;
  }

  .case-detail .case-details-contents p.mb_30 {
    font-size: 15px;
  }

  .case-detail .item-center,
  .case-detail .m_bside_2 {
    margin-top: 40px;
    margin-bottom: 40px;
  }

  .case-detail__foot {
    margin-top: 50px;
  }

  .case-detail__foot-inner {
    padding: 40px 16px 50px;
  }

  .case-detail__cta {
    flex-direction: column;
    border-radius: 12px;
  }

  .case-detail__cta-col {
    padding: 20px 16px;
  }

  .case-detail__cta-col + .case-detail__cta-col::before {
    top: 0;
    left: 50%;
    width: calc(100% - 32px);
    height: 1px;
    transform: translateX(-50%);
  }

  .case-related__list {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 4%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .case-related__list > li {
    display: flex;
    flex: 0 0 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 8px;
    scroll-snap-align: start;
  }

  .case-related__list a {
    width: 100%;
  }

  .case-related__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
  }

  .case-related__arrow {
    position: relative;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #d5dce6;
    border-radius: 50%;
    background-color: #fff;
    cursor: pointer;
  }

  .case-related__arrow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -6px;
    border-top: 2px solid #1d4383;
    border-right: 2px solid #1d4383;
    transform: rotate(45deg);
  }

  .case-related__arrow--prev::before {
    margin-left: -2px;
    transform: rotate(-135deg);
  }

  .case-related__dots {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .case-related__dot button {
    display: block;
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: #c5cedb;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out 0s;
  }

  .case-related__dot.is-current button {
    background-color: #1d4383;
  }

  .case-detail__side-bnr {
    position: static;
    max-width: 400px;
    margin-right: auto;
    margin-bottom: 0;
    margin-left: auto;
  }
}
