body.cv-modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}
.cv-thumbnail-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 20px auto;
}
.cv-thumb {
  width: 100px;
  cursor: pointer;
  border: 2px solid #ccc;
  transition: 0.2s;
}
.cv-thumb:hover {
  border-color: #555;
}
.cv-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85); /* 必要に応じて背景を調整 */
  z-index: 10001; /* headerより大きく */
  display: none; /* 初期状態は非表示 */
  overflow: hidden;
}

.cv-overlay.active {
  display: flex;
}
.cv-overlay-content {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cv-close {
  position: absolute;
  top: 10px; right: 20px;
  font-size: 32px;
  color: white;
  cursor: pointer;
  z-index: 10000;
}

.cv-overlay .swiper-button-next {
  left: 10px;
  right: auto;
}
.cv-overlay .swiper-button-prev {
  right: 10px;
  left: auto;
}
.cv-swiper {
  flex: 1;
  width: 100%;
  height: 100%;
}
.cv-swiper .swiper-slide {
  display: flex;
  align-items: center;
  background: #000;
  height: 100%;
  overflow: hidden;
  flex: 0 0 50%;
  max-width: 50%;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 1枚目は左寄せ、2枚目は右寄せ */
.cv-swiper .swiper-slide:nth-child(odd) {
  justify-content: flex-end;
}
.cv-swiper .swiper-slide:nth-child(even) {
  justify-content: flex-start;
}

/* Swiperのスライド内画像を常に枠内に収める */
.cv-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* 見開きのときは2枚並ぶので親にflexも効くようにしておく（念のため） */
.cv-swiper .swiper-wrapper {
  display: flex;
}

.swiper-pagination {
  color: #fff;
  text-align: center;
  font-size: 14px;
  margin: 10px 0;
}

.swiper-scrollbar {
  background: rgba(255, 255, 255, 0.2);
  height: 4px;
  margin: 10px 0;
}

.swiper-scrollbar-drag {
  background: #fff;
}
.cv-overlay-ui {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  background-color: rgba(0, 0, 0, 0.5);
  padding: 10px 30px;
  border-radius: 6px;
  opacity: 0; /* 初期非表示に */
  transition: opacity 0.3s;
}
/* モバイル表示（1枚表示）時には100%に戻す */
@media (max-width: 1023px) {
  .cv-swiper .swiper-slide {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
