
/* yt-concierge カスタムスタイル */

:root {
    --pico-primary: #06c755;
    --pico-primary-hover: #05a847;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 1rem;
}

html, body {
    background: #ffffff !important;
}

/* Pico.cssのコンテナ最大幅を解除 */
main.container {
    max-width: 100% !important;
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ============================================
   ヘッダー：ロゴ左上（上揃え） / バナー中央
   ============================================ */
.site-header {
    position: relative;
    margin-bottom: 2rem;
    min-height: 70px;
}
.logo-link {
    position: absolute;
    left: 0;
    top: 0;
    display: inline-flex;
    align-items: flex-start;
    text-decoration: none;
    z-index: 2;
}
.logo {
    display: block;
    width: 100px;
    height: auto;
}
.banner {
    display: block;
    margin: 0 auto;
    width: 400px;
    max-width: 80%;
    height: auto;
}

/* ============================================
   ① 急上昇中の動画
   ============================================ */
.trending-section {
    margin-bottom: 3rem;
}
.trending-section h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

/* フルブラウザ: 4列 → 3 → 2 → 1 */
.trending-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
@media (max-width: 1100px) {
    .trending-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    .trending-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 500px) {
    .trending-grid { grid-template-columns: 1fr; }
}

.trending-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-width: 0;
}
.trending-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    color: inherit;
}

.trending-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #f0f0f0;
    overflow: hidden;
}
.trending-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.duration-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0,0,0,0.8);
    color: #fff;
    font-size: 0.72rem;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    line-height: 1.2;
}

.trending-meta {
    padding: 0.55rem 0.75rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.tm-line1 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.2;
    height: 1.2em;
    overflow: hidden;
}
.tm-line1 .rank { font-size: 1rem; flex-shrink: 0; }
.tm-line1 .views { font-weight: 600; color: #333; flex-shrink: 0; }
.tm-line1 .date { flex-shrink: 0; color: #999; }

.tm-line2 {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    color: #111;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: 1.3em;
}
.tm-line3 {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #666;
    line-height: 1.2;
    height: 1.4em;
    overflow: hidden;
    min-width: 0;
}
.tm-line3 .ch-mini {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}
.tm-line3 .ch-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
    color: #333;
}
.tm-line3 .ch-sub,
.tm-line3 .ch-vid {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ============================================
   ② ジャンルパネル
   ============================================ */
.genre-panel-section {
    margin-bottom: 3rem;
}
.genre-panel-section h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

/* フルブラウザ: 5列 → 4 → 3 → 2 → 1 */
.genre-panels {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
}
@media (max-width: 1100px) {
    .genre-panels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
    .genre-panels { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .genre-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
    .genre-panels { grid-template-columns: 1fr; }
}

.genre-panel {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.7rem 0.9rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
    min-width: 0;
}
.genre-panel:hover {
    border-color: var(--pico-primary);
    background: #f0fdf4;
    color: inherit;
    transform: translateY(-1px);
}
.genre-panel.active {
    border-color: var(--pico-primary);
    background: #e8fdf0;
}
.gp-line1 {
    font-weight: 700;
    font-size: 0.95rem;
    color: #111;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* ============================================
   ③ 人気チャンネル
   ============================================ */
.popular-section {
    margin-bottom: 3rem;
    padding-top: 1rem;
}
.popular-section h2 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    color: #111;
}

.channel-blocks {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.channel-block {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 0.8rem 1rem;
}

.channel-header {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}
.rank-badge {
    flex-shrink: 0;
    font-size: 1.2rem;
    min-width: 2.5rem;
    text-align: center;
    font-weight: 700;
    color: #666;
    padding-top: 0.2rem;
}
.ch-link { flex-shrink: 0; text-decoration: none; }
.ch-banner {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
}
.ch-info { flex: 1; min-width: 0; }
.ch-info h3 {
    font-size: 1.05rem;
    margin: 0 0 0.2rem 0;
}
.ch-info h3 a { color: inherit; text-decoration: none; }
.ch-info h3 a:hover { color: var(--pico-primary); }
.ch-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.3rem;
}
.ch-desc {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.channel-videos {
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #eee;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.mini-video {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.25rem 0.4rem;
    text-decoration: none;
    color: inherit;
    font-size: 0.82rem;
    border-radius: 4px;
}
.mini-video:hover {
    background: #f0fdf4;
    color: inherit;
}
.mv-date {
    flex-shrink: 0;
    color: #999;
    font-size: 0.76rem;
    min-width: 3rem;
}
.mv-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}
.mv-views {
    flex-shrink: 0;
    color: #666;
    font-size: 0.76rem;
}

/* ============================================
   スマホ対応
   ============================================ */
@media (max-width: 600px) {
    .logo { width: 60px; }
    .banner { width: 240px; }

    .ch-banner { width: 48px; height: 48px; }
    .ch-desc { -webkit-line-clamp: 3; }
}

/* フッター統計 */
.footer-clicks {
    margin-top: 0.8rem !important;
    color: #999;
    font-size: 0.82rem;
}
.footer-clicks strong {
    color: #06c755;
    font-weight: 700;
}

/* ============================================
   人気チャンネルのホバー効果
   ============================================ */
.channel-block {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.channel-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: #06c755;
}

/* チャンネル名のリンクもホバーで色変化 */
.channel-block:hover .ch-info h3 a {
    color: #06c755;
}

/* バナーもホバーで軽く拡大 */
.channel-block:hover .ch-banner {
    transform: scale(1.05);
}
.ch-banner {
    transition: transform 0.15s ease;
}

/* 新着動画のホバーは既存のままだが、カード全体のホバー時にも強調 */
.channel-block:hover .mini-video {
    background: transparent;
}
.mini-video:hover {
    background: #f0fdf4 !important;
}

/* ============================================
   スクロールボタン（上へ・下へ）
   ============================================ */
.scroll-buttons {
    position: fixed;
    right: 20px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
}

.scroll-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: rgba(255, 255, 255, 0.7);
    color: #666;
    font-size: 14px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    line-height: 1;
}

.scroll-btn:hover {
    opacity: 1;
    background: #fff;
    border-color: #06c755;
    color: #06c755;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.scroll-btn:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .scroll-buttons {
        right: 12px;
        bottom: 20px;
    }
    .scroll-btn {
        width: 38px;
        height: 38px;
        font-size: 12px;
    }
}

/* ============================================
   サブタイトル（バナー下）
   ============================================ */
.site-subtitle {
    text-align: center;
    font-family: 'Kaisei Decol', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
    font-size: 12px;
    color: #111111;
    margin-top: 0.4rem;
    margin-bottom: 0;
    letter-spacing: 0.05em;
}

/* セクション見出しを黒に */
.trending-section h2,
.genre-panel-section h2,
.popular-section h2 {
    color: #111111;
}

/* 人気チャンネルのチャンネル名を黒に */
.ch-info h3 a,
.channel-block .ch-info h3 a {
    color: #111111 !important;
    text-decoration: none;
}
.ch-info h3 a:hover,
.channel-block:hover .ch-info h3 a {
    color: #06c755 !important;
}

/* ============================================
   新着動画のテキストをチャンネルバナーの左端に揃える
   ============================================ */
.channel-videos {
    padding-left: calc(2.5rem + 0.8rem) !important;
    margin-left: 0 !important;
}

/* ============================================
   新着動画：日付 / 再生回数 / タイトル のグリッド化
   ============================================ */
.mini-video {
    display: grid !important;
    grid-template-columns: 4rem 5rem 1fr !important;
    gap: 0.6rem !important;
    align-items: center;
    padding: 0.25rem 0.4rem;
}

/* 配信日：左揃え */
.mini-video .mv-date {
    text-align: left;
    min-width: 0;
    flex-shrink: 0;
}

/* 再生回数：右揃え（「回」の位置が揃う） */
.mini-video .mv-views {
    text-align: right;
    min-width: 0;
    flex-shrink: 0;
}

/* タイトル：左揃え（左端が揃う） */
.mini-video .mv-title {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

@media (max-width: 600px) {
    .mini-video {
        grid-template-columns: 3.5rem 4.5rem 1fr !important;
        gap: 0.4rem !important;
        font-size: 0.78rem;
    }
}

/* 再生回数の右端から2文字分の余白 */
.mini-video .mv-views {
    padding-right: 1.6rem;
}

/* カラム幅を最適化（配信日は狭く、再生回数は広く） */
.mini-video {
    grid-template-columns: 3rem 7.5rem 1fr !important;
}

/* 新着動画のタイトルを太字に */
.mini-video .mv-title {
    font-weight: 700;
    color: #111111;
}

/* ============================================
   チャンネル名とメタ情報：改行防止（上書き）
   ============================================ */
.ch-title-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.ch-title-row h3 {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;
}

.ch-meta {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.4rem;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.ch-meta .ch-sub,
.ch-meta .ch-vid {
    display: inline-grid !important;
    grid-template-columns: 0.9rem 3.6rem !important;
    align-items: center;
    gap: 0.1rem;
    white-space: nowrap;
    color: #666;
    font-size: 0.75rem;
}

.ch-meta .ch-icon {
    text-align: center;
    line-height: 1;
    font-size: 0.7rem;
}

.ch-meta .ch-num {
    text-align: right;
}

/* ============================================
   チャンネルメタ情報の間隔調整
   ============================================ */
/* 万人と🎬の間を1文字分広げる（0.4rem → 1.15rem） */
.ch-meta {
    gap: 1.15rem !important;
}

/* 🎬アイコンと動画数の間を1文字分詰める（0.85rem → 0.15rem） */
.ch-meta .ch-vid {
    grid-template-columns: 0.15rem 3.2rem !important;
    gap: 0 !important;
}

/* ============================================
   チャンネルメタ情報を1文字分左へ
   ============================================ */
.ch-meta {
    margin-right: 0.75rem;
}



/* チャンネルメタ情報をさらに左へ */
.ch-meta {
    margin-right: 1.5rem;
}


/* 🎬アイコンを左に1文字分ずらす */
.ch-meta .ch-vid .ch-icon {
    position: relative;
    left: -0.75rem;
}

/* テキストを右に1文字分ずらして重なりを回避 */
.ch-meta .ch-vid .ch-num {
    position: relative;
    left: 0.5rem;
}

/* 🎬アイコンを右に0.5文字分 */
.ch-meta .ch-vid .ch-icon {
    left: -0.375rem;
}

/* DVD風スクロールボタン */
.scroll-btn {
    font-size: 13px !important;
    letter-spacing: 0 !important;
    font-family: sans-serif !important;
}

/* ============================================
   スクロールボタン：縦並び + 上下三角
   ============================================ */
.scroll-buttons {
    position: fixed !important;
    right: 20px !important;
    bottom: 30px !important;
    display: flex !important;
    flex-direction: column !important;  /* 縦並び */
    gap: 6px !important;
    z-index: 100;
}

.scroll-btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    border: 1px solid #ddd !important;
    background: rgba(255, 255, 255, 0.7) !important;
    color: #666 !important;
    font-size: 14px !important;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s ease;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    line-height: 1;
}

.scroll-btn:hover {
    opacity: 1;
    background: #fff !important;
    border-color: #06c755 !important;
    color: #06c755 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* 「横棒 + 上三角」= 先頭へ */
.icon-to-top {
    position: relative;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 8px solid currentColor;
    margin-top: 6px;
}
.icon-to-top::before {
    content: "";
    position: absolute;
    left: -6px;
    bottom: 11px;
    width: 12px;
    height: 2px;
    background: currentColor;
}

/* 「下三角 + 横棒」= 末尾へ */
.icon-to-bottom {
    position: relative;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid currentColor;
    margin-bottom: 6px;
}
.icon-to-bottom::after {
    content: "";
    position: absolute;
    left: -6px;
    top: 11px;
    width: 12px;
    height: 2px;
    background: currentColor;
}

/* ============================================
   スクロールボタン：2ボタン（上向き三角・下向き三角）
   ============================================ */
.scroll-buttons {
    position: fixed !important;
    right: 20px !important;
    bottom: 30px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    z-index: 100;
}

.scroll-btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    border: 1px solid #ddd !important;
    background: rgba(255, 255, 255, 0.7) !important;
    color: #666 !important;
    font-size: 14px !important;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s ease;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    line-height: 1;
}

.scroll-btn:hover {
    opacity: 1;
    background: #fff !important;
    border-color: #06c755 !important;
    color: #06c755 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .scroll-buttons {
        right: 12px !important;
        bottom: 20px !important;
    }
    .scroll-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 12px !important;
    }
}

/* ============================================
   ヘッダー統計（右上）
   ============================================ */
.header-stats {
    position: absolute;
    top: 0;
    right: 0;
    text-align: right;
    font-size: 0.72rem;
    color: #666;
    line-height: 1.6;
    white-space: nowrap;
}

/* ============================================
   フッター
   ============================================ */
.site-footer {
    margin-top: 4rem;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
    color: #888;
    font-size: 0.85rem;
    text-align: center;
}
.site-footer hr {
    border: none;
    border-top: 1px solid #eee;
    margin-bottom: 1.5rem;
}
.site-footer .footer-line {
    margin: 0.3rem 0;
    line-height: 1.6;
    color: #888;
}

/* ============================================
   タブ切り替え
   ============================================ */
.tab-bar {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 1.2rem;
    border-bottom: 2px solid #eee;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s ease;
    font-family: 'Kaisei Decol', 'Noto Sans JP', sans-serif;
}

.tab-btn:hover {
    color: #06c755;
    background: #f0fdf4;
}

.tab-btn.active {
    color: #06c755;
    border-bottom-color: #06c755;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

@media (max-width: 600px) {
    .tab-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.82rem;
    }
}

/* ============================================
   特定箇所に Kaisei Decol を適用
   ============================================ */
/* ① ヘッダー（ロゴ下のサブタイトル・統計以外） */
.site-header,
.header-stats {
    font-family: 'Kaisei Decol', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
}

/* ② 各セクションのタイトル */
.trending-section h2,
.genre-panel-section h2,
.popular-section h2 {
    font-family: 'Kaisei Decol', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
}

/* ③ ジャンル名（gp-line1 のみ） */
.genre-panel .gp-line1 {
    font-family: 'Kaisei Decol', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
}

/* ④ フッター */
.site-footer,
.site-footer .footer-line,
.site-footer .footer-title {
    font-family: 'Kaisei Decol', 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
}

/* サブタイトルをバナーに近づける */
.site-subtitle {
    margin-top: -0.3rem !important;
}

/* ============================================
   統計アイコン（SVG）・配信日右寄せ
   ============================================ */
.stat-icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.12em;
    display: inline-block;
    margin-right: 0.2em;
}
.stat-icon-comment {
    margin-right: 0.5em;
}

/* 配信日をカードの右端へ */
.tm-line1 .date {
    margin-left: auto;
}

/* ============================================
   統計アイコンと数値の間隔（0.5文字）
   ============================================ */
.stat-icon {
    margin-right: 0.5em !important;
}
.stat-icon-comment {
    margin-right: 0.5em !important;
}

/* ============================================
   順位（メダル + x位）
   ============================================ */
/* メダルバッジのサイズを少し小さく */


/* ============================================
   順位表示（メダル + x位）
   ============================================ */
.medal {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    max-width: 22px;
    max-height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    vertical-align: middle;
    box-shadow: inset 0 -2px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.1);
    flex-shrink: 0;
    padding: 0;
    overflow: visible;
}

.medal-gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
}

.medal-silver {
    background: linear-gradient(135deg, #e0e0e0 0%, #a0a0a0 100%);
}

.medal-bronze {
    background: linear-gradient(135deg, #d4a373 0%, #8b5a2b 100%);
}

.rank-text {
    margin-left: 0.4em;
    font-weight: 600;
    font-size: 0.85rem;
    color: #666;
    vertical-align: middle;
    white-space: nowrap;
}

/* ============================================
   メダルが切れないように行高を確保
   ============================================ */
.tm-line1 {
    height: auto !important;
    min-height: 26px !important;
    line-height: 1.4 !important;
    align-items: center !important;
    overflow: visible !important;
}

.tm-line1 .rank {
    display: inline-flex;
    align-items: center;
    height: 26px;
    line-height: 1;
}

.rank-badge {
    line-height: 1.4 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
}

/* ============================================
   新着動画：タイトル → 再生回数 → 配信日
   ============================================ */
.mini-video {
    display: grid !important;
    grid-template-columns: 1fr auto auto !important;
    gap: 0.6rem !important;
    align-items: center;
}

/* タイトル：左揃え、残り幅いっぱい */
.mini-video .mv-title {
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    color: #111111;
    order: 1;
}

/* 再生回数：右寄せ */
.mini-video .mv-views {
    text-align: right;
    white-space: nowrap;
    font-size: 0.76rem;
    color: #666;
    order: 2;
    min-width: 5rem;
}

/* 配信日：右寄せ、再生回数の2文字分右 */
.mini-video .mv-date {
    text-align: right;
    white-space: nowrap;
    font-size: 0.76rem;
    color: #999;
    order: 3;
    margin-left: 1.5rem;  /* 2文字分（0.75rem × 2） */
    min-width: 3rem;
}

/* ============================================
   順位表示（1〜3位は2行、4位以降は1行）
   ============================================ */
.rank-badge {
    min-width: 3.5rem !important;
}

.rank-medal-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    line-height: 1.1;
}

.rank-medal-wrap .medal {
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    max-width: 22px;
    max-height: 22px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
}

.rank-medal-wrap .rank-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    margin-left: 0;
    line-height: 1;
}

/* ============================================
   人気チャンネル：1〜3位は2行表示
   ============================================ */
.rank-medal-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    line-height: 1.1;
}

.rank-medal-wrap .medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.rank-medal-wrap .rank-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    line-height: 1;
}

/* ============================================
   順位表示
   ============================================ */

/* 新着動画：1行で「メダル x位」（横並び） */
.tm-line1 .rank {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}

.tm-line1 .rank .medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.tm-line1 .rank .rank-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

/* 人気チャンネル：1〜3位は2行（メダル上、順位下） */
.rank-medal-wrap {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center;
    gap: 0.2rem;
    line-height: 1.1;
}

.rank-medal-wrap .medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.rank-medal-wrap .rank-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    line-height: 1;
}

/* ============================================
   人気チャンネル：1〜3位の順位テキストを4位以降と同じサイズに
   ============================================ */
.rank-medal-wrap .rank-text {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #666 !important;
}

/* ============================================
   新着動画：メダルとx位の間隔を0.5文字分
   ============================================ */
.tm-line1 .rank {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5em !important;
}

/* ============================================
   人気チャンネル：1〜3位のx位を4位以降と同じサイズに
   ============================================ */
.rank-medal-wrap .rank-text {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #666 !important;
    line-height: 1.2 !important;
}

/* ============================================
   ジャンルパネル：2行目・3行目を1文字分インデント
   ============================================ */
/* ============================================
   ジャンルパネル：数値右揃え + 単位左揃え
   ============================================ */


/* ============================================
   ジャンルパネル（クリーン版）
   数値は右揃え、単位は左揃え
   ============================================ */


/* ============================================
   ジャンルパネル：数値右寄せ、単位左寄せ
   ============================================ */


/* ============================================
   ジャンルパネル：数値右寄せ / 単位左寄せ（単位幅固定）
   ============================================ */
.genre-panel .gp-line2,
.genre-panel .gp-line3 {
    display: flex !important;
    align-items: baseline !important;
    white-space: nowrap !important;
    font-size: 0.78rem !important;
    line-height: 1.5 !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.genre-panel .gp-line2 .gp-num,
.genre-panel .gp-line3 .gp-num {
    flex: 1 1 auto !important;
    text-align: right !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.genre-panel .gp-line2 .gp-unit,
.genre-panel .gp-line3 .gp-unit {
    flex: 0 0 auto !important;
    min-width: 6em !important;      /* ★ 単位の幅を統一 */
    text-align: left !important;
    padding-left: 0.5em !important;
    margin: 0 !important;
    color: #888 !important;
    font-size: 0.85em !important;
}

/* ============================================
   新着動画3行目：👥アイコンと登録者数の間に0.5文字
   ============================================ */
.tm-line3 .ch-sub {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    flex-shrink: 0;
}

.tm-line3 .ch-sub .ch-icon {
    line-height: 1;
}

.tm-line3 .ch-sub .ch-num {
    line-height: 1;
}

/* ============================================
   新着動画：メダルと順位の間隔を0.3文字
   ============================================ */
.tm-line1 .rank {
    gap: 0.3em !important;
}

/* ============================================
   スマホ表示の修正（2026-09-30）
   ============================================ */

/* ② タブを1行に収める（PC・スマホ共通） */
.tab-bar {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ④ 人気チャンネル見出しの基本構造（PCは1行のまま） */
.popular-heading .ph-line1 {
    display: inline;
}
.popular-heading .ph-line2 {
    display: inline;
}
.popular-heading .ph-line2::before {
    content: "　"; /* 全角スペース（PCでは同じ行に） */
}

/* ============================================
   以下はスマホ限定（max-width: 700px）
   ============================================ */

/* ① ヘッダー統計をバナーの下へ */
@media (max-width: 700px) {
    .header-stats {
        position: static !important;
        text-align: center !important;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        font-size: 0.7rem;
    }
}

/* ② タブのフォント縮小（スマホのみ） */
@media (max-width: 600px) {
    .tab-btn {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.78rem !important;
    }
}

/* ③ ジャンルパネルをスマホでも2列に */
@media (max-width: 600px) {
    .genre-panels {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.5rem !important;
    }
    .genre-panel {
        padding: 0.6rem 0.7rem !important;
    }
    .genre-panel .gp-line1 {
        font-size: 0.85rem !important;
    }
    .genre-panel .gp-line2,
    .genre-panel .gp-line3 {
        font-size: 0.7rem !important;
    }
}

/* ④ 人気チャンネル見出しを2行に（スマホのみ） */
@media (max-width: 700px) {
    .popular-heading {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.2rem;
        align-items: flex-start;
    }
    .popular-heading .ph-line1 {
        display: block;
    }
    .popular-heading .ph-line2 {
        display: block;
        padding-left: 1.6em;
        font-size: 0.85em;
        color: #555;
        font-weight: 600;
    }
    .popular-heading .ph-line2::before {
        content: none; /* スマホでは全角スペースを消す */
    }
}

/* ⑤ チャンネル名を縦に（スマホのみ） */
@media (max-width: 700px) {
    .ch-title-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.2rem !important;
    }
    .ch-title-row h3 {
        width: 100%;
        white-space: normal !important;
        margin-bottom: 0.1rem;
    }
    .ch-meta {
        width: 100%;
        justify-content: flex-start !important;
        gap: 0.6rem !important;
    }
    .channel-block .ch-info h3 {
        font-size: 1rem !important;
    }
}

/* ⑥ 新着動画をタイトル→メタ情報の2行に（スマホのみ） */
@media (max-width: 700px) {
    .mini-video {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        grid-template-rows: auto auto;
        gap: 0.2rem 0.6rem !important;
        padding: 0.5rem 0.4rem !important;
    }
    .mini-video .mv-title {
        grid-column: 1 / -1;
        grid-row: 1;
        white-space: normal !important;
        overflow: visible !important;
        font-size: 0.85rem;
        line-height: 1.3;
        font-weight: 700;
        margin-bottom: 0.2rem;
    }
    .mini-video .mv-views {
        grid-column: 1;
        grid-row: 2;
        text-align: left !important;
        min-width: 0 !important;
        font-size: 0.75rem;
        padding-right: 0 !important;
    }
    .mini-video .mv-date {
        grid-column: 2;
        grid-row: 2;
        text-align: right !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        font-size: 0.75rem;
    }
}

/* ============================================
   スマホ：ロゴ非表示、バナー・サブタイトルを全幅に
   ============================================ */
@media (max-width: 700px) {
    /* ロゴを非表示 */
    .logo-link {
        display: none !important;
    }

    /* ヘッダーを通常フローに */
    .site-header {
        position: static !important;
        min-height: auto !important;
    }

    /* バナーを横幅いっぱいに */
    .banner {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }

    /* サブタイトルも全幅で中央寄せ */
    .site-subtitle {
        width: 100%;
        text-align: center;
        padding: 0 0.5rem;
    }
}

/* ============================================
   ヘッダー統計：ラベル右寄せ・数値左寄せ
   ============================================ */
.header-stats {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    align-items: flex-end;  /* 全体を右寄せ */
}

.header-stats .hs-row {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0.5em;
    align-items: baseline;
}

.header-stats .hs-label {
    text-align: right;
    white-space: nowrap;
}

.header-stats .hs-value {
    text-align: left;
    white-space: nowrap;
    font-weight: 600;
}

/* スマホでも同じ配置を維持 */
@media (max-width: 700px) {
    .header-stats {
        align-items: center !important;  /* スマホでは中央寄せ */
    }
    .header-stats .hs-row {
        justify-content: center;
    }
}

/* ============================================
   ヘッダー統計：ラベル右端・数値左端を上下でそろえる
   ============================================ */
.header-stats {
    display: inline-grid !important;
    grid-template-columns: auto auto;
    column-gap: 0.6em;
    row-gap: 0.15rem;
    text-align: left;
    margin-left: auto;  /* PCで右に寄せる */
}

.header-stats .hs-row {
    display: contents;  /* 親のグリッドに子を直接配置 */
}

.header-stats .hs-label {
    text-align: right;
    white-space: nowrap;
}

.header-stats .hs-value {
    text-align: left;
    white-space: nowrap;
    font-weight: 600;
}

/* スマホ：グリッドを維持しつつ中央寄せ */
@media (max-width: 700px) {
    .header-stats {
        display: inline-grid !important;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ============================================
   ヘッダー全体を中央寄せ
   ============================================ */
.site-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    position: relative;
    margin-bottom: 2rem;
    min-height: auto !important;
    padding-top: 70px;  /* ロゴ用の余白（PC） */
}

/* ロゴは左上に固定（PCのみ表示） */
.logo-link {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 2;
}

/* バナーを中央に */
.banner {
    display: block !important;
    margin: 0 auto !important;
    width: 100%;
    max-width: 500px;
    height: auto;
}

/* サブタイトルを中央に */
.site-subtitle {
    width: 100%;
    text-align: center !important;
    margin-top: 0.3rem;
}

/* 統計を中央に（absoluteを解除） */
.header-stats {
    position: static !important;
    top: auto !important;
    right: auto !important;
    margin: 0.8rem auto 0 !important;
    display: inline-grid !important;
}

/* スマホ：ロゴ非表示、パディング不要 */
@media (max-width: 700px) {
    .site-header {
        padding-top: 0 !important;
    }
    .logo-link {
        display: none !important;
    }
}
.site-header .header-stats,
.header-stats {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0.8rem auto 0 auto !important;
    display: inline-grid !important;
    grid-template-columns: auto auto !important;
    column-gap: 0.6em !important;
    row-gap: 0.15rem !important;
    text-align: left !important;
    justify-self: center;
}
.header-stats {
    position: static !important;
    display: inline-grid !important;
    grid-template-columns: auto auto !important;
    column-gap: 0.5em !important;
    row-gap: 0.15rem !important;
    margin: 0.8rem auto 0 auto !important;
    justify-self: center;
    text-align: left !important;
}
.header-stats .hs-label {
    text-align: right !important;
    white-space: nowrap;
}
.header-stats .hs-value {
    text-align: left !important;
    white-space: nowrap;
}
/* ============================================
   PC版：ロゴ削除・バナー最上部・1.6倍
   ============================================ */
/* ロゴを完全に非表示（PC・スマホ共通） */
.logo-link,
.logo {
    display: none !important;
}

/* ヘッダーをシンプルな縦並びに */
.site-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: static !important;
    padding-top: 0 !important;
    min-height: auto !important;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

/* バナーを最上部・中央・1.6倍 */
.banner {
    display: block !important;
    margin: 0 auto !important;
    width: 800px !important;
    max-width: 100% !important;
    height: auto !important;
    order: 1;
}

/* サブタイトルを1.6倍 */
.site-subtitle {
    width: 100%;
    text-align: center !important;
    font-size: 19px !important;
    margin-top: 0.5rem !important;
    order: 2;
}

/* 統計の順序を最後に */
.header-stats {
    order: 3;
}
/* PC版：サブタイトルを1.5倍に */
@media (min-width: 701px) {
    .site-subtitle {
        font-size: 28px !important;
    }
}
