/* 一番上に書く */
:root {
  --ui-bottom: clamp(8px, 2vh, 24px);
  --ui-size: 48px;
}

.zoom-controls {
  position: absolute;
  bottom: var(--ui-bottom);
  /* ← max()からvar()に変更、他のUIと統一 */
  right: max(12px, 2vw);
  z-index: 5;

  display: flex;
  flex-direction: column;
  gap: 10px;
  /* ← marginの代わりにgapで間隔管理 */
}

.zoom-controls button {
  width: var(--ui-size);
  /* ← 48pxからvar()に変更 */
  height: var(--ui-size);
  /* ← 48pxからvar()に変更 */
  margin: 0;
  /* ← margin: 5px を削除 */
  font-size: 18px;

  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 8px;

  opacity: 0.92;
  background-color: rgba(250, 250, 250, 0.92);
  border: 1px solid rgba(170, 170, 170, 0.7);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.swiper {
  width: 100%;
  height: 100dvh;
  /* 600px or 50vh から変更 */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-wrapper {
  /* wrapperのサイズを調整 */
  width: 100%;
  overflow: visible;
  /* アニメ効果 */
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.swiper-button-prev::after,
.swiper-button-next::after {
  content: "";
}

.swiper-button-prev,
.swiper-button-next {
  position: absolute;
  bottom: var(--ui-bottom) !important;
  width: var(--ui-size);
  height: var(--ui-size);

  background-size: 70%;
  background-repeat: no-repeat;
  background-position: center;
  box-sizing: border-box;
  z-index: 50;
  /* ←追加 */
  top: auto !important;
  margin-top: 0 !important;

  transform: translateY(0);
  margin-top: 0;
  border-radius: 8px;

  opacity: 0.92;
  background-color: rgba(250, 250, 250, 0.92);
  border: 1px solid rgba(170, 170, 170, 0.7);
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.12);

}

.swiper-button-prev {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M34 8 Q34 5 31 7 L13 21 Q10 24 13 27 L31 41 Q34 43 34 40 Z' fill='%2369bce0'/%3E%3C/svg%3E");
  left: calc(50% - 90px) !important;
}

.swiper-button-next {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M14 8 Q14 5 17 7 L35 21 Q38 24 35 27 L17 41 Q14 43 14 40 Z' fill='%2369bce0'/%3E%3C/svg%3E");
  right: calc(50% - 90px) !important;
}

.swiper-pagination {
  position: absolute;
  bottom: var(--ui-bottom) !important;
  z-index: 50;
  /* ページ数表示 */
  width: auto !important;
  left: 50% !important;
  transform: translateX(-50%);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: var(--ui-size);
  padding: 0 10px;
  /* ←追加 */
  line-height: 1;
  /* ←追加 */
  color: #333;
  border-radius: 8px;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;

  opacity: 0.92;

  background-color: rgba(250, 250, 250, 0.92);
  border: 1px solid rgba(170, 170, 170, 0.7);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);

  box-sizing: border-box;
  gap: 4px;
}


.swiper-pagination-current {
  font-size: 16px;
  line-height: 1;
  align-items: center;
}

.swiper-pagination-total {
  font-size: 12px;
  line-height: 1;
  align-items: center;
}

.swiper-slide {
  /* スライドのサイズを調整、中身のテキスト配置調整、背景色 */
  color: #ffffff;
  width: 100%;
  height: 100%;
  /* 100%から変更 */
  text-align: center;
  overflow: hidden;
  line-height: normal;
  /* スライド背景（淡いグラデーション） */
  background: linear-gradient(120deg,
      rgb(245, 242, 232),
      rgb(210, 225, 210));
}


.swiper-slide img {
  width: 100%;
  /* max-width: 1200px; */
  height: auto;
  /* 100%から変更 */
  /* max-height: 720px; */
  object-fit: contain;
  /* coverから変更*/
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  will-change: transform;
  cursor: grab;
}

.swiper-slide img:active {
  cursor: grabbing;
}

.zoom-1 {
  transform: scale(1.5);
}

.zoom-2 {
  transform: scale(2.5);
}

.zoom-container img {
  will-change: transform;
  box-shadow:
    0 4px 18px rgba(0, 0, 0, 0.10);
}



.zoom-container {
  display: flex;
  justify-content: center;
  /* centerから変更 */
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  transition:
    /* アニメーション効果 */
    transform 0.25s ease-out;
  will-change: transform;
}


.zoom-container img {
  max-width: 100%;
  /* 追加 */
  max-height: 100%;
  /* 追加 */
  height: auto;
  /* 400pxから変更 */
  object-fit: contain;
  /* coverから変更 */
  flex-shrink: 0;
}

/* スマホ */
@media (orientation: portrait) {
  .zoom-container {
    flex-direction: column;
    justify-content: center;
    /* ← 中央に表示 */
    align-items: center;
  }

  .zoom-container img {
    width: 100%;
  }
}

@media (orientation: landscape) {
  .zoom-container {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    max-width: clamp(600px, 90vw, 1400px);
    margin: 0 auto;
    /* ←中央固定 */
  }

  .zoom-container img {
    width: 48%;
  }
}