/* ===================================================================
 * 《代码大梁》原作小说 · 阅读页专属样式（novel.css）
 * 复用 comic.css 的色板变量 / topbar / .btn；本文件只管小说排版
 * 宽屏：左图右文（交替） · 移动：上图下文
 * =================================================================== */

body.novel { background: var(--ink-0); }

/* 顶部阅读进度细条（贴在 topbar 下沿） */
.nv-read-progress {
    position: fixed;
    top: 54px;
    left: 0;
    height: 2px;
    width: 0;
    z-index: 39;
    background: linear-gradient(90deg, var(--red), var(--amber));
    transition: width .12s linear;
}

/* ---------- 正文纸张 ---------- */
.nv-paper {
    max-width: 720px;
    margin: 0 auto;
    padding: 34px clamp(2px, 1.5vw, 8px) 10px;
    color: #e7dfce;
    font-size: 1rem;
    line-height: 1.95;
    letter-spacing: .2px;
}
.nv-paper p { margin: 0 0 1em; }
/* 中文小说排版：正文段首行缩进两字；段距收紧到 .72em（缩进已分段，疏朗如书页）。
   首段有大字下沉、居中条件段不缩 */
.nv-paper > p { text-indent: 2em; margin: 0 0 .72em; }
.nv-paper > p.nv-first,
.nv-paper > p[style*="text-align:center"] { text-indent: 0; }

/* 列举段（JS 自动识别「第 X，」领起，如墨缸四件事、大梁四段陈词）：
   整块内缩 2em 成"板书清单"，琥珀序号领读；组内紧凑、组外留气口 */
.nv-paper > p.nv-pt {
    text-indent: 0;
    padding-left: 2em;
    margin-bottom: .55em;
}
.nv-paper > p:not(.nv-pt) + p.nv-pt { margin-top: 1.05em; }
.nv-paper > p.nv-pt + p:not(.nv-pt) { margin-top: 1.1em; }
.nv-paper .nv-ptno { color: var(--amber); font-weight: 700; }

/* 中文破折号：系统字体的 U+2014 字形两侧各带约 0.03em 留白，「——」接缝断开。
   负字距把两根横线融合为连续长线（重叠部分是同位置同笔画，视觉无损）；
   margin 补偿末字负间距；nowrap 保证破折号绝不拆到两行（中文排版规范） */
.nv-dash {
    letter-spacing: -0.07em;
    margin-right: 0.07em;
    white-space: nowrap;
}
.nv-paper p.nv-first::first-letter {
    font-family: var(--wk);
    font-size: 3.1em;
    float: left;
    line-height: .95;
    padding: 4px 10px 0 0;
    color: var(--red);
    font-weight: 700;
}
.nv-paper strong, .nv-paper b { color: var(--cream); font-weight: 700; }
.nv-paper .hl-r { color: #ff8b80; font-weight: 700; }
.nv-paper .hl-a { color: var(--amber); font-weight: 700; }
.nv-paper .hl-t { color: #6fd8c8; font-weight: 700; }

/* 墨缸金句条 */
.nv-quote {
    margin: 26px 0;
    padding: 16px 20px;
    border-left: 3px solid var(--teal);
    background: rgba(47,174,157,.08);
    border-radius: 0 12px 12px 0;
    font-family: var(--wk);
    font-size: 1.16rem;
    line-height: 1.85;
    color: #d8f2ec;
}
.nv-quote.gold {
    border-left-color: var(--amber);
    background: rgba(242,169,59,.08);
    color: #f6e6c4;
}
.nv-quote .who {
    display: block;
    margin-top: 8px;
    font-family: var(--sf);
    font-size: .76rem;
    letter-spacing: 1px;
    color: var(--cream-faint);
}

/* 幕间分隔 */
.nv-act {
    text-align: center;
    padding: 42px 20px 36px;
    /* 带外统一留 24px：带内 padding 是辉光区，外部 margin 才是读者感知的"翻幕留白" */
    margin: 0 0 24px;
}
.nv-act .k {
    font-size: .78rem;
    letter-spacing: 8px;
    color: var(--cream-faint);
}
.nv-act .g {
    font-family: var(--wk);
    font-size: clamp(3rem, 10vw, 4.4rem);
    line-height: 1.1;
    color: var(--red);
    margin: 6px 0 8px;
}
.nv-act.cool .g { color: var(--blue); }
.nv-act.gold .g { color: var(--amber); }
.nv-act .m { font-size: .86rem; color: var(--cream-dim); letter-spacing: 2px; }

/* ---------- 图文段：宽屏左图右文，移动上图下文 ---------- */
.nv-fig {
    margin: 34px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(18px, 3vw, 30px);
    align-items: center;
}
.nv-fig.flip .nv-fig-img { order: 2; }
.nv-fig-img figure { margin: 0; }
.nv-fig-img img {
    width: 100%;
    display: block;
    border-radius: 14px;
    border: 1px solid var(--line);
    box-shadow: 0 14px 36px rgba(0,0,0,.45);
}
.nv-fig-img figcaption {
    margin-top: 8px;
    font-size: .74rem;
    line-height: 1.6;
    color: var(--cream-faint);
    text-align: center;
}
.nv-fig-text p { margin: 0 0 .9em; }
.nv-fig-text p:last-child { margin-bottom: 0; }

/* 竖图（9:16 hook）不左右排，独立居中 */
.nv-fig.tall {
    grid-template-columns: 1fr;
    justify-items: center;
}
.nv-fig.tall .nv-fig-img { max-width: 300px; width: 100%; }

@media (max-width: 860px) {
    .nv-fig, .nv-fig.flip { grid-template-columns: 1fr; }
    .nv-fig.flip .nv-fig-img { order: 0; }
    .nv-fig-img { max-width: 520px; width: 100%; margin: 0 auto; }
    /* 图下旁白即正文：同缩进、同段距，左缘不再在图后突然跳回零 */
    .nv-fig-text p { text-indent: 2em; margin-bottom: .72em; }
}

/* ---------- 术语徽章 ---------- */
.nv-term {
    display: inline;
    white-space: nowrap;
    padding: 0 5px;
    margin: 0 1px;
    border-radius: 6px;
    background: rgba(242,169,59,.14);
    box-shadow: inset 0 -1px 0 rgba(242,169,59,.65);
    color: #ffd98a;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
    -webkit-tap-highlight-color: transparent;
}
.nv-term:hover, .nv-term:active {
    background: rgba(242,169,59,.3);
    color: #ffe7b3;
}
.nv-term::after {
    content: "ⓘ";
    font-size: .72em;
    margin-left: 3px;
    opacity: .75;
    font-style: normal;
}

/* ---------- 术语弹层（桌面居中卡 / 移动底部 sheet） ---------- */
.nv-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5,3,10,.62);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.nv-overlay.on { display: flex; }
.nv-card {
    width: 100%;
    max-width: 460px;
    max-height: 82vh;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
    border: 1px solid rgba(242,169,59,.35);
    border-radius: 18px;
    padding: 22px 22px 20px;
    box-shadow: 0 24px 70px rgba(0,0,0,.65);
    animation: nvPop .18s ease-out;
}
@keyframes nvPop {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
.nv-card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.nv-card-head h3 {
    margin: 0;
    font-family: var(--wk);
    font-size: 1.35rem;
    color: var(--amber);
    letter-spacing: 1px;
}
.nv-card-head .en {
    font-size: .72rem;
    color: var(--cream-faint);
    letter-spacing: .5px;
}
.nv-card .nv-x {
    position: absolute;
}
.nv-plain {
    margin: 14px 0 0;
    padding: 11px 14px;
    border-left: 3px solid var(--amber);
    background: rgba(242,169,59,.09);
    border-radius: 0 10px 10px 0;
    font-size: .94rem;
    line-height: 1.8;
    color: #f6e6c4;
}
.nv-def {
    margin: 14px 0 0;
    font-size: .88rem;
    line-height: 1.85;
    color: var(--cream-dim);
}
.nv-def b { color: var(--cream); }
.nv-card-foot {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.nv-book-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red), var(--amber));
    color: #23130a;
    font-size: .8rem;
    font-weight: 800;
    text-decoration: none;
}
.nv-book-btn:hover { filter: brightness(1.08); }
.nv-card-foot .none-tip { font-size: .74rem; color: var(--cream-faint); }
.nv-card-close {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--cream-faint);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
}

@media (max-width: 600px) {
    .nv-overlay { align-items: flex-end; padding: 0; }
    .nv-card {
        max-width: none;
        max-height: 78vh;
        border-radius: 18px 18px 0 0;
        border-bottom: none;
        padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
        animation: nvSheet .22s ease-out;
    }
    @keyframes nvSheet {
        from { transform: translateY(100%); }
        to   { transform: none; }
    }
}

/* ---------- 章末 ---------- */
.nv-end {
    max-width: 720px;
    margin: 30px auto 0;
    padding: 0 clamp(2px, 1.5vw, 8px) 60px;
}
.nv-gloss-head {
    font-family: var(--wk);
    font-size: 1.15rem;
    letter-spacing: 2px;
    margin: 26px 0 12px;
    color: var(--cream);
}
.nv-gloss {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}
.nv-gloss .nv-term {
    position: relative;
    font-size: .86rem;
    padding: 4px 11px;
    border-radius: 999px;
}
.nv-endcard {
    margin-top: 34px;
    padding: 26px 24px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: linear-gradient(160deg, var(--ink-2), var(--ink-1));
    text-align: center;
}
.nv-endcard .nv-ep-label {
    font-size: .76rem;
    letter-spacing: 4px;
    color: var(--cream-faint);
}
.nv-endcard h3 {
    margin: 10px 0 8px;
    font-family: var(--wk);
    font-size: 1.5rem;
    color: var(--amber);
}
.nv-endcard p { margin: 0 0 18px; font-size: .92rem; line-height: 1.85; color: var(--cream-dim); }
.nv-end-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

/* ---------- 小说馆目录页（hero / 话目均直接复用 comic.css 的 .bk-hero / .ep-list） ---------- */
.nv-tri {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    /* 全站统一：.sec-head 标题到下属组件 26px（与漫画馆轮播标题→封面等距） */
    margin-top: 26px;
}
.nv-tri-card {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--ink-1);
}
.nv-tri-card i { font-size: 1.2rem; color: var(--amber); }
.nv-tri-card b {
    display: block;
    margin: 8px 0 4px;
    font-family: var(--wk);
    font-size: 1.02rem;
    letter-spacing: 1px;
    color: var(--cream);
}
.nv-tri-card span { font-size: .76rem; line-height: 1.65; color: var(--cream-dim); }

@media (max-width: 760px) {
    .nv-tri { grid-template-columns: 1fr; }
}

/* ===================================================================
 * 宽屏剧场版「分镜卷轴」（2026-10-25）
 * 中屏（≥861px）：分镜/金句破框、幕间全宽氛围光带
 * 宽屏（≥1240px）：左=三幕卷轴导航 · 中=720 正文 · 右=随文边注
 * ≤860px：一切照旧（上图下文、点术语出底部 sheet、两栏隐藏）
 * =================================================================== */
body.novel { overflow-x: hidden; }   /* 幕间全宽色带防横滚 */
.nv-act { scroll-margin-top: 70px; }
.nv-paper { scroll-margin-top: 54px; }   /* #story 锚点：恰好没入顶栏(55px)下沿，头卡片下边框完全收进顶栏 */
/* 左右两栏默认收起，仅 ≥1240px 宽屏在下方媒体块里展开 */
.nv-rail { display: none; }

/* 图片悬停轻推（不破坏安静的阅读感） */
.nv-fig-img figure { position: relative; overflow: hidden; }
.nv-fig-img img { transition: transform .45s ease; }
.nv-fig-img figure:hover img { transform: scale(1.035); }

/* 右栏边注默认不占位，仅宽屏出现；位置由 ch1.html 的 JS 计算 */
.nv-note {
    position: absolute;
    left: 0;
    width: 100%;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    padding: 10px 12px 9px;
    border-radius: 12px;
    border: 1px solid var(--line);
    border-left: 2px solid var(--amber);
    background: rgba(25, 22, 35, .8);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    cursor: pointer;
    color: inherit;
    transition: border-color .2s, background .2s, transform .2s, box-shadow .2s;
}
.nv-note:hover {
    border-color: rgba(242, 169, 59, .55);
    background: rgba(36, 31, 49, .92);
    transform: translateX(-2px);
}
.nv-note b { font-family: var(--wk); font-size: .86rem; color: #ffd98a; margin-right: 7px; }
.nv-note em { font-style: normal; font-size: .62rem; color: var(--cream-faint); }
.nv-note p { margin: 5px 0 0; font-size: .72rem; line-height: 1.62; color: var(--cream-dim); }
.nv-note-more {
    display: block;
    margin-top: 6px;
    font-size: .62rem;
    color: var(--cream-faint);
    white-space: nowrap;
}
.nv-note-more i { margin-right: 3px; }
.nv-term.term-hot { background: rgba(242, 169, 59, .42); color: #fff; }

/* ---------- 滚动活化（全端；视差另由 JS 仅在 ≥861 生效） ---------- */
.nv-rv { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,.61,.36,1); }
.nv-rv.in { opacity: 1; transform: none; }
.nv-fade { opacity: 0; transition: opacity .85s ease; }
.nv-fade.in { opacity: 1; }
/* 边注随对应段落经过阅读中线点亮 */
.nv-note.lit {
    border-color: rgba(242, 169, 59, .7);
    background: rgba(43, 36, 58, .96);
    box-shadow: 0 0 0 1px rgba(242, 169, 59, .22), 0 10px 28px rgba(0, 0, 0, .42);
}
.nv-note.lit b { color: #ffe2a6; }
@media (prefers-reduced-motion: reduce) {
    .nv-rv, .nv-fade { opacity: 1 !important; transform: none !important; transition: none !important; }
    .nv-fig-img img { transition: none !important; }
}

/* ---------- 中屏起：全幅出血暗场分镜 + 分镜牌 + 金句卡 + 幕间光带（V2） ---------- */
@media (min-width: 861px) {
    .nv-paper { counter-reset: scene; }
    .nv-fig-img { counter-increment: scene; }
    .nv-fig-img figure::after {
        content: '名场面 ' counter(scene, decimal-leading-zero);
        position: absolute;
        top: 10px;
        left: 10px;
        font-size: .62rem;
        letter-spacing: 1px;
        padding: 3px 9px;
        border-radius: 999px;
        color: var(--cream);
        background: rgba(12, 10, 18, .72);
        border: 1px solid rgba(255, 255, 255, .2);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
    }

    /* 全幅出血暗场：100vw 氛围光带吃掉宽屏死空，图限高不裁脸 */
    .nv-fig {
        position: relative;
        width: 100vw;
        margin: 46px 0;
        margin-left: 50%;
        transform: translateX(-50%);
        padding: 5.5vh 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: clamp(28px, 4.5vw, 72px);
        overflow: hidden;
        isolation: isolate;
        box-shadow: inset 0 1px 0 rgba(244, 236, 221, .055), inset 0 -1px 0 rgba(244, 236, 221, .055);
    }
    .nv-fig > * { position: relative; z-index: 1; }
    .nv-fig::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        background: radial-gradient(720px 460px at 50% 54%, rgba(244, 236, 221, .05), transparent 64%);
    }
    .nv-fig.tone-red::before  { background: radial-gradient(780px 540px at 50% 56%, rgba(228, 71, 60, .15), transparent 62%); }
    .nv-fig.tone-teal::before { background: radial-gradient(780px 540px at 50% 56%, rgba(47, 174, 157, .14), transparent 62%); }
    .nv-fig.tone-blue::before { background: radial-gradient(780px 540px at 50% 56%, rgba(74, 147, 209, .15), transparent 62%); }
    .nv-fig.tone-gold::before { background: radial-gradient(780px 540px at 50% 56%, rgba(242, 169, 59, .16), transparent 62%); }

    .nv-fig.flip { flex-direction: row-reverse; }
    /* 图列不贪婪吃空：图与旁白成组后整体居中，间距即真实 gap，杜绝旁白漂到屏幕边 */
    .nv-fig-img { flex: 0 1 auto; min-width: 0; display: flex; justify-content: center; }
    .nv-fig-img figure { margin: 0; width: fit-content; max-width: 100%; will-change: transform; }
    .nv-fig-img img {
        width: auto;
        max-width: 100%;
        max-height: 50vh;
        border-radius: 14px;
    }
    .nv-fig.tone-red  .nv-fig-img img { box-shadow: 0 18px 60px rgba(228, 71, 60, .22), 0 8px 24px rgba(0, 0, 0, .5); }
    .nv-fig.tone-teal .nv-fig-img img { box-shadow: 0 18px 60px rgba(47, 174, 157, .2), 0 8px 24px rgba(0, 0, 0, .5); }
    .nv-fig.tone-blue .nv-fig-img img { box-shadow: 0 18px 60px rgba(74, 147, 209, .22), 0 8px 24px rgba(0, 0, 0, .5); }
    .nv-fig.tone-gold .nv-fig-img img { box-shadow: 0 18px 60px rgba(242, 169, 59, .24), 0 8px 24px rgba(0, 0, 0, .5); }
    .nv-fig-text { flex: 0 0 clamp(236px, 23vw, 312px); color: var(--cream); }
    .nv-fig-text p { font-size: 1.04rem; line-height: 1.95; margin-bottom: .95em; }

    /* p18 竖海报：独占暗场、更高更聚焦 */
    .nv-fig.tall { flex-direction: column; gap: 0; padding: 7vh 24px; }
    .nv-fig.tall .nv-fig-img { flex: none; }
    .nv-fig.tall .nv-fig-img img { max-height: 70vh; max-width: min(86vw, 400px); }

    .nv-quote {
        width: calc(100% + 64px);
        margin: 30px 0 30px -32px;
        padding: 24px 30px 22px 34px;
        font-size: 1.28rem;
        border-left-width: 4px;
        border-radius: 0 16px 16px 0;
        position: relative;
    }
    .nv-quote::before {
        content: '\201C';
        position: absolute;
        left: 12px;
        top: -14px;
        font-family: var(--wk);
        font-size: 4.6rem;
        line-height: 1;
        color: rgba(255, 255, 255, .09);
        pointer-events: none;
    }

    .nv-act {
        position: relative;
        width: 100vw;
        margin-left: 50%;
        transform: translateX(-50%);
        padding: 66px 20px 60px;
        margin-bottom: 36px;
        overflow: hidden;
    }
    .nv-act::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 0;
        background: radial-gradient(680px 320px at 50% 128%, rgba(228, 71, 60, .16), transparent 62%);
    }
    .nv-act.cool::before { background: radial-gradient(680px 320px at 50% 128%, rgba(74, 147, 209, .16), transparent 62%); }
    .nv-act.gold::before { background: radial-gradient(680px 320px at 50% 128%, rgba(242, 169, 59, .18), transparent 62%); }
    .nv-act > * { position: relative; z-index: 1; }
    .nv-act .g { font-size: clamp(4rem, 7vw, 6.2rem); will-change: transform; }
    .nv-act .k { display: inline-flex; align-items: center; gap: 14px; }
    .nv-act .k::before, .nv-act .k::after {
        content: '';
        width: 46px;
        height: 1px;
        background: var(--line);
    }
}

/* ---------- 宽屏起 V3：舞台与 hero 卡同宽（左贴左、右贴右、正文吃满） ---------- */
@media (min-width: 1240px) {
    .nv-stage {
        display: grid;
        grid-template-columns: 150px minmax(0, 1fr) 248px;
        column-gap: 26px;
        width: 100%;
        margin: 0;
        position: relative;
    }
    .nv-stage-main { grid-column: 2; grid-row: 1; min-width: 0; }
    /* V7：正文收敛为 720 书页栏（约 40 字/行，中文叙事舒适行长）居中于中栏；
       暗场/幕光带仍全 stage 出血，形成「宽分镜 ↔ 窄书页」的杂志节奏 */
    .nv-stage-main .nv-paper { max-width: 720px; margin: 0 auto; padding: 40px 0 10px; }
    .nv-stage-main .nv-end { max-width: 720px; margin: 30px auto 0; padding: 0 0 60px; }

    /* 金句收在正文栏内，不与边注抢位 */
    .nv-quote { width: 100%; margin-left: 0; }

    /* 出血常数随 720 书页重算：paper 在 846 中栏内左右各内缩 63，
       故左补偿 = 左外距176 + 内缩63 = 239；总宽 = stage1296 − 720 = 576。
       1440 实测 24..1320、1920 实测 312..1608，与 .wrap/hero 像素同宽 */
    .nv-stage-main .nv-fig,
    .nv-stage-main .nv-act {
        width: calc(100% + 576px);
        margin-left: -239px;
        transform: none;
    }

    /* 左栏：sticky 章回脊柱（压在全幅暗场之上） */
    .nv-rail-left {
        grid-column: 1;
        grid-row: 1;
        display: block;
        position: sticky;
        top: 76px;
        align-self: start;
        justify-self: stretch;
        z-index: 5;
    }
    /* 读轴衬底：纯色背景上不可见，压到全幅亮画面时自动压暗，保脊柱文字可读 */
    .nv-rail-left::after {
        content: '';
        position: absolute;
        z-index: -1;
        left: -28px;
        right: -8px;
        top: 0;
        bottom: -26px;
        pointer-events: none;
        background: linear-gradient(90deg,
            #0c0a12 0%, rgba(12, 10, 18, .94) 52%, rgba(12, 10, 18, 0) 100%);
    }
    .nv-r-title {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: 40px 0 0;
        font-size: .7rem;
        letter-spacing: 2px;
        color: var(--cream-faint);
    }
    /* 脊柱：190px 长高轨道，2px 竖线 x=5..7，12px 圆点中心 x=6 精确同轴 */
    .nv-r-acts {
        position: relative;
        height: 196px;
        margin: 16px 0 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 12px 0;
    }
    .nv-r-acts::before,
    .nv-spine-fill {
        position: absolute;
        left: 5px;
        top: 12px;
        bottom: 12px;
        width: 2px;
        border-radius: 2px;
    }
    .nv-r-acts::before { content: ''; background: rgba(255, 255, 255, .09); }
    .nv-spine-fill {
        background: linear-gradient(180deg, var(--red) 0%, var(--blue) 52%, var(--amber) 100%);
        transform: scaleY(0);
        transform-origin: 50% 0;
        box-shadow: 0 0 8px rgba(242, 169, 59, .35);
    }
    .nv-actlink {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: center;
        gap: 11px;
        text-decoration: none;
        opacity: .5;
        transition: opacity .2s;
    }
    .nv-actlink:hover { opacity: .9; }
    .nv-actlink.on, .nv-actlink.done { opacity: 1; }
    .nv-actlink .dot {
        flex: none;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        box-sizing: border-box;
        background: transparent;
        border: 2px solid rgba(244, 236, 221, .3);
        color: var(--red);   /* 供 currentColor 光环取色 */
        transition: background .2s, border-color .2s, box-shadow .2s;
    }
    .nv-actlink .dot.cool { color: var(--blue); }
    .nv-actlink .dot.gold { color: var(--amber); }
    .nv-actlink.done .dot { background: currentColor; border-color: transparent; }
    .nv-actlink.on .dot {
        background: currentColor;
        border-color: transparent;
        animation: nvDotPulse 2.6s ease-in-out infinite;
    }
    @keyframes nvDotPulse {
        0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 24%, transparent); }
        50%      { box-shadow: 0 0 0 7px color-mix(in srgb, currentColor 7%, transparent); }
    }
    .nv-actlink b { display: block; font-family: var(--wk); font-size: 1.04rem; letter-spacing: 3px; color: var(--cream); }
    .nv-actlink small { display: block; font-size: .64rem; color: var(--cream-faint); margin-top: 2px; }
    .nv-actlink.on b { color: #fff; }
    .nv-actlink.done small { color: var(--cream-dim); }

    .nv-r-prog {
        margin-top: 22px;
        padding-top: 16px;
        border-top: 1px solid var(--line);
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 8px;
    }
    .nv-pct b { font-family: var(--wk); font-size: 1.6rem; color: var(--amber); }
    .nv-pct i { font-style: normal; font-size: .7rem; color: var(--cream-faint); }
    .nv-rmin { font-size: .66rem; color: var(--cream-dim); text-align: right; line-height: 1.5; }
    .nv-rmin i { margin-right: 2px; }
    .nv-rmin b { color: var(--cream); }

    /* 阅读工具组：发丝线 + 组标题与上方阅读进度明确隔离；三按钮同一系列，
       沉浸阅读=红金主操作，人物图鉴/小说目录=同级幽灵钮 */
    .nv-r-tools {
        margin-top: 24px;
        padding-top: 18px;
        border-top: 1px solid var(--line);
        display: flex;
        flex-direction: column;
        gap: 9px;
    }
    .nv-r-ttitle {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: 0 0 3px;
        font-size: .62rem;
        letter-spacing: 2px;
        color: var(--cream-faint);
    }
    .nv-r-btn {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 10px;
        border-radius: 10px;
        border: 1px solid var(--line);
        background: rgba(255, 255, 255, .03);
        color: var(--cream-dim);
        font: inherit;
        font-size: .74rem;
        letter-spacing: 1px;
        text-decoration: none;
        cursor: pointer;
        transition: border-color .18s, color .18s, background .18s, box-shadow .18s;
    }
    .nv-r-btn i { font-size: .86rem; line-height: 1; }
    .nv-r-btn:hover {
        border-color: rgba(242, 169, 59, .42);
        color: var(--cream);
        background: rgba(242, 169, 59, .06);
    }
    .nv-r-btn-primary {
        border-color: rgba(242, 169, 59, .42);
        background: linear-gradient(135deg, rgba(228, 71, 60, .17), rgba(242, 169, 59, .15));
        color: #ffe2a6;
    }
    .nv-r-btn-primary:hover {
        border-color: rgba(242, 169, 59, .72);
        background: linear-gradient(135deg, rgba(228, 71, 60, .26), rgba(242, 169, 59, .24));
        color: #fff4d6;
        box-shadow: 0 6px 20px rgba(228, 71, 60, .16);
    }
    .nv-r-btn kbd, .nv-focus-exit kbd {
        font-family: var(--sf);
        font-size: .58rem;
        padding: 1px 5px;
        border: 1px solid var(--line);
        border-radius: 4px;
        color: var(--cream-faint);
        background: rgba(0, 0, 0, .25);
    }
    .nv-r-btn-primary kbd {
        color: #f0d59a;
        border-color: rgba(242, 169, 59, .35);
        background: rgba(0, 0, 0, .3);
    }

    /* 右栏：随文边注轨道，右缘与 hero 卡右缘对齐；压在全幅暗场之上 */
    .nv-rail-right {
        grid-column: 3;
        grid-row: 1;
        display: block;
        position: relative;
        justify-self: stretch;
        z-index: 5;
    }

    /* ============ 沉浸阅读态：去两栏/hero，正文居中收为 760，暗场保留 ============ */
    body.nv-focus .bk-hero { display: none; }
    body.nv-focus .nv-rail { display: none !important; }
    body.nv-focus .nv-stage {
        display: block;
        width: min(760px, 92vw);
        margin: 26px auto 0;
    }
    /* 沉浸态图片/金句仍走 760 满栏（与横图同轴）；顶距给阅读留呼吸 */
    body.nv-focus .nv-stage-main .nv-paper { max-width: none; padding-top: 30px; }
    body.nv-focus .nv-stage-main .nv-end { max-width: none; }
    body.nv-focus .nv-quote { width: 100%; margin-left: 0; }

    /* 暗场收编：沉浸态一切阅读物共享 760 栏轴——图上文下、图不超屏、徽章贴图角。
       不再沿用宽屏剧场的 100vw 全幅横排（实测横图 958/竖图 406，与正文零对齐） */
    body.nv-focus .nv-fig {
        width: 100%;
        margin: 42px 0;
        margin-left: 0;
        transform: none;
        padding: 0;
        display: block;
        box-shadow: none;
        /* 剧场态 overflow:hidden 是为裁 100vw 辉光边；沉浸态带=图同框，
           带内任何位移残留都不得裁掉「名场面」徽章上缘 */
        overflow: visible;
    }
    body.nv-focus .nv-fig::before { display: none; }
    body.nv-focus .nv-fig-img { display: block; }
    /* figure 随图收缩并居中：竖图限高后 figure 收窄，「名场面」徽章与图注
       都锚在图片自身边界，不再悬在图侧黑区、滚到顶栏下被吞 */
    body.nv-focus .nv-fig-img figure {
        width: fit-content;
        max-width: 100%;
        margin: 0 auto;
    }
    /* 图片双向约束：宽不超 760 栏、高不超 78vh（3:4 竖图等宽时 1013px 会超出
       900px 视口，8/12 张图比一屏还高——阅读长图是坏习惯）；横图仍满栏 760 */
    body.nv-focus .nv-fig-img img {
        display: block;
        width: auto;
        max-width: 100%;
        max-height: 78vh;
        margin: 0 auto;
    }
    /* 书页里去剧场彩光投影（金色大半径辉光会在图底形成"色带"包住图注），
       四种 tone 选择器特异性高于本规则，须逐色调覆盖为中性投影 */
    body.nv-focus .nv-fig.tone-red  .nv-fig-img img,
    body.nv-focus .nv-fig.tone-teal .nv-fig-img img,
    body.nv-focus .nv-fig.tone-blue .nv-fig-img img,
    body.nv-focus .nv-fig.tone-gold .nv-fig-img img {
        box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
    }
    /* 图注：安静的图下灰字，与图保持对称呼吸感（不再有 8px 贴边+长色带） */
    body.nv-focus .nv-fig-img figcaption { margin-top: 12px; }
    body.nv-focus .nv-fig-text { flex: none; margin-top: 16px; }
    /* 图下三句短旁白在沉浸态即正文：同字号、同墨色、同缩进、同段距，
       不再以 1.04rem 亮米色另起一套，左缘随全篇统一 */
    body.nv-focus .nv-fig-text p {
        font-size: 1rem;
        line-height: 1.95;
        color: #e7dfce;
        text-indent: 2em;
        margin-bottom: .72em;
    }
    body.nv-focus .nv-fig-img figure:hover img { transform: none; }
    /* tall 海报解除基础规则 300px 夹限，与普通图同走 fit-content+78vh */
    body.nv-focus .nv-fig.tall .nv-fig-img { max-width: none; }
    /* 幕光带保留视口全幅（章节翻页节奏）；760 栏居中于视口，50%-50vw 精确出血 */
    body.nv-focus .nv-act {
        width: 100vw;
        margin-left: calc(50% - 50vw);
    }
}

/* 沉浸态退出悬浮钮（全端样式，仅沉浸态可见） */
.nv-focus-exit {
    display: none;
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 70;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(20, 17, 28, .82);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--cream);
    font: inherit;
    font-size: .76rem;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
body.nv-focus .nv-focus-exit { display: inline-flex; }
.nv-focus-exit:hover { border-color: var(--amber); color: #ffe2a6; }

@media (prefers-reduced-motion: reduce) {
    .nv-actlink.on .dot { animation: none; }
}

/* ===================================================================
 * 人物图鉴 V4（2026-10-26）
 * 首登名片（正文，全端） · 章末头像排（全端） · 关系图弹层（桌面卡/移动 sheet）
 * 与术语体系视觉区分：术语=琥珀底块（概念）；人物=角色色虚线（角色）
 * =================================================================== */

/* ---------- 首登名片 ---------- */
.nv-who {
    --wc: var(--amber);
    font-weight: 700;
    color: var(--cream);
    border-bottom: 1px dashed color-mix(in srgb, var(--wc) 72%, transparent);
    padding-bottom: 1px;
    cursor: pointer;
    border-radius: 3px;
    transition: background .15s, color .15s;
    -webkit-tap-highlight-color: transparent;
}
.nv-who:hover, .nv-who:focus-visible {
    background: color-mix(in srgb, var(--wc) 15%, transparent);
    outline: none;
}
.nv-who[data-c="daliang"] { --wc: #f06a5f; }
.nv-who[data-c="mange"]   { --wc: #e0a24c; }
.nv-who[data-c="mogang"]  { --wc: #4cc3b1; }
.nv-who[data-c="ling"]    { --wc: #9a94a8; }
.nv-who[data-c="qin"]     { --wc: #7d92c4; }

/* ---------- 章末头像排 ---------- */
.nv-cast-row {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(10px, 2.4vw, 18px);
    margin: 12px 0 28px;
}
.nv-cast-row button {
    appearance: none;
    background: none;
    border: none;
    padding: 4px 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    border-radius: 12px;
}
.nv-cast-row button img {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--rc, var(--line));
    transition: transform .18s ease, box-shadow .18s ease;
}
.nv-cast-row button:hover img,
.nv-cast-row button:focus-visible img {
    transform: translateY(-2px) scale(1.06);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .5);
    outline: none;
}
.nv-cast-row button b {
    font-size: .72rem;
    font-weight: 600;
    color: var(--cream-dim);
    transition: color .15s;
}
.nv-cast-row button:hover b { color: var(--cream); }

/* ---------- 关系图弹层 ---------- */
.nv-cast-panel {
    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
    border: 1px solid rgba(242, 169, 59, .28);
    border-radius: 18px;
    padding: 20px 22px 22px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .65);
    animation: nvPop .18s ease-out;
}
.nv-cast-graph {
    position: relative;
    margin-top: 14px;
    width: 100%;
    aspect-ratio: 560 / 420;
    border-radius: 14px;
    border: 1px solid var(--line);
    overflow: hidden;
    user-select: none;
    container-type: inline-size;   /* 节点尺寸用 cqw 相对画布，避免 % 相对 shrink-to-fit 自身 */
    background:
        radial-gradient(150px 110px at 50% 50%, rgba(242, 169, 59, .09), transparent 72%),
        radial-gradient(340px 200px at 50% 110%, rgba(47, 174, 157, .07), transparent 70%),
        rgba(255, 255, 255, .025);
}
.nv-cast-lines { position: absolute; inset: 0; width: 100%; height: 100%; }
.nv-cast-lines line {
    stroke: rgba(244, 236, 221, .22);
    stroke-width: 1.4;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 5 5;
    transition: stroke .2s;
}
.nv-cast-lines line.hot {
    stroke: var(--lc, var(--amber));
    stroke-opacity: .9;
}
.nv-cast-edge {
    position: absolute;
    left: var(--ex);
    top: var(--ey);
    transform: translate(-50%, -50%);
    padding: 2px 9px;
    border-radius: 99px;
    white-space: nowrap;
    font-size: clamp(.58rem, 1.9vw, .72rem);
    line-height: 1.5;
    color: var(--cream-dim);
    background: rgba(18, 15, 26, .92);
    border: 1px solid var(--line);
    pointer-events: none;
    transition: color .2s, border-color .2s, box-shadow .2s;
}
.nv-cast-edge.hot {
    color: var(--ec, var(--cream));
    border-color: color-mix(in srgb, var(--ec, var(--amber)) 55%, transparent);
    box-shadow: 0 0 12px color-mix(in srgb, var(--ec, var(--amber)) 22%, transparent);
}
.nv-cast-node {
    position: absolute;
    left: var(--nx);
    top: var(--ny);
    transform: translate(-50%, -50%);
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    width: max-content;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    color: var(--cream);
}
.nv-cast-node img {
    width: var(--ns);
    height: var(--ns);
    border-radius: 50%;
    object-fit: cover;
    background: var(--ink-2);
    border: 2px solid var(--nc, var(--line));
    box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
    transition: transform .18s ease, box-shadow .18s ease;
}
.nv-cast-node b {
    font-family: var(--wk);
    font-size: clamp(.62rem, 2.3vw, .84rem);
    letter-spacing: 1px;
    line-height: 1.1;
}
.nv-cast-node small {
    font-size: clamp(.52rem, 1.8vw, .64rem);
    color: var(--cream-faint);
}
.nv-cast-node:hover img,
.nv-cast-node:focus-visible img { transform: scale(1.07); outline: none; }
.nv-cast-node.sel img {
    transform: scale(1.09);
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--nc, var(--amber)) 22%, transparent),
        0 0 24px color-mix(in srgb, var(--nc, var(--amber)) 55%, transparent);
}
.nv-cast-node.sel b { color: #fff; }

/* ---------- 详情卡 ---------- */
.nv-cast-detail {
    --dc: var(--amber);
    display: flex;
    gap: 14px;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line);
    border-left: 3px solid var(--dc);
    transition: border-color .2s;
}
.nv-cast-detail > img {
    flex: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--dc);
}
.nv-cast-detail h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--wk);
    font-size: 1.05rem;
    letter-spacing: 1px;
}
.nv-cast-detail h4 small {
    font-family: var(--sf);
    font-size: .6rem;
    letter-spacing: 1px;
    padding: 2px 8px;
    border-radius: 99px;
    color: #fff;
    background: var(--dc);
}
.nv-cast-detail p {
    margin: 5px 0 0;
    font-size: .82rem;
    line-height: 1.75;
    color: var(--cream-dim);
}
.nv-cast-detail .rel {
    margin-top: 6px;
    font-size: .78rem;
    color: var(--cream);
}
.nv-cast-detail .rel i {
    font-style: normal;
    color: var(--dc);
    margin-right: 3px;
}

@media (max-width: 600px) {
    .nv-cast-panel {
        max-width: none;
        max-height: 86vh;
        border-radius: 18px 18px 0 0;
        border-bottom: none;
        padding: 18px 14px calc(20px + env(safe-area-inset-bottom));
        animation: nvSheet .22s ease-out;
    }
    .nv-cast-detail > img { width: 52px; height: 52px; }
}
