

/* ---- 並び（PC：3列） ---- */
.kbsmv-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 20px;
  align-items: start;
  margin: 0 0 40px;
}

.kbsmv {
  display: block;
  min-width: 0;
  margin: 0;
}

/* ---- サムネイル ---- */
.kbsmv__thumb {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

.kbsmv__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;   
  object-fit: cover;
  transition: opacity .3s, transform .4s;
}

.kbsmv__thumb:hover img,
.kbsmv__thumb:focus-visible img {
  opacity: .8;
  transform: scale(1.03);
}

.kbsmv__thumb:focus-visible {
  outline: 3px solid #00a0e9;
  outline-offset: 2px;
}


.kbsmv__play {
  position: absolute;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
  width: 18%;
  min-width: 40px;
  max-width: 72px;
  aspect-ratio: 1 / 1;
  margin: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  border: 2px solid #fff;
  transition: background .3s;
}


.kbsmv__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 32%;
  aspect-ratio: 5 / 6;
  margin: 0;
  transform: translate(-33%, -50%);
  background: #fff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.kbsmv__thumb:hover .kbsmv__play,
.kbsmv__thumb:focus-visible .kbsmv__play {
  background: rgba(0, 0, 0, .85);
}

/* キャプション */
.kbsmv__caption {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

/* ---- ポップアップ ---- */
.kbsmv__dialog {
  position: fixed;
  inset: 0;
  width: min(92vw, 1200px, calc(92vh * 16 / 9));   /* 横長スマホでも高さに収まる */
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: #000;
  overflow: visible;
}

.kbsmv__dialog::backdrop {
  background: rgba(0, 0, 0, .8);
}


.kbsmv__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.kbsmv__frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 閉じるボタン */
.kbsmv__close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 34px;
  line-height: 40px;
  text-align: center;
  cursor: pointer;
}

.kbsmv__close:hover,
.kbsmv__close:focus-visible {
  opacity: .7;
}


@media (max-width: 767px) {
  .kbsmv-list {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 28px;
  }

  .kbsmv__play {
    width: 16%;
    min-width: 48px;
    max-width: 64px;
  }

  .kbsmv__dialog {
    width: min(100vw, calc(92vh * 16 / 9));
  }

  .kbsmv__close {
    top: -40px;
    right: 4px;
  }
}
