/* ==========================================================================
   1. 基本リセット & ルート設定
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* モバイルでのタップ時の青いハイライトを無効化 */
  -webkit-tap-highlight-color: transparent;
}

body {
  color: white;
  font-family: sans-serif;
  /* 画面からはみ出る要素を隠し、ボディ全体のスクロールを禁止 */
  overflow: hidden;
}

/* ==========================================================================
   8. ヘッダーメニュー
   ========================================================================== */ 
/* ヘッダー固定 */
.fixed-top-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  /* デフォルト：通常ページ（白背景・不透明） */
  background-color: #fff; 
  transition: background-color 0.3s ease;
  pointer-events: none; /* 背後の動画スワイプを邪魔しない */
}
/* 灰色背景モード（あしあと・さがす用） */
.fixed-top-nav.is-gray-mode {
  background-color: var(--bg-color-light); /* 薄い灰色 */
}
/* おすすめ（ビデオモード）時：透明にしてグラデーションをかける */
.fixed-top-nav.is-video-mode {
  background-color: transparent;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 100%);
}

.nav-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 50px;
  overflow-x: auto; /* 横スクロールを許可 */
  white-space: nowrap; /* 改行禁止 */
  scrollbar-width: none; /* Firefox用 */
  -webkit-overflow-scrolling: touch; /* iOSスムーズスクロール */
  pointer-events: auto; /* ここが重要：メニューエリアはクリック可能にする */
  padding: 0 20px; /* 左右端に少し余白を作る */
}

.nav-menu::-webkit-scrollbar {
  display: none; /* Chrome/Safari用スクロールバー非表示 */
}

/* 通常時（あしあと、さがす等：黒文字） */
.nav-item {
  flex: 0 0 auto; /* 幅を縮めない */
  padding: 0 18px 10px; /* 少し間隔を広げる */
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  color: rgba(0,0,0,0.5);
}
.nav-item.active {
  color: #000; /* 真っ黒 */
}
.nav-underline {
  position: absolute;
  bottom: 14px;
  left: 0; /* 起点を左端に固定 */
  height: 2px;
  background-color: #fff;
  border-radius: 2px;
  pointer-events: none;
  z-index: 1;
  /* transitionはJSで制御するため、基本はOFFまたは最小限にする */
  transition: transform 0.05s linear, width 0.05s linear;
}

/* JavaScriptで「手動スワイプ中」であることを示すクラスを付ける場合の予備 */
.is-dragging .nav-underline {
  transition: none;
}

/* 【重要】動画ページ用（白モード：動画背景用） */
.is-video-mode .nav-item {
  color: rgba(255, 255, 255, 0.7); /* 薄い白 */
}
.is-video-mode .nav-item.active {
  color: #fff; /* 真っ白 */
}
.is-video-mode .nav-underline {
  background-color: #fff; /* 白いバー */
}
/* おすすめページ時は少し暗いグラデーションを入れて文字を見やすくする */
.is-video-mode {
  background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 100%);
}

/* 基本：通常モード（黒） */
.fixed-top-nav .nav-underline {
  background-color: #000; /* デフォルトは黒 */
  transition: transform 0.1s linear, width 0.1s linear, background-color 0.3s ease;
}

/* ビデオモード（白） */
.fixed-top-nav.is-video-mode .nav-underline {
  background-color: #fff; /* おすすめページでは白 */
}

/* アイテムの色も同様に */
.fixed-top-nav .nav-item { color: rgba(0,0,0,0.5); }
.fixed-top-nav .nav-item.active { color: #000; }

.fixed-top-nav.is-video-mode .nav-item { color: rgba(255,255,255,0.6); }
.fixed-top-nav.is-video-mode .nav-item.active { color: #fff; }


/* ==========================================================================
   2. レイアウト構造 (水平スワイプ)
   ========================================================================== */
.horizontal-wrapper {
  display: flex;
  width: 100vw;
  height: 100dvh;
  /* 横方向のスナップスクロールを有効化 */
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* スクロールバーを非表示 (Firefox) */
  scrollbar-width: none;
  scroll-behavior: smooth;
}

/* Chrome, Safari, Edge用のスクロールバー非表示設定 */
.horizontal-wrapper::-webkit-scrollbar {
  display: none;
}

/* スクロールコンテナの初期状態 */
#main-h-scroll {
  opacity: 0;
  transition: opacity 0.3s ease; /* パッと出すためのアニメーション */
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory; /* スナップさせている場合 */
  gap: 0; 
  margin: 0;
  padding: 0;
}

/* 表示用クラス */
#main-h-scroll.is-visible {
  opacity: 1;
}

.h-page {
  flex: 0 0 100%; /* 1画面分の幅を確保 */
  width: 100%;
  height: 100dvh;
  box-sizing: border-box;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto; /* ページ内は縦スクロール可能に */
  background: var(--bg-color);
}
#page-find,
#page-tracks {
  background-color: var(--bg-color-light);
  margin-top: 50px;
  height: calc(100dvh - 50px);
}
#page-feed {
  background-color: var(--bg-color);
}

#loading,
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background-color: rgba(255, 255, 255, 0.8); /* 背景を少し透過させると自然です */
  z-index: 9999;
  /* デフォルトは隠す */
  display: none;
}
/* 読み込み中だけこのクラスをJSでつける */
#loader.active,
#loading.active {
  display: flex;
  justify-content: center;
  align-items: center;
}
/* 子要素：画像のサイズを指定 */
#loader img,
#loading img {
  width: 150px;
  height: 150px;
  object-fit: contain; /* 画像が歪まないように調整 */
}

/* ==========================================================================
   3. フィード & ビデオカード (垂直スワイプ)
   ========================================================================== */
.feed-container {
  width: 100%;
  height: 100dvh;
  /* 縦方向のスナップスクロールを有効化 */
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.feed-container::-webkit-scrollbar {
  display: none;
}

.video-card {
  width: 100vw;
  height: 100dvh; /* 必須：中身が空でも高さを維持 */
  position: relative;
  overflow: hidden;
  background: #000; /* 読み込み中も黒背景を維持 */
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

/* 動画の埋め込みエリア（iframeを全画面に広げて調整） */
.video-wrapper {
  width: 100%;
  height: 100dvh;
}
.video-wrapper[rel=x] {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: #fff;
  overflow: hidden;
}

.video-wrapper iframe {
  width: 100%;
  height: 100dvh;
  pointer-events: none; /* 動画への直接操作を防ぎスワイプを優先 */
  transform: scale(1.2); /* 左右の黒帯を消すための拡大調整 */
  border: none;
}
.video-wrapper[rel=x] iframe {
  width: 100%;
  height: 100dvh;
  pointer-events: auto; /* 動画への直接操作を防ぎスワイプを優先 */
  transform: scale(1); /* 左右の黒帯を消すための拡大調整 */
  border: none;
}

/* 2. X公式の550px制限を強制上書き */
/* ※生成されたiframeやblockquoteの幅を100%にする */
/* Xが生成するすべての要素の幅制限を解除 */
.video-wrapper .twitter-tweet,
.video-wrapper .twitter-tweet-rendered {
  width: 100% !important;   /* もしくは任意の最大幅 */
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: auto !important; /* 動画への直接操作を防ぎスワイプを優先 */
  transform: scale(1) !important; /* 左右の黒帯を消すための拡大調整 */
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   4. UIレイヤー (オーバーレイ・操作系)
   ========================================================================== */
.ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* コンテンツを下寄せ */
  padding-bottom: 30px;
  pointer-events: none; /* 背後の動画スワイプを邪魔しない */
}

/* 右側のアイコン一覧（いいね、コメント等） */
.sidebar {
  position: absolute;
  right: 12px;
  bottom: 100px;
  /*display: flex;*/
  display: none;
  flex-direction: column;
  gap: 20px;
  pointer-events: auto; /* ボタン類はクリック可能に */
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.action-item i {
  font-size: 32px;
  margin-bottom: 4px;
}

/* 左下の動画情報（ユーザー名、キャプション） */
.video-footer {
  padding: 0 80px 20px 15px; /* 右側はサイドバーと被らないよう広めに余白 */
  pointer-events: auto;
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* ==========================================================================
   5. コンポーネント (ページヘッダー、バッジ、タグ)
   ========================================================================== */
.page-header {
  padding: 50px 15px 15px;
  font-weight: bold;
  text-align: center;
  border-bottom: 0.5px solid #262626;
  position: sticky;
  top: 0;
  background: #000;
  z-index: 100;
}

/* リンクバッジ（左上の赤いタグ） */
.video-link-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: #ff3b5c;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  pointer-events: auto;
}

/* 「見つける」ページ用共通パーツ */
.section-title {
  font-size: 15px;
  margin: 20px 15px 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hash-tag, .area-chip {
  background: #262626;
  color: #ccc;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  flex: 0 0 auto;
}

.genre-tag {
  background: #1a1a1a;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  border: 0.5px solid #333;
}

#content-detail .filter-tag,
.filter-tag {
  background: #f5f5f5;
  color: #333;
  padding: 4px 12px;
  border-radius: 20px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
  #content-detail .filter-tag:hover,
  #content-detail .filter-tag.active,
  .filter-tag:hover,
  .filter-tag.active {
    background: #999;
    color: #fff;
  }

/* ==========================================================================
   6. コンテンツページ
   ========================================================================== */
.fixed-top {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-light);
}
  .fixed-top header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 5%;
  }
  #page-content .fixed-top header {
    padding-top: 50px;
  }
  .fixed-top .logo {
    font-size: 1.25rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-color);
  }
  /* お気に入りボタン */
  .fixed-top .bookmark-trigger {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Tabs */
  .fixed-top .tabs {
    display: flex;
    justify-content: center;
  }
    #filter .fixed-top .tabs {
      margin-top: 50px;
    }
  .fixed-top .tab-item {
    position: relative;
    padding: 0 25px 3px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
  }
  .fixed-top .tab-item.active {
    color: var(--primary-color);
    font-weight: 700;
  }
  .fixed-top .tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 2px;
    background: var(--primary-color);
  }

  /* 絞り込み用ハッシュタグ */
  .fixed-top .tag-bar {
    display: flex;
    overflow-x: auto;
    padding: 10px 5% 5px;
    gap: 8px;
    white-space: nowrap;
    display: none;
  }
  .fixed-top .tag-bar::-webkit-scrollbar {
    display: none;
  }

  /* Viewport */
  #filter,
  #content-detail,
  #content {
    position: relative;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
  }

  .main-viewport {
    height: calc(100dvh - 88px);
    overflow: hidden;
  }
  .filter-viewport {
    height: calc(100dvh - 27px);
    padding-top: 5px;
    overflow: hidden;
  }
  .filter-slider,
  .content-slider {
    display: flex;
    width: 300%;
    height: 100dvh;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .filter-slider {
    padding-bottom: 30px;
  }
  .page-section {
    width: 33.333%;
    height: 100dvh;
    overflow-y: auto;
  }

    /* Grid & Cards */
    .page-section .grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      padding: 3px 15px;
      max-width: 800px;
      margin: 0 auto;
    }
    #content-detail #section-1,
    #content #section-1 {
      padding-top: 15px;
    }

    #content-detail #section-0,
    #content-detail #section-1 {
      height: calc(100dvh - 82px);
    }
    #content-detail #section-2 {
      height: calc(100dvh - 132px);
    }

    #content #section-0,
    #content #section-1 {
      height: calc(100dvh - 122px);
    }
    #content #section-2 {
      height: calc(100dvh - 172px);
    }
    
    #content-detail .page-section .grid,
    #page-content .page-section .grid,
    .filter-slider .page-section .grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      padding: 3px 15px;
      max-width: 800px;
      margin: 0 auto;
    }
    .page-section .card {
      background: #fff;
      border-radius: 12px;
      overflow: hidden;
      cursor: pointer;
      position: relative;
      padding-top: 5px;
      transition: opacity 0.3s;
    }
    .page-section .spot {
      background: #fff;
      overflow: hidden;
      border-radius: 12px;
      cursor: pointer;
      position: relative;
      margin-top: 10px;
      transition: opacity 0.3s;
    }
    .page-section .chirashi,
    .page-section .content {
      background: #fff;
      overflow: hidden;
      border-radius: 12px;
      cursor: pointer;
      position: relative;
      margin-top: 10px;
      transition: opacity 0.3s;
    }
    .page-section .snap {
      background: #fff;
      overflow: hidden;
      cursor: pointer;
      position: relative;
      padding-top: 5px;
      transition: opacity 0.3s;
    }
      .page-section .snap .card-tag {
        display: none;
      }
    .page-section .card-img {
      width: 100%;
      aspect-ratio: 1/1;
      background: #f8f8f8 center/cover;
    }
      .page-section .snap .card-img {
        border-radius: 12px;
        aspect-ratio: 1/1.2;
        background-size: auto 150%;
        background-position: center center;
        background-repeat: no-repeat;
      }
      .page-section .chirashi .card-img,
      .page-section .spot .card-img,
      .page-section .content .card-img {
        aspect-ratio: 1/1.2;
        background-size: auto 150%;
        background-position: center center;
        background-repeat: no-repeat;
        position: relative;
      }
      /* コンテンツ詳細のチラシ表示用 */
      .page-section .card-img .price {
        position: absolute;
        right: 0;
        bottom: 0;
        width: 150px;
        height: 100px;
        background: url('/img/sale.png');
        background-size: 170px 170px;
        background-position: top 5px right -65px;
        background-repeat: no-repeat;
      }
        .page-section .card-img .price .text {
          position: absolute;
          bottom: 10px;
          right: 0;
          width: 150px;
        }
          .page-section .card-img .price .text div {
            text-align: right;
            padding: 0;
            margin: 0;
            line-height: 100%;
            font-family: "Helvetica Neue", Arial, "Yu Gothic", "游ゴシック", sans-serif;
          }
          .page-section .card-img .price .text .in {
            font-size: 10pt;
            color: #ffff00;
            font-weight: 900;
            padding-right: 8px;
          }
          .page-section .card-img .price .text .out {
            font-size: 45pt;
            line-height: 40%;
            font-weight: 700;
            color: #ffff00;
            text-shadow: 
              4px 4px 0 #ff0000,
              -4px 4px 0 #ff0000,
              4px -4px 0 #ff0000,
              -4px -4px 0 #ff0000;
          }
            .page-section .card-img .price .text .out span {
              font-size: 12pt;
              padding: 0 8px 0 2px;
            }
            .page-section .card-img .price .text.two .out {
              font-size: 45pt;
              line-height: 55%;
            }
            .page-section .card-img .price .text.two .in {
              padding-right: 8px;
            }
              .page-section .card-img .price .text.two .out span {
                padding: 0 8px 0 2px;
              }
    .page-section .ad-body {
      padding: 2px 10px 0;
      background-color: #f0f0f0;
      height: 77px;
    }
    .page-section .ad-name {
      font-size: 0.95rem;
      margin: 3px 0 4px;
      font-weight: 700;
      color: var(--primary-color);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .page-section .ad-quantity,
    .page-section .ad-summary {
      font-size: 0.8rem;
      margin: 0;
      padding: 0;
      line-height: 140%;
      font-weight: 700;
      color: var(--text-color);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .page-section .card-body {
      padding: 2px 10px 5px;
      background-color: #f0f0f0;
    }
      .page-section .snap .card-body {
        padding: 2px 5px 0;
        background-color: transparent;
      }
      .page-section .spot .card-body,
      .page-section .content .card-body {
        padding: 2px 10px 0;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
        background-color: #eee;
      }
    .page-section .card-tag {
      font-size: 0.85rem;
      color: var(--accent-color);
      font-weight: 700;
    }
      .page-section .chirashi .card-tag,
      .page-section .content .card-tag {
        line-height: 25px;
      }
    .page-section .card-title {
      font-size: 0.85rem;
      margin: 0 0 4px;
      font-weight: 700;
      color: var(--primary-color);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
      .page-section .snap .card-title {
        margin-top: 8px;
      }
      .page-section .chirashi .card-title,
      .page-section .content .card-title {
        margin: 0;
        line-height: 120%;
      }
    .page-section .card-author {
      font-size: 0.65rem;
      margin: 0;
      font-weight: 700;
      color: var(--text-active-color);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
      .page-section .card-author a {
        display: inline-flex; /* 横並びにする */
        align-items: center;  /* 垂直方向の中央揃え */
        gap: 2px;             /* アイコンと文字の間隔（お好みで調整） */
        text-decoration: none; /* 下線を消す場合 */
        color: inherit;        /* 文字色を継承 */
      }
      .page-section .card-author span {
        color: var(--text-active-color);
        width: 14px;
      }
    .page-section .fav-btn-icon {
      position: absolute;
      top: 10px;
      right: 10px;
      background: rgba(255,255,255,0.8);
      border-radius: 50%;
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      color: #ccc;
    }
    .page-section .fav-btn-icon.active {
      color: var(--heart-color);
    }



/* Detail Modal */
#sub-h-scroll {
  position: absolute;
  top: 88px;
  left: 0;
  width: 100%;
  padding: 0;
  box-sizing: border-box;
  height: calc(100% - 88px);
  overflow-y: auto;
}
#detailModal {
  padding: 15px 10px;
  box-sizing: border-box;
  background: #fff;
}
  #detailModal #modalImg {
    position: relative;
    height: 280px;
    margin-inline: auto;
    background-position: center 0%;
    background-size: cover;
    background-repeat: no-repeat; /* 意図しない繰り返しを防止 */
    background-color: rgb(238, 238, 238);
    background-image: var(--bg-url);
  }
  #detailModal .modal-body {
    padding: 10px 5px;
    box-sizing: border-box;
  }
  #detailModal .map-wrapper {
    width: 100%;
    height: 350px;
    margin: 0;
    padding: 15px 0;
    overflow: hidden;
  }
  #detailModal iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }
  #detailModal .modalTag {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 0.8rem;
    margin-right: 10px;
  }
  #detailModal .modalDesc {
    line-height: 1.6;
    color: #666;
    font-size: 0.95rem;
  }
  /* Navigation Button */
  #detailModal .nav-link {
    display: flex;         /* blockから変更：アイコンと文字を並べるため */
    align-items: center;   /* 上下中央揃え */
    justify-content: center; /* 左右中央揃え */
    gap: 8px;              /* アイコンと文字の間隔 */
    width: 100%;
    padding: 15px 0;
    margin-top: 10px;
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: background 0.3s ease;
  }
  /* アイコン（span）のサイズ調整 */
  #detailModal .nav-link .icon-map {
    display: flex;
    align-items: center;
    width: 1.4em;  /* 文字より少し大きくすると視認性が上がります */
    height: 1.4em;
    flex-shrink: 0;
    color: #fff;
  }
  #detailModal .nav-link:hover {
    background: #333;
  }

  /* 基本情報リスト */
  #detailModal .info-list {
    max-width: 600px;
    margin: 20px auto;
    border-top: 1px solid #eee;
  }

  /* 行のスタイル */
  #detailModal .list-row {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    align-items: baseline; /* テキストの高さがずれないように調整 */
  }

  /* ラベル部分（左側） */
  #detailModal .list-row dt {
    width: 140px;       /* ラベルの固定幅（好みに合わせて調整） */
    flex-shrink: 0;     /* 幅を縮ませない */
    font-weight: 700;
    font-size: 0.9rem;
    color: #333;
    text-align: left;   /* 左寄せ */
  }

  /* データ部分（右側） */
  #detailModal .list-row dd {
    margin: 0;          /* デフォルトのインデントをリセット */
    flex-grow: 1;
    color: #666;
    text-align: left;   /* 左寄せ */
    line-height: 1.5;
  }
    #detailModal .list-row dd img {
      width: 36px;
      padding: 0 2px;
    }

  /* モバイル対応：画面が狭いときは縦並びにする場合 */
  @media (max-width: 480px) {
    #detailModal .list-row {
      flex-direction: column;
      gap: 8px;
    }
    #detailModal .list-row dt {
      width: 100%;
    }
  }

.visitor-list {
  display: flex;
  gap: 12px;
  padding: 15px;
  overflow-x: auto;
  scrollbar-width: none;
}

.visitor-item {
  flex: 0 0 50px;
  text-align: center;
}

.visitor-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid #262626;
  margin-bottom: 5px;
}

/* ==========================================================================
   7. さがす
   ========================================================================== */ 
.container {
  width: 100vw;
  box-sizing: border-box;
  padding: 0 20px 0;
  overflow-x: hidden;
}
  .container.mt {
    margin-top: 20px;
  }
  .container .grid {
    display: grid;
    /* カラムの設定：最小300px、最大1列分。入りきらなくなると自動で折り返す */
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 6px;
    padding: 3px 0;
    max-width: 800px;
    margin: 7px auto 10px;
  }
  #page-tracks .container .item {
    display: flex;
    width: 100%;
    height: 50px;
    justify-content: center;
    align-items: center;
    border: 3px solid #ccc;
    border-radius: 10px;
    background-color: var(--bg-color);
    color: #000;
  }
    #page-tracks .container .item div {
      background-color: transparent;
    }
    .container .stream,
    .container .content {
      background: #fff;
      overflow: hidden;
      border-radius: 12px;
      cursor: pointer;
      position: relative;
      margin-top: 10px;
      transition: opacity 0.3s;
    }
      .container .stream .card-img,
      .container .content .card-img {
        aspect-ratio: 1/1.2;
        background-size: auto 150%;
        background-position: center center;
        background-repeat: no-repeat;
      }
      .container .stream .card-body,
      .container .content .card-body {
        padding: 3px 6px 5px;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
        background-color: #fff;
        color: var(--text-color)
      }
      .container .card-title {
        font-size: 0.85rem;
        margin: 0;
        font-weight: 700;
        color: var(--primary-color);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        background-color: transparent;
      }

.container-right {
  width: 100vw;
  box-sizing: border-box;
  text-align: right;
  color: var(--text-muted);
  color: #1d9bf0;
  font-weight: 700;
  font-size: 0.8rem;
  padding-right: 20px;
  padding-top: 5px;
}

.ranking-viewport {
  margin-top: 10px;
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  background-color: var(--bg-color-light);
}
  /* Tabs */
  .ranking-viewport .tabs {
    display: flex;
    justify-content: center;
    padding-bottom: 5px;
  }
  .ranking-viewport .tab-item {
    position: relative;
    padding: 0 15px 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s ease;
  }
  .ranking-viewport .tab-item.active {
    color: var(--primary-color);
    font-weight: 700;
  }
  .ranking-viewport .tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 2px;
    background: var(--primary-color);
  }
  .ranking-viewport .ranking-more {
    width: 100%;
    box-sizing: border-box;
    text-align: right;
    color: #1d9bf0;
    font-weight: 700;
    font-size: 0.8rem;
    padding-right: 5px;
    padding-top: 5px;
  }
  .ranking-slider {
    display: flex;
    width: 400%;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .page-section {
    width: 33.333%;
    height: 100%;
    overflow-y: auto;
  }
    /* Grid & Cards */
    .page-section .grid {
      display: grid;
      grid-template-columns: repeat(1, 1fr);
      gap: 6px;
      padding: 3px 0;
      max-width: 800px;
      margin: 0 auto;
    }
    .page-section .item {
      display: flex;
      width: 100%;
      height: 50px;
      padding: 0;
      color: #000;
    }
      .page-section .item .rank {
        display: flex;
        width: 30px;
        font-size: 1.2rem;
        padding: 0;
        font-weight: 700;
        color: #aaa;
        justify-content: center;
        align-items: center;
        background-color: #fff;
        border-top-left-radius: 3px;
        border-bottom-left-radius: 3px;
      }
      .page-section .item .r1 {
        color: #444;
      }
      .page-section .item .r2 {
        color: #666;
      }
      .page-section .item .r3 {
        color: #888;
      }
      .page-section .item .img {
        width: 70px;
        aspect-ratio: 1/1.2;
        background-size: auto 150%;
        background-position: center center;
        background-repeat: no-repeat;
        background-color: #fff;
      }
      .page-section .item .desc {
        flex-grow: 1;
        padding: 0 10px;
        box-sizing: border-box;
        background-color: #fff;
        border-top-right-radius: 3px;
        border-bottom-right-radius: 3px;
      }
        .page-section .item .desc p {
          font-size: 0.7rem;
          margin: 0;
          width: calc(100vw - 170px);
          background-color: #fff;
          white-space: nowrap;      /* 改行を禁止する */
          overflow: hidden;         /* 溢れた部分を隠す */
          text-overflow: ellipsis;  /* 溢れた末尾を「...」にする */
        }
        .page-section .item .desc p.name {
          font-size: 1.05rem;
          font-weight: 700;
          padding: 0;
          padding-top: 3px;
        }

.livetag-container {
  width: 100%; /* 親要素の幅に合わせて折り返し */
  padding: 10px 0;
}
.tag {
  display: inline-block; /* これが重要：タグを一つの塊にする */
  margin-right: 5px;
  margin-bottom: 6px;
  background-color: #1d9bf0;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  text-decoration: none;
}

.title h3 {
  display: flex;
  align-items: center;    /* 画像と文字の上下を中央で揃える */
  margin: 0;             /* 余計な余白をリセット */
  gap: 6px;              /* アイコンと文字の間の隙間 */
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
}
.title h3.rank {
  color: #555;
}
  .title img {
    display: block;
    height: 1.2em;         /* 文字の大きさに合わせると綺麗です */
    width: auto;
  }

.container h6 {
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 10px 2px 5px;
}

.sign {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 6px 0;
  max-width: 800px;
  margin: 0 auto;
}
.pictgram {
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;          /* 上下中央揃え */
  justify-content: center;   /* 左右中央（必要なら） */
  font-size: 0.9rem;
  color: var(--text-muted);
}
  .pictgram img {
    height: 60px;
  }
  .container-more {
    width: 100%;
    box-sizing: border-box;
    text-align: right;
    color: #1d9bf0;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 5px 15px 15px;
  }

.dates,
.currently {
  display: flex;
  justify-content: space-between; /* 子要素の間に間隔を空ける */
  align-items: center;          /* 上下中央揃え */
  gap: 8px;                    /* 要素間の隙間 */
}
.dates {
  gap: 0;
}
.card {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;          /* 上下中央揃え */
  justify-content: center;   /* 左右中央（必要なら） */
  border: 3px solid #ddd;
  background-color: var(--bg-color);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
  .currently .card {
    display: flex;
    height: 100px;
    font-size: 0.8rem;
    flex-direction: column; /* 縦並びに変更 */
    align-items: center;    /* 縦並びの時の「左右中央」 */
    justify-content: center; /* 縦並びの時の「上下中央」 */
    gap: 2px;              /* 要素間の隙間 */
  }
  .dates .card {
    display: flex;
    height: 60px;
    border-radius: 0;
    border: 0;
    border-top: 3px solid #ddd;
    border-bottom: 3px solid #ddd;
    font-size: 0.8rem;
    font-weight: 700;
    flex-direction: column; /* 縦並びに変更 */
    align-items: center;    /* 縦並びの時の「左右中央」 */
    justify-content: center; /* 縦並びの時の「上下中央」 */
    gap: 1px;              /* 要素間の隙間 */
  }
    .dates .card:first-child {
      border-top-left-radius: 10px;
      border-bottom-left-radius: 10px;
      border: 3px solid #ddd;
    }
    .dates .card:last-child {
      border-top-right-radius: 10px;
      border-bottom-right-radius: 10px;
      border: 3px solid #ddd;
    }
    .dates .card .date {
      font-size: 0.7rem;
      font-weight: normal;
      background-color: transparent;
    }
    .dates .card.sat {
      background-color: #eefaff;
    }
    .dates .card.sun {
      background-color: #fff1f4;
    }
    .dates .card div {
      background-color: transparent;
    }
      .dates .card .date .sat {
        color: #0000ff;
        background-color: transparent;
      }
      .dates .card .date .sun {
        color: #ff0000;
        background-color: transparent;
      }
  .card img {
    width: 60px;
    height: auto;
    background-color: var(--bg-color);
  }
  .card div {
    background-color: var(--bg-color);
  }

.input-search {
  display: flex;
  justify-content: space-between; /* 子要素の間に間隔を空ける */
  align-items: center;          /* 上下中央揃え */
  gap: 0;                    /* 要素間の隙間 */
}
  .input-search input {
    width: 100%;
    padding: 6px 3px;
    border: 1px solid var(--scroll-thumb);
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    background-color: var(--bg-color);
  }
  .input-search button {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    background-color: var(--accent-color);
    color: var(--bg-color);
  }

/* ==========================================================================
   8. コンテンツページ
   ========================================================================== */
#content-detail {
  position: fixed;
  top: 0;
  right: 0;
  width: 100vw;
  height: 100dvh;
  background: #fff;
  z-index: 2000000;
  
  /* スライド設定 */
  transform: translateX(100%); /* 最初は右側に隠す */
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.25s;
  
  /* 重要：非表示時も要素自体は「ある」状態にするが、見えなくする */
  visibility: hidden;
  
  /* 前回の fixed 対策 */
  contain: paint;
}

/* 表示時 */
#content-detail.is-active {
  transform: translateX(0); /* 画面内に戻す */
  visibility: visible;
  transition: transform 0.3s cubic-bezier(0, 0, 0.2, 1);
}
#content-detail * {
  background-color: var(--content-bg-color);
}
#close {
  position: fixed;
  top: 12px;
  right: 15px;
  width: 30px; /* 少しサイズを調整 */
  height: 30px;
  z-index: 1000000;
  /* 子要素を中央に配置し、余計な隙間を排除 */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#close span.icon-close {
  display: block;
  width: 100%;
  height: 100%;
  /* 先ほど作成したSVG変数を適用 */
  background-image: var(--icon-close);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  /* 背景色を透明にすることで、意図しない「線」を防ぐ */
  background-color: transparent !important; 
}

/* ==========================================================================
   9. フィードのコンテンツページ
   ========================================================================== */
.kufu-container {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
}
  .kufu-container .label {
    position: absolute;
    bottom: 30vh;
    bottom: 30dvh;
    right: 10px;
    background-color: rgba(255,255,255,0.6);
    padding: 0 10px 1px 9px;
    border-radius: 16px;
    font-size: 9pt;
    letter-spacing: -0.7px;
    font-weight: 700;
    z-index: 10;
  }
    .kufu-container .label[rel=wedding] {
      color: rgba(255,255,255,0.8);
      background-color: rgba(0, 195, 255, 0.568);
    }
    .kufu-container .label[rel=loco] {
      color: rgba(255,255,255,0.7);
      background-color: rgba(100, 100, 100, 0.6);
    }
    .kufu-container .label[rel=tokubai] {
      color: rgba(255,255,255,0.7);
      background-color: rgba(206, 0, 0, 0.6);
    }
    .kufu-container .label[rel=trip] {
      color: rgba(255,255,255,0.7);
      background-color: rgba(17, 206, 0, 0.6);
    }

    /* 1. 画像表示エリア */
    .kufu-container .image-viewport-expanded {
      width: 100%;
      height: 80vh;
      height: 80dvh;
      position: relative;
      background: #ffffff;
      overflow: hidden;
    }
      .kufu-container .slider-track {
        width: 100%;
        height: 100%;
        position: relative;
      }
        
      /* スライド画像の共通設定 */
      .kufu-container .slide-img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        transform: scale(1.2); /* 横移動の背景見え防止マスク */
        z-index: 1;
      }
        /* 
         【完全クロスフェード対応】計4枚 / 20秒ループ（1枚5秒）
          重なり順（z-index）をコントロールして、消えゆく画像が常に上に残るようにします。
        */
        .kufu-container .slide-img:nth-child(1) { animation: slideLeftToRight 40s infinite ease-in-out; animation-delay: 0s; }
        .kufu-container .slide-img:nth-child(2) { animation: slideRightToLeft 40s infinite ease-in-out; animation-delay: 10s; }
        .kufu-container .slide-img:nth-child(3) { animation: slideLeftToRight 40s infinite ease-in-out; animation-delay: 20s; }
        .kufu-container .slide-img:nth-child(4) { animation: slideRightToLeft 40s infinite ease-in-out; animation-delay: 30s; }

        /* 
          キーフレームの解説（1枚5秒＝全体20秒の25%）
          ・0%〜25%：自分が主役の fhould time
          ・25%〜30%：次の画像が裏で表示された状態で、自分が1秒かけてじわっと消える（クロスフェードエリア）
        */
        /* 【アニメーション1】左端から右端へ動く（1, 3枚目） */
        @keyframes slideLeftToRight {
          0% { opacity: 0; transform: scale(1.2); object-position: left center; z-index: 2; }
          5% { opacity: 1; } /* 1秒かけてフェードイン */
          25% { opacity: 1; object-position: right center; z-index: 2; } /* 5秒間表示しながら右へ移動。次の画像が始まる瞬間にz-indexを維持 */
          30% { opacity: 0; object-position: right center; z-index: 1; } /* 次の画像が裏で100%表示された後、1秒かけて完全に消える */
          100% { opacity: 0; }
        }
        /* 【アニメーション2】右端から左端へ動く（2, 4枚目） */
        @keyframes slideRightToLeft {
          0% { opacity: 0; transform: scale(1.2); object-position: right center; z-index: 2; }
          5% { opacity: 1; }
          25% { opacity: 1; object-position: left center; z-index: 2; }
          30% { opacity: 0; object-position: left center; z-index: 1; }
          100% { opacity: 0; }
        }
        /* グラデーションマスク */
        .kufu-container .bottom-shade {
          position: absolute;
          bottom: 0;
          left: 0;
          width: 100%;
          height: 40px;
          background: linear-gradient(to top, rgba(255,255,255,1), rgba(255,255,255,0));
          z-index: 5;
        }

        /* 2. テキスト・詳細エリア（最下部固定：全体の20%） */
        .kufu-container .content-area-bottom {
          width: 100%;
          height: 28vh;
          height: 28dvh;
          padding: 0px 10px 6px 10px;
          display: flex;
          flex-direction: column;
          justify-content: flex-end;
          gap: 8px;
          overflow: hidden;
          background: #ffffff;
        }
          .kufu-container .content-area-bottom[rel=tokubai] {
            height: 24vh;
            height: 24dvh;

          }
          .kufu-container .meta-header {
            width: 100%;
            display: flex;
            flex-direction: column;
            gap: 2px;
          }
        
          /* 横スクロール可能な親コンテナ */
          .kufu-container .scroll-horizontal-container {
            width: 100%;
            overflow-x: auto;
            white-space: nowrap;
            scrollbar-width: none;
            -webkit-overflow-scrolling: touch;
          }
          .kufu-container .scroll-horizontal-container::-webkit-scrollbar {
            display: none;
          }

          /* レンダリングバグを防ぐインナースペース */
          .kufu-container .scroll-inner-wrapper {
            display: inline-block;
            padding: 0;
            vertical-align: top;
          }
            .kufu-container .content-area-bottom[rel=tokubai] .scroll-inner-wrapper {
              padding: 0;
            }
          /* 【変更】ハッシュタグライン：スクロール対応のためレイアウト微調整 */
          .kufu-container .hashtag-line {
            font-size: 13px;
            /*color: #00c3ff;*/
            color: #555;
            font-weight: 700;
            line-height: 1.4;
            margin-bottom: 2px;
          }
            /*
            .kufu-container .hashtag-line[rel=loco] {
              color: #555;
            }
            .kufu-container .hashtag-line[rel=tokubai] {
              color: rgba(192, 50, 50, 0.9);
            }
            .kufu-container .hashtag-line[rel=trip] {
              color: rgba(50, 192, 74, 0.9);
            }
            */

          .kufu-container .hashtag-item {
            display: inline-block;
            margin-right: 3px;
            /*background-color: #defffd;*/
            background-color: #ddd;
            border-radius: 14px;
            padding: 2px 10px;
          }
            /*
            .kufu-container .hashtag-line[rel=loco] .hashtag-item {
              background-color: #ddd;
            }
            .kufu-container .hashtag-line[rel=tokubai] .hashtag-item {
              background-color: rgba(250, 149, 149, 0.3);
            }
            .kufu-container .hashtag-line[rel=trip] .hashtag-item {
              background-color: rgba(149, 250, 149, 0.3);
            }
            */

          /* 店舗タイトル（2行制限） */
          .kufu-container .store-title {
            font-size: 24px;
            font-weight: 700;
            color: #2d2621;
            line-height: 1.1;
            margin-top: 3px;
            margin-bottom: 1px;
            overflow: hidden;
            white-space: normal;
          }
            .kufu-container .content-area-bottom[rel=tokubai] .store-title {
              margin-top: 6px;
              margin-bottom: 10px;
            }
            .kufu-container .store-title.loco {
              font-size: 22px;
              font-weight: 700;
              color: #2d2621;
              line-height: 1.20;
              margin-top: 4px;
              display: -webkit-box;
              -webkit-line-clamp: 4;
              -webkit-box-orient: vertical;
              overflow: hidden;
              white-space: normal;
            }
          /* カフェ / 駅情報テキストスタイル */
          .kufu-container .store-location-text {
            font-size: 15px;
            color: #6e655f;
            font-weight: 600;
            line-height: 1.1;
          }
          /* 住所テキストスタイル */
          .kufu-container .store-address-text {
            font-size: 14.5px;
            color: #8b7e74;
            font-weight: 500;
            line-height: 1.0;
          }
          /* 最下段マーキー口コミボックス */
          .kufu-container .marquee-review-box {
            background: #eee;
            border-left: 1px solid #f4f0ea;
            border-top: 1px solid #f4f0ea;
            border-right: 1px solid #f4f0ea;
            border-bottom: 1px solid #f4f0ea;
            border-radius: 6px;
            padding: 10px 0;
            width: 100%;
            overflow: hidden;
            display: flex;
            align-items: center;
          }
          /* マーキーの流れるトラック */
          .kufu-container .marquee-track {
            display: inline-block;
            white-space: nowrap;
            padding-left: 100%;
            animation: marquee 25s linear infinite;
          }
          .kufu-container .marquee-text {
            font-size: 15px;
            font-weight: 600;
            color: #4a4a4a;
          }
          .kufu-container .marquee-user {
            color: #a3968c;
            font-weight: 700;
            margin-right: 15px;
          }
          /* 右から左へ無限ループするアニメーション */
          @keyframes marquee {
            0% { transform: translate3d(0, 0, 0); }
            100% { transform: translate3d(-100%, 0, 0); }
          }

    /* ----------------------------------
       ショート動画風画面用スタイル
    ---------------------------------- */

    /* ショート動画の縦長コンテナ (9:16) */
    .video-container {
      position: relative;
      width: 100%;
      height: 100dvh;
      background-color: #111;
      box-shadow: 0 0 20px rgba(0,0,0,0.8);
      overflow: hidden;
      border-radius: 12px;
      cursor: pointer;
    }
    @media (max-width: 450px) {
      .video-container {
        border-radius: 0;
        max-height: 100vh;
      }
    }

    /* スライド管理 */
    .slide {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100dvh;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.5s ease-in-out, visibility 0.5s;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
    }
    .slide.active {
      opacity: 1;
      visibility: visible;
    }

    /* 画像エリアのラッパー */
    .bg-wrapper {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100dvh;
      overflow: hidden;
      z-index: 1;
    }
    
    /* フルスクリーン画像 */
    .bg-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100dvh;
      opacity: 0;
      visibility: hidden;
    }
    .bg-overlay.sub-active {
      opacity: 1;
      visibility: visible;
      z-index: 3;
    }

    /* 実際の画像要素 */
    .bg-overlay img {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100dvh;
      object-fit: cover;
      transform-origin: center center;
    }

    /* ----------------------------------
       エフェクト用スタイル
    ---------------------------------- */
    /* 1. ピクセル化スタイル */
    .bg-overlay.pixelating img {
      filter: contrast(125%) brightness(110%) blur(8px);
      image-rendering: pixelated;
    }

    /* 2. グリッチスタイル */
    .bg-overlay.glitching {
      animation: glitchSkew 0.35s linear infinite;
    }
    .bg-overlay.glitching img {
      animation: glitchSlice 0.25s steps(2) infinite;
      filter: hue-rotate(90deg) contrast(140%);
    }

    /* 3. モーフィングスタイル */
    .bg-overlay.morphing img {
      filter: blur(4px) contrast(110%) saturate(120%);
    }

    /* 4. ディゾルブスタイル */
    .bg-overlay.dissolving img {
      filter: brightness(130%) saturate(80%) blur(2px);
    }

    /* 5. 擦れ・スクラッチスタイル（新規：フィルムノイズと縦跳び） */
    .bg-overlay.scratching {
      animation: filmRoll 0.4s ease-in-out infinite;
    }
    .bg-overlay.scratching img {
      filter: sepia(20%) contrast(115%) brightness(95%);
    }
    /* 縦線・擦れノイズをレイヤーで強制介入 */
    .bg-overlay.scratching::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100dvh;
      background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 45px,
        rgba(255, 255, 255, 0.12) 46px,
        rgba(255, 255, 255, 0.05) 47px,
        transparent 48px,
        transparent 120px,
        rgba(0, 0, 0, 0.15) 121px,
        transparent 123px
      );
      animation: scratchMove 0.15s steps(2) infinite;
      z-index: 5;
    }

    /* 各種アニメーション定義 */
    @keyframes glitchSkew {
      0% { transform: skew(0deg); }
      20% { transform: skew(-3deg) rotate(-0.5deg); }
      40% { transform: skew(2deg); }
      60% { transform: skew(-1deg) scaleY(1.02); }
      80% { transform: skew(0deg); }
      100% { transform: skew(1deg); }
    }
    @keyframes glitchSlice {
      0% { clip-path: inset(10% 0 30% 0); transform: translateX(-5px); }
      20% { clip-path: inset(40% 0 15% 0); transform: translateX(8px) scale(1.02); }
      40% { clip-path: inset(70% 0 5% 0); transform: translateX(-10px); }
      60% { clip-path: inset(5% 0 85% 0); transform: translateX(4px); }
      80% { clip-path: inset(25% 0 50% 0); transform: translateX(-2px) scaleX(0.98); }
      100% { clip-path: inset(0% 0 0% 0); transform: translateX(0); }
    }
    @keyframes scratchMove {
      0% { transform: translateX(-10px); opacity: 0.8; }
      50% { transform: translateX(30px); opacity: 0.4; }
      100% { transform: translateX(-20px); opacity: 0.9; }
    }
    @keyframes filmRoll {
      0% { transform: translateY(0); }
      25% { transform: translateY(-6px); }
      50% { transform: translateY(4px); }
      75% { transform: translateY(-2px); }
      100% { transform: translateY(0); }
    }

    /* シャドウグラデーション */
    .bg-gradient {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100dvh;
      background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.65) 100%);
      z-index: 4;
    }

    /* 上部ヘッダー */
    .video-header {
      position: absolute;
      top: 70px;
      left: 0;
      width: 100%;
      text-align: center;
      z-index: 10;
      font-size: 14px;
      font-weight: bold;
      text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
      letter-spacing: 1px;
    }
    .video-header span {
      background: rgba(197, 160, 89, 0.85); 
      padding: 5px 14px;
      border-radius: 20px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }

    /* 下部テキストエリア */
    .video-info {
      position: relative;
      z-index: 10;
      padding: 20px;
      padding-bottom: 40px;
      width: 82%;
    }
    .shop-name {
      font-size: 22px;
      font-weight: 900;
      margin-bottom: 6px;
      color: #fff;
      letter-spacing: 0.5px;
      text-shadow: 0 2px 4px rgba(0,0,0,0.9), 0 0 10px rgba(0,0,0,0.5);
    }
    .station-info {
      font-size: 13px;
      color: #ffd54f;
      margin-bottom: 12px;
      font-weight: bold;
      text-shadow: 1px 1px 3px rgba(0,0,0,0.9);
    }
    
    /* テロップ切り替え用コンテナ（背景完全透過） */
    .description-container {
      position: relative;
      min-height: 90px;
    }
    .description {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      font-size: 14.5px;
      line-height: 1.6;
      font-weight: 500;
      color: #ffffff;
      background: transparent;
      padding: 0;
      border-radius: 0;
      backdrop-filter: none;
      opacity: 0;
      visibility: hidden;
      transition: opacity 0.4s ease-in-out, visibility 0.4s;
      
      text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 1),
        -1px 1px 2px rgba(0, 0, 0, 1),
        1px -1px 2px rgba(0, 0, 0, 1),
        -1px -1px 2px rgba(0, 0, 0, 1),
        0px 2px 5px rgba(0, 0, 0, 0.9),
        0px 0px 15px rgba(0, 0, 0, 0.6);
    }
    .description.text-active {
      opacity: 1;
      visibility: visible;
    }

    /* 右側アクションボタン */
    .side-buttons {
      position: absolute;
      right: 12px;
      bottom: 100px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 18px;
      z-index: 10;
    }
    .action-btn {
      display: flex;
      flex-direction: column;
      align-items: center;
      cursor: pointer;
    }
    .action-btn .icon {
      width: 40px;
      height: 40px;
      background: rgba(0, 0, 0, 0.5);
      border-radius: 50%;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 20px;
      box-shadow: 0 2px 5px rgba(0,0,0,0.3);
      transition: transform 0.1s;
    }
    .action-btn:active .icon { transform: scale(0.9); }
    .action-btn span {
      font-size: 11px;
      margin-top: 4px;
      text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    }

    /* 音楽レコード風回転アイコン */
    .music-disc {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: radial-gradient(circle, #444 30%, #111 100%);
      border: 2px solid #fff;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 14px;
      animation: rotateDisc 4s linear infinite;
      animation-play-state: paused; 
      box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    }
    .music-disc.playing {
      animation-play-state: running;
    }
    @keyframes rotateDisc {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }

    /* タップエリア（画像めくり用） */
    .tap-area-left, .tap-area-right {
      position: absolute;
      top: 0;
      width: 25%;
      height: 100dvh;
      z-index: 8;
    }
    .tap-area-left { left: 0; }
    .tap-area-right { right: 0; }

    /* シークバー */
    .progress-container {
      position: absolute;
      bottom: 10px;
      left: 15px;
      width: calc(100% - 30px);
      height: 3px;
      background: transparent;
      border-radius: 2px;
      z-index: 15;
    }
    .progress-bar {
      height: 100%;
      width: 0%;
      background: rgba(255, 255, 255, 0.45);
      border-radius: 2px;
    }