/* YouTube のモーダルプレーヤー（/cm と /setlist で共有）。
   小さいカード内で再生するとYouTubeのコントロール（一時停止マーク等）が
   相対的に大きく目障りになるため、クリック時はここで大きく開く。 */
.yt-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  /* 余白は控えめに。プレーヤーを大きく取れるほど YouTube が高い画質を選ぶ */
  padding: clamp(0.75rem, 2vw, 1.5rem);
}
.yt-modal[hidden] { display: none; }
.yt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 8, 4, 0.85);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
}
/* 16:9 が縦にも収まるよう、ビューポート高からも幅を上限する。
   YouTube はプレーヤーの実寸から画質を決める（小さいと720pに落とされる）ため、
   画面が許す限り大きく取って 1080p を選ばせる。 */
.yt-modal-inner {
  position: relative;
  width: min(1600px, 100%, calc((100vh - 5.5rem) * 16 / 9));
}
.yt-modal-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}
.yt-modal-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
/* プレーヤーの上に置くと縦を食って画質が落ちるので、画面右上に固定する */
.yt-modal-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: 40px; height: 40px;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff; font-size: 0.95rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s;
}
.yt-modal-close:hover { background: var(--foil-dark); }
.yt-modal-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.yt-modal-close::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
.yt-modal-cap {
  margin: 0.8rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cream);
}
body.yt-modal-open { overflow: hidden; }

@media (max-width: 600px) {
  .yt-modal-close { top: 0.6rem; right: 0.6rem; width: 34px; height: 34px; }
}
