/* 右下追従動画 */
#floating-video {
  position: fixed;
  bottom: 140px;
  right: 20px;
  width: 180px;
  height: auto;
  background-color: #000;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  z-index: 1000;
  border-radius: 8px;
  overflow: hidden;

  aspect-ratio: 16 / 9; 
}

#floating-video video{
  /*
  width: 180px;
  height: auto;
  */
   width: 100%;
  height: 100%;
  object-fit: cover;   /* or contain */
  display: block;
}
#floating-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  cursor: pointer;
}

#close-button {
  position: absolute;
  top: 4px;
  right: 6px;
  background: rgba(255, 255, 255, 0.8);
  border: none;
  font-size: 20px;
  line-height: 1;
  padding: 2px 6px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 1100;
}

/* オーバーレイ全画面 */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;

}


#overlay-video {
  width: 80vw;
  height: 45vw;
  max-width: 1280px;
  max-height: 720px;
  border: none;
}

#overlay-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  font-size: 30px;
  line-height: 1;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 50%;
  z-index: 2100;
}

.hidden {
  display: none!important;
}

#top_video {
  width: 100%;      /* 親要素の幅に合わせる */
  height: auto;     /* アスペクト比を保持 */
  max-width: 1280px; /* 必要に応じて最大幅を設定 */
  display: block;
  margin: 0 auto;    /* 中央寄せ */
}
