/* ==========================
   ホーム（リニューアル：ヒーロー＋ベントーグリッド）
========================== */

/* ヒーロー */
.home-hero-main{position:relative;min-width:0}

.home-hero-next{display:none}

.home-hero{
    position:relative;
    margin:12px 12px 12px;
    padding:18px 16px;
    border-radius:26px;
    background:linear-gradient(120deg,var(--theme-hero-from),var(--theme-hero-mid) 55%,var(--theme-hero-to));
    box-shadow:0 16px 32px rgba(var(--theme-primary-rgb),.15);
    color:#fff;
}

.home-hero-profile{
    display:flex;
    align-items:center;
    gap:14px;
    color:#fff;
    text-decoration:none;
}

/* ヒーロー全体をマイページへのリンク範囲にする（集計側にリンクはないため全面に広げる） */
.home-hero-profile::after{
    content:"";
    position:absolute;
    inset:0;
    border-radius:26px;
}

.home-profile-image{
    flex:0 0 auto;
    width:54px;
    height:54px;
    border-radius:50%;
    overflow:hidden;
    background:var(--theme-blush);
    border:3px solid rgba(255,255,255,.75);
    display:flex;
    align-items:center;
    justify-content:center;
}

.home-profile-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.home-profile-default{font-size:26px;line-height:1}

.home-hero-profile-info{min-width:0;flex:1}

.home-profile-name{
    font-size:19px;
    font-weight:bold;
    line-height:1.35;
    word-break:auto-phrase;
}

.home-hero-chip{
    display:inline-block;
    margin-top:5px;
    padding:3px 9px;
    border-radius:999px;
    background:rgba(255,255,255,.24);
    font-size:11.5px;
    font-weight:bold;
    line-height:1.5;
}

.home-hero-birthday{
    margin-top:7px;
    font-size:12.5px;
    font-weight:bold;
    line-height:1.5;
}

.home-hero-arrow{
    flex:0 0 auto;
    font-size:26px;
    line-height:1;
    color:rgba(255,255,255,.85);
}

.home-hero-stats{margin-top:14px}

.home-hero-stats-head{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
    margin-bottom:8px;
}

.home-hero-stats-group{
    padding:4px 6px;
    border-radius:8px;
    background:rgba(255,255,255,.16);
    font-size:11px;
    font-weight:bold;
    line-height:1.5;
    letter-spacing:.08em;
    text-align:center;
}

.home-hero-stats-group-wide{grid-column:span 2}

.home-hero-stats-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
}

.home-hero-stat{
    padding:10px 6px 9px;
    border-radius:18px;
    background:rgba(255,255,255,.15);
    text-align:center;
}

.home-ring{
    position:relative;
    width:58px;
    height:58px;
    margin:0 auto;
}

.home-ring svg{width:100%;height:100%;display:block}

.home-ring-track{fill:none;stroke:rgba(255,255,255,.35);stroke-width:8}

.home-ring-value{fill:none;stroke:#fff;stroke-width:8;stroke-linecap:round}

.home-ring-text{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:15px;
    font-weight:bold;
    line-height:1;
}

.home-ring-text span{font-size:10px;margin-left:1px}

.home-hero-stat-label{
    margin-bottom:7px;
    font-size:10.5px;
    font-weight:bold;
    line-height:1.4;
    word-break:auto-phrase;
}

.home-hero-stat-meta{
    margin-top:2px;
    font-size:10px;
    line-height:1.45;
    color:rgba(255,255,255,.88);
}

/* ベントーグリッド */
.home-bento-stack{display:contents}

.home-bento{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:12px;
    margin:0 12px 20px;
}

.home-bento-card{
    min-width:0;
    padding:16px;
    box-sizing:border-box;
    border:1px solid var(--theme-border-soft);
    border-radius:20px;
    background:#fff;
    box-shadow:0 10px 24px rgba(var(--theme-brand-rgb),.07);
}

.home-bento-title{
    display:flex;
    align-items:center;
    gap:8px;
    margin-bottom:12px;
    color:var(--theme-text);
    font-size:16px;
    font-weight:bold;
    line-height:1.5;
}

.home-bento-dot{
    flex:0 0 auto;
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--theme-primary);
}

.home-bento-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    width:46px;
    height:46px;
    border-radius:14px;
    background:var(--theme-blush);
    font-size:22px;
    line-height:1;
}

/* 本日の推し活情報（カルーセル） */
.home-today-carousel{position:relative;width:100%}

.home-today-track{
    display:flex;
    width:100%;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scroll-behavior:smooth;
    scrollbar-width:none;
    -ms-overflow-style:none;
    overscroll-behavior-x:contain;
}

.home-today-track::-webkit-scrollbar{display:none}

.home-today-slide{
    flex:0 0 100%;
    width:100%;
    min-width:100%;
    scroll-snap-align:start;
    scroll-snap-stop:always;
}

.home-today-card{
    display:flex;
    align-items:center;
    min-height:84px;
    padding:16px 18px;
    box-sizing:border-box;
    border:1px solid #f9e2e7;
    border-radius:16px;
    background:#fffafb;
}

.home-today-link{color:var(--theme-text);text-decoration:none}

.home-today-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 50px;
    width:50px;
    height:50px;
    margin-right:14px;
    border-radius:15px;
    background:#fff;
    font-size:25px;
    line-height:1;
    box-shadow:0 2px 5px rgba(var(--theme-brand-rgb),.08);
}

.home-today-content{min-width:0;flex:1}

.home-today-label{
    color:var(--theme-text);
    font-size:15.5px;
    font-weight:bold;
    line-height:1.5;
    word-break:auto-phrase;
}

.home-today-message{
    margin-top:4px;
    color:var(--theme-text-muted);
    font-size:12px;
    line-height:1.6;
}

.home-today-years{
    margin-top:4px;
    color:var(--theme-primary);
    font-size:12px;
    font-weight:bold;
    line-height:1.5;
}

.home-today-arrow{
    flex:0 0 auto;
    margin-left:10px;
    color:#d8a7b3;
    font-size:27px;
    line-height:1;
}

.home-today-dots{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    margin-top:10px;
}

.home-today-dot{
    width:7px;
    height:7px;
    padding:0;
    border:0;
    border-radius:50%;
    background:#f0ccd4;
    cursor:pointer;
}

.home-today-dot.active{
    width:8px;
    height:8px;
    background:var(--theme-primary);
}

/* メロフラ */
.home-melody_flag-head{
    display:flex;
    align-items:center;
    gap:12px;
    color:var(--theme-text);
    text-decoration:none;
}

.home-melody_flag-texts{display:flex;flex-direction:column;min-width:0}

.home-melody_flag-title{
    font-size:16px;
    font-weight:bold;
    line-height:1.5;
    word-break:auto-phrase;
}

.home-melody_flag-sub{
    margin-top:2px;
    color:var(--theme-text-muted);
    font-size:12.5px;
    line-height:1.5;
}

.home-melody_flag-actions{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-top:15px;
}

.home-melody_flag-btn{
    display:block;
    padding:11px 14px;
    border-radius:999px;
    font-size:13.5px;
    font-weight:bold;
    line-height:1.4;
    text-align:center;
    text-decoration:none;
}

.home-melody_flag-btn-primary{
    background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));
    color:#fff;
    box-shadow:0 8px 18px rgba(var(--theme-primary-rgb),.28);
}

.home-melody_flag-btn-light{background:var(--theme-blush);color:var(--theme-brand)}

/* メニュー系カード（お知らせ・参加予定・参加記録） */
.home-bento-menu{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    width:100%;
    height:100%;
    padding:0;
    border:0;
    background:none;
    font:inherit;
    text-align:left;
    cursor:pointer;
    color:var(--theme-text);
}

.home-bento-menu-texts{
    display:flex;
    flex-direction:column;
    margin-top:11px;
    min-width:0;
}

.home-bento-menu-title{
    font-size:16px;
    font-weight:bold;
    line-height:1.5;
    word-break:auto-phrase;
}

.home-bento-menu-desc{
    margin-top:3px;
    color:var(--theme-text-muted);
    font-size:12.5px;
    line-height:1.55;
}

.home-bento-arrow{
    margin-top:auto;
    padding-top:10px;
    align-self:flex-end;
    color:var(--theme-primary);
    font-size:22px;
    font-weight:bold;
    line-height:1;
}

/* ミニゲーム */
.home-bento-game{position:relative;overflow:hidden}

.home-bento-game::after{
    content:"🎮";
    position:absolute;
    right:-14px;
    bottom:-30px;
    font-size:118px;
    line-height:1;
    opacity:.09;
    transform:rotate(-10deg);
    pointer-events:none;
}

.home-game-link{
    position:relative;
    z-index:1;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    height:100%;
    color:var(--theme-text);
    text-decoration:none;
}

.home-game-play{
    margin-top:16px;
    padding:10px 20px;
    border-radius:999px;
    background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));
    color:#fff;
    font-size:13.5px;
    font-weight:bold;
    line-height:1.4;
    box-shadow:0 8px 18px rgba(var(--theme-primary-rgb),.28);
}

/* ランキング */
.home-ranking-link{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    height:100%;
    color:var(--theme-text);
    text-decoration:none;
}

.home-ranking-more{
    margin-top:auto;
    padding-top:12px;
    align-self:flex-end;
    color:var(--theme-primary);
    font-size:13px;
    font-weight:bold;
    line-height:1.4;
}

/* その他 */
.home-other-list{display:flex;flex-direction:column}

.home-other-item{
    display:flex;
    align-items:center;
    gap:10px;
    width:100%;
    padding:11px 2px;
    border:0;
    border-bottom:1px solid #f9e8ec;
    background:none;
    font:inherit;
    text-align:left;
    cursor:pointer;
    color:var(--theme-text);
    text-decoration:none;
    box-sizing:border-box;
}

.home-other-item:last-child{border-bottom:0}

.home-other-icon{flex:0 0 26px;font-size:17px;line-height:1;text-align:center}

.home-other-text{min-width:0;flex:1;font-size:13.5px;line-height:1.5}

.home-other-arrow{flex:0 0 auto;color:#d8a7b3;font-size:21px;line-height:1}

/* タブレット */
@media(min-width:768px){
    .home-hero{
        display:flex;
        align-items:center;
        gap:26px;
        padding:26px 28px;
    }

    .home-hero-profile{flex:1 1 auto}

    .home-profile-image{width:78px;height:78px}

    .home-profile-default{font-size:38px}

    .home-profile-name{font-size:25px}

    .home-hero-stats{
        flex:0 0 auto;
        margin-top:0;
    }

    .home-hero-stats-head,
    .home-hero-stats-grid{gap:12px}

    .home-hero-stat{padding:15px 14px 12px}

    .home-ring{width:76px;height:76px}

    .home-ring-text{font-size:19px}

    .home-bento{grid-template-columns:repeat(2,minmax(0,1fr))}

    .home-bento-today,
    .home-bento-game{grid-column:span 2}
}

/* PC */
@media(min-width:1100px){
    .page-scroll .container{max-width:none;margin-left:0;margin-right:auto;padding-left:24px;padding-right:24px}

    .home-layout .page-rail-main{max-width:1348px}

    .home-hero{margin-left:15px;margin-right:15px;display:flex;gap:20px}

    .home-hero-main{flex:1 1 auto}

    .home-hero-next{
        display:flex;
        flex-direction:column;
        gap:6px;
        flex:0 0 300px;
        padding:16px 18px;
        box-sizing:border-box;
        border:1px solid rgba(255,255,255,.35);
        border-radius:20px;
        background:rgba(255,255,255,.16);
        color:#fff;
        font-family:inherit;
        text-align:left;
        cursor:pointer;
    }

    .home-hero-next-label{font-size:12px;font-weight:bold;letter-spacing:.08em}

    .home-hero-next-days{font-size:26px;font-weight:bold;line-height:1.25}

    .home-hero-next-name{
        font-size:15px;
        font-weight:bold;
        line-height:1.45;
        display:-webkit-box;
        -webkit-line-clamp:2;
        -webkit-box-orient:vertical;
        overflow:hidden;
    }

    .home-hero-next-meta{font-size:12.5px;line-height:1.5;color:rgba(255,255,255,.9)}

    .home-hero-next-cta{margin-top:auto;font-size:12.5px;font-weight:bold}

    .home-bento{margin-left:15px;margin-right:15px}
    .home-bento{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:dense}

    .home-bento-today,
    .home-bento-game{grid-column:span 1}

    .home-bento-stack{display:flex;flex-direction:column;gap:12px}

    .home-bento-stack>*{flex:1}

    .home-bento-other{grid-column:span 3}

    .home-bento-today .home-today-card{min-height:118px}
}

/* ==========================
   イベント種別選択
========================== */

.home-event-type-item{
    display:flex;
    align-items:center;
    width:100%;
    min-height:62px;
    padding:9px 10px;
    box-sizing:border-box;
    border:0;
    border-bottom:1px solid #eee;
    background:#fff;
    color:#333;
    font-family:inherit;
    text-align:left;
    cursor:pointer;
}

.home-event-type-item:first-child{border-radius:12px 12px 0 0}
.home-event-type-item:last-child{border-bottom:0;border-radius:0 0 12px 12px}
.home-event-type-item:hover{background:#fafafa}
.home-event-type-item:active{background:#f5f5f5}

.home-event-type-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 40px;
    width:40px;
    height:40px;
    margin-right:12px;
    border-radius:11px;
    background:#fff0f0;
    font-size:20px;
}

.home-event-type-item:nth-child(2) .home-event-type-icon{background:#f0f8ff}
.home-event-type-item:nth-child(3) .home-event-type-icon{background:#fff5e8}

.home-event-type-text{
    min-width:0;
    flex:1;
    font-size:14px;
    font-weight:bold;
    line-height:1.5;
}

.home-event-type-arrow{
    flex:0 0 auto;
    margin-left:8px;
    color:#aaa;
    font-size:27px;
    line-height:1;
}

/* ==========================
   イベント一覧
========================== */

#eventList{width:100%}

.home-event-back{
    display:flex;
    align-items:center;
    width:100%;
    min-height:42px;
    margin-bottom:10px;
    padding:7px 5px;
    box-sizing:border-box;
    border:0;
    background:none;
    color:#777;
    font-family:inherit;
    font-size:12px;
    text-align:left;
    cursor:pointer;
}

.home-event-back span:first-child{
    margin-right:5px;
    color:#999;
    font-size:23px;
    line-height:1;
}

.home-event-back:hover{color:#333}

.home-event-item{
    display:flex;
    align-items:center;
    width:100%;
    min-height:82px;
    margin-bottom:8px;
    padding:11px 12px;
    box-sizing:border-box;
    border:0;
    border-radius:13px;
    background:#fff;
    box-shadow:0 2px 6px rgba(0,0,0,.08);
    color:#333;
    text-decoration:none;
    transition:background .2s,transform .1s;
}

.home-event-item:last-child{margin-bottom:0}
.home-event-item:hover{background:#fafafa}
.home-event-item:active{transform:scale(.99)}

.home-event-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 42px;
    width:42px;
    height:42px;
    margin-right:12px;
    border-radius:12px;
    background:#fff0f0;
    font-size:21px;
    line-height:1;
}

.home-event-content{min-width:0;flex:1}

.home-event-type{
    margin-bottom:1px;
    color:#888;
    font-size:10px;
    line-height:1.4;
}

.home-event-name{
    overflow:hidden;
    font-size:14px;
    font-weight:bold;
    line-height:1.5;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.home-event-date{
    margin-top:2px;
    color:#666;
    font-size:11px;
    line-height:1.4;
}

.home-event-venue{
    overflow:hidden;
    margin-top:1px;
    color:#888;
    font-size:10px;
    line-height:1.4;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.home-event-arrow{
    flex:0 0 auto;
    margin-left:8px;
    color:#aaa;
    font-size:27px;
    line-height:1;
}

.home-empty-message{
    padding:22px 15px;
    color:#888;
    font-size:12px;
    line-height:1.5;
    text-align:center;
}

/* ==========================
   HOME専用モーダル
========================== */

.home-modal{
    position:fixed;
    top:0;
    right:0;
    bottom:70px;
    left:0;
    z-index:1000;
    display:none;
    align-items:center;
    justify-content:center;
    padding:15px;
    box-sizing:border-box;
    overflow:hidden;
    background:rgba(0,0,0,.5);
}

.home-modal.active{display:flex}

.home-modal-content{
    display:flex;
    flex-direction:column;
    width:100%;
    max-width:430px;
    max-height:100%;
    min-height:0;
    overflow:hidden;
    border-radius:12px;
    background:#fff;
}

.home-modal-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex:0 0 50px;
    width:100%;
    height:50px;
    min-height:50px;
    padding:0 15px;
    box-sizing:border-box;
    border-bottom:1px solid #ddd;
}

.home-modal-title{
    min-width:0;
    overflow:hidden;
    font-size:18px;
    font-weight:bold;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.home-modal-close{
    flex:0 0 auto;
    padding:0 5px;
    border:0;
    background:none;
    font-family:inherit;
    font-size:28px;
    line-height:1;
    cursor:pointer;
}

.home-modal-body{
    min-height:0;
    padding:15px;
    box-sizing:border-box;
    overflow-x:hidden;
    overflow-y:auto;
    font-size:13px;
    line-height:1.8;
    text-align:left;
    scrollbar-width:none;
    -ms-overflow-style:none;
}

.home-modal-body::-webkit-scrollbar{display:none}
.event-menu-modal .home-modal-body{padding:15px}


/* PCホームでは下部の公開フッターリンクを非表示（スマホ表示は維持） */
@media(min-width:768px){
    .public-footer-links{
        display:none;
    }
}


/* 公式お知らせ専用ブロック（データ供給は公式情報取得パイプライン対応後） */
.home-official-list{list-style:none;margin:0;padding:0}

.home-official-list li+li{margin-top:10px}

.home-official-list a{display:block;color:var(--theme-text);text-decoration:none}

.home-official-date{display:block;font-size:11px;color:var(--theme-text-muted);line-height:1.5}

.home-official-title{display:block;font-size:13.5px;font-weight:bold;line-height:1.5}

.home-notice-empty{font-size:12.5px;color:var(--theme-text-muted);margin:0;line-height:1.6}

.home-official-more{display:block;margin-top:12px;text-align:right;color:var(--theme-primary);font-size:13px;font-weight:bold;line-height:1.4;text-decoration:none}

.home-reminder-list{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;max-height:150px}

.home-side-info .home-reminder-list{max-height:245px}

/* サイド列は画面の高さに合わせて表示量を減らす（背の低い画面で列がはみ出さないように） */
@media(max-height:999px){
    .home-side-info .home-official-list li:nth-child(n+5){display:none}

    .home-side-info .home-reminder-list{max-height:150px}
}

@media(max-height:849px){
    .home-side-info .home-official-list li:nth-child(n+4){display:none}

    .home-side-info .home-reminder-list{max-height:103px}
}

/* ワイド画面の情報列（既定は非表示、1750px以上で表示） */
.home-side-info{display:none}

/* ワイド画面（1750px以上）：本体の幅は維持し、右の空き空間に公式お知らせ＋リマインドの専用列を置く */
/* 中幅PC（1100〜1749px）：サイド列が出ない幅では、お知らせ系カードをバラして流し込み、カードが縦に間延びしないようにする */
@media(min-width:1100px) and (max-width:1749px){
    .home-bento-stack-notice{display:contents}
}

@media(min-width:1750px){
    .home-layout .page-rail-main{max-width:none}

    .home-layout .home-main{display:grid;grid-template-columns:minmax(0,1348px) minmax(300px,1fr);grid-template-areas:"hero side" "bento side";column-gap:20px;align-items:start}

    .home-main .home-hero{grid-area:hero}

    .home-main .home-bento{grid-area:bento}

    .home-side-info{grid-area:side;display:flex;flex-direction:column;gap:12px;position:fixed;top:197px;left:calc(var(--pc-side-nav-width,220px) + 48px + min(1348px,100vw - var(--pc-side-nav-width,220px) - 576px));width:calc(100vw - var(--pc-side-nav-width,220px) - 276px - min(1348px,100vw - var(--pc-side-nav-width,220px) - 576px));z-index:40;max-height:calc(100vh - 237px);max-height:calc(100dvh - 237px);overflow-y:auto;scrollbar-width:none;overscroll-behavior:contain}

    .home-side-info::-webkit-scrollbar{display:none}

    .home-notice-in-stack{display:none}
}

.home-today-share{
    margin-top:16px;
    display:flex;
    justify-content:flex-end;
}

.home-today-share-button{
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:44px;
    padding:0 20px;
    border:none;
    border-radius:999px;
    background:#000;
    color:#fff;
    font-size:14px;
    font-weight:bold;
    cursor:pointer;
    font-family:inherit;
}

.home-today-share-button .x-brand-logo{
    width:15px;
    height:15px;
    display:block;
}

/* 本日の推し活情報：記念日がある日のお祝い見出し */
.home-today-celebration{
    position:relative;
    overflow:hidden;
    margin-bottom:12px;
    padding:12px 16px;
    border-radius:12px;
    background:linear-gradient(135deg,var(--theme-btn-from),var(--theme-primary));
    color:#fff;
    font-size:14px;
    font-weight:bold;
    line-height:1.6;
    animation:home-celebration-pop .55s ease-out both;
}

/* お祝い見出しに光が1回流れる */
.home-today-celebration::after{
    content:"";
    position:absolute;
    top:0;
    bottom:0;
    left:-60%;
    width:45%;
    background:linear-gradient(105deg,transparent,rgba(255,255,255,.45),transparent);
    transform:skewX(-20deg);
    animation:home-celebration-shine 1.4s ease .45s 1 both;
    pointer-events:none;
}

@keyframes home-celebration-pop{
    from{opacity:0;transform:translateY(8px) scale(.98)}
    to{opacity:1;transform:translateY(0) scale(1)}
}

@keyframes home-celebration-shine{
    from{left:-60%}
    to{left:130%}
}

/* 記念日の紙吹雪キャンバス */
.home-confetti-canvas{
    position:fixed;
    inset:0;
    z-index:5000;
    pointer-events:none;
}

@media (prefers-reduced-motion: reduce){
    .home-today-celebration{animation:none}
    .home-today-celebration::after{animation:none;display:none}
}
