/* ＝＝＝＝＝＝＝＝＝＝＝
    全体リセット
＝＝＝＝＝＝＝＝＝＝＝ */
body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }
  
  
  /* ＝＝＝＝＝＝＝＝＝＝＝
      タイトル画像（1920×1080）
  ＝＝＝＝＝＝＝＝＝＝＝ */
  .title-page {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
  }
  
  .title-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  
  /* スマホ・タブレットで正方形表示 */
  @media (max-width: 768px) {
    .title-image {
      width: 100vw;
      height: 100vw; /* 正方形 */
      object-fit: cover;
      object-position: center; /* 横長画像の中央1080x1080を表示 */
    }
  }
  
/* ------------------------
   ページ共通
------------------------ */
.page {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
  }
  
  /* ------------------------
  フェードイン
  ------------------------ */
  .fadein-image {
    width: 90%;
    height: 100vh;
    object-fit: cover;
    opacity: 0;
    animation: fadeIn 2s ease forwards;
  }
  /* スマホ・タブレットで正方形にする */
@media (max-width: 768px) {
    .fadein-image {
      width: 100vw;       /* 画面幅いっぱい */
      height: 100vw;      /* 幅と高さを同じにして正方形 */
      object-fit: cover;  /* 中央1080x1080部分が表示される */
      object-position: center;
    }
  }
  
  @keyframes fadeIn {
    to { opacity: 1; }
  }
  
/* ------------------------
     パララックス
  ------------------------ */
/* 3ページ目パララックス共通 */
.parallax-container {
    position: relative;
    width: 100%;
    height: 100vh;  /* PCはビューポート全体 */
    overflow: hidden;
  }
  
  /* レイヤー共通 */
  .layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;   /* cover→containに変更 */
    object-position: center;
    transition: transform 0.1s linear;
  }
  
  
  /* スマホ・タブレットで正方形表示 */
  @media (max-width: 768px) {
    .parallax-container .layer {
      width: 100vw;
      height: 100vw; /* 正方形 */
      object-fit: cover;
      object-position: center; /* 横長画像の中央1080x1080を表示 */
    }
  }
  /* ------------------------
     背景画像＋ボタン
  ------------------------ */

.page4 {
  position: relative;
  width: 100%;
  height: 100%;
}
.bg-image {
  position: relative;
    width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: center;
  }
 .next-image {
    position: absolute;
    width: 500px;
    height: 800px;
    object-fit: cover;
    object-position: center;
    cursor: pointer;
    z-index: 2;
  }
    /* スマホ・タブレットで正方形表示 */
     @media (max-width: 768px) {
       .page4 {
        width: 100vw;
        height: 100vw; /* 正方形 */
        object-fit: cover;
        object-position: center; /* 横長画像の中央1080x1080を表示 */
      }}
    @media (max-width: 768px) {
       .bg-image {
        width: 100%;
        height: 100%; /* 正方形 */
        object-fit: cover;
        object-position: center; /* 横長画像の中央1080x1080を表示 */
      }
    }
    @media (max-width: 768px) {
       .next-image {
        width: 100%;
        height: 100%; /* 正方形 */
        object-fit: cover;
        object-position: center; /* 横長画像の中央1080x1080を表示 */
        cursor: pointer;
        overflow: hidden;
        z-index: 2;
      }
    }
  
  /* ------------------------
   画像拡大フェードイン
------------------------ */
.zoom-fadein {
    width: 80%;
    height: 100vh;
    overflow: hidden;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transform: scale(1);
    transition: transform 1.5s ease, opacity 1.5s ease;
  }
  
  /* スマホ・タブレット正方形対応 */
  @media (max-width: 768px) {
    .zoom-fadein {
      width: 100vw;
      height: 100vw;
      object-fit: cover;
      object-position: center;
    }
  }
  

  /* ------------------------
   共通フェードイン（スクロールで発火）
------------------------ */
.fadein-on-scroll {
    width: 100%;
    height: 100%;
    position: relative;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.5s ease, transform 1.5s ease;
  }
  
  /* スマホ・タブレット正方形表示 */
  @media (max-width: 768px) {
    .fadein-on-scroll {
      width: 100%;
      height: 100vw;
      position: relative;
      object-fit: cover;
      object-position: center;
    }
  }

  .fadein-on-10 {
    width: 90%;
    height: 100%;
    position: relative;
    object-fit: cover;
    object-position: center;
  }
  
  /* スマホ・タブレット正方形表示 */
  @media (max-width: 768px) {
    .fadein-on-10 {
      width: 100%;
      height: 100vw;
      position: relative;
      object-fit: cover;
      object-position: center;
    }
  }
 
/* ------------------------
   11.12
------------------------ */
/* 画像を画面フル表示（PC） */
.pc-full-image {
  width: 90%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ページを余白なく縦に連結 */
.page-group {
  margin: 0;
  padding: 0;
}

  /* スマホ・タブレット正方形表示 */
  @media (max-width: 768px) {
    .pc-full-image {
      width: 100vw;
      height: 100vw;
      object-fit: cover;
      object-position: center;
    }
  }

  /* ------------------------
     分岐後
    ------------------------ */


/* 正方形フレーム */
.square-frame {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

/* スマホは正方形 */
@media (max-width: 768px) {
  .square-frame {
    height: 100vw;
  }
}

/* 背景画像 */
.square-frame > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* 選択肢 */
.choice-images {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: row;
  gap: 16px;          /* ← ここで間隔を制御 */
  align-items: center;
  z-index: 2;

  width: 100%;
  max-width: 1200px;
  justify-content: center;
}

/* ボタン画像 */
.choice-images img {
  width: 30%;
  max-width: 350px;
  height: auto;
  cursor: pointer;
}

/* スマホ */
@media (max-width: 768px) {
  .choice-images img {
    width: 100%;
    gap: 8px;          /* ← ここで間隔を制御 */
  }
}
.choice-images img {
    width: 30%;
}

.route.page {
  display: none;
}

.route.page.active {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

  /* ------------------------
  フェードイン
  ------------------------ */
.fadein-on-scroll {
  width: 90%;
  height: 100vh;
  object-fit: cover;

  opacity: 0;
  transform: scale(0.9);
  transition: opacity 2s ease, transform 2s ease;
}

/* スマホ */
@media (max-width: 768px) {
  .fadein-on-scroll {
    width: 100vw;
    height: 100vw;
    object-position: center;
  }
}
  
/* ------------------------
     パララックス
  ------------------------ */
/* 3ページ目パララックス共通 */
.route.parallax-container {
    position: relative;
    width: 100%;
    height: 100vh;  /* PCはビューポート全体 */
    overflow: hidden;
  }
  
  /* レイヤー共通 */
  .route.parallax-container.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;   /* cover→containに変更 */
    object-position: center;
    transition: transform 0.1s linear;
  }
  
  
  /* スマホ・タブレットで正方形表示 */
  @media (max-width: 768px) {
    .route.parallax-container .layer {
      width: 100vw;
      height: 100vw; /* 正方形 */
      object-fit: cover;
      object-position: center; /* 横長画像の中央1080x1080を表示 */
    }
  }


  /* ------------------------
     PC限定ナビボタン
    ------------------------ */
  .pc-nav {
    display: none;
  }
  
  @media (min-width: 1080px) {
    .pc-nav {
      display: block;
      gap: 20px;
      position: absolute;
      bottom: 40%;
      left: 90%;
      transform: translateX(-50%);
    }
  
    .pc-nav{
      padding: 12px 20px;
      border: none;
      border-radius: 8px;
      font-size: 16px;
      cursor: pointer;
      z-index: 2;
    }
  }
  /* ------------------------
     restartナビボタン
    ------------------------ */
  .restart-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    max-width: 70vw;     /* 好きなサイズに調整 */
    cursor: pointer;
    z-index: 10;
  }

  .restart-btn:hover {
    opacity: 0.85;
  }
  
  .restart-btn:active {
    transform: translateX(-50%) scale(0.96);
  }
  
  
  .page-img,
.layer {
  pointer-events: none;
}
  /* スマホ微調整 */
  @media (max-width: 768px) {
    .restart-btn {
      bottom: 50px;
      width: min(80vh, 80vw);  
    }
  }
    /* ------------------------
     PC限定ナビボタン
    ------------------------ */
  .route.pc-nav {
    display: none;
  }
  
  @media (min-width: 1080px) {
    .route.pc-nav {
      display: block;
      gap: 20px;
      position: absolute;
      bottom: 40%;
      left: 90%;
      transform: translateX(-50%);
    }
  
    .route.pc-nav{
      padding: 12px 20px;
      border: none;
      border-radius: 8px;
      font-size: 16px;
      cursor: pointer;
      z-index: 2;
    }
  }