
:root{--accent:#e11d48;--dark:#111827;--soft:#fff7f7;--card:#ffffff;--text:#172033;--muted:#64748b;--line:rgba(100,116,139,.18);--radius:18px;--shadow:0 18px 48px rgba(15,23,42,.12)}
*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,"Microsoft YaHei",sans-serif;background:var(--soft);color:var(--text)}a{text-decoration:none;color:inherit}img{max-width:100%;display:block}.site-wrap{min-height:100vh}.site-main{width:min(1280px,calc(100% - 32px));margin:0 auto;padding:22px 0 72px}.tpl-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.9);backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}.header-line,.two-first,.mini-bottom,.bottom-top{width:min(1280px,calc(100% - 32px));margin:0 auto;display:flex;align-items:center;gap:18px;min-height:72px}.tpl-brand{font-weight:900;font-size:24px;color:var(--accent);display:flex;flex-direction:column;line-height:1}.tpl-brand small{font-size:12px;color:var(--muted);margin-top:6px}.tpl-nav{display:flex;align-items:center;gap:8px;overflow:auto;white-space:nowrap}.tpl-nav a{padding:10px 14px;border-radius:999px;color:#334155;font-weight:700}.tpl-nav a.active,.tpl-nav a:hover{background:var(--accent);color:#fff}.tpl-search{display:flex;gap:0;margin-left:auto;min-width:250px}.tpl-search input{width:100%;border:1px solid var(--line);background:#fff;border-radius:999px 0 0 999px;padding:12px 15px;outline:none}.tpl-search button{border:0;background:var(--accent);color:#fff;border-radius:0 999px 999px 0;padding:0 18px;font-weight:800}.tpl-icon{display:none;border:0;border-radius:12px;background:var(--accent);color:#fff;padding:10px 12px}.tpl-header-stream,.tpl-header-cover{background:var(--dark);color:#fff}.tpl-header-stream .tpl-nav a,.tpl-header-cover .tpl-nav a{color:#fff}.split{justify-content:space-between}.nav-rail,.cover-nav,.two-second{width:min(1280px,calc(100% - 32px));margin:0 auto;padding:0 0 12px}.tpl-header-center{text-align:center;padding:20px}.tpl-header-center .tpl-brand{align-items:center}.hero-search{margin:16px auto;max-width:720px}.center-nav{justify-content:center}.tpl-header-side{width:260px;position:fixed;left:0;top:0;bottom:0;display:flex;flex-direction:column;align-items:stretch;padding:24px}.tpl-header-side+.mobile-search-panel+.drawer-mask+.mobile-drawer+.site-main,.header-4 .site-main{margin-left:260px;width:calc(min(1280px,100% - 300px))}.side-nav{flex-direction:column;align-items:stretch;white-space:normal}.side-search{min-width:0;margin:20px 0 0}.mini-top{width:min(1280px,calc(100% - 32px));margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:10px 0;color:var(--muted)}.tpl-header-card{background:transparent;border:0;padding:16px}.header-card-box{width:min(1280px,calc(100% - 32px));margin:0 auto;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:24px;padding:14px;display:grid;grid-template-columns:auto 1fr auto;gap:16px;align-items:center}.nav-chips a{background:var(--soft)}.tpl-header-grid .grid-head{display:flex;justify-content:space-between;align-items:center;width:min(1280px,calc(100% - 32px));margin:0 auto;padding:14px 0}.grid-nav{width:min(1280px,calc(100% - 32px));margin:0 auto;display:grid;grid-template-columns:repeat(6,1fr);gap:8px;padding-bottom:12px}.grid-search{width:min(780px,calc(100% - 32px));margin:0 auto 14px}.fast-nav a{padding:8px}.tpl-section,.wokanys-section,.search-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:20px;margin:20px 0;box-shadow:0 8px 28px rgba(15,23,42,.06)}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.section-head h1,.section-head h2,.section-head h3{margin:0}.section-head a{color:var(--accent);font-weight:800}.poster-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:16px}.poster-card{display:block;min-width:0}.poster-img{position:relative;aspect-ratio:2/3;border-radius:16px;overflow:hidden;background:#e2e8f0}.poster-img img{width:100%;height:100%;object-fit:cover}.poster-title{display:block;font-weight:850;margin-top:9px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.poster-meta{display:block;color:var(--muted);font-size:13px;margin-top:4px}.poster-tag,.poster-score{position:absolute;z-index:2;left:8px;top:8px;background:rgba(15,23,42,.78);color:#fff;border-radius:999px;padding:4px 7px;font-size:12px}.poster-score{left:auto;right:8px;background:var(--accent)}.poster-desc{position:absolute;left:0;right:0;bottom:0;padding:35px 10px 10px;background:linear-gradient(transparent,rgba(0,0,0,.76));color:#fff;opacity:0;transition:.2s}.poster-card:hover .poster-desc{opacity:1}.poster-row{display:grid;grid-auto-flow:column;grid-auto-columns:180px;gap:14px;overflow:auto;padding-bottom:8px}.wide-row{grid-auto-columns:230px}.rank-panel{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px;margin-bottom:16px}.rank-head{display:flex;justify-content:space-between}.rank-list{display:grid;gap:8px}.rank-item{display:grid;grid-template-columns:34px 1fr auto;gap:10px;align-items:center;padding:9px;border-radius:12px;background:rgba(100,116,139,.06)}.rank-num{font-weight:900;color:var(--accent)}.rank-item em{font-style:normal;color:var(--muted);font-size:12px}.fofo-hero{position:relative;overflow:hidden;border-radius:28px;min-height:430px;margin:22px 0;background:var(--dark);color:#fff}.wok-hero-ambient{position:absolute;inset:0;background-size:cover;background-position:center;filter:blur(18px);opacity:.32;transform:scale(1.08)}.wok-hero-grid{position:relative;z-index:2;display:grid;grid-template-columns:1.2fr 260px 330px;gap:28px;align-items:center;padding:42px}.wok-hero-text h1{font-size:42px;margin:12px 0}.hero-label{display:inline-block;padding:7px 10px;background:var(--accent);color:#fff;border-radius:999px;font-size:13px;font-weight:800}.watch-btn,.btn-primary{display:inline-flex;align-items:center;justify-content:center;background:var(--accent);color:#fff;border-radius:999px;padding:12px 18px;font-weight:900}.btn-soft{display:inline-flex;background:rgba(100,116,139,.12);border-radius:999px;padding:12px 18px;color:var(--text);font-weight:800}.wok-hero-main-poster img{border-radius:22px;aspect-ratio:2/3;object-fit:cover}.wok-hero-list{display:grid;gap:10px}.hero-thumb{display:grid;grid-template-columns:58px 1fr;gap:10px;align-items:center;text-align:left;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.08);color:#fff;border-radius:16px;padding:8px;cursor:pointer}.hero-thumb.active{background:rgba(255,255,255,.22)}.hero-thumb img{width:58px;height:78px;object-fit:cover;border-radius:10px}.layout-portal{display:grid;grid-template-columns:1fr 320px;gap:22px}.content-layout,.detail-layout,.play-layout,.layout-feed{display:grid;grid-template-columns:1fr 320px;gap:22px}.rank-matrix,.multi-rank{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.category-cards{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin:18px 0}.category-cards a{background:var(--card);border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:0 8px 26px rgba(15,23,42,.05)}.category-cards b{font-size:28px;color:var(--accent)}.category-cards strong{display:block;margin-top:8px}.tag-cloud{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.tag-cloud a{background:rgba(100,116,139,.12);border-radius:999px;padding:9px 13px}.search-home{text-align:center;max-width:900px;margin:28px auto;background:var(--card);padding:34px;border-radius:28px}.search-home form,.search-card form{display:flex;max-width:680px;margin:18px auto}.search-home input,.search-card input{flex:1;border:1px solid var(--line);padding:14px;border-radius:999px 0 0 999px}.search-home button,.search-card button{border:0;background:var(--accent);color:#fff;padding:0 24px;border-radius:0 999px 999px 0}.waterfall-grid{columns:5 180px;display:block}.waterfall-grid .poster-card{break-inside:avoid;margin-bottom:16px}.waterfall-grid .poster-img{aspect-ratio:auto}.waterfall-grid .poster-img img{height:auto}.topic-band{display:grid;grid-template-columns:300px 1fr;gap:22px;align-items:center;background:var(--card);border:1px solid var(--line);border-radius:28px;padding:24px;margin:20px 0}.phone-frame{max-width:480px;margin:22px auto;background:#fff;border:10px solid #111827;border-radius:36px;padding:18px;box-shadow:var(--shadow)}.short-hero,.timeline-home,.filter-home,.poster-wall,.blue-portal,.gold-cinema,.database-home,.landscape-home,.vertical-home,.update-axis,.collection-home,.fast-home{margin:20px 0}.line-vod{display:grid;grid-template-columns:42px 1fr auto;gap:10px;align-items:center;border-bottom:1px solid var(--line);padding:12px}.time-item,.update-axis article{display:grid;grid-template-columns:100px 1fr;gap:14px;align-items:center}.poster-library .poster-grid{grid-template-columns:repeat(7,1fr)}.list-with-left{display:grid;grid-template-columns:240px 1fr;gap:22px}.list-compact .poster-grid{grid-template-columns:repeat(4,1fr)}.breadcrumb{display:flex;gap:8px;align-items:center;color:var(--muted);margin:16px 0}.filter-strip{display:flex;gap:8px;overflow:auto;background:var(--card);border:1px solid var(--line);border-radius:18px;padding:12px;margin:18px 0}.filter-strip a{padding:9px 14px;border-radius:999px;background:rgba(100,116,139,.1)}.filter-strip a.active{background:var(--accent);color:#fff}.detail-hero{display:grid;grid-template-columns:260px 1fr 140px;gap:24px;background:var(--card);border:1px solid var(--line);border-radius:28px;padding:24px}.detail-poster img{border-radius:20px;aspect-ratio:2/3;object-fit:cover;width:100%}.detail-tags{display:flex;gap:8px;overflow:auto;white-space:nowrap}.detail-tags span{background:rgba(100,116,139,.12);border-radius:999px;padding:7px 10px}.detail-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.score-box{background:var(--accent);color:#fff;border-radius:22px;padding:18px;text-align:center}.score-box strong{font-size:32px}.detail-cover{position:relative;display:grid;grid-template-columns:1fr 260px;gap:24px;padding:36px;border-radius:30px;overflow:hidden;color:#fff;background:var(--dark)}.detail-cover:before{content:"";position:absolute;inset:0;background-image:var(--bg);background-size:cover;background-position:center;opacity:.25;filter:blur(10px)}.detail-cover>*{position:relative}.detail-database,.detail-split,.play-theater,.play-grid{display:grid;grid-template-columns:300px 1fr;gap:22px}.detail-mag h1{font-size:46px}.mag-grid{display:grid;grid-template-columns:320px 1fr;gap:28px}.detail-minimal,.detail-seo{max-width:980px;margin:0 auto}.player-box{position:relative;background:#000;border-radius:24px;overflow:hidden;aspect-ratio:16/9}.video-player{width:100%;height:100%;background:#000}.big-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:74px;height:74px;border-radius:50%;border:0;background:var(--accent);color:#fff;font-size:26px;display:flex;align-items:center;justify-content:center}.episode-grid{display:flex;flex-wrap:wrap;gap:8px}.episode-grid a{padding:10px 13px;border-radius:12px;background:rgba(100,116,139,.12);font-weight:800}.episode-grid a.active{background:var(--accent);color:#fff}.play-cinema{background:#050505;color:#fff;padding:24px;border-radius:28px}.play-cinema .tpl-section{background:#111;color:#fff;border-color:#222}.play-mobilelike{max-width:620px;margin:auto}.play-minimal .play-under{display:grid;grid-template-columns:1fr 320px;gap:22px}.share-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:14px 0}.share-btn{border:0;background:rgba(100,116,139,.12);border-radius:999px;padding:8px 10px}.mobile-search-panel{display:none}.mobile-search-panel.show{display:block;width:min(680px,calc(100% - 32px));margin:10px auto}.drawer-mask,.mobile-drawer{display:none}.mobile-bottom{display:none}.back-top{position:fixed;right:16px;bottom:76px;border:0;background:var(--accent);color:#fff;border-radius:50%;width:42px;height:42px;display:none}.back-top.show{display:block}.footer-inner{width:min(1280px,calc(100% - 32px));margin:0 auto;padding:28px 0}.site-footer{border-top:1px solid var(--line);background:#fff}.footer-links{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}.footer-links a{color:var(--accent);font-weight:800}.card-style-2,.card-style-9,.horizontal-info{display:grid;grid-template-columns:130px 1fr;gap:12px;background:rgba(255,255,255,.72);border:1px solid var(--line);border-radius:18px;padding:10px}.card-style-2 .poster-img,.card-style-9 .poster-img,.horizontal-info .poster-img{aspect-ratio:16/10}.card-style-5{display:grid;grid-template-columns:1fr auto auto;gap:10px;align-items:center;background:#fff;border-bottom:1px solid var(--line);padding:12px}.flip-card{position:relative;min-height:260px;perspective:800px}.flip-front,.flip-back{position:absolute;inset:0;transition:.35s;backface-visibility:hidden}.flip-back{transform:rotateY(180deg);background:var(--accent);color:#fff;border-radius:16px;padding:16px}.flip-card:hover .flip-front{transform:rotateY(180deg)}.flip-card:hover .flip-back{transform:rotateY(0)}.rank-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:10px}.rank-card i{color:var(--accent);font-weight:900}.tpl-03,.tpl-15,.tpl-26,.tpl-42,.tpl-56{--text:#e5e7eb;--muted:#94a3b8;--soft:#060912;--card:#0f172a;--line:rgba(255,255,255,.12)}.tpl-03 .tpl-header,.tpl-15 .tpl-header,.tpl-26 .tpl-header,.tpl-42 .tpl-header,.tpl-56 .tpl-header,.tpl-03 .site-footer,.tpl-15 .site-footer,.tpl-26 .site-footer,.tpl-42 .site-footer,.tpl-56 .site-footer{background:#080d19;color:#fff}.tpl-25,.tpl-44,.tpl-49,.tpl-63,.tpl-70{--soft:#fff;--card:#fff}.tpl-39{font-size:18px}.tpl-39 .poster-title,.tpl-39 .tpl-nav a{font-size:18px}.tpl-39 .btn-primary,.tpl-39 .btn-soft{padding:16px 22px}.tpl-30 .poster-img,.tpl-52 .poster-img,.tpl-63 .poster-img,.tpl-70 .poster-img{display:none}.tpl-30 .poster-grid,.tpl-52 .poster-grid,.tpl-63 .poster-grid,.tpl-70 .poster-grid{display:block}.tpl-30 .poster-card,.tpl-52 .poster-card,.tpl-63 .poster-card,.tpl-70 .poster-card{display:grid;grid-template-columns:1fr auto;gap:10px;padding:12px;border-bottom:1px solid var(--line)}
@media (max-width: 980px){.site-main{width:min(100% - 24px,760px);padding-bottom:88px}.header-line,.two-first,.mini-bottom,.bottom-top,.footer-inner{width:calc(100% - 24px)}.tpl-nav{display:none}.tpl-search{display:none}.tpl-icon,.mobile-menu-btn,.mobile-search-btn{display:inline-flex}.tpl-header-side{position:sticky;width:auto;inset:auto;padding:0}.header-4 .site-main{margin-left:auto;width:min(100% - 24px,760px)}.side-nav,.side-search{display:none}.header-card-box{grid-template-columns:1fr auto}.poster-grid{grid-template-columns:repeat(2,1fr)}.poster-row{grid-auto-columns:42vw}.wok-hero-grid{grid-template-columns:1fr;padding:24px}.wok-hero-main-poster{display:none}.fofo-hero{min-height:auto}.wok-hero-text h1{font-size:28px}.wok-hero-list{grid-template-columns:repeat(2,1fr)}.layout-portal,.content-layout,.detail-layout,.play-layout,.layout-feed,.detail-database,.detail-split,.play-theater,.play-grid,.play-minimal .play-under,.topic-band,.mag-grid,.detail-cover,.list-with-left{grid-template-columns:1fr}.rank-matrix,.multi-rank{grid-template-columns:1fr}.category-cards{grid-template-columns:repeat(3,1fr)}.detail-hero{grid-template-columns:120px 1fr}.score-box,.portal-side,.content-side{display:none}.detail-poster img{border-radius:14px}.player-box{border-radius:16px}.mobile-drawer{display:block;position:fixed;right:-310px;top:0;bottom:0;width:300px;background:#fff;z-index:80;padding:18px;transition:.2s;box-shadow:-12px 0 40px rgba(0,0,0,.18)}.mobile-drawer.show{right:0}.mobile-drawer a{display:block;padding:14px;border-bottom:1px solid var(--line)}.drawer-head{display:flex;justify-content:space-between;align-items:center}.drawer-head button{border:0;background:var(--accent);color:#fff;border-radius:10px;padding:8px}.drawer-mask{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:79}.drawer-mask.show{display:block}.mobile-bottom{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);z-index:60}.mobile-bottom a{display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 0;font-size:12px;color:var(--muted)}.mobile-bottom span{font-size:20px;color:var(--accent)}.grid-nav{grid-template-columns:repeat(3,1fr)}.card-style-2,.card-style-9,.horizontal-info{grid-template-columns:100px 1fr}.waterfall-grid{columns:2 140px}.time-item,.update-axis article{grid-template-columns:1fr}.tpl-18 .site-main,.tpl-37 .site-main{max-width:520px}.mobile-3 .tpl-header .tpl-search,.mobile-7 .tpl-header .tpl-search,.mobile-11 .tpl-header .tpl-search{display:flex;min-width:0}.mobile-4 .mobile-bottom,.mobile-11 .mobile-bottom{display:grid}.mobile-8 .fofo-hero{margin-top:-12px;border-radius:0 0 28px 28px}.mobile-10 .category-cards{grid-template-columns:repeat(2,1fr)}}
@media (max-width:560px){.poster-grid{gap:12px}.category-cards{grid-template-columns:repeat(2,1fr)}.search-home form,.search-card form{display:grid}.search-home input,.search-card input,.search-home button,.search-card button{border-radius:14px}.detail-hero{grid-template-columns:1fr}.wok-hero-list{grid-template-columns:1fr}.poster-row{grid-auto-columns:68vw}.tpl-section{padding:15px;border-radius:16px}.phone-frame{border-width:6px;border-radius:26px}.side-episodes .episode-grid{max-height:280px;overflow:auto}}

/* template_62: 电影资料库风格 */

/* FIX_CARD_GRID_192_195_202_START */
/* 修复 192/195/202：横向卡片被 6/7 列网格压窄，导致文字竖排、卡片过高 */
.page-index .tpl-section .poster-grid,
.anime-home .poster-grid,
.blue-portal .poster-grid,
.vertical-home .poster-grid,
.landscape-home .poster-grid,
.poster-grid.anime-grid,
.poster-grid.blue-grid,
.poster-grid.portal-grid,
.poster-grid.simple-grid,
.poster-grid.compact-grid,
.poster-grid.mobile-first-grid,
.poster-grid.vertical-grid,
.poster-grid.landscape-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 16px !important;
    align-items: stretch !important;
}

.poster-grid .card-style-2,
.poster-grid .card-style-9 {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 120px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
    overflow: hidden !important;
    min-height: 120px !important;
    height: auto !important;
}

.poster-grid .card-style-2 .poster-img,
.poster-grid .card-style-9 .poster-img {
    width: 120px !important;
    max-width: 120px !important;
    aspect-ratio: 16 / 10 !important;
    height: auto !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.poster-grid .card-style-2 .poster-img img,
.poster-grid .card-style-9 .poster-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.poster-grid .card-style-2 .poster-body,
.poster-grid .card-style-9 .poster-body {
    min-width: 0 !important;
    overflow: hidden !important;
}

.poster-grid .card-style-2 .poster-title,
.poster-grid .card-style-9 .poster-title {
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    line-height: 1.35 !important;
    margin-top: 0 !important;
    font-size: 15px !important;
}

.poster-grid .card-style-2 .poster-body p,
.poster-grid .card-style-9 .poster-body p {
    margin: 6px 0 !important;
    line-height: 1.55 !important;
    font-size: 13px !important;
    color: var(--muted) !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    word-break: break-word !important;
}

.poster-grid .card-style-2 .poster-meta,
.poster-grid .card-style-9 .poster-meta {
    display: block !important;
    font-size: 12px !important;
    margin-top: 4px !important;
    color: var(--muted) !important;
}

/* 横向滚动区域保持横向卡片，但避免文字被压成一列 */
.poster-row .card-style-2,
.poster-row .card-style-9 {
    min-width: 260px !important;
    grid-template-columns: 110px minmax(0, 1fr) !important;
}

.poster-row .card-style-2 .poster-img,
.poster-row .card-style-9 .poster-img {
    width: 110px !important;
    max-width: 110px !important;
}

/* 移动端 */
@media (max-width: 980px) {
    .page-index .tpl-section .poster-grid,
    .anime-home .poster-grid,
    .blue-portal .poster-grid,
    .vertical-home .poster-grid,
    .landscape-home .poster-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .poster-grid .card-style-2,
    .poster-grid .card-style-9 {
        grid-template-columns: 96px minmax(0, 1fr) !important;
        gap: 10px !important;
    }

    .poster-grid .card-style-2 .poster-img,
    .poster-grid .card-style-9 .poster-img {
        width: 96px !important;
        max-width: 96px !important;
    }
}

@media (max-width: 560px) {
    .page-index .tpl-section .poster-grid,
    .anime-home .poster-grid,
    .blue-portal .poster-grid,
    .vertical-home .poster-grid,
    .landscape-home .poster-grid {
        grid-template-columns: 1fr !important;
    }

    .poster-grid .card-style-2,
    .poster-grid .card-style-9 {
        grid-template-columns: 105px minmax(0, 1fr) !important;
    }

    .poster-grid .card-style-2 .poster-img,
    .poster-grid .card-style-9 .poster-img {
        width: 105px !important;
        max-width: 105px !important;
    }
}
/* FIX_CARD_GRID_192_195_202_END */


/* FIX_HEADER9_FINAL_START */
/* 最终修复 header-9 / tpl-header-text 顶部导航贴左问题 */

/* 页面禁止横向溢出 */
html,
body {
    overflow-x: hidden !important;
}

/* Header9 是直接 header，没有内层 container，所以必须直接修 header 本身 */
body.header-9 .site-wrap > header.tpl-header.tpl-header-text,
body.tpl-69 .site-wrap > header.tpl-header.tpl-header-text,
.site-wrap > header.tpl-header.tpl-header-text {
    width: 100% !important;
    max-width: none !important;
    min-height: 72px !important;

    margin: 0 !important;
    padding-left: max(24px, calc((100vw - 1280px) / 2)) !important;
    padding-right: max(24px, calc((100vw - 1280px) / 2)) !important;
    padding-top: 14px !important;
    padding-bottom: 12px !important;

    box-sizing: border-box !important;

    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-areas:
        "brand nav icon"
        "search search search" !important;
    column-gap: 28px !important;
    row-gap: 12px !important;

    align-items: center !important;

    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}

/* 站点名称 */
body.header-9 .tpl-header-text .tpl-brand,
body.tpl-69 .tpl-header-text .tpl-brand,
.tpl-header-text .tpl-brand.plain {
    grid-area: brand !important;
    display: inline-flex !important;
    align-items: center !important;

    margin: 0 !important;
    padding: 0 !important;

    position: relative !important;
    left: auto !important;
    transform: none !important;

    white-space: nowrap !important;
    flex: none !important;
}

/* 导航 */
body.header-9 .tpl-header-text .tpl-nav,
body.tpl-69 .tpl-header-text .tpl-nav,
.tpl-header-text .tpl-nav.text-nav {
    grid-area: nav !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;

    gap: 24px !important;

    width: auto !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    box-sizing: border-box !important;
}

body.header-9 .tpl-header-text .tpl-nav a,
body.tpl-69 .tpl-header-text .tpl-nav a,
.tpl-header-text .tpl-nav.text-nav a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    white-space: nowrap !important;
    flex: 0 0 auto !important;

    margin: 0 !important;
}

/* 搜索框放第二行，但左右和主体对齐 */
body.header-9 .tpl-header-text .tpl-search.underline,
body.tpl-69 .tpl-header-text .tpl-search.underline,
.tpl-header-text .tpl-search.underline {
    grid-area: search !important;

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

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;

    box-sizing: border-box !important;
}

body.header-9 .tpl-header-text .tpl-search.underline input,
body.tpl-69 .tpl-header-text .tpl-search.underline input,
.tpl-header-text .tpl-search.underline input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    box-sizing: border-box !important;
}

body.header-9 .tpl-header-text .tpl-search.underline button,
body.tpl-69 .tpl-header-text .tpl-search.underline button,
.tpl-header-text .tpl-search.underline button {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* 手机菜单按钮 */
body.header-9 .tpl-header-text .tpl-icon,
body.tpl-69 .tpl-header-text .tpl-icon,
.tpl-header-text .tpl-icon.mobile-menu-btn {
    grid-area: icon !important;

    margin: 0 !important;
    padding: 0 !important;

    justify-self: end !important;
    align-self: center !important;
}

/* 主体宽度保持原样，不动链接和模板逻辑 */
.site-main {
    box-sizing: border-box !important;
}

/* 中等屏幕 */
@media (max-width: 980px) {
    body.header-9 .site-wrap > header.tpl-header.tpl-header-text,
    body.tpl-69 .site-wrap > header.tpl-header.tpl-header-text,
    .site-wrap > header.tpl-header.tpl-header-text {
        padding-left: 16px !important;
        padding-right: 16px !important;
        grid-template-columns: auto minmax(0, 1fr) auto !important;
        grid-template-areas:
            "brand nav icon"
            "search search search" !important;
        column-gap: 16px !important;
    }

    body.header-9 .tpl-header-text .tpl-nav,
    body.tpl-69 .tpl-header-text .tpl-nav,
    .tpl-header-text .tpl-nav.text-nav {
        gap: 16px !important;
    }
}

/* 小屏幕 */
@media (max-width: 640px) {
    body.header-9 .site-wrap > header.tpl-header.tpl-header-text,
    body.tpl-69 .site-wrap > header.tpl-header.tpl-header-text,
    .site-wrap > header.tpl-header.tpl-header-text {
        padding-left: 12px !important;
        padding-right: 12px !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-areas:
            "brand icon"
            "nav nav"
            "search search" !important;
    }

    body.header-9 .tpl-header-text .tpl-nav,
    body.tpl-69 .tpl-header-text .tpl-nav,
    .tpl-header-text .tpl-nav.text-nav {
        width: 100% !important;
        gap: 14px !important;
        padding-bottom: 4px !important;
    }
}
/* FIX_HEADER9_FINAL_END */
