/* PN TikTok Feed 共通スタイル（グリッドのレスポンシブ列数はインスタンス別 inline style で制御） */

.ptf-grid .ptf-item {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;      /* 正方形サムネイル */
  overflow: hidden;
  border-radius: 4px;
  background: #efefef;
}

.ptf-grid .ptf-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;        /* 9:16縦カバーを中央クロップ */
  display: block;
}

/* 再生アイコン（CSSのみ: 円形半透明背景＋三角形） */
.ptf-grid .ptf-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.45);
  border-radius: 50%;
  transition: transform 0.15s ease, background 0.15s ease;
  pointer-events: none;
}

.ptf-grid .ptf-play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent #fff;
}

/* ホバーで軽く拡大 */
.ptf-grid .ptf-item:hover .ptf-play {
  transform: translate(-50%, -50%) scale(1.12);
  background: rgba(0, 0, 0, 0.6);
}

/* =========================================================================
   自前ライトボックス（依存ゼロ）。全て .ptf-modal 配下に限定し、テーマ/他
   プラグインと干渉しないようにする。box-sizing もモーダル内だけで初期化。
   ========================================================================= */
.ptf-modal[hidden] {
  display: none;
}

.ptf-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483000;         /* 前面に確実に出す */
  display: flex;
  align-items: center;
  justify-content: center;
}

.ptf-modal * {
  box-sizing: border-box;
}

.ptf-modal__backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.8);
}

.ptf-modal__body {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 95vh;
}

.ptf-modal__frame {
  line-height: 0;
}

.ptf-modal__frame iframe {
  display: block;
  border: 0;
  max-width: 95vw;
  border-radius: 8px;
  background: #000;
}

.ptf-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 22px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.ptf-modal__close:hover {
  background: #f0f0f0;
}

/* モーダル表示中は背景スクロールを止める */
html.ptf-modal-open,
html.ptf-modal-open body {
  overflow: hidden;
}
