/* XXF_MOVIE002_PORTAL_V7_COMPLETE */
*{box-sizing:border-box}html,body{margin:0;background:#080d14;color:#e9eef5;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif}body{min-width:320px}a{color:inherit}.site-header{position:sticky;top:0;z-index:50;background:rgba(8,13,20,.94);backdrop-filter:blur(16px);border-bottom:1px solid #1b2634}.head-inner{max-width:1440px;margin:auto;height:74px;padding:0 24px;display:flex;align-items:center;gap:34px}.brand{text-decoration:none;display:flex;align-items:center;gap:8px}.brand strong{font-size:25px;color:#fff}.brand strong:before{content:"▶";font-size:14px;color:#ff6248;margin-right:8px}.brand span{font-size:9px;letter-spacing:2px;color:#6f7c8d}.main-nav{display:flex;gap:5px}.main-nav a{text-decoration:none;padding:9px 14px;border-radius:8px;color:#aab4c1;font-size:14px}.main-nav a:hover{background:#182231;color:#fff}.search{margin-left:auto;display:flex;width:min(390px,34vw);height:40px;background:#111a26;border:1px solid #263547;border-radius:9px;overflow:hidden}.search input{min-width:0;flex:1;background:none;border:0;outline:0;color:#fff;padding:0 13px}.search button{border:0;background:#ff6248;color:#fff;padding:0 18px;cursor:pointer}.wrap{max-width:1440px;margin:auto;padding:24px}.portal-hero{height:470px;position:relative;overflow:hidden;border-radius:20px;background:#111 center/cover no-repeat;background-image:linear-gradient(90deg,#080d14 0%,rgba(8,13,20,.86) 34%,rgba(8,13,20,.16) 76%),var(--hero);box-shadow:0 22px 65px rgba(0,0,0,.3)}.hero-mask{position:absolute;inset:0;background:linear-gradient(0deg,#080d14 0,transparent 45%)}.hero-copy{position:absolute;z-index:2;left:55px;top:50%;transform:translateY(-50%);width:min(620px,72%)}.hero-kicker,.section-head small,.detail-v7 .info>small,.play-head small,.page-banner small{color:#ff7055;font-size:11px;font-weight:800;letter-spacing:1.8px}.hero-copy h1{font-size:48px;line-height:1.13;margin:9px 0 14px;color:#fff}.hero-copy p{font-size:15px;line-height:1.85;color:#b7c2d1;max-height:84px;overflow:hidden}.hero-actions{display:flex;gap:10px;margin-top:24px}.hero-actions a{padding:11px 20px;border:1px solid #415169;border-radius:8px;text-decoration:none;background:rgba(8,13,20,.55)}.hero-actions .primary{background:#ff6248;border-color:#ff6248}.channel-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:20px 0 42px}.channel-strip a{padding:18px 20px;border:1px solid #202d3d;border-radius:12px;background:#101722;text-decoration:none}.channel-strip b{display:block;font-size:18px}.channel-strip span{display:block;color:#738196;font-size:12px;margin-top:4px}.portal-section{margin-bottom:46px}.section-head{display:flex;align-items:flex-end;justify-content:space-between;border-bottom:1px solid #202b39;padding-bottom:12px;margin-bottom:17px}.section-head h2{font-size:25px;margin:2px 0 0}.section-head>a{font-size:13px;text-decoration:none;color:#8997aa}.grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:23px 17px}.card{min-width:0}.card>a{text-decoration:none}.posterbox{position:relative;border-radius:10px;overflow:hidden;background:#121a24;box-shadow:0 7px 22px rgba(0,0,0,.22)}.posterbox img{width:100%;aspect-ratio:2/3;object-fit:cover;display:block;transition:.28s}.card:hover img{transform:scale(1.045);filter:brightness(.72)}.remark{position:absolute;left:7px;bottom:7px;padding:3px 7px;max-width:calc(100% - 14px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-radius:5px;background:rgba(3,8,13,.82);font-size:11px}.hover-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-42%);display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:#ff6248;font-style:normal;opacity:0;transition:.2s}.card:hover .hover-play{opacity:1;transform:translate(-50%,-50%)}.card h3{font-size:15px;margin:9px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-meta{font-size:11px;color:#6f7d90;margin:4px 0 0}.page-banner{min-height:150px;border:1px solid #1d2a39;border-radius:17px;background:linear-gradient(120deg,#121c29,#0b111a);display:flex;align-items:center;padding:30px 36px;margin-bottom:15px}.page-banner h1{font-size:34px;margin:4px 0}.page-banner p{margin:0;color:#7f8da0}.subnav{display:flex;gap:8px;margin:0 0 25px}.subnav a{padding:8px 14px;text-decoration:none;border:1px solid #263548;border-radius:7px;color:#9aa7b8}.crumb{display:flex;gap:9px;align-items:center;color:#728095;font-size:13px;margin:5px 0 18px}.crumb a{text-decoration:none}.detail-v7{display:grid;grid-template-columns:300px 1fr;gap:38px;padding:30px;border:1px solid #1e2a39;border-radius:18px;background:#0d141e}.detail-poster{position:relative}.detail-poster .poster{display:block;width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:12px}.detail-poster span{position:absolute;right:8px;bottom:8px;background:#ff6248;padding:4px 8px;border-radius:5px;font-size:11px}.detail-v7 h1{font-size:38px;margin:5px 0 22px}.meta{display:grid;grid-template-columns:1fr 1fr;gap:9px 18px}.meta p{margin:0;color:#aeb8c5;line-height:1.7}.meta b{display:inline-block;min-width:50px;color:#69788c}.summary{margin-top:23px;padding-top:20px;border-top:1px solid #1d2a38;color:#9eabbc;line-height:1.9}.episode-section,.play-info,.portal-note{margin-top:30px;padding:24px;border:1px solid #1e2a39;border-radius:15px;background:#0d141e}.episodes{display:flex;flex-wrap:wrap;gap:9px}.episodes a{min-width:72px;padding:9px 13px;text-align:center;text-decoration:none;border:1px solid #29394d;border-radius:7px;background:#121b27;color:#bdc6d2}.episodes a:hover{background:#ff6248;border-color:#ff6248;color:#fff}.play-head{margin-bottom:14px}.play-head h1{font-size:27px;margin:3px 0}.playerbox{background:#000;border-radius:13px;overflow:hidden;box-shadow:0 15px 50px rgba(0,0,0,.3)}.mv-player,.playerbox video{display:block;width:100%;aspect-ratio:16/9;background:#000}.play-info{color:#9eabbc;line-height:1.85}.play-info h2,.portal-note h3{color:#fff}.site-footer{margin-top:40px;border-top:1px solid #1b2634;text-align:center;padding:38px 20px;color:#68778a}.site-footer div{display:flex;justify-content:center;gap:22px}.site-footer a{text-decoration:none;color:#96a3b4}.site-footer p{font-size:12px}.portal-note p{color:#8492a5}.portal-note h3{margin-top:0}@media(max-width:1180px){.grid{grid-template-columns:repeat(5,1fr)}}@media(max-width:920px){.head-inner{gap:14px}.main-nav{display:none}.search{width:auto;flex:1}.grid{grid-template-columns:repeat(4,1fr)}.portal-hero{height:390px}.hero-copy h1{font-size:38px}.detail-v7{grid-template-columns:240px 1fr}}@media(max-width:700px){.wrap{padding:14px}.head-inner{height:64px;padding:0 14px}.brand span{display:none}.search button{padding:0 12px}.portal-hero{height:330px;border-radius:14px}.hero-copy{left:22px;width:82%}.hero-copy h1{font-size:29px}.hero-copy p{font-size:13px}.channel-strip{grid-template-columns:repeat(2,1fr);margin-bottom:32px}.grid{grid-template-columns:repeat(3,1fr);gap:18px 10px}.detail-v7{grid-template-columns:1fr;padding:18px}.detail-poster{max-width:260px}.detail-v7 h1{font-size:29px}.meta{grid-template-columns:1fr}.page-banner{min-height:120px;padding:22px}.page-banner h1{font-size:27px}}@media(max-width:470px){.grid{grid-template-columns:repeat(2,1fr)}.hero-actions a{padding:9px 13px}.channel-strip a{padding:14px}.card h3{font-size:14px}}
/* ===== MOVIE002 V7.1 INNER FIX ===== */
.v71-channel-head{display:flex;align-items:flex-end;justify-content:space-between;gap:25px;padding:28px 30px;margin:4px 0 22px;border:1px solid #202d3d;border-radius:16px;background:linear-gradient(120deg,#111b28,#0c131d)}
.v71-channel-head span,.v71-title small,.v71-detail-info>small,.v71-player-head small{font-size:11px;font-weight:800;letter-spacing:1.7px;color:#ff7055}.v71-channel-head h1{margin:5px 0;font-size:34px}.v71-channel-head p{margin:0;color:#7e8b9d}.v71-channel-head nav{display:flex;gap:8px;flex-wrap:wrap}.v71-channel-head nav a{padding:8px 15px;border:1px solid #2b3b50;border-radius:8px;text-decoration:none;color:#aab5c4;background:#111a25}.v71-channel-head nav a:hover{border-color:#ff6248;color:#fff}
.v71-panel{margin-top:26px;padding:24px;border:1px solid #202d3d;border-radius:15px;background:#0d141e}.v71-no-top{margin-top:0}.v71-title{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:18px;padding-bottom:12px;border-bottom:1px solid #223041}.v71-title h2{margin:2px 0 0;font-size:23px}.v71-title>a,.v71-title>span{font-size:12px;color:#8190a3;text-decoration:none}
.v71-list-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:23px 16px}.v71-list-card a,.v71-rec-card a{text-decoration:none}.v71-list-pic,.v71-rec-pic{position:relative;overflow:hidden;border-radius:9px;background:#121c28}.v71-list-pic img,.v71-rec-pic img{display:block;width:100%;aspect-ratio:2/3;object-fit:cover;transition:.25s}.v71-list-pic span,.v71-rec-pic span{position:absolute;left:7px;bottom:7px;max-width:calc(100% - 14px);padding:3px 7px;border-radius:5px;background:rgba(3,8,13,.84);font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v71-list-pic i{position:absolute;inset:0;display:grid;place-items:center;font-style:normal;font-size:25px;background:rgba(4,9,14,.38);opacity:0;transition:.2s}.v71-list-card:hover .v71-list-pic i{opacity:1}.v71-list-card:hover img,.v71-rec-card:hover img{transform:scale(1.04)}.v71-list-card h3,.v71-rec-card h3{margin:8px 0 0;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.v71-crumb{display:flex;align-items:center;gap:9px;margin:3px 0 17px;font-size:13px;color:#76859a}.v71-crumb a{text-decoration:none}.v71-crumb b{font-weight:400;color:#46566a}
.v71-detail{display:grid;grid-template-columns:260px minmax(0,1fr);gap:34px;padding:28px;border:1px solid #202d3d;border-radius:17px;background:linear-gradient(125deg,#111a26,#0b121b)}.v71-detail-poster{position:relative;align-self:start}.v71-detail-poster img{display:block;width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:11px}.v71-detail-poster span{position:absolute;right:8px;bottom:8px;padding:4px 8px;border-radius:5px;background:#ff6248;font-size:11px}.v71-detail-info h1{margin:6px 0 10px;font-size:35px;line-height:1.25}.v71-tags{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:20px}.v71-tags em{font-style:normal;font-size:11px;padding:4px 8px;border-radius:5px;background:#172333;color:#9fadc0}.v71-detail-info dl{display:grid;grid-template-columns:50px 1fr 50px 1fr;gap:9px 12px;margin:0}.v71-detail-info dt{color:#65758a}.v71-detail-info dd{margin:0;color:#b6c0cd;overflow:hidden;text-overflow:ellipsis}.v71-desc{margin-top:20px;padding-top:17px;border-top:1px solid #223041}.v71-desc p{margin:7px 0 0;color:#98a6b8;line-height:1.8;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.v71-play-btn{display:inline-block;margin-top:20px;padding:11px 20px;border-radius:8px;background:#ff6248;color:#fff;text-decoration:none;font-weight:700}
.v71-episodes{display:flex;gap:9px;flex-wrap:wrap}.v71-episodes a{min-width:76px;padding:9px 13px;text-align:center;border:1px solid #293a4f;border-radius:7px;background:#121c28;color:#bdc8d6;text-decoration:none}.v71-episodes a:hover{background:#ff6248;border-color:#ff6248;color:#fff}
.v71-rec-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:20px 15px}
.v71-player-panel{padding:20px;border:1px solid #202d3d;border-radius:15px;background:#0b1119}.v71-player-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:14px}.v71-player-head h1{font-size:25px;margin:3px 0 0}.v71-player-head>span{font-size:12px;color:#8492a5}.v71-player{overflow:hidden;border-radius:10px;background:#000}.v71-player video,.v71-player .mv-player,.v71-player iframe{display:block;width:100%!important;aspect-ratio:16/9;background:#000;border:0}.v71-play-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:20px;margin-top:20px}.v71-side-info{display:grid;grid-template-columns:110px 1fr;gap:15px;padding:18px;border:1px solid #202d3d;border-radius:15px;background:#0d141e;align-self:start}.v71-side-info img{width:110px;aspect-ratio:2/3;object-fit:cover;border-radius:8px}.v71-side-info h3{margin:0 0 10px;font-size:18px}.v71-side-info p{margin:6px 0;font-size:12px;color:#8998aa;line-height:1.5}.v71-story{margin:0;color:#9ba9ba;line-height:1.9}
@media(max-width:1100px){.v71-list-grid,.v71-rec-grid{grid-template-columns:repeat(5,1fr)}.v71-play-layout{grid-template-columns:1fr}.v71-side-info{grid-template-columns:90px 1fr}.v71-side-info img{width:90px}}
@media(max-width:850px){.v71-list-grid,.v71-rec-grid{grid-template-columns:repeat(4,1fr)}.v71-detail{grid-template-columns:220px 1fr}.v71-detail-info dl{grid-template-columns:48px 1fr}.v71-channel-head{align-items:flex-start;flex-direction:column}}
@media(max-width:650px){.v71-panel{padding:15px}.v71-list-grid,.v71-rec-grid{grid-template-columns:repeat(3,1fr);gap:18px 10px}.v71-detail{grid-template-columns:1fr;padding:17px}.v71-detail-poster{max-width:230px}.v71-detail-info h1{font-size:28px}}
@media(max-width:460px){.v71-list-grid,.v71-rec-grid{grid-template-columns:repeat(2,1fr)}}

/* XXF_CATEGORY_PAGING_V1 */

.xxf-list-tools{
    margin:20px 0 26px;
}

.xxf-list-total{
    margin-bottom:14px;
    font-size:14px;
    opacity:.72;
}

.xxf-subcats{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.xxf-subcats a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:38px;
    padding:0 18px;
    border-radius:22px;
    text-decoration:none;
    background:rgba(127,127,127,.10);
    color:inherit;
    border:1px solid rgba(127,127,127,.12);
    transition:.18s ease;
}

.xxf-subcats a:hover{
    transform:translateY(-1px);
}

.xxf-subcats a.active{
    background:#f5b936;
    color:#111;
    border-color:#f5b936;
    font-weight:700;
}

.xxf-page-wrap{
    width:100%;
    margin:32px 0 18px;
}

.xxf-pagination{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:8px;
}

.xxf-pagination a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:40px;
    height:40px;
    padding:0 13px;
    box-sizing:border-box;
    text-decoration:none;
    color:inherit;
    background:rgba(127,127,127,.10);
    border:1px solid rgba(127,127,127,.16);
    border-radius:6px;
}

.xxf-pagination a.active{
    background:#f5b936;
    color:#111;
    border-color:#f5b936;
    font-weight:700;
}

@media(max-width:768px){

    .xxf-subcats{
        gap:7px;
    }

    .xxf-subcats a{
        min-height:34px;
        padding:0 13px;
        font-size:13px;
    }

    .xxf-pagination{
        justify-content:flex-start;
    }

    .xxf-pagination a{
        min-width:36px;
        height:36px;
        padding:0 10px;
    }
}

/* XXF_LIST_LAYOUT_V2_BEGIN */

/*
 * 栏目页：
 * 工具栏和分页本身位于影片 Grid 内，
 * 强制横跨整个 Grid，避免被当作影片卡片。
 */

.xxf-list-tools{
    grid-column:1 / -1 !important;
    width:100% !important;
    min-width:0 !important;
    display:block !important;
    margin:0 0 24px !important;
    padding:0 !important;
}

.xxf-list-total{
    display:block !important;
    width:100% !important;
    margin:0 0 14px !important;
    padding:0 !important;
    line-height:1.6 !important;
}

/* 分类横向排列 */
.xxf-subcats{
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:10px !important;
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
}

/* 防止旧CSS给分类按钮固定列宽 */
.xxf-subcats a{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    width:auto !important;
    min-width:72px !important;
    max-width:none !important;
    flex:0 0 auto !important;
    margin:0 !important;
    white-space:nowrap !important;
}

/* 分页必须独占影片 Grid 整行 */
.xxf-page-wrap{
    grid-column:1 / -1 !important;
    width:100% !important;
    min-width:0 !important;
    display:block !important;
    margin:30px 0 6px !important;
    padding:0 !important;
}

.xxf-pagination{
    width:100% !important;
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    margin:0 !important;
    padding:0 !important;
}

.xxf-pagination a{
    flex:0 0 auto !important;
    width:auto !important;
    min-width:38px !important;
    text-align:center !important;
}

/* 手机端 */
@media(max-width:650px){

    .xxf-list-tools{
        margin-bottom:18px !important;
    }

    .xxf-list-total{
        margin-bottom:11px !important;
        font-size:13px !important;
    }

    .xxf-subcats{
        gap:7px !important;
    }

    .xxf-subcats a{
        min-width:0 !important;
        padding:7px 11px !important;
        font-size:13px !important;
    }

    .xxf-page-wrap{
        margin-top:22px !important;
    }

    .xxf-pagination{
        gap:6px !important;
    }

    .xxf-pagination a{
        min-width:34px !important;
        padding:7px 9px !important;
    }
}

/* XXF_LIST_LAYOUT_V2_END */

/* ==========================================================
   XXF_PLAYER_SIZE_FIX_V2
   播放页统一尺寸
   ========================================================== */

.stage,
.player-stage {
    width: 100% !important;
    max-width: 960px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.stage video,
.stage iframe,
.player-stage video,
.player-stage iframe,
video.mv-player,
iframe.mv-player {
    display: block !important;
    box-sizing: border-box !important;

    width: 100% !important;
    max-width: 960px !important;

    min-height: 0 !important;
    max-height: 540px !important;

    aspect-ratio: 16 / 9 !important;

    margin-left: auto !important;
    margin-right: auto !important;

    object-fit: contain !important;
    background: #000 !important;
}

.stage video,
.player-stage video,
video.mv-player {
    height: auto !important;
}

.stage iframe,
.player-stage iframe,
iframe.mv-player {
    height: min(54vw, 540px) !important;
}

@media (max-width: 700px) {

    .stage,
    .player-stage {
        width: 100% !important;
        max-width: 100% !important;
    }

    .stage video,
    .stage iframe,
    .player-stage video,
    .player-stage iframe,
    video.mv-player,
    iframe.mv-player {
        width: 100% !important;
        max-width: 100% !important;

        min-height: 0 !important;
        max-height: none !important;

        aspect-ratio: 16 / 9 !important;
    }

    .stage video,
    .player-stage video,
    video.mv-player {
        height: auto !important;
    }

    .stage iframe,
    .player-stage iframe,
    iframe.mv-player {
        height: 56.25vw !important;
        max-height: 56.25vw !important;
    }
}

/* XXF_ALL_HOME_LAYOUT_FIX_V31_BEGIN */

/*
 * MOVIE002-080 首页布局安全层
 * 保留各模板主题视觉，只修复失控布局。
 */

body .site-shell{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    margin-left:auto !important;
    margin-right:auto !important;
}

body .main{
    width:min(1380px,calc(100% - 40px)) !important;
    max-width:1380px !important;
    min-width:0 !important;
    margin-left:auto !important;
    margin-right:auto !important;
    box-sizing:border-box !important;
}

/* 消除栏目整体漂移 */
body .main > .block,
body .main > .gallery-lead,
body .main > .mosaic,
body .main > .dashboard,
body .main > .content-grid{
    transform:none !important;
    left:auto !important;
    right:auto !important;
    margin-left:0 !important;
    margin-right:0 !important;
    box-sizing:border-box !important;
}

/* 普通栏目保持完整宽度 */
body .main > .block{
    width:100% !important;
    max-width:none !important;
    clear:both !important;
}

/* MOVIE035这类错位结构 */
body .gallery-lead{
    display:block !important;
    width:100% !important;
    max-width:none !important;
}

body .gallery-lead > .block{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
    transform:none !important;
}

/* mosaic/dashboard不能把主体压窄 */
body .mosaic,
body .dashboard{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
}

/* 禁止第一张卡片异常跨列 */
body .block .cards > *{
    grid-column:auto !important;
    grid-row:auto !important;
    transform:none !important;
}

body .block > .cards{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    box-sizing:border-box !important;
}

/* 卡片自身不能撑坏网格 */
body .portal-card,
body .card{
    min-width:0 !important;
    max-width:100% !important;
    box-sizing:border-box !important;
}

body .posterbox{
    width:100% !important;
    max-width:100% !important;
    overflow:hidden !important;
}

body .posterbox img{
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    height:100% !important;
    object-fit:cover !important;
}

/* 热播区安全布局 */
body .hot{
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    box-sizing:border-box !important;
}

body .main > .hot > div{
    display:grid !important;
    grid-template-columns:repeat(6,minmax(0,1fr)) !important;
    gap:14px !important;
}

body .main > .hot .portal-card{
    width:auto !important;
    max-width:none !important;
}

/* 空hero禁止制造巨大空白 */
body .hero:empty{
    display:none !important;
    min-height:0 !important;
    height:0 !important;
    margin:0 !important;
    padding:0 !important;
}

@media (min-width:1201px){
    body .main{
        width:min(1380px,calc(100% - 48px)) !important;
    }
}

@media (max-width:1200px){
    body .main{
        width:calc(100% - 32px) !important;
    }

    body .main > .hot > div{
        grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    }
}

@media (max-width:800px){
    body .main{
        width:calc(100% - 24px) !important;
    }

    body .main > .hot > div{
        grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    }
}

@media (max-width:560px){
    body .main{
        width:calc(100% - 20px) !important;
    }

    body .main > .hot > div{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:10px !important;
    }
}

/* XXF_ALL_HOME_LAYOUT_FIX_V31_END */


/* XXF_HOME_LAYOUT_FINAL_V5_BEGIN
 *
 * 首页布局最终安全层。
 *
 * 只解决：
 * - 主体异常变窄
 * - 首页父级容器继续压缩内容
 * - section横向漂移
 * - 首张卡片异常跨列
 *
 * 不统一各模板原始cards列数。
 * 不修改detail/play/list核心结构。
 */

/*
 * site-shell自身不得把页面缩窄。
 * 保留特殊侧栏模板可能存在的正常padding，
 * 这里只阻止宽度和transform造成整体压缩。
 */
body .site-shell {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    transform:none !important;
}

/*
 * main恢复成正常PC内容区域。
 *
 * 不采用固定1360/1440，
 * 这样不同模板仍保留自身视觉差异；
 * 这里只设一个安全上限1380。
 */
body .main {
    width:min(1380px,calc(100% - 40px)) !important;
    max-width:1380px !important;
    min-width:0 !important;

    margin-left:auto !important;
    margin-right:auto !important;

    transform:none !important;
}

/*
 * 首页常见外层结构不能再次限制main宽度。
 */
body .main > .mag-cover,
body .main > .mosaic,
body .main > .dashboard,
body .main > .home-two,
body .main > .home-grid,
body .main > .paper-grid,
body .main > .retro-grid,
body .main > .neon-grid,
body .main > .guide-grid,
body .main > .content-grid,
body .main > .gallery-lead {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;

    margin-left:0 !important;
    margin-right:0 !important;

    transform:none !important;
}

/*
 * 这些父级内部元素允许正常收缩，
 * 但不能反过来把父容器撑坏或压窄。
 */
body .main > .mag-cover > *,
body .main > .mosaic > *,
body .main > .dashboard > *,
body .main > .home-two > *,
body .main > .home-grid > *,
body .main > .paper-grid > *,
body .main > .retro-grid > *,
body .main > .neon-grid > *,
body .main > .guide-grid > *,
body .main > .content-grid > *,
body .main > .gallery-lead > * {
    min-width:0 !important;
    max-width:100%;
}

/*
 * 普通栏目块始终使用父容器完整宽度。
 */
body .main > .block,
body .main .gallery-lead > .block {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;

    margin-left:0 !important;
    margin-right:0 !important;

    transform:none !important;
}

/*
 * 清除原模板：
 * .block:nth-child(even){transform:translateX(...)}
 *
 * 这是目前电影/电视剧栏目左右漂移的重要来源。
 */
body .main .block:nth-child(n) {
    transform:none !important;
}

/*
 * 清除原模板：
 * .block:nth-child(odd) .cards>*:first-child{
 *     grid-column:span 2
 * }
 *
 * 不改变cards本身的4/5/6/7列设计。
 */
body .main .block .cards > * {
    grid-column:auto !important;
    min-width:0 !important;
}

/*
 * cards仍使用每套模板自己原来的列数。
 * 这里只保证grid不会产生最小内容宽度反撑。
 */
body .main .cards,
body .main .list-grid {
    width:100%;
    max-width:100%;
    min-width:0;
}

/*
 * 首页hot区域不能因为历史补丁留下的
 * max-width / width / transform 再次变窄。
 */
body .main > .hot,
body .main .mosaic .hot,
body .main .mag-cover .hot,
body .main .dashboard .hot {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    transform:none !important;
}

/*
 * 手机和平板只修main宽度。
 * cards列数继续交给各模板原来的media规则。
 */
@media (max-width:1200px) {
    body .main {
        width:calc(100% - 32px) !important;
        max-width:none !important;
    }
}

@media (max-width:800px) {
    body .main {
        width:calc(100% - 24px) !important;
        max-width:none !important;
    }
}

@media (max-width:560px) {
    body .main {
        width:calc(100% - 20px) !important;
        max-width:none !important;
    }
}

/* XXF_HOME_LAYOUT_FINAL_V5_END */
