/* ==========================
   セトリ予測画面
========================== */

.prediction-search-area{
    width:100%;
    padding:10px 15px;
    box-sizing:border-box;
}

.search-form{
    display:flex;
    flex-direction:column;
    gap:10px;
    width:100%;
    max-width:400px;
    margin:0 auto;
}

.search-form input{
    width:100%;
    height:40px;
    padding:0 10px;
    box-sizing:border-box;
    border:1px solid #ccc;
    border-radius:10px;
    background:#fff;
    font-family:inherit;
    font-size:16px;
    outline:none;
}

.search-form input:focus{
    border-color:#ff8fb1;
}

.search-bottom{
    display:flex;
    gap:10px;
}

.search-bottom button,
.add-btn{
    flex:1;
    height:40px;
    padding:0;
    box-sizing:border-box;
    border:none;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-family:inherit;
    font-size:14px;
}

.search-bottom button{
    background:#eee;
    color:#333;
    cursor:pointer;
}

.add-btn{
    background:#8bc34a;
    color:#fff;
    text-decoration:none;
}

.search-bottom button:active,
.add-btn:active{
    transform:scale(.97);
}


/* ==========================
   セトリ予測一覧
========================== */

.prediction-list{
    width:100%;
    padding-top:8px;
    display:flex;
    flex-direction:column;
    gap:12px;
}

.prediction-card{
    position:relative;
    width:85%;
    max-width:390px;
    min-height:150px;
    margin:0 auto;
    padding:15px;
    box-sizing:border-box;
    background:#fff;
    border-radius:20px;
    box-shadow:0 3px 8px rgba(0,0,0,.12);
    display:flex;
    flex-direction:column;
    justify-content:space-between;
}


/* ==========================
   削除ボタン
========================== */

.delete-btn{
    position:absolute;
    top:8px;
    right:8px;
    z-index:2;
    width:28px;
    height:28px;
    padding:0;
    border:none;
    border-radius:50%;
    background:#ff8a8a;
    color:#fff;
    font-size:20px;
    line-height:28px;
    text-align:center;
    cursor:pointer;
}

.delete-btn:hover{
    opacity:.8;
}


/* ==========================
   ライブ情報
========================== */

.live-name{
    margin-bottom:4px;
    font-size:16px;
    font-weight:bold;
    line-height:1.5;
    word-break:break-word;
}

.tour-name{
    margin-bottom:8px;
    color:#777;
    font-size:13px;
    line-height:1.5;
    word-break:break-word;
}

.live-info{
    font-size:13px;
    line-height:1.7;
}


/* ==========================
   セトリ予測操作
========================== */

.prediction-actions{
    width:100%;
    margin-top:15px;
    display:flex;
    align-items:stretch;
    gap:10px;
}

.match-rate{
    flex:1;
    min-width:0;
    min-height:40px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    color:#777;
    font-size:13px;
    line-height:1.5;
    text-align:center;
}

.partial-match-rate{
    color:#999;
    font-size:10px;
    font-weight:normal;
}

.no-match-rate{
    color:#aaa;
    font-size:10px;
    font-weight:normal;
}

.prediction-buttons{
    display:flex;
    align-items:stretch;
    gap:10px;
}

.detail-btn,
.edit-btn,
.share-btn,
.unshare-btn{
    width:70px;
    height:40px;
    padding:0;
    box-sizing:border-box;
    border:none;
    border-radius:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    text-decoration:none;
    font-family:inherit;
    font-size:14px;
    cursor:pointer;
}

.detail-btn{
    background:#ff8fb1;
}

.edit-btn{
    background:#64b5f6;
}

.share-btn{
    background:#111;
}

.unshare-btn{
    border:1px solid #ccc;
    background:#fff;
    color:#666;
}

.detail-btn:active,
.edit-btn:active,
.share-btn:active,
.unshare-btn:active{
    transform:scale(.97);
}

.unshare-btn:hover{
    background:#f5f5f5;
}


/* ==========================
   セトリ予測入口メニュー
========================== */

.prediction-menu{
    width:85%;
    max-width:390px;
    margin:30px auto 0;
    display:flex;
    flex-direction:column;
    gap:15px;
}

.prediction-menu-btn{
    width:100%;
    min-height:70px;
    padding:15px 20px;
    box-sizing:border-box;
    background:#fff;
    border-radius:20px;
    box-shadow:0 3px 8px rgba(0,0,0,.12);
    display:flex;
    align-items:center;
    gap:15px;
    color:#333;
    text-decoration:none;
    font-size:16px;
    font-weight:bold;
}

.prediction-menu-btn:hover{
    opacity:.8;
}

.prediction-menu-icon{
    width:40px;
    height:40px;
    flex-shrink:0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:28px;
}


/* ==========================
   AIセトリ予測 詳細
========================== */

.detail-section-title{
    margin-bottom:15px;
    font-size:16px;
    font-weight:bold;
}

.ai-setlist{
    width:100%;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.ai-song{
    width:100%;
    padding:12px;
    box-sizing:border-box;
    background:#f9f9f9;
    border-radius:12px;
    display:flex;
    align-items:flex-start;
    gap:12px;
}

.ai-song-order{
    width:32px;
    height:32px;
    flex-shrink:0;
    border-radius:50%;
    background:#ff8fb1;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:14px;
    font-weight:bold;
}

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

.ai-song-name{
    font-size:15px;
    font-weight:bold;
    line-height:1.5;
    word-break:break-word;
}

.ai-song-album{
    margin-top:3px;
    color:#888;
    font-size:12px;
}

.ai-song-medley{
    display:inline-block;
    margin-top:6px;
    padding:3px 8px;
    border-radius:8px;
    background:#ffcfdf;
    color:#555;
    font-size:11px;
}

.ai-song-required{
    display:inline-block;
    margin-top:6px;
    margin-left:5px;
    padding:3px 8px;
    border-radius:8px;
    background:#ffe082;
    color:#555;
    font-size:11px;
}

.ai-song-score{
    margin-top:6px;
    color:#777;
    font-size:12px;
}

.ai-song-reason{
    margin-top:8px;
    padding:8px 10px;
    box-sizing:border-box;
    background:#fff;
    border-radius:8px;
    color:#666;
    font-size:12px;
    line-height:1.6;
}


/* ==========================
   一致率
========================== */

.match-card{
    padding-bottom:15px;
}

.match-rate-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:45px;
    padding:8px 0;
    box-sizing:border-box;
    border-bottom:1px solid #eee;
}

.match-rate-item:last-child{
    border-bottom:none;
}

.match-rate-label{
    color:#666;
    font-size:13px;
    font-weight:bold;
}

.match-rate-value{
    color:#555;
    font-size:16px;
    font-weight:bold;
    text-align:right;
}


/* ==========================
   データなし
========================== */

.no-prediction{
    width:90%;
    max-width:400px;
    margin:30px auto;
    color:#777;
    text-align:center;
}


/* ==========================
   詳細画面フッター
========================== */

.ai-prediction-detail-footer{
    width:85%;
    max-width:390px;
    margin:0 auto;
    padding:5px 0 50px;
    box-sizing:border-box;
    color:#aaa;
    font-size:11px;
    line-height:1.4;
    text-align:center;
}


/* ==========================
   PC
========================== */

@media(min-width:601px){

    .prediction-search-area,
    .page-scroll{
        width:100%;
        max-width:1100px;
        margin:0;
        box-sizing:border-box;
        align-self:flex-start;
    }

    .prediction-search-area{
        padding:10px 30px;
    }

    .search-form{
        max-width:none;
        margin:0;
    }

    .page-scroll .container{
        width:100%;
        max-width:none;
        margin:0;
        padding:0 30px 40px;
        box-sizing:border-box;
    }

    .prediction-list{
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:15px;
    }

    .prediction-card{
        width:100%;
        max-width:none;
        margin:0;
    }

    .prediction-menu{
        width:100%;
        max-width:500px;
        margin:10px 0 0;
    }

    .no-prediction{
        width:100%;
        max-width:none;
        margin:30px 0;
        text-align:left;
    }

    .ai-prediction-detail-footer{
        width:100%;
        max-width:none;
        margin:0;
        text-align:left;
    }
}


/* ==========================
   スマートフォン
========================== */

@media(max-width:600px){

    .prediction-search-area{
        padding:8px 10px;
    }

    .prediction-card{
        width:calc(100% - 24px);
        max-width:none;
        padding:18px;
    }

    .prediction-actions{
        display:flex;
        flex-direction:row;
        align-items:center;
        gap:10px;
    }

    .match-rate{
        flex:1;
        width:auto;
        min-width:0;
        min-height:50px;
    }

    .prediction-buttons{
        width:90px;
        flex-shrink:0;
        display:flex;
        flex-direction:column;
        gap:5px;
    }

    .detail-btn,
    .edit-btn,
    .share-btn,
    .unshare-btn{
        width:90px;
        height:30px;
        min-height:30px;
        font-size:12px;
        border-radius:8px;
    }

    .match-rate-item{
        min-height:42px;
    }

    .match-rate-label{
        font-size:12px;
    }

    .match-rate-value{
        font-size:15px;
    }
}

/* Responsive layout standard */
.container{width:100%;max-width:none;margin:0;padding:0 30px 40px;box-sizing:border-box;}
@media(min-width:601px){.prediction-card{width:100%;max-width:none;margin:0;}.prediction-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;}}
@media(min-width:1100px){.prediction-list{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(min-width:1500px){.prediction-list{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(max-width:600px){.container{max-width:430px;padding:8px 12px 30px;}}

.container{width:100%;max-width:none;margin:0;padding:0 30px 40px;box-sizing:border-box;}@media(min-width:601px){.prediction-card{width:100%;max-width:none;margin:0;}.prediction-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;}}@media(min-width:1100px){.prediction-list{grid-template-columns:repeat(3,minmax(0,1fr));}}@media(min-width:1500px){.prediction-list{grid-template-columns:repeat(4,minmax(0,1fr));}}@media(max-width:600px){.container{max-width:430px;padding:8px 12px 30px;}}

/* セトリ予測カードはPCでも最大3列にして幅を確保 */
@media(min-width:601px){
    .prediction-list{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(min-width:1100px){
    .prediction-list{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}
@media(min-width:1500px){
    .prediction-list{
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
}


/* セトリ予測一覧：カードを大きくし、最大2列 */
@media(min-width:601px){
    .prediction-list{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(min-width:1100px){
    .prediction-list{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}
@media(min-width:1500px){
    .prediction-list{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}


/* セトリ予測一覧：一致率サマリー */
.prediction-card .match-rate { gap: 7px; align-items: stretch; }
.prediction-match-summary { width:100%; padding:9px 10px; border-radius:12px; background:linear-gradient(135deg,#fff5f8,#fff0f7); text-align:center; box-sizing:border-box; }
.prediction-match-summary-label { color:#a04d70; font-size:11px; font-weight:700; }
.prediction-match-summary-value { color:#ed4d91; font-size:25px; font-weight:800; line-height:1.2; font-variant-numeric:tabular-nums; }
.prediction-match-summary-count { margin-top:3px; color:#555; font-size:11px; font-weight:700; }
.prediction-match-summary-note { margin-top:2px; color:#999; font-size:9px; }
.prediction-match-breakdown { display:flex; flex-direction:column; gap:3px; width:100%; padding:7px 9px; border:1px solid #f3e3e9; border-radius:9px; background:#fff; box-sizing:border-box; }
.prediction-match-breakdown span { display:flex; justify-content:space-between; gap:8px; color:#777; font-size:10px; }
.prediction-match-breakdown strong { color:#444; font-size:11px; }
@media(max-width:600px) { .prediction-match-summary-value { font-size:22px; } }

/* =========================================================
   セトリ予測一覧：カード内の情報バランス調整
   一致率・集計待ち表示と操作ボタンを独立した段に配置
========================================================= */
.prediction-card {
    min-height: 0;
    height: 100%;
    justify-content: flex-start;
    gap: 0;
}
.prediction-card .live-name {
    padding-right: 26px;
    margin-bottom: 6px;
}
.prediction-card .live-info {
    line-height: 1.65;
}
.prediction-match-area {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(150px, .85fr);
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
}
.prediction-card .prediction-match-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 92px;
    padding: 10px 12px;
}
.prediction-card .prediction-match-summary-value {
    font-size: 28px;
}
.prediction-card .prediction-match-summary-count {
    font-size: 11px;
    line-height: 1.45;
}
.prediction-card .prediction-match-summary-note {
    font-size: 9px;
    line-height: 1.35;
}
.prediction-card .prediction-match-breakdown {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
    padding: 8px 10px;
}
.prediction-card .prediction-match-breakdown span {
    min-height: 30px;
    align-items: center;
    font-size: 11px;
}
.prediction-card .prediction-match-breakdown span + span {
    border-top: 1px solid #f3e8ed;
}
.prediction-card .prediction-match-breakdown strong {
    white-space: nowrap;
    font-size: 12px;
}
.prediction-match-pending {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin-top: 12px;
    padding: 8px 12px;
    border: 1px dashed #f0c8d8;
    border-radius: 10px;
    background: #fff9fb;
    color: #a66b83;
    box-sizing: border-box;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}
.prediction-card .prediction-actions {
    width: 100%;
    margin-top: 12px;
    display: block;
}
.prediction-card .prediction-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    width: 100%;
}
.prediction-card .prediction-buttons > * {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: 112px;
    height: 36px;
    min-height: 36px;
    border-radius: 9px;
    font-size: 12px;
}
.prediction-card .prediction-buttons .share-btn img {
    max-width: 22px;
    max-height: 22px;
    object-fit: contain;
}
@media (min-width: 601px) {
    .prediction-card {
        padding: 16px 18px;
    }
    .prediction-card .prediction-buttons {
        justify-content: flex-end;
    }
}
@media (max-width: 600px) {
    .prediction-card {
        width: calc(100% - 24px);
        padding: 15px 14px;
        border-radius: 16px;
    }
    .prediction-match-area {
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
        margin-top: 10px;
    }
    .prediction-card .prediction-match-summary {
        min-height: 82px;
        padding: 8px 10px;
    }
    .prediction-card .prediction-match-summary-value {
        font-size: 25px;
    }
    .prediction-card .prediction-match-breakdown {
        flex-direction: row;
        align-items: stretch;
        padding: 5px 8px;
    }
    .prediction-card .prediction-match-breakdown span {
        flex: 1 1 0;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
        min-height: 38px;
        text-align: center;
        font-size: 10px;
    }
    .prediction-card .prediction-match-breakdown span + span {
        border-top: 0;
        border-left: 1px solid #f3e8ed;
    }
    .prediction-card .prediction-match-breakdown strong {
        font-size: 12px;
    }
    .prediction-match-pending {
        min-height: 40px;
        margin-top: 10px;
        font-size: 11px;
    }
    .prediction-card .prediction-actions {
        margin-top: 10px;
    }
    .prediction-card .prediction-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .prediction-card .prediction-buttons > * {
        width: 100%;
        max-width: none;
        height: 34px;
        min-height: 34px;
        font-size: 12px;
    }
}


/* =========================================================
   AIセトリ予測詳細：一覧カード用スタイルの影響を遮断
   共通の .prediction-card は一覧専用とし、詳細画面は独立管理する
========================================================= */
.ai-prediction-detail-page {
    align-items: stretch;
}
.ai-prediction-detail-page > .page-scroll {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    min-height: 0;
}
.ai-prediction-detail-page .container {
    flex: 0 0 auto;
    width: 100%;
    max-width: 1100px;
    min-width: 0;
    margin: 0;
    padding: 16px 20px 30px;
    box-sizing: border-box;
}
.ai-prediction-detail-page .ai-detail-card {
    position: relative;
    display: block;
    width: 100%;
    max-width: 760px;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 0 16px;
    padding: 18px 20px;
    box-sizing: border-box;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,.10);
}
.ai-prediction-detail-page .ai-detail-card .live-name {
    margin: 0 0 6px;
    padding-right: 0;
    font-size: 16px;
    line-height: 1.5;
}
.ai-prediction-detail-page .ai-detail-card .live-info {
    font-size: 13px;
    line-height: 1.7;
}
.ai-prediction-detail-page .ai-detail-card .detail-section-title {
    margin: 0 0 12px;
}
.ai-prediction-detail-page .ai-detail-card.match-card {
    padding-bottom: 12px;
}
.ai-prediction-detail-page .ai-prediction-detail-footer {
    flex: 0 0 auto;
    width: 100%;
    max-width: 760px;
    margin: 0;
    padding: 4px 0 24px;
}

@media (max-width: 600px) {
    .ai-prediction-detail-page .container {
        padding: 12px 12px 24px;
    }
    .ai-prediction-detail-page .ai-detail-card {
        width: 100%;
        max-width: none;
        margin-bottom: 12px;
        padding: 15px 14px;
        border-radius: 15px;
    }
    .ai-prediction-detail-page .ai-prediction-detail-footer {
        padding-bottom: 20px;
    }
    
}


/* =========================================================
   AIセトリ予測詳細：全幅スクロールと本番比較レイアウト
========================================================= */
.ai-prediction-detail-page > .page-scroll {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: 1 1 0;
    align-self: stretch;
}
.ai-prediction-detail-page .container {
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 16px 24px 36px;
}
.ai-prediction-detail-page .ai-detail-card {
    width: 100%;
    max-width: none;
}
.ai-prediction-detail-page .ai-live-info-card,
.ai-prediction-detail-page .match-card {
    max-width: 1100px;
}
.ai-comparison-card {
    min-width: 0;
}
.ai-comparison-heading,
.ai-comparison-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}
.ai-comparison-heading {
    padding: 0 12px 8px;
    border-bottom: 1px solid #f0e3e8;
}
.ai-comparison-heading .detail-section-title {
    margin: 0;
}
.ai-comparison-heading-actual {
    grid-column: 3;
    color: #d94f86;
    font-size: 16px;
    font-weight: 700;
}
.ai-comparison-list {
    display: flex;
    flex-direction: column;
}
.ai-comparison-row {
    min-height: 58px;
    padding: 9px 12px;
    border-bottom: 1px solid #f2edf0;
}
.ai-comparison-predicted,
.ai-comparison-actual {
    min-width: 0;
    overflow-wrap: anywhere;
}
.ai-comparison-song {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
.ai-comparison-order {
    display: inline-flex;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ff8fb1;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}
.ai-comparison-name {
    min-width: 0;
    color: #333;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}
.ai-comparison-arrow {
    color: #aaa;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}
.ai-comparison-actual {
    color: #d94f86;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}
.ai-comparison-actual.is-medley-mismatch {
    color: #d97706;
}
.ai-comparison-actual.is-missing {
    color: #aaa;
    font-weight: 500;
}
.ai-comparison-reason {
    margin: -2px 12px 8px 49px;
    color: #999;
    font-size: 11px;
    line-height: 1.5;
}
@media (max-width: 767px) {
    .ai-prediction-detail-page .container {
        padding: 12px 12px 28px;
    }
    .ai-comparison-heading,
    .ai-comparison-row {
        grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
        gap: 5px;
        padding-left: 7px;
        padding-right: 7px;
    }
    .ai-comparison-heading-actual {
        font-size: 13px;
    }
    .ai-comparison-name,
    .ai-comparison-actual {
        font-size: 12px;
    }
    .ai-comparison-order {
        flex-basis: 23px;
        width: 23px;
        height: 23px;
        font-size: 10px;
    }
    .ai-comparison-song {
        gap: 5px;
    }
    .ai-comparison-arrow {
        font-size: 16px;
    }
    .ai-comparison-reason {
        margin-left: 35px;
    }
}


/* =========================================================
   AIセトリ予測詳細：結果分析・曲数差表示
========================================================= */
.ai-prediction-detail-page > .page-scroll {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    align-self: stretch;
}
.ai-prediction-detail-page .container {
    width: 100%;
    max-width: none;
    min-width: 0;
}
.ai-result-overview {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
    align-items: stretch;
    gap: 16px;
    width: 100%;
    margin-bottom: 16px;
}
.ai-result-overview > .ai-detail-card {
    max-width: none;
    min-width: 0;
    margin: 0;
}
.ai-result-overview .match-card {
    padding-bottom: 18px;
}
.ai-rate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.ai-rate-highlight {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 104px;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff4f8, #fff0f7);
    color: #a04d70;
    gap: 5px;
}
.ai-rate-highlight span {
    font-size: 12px;
    font-weight: 700;
}
.ai-rate-highlight strong {
    color: #ed4d91;
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.ai-count-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}
.ai-count-grid > div,
.ai-medley-rates > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 11px;
    border: 1px solid #f1e6eb;
    border-radius: 9px;
    color: #777;
    font-size: 12px;
}
.ai-count-grid strong,
.ai-medley-rates strong {
    color: #444;
    white-space: nowrap;
    font-size: 14px;
}
.ai-medley-rates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.ai-analysis-card {
    display: flex !important;
    flex-direction: column;
}
.ai-analysis-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 39px;
    padding: 7px 0;
    border-bottom: 1px solid #f1edf0;
    color: #666;
    font-size: 12px;
}
.ai-analysis-stat strong {
    color: #444;
    font-size: 16px;
    white-space: nowrap;
}
.ai-analysis-stat strong.is-good {
    color: #15966b;
}
.ai-analysis-stat strong.is-warning {
    color: #d97706;
}
.ai-feedback {
    margin-top: 12px;
    padding: 13px 14px;
    border: 1px solid #f4d5e2;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff7fa, #fff1f7);
}
.ai-feedback-title {
    margin-bottom: 6px;
    color: #d94f86;
    font-size: 13px;
    font-weight: 800;
}
.ai-feedback p {
    margin: 0;
    color: #66515b;
    font-size: 12px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.ai-comparison-none {
    color: #aaa;
    font-size: 13px;
    font-weight: 500;
}
.ai-comparison-actual.is-missing,
.ai-comparison-actual.is-actual-only {
    color: #d97706;
}
.ai-comparison-actual.is-medley-mismatch {
    color: #d97706;
}
@media (max-width: 900px) {
    .ai-result-overview {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 600px) {
    .ai-result-overview {
        gap: 10px;
        margin-bottom: 12px;
    }
    .ai-rate-highlight {
        min-height: 86px;
        padding: 9px;
    }
    .ai-rate-highlight strong {
        font-size: 27px;
    }
    .ai-count-grid > div,
    .ai-medley-rates > div {
        padding: 8px;
        font-size: 11px;
    }
    .ai-count-grid strong,
    .ai-medley-rates strong {
        font-size: 13px;
    }
    .ai-analysis-stat {
        font-size: 11px;
    }
    .ai-analysis-stat strong {
        font-size: 14px;
    }
}



/* =========================================================
   AIセトリ予測詳細：曲順番号固定の比較・メドレーグループ表示
========================================================= */
.ai-comparison-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #f2edf0;
}
.ai-comparison-group.is-medley {
    margin: 7px 0;
    border: 1px solid #f3d5e1;
    border-left: 4px solid #f28ab0;
    border-radius: 12px;
    background: #fff9fb;
}
.ai-comparison-side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    min-width: 0;
}
.ai-comparison-group-label {
    display: inline-flex;
    align-self: flex-start;
    padding: 3px 9px;
    border-radius: 999px;
    background: #ffe2ec;
    color: #c84d7d;
    font-size: 11px;
    font-weight: 700;
}
.ai-comparison-group-label.is-warning {
    background: #fff0d9;
    color: #bd720b;
}
.ai-comparison-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.ai-comparison-order,
.ai-comparison-actual-order {
    display: inline-flex;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ff8fb1;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.ai-comparison-actual-order {
    border-radius: 8px;
    background: #fff0d9;
    color: #bd720b;
}
.ai-comparison-name,
.ai-comparison-actual-name {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #333;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}
.ai-comparison-actual-name {
    color: #d94f86;
}
.ai-comparison-medley-index {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 6px;
    background: #ffe8f0;
    color: #bd5c83;
    font-size: 10px;
    font-weight: 700;
}
.ai-comparison-group .ai-comparison-arrow {
    align-self: center;
}
.ai-comparison-group .ai-comparison-reason {
    margin: -3px 0 2px 36px;
    font-size: 10px;
}
.ai-comparison-group .ai-comparison-none {
    padding: 5px 0;
}
.ai-comparison-side.is-medley-mismatch .ai-comparison-actual-name,
.ai-comparison-side.is-missing .ai-comparison-actual-name {
    color: #bd720b;
}

@media (max-width: 767px) {
    .ai-comparison-group {
        grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
        gap: 5px;
        padding: 9px 6px;
    }
    .ai-comparison-group.is-medley {
        padding: 9px 6px;
    }
    .ai-comparison-item {
        gap: 5px;
    }
    .ai-comparison-order,
    .ai-comparison-actual-order {
        flex-basis: 22px;
        width: 22px;
        height: 22px;
        font-size: 9px;
    }
    .ai-comparison-name,
    .ai-comparison-actual-name {
        font-size: 11px;
    }
    .ai-comparison-group-label {
        font-size: 10px;
    }
    .ai-comparison-group .ai-comparison-reason {
        margin-left: 27px;
        font-size: 9px;
    }
    
}



/* =========================================================
   セトリ予測4画面：共通広告の配置を全幅スクロール領域に統一
   一覧用 .page-scroll の max-width 制限を広告配置には引き継がない
========================================================= */
.main-layout .page-scroll.has-site-ad {
    width: 100%;
    max-width: none;
    align-self: stretch;
    margin: 0;
}


/* =========================================================
   AIセトリ予測詳細：スマホ向け曲数・曲別比較レイアウト
========================================================= */
.ai-prediction-detail-page .ai-count-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ai-prediction-detail-page .ai-count-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
    min-height: 72px;
    padding: 10px 8px;
    border: 1px solid #f1e6eb;
    border-radius: 10px;
    background: #fff;
    text-align: center;
}
.ai-prediction-detail-page .ai-count-label {
    color: #888;
    font-size: 11px;
}
.ai-prediction-detail-page .ai-count-item strong {
    color: #444;
    font-size: 17px;
    white-space: nowrap;
}
.ai-prediction-detail-page .ai-count-item small {
    color: #bd5c83;
    font-size: 11px;
}
.ai-prediction-detail-page .ai-comparison-group {
    display: block;
    min-width: 0;
    padding: 10px 12px;
}
.ai-prediction-detail-page .ai-comparison-medley-title {
    display: inline-flex;
    margin: 0 0 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ffe2ec;
    color: #c84d7d;
    font-size: 12px;
    font-weight: 800;
}
.ai-prediction-detail-page .ai-comparison-pair {
    min-width: 0;
    padding: 8px 0;
    border-bottom: 1px solid #f4edf0;
}
.ai-prediction-detail-page .ai-comparison-pair:last-child {
    border-bottom: 0;
}
.ai-prediction-detail-page .ai-comparison-pair-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}
.ai-prediction-detail-page .ai-comparison-predicted,
.ai-prediction-detail-page .ai-comparison-actual {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}
.ai-prediction-detail-page .ai-comparison-actual {
    color: #d97706;
}
.ai-prediction-detail-page .ai-comparison-actual.is-mismatch {
    color: #d97706;
}
.ai-prediction-detail-page .ai-comparison-actual-name {
    color: inherit;
}
.ai-prediction-detail-page .ai-comparison-reason {
    margin: 5px 0 0 36px;
    padding: 5px 8px;
    border-radius: 7px;
    background: #faf8f9;
    color: #888;
    font-size: 11px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
@media (max-width: 600px) {
    .ai-prediction-detail-page .ai-count-grid {
        gap: 7px;
    }
    .ai-prediction-detail-page .ai-count-item {
        min-height: 76px;
        padding: 8px 5px;
    }
    .ai-prediction-detail-page .ai-count-item strong {
        font-size: 15px;
    }
    .ai-prediction-detail-page .ai-count-item small {
        font-size: 10px;
    }
    .ai-prediction-detail-page .ai-comparison-group {
        padding: 8px 7px;
    }
    .ai-prediction-detail-page .ai-comparison-pair-line {
        grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr);
        gap: 4px;
    }
    .ai-prediction-detail-page .ai-comparison-predicted,
    .ai-prediction-detail-page .ai-comparison-actual {
        gap: 4px;
        align-items: flex-start;
    }
    .ai-prediction-detail-page .ai-comparison-order,
    .ai-prediction-detail-page .ai-comparison-actual-order {
        flex: 0 0 21px;
        width: 21px;
        height: 21px;
        font-size: 9px;
    }
    .ai-prediction-detail-page .ai-comparison-name,
    .ai-prediction-detail-page .ai-comparison-actual-name {
        font-size: 11px;
        line-height: 1.45;
    }
    .ai-prediction-detail-page .ai-comparison-arrow {
        font-size: 14px;
    }
    .ai-prediction-detail-page .ai-comparison-reason {
        margin-left: 25px;
        padding: 5px 7px;
        font-size: 10px;
    }
}

.ai-prediction-detail-page .ai-count-value {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
}
.ai-prediction-detail-page .ai-count-value small {
    color: #bd5c83;
    font-size: 11px;
    font-weight: 600;
}
@media (max-width: 600px) {
    .ai-prediction-detail-page .ai-count-value {
        gap: 2px;
    }
    .ai-prediction-detail-page .ai-count-value small {
        font-size: 10px;
    }
}
