.home-discovery{
    padding:42px 0 50px;
    border-top:1px solid var(--line);
    background:#fafbfc;
}
.home-extra-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:18px;
}
.home-extra-heading h2{
    position:relative;
    margin:0;
    padding-left:16px;
    font-family:"Songti SC",STSong,serif;
    font-size:26px;
    line-height:1.25;
}
.home-extra-heading h2::before{
    content:"";
    position:absolute;
    left:0;
    top:2px;
    width:5px;
    height:28px;
    background:var(--accent);
}
.home-extra-heading>a{
    color:var(--muted);
    font-size:14px;
}
.home-extra-heading>a:hover{color:var(--accent)}
.home-gift-rail{
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
}
.home-gift-card{
    display:grid;
    grid-template-columns:58px minmax(0,1fr) 20px;
    align-items:center;
    gap:13px;
    min-height:108px;
    padding:16px;
    border:1px solid #e3e6ea;
    border-radius:10px;
    background:#fff;
    transition:border-color .2s,box-shadow .2s,transform .2s;
}
.home-gift-card:hover{
    border-color:#ffc1b2;
    box-shadow:0 10px 28px rgba(28,32,40,.07);
    transform:translateY(-2px);
}
.home-gift-card>img{
    width:58px;
    height:58px;
    border-radius:13px;
    object-fit:cover;
    background:var(--soft);
}
.home-gift-copy{min-width:0}
.home-gift-copy h3,
.home-gift-copy p{
    overflow:hidden;
    margin:0;
    white-space:nowrap;
    text-overflow:ellipsis;
}
.home-gift-copy h3{font-size:15px;line-height:1.45}
.home-gift-copy p{margin-top:2px;color:var(--muted);font-size:12px}
.home-gift-copy>div{display:flex;align-items:center;gap:9px;margin-top:5px}
.home-gift-copy span{
    display:inline-flex;
    align-items:center;
    height:19px;
    padding:0 6px;
    border-radius:3px;
    font-size:11px;
    font-weight:700;
}
.home-gift-copy .is-universal{color:#17895d;background:#e7f7ef}
.home-gift-copy .is-box{color:#a05a2c;background:#fff0e8}
.home-gift-copy time{color:#90959d;font-size:11px}
.home-gift-arrow{width:19px;fill:none;stroke:#a8adb5;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.home-tag-heading{margin-top:42px}
.home-tag-cloud{display:flex;flex-wrap:wrap;gap:10px}
.home-tag-cloud a{
    display:inline-flex;
    align-items:center;
    min-height:34px;
    padding:5px 14px;
    border:1px solid #e1e4e8;
    border-radius:999px;
    color:#5f6570;
    background:#fff;
    font-size:14px;
    transition:border-color .2s,color .2s,background .2s;
}
.home-tag-cloud a span{margin-right:5px;color:var(--accent);font-weight:800}
.home-tag-cloud a:hover{border-color:#ffb6a4;color:var(--accent);background:#fff8f5}

@media(max-width:1000px){
    .home-gift-rail{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:760px){
    .home-discovery{padding:36px 0 42px}
    .home-extra-heading{margin-bottom:15px}
    .home-extra-heading h2{font-size:22px}
    .home-extra-heading h2::before{height:24px}
    .home-gift-rail{
        display:flex;
        overflow-x:auto;
        gap:12px;
        margin-right:-16px;
        padding:2px 16px 12px 0;
        scroll-snap-type:x mandatory;
        scrollbar-width:none;
    }
    .home-gift-rail::-webkit-scrollbar{display:none}
    .home-gift-card{
        flex:0 0 82%;
        min-height:100px;
        padding:14px;
        scroll-snap-align:start;
    }
    .home-tag-heading{margin-top:30px}
    .home-tag-cloud{gap:8px}
    .home-tag-cloud a{min-height:32px;padding:4px 12px;font-size:13px}
}

/* Homepage recommended-game carousel. */
.hero-carousel{isolation:isolate}
.hero-carousel-track{position:absolute;inset:0}
.hero-carousel-slide{
    position:absolute;
    inset:0;
    display:block;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .55s ease,visibility .55s ease;
}
.hero-carousel-slide.is-active{opacity:1;visibility:visible;pointer-events:auto}
.hero-carousel-slide img{width:100%;height:100%;object-fit:cover}
.hero-carousel-arrow{
    position:absolute;
    z-index:4;
    top:50%;
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    padding:0;
    border:1px solid rgba(255,255,255,.42);
    border-radius:50%;
    color:#fff;
    background:rgba(16,19,24,.32);
    box-shadow:0 4px 16px rgba(0,0,0,.13);
    cursor:pointer;
    opacity:.68;
    transform:translateY(-50%);
    transition:opacity .2s,background .2s;
}
.hero-carousel:hover .hero-carousel-arrow,
.hero-carousel:focus-within .hero-carousel-arrow{opacity:1}
.hero-carousel-arrow:hover{background:rgba(16,19,24,.58)}
.hero-carousel-arrow svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.hero-carousel-prev{left:18px}
.hero-carousel-next{right:18px}
.hero-carousel-dots{
    position:absolute;
    z-index:4;
    right:0;
    bottom:16px;
    left:0;
    display:flex;
    justify-content:center;
    gap:8px;
}
.hero-carousel-dots button{
    width:8px;
    height:8px;
    padding:0;
    border:0;
    border-radius:999px;
    background:rgba(255,255,255,.68);
    box-shadow:0 1px 5px rgba(0,0,0,.25);
    cursor:pointer;
    transition:width .2s,background .2s;
}
.hero-carousel-dots button.is-active{width:24px;background:var(--accent)}

@media(max-width:760px){
    .hero-carousel-arrow{display:none}
    .hero-carousel-dots{bottom:10px}
    .hero-carousel-dots button{width:7px;height:7px}
    .hero-carousel-dots button.is-active{width:20px}
}

@media(prefers-reduced-motion:reduce){
    .hero-carousel-slide{transition:none}
}

.recommendation-rail{grid-template-columns:repeat(4,minmax(0,1fr))}
.mobile-recommendation-rail{display:none}

/* Mobile homepage: card-style hero and recommendation rail. */
@media(max-width:760px){
    .hero{border-bottom:0}
    .hero .container{width:min(calc(100% - 32px),var(--container))}
    .hero-grid{padding-top:0;padding-bottom:16px}
    .hero-copy{padding:30px 8px 24px}
    .hero-copy h1{
        max-width:none;
        margin:0;
        font-family:inherit;
        font-size:clamp(28px,7.4vw,36px);
        font-weight:900;
        line-height:1.16;
        letter-spacing:-1.5px;
        white-space:nowrap;
    }
    .hero-copy h1 span{display:inline;color:var(--accent)}
    .hero-copy p{
        margin:15px 0 22px;
        color:#626872;
        font-size:15px;
        line-height:1.55;
        white-space:nowrap;
    }
    .hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}
    .hero-actions .button{
        min-height:48px;
        padding:0 10px;
        border-radius:9px;
        font-size:15px;
    }
    .hero-media{
        overflow:visible;
        width:100%;
        height:auto;
        min-height:0;
        aspect-ratio:2 / 1;
        margin:0;
        border-radius:14px;
        box-shadow:0 14px 34px rgba(31,36,45,.13);
    }
    .hero-carousel-track{overflow:hidden;border-radius:inherit}
    .hero-carousel-dots{bottom:-22px}
    .hero-carousel-dots button{
        width:7px;
        height:7px;
        background:#e4e5e8;
        box-shadow:none;
    }
    .hero-carousel-dots button.is-active{width:23px;background:var(--accent)}

    .recommendation-section{padding:18px 0}
    .recommendation-section .section-heading{align-items:center;margin-bottom:13px}
    .recommendation-section .section-heading>a{font-size:14px}
    .recommendation-rail{display:none}
    .mobile-recommendation-rail{
        display:grid;
        grid-template-columns:repeat(4,minmax(0,1fr));
        overflow:visible;
        gap:8px;
        margin:0;
        padding:2px 0 8px;
    }
    .mobile-recommendation-card{
        display:flex;
        flex-direction:column;
        min-width:0;
        padding:7px;
        border:1px solid #f0f1f3;
        border-radius:11px;
        background:#fff;
        box-shadow:0 5px 16px rgba(28,32,40,.06);
    }
    .mobile-recommendation-cover{position:relative;display:block;overflow:hidden;aspect-ratio:1;border-radius:9px;background:var(--soft)}
    .mobile-recommendation-cover img{width:100%;height:100%;object-fit:cover}
    .mobile-recommendation-version{
        position:absolute;
        top:0;
        right:0;
        max-width:78%;
        padding:1px 4px;
        overflow:hidden;
        border-radius:0 0 0 6px;
        color:#fff;
        background:var(--accent);
        font-size:8px;
        line-height:1.6;
        white-space:nowrap;
        text-overflow:ellipsis;
    }
    .mobile-recommendation-card>strong{
        overflow:hidden;
        margin-top:6px;
        font-size:12px;
        line-height:1.4;
        white-space:nowrap;
        text-overflow:ellipsis;
    }
    .mobile-recommendation-type{
        overflow:hidden;
        margin-top:1px;
        color:#747a84;
        font-size:11px;
        white-space:nowrap;
        text-overflow:ellipsis;
    }
    .mobile-recommendation-tags{display:flex;overflow:hidden;gap:3px;min-height:18px;margin-top:5px}
    .mobile-recommendation-tags small{
        flex:0 0 auto;
        padding:1px 3px;
        border-radius:4px;
        color:var(--accent-dark);
        background:#fff0ec;
        font-size:8px;
        line-height:1.65;
    }
    .mobile-recommendation-action{
        display:flex;
        align-items:center;
        justify-content:center;
        height:29px;
        margin-top:6px;
        border-radius:6px;
        color:#fff;
        background:var(--accent);
        font-size:12px;
        font-weight:800;
    }
    .split-section{padding:16px 0 18px}
    .home-discovery{padding:26px 0 36px}
}

@media(max-width:370px){
    .hero-copy h1{font-size:27px}
    .hero-copy p{font-size:14px}
    .mobile-recommendation-rail{gap:6px}
    .mobile-recommendation-card{padding:6px}
}

/* Homepage rankings visual refresh: stronger hierarchy without shadows or gradients. */
.home-ranking-title-wrap{
    display:flex;
    align-items:baseline;
    gap:12px;
    min-width:0;
}
.home-ranking-subtitle{
    color:#858b94;
    font-size:14px;
    white-space:nowrap;
}
.home-ranking-column-heading{
    min-height:58px;
    padding-inline:17px;
}
.home-ranking-column-title{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
}
.home-ranking-column-icon{
    display:inline-flex;
    width:24px;
    height:24px;
    align-items:center;
    justify-content:center;
    color:var(--accent);
    font-size:18px;
    line-height:1;
}
.home-ranking-column-heading h3{font-size:20px}
.home-ranking-row>a{
    grid-template-columns:28px 50px minmax(0,1fr);
    gap:11px;
    min-height:75px;
    padding:11px 15px;
}
.home-ranking-number{width:26px;height:26px;font-size:13px}
.home-ranking-row img{width:50px;height:50px;border-radius:11px}
.home-ranking-name strong{font-size:15px}
.home-ranking-name small{font-size:11px}
.home-ranking-meta{font-size:12px}
.home-ranking-more{
    display:flex;
    min-height:38px;
    align-items:center;
    justify-content:center;
    margin:10px 14px 13px;
    border:1px solid #ffb19e;
    border-radius:20px;
    color:var(--accent);
    font-size:14px;
    font-weight:700;
    text-decoration:none;
}
.home-ranking-more span{margin-left:7px;font-size:17px}

@media(max-width:760px){
    .home-ranking-title-wrap{gap:0}
    .home-ranking-subtitle{display:none}
    .home-ranking-heading>a{font-size:13px}
    .home-ranking-column-heading{display:none}
    .home-ranking-row>a{
        grid-template-columns:34px 56px minmax(0,1fr);
        gap:11px;
        min-height:82px;
        padding:12px 13px;
    }
    .home-ranking-number{width:30px;height:30px;font-size:14px}
    .home-ranking-row img{width:56px;height:56px;border-radius:13px}
    .home-ranking-name strong{font-size:16px}
    .home-ranking-name small{max-width:112px;font-size:11px}
    .home-ranking-meta{font-size:13px;gap:8px;margin-top:5px}
    .home-ranking-more{display:none}
}


@media(max-width:760px){
    .pagination,.tag-pagination{gap:5px}
    .pagination a,.pagination span,.tag-pagination a,.tag-pagination span{min-width:0;padding:6px 8px;font-size:11px;white-space:nowrap}
    .pagination strong,.tag-pagination strong{font-size:11px;white-space:nowrap}
}

/* 首页友情链接 */
.home-friend-links{padding:28px 0 34px;border-top:1px solid var(--line);background:#fff}
.home-friend-links .home-extra-heading{margin-bottom:16px}
.friend-links-list{display:flex;flex-wrap:wrap;gap:10px 24px}
.friend-links-list a{display:inline-flex;align-items:baseline;gap:8px;color:var(--muted);font-size:14px}
.friend-links-list a:hover{color:var(--accent)}
.friend-links-list small{color:#9a9da3;font-size:12px}
@media(max-width:760px){.home-friend-links{display:none}}

/* Full-width latest games module on the homepage. */
.home-latest-games{
    padding:20px 0 38px;
    border-top:1px solid var(--line);
    background:#fff;
}
.home-latest-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:10px;
}
.home-latest-heading h2{
    position:relative;
    margin:0;
    padding-left:16px;
    font-family:"Songti SC",STSong,serif;
    font-size:30px;
    line-height:1.2;
}
.home-latest-heading h2::before{
    content:"";
    position:absolute;
    top:2px;
    bottom:2px;
    left:0;
    width:5px;
    background:var(--accent);
}
.home-latest-heading>a{
    color:var(--muted);
    font-size:14px;
}
.home-latest-heading>a:hover{color:var(--accent)}
.home-latest-categories{
    display:flex;
    align-items:center;
    gap:8px;
    overflow-x:auto;
    margin-bottom:14px;
    padding-bottom:2px;
    scrollbar-width:none;
}
.home-latest-categories::-webkit-scrollbar{display:none}
.home-latest-categories a{
    display:inline-flex;
    flex:0 0 auto;
    align-items:center;
    justify-content:center;
    min-width:58px;
    height:30px;
    padding:0 14px;
    border:1px solid #e5e7eb;
    border-radius:999px;
    color:#626771;
    background:#fff;
    font-size:13px;
    line-height:1;
}
.home-latest-categories a:hover,
.home-latest-categories a.is-active{
    border-color:var(--accent);
    color:#fff;
    background:var(--accent);
}
.home-latest-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px 18px;
}
.home-latest-card{
    display:grid;
    grid-template-columns:64px minmax(0,1fr) 58px;
    align-items:center;
    gap:13px;
    min-width:0;
    min-height:92px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:9px;
    background:#fff;
}
.home-latest-card:hover{border-color:#ffc2b3}
.home-latest-icon,
.home-latest-icon img{
    width:64px;
    height:64px;
}
.home-latest-icon{
    overflow:hidden;
    border-radius:13px;
    background:var(--soft);
}
.home-latest-icon img{object-fit:cover}
.home-latest-copy{min-width:0}
.home-latest-title{
    flex-wrap:nowrap;
    font-size:15px;
}
.home-latest-title>a{
    overflow:hidden;
    color:var(--ink);
    font-weight:800;
    white-space:nowrap;
    text-overflow:ellipsis;
}
.home-latest-title .game-version-badge{
    overflow:hidden;
    max-width:135px;
    text-overflow:ellipsis;
}
.home-latest-copy>p{
    overflow:hidden;
    margin:3px 0 2px;
    color:var(--muted);
    font-size:12px;
    line-height:1.5;
    white-space:nowrap;
    text-overflow:ellipsis;
}
.home-latest-meta{
    display:flex;
    align-items:center;
    overflow:hidden;
    gap:0;
    color:#8a8f98;
    font-size:11px;
    white-space:nowrap;
}
.home-latest-meta>*{
    overflow:hidden;
    min-width:0;
    text-overflow:ellipsis;
}
.home-latest-meta>*+*::before{
    margin:0 6px;
    color:#c2c5ca;
    content:"·";
}
.home-latest-action{
    min-width:54px;
    width:54px;
    height:32px;
}
.home-latest-action-mobile{display:none}

@media(max-width:900px){
    .home-latest-grid{grid-template-columns:1fr}
}

@media(max-width:760px){
    .home-latest-games{padding:15px 0 28px}
    .home-latest-heading{margin-bottom:9px}
    .home-latest-heading h2{padding-left:12px;font-size:23px}
    .home-latest-heading h2::before{width:4px}
    .home-latest-heading>a{font-size:13px}
    .home-latest-categories{
        gap:7px;
        margin-right:-16px;
        margin-bottom:11px;
        padding-right:16px;
    }
    .home-latest-categories a{
        min-width:54px;
        height:29px;
        padding:0 13px;
        font-size:12px;
    }
    .home-latest-grid{gap:8px}
    .home-latest-card{
        grid-template-columns:68px minmax(0,1fr) 62px;
        gap:11px;
        min-height:94px;
        padding:10px;
        border-radius:10px;
    }
    .home-latest-icon,
    .home-latest-icon img{
        width:68px;
        height:68px;
    }
    .home-latest-icon{border-radius:13px}
    .home-latest-title{font-size:15px}
    .home-latest-title .game-version-badge{max-width:88px}
    .home-latest-copy>p{margin-top:3px;font-size:12px}
    .home-latest-meta{font-size:11px}
    .home-latest-meta>*+*::before{margin-inline:4px}
    .home-latest-action-desktop{display:none}
    .home-latest-action-mobile{display:inline-flex}
    .home-latest-action-mobile.is-download{
        border-color:var(--accent);
        color:#fff;
        background:var(--accent);
    }
}

/* Compact homepage rankings shared with the full rankings page data. */
.home-ranking-heading{margin-top:42px}
.home-ranking-tabs{display:none}
.home-ranking-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
}
.home-ranking-column{
    overflow:hidden;
    min-width:0;
    border:1px solid #e1e4e8;
    border-radius:8px;
    background:#fff;
}
.home-ranking-column-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:52px;
    padding:0 16px;
    border-bottom:1px solid #eceef1;
}
.home-ranking-column-heading h3{
    margin:0;
    font-size:19px;
    line-height:1.3;
}
.home-ranking-column-heading span{
    color:var(--accent);
    font-size:12px;
    font-weight:800;
}
.home-ranking-list{margin:0;padding:0;list-style:none}
.home-ranking-row+.home-ranking-row{border-top:1px solid #eef0f2}
.home-ranking-row>a{
    display:grid;
    grid-template-columns:26px 46px minmax(0,1fr);
    align-items:center;
    gap:10px;
    min-height:67px;
    padding:10px 13px;
    color:var(--ink);
}
.home-ranking-row>a:hover{background:#fff8f5}
.home-ranking-number{
    display:flex;
    width:24px;
    height:24px;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    color:#858b94;
    background:#f0f2f4;
    font-size:12px;
    font-weight:800;
}
.home-ranking-number.rank-1{color:#fff;background:#f2a900}
.home-ranking-number.rank-2{color:#fff;background:#8c9aac}
.home-ranking-number.rank-3{color:#fff;background:#bf7442}
.home-ranking-row img{
    width:46px;
    height:46px;
    border-radius:10px;
    object-fit:cover;
    background:var(--soft);
}
.home-ranking-copy,
.home-ranking-name,
.home-ranking-meta{min-width:0}
.home-ranking-copy{display:block}
.home-ranking-name{
    display:flex;
    align-items:center;
    gap:6px;
}
.home-ranking-name strong{
    overflow:hidden;
    min-width:0;
    font-size:15px;
    line-height:1.4;
    white-space:nowrap;
    text-overflow:ellipsis;
}
.home-ranking-name small{
    overflow:hidden;
    flex:0 1 auto;
    max-width:92px;
    padding:1px 5px;
    border:1px solid #ff9e88;
    border-radius:3px;
    color:var(--accent);
    font-size:11px;
    line-height:1.45;
    white-space:nowrap;
    text-overflow:ellipsis;
    margin-left: 10px;
}
.home-ranking-meta{
    display:flex;
    align-items:center;
    gap:7px;
    margin-top:6px;
    color:#7b818a;
    font-size:12px;
    line-height:1.35;
}
.home-ranking-meta span{
    overflow:hidden;
    min-width:0;
    white-space:nowrap;
    text-overflow:ellipsis;
}
.home-ranking-meta em{
    flex:0 0 auto;
    color:var(--accent);
    font-style:normal;
    font-weight:700;
    margin-left: 10px;
}

@media(max-width:1000px) and (min-width:761px){
    .home-ranking-grid{gap:10px}
    .home-ranking-column-heading{padding-inline:12px}
    .home-ranking-row>a{grid-template-columns:22px 42px minmax(0,1fr);gap:7px;padding-inline:9px}
    .home-ranking-number{width:21px;height:21px;font-size:11px}
    .home-ranking-row img{width:42px;height:42px}
    .home-ranking-name small{display:none}
}

@media(max-width:760px){
    .home-ranking-heading{margin-top:30px}
    .home-ranking-tabs{
        display:grid;
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:7px;
        margin-bottom:10px;
    }
    .home-ranking-tabs button{
        min-width:0;
        height:34px;
        border:1px solid #e0e3e7;
        border-radius:6px;
        color:#5f6570;
        background:#fff;
        font-size:13px;
        font-weight:700;
    }
    .home-ranking-tabs button[aria-selected="true"]{
        border-color:var(--accent);
        color:var(--accent);
        background:#fff8f5;
    }
    .home-ranking-grid{display:block}
    .home-ranking-column[hidden]{display:none}
    .home-ranking-column-heading{display:none}
    .home-ranking-row>a{
        grid-template-columns:25px 48px minmax(0,1fr);
        gap:10px;
        min-height:69px;
        padding:10px 12px;
    }
    .home-ranking-row img{width:48px;height:48px}
    .home-ranking-name strong{font-size:15px}
    .home-ranking-name small{max-width:96px;font-size:11px}
    .home-ranking-meta{font-size:12px}
}

@media(max-width:370px){
    .home-latest-card{
        grid-template-columns:62px minmax(0,1fr) 56px;
        gap:9px;
        padding:9px;
    }
    .home-latest-icon,
    .home-latest-icon img{
        width:62px;
        height:62px;
    }
    .home-latest-action{
        min-width:52px;
        width:52px;
    }
}
