@charset "utf-8";

/*----------------------------------------------------
  メインビジュアル内フローティングバナー（位置）
----------------------------------------------------*/
.fix_banner_top {
  bottom: 20px;
  font-size: 30%;
  position: fixed;
  right: 20px;
  z-index: 10010; /* ★明示：最前面グループ */
  width: 310px;
  max-width: 580px;
}
.fix_banner_top3 {
  bottom: 220px;
  font-size: 30%;
  position: fixed;
  right: 20px;
  z-index: 10010; /* ★明示 */
  width: 310px;
  max-width: 580px;
}
.fix_banner_top img,
.fix_banner_top3 img {
  width: 100%;
}

@media (max-width: 980px) {
  .fix_banner_top {
    top: inherit;
    bottom: 80px;
    right: 10px;
    width: 45%;
    position: fixed;
    z-index: 10010;
  }
  .fix_banner_top3 {
    top: inherit;
    bottom: 80px;
    left: 10px;
    width: 45%;
    position: fixed;
    z-index: 10010;
  }
}

/* top2（中央ポップアップ）※初期から表示したい */
.fix_banner_top2 {
  top: 10%;
  position: fixed;
  left: 25%;
  right: 25%;
  width: 100%;
  font-size: 70%;
  padding: 30px 40px 10px;
  border: solid 4px #b79b5b;
  background: #ede6d6;
  max-width: 500px;
  margin: 0 auto;
  z-index: 10005; /* ★オーバーレイより上、top/top3より少し下 */
  /* 初期表示のため：常に見える状態に固定 */
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0,0,0);
}
.fix_banner_top2 img { width: 100%; }

@media (max-width: 980px) {
  .fix_banner_top2 {
    top: 10%;
    left: 3%;
    right: 3%;
    width: 94%;
    position: fixed;
    padding: 15px 20px 15px;
    font-size: 85%;
  }
  .fix_banner_top2 video.topMoive {
    padding-top: 0px;
    margin-bottom: 0px;
  }
}

/*----------------------------------------------------
  既存：別用途のフローティングバナー（そのまま）
----------------------------------------------------*/
.fix_banner {
  top: 10%;
  font-size: 60%;
  position: fixed;
  right: 10px;
  z-index: 996;
  width: 100%;
  max-width: 260px;
}
.fix_banner img { width: 100%; }
@media (max-width: 980px) {
  .fix_banner {
    top: 15%;
    right: 10px;
    z-index: 996;
    width: 40%;
    position: fixed;
  }
}

/*----------------------------------------------------
  閉じるボタン
----------------------------------------------------*/
.bn_close {
  position: absolute;
  display: inline-block;
  top: -10px;
  right: -10px;
  width: 48px;
  height: 48px;
  border: 0;
  background-color: black;
  border-radius: 48px;
  margin: 0;
  padding: 0;
  transform: scale(0.54);
  cursor: pointer;
  z-index: 10020; /* ★どのバナーでも必ず押せるよう最前面 */
}
.bn_close:before,
.bn_close:after {
  content: "";
  position: absolute;
  display: inline-block;
  bottom: 6px;
  left: 19px;
  width: 8px;
  height: 36px;
  border: 0;
  margin: 0;
  padding: 0;
  background-color: white;
}
.bn_close:before { transform: rotate(45deg); }
.bn_close:after  { transform: rotate(-45deg); }
.bn_close:hover { background-color: red; }

@media (max-width: 980px) {
  .bn_close {
    top: -15px;
    right: -15px;
    transform: scale(0.62);
  }
}

/*----------------------------------------------------
  オーバーレイ（top2用）
  ★重要：初期は「見えない＆触れない」
----------------------------------------------------*/
.floating-banner-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
}

.floating-banner-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);

  opacity: 0;
  pointer-events: none;     /* ★初期はクリックを邪魔しない */
  transition: opacity 0.3s;

  z-index: 10000;           /* ★top2(10005)の下 */
}

/* 表示時だけ「見える＆触れれる」 */
.floating-banner-overlay.is-show {
  opacity: 1;
  pointer-events: auto;     /* ★表示中だけクリック可能 */
}

/*----------------------------------------------------
  スクロールでスライドイン＋フェード（共通）
  ※対象は top / top3 のみ（top2は初期表示）
----------------------------------------------------*/
/* スライド量：ここで調整 */
:root{
  --slidePc: 120%;
  --slideSp: 120%;
}

/* 初期は非表示（透明＋画面外） */
.fix_banner_top,
.fix_banner_top3{
  opacity: 0;
  pointer-events: none;
  transition: transform .6s ease, opacity .6s ease;
  will-change: transform, opacity;
}

/* 表示状態（top/top3のみ） */
.fix_banner_top.is-show,
.fix_banner_top3.is-show{
  opacity: 1;
  transform: translate3d(0,0,0);
  pointer-events: auto;
}

/* ★重要：PC/SPの transform 指定は「is-show じゃない時だけ」適用する */
/* PC：右から（非表示時） */
.fix_banner_top.pc:not(.is-show),
.fix_banner_top3.pc:not(.is-show){
  transform: translate3d(var(--slidePc), 0, 0);
}

/* SP：下から（非表示時） */
.fix_banner_top.sp:not(.is-show),
.fix_banner_top3.sp:not(.is-show){
  transform: translate3d(0, var(--slideSp), 0);
}

/*----------------------------------------------------
  既存の fade-in アニメ（必要なら残す）
----------------------------------------------------*/
.fade-in { animation: fadeInOverlay 1.0s ease forwards; }
@keyframes fadeInOverlay {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* fade-in（既存運用）でもタップを拾うようにする */
.floating-banner-overlay.fade-in{
  pointer-events: auto;
}