@charset "UTF-8";

/* ベース設定 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background: #fdfaf6;
  color: #333;
  line-height: 1.5;
}

/* 全体ラッパー */
.gallery-section {
  max-width: 1200px;
  margin: 40px auto;
  padding: 40px;
  background: #fdfaf6;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  position: relative;
}



/* ヘッダー部分 */
.gallery-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.gallery-header h2 {
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.gallery-header .subtitle {
  font-size: 14px;
  color: #555;
}

.pr-tag {
  position: absolute;
  top: 0;
  right: 0;
  border: 1px solid #ccc;
  padding: 4px 8px;
  font-size: 12px;
  color: #666;
  background: #fff;
}

/* スライダー外枠 */
.slider-wrapper {
  position: relative;
  padding: 0 45px;
}

.slider-container {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 5px 0 15px;
}

.slider-container::-webkit-scrollbar {
  display: none;
}

/* スライドアイテム（カード） */
.slide-item-card {
  flex: 0 0 calc((100% - 60px) / 5);
  scroll-snap-align: start;
  cursor: pointer;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

.media-box {
  position: relative;
  width: 100%;
  max-height: 300px;
  aspect-ratio: 1 / 1;
  background: #eee;
}

.media-box img,
.media-box video {
  width: 100%;
  height: 100%;
  max-height: 230px;
  object-fit: cover;
  pointer-events: none;
}

.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.play-icon svg {
  margin-left: 2px;
}

.multiple-icon {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0px 1px 2px rgba(0,0,0,0.5));
  pointer-events: none;
}

.card-info {
  padding: 15px 12px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.account-name {
  font-weight: bold;
  font-size: 13px;
  margin-bottom: 10px;
}

.follower-count {
  font-size: 11px;
  color: #888;
  margin-bottom: 10px;
}

.comment {
  font-size: 12px;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 12px;
}

.media-type {
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ec6519;
}

.disclaimer {
  text-align: center;
  font-size: 12px;
  color: #666;
  margin-top: 20px;
}

/* カルーセル矢印ボタン */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.prev-btn { left: 0px; }
.next-btn { right: 0px; }
.nav-btn:hover { background: #f9f9f9; }

@media (max-width: 768px) {
  .gallery-section {
    padding: 20px 10px;
    margin: 20px auto;
  }
  .slider-wrapper {
    padding: 0 0px;
  }
  .gallery-header h2{
    font-size: 14px !important;
  }
  .gallery-header .subtitle{
    font-size: 12px !important;
  }
  .slide-item-card {
    flex: 0 0 calc((100% - 15px) / 2);
  }
  .pr-tag {
    position: static;
    display: inline-block;
    margin-top: 10px;
  }
  .nav-btn {
    top: 50%;
    width: 32px;
    height: 32px;
  }
}

/* モーダル表示エリア */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal.is-active {
  display: flex;
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}
.modal-content {
  position: relative;
  z-index: 1001;
  width: 90%;
  max-width: 600px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  position: relative;
  width: 100%;
  height: 55vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-media-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.modal-media-wrapper img,
.modal-media-wrapper video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.modal-prev { left: 10px; }
.modal-next { right: 10px; }

.modal-counter {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 2;
}

/* モーダル下部テキスト＆リンク情報エリア */
.modal-info-box {
  padding: 20px;
  background: #fff;
  border-top: 1px solid #eee;
}

.modal-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-account {
  font-weight: bold;
  font-size: 15px;
  color: #333;
}

.modal-followers {
  font-size: 12px;
  color: #888;
}

.modal-comment {
  font-size: 13px;
  color: #444;
  line-height: 1.6;
}

.modal-post-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #ec6519;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  border-radius: 20px;
  transition: opacity 0.2s;
}

.modal-post-link:hover {
  opacity: 0.85;
}

/* モーダル内のキャプチャ画像エリア */
.modal-capture-wrapper {
  margin-top: 15px;
  border-top: 1px solid #eee;
  padding-top: 15px;
  text-align: center; /* 画像を中央寄せ */
}

.modal-capture-image {
  max-width: 100%; /* 横幅いっぱい */
  height: auto; /* アスペクト比維持 */
  display: block;
  margin: 0 auto;
  border: 1px solid #eaeaea; /* 枠線 */
  border-radius: 8px; /* 角丸 */
}

/* 1. ハードウェア描画によるチラつき・点滅（フリッカー）を抑える */
.slider-container,
.slide-item-card,
.media-box video,
.media-box img {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

/* 2. iPhoneのHDR過剰発光を抑える（フィルターをかけることでSDR描画に落とし込む） */
.media-box video {
  /* わずかに明度フィルターを通すことで、iOSのHDRブーストを弱める裏技 */
  filter: brightness(0.98);
}