/* ==========================
   回収済み楽曲 一覧3画面（A案：帯見出し＋白カード）
   対象：回収済み／未回収／ライブ登場曲
========================== */

.cs-list-container{
    width:100%;
    max-width:1348px;
    margin:0;
    padding:14px 15px 30px;
    box-sizing:border-box;
}


/* ==========================
   検索＋集計対象ツールバー
========================== */

.cs-list-tools{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-bottom:14px;
}

.cs-list-tools .search-toggle-btn{
    width:100%;
    max-width:none;
    margin:0;
    border:1px solid var(--theme-border-soft);
    border-radius:999px;
    background:#fff;
    box-shadow:0 6px 18px rgba(61,44,46,.06);
}

.cs-list-tools .search-toggle-icon{
    display:flex;
    align-items:center;
    color:var(--theme-primary);
}

.cs-list-tools .search-toggle-icon svg{
    width:18px;
    height:18px;
}

.cs-list-container .search-area{
    max-width:none;
    margin:0 0 14px;
    border:1px solid var(--theme-border-soft);
    border-radius:18px;
    box-shadow:0 6px 18px rgba(61,44,46,.06);
}


/* ==========================
   集計対象切り替え（ピル型）
========================== */

.collection-mode{
    display:flex;
    gap:8px;
}

.collection-mode .mode-btn{
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    padding:6px 4px;
    box-sizing:border-box;
    background:#fff;
    border:1px solid var(--theme-border-soft);
    border-radius:999px;
    color:var(--theme-text-sub);
    font-size:12px;
    font-weight:bold;
    line-height:1.35;
    text-align:center;
    text-decoration:none;
}

.collection-mode .mode-btn.active{
    background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));
    border-color:transparent;
    color:#fff;
}

.collection-mode .mode-btn:active{
    transform:scale(.98);
}


/* ==========================
   楽曲一覧
========================== */

.song-list{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.song-card{
    display:flex;
    align-items:flex-start;
    gap:12px;
    width:100%;
    padding:14px 16px;
    box-sizing:border-box;
    background:#fff;
    border:1px solid var(--theme-border-soft);
    border-radius:18px;
    box-shadow:0 6px 18px rgba(61,44,46,.06);
}

.song-main{
    flex:1;
    min-width:0;
}

.song-header{
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    min-width:0;
}

.song-name{
    flex:1;
    min-width:0;
    color:var(--theme-text);
    font-size:16px;
    font-weight:bold;
    line-height:1.5;
    word-break:break-word;
}

.listen-count,
.appearance-count{
    flex:0 0 auto;
    padding:4px 11px;
    border-radius:999px;
    background:var(--theme-blush);
    color:var(--theme-primary);
    font-size:12px;
    font-weight:bold;
    white-space:nowrap;
}


/* ==========================
   詳細アイコン
========================== */

.detail-icon{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    width:38px;
    height:38px;
    margin-top:1px;
    box-sizing:border-box;
    background:var(--theme-blush);
    border-radius:50%;
    color:var(--theme-primary);
    text-decoration:none;
}

.detail-icon svg{
    width:19px;
    height:19px;
}

.detail-icon:active{
    transform:scale(.92);
}


/* ==========================
   配信リンク
========================== */

.song-links{
    display:flex;
    width:100%;
    margin-top:10px;
    gap:8px;
}

.song-link{
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:0;
    min-height:36px;
    padding:5px 8px;
    box-sizing:border-box;
    border:1px solid var(--theme-border-soft);
    border-radius:12px;
    font-size:10px;
    font-weight:bold;
    line-height:1.2;
    text-align:center;
    text-decoration:none;
    white-space:nowrap;
}

.song-link:active{
    transform:scale(.96);
}

.song-link.youtube{
    background:#fff;
}

/* YouTube公式ロゴリンク */
.song-link.youtube-logo-link{
    min-height:36px;
    padding:4px 8px;
    background:#fff;
}

.youtube-brand-logo{
    display:block;
    width:96px;
    max-width:100%;
    height:auto;
    max-height:31px;
    object-fit:contain;
}

@media(max-width:600px){
    .song-link.youtube-logo-link{
        min-height:33px;
        padding:4px 6px;
    }

    .youtube-brand-logo{
        width:88px;
        max-height:28px;
    }
}


/* ==========================
   曲がない場合
========================== */

.no-song{
    padding:30px 18px;
    box-sizing:border-box;
    background:#fff;
    border:1px solid var(--theme-border-soft);
    border-radius:18px;
    box-shadow:0 6px 18px rgba(61,44,46,.06);
    color:var(--theme-text-muted);
    font-size:14px;
    text-align:center;
}


/* ==========================
   PC・タブレット
========================== */

@media(min-width:768px){
    .cs-list-container{
        padding:20px 30px 40px;
    }

    .collection-mode .mode-btn{
        font-size:13px;
    }
}

@media(min-width:900px){
    .cs-list-tools{
        flex-direction:row;
        align-items:stretch;
    }

    .cs-list-tools .collection-mode{
        order:1;
        flex:1 1 auto;
        max-width:600px;
    }

    .cs-list-tools .search-toggle-btn{
        order:2;
        flex:0 0 300px;
        width:300px;
        height:auto;
    }

    /* 一覧は1枚の白カード＋罫線区切りの行にする */
    .song-list{        gap:0;
        padding:4px 20px;
        background:#fff;
        border:1px solid var(--theme-border-soft);
        border-radius:20px;
        box-shadow:0 6px 18px rgba(61,44,46,.06);
    }

    .song-card{
        padding:16px 0;
        background:transparent;
        border:0;
        border-radius:0;
        box-shadow:none;
    }

    .song-card + .song-card{
        border-top:1px solid var(--theme-border-soft);
    }

    /* 広い画面では配信リンクのピルが間延びしないよう幅を抑える */
    .song-links{
        max-width:600px;
    }
}

/* ==========================
   ワイドグリッド（1200px以上）
========================== */

@media(min-width:1200px){
    .cs-list-container{
        max-width:none;
    }

    .song-list{
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:16px;
        padding:0;
        background:transparent;
        border:0;
        border-radius:0;
        box-shadow:none;
    }

    .song-card{
        padding:16px 18px;
        background:#fff;
        border:1px solid var(--theme-border-soft);
        border-radius:20px;
        box-shadow:0 6px 18px rgba(61,44,46,.06);
    }

    .song-card + .song-card{
        border-top:1px solid var(--theme-border-soft);
    }

    .song-links{
        max-width:none;
    }
}

@media(min-width:1900px){
    .song-list{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}
