/* ムービーを選ぶ（静的ページ） */

body {
  margin: 0;
  font-family: var(--font-sans);
  color: #0f0f0f;
  background: #ffffff;
}

/* 動画詳細ページ（movie-detail-page.css）と同仕様のヘッダー */
.movie-detail-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #ececec;
}

.movie-detail-header__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
}

.movie-detail-header__logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

/* index .site-header__logo と同仕様（1440px 基準の比例・上限 186px） */
.movie-detail-header__logo {
  width: clamp(58px, calc(100vw * 186 / 1440), 186px);
  max-width: 100%;
  height: auto;
  display: block;
}

/* index .site-header__cta と同仕様 */
.movie-detail-header__edit-link {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0 26px;
  border: 2px solid #222222;
  border-radius: 9999px;
  color: #222222;
  background: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.movie-detail-header__edit-link:hover {
  background: #f7f7f7;
}

/* ヘッダー＋SP用タブをビューポート上端に固定（sticky は親の overflow と相性が悪いため fixed） */
.select-movie-sticky-head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.select-movie-sticky-head .movie-detail-header {
  position: relative;
  top: auto;
  z-index: 1;
}

.select-movie-section-tabs-mount {
  width: 100%;
  box-sizing: border-box;
}

/* トップページのレーン「全ての◯◯ムービーを見る」からハッシュ遷移した際、
   セクション上端ぴったりではなく 80px 上に余白を取って着地させる。 */
#profile-movie-section,
#opening-movie-section {
  scroll-margin-top: 120px;
}

.select-movie-section-tabs {
  display: flex;
  gap: 4px;
  justify-content: center;
  align-items: stretch;
  padding: 8px 8px 2px;
  background: #fff;
  border-bottom: 1px solid #ececec;
}

.select-movie-section-tabs__btn {
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  color: #4d4d4d;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 8px 4px 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
}

@media (hover: hover) {
  .select-movie-section-tabs__btn:hover {
    color: #039aa5;
  }
}

.select-movie-section-tabs__btn.active {
  color: #039aa5;
  border-bottom-color: #039aa5;
}

@media (min-width: 768px) {
  .select-movie-section-tabs-mount {
    display: none !important;
  }

  /* PC: ムービーカード同士の間隔を少し広く（style.css の 26px 20px より） */
  .select-movie-page .other-movie-lane__grid {
    gap: 32px 28px;
  }

  /*
   * PC: 画像カルーセルは SP と同様、メイン 90%＋次スライドの見切れ（スライド間 8px）。
   */
  .select-movie-page .lp-rec-slide .movie-card__image-wrap {
    aspect-ratio: auto;
    background: #ffffff;
  }

  .select-movie-page .lp-rec-slide .image-carousel {
    position: relative;
    inset: auto;
  }

  .select-movie-page .lp-rec-slide .carousel-slider {
    height: auto;
    align-items: flex-start;
    background: #ffffff;
  }

  .select-movie-page .lp-rec-slide .carousel-slide {
    flex: 0 0 90%;
    min-width: 0;
    margin-right: 8px;
    height: auto;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .select-movie-page .lp-rec-slide .carousel-slide:last-child {
    margin-right: 0;
  }

  .select-movie-page .lp-rec-slide .carousel-slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: left center;
  }
}

.select-movie-page {
  min-height: 100vh;
  background: #ffffff;
}

/* ムービー一覧ブロック全体の左右余白（style.css の 16px を上書き） */
.select-movie-page .other-movies__inner {
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

/* lp-rec-slide 内カード：枠線・シャドウなし */
.select-movie-page .lp-rec-slide .movie-card {
  border: none;
  box-shadow: none;
  border-radius: 0;
  background: #ffffff;
}

/*
 * タイトルと画像の開始位置を揃えるため、
 * select-movie では movie-card__body の左右 padding をゼロにする。
 */
.select-movie-page .movie-card__body {
  padding: 0 0 24px;
}

/* 固定ヘッダー＋（SP のみ）タブぶんの余白 */
.select-movie-page > main {
  padding-top: 84px;
}

@media (max-width: 767px) {
  .select-movie-page > main {
    padding-top: 132px;
  }
}

.select-movie-hero {
  padding: 40px 16px 28px;
  text-align: center;
  background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
  border-bottom: 1px solid #eeeeee;
}

.select-movie-hero__inner {
  width: 1063px;
  max-width: 100%;
  margin: 0 auto;
}

.select-movie-hero__title {
  margin: 0;
  color: #0f0f0f;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.3;
}

.select-movie-hero__lead {
  margin: 16px 0 0;
  color: #1e1e1e;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
}

.select-movie-lane-lead {
  margin: 0 auto 8px;
  max-width: 720px;
  color: #1e1e1e;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  text-align: center;
}

/* index の .movie-card__image と同じ比率でカルーセル枠（上段は style.css の .movie-card に委ねる） */
.select-movie-page .movie-card__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f0f0f;
}

/* ----- 画像カルーセル（詳細ヒーローと同じ imgix スクリーンショット） ----- */
.select-movie-page .image-carousel {
  position: absolute;
  inset: 0;
  margin: 0;
}

/* style.css の .carousel-slider グローバル（口コミ用の ::before 250px・scroll-padding 等）を打ち消す */
.select-movie-page .carousel-slider {
  display: flex;
  overflow-x: auto;
  height: 100%;
  scroll-snap-type: x mandatory;
  scroll-padding-inline-start: 0;
  scroll-padding-inline-end: 0;
  gap: 0;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  box-sizing: border-box;
  padding-left: 0;
}

.select-movie-page .carousel-slider::before,
.select-movie-page .carousel-slider::after {
  content: none;
  display: none;
  flex: 0 0 0;
  width: 0;
  min-width: 0;
}

.select-movie-page .carousel-slider::-webkit-scrollbar {
  display: none;
}

.select-movie-page .carousel-slide {
  flex: 0 0 100%;
  margin-right: 0;
  scroll-snap-align: start;
  height: 100%;
  min-height: 0;
}

.select-movie-page .carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.select-movie-page .carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
}

.select-movie-page .carousel-nav svg {
  width: 22px;
  height: 22px;
}

.select-movie-page .carousel-nav.prev {
  left: 6px;
}

.select-movie-page .carousel-nav.next {
  right: 6px;
}

/*
 * SP のみ（max-width: 767px）。768px 以上は style.css の PC グリッドを絶対に上書きしない。
 */
@media (max-width: 767px) {
  .movie-detail-header__inner {
    padding: 10px 16px;
    gap: 10px 12px;
  }

  .movie-detail-header__logo {
    width: 148px;
    max-width: none;
  }

  .movie-detail-header__edit-link {
    margin-left: auto;
    min-height: 40px;
    padding: 0 16px;
    font-size: 13px;
  }

  .select-movie-hero {
    padding: 32px 16px 24px;
  }

  .select-movie-hero__title {
    font-size: 28px;
  }

  .select-movie-hero__lead {
    margin-top: 14px;
    padding: 0 4px;
    box-sizing: border-box;
  }

  .select-movie-page .other-movies,
  .select-movie-page .other-movies__inner {
    overflow-x: clip;
    max-width: 100%;
  }

  /*
   * グリッド自体は縦積みを維持。
   * 画像カルーセル：現スライドは左揃え（タイトルと同じ 16px インデント）、メイン幅 90%、スライド間 8px。
   */
  .select-movie-page .select-movie-lane__grid--sp-stack {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 16px;
    padding: 0;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0;
    overflow-x: hidden !important;
    overflow-y: visible;
    grid-template-columns: none !important;
  }

  .select-movie-page .select-movie-lane__grid--sp-stack > .lp-rec-slide {
    flex: none !important;
    flex-grow: 0 !important;
    flex-shrink: 1 !important;
    flex-basis: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
    grid-column: unset !important;
    scroll-snap-align: unset;
  }

  .select-movie-page .select-movie-lane__grid--sp-stack .lp-rec-slide .movie-card {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .select-movie-page .select-movie-lane__grid--sp-stack .movie-card__image-wrap {
    background: #ffffff;
    aspect-ratio: auto;
  }

  .select-movie-page .select-movie-lane__grid--sp-stack .image-carousel {
    position: relative;
    inset: auto;
  }

  .select-movie-page .select-movie-lane__grid--sp-stack .carousel-slider {
    height: auto;
    align-items: flex-start;
    scroll-padding-inline-start: 0;
    scroll-padding-inline-end: 0;
    background: #ffffff;
  }

  .select-movie-page .select-movie-lane__grid--sp-stack .carousel-slider::before,
  .select-movie-page .select-movie-lane__grid--sp-stack .carousel-slider::after {
    content: none;
    display: none;
    flex: 0 0 0;
    width: 0;
    min-width: 0;
  }

  .select-movie-page .select-movie-lane__grid--sp-stack .carousel-slide {
    /*
     * メイン画像は 90%、スライド間隔は 8px。
     */
    flex: 0 0 90%;
    min-width: 0;
    margin-right: 8px;
    height: auto;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  .select-movie-page .select-movie-lane__grid--sp-stack .carousel-slide:last-child {
    margin-right: 0;
  }

  .select-movie-page .select-movie-lane__grid--sp-stack .carousel-slide img {
    height: auto;
    aspect-ratio: 16 / 9;
    object-position: left center;
  }

  .select-movie-lane-lead {
    margin-bottom: 14px;
    padding: 0;
    box-sizing: border-box;
  }

  /* SPでは前へ/次へボタンを表示しない */
  .select-movie-page .carousel-nav {
    display: none !important;
  }

}
