body {
  position: relative;
  min-height: 100vh;
  background-color: #fcf8ec;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url("../img/bg.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: -1;
  pointer-events: none;
}

/* ==========================================================================
ヘッダー
========================================================================== */
.logo {
  width: 25%;
  padding: 0.5rem;
}

header h1 {
  opacity: 0;
  filter: blur(12px);
  transform: scale(1.05);
  animation: statelyReveal 3.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  margin-block-start: 1.5rem; /* 論理プロパティによる余白管理 */
  margin-inline: auto;
  text-align: center;
  margin: 10px;
}

h1 img {
  margin: 0 auto;
}

@keyframes statelyReveal {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

/* ==========================================================================
放送日時
========================================================================== */
.broadcast-date {
  white-space: nowrap; /* スマホ時改行不可 */
  text-align: center;
  font-size: var(--font-size-xlarge);
  margin-bottom: 1rem; /* 必要であれば下の要素との間隔調整 */
}

/* 強調したい数字のスタイル */
.broadcast-date .num-highlight {
  font-size: 1.6em;
  color: #e60012;
  font-weight: bold;
}

/* ==========================================================================
main 囲み
========================================================================== */
main {
  padding: 15px;
}

/* ==========================================================================
見出し
========================================================================== */
h2 {
  font-size: var(--font-size-xxlarge);
  color: var(--color-text-main);
  font-family: "Shippori Mincho", serif;
  text-align: center;
  margin-bottom: 1rem;
}

h3 {
  text-align: center;
}

/* ==========================================================================
共通
========================================================================== */
.pc-only {
  display: none;
}
.sp-only {
  display: block;
}
.color_accent {
  color: var(--color-accent);
}

/* ==========================================================================
番組概要
========================================================================== */
.responsive-text-container {
  text-align: left;
  font-size: var(--font-size-medium);
}

.pc-br {
  display: inline;
}

/* ==========================================================================
フッター
========================================================================== */
.footer {
  inline-size: 100%; /* 物理的な width: 100% ではなく、論理プロパティを使用 */
  padding-block: var(--s-4); /* 上下 1.5rem */
  padding-inline: var(--s-3); /* 左右 1rem */
  text-align: center;
  background-color: var(--secondary-bg-color);
}

.footer p {
  margin: 0;
  color: var(--color-text-inverse);
}

.footer small {
  font-size: var(--font-size-small);
  line-height: 1.5;
  display: flex; /* Flexboxを使って「画面が狭い時だけ自然に折り返す」 */
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.5ch; /* 各要素の間に半角スペース1つ分(0.5ch)の隙間を空ける */
}

.footer .rights {
  white-space: nowrap; /* "All rights reserved" の単語の途中で変な改行が起きるのを防ぐ */
}

/* ==========================================================================
出演者写真
========================================================================== */
.cast-wrapper {
  display: grid;
  place-items: center;
}

.castname {
  font-size: var(--font-size-medium);
}

.cast {
  padding-inline: 0;
  margin-block: 0;
  list-style: none;
  width: min(100%, 90vw);
}

.cast img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-inline: auto;
  border-radius: 8px;
}

/* ==========================================================================
   カルーセルUI（矢印・ドット）
========================================================================== */
.carousel-wrapper {
  position: relative; /* 矢印などを配置する基準にする */
  margin-block: 2rem;
}

/* --- 左右の矢印ボタン --- */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  cursor: pointer;
  z-index: 10;

  /* すりガラス効果で高級感を演出（背景が少し透けてぼやける） */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);

  /* 矢印のアイコン（CSSで描画するので画像不要） */
  display: flex;
  justify-content: center;
  align-items: center;
}

.carousel-btn::before {
  content: "";
  width: 10px;
  height: 10px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
}

/* 左矢印の向きと位置 */
.carousel-btn.prev {
  left: 10px;
}
.carousel-btn.prev::before {
  transform: rotate(-135deg);
  margin-left: 4px;
}

/* 右矢印の向きと位置 */
.carousel-btn.next {
  right: 10px;
}
.carousel-btn.next::before {
  transform: rotate(45deg);
  margin-right: 4px;
}

/* --- 下部のドットナビゲーション --- */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-block-start: 1rem; /* 画像との隙間 */
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;

  /* 変更点：半透明の白にして、どんな背景でも馴染むようにする */
  background-color: rgba(26, 26, 26, 0.2);

  /* 追加：背景が白っぽい画像だった場合でも見えるように、うっすら影を落とす */
  box-shadow:
    0 0 0 2px #fcf8ec,
    0 2px 4px rgba(0, 0, 0, 0.1);

  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

/* 現在表示されている画像のドットだけ横に伸びる */
.carousel-dot.is-active {
  width: 24px;
  /* 変更：アクティブなドットは「墨色」または「お茶や老舗を連想させる色」に。
     ここでは重厚感のある濃いグレー（#1a1a1a）を指定。
     もしお茶感を出したいなら #4b5a2e（濃松葉色）なども美しいです。 */
  background-color: #4b5a2e;

  /* アクティブ時は影を少し強くして「押されている感」を出す */
  box-shadow:
    0 0 0 2px #404c27,
    0 4px 8px rgba(0, 0, 0, 0.2);
}

.teaser {
  display: flex;
  gap: 1rem;
  padding-inline: 0;
  margin-block: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.teaser::-webkit-scrollbar {
  display: none;
}

.teaser li {
  flex: 0 0 100%;
  scroll-snap-align: center;
  margin-block-end: 0;
}

.teaser img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* ==========================================================================
店舗情報
========================================================================== */

/* 各店舗アイテムの共通スタイル */
.shop-item {
  border: 1px solid #ddd;
  padding: 1rem;
  margin-bottom: 2rem;
  /* モバイル時：section内の要素をflexで制御 */
  display: flex;
  flex-wrap: wrap; /* 要素がはみ出たら折り返す */
}

/* モバイル時：画像を横並びにする */
.shop-item img {
  width: 50%; /* 画像2つでちょうど100%になるように */
  height: 120px; /* 高さを揃える */
  object-fit: cover; /* 画像の比率を保ったまま領域を埋める */
  box-sizing: border-box; /* paddingを幅に含める */
  padding: 0.2rem;
}

/* h4とulは画像の後に表示 */
.shop-item h4,
.shop-item ul {
  width: 100%; /* 横幅を100%にして、画像の下に回り込ませる */
  margin-top: 1rem;
}

/* ulのデフォルトスタイルをリセット */
.shop-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
}

.shop-item h4 {
  margin: 1rem 0 0.5rem 0;
}

.shop-item li {
  margin-bottom: 0.5rem;
}

.shop-item li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #333;
  transition: color 0.2s;
  word-break: break-all;
  min-width: 0;
}

.shop-item li a:hover {
  text-decoration: underline;
}

/* ==========================================================================
見逃し配信
========================================================================== */
.haishin {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding: 16px;
  box-sizing: border-box; /* 【追加】はみ出し防止 */
  width: 100%; /* 【追加】はみ出し防止 */
  /* モバイルでのレイアウト設定 */
  flex-direction: column;
  align-items: center;
}

.haishin > ul {
  background-color: #0ea5e9; /* sky-500 */
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100px;
  border-radius: 8px;
  flex-shrink: 0;
  font-weight: 500;
  box-sizing: border-box;
  /* モバイルでの幅設定 */
  width: 100%;
  max-width: 500px; /* 縦並びの時の最大幅 */
}

/* ==========================================================================
Googleフォント
========================================================================== */
.shippori-mincho-regular {
  font-family: "Shippori Mincho", serif;
  font-weight: 400;
  font-style: normal;
}

.shippori-mincho-medium {
  font-family: "Shippori Mincho", serif;
  font-weight: 500;
  font-style: normal;
}

.shippori-mincho-semibold {
  font-family: "Shippori Mincho", serif;
  font-weight: 600;
  font-style: normal;
}

.shippori-mincho-bold {
  font-family: "Shippori Mincho", serif;
  font-weight: 700;
  font-style: normal;
}

.shippori-mincho-extrabold {
  font-family: "Shippori Mincho", serif;
  font-weight: 800;
  font-style: normal;
}

/* ==========================================================================
タブレット以上
========================================================================== */
@media (min-width: 768px) {
  body {
    font-size: var(--font-size-large);
  }

  .pc-only {
    display: block;
  }

  .sp-only {
    display: none;
  }

  .logo {
    width: 768px;
    margin: 10px auto;
  }

  .logo img {
    width: 125px;
  }

  h1 img {
    max-width: 600px;
  }

  h2 {
    font-size: var(--font-size-xxlarge);
  }

  main {
    max-width: 900px;
    margin: 0 auto;
  }

  .responsive-text-container {
    text-align: center;
    font-size: var(--font-size-large);
    line-height: 1.8;
  }

  .pc-br {
    display: block;
  }

  .castname {
    font-size: var(--font-size-large);
  }

  /* PC時：店舗リスト全体をflexにして横並びにする */
  .shop-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* アイテム間の隙間を指定 */
  }

  /* PC時：各店舗アイテムを2列で表示 */
  .shop-item {
    flex: 1 1 calc(50% - 20px); /* 隙間を考慮して幅を計算 */
    margin-bottom: 0; /* モバイル用に指定したflexを解除し、通常のブロック要素の挙動に戻す */
    display: block;
  }

  /* PC時：画像を縦並びにする */
  .shop-item img {
    width: 100%; /* 幅を100%にして縦に並べる */
    height: 200px; /* PC用に高さを調整 */
    padding: 0;
    margin-bottom: 0.5rem; /* 画像間の余白 */
  }

  .haishin {
    flex-direction: row;
    align-items: center;
  }

  .haishin li {
    width: 250px;
  }

  .haishin > ul {
    width: calc(33.333333333333336% - 10.666666666666666px);
    max-width: none;
  }

  .teaser {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    overflow-x: visible;
  }
  .teaser li {
    flex: auto;
  }

  /* PCは3列グリッドで全画像が見えるため、スライダーUIは隠す */
  .carousel-btn,
  .carousel-dots {
    display: none;
  }
}

/* ==========================================================================
デスクトップ以上（1024px)
========================================================================== */
@media (min-width: 1024px) {
  .broadcast-date {
    font-size: var(--font-size-xxlarge);
  }

  .logo {
    width: 960px;
    margin: 10px auto;
  }
}

/* ==========================================================================
デスクトップ以上（1280px)
========================================================================== */
@media (min-width: 1280px) {
  body {
    font-size: var(--font-size-xlarge);
  } /* 20px相当 */

  h2 {
    font-size: 2.5rem;
  }
}
