@charset "utf-8";

/* ================================================================
   NOVA  ·  真·响应式 / 移动端优先
   手机：单列 + 底部标签栏      平板：多列自适应
   桌面(≥1024)：左侧固定分类栏 + 右侧内容，容器放宽到 1200
   皮肤由 <body data-skin> 决定（{全局固定字母N}，同域名不变）
   ================================================================ */

:root {
    --brand: #2f6bff;
    --brand-soft: #eaf0ff;
    --paper: #ffffff;
    --wash: #f5f6f8;
    --line: #e5e7eb;
    --ink: #14171c;
    --sub: #5a6473;
    --dim: #9aa2b1;
    --pad: 14px;
    --r: 10px;
    --tile-min: 102px;
    --dock: 54px;
}

/* --- 跨域名皮肤分流：{全局固定字母1} 落在哪组就用哪套主色 --- */

:is([data-skin="b" i], [data-skin="f" i], [data-skin="j" i], [data-skin="n" i], [data-skin="r" i], [data-skin="v" i], [data-skin="z" i]) {
    --brand: #0f9d76;
    --brand-soft: #e6f6f1;
}

:is([data-skin="c" i], [data-skin="g" i], [data-skin="k" i], [data-skin="o" i], [data-skin="s" i], [data-skin="w" i]) {
    --brand: #e0543f;
    --brand-soft: #fdeeeb;
}

:is([data-skin="d" i], [data-skin="h" i], [data-skin="l" i], [data-skin="p" i], [data-skin="t" i], [data-skin="x" i]) {
    --brand: #7a4ddb;
    --brand-soft: #f1ebfd;
}

/* --- 跨域名疏密分流：{全局固定字母2} --- */

:is([data-dense="a" i], [data-dense="e" i], [data-dense="i" i], [data-dense="m" i], [data-dense="q" i], [data-dense="u" i], [data-dense="y" i]) {
    --pad: 11px;
    --r: 4px;
    --tile-min: 92px;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    background: var(--wash);
}

body {
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    -webkit-tap-highlight-color: rgba(47, 107, 255, .12);
    overscroll-behavior-y: none;
}

img {
    display: block;
    border: 0;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    border: 0;
    background: none;
    cursor: pointer;
}

.hush {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    opacity: 0;
    pointer-events: none;
}

/* ================= 骨架：源码 deck → nav → top → ender ================= */

.shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "top"
        "nav"
        "deck"
        "ender";
    min-height: 100vh;
}

.bar-top {
    grid-area: top;
}

.aside-nav {
    grid-area: nav;
}

.deck {
    grid-area: deck;
}

.ender {
    grid-area: ender;
}

/* 桌面：整体重排为「顶栏通栏 + 左导航 + 右内容」 */

@media (min-width: 1024px) {
    .shell {
        max-width: 1200px;
        margin: 0 auto;
        column-gap: 20px;
        grid-template-columns: 208px minmax(0, 1fr);
        grid-template-areas:
            "top  top"
            "nav  deck"
            "ender ender";
        border-left: 1px solid var(--line);
        border-right: 1px solid var(--line);
    }
}

/* ================= 顶栏 ================= */

.bar-top {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px var(--pad);
    background: var(--wash);
    border-bottom: 1px solid var(--line);
}

.bar-logo img {
    height: 32px;
    width: auto;
}

.find-form {
    flex: 1 1 auto;
    display: flex;
    min-width: 0;
    height: 40px;
    /* 移动端触控高度 ≥40 */
    background: var(--wash);
    border-radius: 20px;
    overflow: hidden;
}

.find-in {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 8px 0 16px;
    font-size: 15px;
    /* ≥16px 可避免 iOS 聚焦缩放，此处 15 配合下方 media 调整 */
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
}

@media (max-width: 480px) {
    .find-in {
        font-size: 16px;
    }
}

.find-in::placeholder {
    color: var(--dim);
}

.find-btn {
    flex: 0 0 auto;
    min-width: 64px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--brand);
}

/* ================= 分类导航：手机宫格 / 桌面侧栏 ================= */

.aside-nav {
    padding: 12px var(--pad) 4px;
}

@media (min-width: 1024px) {
    .aside-nav {
        position: sticky;
        top: 66px;
        align-self: start;
        padding: 18px 0 18px var(--pad);
    }
}

.nav-title {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--dim);
    letter-spacing: 1px;
}

.nav-web {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    gap: 8px;
}

@media (min-width: 1024px) {
    .nav-web {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }
}

.nav-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 6px 8px;
    font-size: 13px;
    color: var(--sub);
    background: var(--wash);
    border-radius: var(--r);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 1024px) {
    .nav-cell {
        justify-content: flex-start;
        min-height: 36px;
        background: transparent;
    }
}

.nav-cell:hover,
.nav-cell:focus {
    color: var(--brand);
    background: var(--brand-soft);
}

/* ================= 区块标题 ================= */

.strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px var(--pad) 9px;
}

.strip-h2 {
    font-size: clamp(15px, 4vw, 18px);
    font-weight: 800;
    letter-spacing: .3px;
}

.strip-h2::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: .9em;
    margin-right: 7px;
    vertical-align: -1px;
    border-radius: 2px;
    background: var(--brand);
}

.strip-more {
    flex: 0 0 auto;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 4px;
    font-size: 12.5px;
    color: var(--dim);
}

.strip-more:hover {
    color: var(--brand);
}

/* ================= 影片瓦片：auto-fill 流式列数 ================= */

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--tile-min), 1fr));
    gap: 15px 9px;
    padding: 0 var(--pad) 6px;
    content-visibility: auto;
    contain-intrinsic-size: 1px 900px;
}

.tile {
    min-width: 0;
}

.tile-pic {
    position: relative;
    aspect-ratio: 2 / 3;
    margin-bottom: 6px;
    border-radius: var(--r);
    overflow: hidden;
    background: var(--wash) url("../img/load.gif") center / 38px 38px no-repeat;
}

.tile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tile-flag {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 6px 4px;
    font-size: 11px;
    color: #fff;
    text-align: right;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .72));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tile-score {
    position: absolute;
    top: 5px;
    right: 5px;
    padding: 1px 5px;
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
    color: #fff;
    background: var(--brand);
    border-radius: 3px;
}

.tile-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tile-sub {
    display: block;
    font-size: 11px;
    color: var(--dim);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ================= 分页 ================= */

.pages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    padding: 14px var(--pad) 18px;
}

.page-b {
    min-width: 42px;
    min-height: 40px;
    /* 移动端触控目标 */
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--sub);
    background: var(--wash);
    border-radius: var(--r);
}

.page-b:hover,
.page-b--cur {
    color: #fff;
    background: var(--brand);
}

/* ================= 详情页 ================= */

.detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "shot"
        "data"
        "cta"
        "text";
}

@media (min-width: 720px) {
    .detail {
        grid-template-columns: minmax(0, 1fr) 288px;
        column-gap: 18px;
        grid-template-areas:
            "shot shot"
            "text data"
            "text cta";
        align-items: start;
    }
}

.top-shot {
    grid-area: shot;
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    padding: 16px var(--pad);
    overflow: hidden;
    isolation: isolate;
}

.shot-art {
    position: absolute;
    inset: -20%;
    z-index: -2;
    background-image: var(--pic);
    background-size: cover;
    background-position: center 28%;
    filter: blur(26px) saturate(1.3);
    transform: scale(1.12);
}

.shot-fade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .94) 70%, var(--paper));
}

.shot-cover {
    flex: 0 0 108px;
    aspect-ratio: 2 / 3;
    border-radius: var(--r);
    overflow: hidden;
    background: var(--wash) url("../img/load.gif") center / 36px 36px no-repeat;
    box-shadow: 0 8px 22px rgba(20, 23, 28, .22);
}

@media (min-width: 720px) {
    .shot-cover {
        flex-basis: 148px;
    }
}

.shot-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shot-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.shot-h1 {
    font-size: clamp(18px, 5.4vw, 26px);
    font-weight: 800;
    line-height: 1.28;
}

.shot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.shot-tag {
    padding: 2px 9px;
    font-size: 11.5px;
    color: var(--sub);
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.shot-tag--hot {
    color: #fff;
    background: var(--brand);
    border-color: transparent;
}

/* 参数表 */

.data-grid {
    grid-area: data;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 12px;
    padding: 8px var(--pad) 0;
    font-size: 13px;
}

@media (min-width: 720px) {
    .data-grid {
        padding-left: 0;
    }
}

.data-lab {
    color: var(--dim);
}

.data-txt {
    color: var(--sub);
    min-width: 0;
}

.data-txt a {
    color: var(--brand);
}

/* 操作区 */

.cta {
    grid-area: cta;
    display: flex;
    gap: 10px;
    padding: 14px var(--pad);
}

@media (min-width: 720px) {
    .cta {
        padding-left: 0;
    }
}

.cta-go,
.cta-alt {
    flex: 1 1 0;
    min-height: 46px;
    /* 移动端主操作 ≥46 */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--r);
}

.cta-go {
    color: #fff;
    background: var(--brand);
}

.cta-alt {
    color: var(--brand);
    background: var(--brand-soft);
}

.cta-go:active,
.cta-alt:active {
    transform: translateY(1px);
}

/* 正文 */

.text-block {
    grid-area: text;
    padding: 4px var(--pad) 6px;
}

.text-h {
    margin-bottom: 8px;
    font-size: 15px;
    font-weight: 800;
}

.text-p {
    margin-bottom: 9px;
    font-size: 13.5px;
    line-height: 1.9;
    color: var(--sub);
}

.text-p strong {
    color: var(--ink);
}

/* ================= 链接云 ================= */

.cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 2px var(--pad) 16px;
}

.cloud-a {
    max-width: 100%;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    color: var(--sub);
    background: var(--wash);
    border-radius: var(--r);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cloud-a:hover {
    color: var(--brand);
    background: var(--brand-soft);
}

/* ================= 页脚 ================= */

.ender {
    margin-top: 12px;
    padding: 16px var(--pad) calc(var(--dock) + 20px + env(safe-area-inset-bottom, 0px));
    background: var(--wash);
    border-top: 1px solid var(--line);
}

@media (min-width: 1024px) {
    .ender {
        padding-bottom: 24px;
    }
}

.ender-friends {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    text-align: center;
    color: var(--dim);
}

.ender-friends b {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--ink);
}

.ender-friends a {
    display: inline-block;
    margin: 2px 7px;
    color: var(--sub);
}

.ender-friends a:hover {
    color: var(--brand);
}

.ender-legal {
    font-size: 11.5px;
    line-height: 1.85;
    color: var(--dim);
    text-align: center;
}

.ender-mark {
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--dim);
    text-align: center;
}

.ender-mark a {
    margin: 0 5px;
}

.ender-mark a:hover {
    color: var(--brand);
}

/* ================= 底部标签栏（仅手机/平板） ================= */

.dockbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: calc(var(--dock) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--line);
}

@media (min-width: 1024px) {
    .dockbar {
        display: none;
    }
}

.dock-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 11px;
    color: var(--dim);
}

.dock-cell svg {
    width: 20px;
    height: 20px;
}

.dock-cell--cur {
    color: var(--brand);
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
