/* ==========================================================================
   Atlas 模板 · base（结构层：令牌 / 布局 / 通用组件）
   --------------------------------------------------------------------------
   只放「全站复用」的东西：容器、按钮、胶囊、序号牌、顶栏、区块头、海报卡、
   行式榜、面包屑、分页、页脚。单页专属版式一律写在 dv-theme.css（页面层）。
   类名族：ns- = 结构组件；dv- = 页面版式（见 dv-theme.css）。
   ========================================================================== */

:root {
    /* ---- 燕麦纸与牛仔靛（牧野号牌：竞技场上的号码背心） ------------------ */
    --ns-paper: #f2eee2;          /* 页面底：燕麦纸 */
    --ns-surface: #fffdf6;        /* 卡面：奶白纸 */
    --ns-surface-2: #f6f1e4;      /* 次级面：标签底 / 表头 / 输入框 */
    --ns-surface-3: #e7e0cc;      /* 图占位 / 骨架 */
    --ns-ink: #1e2428;            /* 墨蓝黑字 */
    --ns-ink-2: #525c61;          /* 次级文字 */
    --ns-ink-3: #7d857e;          /* 弱文字（时间 / 计数） */
    --ns-line: #ded6c2;           /* 1px 围栏细线 */
    --ns-line-2: #c5b99d;         /* 强线（输入框 / 表头） */

    /* ---- 牛仔靛（唯一主色：号牌 / 当前态 / 主行动） ---------------------- */
    --ns-main: #2e4a63;
    --ns-main-d: #22384c;         /* hover 压深 */
    --ns-main-ink: #f5f9fc;       /* 主色底上的字 */
    --ns-main-s: rgba(46, 74, 99, .09);
    --ns-main-s2: rgba(46, 74, 99, .18);

    /* ---- 干草金（点缀：围栏横杆 / 强调数字 / 次级标记） ------------------ */
    --ns-accent: #c19a3f;
    --ns-accent-d: #9c7a2a;
    --ns-accent-ink: #241b08;
    --ns-accent-s: rgba(193, 154, 63, .14);

    /* 提示态：同色系深浅变体，不引进第四种彩色 */
    --ns-warn-s: rgba(168, 68, 47, .12);
    --ns-danger: #a8442f;
    --ns-danger-s: rgba(168, 68, 47, .1);

    /* ---- 字号（最大标题 24px：需求方硬约束「不能超大字号」） ------------- */
    --ns-fs-2xs: 11px;
    --ns-fs-xs: 12px;
    --ns-fs-sm: 13px;
    --ns-fs-base: 14px;
    --ns-fs-md: 15px;
    --ns-fs-lg: 17px;
    --ns-fs-xl: 19px;
    --ns-fs-h1: 22px;
    --ns-fs-max: 24px;
    --ns-lh: 1.6;
    --ns-lh-tight: 1.3;

    /* ---- 字体：全站一套无衬线；数字走等宽变体 ---------------------------- */
    --ns-sans: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --ns-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    /* ---- 容器与间距（紧凑是身份，不要放大） ------------------------------ */
    --ns-shell: 1340px;
    --ns-gutter: clamp(12px, 1.5vw, 20px);
    --ns-gap: 14px;                              /* 板块间距 */
    --ns-gap-xs: 8px;                            /* 卡片间隙 */
    --ns-pad: clamp(12px, 1.1vw, 16px);          /* 卡内边距 */

    /* ---- 圆角：号牌纸卡小圆角，下缘再收一档 ------------------------------ */
    --ns-r-xs: 2px;
    --ns-r-sm: 4px;
    --ns-r-md: 8px;
    --ns-r-lg: 12px;

    /* ---- 阴影：纸面轻投影，悬停时才压出号牌框 ---------------------------- */
    --ns-sh-1: 0 1px 2px rgba(78, 62, 32, .08);
    --ns-sh-2: 0 18px 38px -18px rgba(78, 62, 32, .24);
    --ns-glow: 0 0 0 1px rgba(46, 74, 99, .3), 0 18px 40px -22px rgba(46, 74, 99, .38);

    --ns-ease: cubic-bezier(.22, .61, .36, 1);
    --ns-t: .18s;

    --ns-header-h: 58px;
    --ns-anchor-offset: 72px;

    color-scheme: light;
}

/* --------------------------------------------------------------------------
   1. 容器
   -------------------------------------------------------------------------- */
.ns-shell {
    width: 100%;
    max-width: var(--ns-shell);
    margin-inline: auto;
    padding-inline: var(--ns-gutter);
}
.ns-main { padding-block: var(--ns-gap); min-height: 45vh; }
.ns-main > .ns-shell > * + * { margin-top: var(--ns-gap); }

/* --------------------------------------------------------------------------
   2. 按钮 / 胶囊 / 序号牌
   -------------------------------------------------------------------------- */
.ns-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    height: 34px;
    padding: 0 15px;
    border-radius: var(--ns-r-md);
    background: var(--ns-main);
    color: var(--ns-main-ink);
    font-size: var(--ns-fs-base);
    font-weight: 600;
    white-space: nowrap;
    transition: background var(--ns-t) var(--ns-ease), border-color var(--ns-t) var(--ns-ease), color var(--ns-t) var(--ns-ease);
}
.ns-btn:hover { background: var(--ns-main-d); }
.ns-btn svg { width: 14px; height: 14px; fill: currentColor; flex: 0 0 auto; }
.ns-btn--accent { background: var(--ns-accent); color: var(--ns-accent-ink); }
.ns-btn--accent:hover { background: var(--ns-accent-d); }
.ns-btn--ghost {
    background: var(--ns-surface);
    color: var(--ns-ink);
    border: 1px solid var(--ns-line-2);
}
.ns-btn--ghost:hover { border-color: var(--ns-main); color: var(--ns-main); background: var(--ns-main-s); }
.ns-btn--sm { height: 28px; padding: 0 11px; font-size: var(--ns-fs-sm); }

.ns-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;                 /* flex 行内不被压窄折行 */
    height: 26px;
    padding: 0 10px;
    border-radius: var(--ns-r-md);
    background: var(--ns-surface-2);
    border: 1px solid var(--ns-line);
    color: var(--ns-ink-2);
    font-size: var(--ns-fs-sm);
    line-height: 1;
    white-space: nowrap;
    transition: background var(--ns-t) var(--ns-ease), color var(--ns-t) var(--ns-ease), border-color var(--ns-t) var(--ns-ease);
}
.ns-chip:hover { border-color: var(--ns-main); color: var(--ns-main); background: var(--ns-main-s); }
.ns-chip.is-active {
    background: var(--ns-main);
    border-color: var(--ns-main);
    color: var(--ns-main-ink);
    font-weight: 600;
}
.ns-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* 序号牌：楼层 / 板块编号（靛蓝细框 + 等宽数字） */
.ns-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 24px;
    height: 22px;
    padding: 0 5px;
    border: 1px solid var(--ns-main);
    border-radius: var(--ns-r-sm);
    color: var(--ns-main);
    font: 600 var(--ns-fs-xs)/1 var(--ns-mono);
    letter-spacing: .02em;
}
.ns-index--fill { background: var(--ns-main); color: var(--ns-main-ink); }
.ns-index--accent { border-color: var(--ns-accent); color: var(--ns-accent); }

/* --------------------------------------------------------------------------
   3. 顶栏（传统横排频道菜单，窄屏由 JS 搬进抽屉）
   -------------------------------------------------------------------------- */
.ns-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(242, 238, 226, .92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ns-line);
}
/* 顶沿围栏光带：竞技场围栏的一道横向标线 */
.ns-header::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--ns-main), var(--ns-accent) 46%, transparent 88%);
    pointer-events: none;
}
.ns-header__bar {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1.4vw, 22px);
    height: var(--ns-header-h);
}
.ns-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.ns-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 26px;
    border-radius: 3px 3px 8px 8px;
    background: linear-gradient(180deg, var(--ns-main), var(--ns-main-d));
    border-bottom: 3px solid var(--ns-accent);
    color: var(--ns-main-ink);
    font: 800 13px/1 var(--ns-sans);
    letter-spacing: -.02em;
    box-shadow: 0 3px 10px -4px rgba(46, 74, 99, .55);
}
.ns-brand__name {
    font-size: var(--ns-fs-lg);
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--ns-ink);
    white-space: nowrap;
}
.ns-header__nav { flex: 1 1 auto; min-width: 0; }

.ns-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    height: var(--ns-header-h);
}
.ns-nav__item { position: relative; height: 100%; display: flex; align-items: center; }
.ns-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 100%;
    padding: 0 11px;
    font-size: var(--ns-fs-md);
    font-weight: 600;
    color: var(--ns-ink);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color var(--ns-t) var(--ns-ease), border-color var(--ns-t) var(--ns-ease), background var(--ns-t) var(--ns-ease);
}
.ns-nav__link:hover { color: var(--ns-main); background: var(--ns-main-s); }
.ns-nav__link.is-active { color: var(--ns-main); border-bottom-color: var(--ns-accent); }
.ns-nav__caret { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.ns-nav__item:hover .ns-nav__caret,
.ns-nav__item:focus-within .ns-nav__caret { transform: rotate(180deg); }

/* 子分类浮层：悬停 / 键盘聚焦展开（触发条目必须 relative，否则会认到 sticky 顶栏） */
.ns-nav__sub {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 70;
    width: max-content;            /* 不写会被条目宽度收缩成一条 */
    max-width: 460px;
    padding: 6px;
    background: var(--ns-surface);
    border: 1px solid var(--ns-line);
    border-radius: var(--ns-r-md);
    box-shadow: var(--ns-sh-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity var(--ns-t) var(--ns-ease), transform var(--ns-t) var(--ns-ease), visibility var(--ns-t);
}
.ns-nav__item:hover > .ns-nav__sub,
.ns-nav__item:focus-within > .ns-nav__sub { opacity: 1; visibility: visible; transform: translateY(0); }
.ns-nav__sub nav { display: flex; flex-wrap: wrap; gap: 3px; max-width: 448px; }
.ns-nav__sub a {
    padding: 5px 9px;
    border-radius: var(--ns-r-sm);
    font-size: var(--ns-fs-sm);
    color: var(--ns-ink-2);
    white-space: nowrap;
}
.ns-nav__sub a:hover { background: var(--ns-main-s); color: var(--ns-main); }
.ns-nav__sub a.is-active { background: var(--ns-main); color: var(--ns-main-ink); font-weight: 600; }

.ns-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-left: auto; }
.ns-search {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 11px;
    background: var(--ns-surface-2);
    border: 1px solid var(--ns-line-2);
    border-radius: var(--ns-r-md);
    transition: border-color var(--ns-t) var(--ns-ease), background var(--ns-t) var(--ns-ease);
}
.ns-search:focus-within { border-color: var(--ns-main); background: var(--ns-surface); }
.ns-search svg { width: 14px; height: 14px; fill: none; stroke: var(--ns-ink-3); stroke-width: 2; flex: 0 0 auto; }
.ns-search input {
    width: 168px;
    border: 0;
    background: none;
    outline: none;
    font-size: var(--ns-fs-sm);
}
.ns-search input::placeholder { color: var(--ns-ink-3); }
.ns-iconbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: var(--ns-r-md);
    color: var(--ns-ink-2);
    transition: background var(--ns-t) var(--ns-ease), color var(--ns-t) var(--ns-ease);
}
.ns-iconbtn:hover { background: var(--ns-main-s); color: var(--ns-main); }
.ns-iconbtn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.ns-header__burger { display: none; }

/* 窄屏抽屉 */
.ns-drawer {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(5, 8, 13, .62);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ns-t) var(--ns-ease), visibility var(--ns-t);
}
.ns-drawer.is-open { opacity: 1; visibility: visible; }
.ns-drawer__panel {
    position: absolute;
    inset-block: 0;
    right: 0;
    width: min(88vw, 340px);
    background: var(--ns-surface);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .24s var(--ns-ease);
}
.ns-drawer.is-open .ns-drawer__panel { transform: translateX(0); }
.ns-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ns-line);
}
.ns-drawer__head strong { font-size: var(--ns-fs-md); }
.ns-drawer__search { padding: 10px 14px; border-bottom: 1px solid var(--ns-line); }
.ns-drawer__search .ns-search { width: 100%; }
.ns-drawer__search input { width: 100%; }
.ns-drawer__body { flex: 1 1 auto; overflow-y: auto; padding: 8px 14px 20px; }
.ns-drawer__body .ns-nav { display: block; height: auto; }
.ns-drawer__body .ns-nav__item { display: block; height: auto; }
.ns-drawer__body .ns-nav__link {
    height: auto;
    padding: 9px 2px;
    border-bottom: 1px solid var(--ns-line);
    font-size: var(--ns-fs-md);
}
.ns-drawer__body .ns-nav__link.is-active { border-bottom-color: var(--ns-line); color: var(--ns-main); }
.ns-drawer__body .ns-nav__sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    width: auto;
    max-width: none;
    padding: 4px 0 8px;
    border: 0;
    box-shadow: none;
    background: none;
}
.ns-drawer__body .ns-nav__sub nav { max-width: none; gap: 4px; }
.ns-drawer__body .ns-nav__caret { display: none; }

/* --------------------------------------------------------------------------
   4. 页面头（面包屑条，除首页外每页都有）
   -------------------------------------------------------------------------- */
.ns-pagehead {
    background: var(--ns-surface);
    border: 1px solid var(--ns-line);
    border-radius: var(--ns-r-md);
    padding: 9px var(--ns-pad);
}
.ns-pagebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ns-pagebar__side { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ns-pagebar__hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--ns-fs-xs);
    color: var(--ns-ink-3);
}
.ns-pagebar__hint b { color: var(--ns-main); font-weight: 600; }
.ns-pagebar__hint i { font-style: normal; color: var(--ns-line-2); }

.ns-crumb {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    font-size: var(--ns-fs-xs);
    color: var(--ns-ink-3);
    min-width: 0;
}
.ns-crumb a { color: var(--ns-ink-2); }
.ns-crumb a:hover { color: var(--ns-main); text-decoration: underline; text-underline-offset: 2px; }
.ns-crumb svg { width: 11px; height: 11px; fill: none; stroke: var(--ns-line-2); stroke-width: 2.4; flex: 0 0 auto; }
.ns-crumb [aria-current="page"] { color: var(--ns-ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   5. 区块（section）与区块头
   ⚠️ 需求硬约束：区块头旁边**不放**解释性说明文字（「按热度统计」这类一律不写），
      只保留「编号 + 标题 + 可选的 更多 → 」。
   -------------------------------------------------------------------------- */
.ns-sec {
    background: var(--ns-surface);
    border: 1px solid var(--ns-line);
    border-radius: var(--ns-r-md);
    padding: var(--ns-pad);
}
.ns-sec--flush { padding: 0; overflow: hidden; }
.ns-sec__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.ns-sec--flush .ns-sec__head { margin: 0; padding: 10px var(--ns-pad); border-bottom: 1px solid var(--ns-line); }
.ns-sec__head h2 { font-size: var(--ns-fs-lg); letter-spacing: -.01em; }
.ns-sec__head h2 a:hover { color: var(--ns-main); }
.ns-sec__more {
    margin-left: auto;
    font-size: var(--ns-fs-xs);
    color: var(--ns-main);
    white-space: nowrap;
}
.ns-sec__more:hover { text-decoration: underline; text-underline-offset: 2px; }
.ns-panel {
    background: var(--ns-surface);
    border: 1px solid var(--ns-line);
    border-radius: var(--ns-r-md);
    padding: var(--ns-pad);
}

/* --------------------------------------------------------------------------
   6. 海报卡（首页楼层 / 频道 / 筛选 / 搜索 / 详情推荐 全站共用）
   -------------------------------------------------------------------------- */
.ns-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));   /* 必须显式给列，否则隐式单列 → 卡片拉成巨图 */
    gap: var(--ns-gap-xs);
}
.ns-grid--list { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* 号牌卡：燕麦纸卡身 + 顶部围栏横杆 + 方形号牌评分 + 干草标签（悬停只滑杆与亮框） */
.ns-card {
    position: relative;
    background: var(--ns-surface);
    border: 1px solid var(--ns-line);
    border-radius: 12px 12px 4px 4px;
    overflow: hidden;
    box-shadow: var(--ns-sh-1);
    transition: border-color var(--ns-t) var(--ns-ease), box-shadow var(--ns-t) var(--ns-ease);
}
/* 卡顶围栏：立柱纹理在悬停时沿横向滑过一档 */
.ns-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    z-index: 6;
    height: 6px;
    background:
        repeating-linear-gradient(90deg, var(--ns-main) 0 2px, transparent 2px 11px),
        linear-gradient(180deg, transparent 0 1px, var(--ns-accent) 1px 5px, transparent 5px);
    box-shadow: inset 0 -1px 0 rgba(46, 74, 99, .28);
    opacity: .92;
    transition: background-position .42s var(--ns-ease), opacity var(--ns-t) var(--ns-ease);
    pointer-events: none;
}
.ns-card:hover { border-color: rgba(46, 74, 99, .5); box-shadow: var(--ns-glow); }
.ns-card:hover::before { background-position: 11px 0, 0 0; opacity: 1; }
.ns-card > a { display: block; }
.ns-card__pic {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    background: var(--ns-surface-3);
    overflow: hidden;
}
.ns-card__pic img {
    width: 100%; height: 100%;
    object-fit: cover;
    filter: saturate(.94) contrast(.99);
    transition: filter .4s var(--ns-ease);
}
/* 纸衬内框：像号牌照片贴进纸卡的那圈压边 */
.ns-card__pic::before {
    content: "";
    position: absolute;
    inset: 6px;
    z-index: 3;
    border: 1px solid rgba(255, 253, 246, .5);
    border-radius: 2px;
    pointer-events: none;
}
/* 号牌打孔：左上 / 右上两个系带孔 */
.ns-card__pic::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 4;
    background:
        radial-gradient(circle at 12px 11px, var(--ns-paper) 0 3px, rgba(46, 74, 99, .38) 3px 4px, transparent 4.5px),
        radial-gradient(circle at calc(100% - 12px) 11px, var(--ns-paper) 0 3px, rgba(46, 74, 99, .38) 3px 4px, transparent 4.5px);
    opacity: .9;
    transition: opacity var(--ns-t) var(--ns-ease);
    pointer-events: none;
}
.ns-card:hover .ns-card__pic::after { opacity: 1; }
.ns-card:hover .ns-card__pic img { filter: saturate(1.08) contrast(1.02); }
/* 角标预算 = 2 个：左上「方形号牌评分」+ 右下「干草状态签」，不得再加第三个 */
.ns-card__score {
    position: absolute;
    left: 9px; top: 19px;
    z-index: 5;
    padding: 3px 6px 3px 13px;
    border: 1px solid var(--ns-main);
    border-radius: 2px;
    background: var(--ns-surface);
    color: var(--ns-main);
    font: 700 var(--ns-fs-2xs)/1.3 var(--ns-mono);
    box-shadow: 2px 2px 0 rgba(46, 74, 99, .18);
    transform: rotate(-2deg);
}
.ns-card__score::before {
    content: "";
    position: absolute;
    left: 5px; top: 50%;
    width: 4px; height: 4px;
    margin-top: -2px;
    border-radius: 50%;
    background: var(--ns-paper);
    box-shadow: inset 0 1px 1px rgba(46, 74, 99, .5);
}
.ns-card__score i { font-style: normal; font-size: 9px; opacity: .78; margin-left: 1px; }
.ns-card__note {
    position: absolute;
    right: 8px; bottom: 8px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: calc(100% - 16px);
    padding: 3px 8px 3px 7px;
    border-left: 3px solid var(--ns-accent);
    border-radius: 2px;
    background: #f6ecd2;
    color: #3a2c12;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.4;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 6px 100%, 0 calc(100% - 6px));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ns-card__note::before {
    content: "";
    width: 4px; height: 4px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--ns-accent-d);
}
/* ⚠️ 必须显式 block：这是 span（inline）装 h3/p（块级）的结构，
   inline 盒的横向 padding 对块级子元素**不生效**（实测标题距卡缘只有 1px），
   不设 block 的话片名会整排贴着卡片左缘。 */
.ns-card__body {
    display: block;
    padding: 9px 9px 10px;
    border-top: 1px solid var(--ns-line);
    background: var(--ns-surface);
}
.ns-card__body h3 {
    font-size: var(--ns-fs-sm);
    font-weight: 600;
    line-height: 1.45;
    padding-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    background-image: repeating-linear-gradient(90deg, var(--ns-accent) 0 4px, transparent 4px 8px);
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 0 2px;
    transition: color var(--ns-t) var(--ns-ease), background-size .3s var(--ns-ease);
}
.ns-card:hover .ns-card__body h3 { color: var(--ns-main); background-size: 100% 2px; }
.ns-card__meta {
    margin-top: 3px;
    font-size: var(--ns-fs-2xs);
    color: var(--ns-ink-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   7. 行式榜 / 行式条目（文本密度主力，可索引文本远超海报网格）
   -------------------------------------------------------------------------- */
.ns-rows li + li { border-top: 1px dashed var(--ns-line); }
.ns-rows a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 2px;
    font-size: var(--ns-fs-sm);
}
.ns-rows a:hover { color: var(--ns-main); }
.ns-num {
    flex: 0 0 auto;
    width: 20px;
    font: 600 var(--ns-fs-xs)/1 var(--ns-mono);
    color: var(--ns-ink-3);
    text-align: right;
}
.ns-rows li:nth-child(-n+3) .ns-num { color: var(--ns-accent); }
.ns-rows a > span:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ns-rows em {
    flex: 0 0 auto;
    font-style: normal;
    font-size: var(--ns-fs-2xs);
    color: var(--ns-ink-3);
}

/* 缩略图 + 文字的行（侧栏 / 相关推荐 / 资讯） */
.ns-vrow {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 0;
}
.ns-vrow + .ns-vrow { border-top: 1px dashed var(--ns-line); }
.ns-vrow__pic {
    flex: 0 0 auto;
    width: 46px;
    aspect-ratio: 2 / 3;
    border-radius: var(--ns-r-sm);
    overflow: hidden;
    background: var(--ns-surface-3);
}
.ns-vrow__pic img { width: 100%; height: 100%; object-fit: cover; }
.ns-vrow__copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ns-vrow__copy b {
    font-size: var(--ns-fs-sm);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ns-vrow:hover .ns-vrow__copy b { color: var(--ns-main); }
.ns-vrow__copy i { font-style: normal; font-size: var(--ns-fs-2xs); color: var(--ns-ink-3); }

/* 大信息行（最新收录 / 搜索结果：标题 + 元信息 + 摘要） */
.ns-linerow {
    display: flex;
    gap: 12px;
    padding: 10px 0;
}
.ns-linerow + .ns-linerow { border-top: 1px solid var(--ns-line); }
.ns-linerow__pic {
    flex: 0 0 auto;
    width: 92px;
    aspect-ratio: 2 / 3;
    border-radius: var(--ns-r-sm);
    overflow: hidden;
    background: var(--ns-surface-3);
}
.ns-linerow__pic img { width: 100%; height: 100%; object-fit: cover; }
.ns-linerow__copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ns-linerow__copy b { font-size: var(--ns-fs-md); font-weight: 700; }
.ns-linerow__copy b a:hover { color: var(--ns-main); }
.ns-linerow__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    font-size: var(--ns-fs-xs);
    color: var(--ns-ink-3);
}
.ns-linerow__meta a { color: var(--ns-main); }
.ns-linerow__meta a:hover { text-decoration: underline; text-underline-offset: 2px; }
.ns-linerow__meta em { font-style: normal; color: var(--ns-accent); font-weight: 600; }
.ns-linerow__copy p {
    font-size: var(--ns-fs-sm);
    line-height: 1.68;
    color: var(--ns-ink-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ns-linerow__cast {
    font-size: var(--ns-fs-xs);
    color: var(--ns-ink-3);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   8. 资料表（详情页资料带 / 播放页本片信息）
   -------------------------------------------------------------------------- */
.ns-facts { display: grid; gap: 4px 14px; }
.ns-facts > div { display: flex; gap: 8px; min-width: 0; }
.ns-facts dt {
    flex: 0 0 auto;
    width: 52px;
    color: var(--ns-ink-3);
    font-size: var(--ns-fs-xs);
    line-height: 1.7;
}
.ns-facts dd {
    flex: 1 1 auto;
    min-width: 0;
    font-size: var(--ns-fs-sm);
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.ns-facts--inline {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0 18px;
}
.ns-facts--inline > div { border-right: 1px dashed var(--ns-line); padding-right: 12px; }
.ns-facts--inline > div:last-child { border-right: 0; }

/* --------------------------------------------------------------------------
   9. 统计条 / 分页 / 空态
   -------------------------------------------------------------------------- */
.ns-resultbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 0 2px;
    font-size: var(--ns-fs-xs);
    color: var(--ns-ink-3);
}
.ns-resultbar b { color: var(--ns-accent); font-size: var(--ns-fs-sm); }

.ns-pager {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--ns-line);
}
.ns-pager a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 30px;
    height: 30px;
    padding: 0 9px;
    border: 1px solid var(--ns-line-2);
    border-radius: var(--ns-r-sm);
    font-size: var(--ns-fs-sm);
    color: var(--ns-ink-2);
    transition: background var(--ns-t) var(--ns-ease), color var(--ns-t) var(--ns-ease), border-color var(--ns-t) var(--ns-ease);
}
.ns-pager a:hover { border-color: var(--ns-main); color: var(--ns-main); background: var(--ns-main-s); }
.ns-pager a.is-active { background: var(--ns-main); border-color: var(--ns-main); color: var(--ns-main-ink); font-weight: 600; }
.ns-pager a.is-disabled { color: var(--ns-ink-3); opacity: .5; pointer-events: none; }
.ns-pager__meta { margin-left: auto; font-size: var(--ns-fs-xs); color: var(--ns-ink-3); }

.ns-empty {
    padding: 34px 16px;
    text-align: center;
    background: var(--ns-surface);
    border: 1px dashed var(--ns-line-2);
    border-radius: var(--ns-r-md);
}
.ns-empty h2 { font-size: var(--ns-fs-lg); }
.ns-empty p { margin-top: 6px; font-size: var(--ns-fs-sm); color: var(--ns-ink-2); }
.ns-empty .ns-btn { margin-top: 14px; }
/* 行内空态：夹在段落/列表之间的「这一块没内容」，不要再套一个虚线大盒子
   （列表片段里出现整块虚线框会把上下两段内容割断） */
.ns-empty--inline {
    padding: 12px 2px;
    text-align: left;
    background: none;
    border: 0;
    border-radius: 0;
    font-size: var(--ns-fs-sm);
    color: var(--ns-ink-3);
}

/* --------------------------------------------------------------------------
   10. 正文块（简介 / 文章正文）
   -------------------------------------------------------------------------- */
.ns-copy {
    font-size: var(--ns-fs-base);
    line-height: 1.85;
    color: var(--ns-ink-2);
    overflow-wrap: anywhere;
}
.ns-copy p + p { margin-top: 8px; }
.ns-copy a { color: var(--ns-main); text-decoration: underline; text-underline-offset: 2px; }
.ns-copy img { margin: 10px 0; border-radius: var(--ns-r-sm); }

/* --------------------------------------------------------------------------
   11. 页脚：牧野围栏（燕麦纸底 + 围栏横杆 + 号牌品牌 + 西/东双栏频道）
   -------------------------------------------------------------------------- */
.ns-foot {
    position: relative;
    margin-top: var(--ns-gap);
    background:
        radial-gradient(120% 90% at 12% 0%, rgba(193, 154, 63, .1), transparent 58%),
        linear-gradient(180deg, #f8f4e9, #efe9d9);
    border-top: 1px solid var(--ns-line-2);
    color: var(--ns-ink-2);
    font-size: var(--ns-fs-xs);
    overflow: hidden;
}
.ns-foot__rail {
    height: 9px;
    border-bottom: 1px solid var(--ns-line-2);
    background:
        repeating-linear-gradient(90deg, var(--ns-main) 0 3px, transparent 3px 27px),
        linear-gradient(180deg, var(--ns-accent) 0 2px, transparent 2px 7px, var(--ns-accent) 7px 9px, transparent 9px);
    opacity: .75;
}
.ns-foot__inner {
    counter-reset: ns-pen;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, .95fr) minmax(0, .95fr) minmax(0, .95fr);
    gap: 22px var(--ns-gap);
    padding: 26px 0 20px;
}
.ns-foot h3 {
    margin-bottom: 9px;
    font-size: var(--ns-fs-sm);
    font-weight: 700;
    color: var(--ns-main);
    letter-spacing: .03em;
}
.ns-foot__brand { position: relative; padding-left: 76px; }
.ns-foot__bib {
    position: absolute;
    left: 0; top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 66px;
    border: 2px solid var(--ns-main);
    border-radius: 3px;
    background: var(--ns-surface);
    color: var(--ns-main);
    font: 800 25px/1 var(--ns-sans);
    box-shadow: 3px 3px 0 rgba(46, 74, 99, .14);
}
/* 号牌顶部的两个系带孔 */
.ns-foot__bib::before,
.ns-foot__bib::after {
    content: "";
    position: absolute;
    top: 8px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--ns-paper);
    box-shadow: inset 0 1px 1px rgba(46, 74, 99, .45);
}
.ns-foot__bib::before { left: 10px; }
.ns-foot__bib::after { right: 10px; }
.ns-foot__brand h3 {
    margin-bottom: 6px;
    font-size: var(--ns-fs-xl);
    color: var(--ns-ink);
    letter-spacing: 0;
}
.ns-foot__brand p { max-width: 34em; line-height: 1.85; color: var(--ns-ink-2); }
.ns-foot__stamp {
    display: inline-flex;
    margin-top: 9px;
    padding: 2px 7px;
    border: 1px solid var(--ns-line-2);
    border-radius: 2px;
    color: var(--ns-ink-3);
    font: 600 10px/1.5 var(--ns-mono);
    letter-spacing: .12em;
}
.ns-foot__pen h3 i {
    margin-left: 6px;
    font-style: normal;
    font-weight: 600;
    font-size: 10px;
    color: var(--ns-ink-3);
    letter-spacing: .06em;
}
.ns-foot__links { display: grid; gap: 5px; }
.ns-foot__links a {
    position: relative;
    padding-left: 21px;
    color: var(--ns-ink-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ns-foot__links a::before {
    counter-increment: ns-pen;
    content: counter(ns-pen, decimal-leading-zero);
    position: absolute;
    left: 0; top: 0;
    font: 600 10px/1.7 var(--ns-mono);
    color: var(--ns-accent-d);
}
.ns-foot__links a:hover { color: var(--ns-main); text-decoration: underline; text-underline-offset: 2px; }
.ns-foot__links--plain a { padding-left: 0; }
.ns-foot__links--plain a::before { content: none; counter-increment: none; }
.ns-foot__aside { display: grid; gap: 16px; align-content: start; }
.ns-foot__meta { display: grid; gap: 4px; color: var(--ns-ink-2); }
.ns-foot__meta a { color: var(--ns-ink-2); }
.ns-foot__meta a:hover { color: var(--ns-main); text-decoration: underline; text-underline-offset: 2px; }
.ns-foot__base {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    padding: 12px 0 16px;
    border-top: 1px dashed var(--ns-line-2);
    color: var(--ns-ink-3);
}
.ns-foot__credit { margin-left: auto; }
.ns-foot__top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--ns-main);
    border-radius: 2px;
    background: var(--ns-surface);
    color: var(--ns-main);
    font-weight: 600;
    transition: background var(--ns-t) var(--ns-ease), color var(--ns-t) var(--ns-ease);
}
.ns-foot__top::before { content: "↑"; font-family: var(--ns-mono); }
.ns-foot__top:hover { background: var(--ns-main); color: var(--ns-main-ink); }

@media (max-width: 1023.98px) {
    .ns-foot__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ns-foot__brand { grid-column: 1 / -1; }
    .ns-foot__aside { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .ns-foot__inner { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .ns-foot__brand { padding-left: 0; }
    .ns-foot__bib { position: static; margin-bottom: 10px; }
    .ns-foot__aside { grid-template-columns: minmax(0, 1fr); }
    .ns-foot__credit { margin-left: 0; }
    .ns-foot__top { margin-left: auto; }
}

/* --------------------------------------------------------------------------
   12. 断点
   ⚠️ 列数只能取 6 / 4 / 3 / 2：模板取数固定 24（楼层）与 48（列表），
      24 与 48 都能被这四个数整除 —— 任何断点都不会露半行残卡。
      （换成 5 列会让 48 条剩 3 张残卡，别加这个档。）
   -------------------------------------------------------------------------- */
@media (max-width: 1023.98px) {
    .ns-grid, .ns-grid--list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ns-header__nav { display: none; }          /* 菜单整棵由 JS 搬进抽屉 */
    .ns-header__burger { display: inline-flex; }
    .ns-search input { width: 120px; }
}
@media (max-width: 767.98px) {
    :root { --ns-shell: 100%; --ns-gap: 12px; --ns-gap-xs: 6px; }
    .ns-grid, .ns-grid--list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ns-search { display: none; }
    .ns-facts--inline { grid-template-columns: minmax(0, 1fr); }
    .ns-facts--inline > div { border-right: 0; border-bottom: 1px dashed var(--ns-line); padding: 4px 0; }
    .ns-facts--inline > div:last-child { border-bottom: 0; }
    .ns-linerow__pic { width: 74px; }
    .ns-pager__meta { width: 100%; margin-left: 0; }
}
@media (max-width: 479.98px) {
    .ns-grid, .ns-grid--list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
