/* ============================================================
   reader.css — 阅读页增强（nocturne / 夜读）
   说明：
   - 阅读页的「基础排版 / 响应式 / 侧栏 / 面板」已由 app.css 的
     “章节阅读” 区块统一样式负责（serif 字体、两端留白、min(900px,100%)
     自适应宽度、金色分页、侧栏贴边、面板抽屉、小屏隐藏侧栏等）。
   - 本文件做 app.css 尚未覆盖的“增强”，并修复关键阻塞：
     read.css 仍写死 html{min-width:990px}，会阻止响应式生效，这里解锁。
   - 加载顺序在 read.css 之后、app.css 之前；与旧 CSS 冲突的属性用
     ID 级 !important 压制（ID 特异性 > 类，不受加载顺序影响）。
   ============================================================ */

/* ---------- 0. 令牌与解锁响应式 ---------- */
:root {
    --nc-read-lh: 1.95;          /* 正文行距，可由设置面板切换 */
}

/* read.css 写死 html{min-width:990px}，会让 app.css 的流体布局失效，这里解锁 */
html { min-width: 0 !important; }

/* ============================================================
   1. 正文排版增强（与 app.css 的 serif/缩进互补，不重复声明）
   ============================================================ */
.con_box .read_details_box .content p {
    line-height: var(--nc-read-lh, 1.95);   /* 行距可调 */
    text-align: justify;                     /* 两端对齐，长文更整齐 */
    text-justify: inter-ideograph;
    text-align-last: left;                   /* 末行不拉伸 */
    word-spacing: .02em;
}

/* 错误 / 空章提示不缩进、不两端对齐 */
.con_box .read_details_box .content p[data-id="0"],
.con_box .read_details_box .content p.empty_tip {
    text-indent: 0 !important;
    text-align: center;
    color: var(--nc-muted);
}

/* 章节标题与元信息更舒展（app.css 已居中标题，这里只补字距） */
.con_box .read_details_box .chapter h1 {
    letter-spacing: .02em;
}
.con_box .read_details_box .chapter .chapter_details span {
    letter-spacing: .01em;
}

/* ============================================================
   2. 阅读进度条（顶部细线，JS 驱动）
   ============================================================ */
.nc-readbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    z-index: 10002;
    background: transparent;
    pointer-events: none;
}
.nc-readbar > i {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--nc-gold), var(--nc-gold-2));
    box-shadow: 0 0 8px var(--nc-gold-soft);
    transition: width .12s linear;
}

/* ============================================================
   3. 护眼（暖纸）模式 —— 仅作用于阅读栏，不影响全站主题
   由 JS 给 #Jcontent(.con_box) 切换 .nc-eyecare 类
   ============================================================ */
.con_box.nc-eyecare {
    background: #efe7d2 !important;
    border-color: #e2d6ba !important;
}
.con_box.nc-eyecare .read_details_box,
.con_box.nc-eyecare .book_title_box,
.con_box.nc-eyecare .paging_box {
    background-color: #f7f0df !important;
    border-color: #e7dcc2 !important;
    color: #4a4133 !important;
}
.con_box.nc-eyecare .book_title_box h4,
.con_box.nc-eyecare .chapter h1,
.con_box.nc-eyecare .chapter_details span,
.con_box.nc-eyecare .book_details span,
.con_box.nc-eyecare .copyright,
.con_box.nc-eyecare .content p {
    color: #4a4133 !important;
}
.con_box.nc-eyecare .chapter {
    border-bottom-color: #e0d4b8 !important;
}
.con_box.nc-eyecare .paging_box a {
    color: #6a5d45 !important;
    border-color: #d8ccae !important;
}
.con_box.nc-eyecare .paging_box a:hover {
    color: #4a4133 !important;
    border-color: #b9a980 !important;
}

/* ============================================================
   4. 设置面板：行距 / 护眼 控件样式（仅作用于新增元素，无布局冲突）
   ============================================================ */
#left_bar_box .setUp_box .line_height_box,
#left_bar_box .setUp_box .eyecare_box {
    margin: 18px 0;
}
#left_bar_box .setUp_box .line_height_box > p,
#left_bar_box .setUp_box .eyecare_box > p {
    font-size: 14px;
    color: var(--nc-text-2);
    margin-bottom: 10px;
    font-weight: 600;
}

/* 行距选择 */
#left_bar_box .setUp_box .lineHeightBox {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
#left_bar_box .setUp_box .lineHeightBox span {
    min-width: 56px;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid var(--nc-line-2);
    border-radius: var(--nc-r-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--nc-text-2);
    transition: .18s;
}
#left_bar_box .setUp_box .lineHeightBox span:hover {
    border-color: var(--nc-gold);
    color: var(--nc-gold);
}
#left_bar_box .setUp_box .lineHeightBox .lhActive {
    border-color: var(--nc-gold);
    color: var(--nc-gold);
    background: var(--nc-gold-soft);
}

/* 护眼开关 */
#left_bar_box .setUp_box .eyeBtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid var(--nc-line-2);
    border-radius: 999px;
    cursor: pointer;
    color: var(--nc-text-2);
    font-size: 13px;
    transition: .2s;
    user-select: none;
}
#left_bar_box .setUp_box .eyeBtn .dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--nc-muted);
    transition: .2s;
}
#left_bar_box .setUp_box .eyeBtn:hover { border-color: var(--nc-gold); }
#left_bar_box .setUp_box .eyeBtn.on {
    border-color: var(--nc-gold);
    color: var(--nc-gold);
    background: var(--nc-gold-soft);
}
#left_bar_box .setUp_box .eyeBtn.on .dot {
    background: var(--nc-gold);
    box-shadow: 0 0 8px var(--nc-gold-soft);
}


/* ============================================================
   §27 阅读页侧栏与按钮 · 响应式重设计
   ------------------------------------------------------------
   设计目标：
   1) 桌面（≥1081px）：左右侧栏垂直居中贴边，金色线描按钮；
   2) ≤1080px：侧栏转为「底部悬浮操作簇」——左簇（目录/设置/书架/听书）
      + 右簇（收藏/评论），任何宽度都有功能入口，不再整体消失；
   3) 二维码卡片在窄屏隐藏；所有按钮 ≥44px 触控目标；
   4) 定位用 top/bottom + margin:auto 居中，不用 transform，
      避免劫持 fixed 抽屉（设置/目录/评论）的包含块。
   冲突压制：legacy read.css 用 ID 选择器（#right_bar_box 等），
   app.css 用类选择器且最后加载，故本节全部用 ID 级 !important。
   ============================================================ */

/* ---------- 27.1 侧栏容器（桌面基线，≥1081px 生效） ---------- */
#left_bar_box,
#right_bar_box {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;          /* 顺带覆盖 legacy #right_bar_box{bottom:0}，与 top+margin:auto 配合居中 */
    margin: auto 0 !important;     /* 垂直居中；同时清零 legacy 负 margin（-520/-470/-710px） */
    height: max-content !important;
    transform: none !important;    /* 清掉 app.css 的 translateY(-50%)：会破坏居中并劫持 fixed 抽屉包含块 */
    left: auto !important;
    right: auto !important;
    z-index: 100299 !important;    /* 高于正文层叠上下文：侧栏内的目录/设置/听书面板不被正文盖住 */
    display: flex !important;      /* ID 压制 app.css ≤1400px 的 display:none，侧栏不再“宽屏专属” */
    flex-direction: column !important;
    gap: 8px !important;
    padding: 0 !important;
    width: auto !important;
    overflow: visible !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
}
#left_bar_box  { left: 16px !important;  align-items: flex-start !important; }
#right_bar_box { right: 16px !important; align-items: flex-end !important; }

/* legacy 响应式变体的负 margin 一并清零 */
.w900 #left_bar_box, .w900 #right_bar_box,
.w800 #left_bar_box, .w800 #right_bar_box,
.w1280 #left_bar_box, .w1280 #right_bar_box {
    margin: auto 0 !important;
}

/* ---------- 27.2 侧栏按钮（46px，图标 + 文字，金色 hover/选中） ---------- */
#left_bar_box .left_bar,
#right_bar_box .right_bar {
    width: auto !important;
    margin: 0 !important;
    border-radius: 12px;
}
#left_bar_box .left_bar a,
#right_bar_box .right_bar a {
    display: grid !important;
    place-items: center;
    width: 46px !important;
    height: 46px !important;
    margin: 0 0 8px !important;
    padding: 4px 2px !important;
    overflow: visible !important;          /* 不再裁切图标与文字 */
    border-radius: 12px;
    background: var(--nc-surface) !important;
    border: 1px solid var(--nc-line) !important;
    color: var(--nc-muted) !important;
    font-size: 11px;
    line-height: 1.2;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}
#left_bar_box .left_bar a:hover,
#right_bar_box .right_bar a:hover,
#left_bar_box .left_bar a:focus-visible,
#right_bar_box .right_bar a:focus-visible {
    color: var(--nc-gold) !important;
    border-color: var(--nc-gold) !important;
}
/* 选中态（书架已加 / 已收藏） */
#left_bar_box .left_bar .bookcase_btn.on,
#right_bar_box .right_bar .like.on {
    color: var(--nc-gold) !important;
    border-color: var(--nc-gold) !important;
    background: var(--nc-gold-soft) !important;
}
#left_bar_box .left_bar a .nc-bar-ico,
#right_bar_box .right_bar a .nc-bar-ico {
    display: block;
    width: 21px !important;
    height: 21px !important;
    margin: 0 auto 3px !important;
}
#left_bar_box .left_bar a > span,
#right_bar_box .right_bar a > span {
    display: block;
    white-space: nowrap;
    font-size: 11px;
    color: inherit !important;
}

/* ---------- 27.3 二维码卡片（桌面侧栏内常显，窄屏隐藏） ---------- */
#right_bar_box .right_bar.right_qrcode {
    width: 108px !important;
    height: auto !important;
    margin: 10px 0 16px !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
}
#right_bar_box .right_qrcode .phonedow_tooltip {
    width: 108px !important;
    height: auto !important;
    padding: 0 !important;
    overflow: hidden;
    background: var(--nc-surface) !important;
    border: 1px solid var(--nc-line) !important;
    border-radius: 12px;
    box-shadow: var(--nc-shadow-sm);
}
#right_bar_box .right_qrcode .phonedow_tooltip_qrcode {
    width: 96px !important;
    height: 96px !important;
    margin: 6px auto 0 !important;
    position: relative;
}
#right_bar_box .right_qrcode .phonedow_tooltip_qrcode > img {
    width: 96px !important;
    height: 96px !important;
    display: block;
    border-radius: 8px;
}
#right_bar_box .right_qrcode .phonedow_tooltip_title {
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: var(--nc-text-2) !important;
    margin: 0 !important;
    padding: 6px 0 8px;
    white-space: nowrap;
}

/* ---------- 27.4 底部翻页三键（重设计：等宽三列胶囊）
   病因：legacy `.con_box .paging_box a { width:32%; height:68px; line-height:68px }`
   压过新样式，叠上 app.css 的 border-radius:999px 后被撑成 68px 大椭圆，
   legacy 给目录两侧的 1px 分隔线伪元素也随 68px 高度错位。
   方案：整行收敛为三等分胶囊（≤768px 已有同构 grid，桌面/手机语言统一）。 ---------- */
.paging_box,
.con_box .paging_box {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 640px !important;
    height: auto !important;
    margin: 42px auto 0 !important;
    padding: 24px 0 0 !important;
    border: 0 !important;                       /* 压掉 legacy .paging_box 整圈 1px 边框 */
    border-top: 1px solid var(--nc-line) !important;
    border-radius: 0 !important;
}
.paging_box a,
.con_box .paging_box a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 44px !important;
    line-height: 1.4 !important;
    padding: 10px 18px !important;
    box-sizing: border-box !important;
    text-align: center !important;
    overflow: visible !important;
    position: static !important;
    border-radius: 999px !important;
    background: var(--nc-surface-2) !important;
    border: 1px solid var(--nc-line-2) !important;
    font-size: 14px !important;
    color: var(--nc-text-2) !important;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.paging_box a:hover,
.con_box .paging_box a:hover {
    color: var(--nc-gold) !important;
    border-color: var(--nc-gold) !important;
    background: var(--nc-gold-soft) !important;
}
.paging_box a.disable_btn {
    opacity: .4 !important;
    pointer-events: none !important;
}
/* 目录为主按钮：金描边弱底 */
.paging_box a.paging_directory,
.con_box .paging_box a.paging_directory {
    color: var(--nc-gold) !important;
    border-color: var(--nc-gold) !important;
    background: var(--nc-gold-soft) !important;
    font-weight: 600 !important;
}
.paging_box a.paging_directory:hover { background: var(--nc-gold-soft) !important; }
/* 压掉 legacy 目录两侧随 68px 高度错位的 1px 分隔线 */
.con_box .paging_box .paging_directory:before,
.con_box .paging_box .paging_directory:after {
    content: none !important;
    display: none !important;
}

/* ---------- 27.5 抽屉面板与评论按钮触控目标 ---------- */
#btnEmoji, #btnSubmit { min-height: 42px; padding: 8px 18px; box-sizing: border-box; }
.comments_box .close, .setUp_close, .db_type_close { min-width: 36px; min-height: 36px; }

/* ============================================================
   27.6 ≤1080px：侧栏 → 底部悬浮操作簇
   （1080 以下正文占满宽度，侧栏必然遮挡正文，故转底部）
   ============================================================ */
@media (max-width: 1080px) {
    #left_bar_box,
    #right_bar_box {
        top: auto !important;
        bottom: 0 !important;
        margin: 0 !important;
        height: auto !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        gap: 6px !important;
        max-width: 50vw !important;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
        background: var(--nc-bg-2) !important;
        border: 1px solid var(--nc-line) !important;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, .28) !important;
    }
    #left_bar_box {
        left: 10px !important;
        right: auto !important;
        border-radius: 16px 16px 0 0 !important;
    }
    #right_bar_box {
        right: 10px !important;
        left: auto !important;
        border-radius: 16px 16px 0 0 !important;
    }
    /* 簇内按钮：去边框去底色，变成标签栏单元 */
    #left_bar_box .left_bar a,
    #right_bar_box .right_bar a {
        width: 48px !important;
        height: 50px !important;
        margin: 0 !important;
        border-radius: 12px;
        background: transparent !important;
        border: 0 !important;
    }
    #left_bar_box .left_bar a:hover,
    #right_bar_box .right_bar a:hover,
    #left_bar_box .left_bar .bookcase_btn.on,
    #right_bar_box .right_bar .like.on {
        background: var(--nc-gold-soft) !important;
        border: 0 !important;
    }
    /* 二维码卡片在底部簇中太占位，隐藏 */
    #right_bar_box .right_bar.right_qrcode { display: none !important; }

    /* 正文底部留白，避免被操作簇遮挡 */
    .con_box {
        margin-bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important;
    }
    /* 回到顶部按钮上移，避开右簇 */
    .nc-totop { bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important; }

    /* TTS 面板：固定在操作簇上方，整宽弹出（压过模板内联定位） */
    body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel,
    body #left_bar_box .left_bar .listening.open .listening_tooltip.tts-panel {
        position: fixed !important;
        top: auto !important;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
        left: 12px !important;
        right: 12px !important;
        transform: none !important;   /* 清掉桌面规则残留的 translateY(-50%)，否则整体上移导致裁切 */
        width: auto !important;
        max-height: 58vh !important;
        overflow-y: auto !important;
        box-shadow: var(--nc-shadow) !important;
    }
    body #left_bar_box .left_bar:not(.open) .listening_tooltip { display: none !important; }
}

/* ============================================================
   27.7 ≤768px：翻页三键等宽平铺 + 设置面板触控优化
   ============================================================ */
@media (max-width: 768px) {
    /* 翻页：上一章 / 目录 / 下一章 三等分，46px 触控高度 */
    .paging_box {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
        margin-top: 30px !important;
        padding-top: 22px !important;
    }
    .paging_box a {
        width: 100% !important;
        min-height: 46px !important;
        padding: 8px 10px !important;
        font-size: 14px !important;
    }

    /* 设置面板：字号 / 页宽 / 行距 选项加高，均分排布 */
    .fontSizeBox span, .pageWidthBox span,
    #left_bar_box .setUp_box .lineHeightBox span {
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 1 1 auto;
        box-sizing: border-box;
    }
    #left_bar_box .setUp_box .lineHeightBox { gap: 8px; }
    #left_bar_box .setUp_box .eyeBtn { width: 100%; justify-content: center; height: 42px; }

    /* 抽屉面板窄屏加宽到 92vw，关闭按钮加大 */
    .left_panel, .db_box, .setUp_box, .comments_box { width: min(360px, 92vw) !important; }
    .comments_box .close, .setUp_close, .db_type_close { min-width: 40px; min-height: 40px; }

    /* 评论输入与提交按钮 */
    #btnEmoji, #btnSubmit { min-height: 44px; }
}

/* ============================================================
   27.8 ≤400px：底部簇改图标-only，防止 360px 窄屏溢出
   ============================================================ */
@media (max-width: 400px) {
    #left_bar_box .left_bar a,
    #right_bar_box .right_bar a {
        width: 42px !important;
        height: 46px !important;
    }
    #left_bar_box .left_bar a > span,
    #right_bar_box .right_bar a > span { display: none !important; }
    #left_bar_box .left_bar a .nc-bar-ico,
    #right_bar_box .right_bar a .nc-bar-ico { margin: 0 auto !important; }
    #left_bar_box { left: 6px !important; }
    #right_bar_box { right: 6px !important; }
}

/* ============================================================
   §28 阅读页弹窗层：目录 / 设置 / 评论 / 听书 统一视口定位
   ------------------------------------------------------------
   病因：
   1) app.css 给 .left_panel/.db_box/.setUp_box/.comments_box 追加
      top:0;bottom:0，与 legacy ID 级 position:absolute 组合后，
      目录/设置面板被压成侧栏自身高度（约 300px）且内容溢出；
   2) legacy .comments_box 的 margin-left/top:10% 未被重置，
      右侧抽屉整体偏移、高度过约束；
   3) 听书面板 top:0 相对中部磁贴向下伸 480px，底部溢出视口。
   方案：全部改为视口级 fixed——目录/设置为侧栏右侧居中面板，
        评论为右侧抽屉；≤1080px 转居中模态 / 底部弹层。
   ============================================================ */
#left_bar_box .db_box,
#left_bar_box .setUp_box {
    position: fixed !important;
    left: 84px !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    width: min(720px, calc(100vw - 110px)) !important;
    height: auto !important;
    max-height: 86vh !important;
    overflow-y: auto !important;
    margin: 0 !important;
    z-index: 100300 !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .45) !important;
}
.comments_box {
    position: fixed !important;
    left: auto !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: min(420px, 94vw) !important;
    height: auto !important;
    margin: 0 !important;
    z-index: 100300 !important;
    overflow-y: auto !important;
    border-radius: 0 !important;
    box-shadow: -18px 0 48px rgba(0, 0, 0, .45) !important;
}
/* 评论抽屉内表情面板防溢出 */
.comments_box #emojiPanel { max-width: 100%; }

/* ---------- 28.1 ≤1080px：弹窗转居中模态 / 底部弹层 ---------- */
@media (max-width: 1080px) {
    #left_bar_box .db_box,
    #left_bar_box .setUp_box {
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: min(92vw, 560px) !important;
        max-height: 72vh !important;
        border-radius: 16px !important;
    }
    .comments_box {
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        bottom: 0 !important;
        width: 100vw !important;
        max-height: 72vh !important;
        border-radius: 16px 16px 0 0 !important;
        box-shadow: 0 -18px 48px rgba(0, 0, 0, .45) !important;
        padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
    }
}

/* ---------- 28.2 分享海报弹窗层级（压过弹窗层与评论抽屉） ---------- */
.nc-share-modal { z-index: 100400 !important; }
/* 海报分享按钮选中/hover 焦点态（与侧栏按钮一致） */
.nc-poster-trigger:focus-visible { outline: 2px solid var(--nc-gold); outline-offset: 2px; }

/* ---------- 28.3 目录面板内容重设计：网格章节列表 ---------- */
#left_bar_box .db_box .db_type {
    display: flex !important;
    align-items: center;
    gap: 28px;
    margin: 0 0 14px !important;
    padding: 16px 18px 10px !important;
    border-bottom: 1px solid var(--nc-line);
    float: none !important;
    overflow: hidden;
}
#left_bar_box .db_box .db_type a { float: none !important; margin: 0 !important; }
#left_bar_box .db_box .db_type a span {
    font-size: 15px !important;
    line-height: 1.4 !important;
    padding-bottom: 4px !important;
    color: var(--nc-muted);
}
#left_bar_box .db_box .db_type .dbtype_on span {
    color: var(--nc-text) !important;
    border-bottom: 3px solid var(--nc-gold) !important;
}
#left_bar_box .db_box .db_type_close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px;
    background: var(--nc-surface-2);
    border: 1px solid var(--nc-line);
}
#left_bar_box .db_box .db_type_close::after {
    content: '×';
    display: block;
    text-align: center;
    line-height: 26px;
    font-size: 16px;
    color: var(--nc-muted);
}
#left_bar_box .db_box .db_type_close:hover { color: var(--nc-gold); border-color: var(--nc-gold); }
#left_bar_box .db_box .directory_box {
    max-height: none !important;
    height: auto !important;
    padding: 4px 10px 14px !important;
}
#left_bar_box .db_box .directory_list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 2px 10px !important;
    padding: 0 !important;
}
#left_bar_box .db_box .directory_list li {
    float: none !important;
    padding: 0 !important;
    width: auto !important;
}
#left_bar_box .db_box .directory_list li div {
    width: auto !important;
    height: 38px !important;
    padding: 0 10px !important;
    border-radius: 8px;
    display: flex;
    align-items: center;
}
#left_bar_box .db_box .directory_list li div a {
    height: auto !important;
    line-height: 1.4 !important;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#left_bar_box .db_box .directory_list li.on div {
    background: var(--nc-gold-soft);
}
#left_bar_box .db_box .directory_list li.on div a { color: var(--nc-gold); font-weight: 600; }

/* ---------- 28.4 设置面板内容重设计：弹性行 + 触控芯片 ---------- */
#left_bar_box .setUp_box { padding: 18px 20px 20px !important; }
#left_bar_box .setUp_box .setUp_txt {
    margin: 0 0 12px !important;
    font-size: 12px !important;
    color: var(--nc-muted) !important;
    float: none !important;
}
#left_bar_box .setUp_box .setUp_close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px;
    background: var(--nc-surface-2);
    border: 1px solid var(--nc-line);
}
#left_bar_box .setUp_box .setUp_close::after {
    content: '×';
    display: block;
    text-align: center;
    line-height: 26px;
    font-size: 16px;
    color: var(--nc-muted);
}
#left_bar_box .setUp_box .setUp_close:hover { color: var(--nc-gold); border-color: var(--nc-gold); }
#left_bar_box .setUp_box .color_list,
#left_bar_box .setUp_box .font_box,
#left_bar_box .setUp_box .page_width_box,
#left_bar_box .setUp_box .line_height_box,
#left_bar_box .setUp_box .eyecare_box {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0 0 18px !important;
    float: none !important;
    overflow: visible !important;
    height: auto !important;
    width: auto !important;
}
#left_bar_box .setUp_box .color_list p,
#left_bar_box .setUp_box .font_box p,
#left_bar_box .setUp_box .page_width_box p,
#left_bar_box .setUp_box .line_height_box p,
#left_bar_box .setUp_box .eyecare_box p {
    float: none !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    font-size: 13px !important;
    min-width: 70px;
    color: var(--nc-text-2) !important;
}
/* ---------- 28.4b 阅读主题色板：纯 CSS 色点（弃用雪碧图，杜绝图片 404 灰圈） ---------- */
#left_bar_box .setUp_box .color_list a {
    float: none !important;
    margin: 0 !important;
    width: 36px !important;
    height: 36px !important;
    box-sizing: border-box;
    border: 2px solid transparent !important;
    border-radius: 50% !important;
    outline: 1px solid var(--nc-line-2);
    outline-offset: 0;
    position: relative;
    cursor: pointer;
    transition: outline-color .15s ease, transform .15s ease;
}
#left_bar_box .setUp_box .color_list a:hover { outline-color: var(--nc-gold); transform: scale(1.08); }
#left_bar_box .setUp_box .color_list a i { display: none !important; }
#left_bar_box .setUp_box .color_list .brown_btn { background-color: #a9714b !important; }
#left_bar_box .setUp_box .color_list .green_btn { background-color: #57a05e !important; }
#left_bar_box .setUp_box .color_list .pink_btn  { background-color: #e08bb0 !important; }
#left_bar_box .setUp_box .color_list .blue_btn  { background-color: #5a9fd4 !important; }
#left_bar_box .setUp_box .color_list .gray_btn  { background-color: #9aa6b2 !important; }
#left_bar_box .setUp_box .color_list .black_btn { background-color: #16181d !important; }
/* 选中态：金色描边 + 白色对勾（read.js 给 a 与 i 同时加 color_on） */
#left_bar_box .setUp_box .color_list a.color_on {
    border-color: var(--nc-gold) !important;
    outline-color: var(--nc-gold);
}
#left_bar_box .setUp_box .color_list a.color_on::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 5px;
    margin: -4px 0 0 -5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
    filter: drop-shadow(0 0 1px rgba(0,0,0,.55));
}
#left_bar_box .setUp_box .fontSizeBox,
#left_bar_box .setUp_box .pageWidthBox,
#left_bar_box .setUp_box .lineHeightBox {
    float: none !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    height: auto !important;
    width: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
#left_bar_box .setUp_box .fontSizeBox span,
#left_bar_box .setUp_box .pageWidthBox span,
#left_bar_box .setUp_box .lineHeightBox span {
    float: none !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px !important;
    height: 36px !important;
    padding: 0 12px !important;
    border: 1px solid var(--nc-line) !important;
    border-radius: 999px;
    background: var(--nc-surface-2);
    font-size: 13px !important;
    line-height: 1 !important;
    color: var(--nc-muted) !important;
    cursor: pointer;
    box-sizing: border-box;
}
#left_bar_box .setUp_box .fontSizeBox span:hover,
#left_bar_box .setUp_box .pageWidthBox span:hover,
#left_bar_box .setUp_box .lineHeightBox span:hover {
    color: var(--nc-gold) !important;
    border-color: var(--nc-gold) !important;
}
#left_bar_box .setUp_box .fontSizeBox span.fontSize,
#left_bar_box .setUp_box .pageWidthBox span.pageWidthAc,
#left_bar_box .setUp_box .lineHeightBox span.lhActive {
    color: var(--nc-gold) !important;
    border-color: var(--nc-gold) !important;
    background: var(--nc-gold-soft) !important;
    font-weight: 600;
}
#left_bar_box .setUp_box .eyeBtn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--nc-line);
    border-radius: 999px;
    background: var(--nc-surface-2);
    cursor: pointer;
}
#left_bar_box .setUp_box .eyeBtn.on {
    color: var(--nc-gold);
    border-color: var(--nc-gold);
    background: var(--nc-gold-soft);
}

/* ============================================================
   §29 侧栏按钮 / 底部操作簇：响应式重设计（2026-11-06）
   ------------------------------------------------------------
   桌面（≥1081px）：56–64px 流体磁贴，图标 + 单行标签；
   ≤1080px：左右两组贴底操作簇，尺寸随视口缩放；
   ≤480px：图标模式，320–480px 不重叠、不溢出。
   修复：
   1) legacy `.listening{width:100%}` 压过 46px，听书磁贴只有 28px；
   2) “海报分享”4 字标签在 46px 磁贴内溢出；
   3) 磁贴高度写死 46px，图标+文字拥挤。
   ============================================================ */
#left_bar_box,
#right_bar_box {
    --nc-rail-tile-w: clamp(58px, 4.3vw, 66px);
    --nc-rail-tile-h: clamp(60px, 4.6vw, 68px);
    --nc-rail-gap: clamp(8px, .7vw, 12px);
    --nc-rail-icon: clamp(20px, 1.55vw, 24px);
    --nc-rail-font: clamp(10.5px, .82vw, 12px);
    --nc-rail-radius: clamp(14px, 1vw, 18px);
    gap: var(--nc-rail-gap) !important;
}
#left_bar_box { left: clamp(12px, 1.35vw, 22px) !important; }
#right_bar_box { right: clamp(12px, 1.35vw, 22px) !important; }

/* 外层磁贴容器不再固定 44×44，交给内部按钮决定尺寸 */
#left_bar_box .left_bar,
#right_bar_box .right_bar {
    display: block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    border-radius: 0 !important;
}

/* 按钮本体：图标在上、文字在下；.listening 提高优先级压过 legacy width:100% */
#left_bar_box .left_bar a,
#right_bar_box .right_bar a,
#left_bar_box .left_bar a.listening {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    width: var(--nc-rail-tile-w) !important;
    height: var(--nc-rail-tile-h) !important;
    min-height: 44px;
    margin: 0 !important;
    padding: 8px 4px 7px !important;
    box-sizing: border-box !important;
    border: 1px solid var(--nc-line) !important;
    border-radius: var(--nc-rail-radius) !important;
    background-color: var(--nc-surface) !important;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0) 55%) !important;
    color: var(--nc-muted) !important;
    font-family: var(--nc-sans) !important;
    font-size: var(--nc-rail-font) !important;
    line-height: 1 !important;
    text-decoration: none !important;
    cursor: pointer;
    overflow: visible !important;              /* 听书面板是按钮子元素，不能裁切 */
    box-shadow: var(--nc-shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .04) !important;
    transition: color .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
    -webkit-tap-highlight-color: transparent;
}

/* 图标 */
#left_bar_box .left_bar a .nc-bar-ico,
#right_bar_box .right_bar a .nc-bar-ico {
    display: block !important;
    width: var(--nc-rail-icon) !important;
    height: var(--nc-rail-icon) !important;
    margin: 0 !important;
    flex: 0 0 auto;
    color: inherit !important;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .18s ease, color .18s ease;
}

/* 标签：单行、不许溢出；4 字“海报分享”在 56px 磁贴内也能放下 */
#left_bar_box .left_bar a > span,
#right_bar_box .right_bar a > span {
    display: block !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-family: var(--nc-sans) !important;
    font-size: var(--nc-rail-font) !important;
    font-weight: 500;
    line-height: 1.05 !important;
    letter-spacing: 0 !important;
    color: inherit !important;
}

/* “海报分享”比其他标签多两个字，略微缩小字距，避免窄屏贴边裁切 */
#right_bar_box .right_bar a.nc-poster-trigger > span {
    font-size: .95em !important;
    letter-spacing: -.01em !important;
}

/* 键盘焦点 */
#left_bar_box .left_bar a:focus-visible,
#right_bar_box .right_bar a:focus-visible {
    outline: 2px solid var(--nc-gold) !important;
    outline-offset: 3px;
}

/* 按压反馈 */
#left_bar_box .left_bar a:active,
#right_bar_box .right_bar a:active {
    border-color: var(--nc-gold) !important;
    background-color: var(--nc-gold-soft) !important;
}

/* 选中 / 展开态 */
#left_bar_box .left_bar .bookcase_btn.on,
#right_bar_box .right_bar .like.on,
#left_bar_box .left_bar a.listening.open {
    color: var(--nc-gold) !important;
    border-color: var(--nc-gold) !important;
    background-color: var(--nc-gold-soft) !important;
    box-shadow: 0 0 0 1px var(--nc-gold-soft), var(--nc-shadow-sm) !important;
}

@media (hover: hover) and (pointer: fine) {
    #left_bar_box .left_bar a:hover,
    #right_bar_box .right_bar a:hover {
        color: var(--nc-gold) !important;
        border-color: var(--nc-gold) !important;
        background-color: var(--nc-surface-2) !important;
        box-shadow: var(--nc-shadow), 0 0 0 1px var(--nc-gold-soft), inset 0 1px 0 rgba(255, 255, 255, .06) !important;
    }
    #left_bar_box .left_bar a:hover .nc-bar-ico,
    #right_bar_box .right_bar a:hover .nc-bar-ico {
        transform: translateY(-1px);
    }
}

/* ---------- ≤1080px：底部双操作簇 ---------- */
@media (max-width: 1080px) {
    #left_bar_box,
    #right_bar_box {
        --nc-dock-tile-w: clamp(48px, 6vw, 56px);
        --nc-dock-tile-h: clamp(50px, 6.6vw, 58px);
        --nc-dock-icon: clamp(19px, 2.2vw, 22px);
        --nc-dock-font: clamp(9px, 1.4vw, 10.5px);
        --nc-dock-gap: clamp(4px, .8vw, 8px);
        top: auto !important;
        bottom: 0 !important;
        margin: 0 !important;
        height: auto !important;
        flex-direction: row !important;
        align-items: flex-end !important;
        gap: var(--nc-dock-gap) !important;
        max-width: none !important;
        padding: 7px clamp(6px, 1.2vw, 10px) calc(7px + env(safe-area-inset-bottom, 0px)) !important;
        background: var(--nc-bg-2) !important;
        border: 1px solid var(--nc-line) !important;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, .24) !important;
    }
    #left_bar_box {
        left: clamp(6px, 1.2vw, 12px) !important;
        right: auto !important;
        border-radius: 18px 18px 0 0 !important;
    }
    #right_bar_box {
        right: clamp(6px, 1.2vw, 12px) !important;
        left: auto !important;
        border-radius: 18px 18px 0 0 !important;
    }

    #left_bar_box .left_bar a,
    #right_bar_box .right_bar a,
    #left_bar_box .left_bar a.listening {
        width: var(--nc-dock-tile-w) !important;
        height: var(--nc-dock-tile-h) !important;
        padding: 6px 3px 5px !important;
        gap: 3px !important;
        border: 0 !important;
        border-radius: 12px !important;
        background: transparent !important;
        background-image: none !important;
        box-shadow: none !important;
        color: var(--nc-muted) !important;
    }
    #left_bar_box .left_bar a .nc-bar-ico,
    #right_bar_box .right_bar a .nc-bar-ico {
        width: var(--nc-dock-icon) !important;
        height: var(--nc-dock-icon) !important;
    }
    #left_bar_box .left_bar a > span,
    #right_bar_box .right_bar a > span {
        font-size: var(--nc-dock-font) !important;
    }
    #left_bar_box .left_bar .bookcase_btn.on,
    #right_bar_box .right_bar .like.on,
    #left_bar_box .left_bar a.listening.open {
        color: var(--nc-gold) !important;
        background: var(--nc-gold-soft) !important;
    }

}

/* 底部簇内的 hover 仅桌面指针触发 */
@media (max-width: 1080px) and (hover: hover) and (pointer: fine) {
    #left_bar_box .left_bar a:hover,
    #right_bar_box .right_bar a:hover {
        color: var(--nc-gold) !important;
        background: var(--nc-surface-2) !important;
    }
}

/* ---------- ≤480px：图标模式，防止两组簇重叠 ---------- */
@media (max-width: 480px) {
    #left_bar_box,
    #right_bar_box {
        --nc-dock-tile-w: clamp(40px, 11vw, 48px);
        --nc-dock-tile-h: clamp(44px, 11vw, 50px);
        --nc-dock-icon: clamp(20px, 5.6vw, 23px);
        gap: 4px !important;
        padding: 6px calc(6px) calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    }
    #left_bar_box .left_bar a,
    #right_bar_box .right_bar a,
    #left_bar_box .left_bar a.listening {
        padding: 0 !important;
        border-radius: 14px !important;
        justify-content: center !important;
    }
    #left_bar_box .left_bar a > span,
    #right_bar_box .right_bar a > span {
        display: none !important;
    }
    #left_bar_box .left_bar a .nc-bar-ico,
    #right_bar_box .right_bar a .nc-bar-ico {
        margin: 0 auto !important;
    }
}

/* ---------- ≤340px：极窄屏再收缩一档 ---------- */
@media (max-width: 340px) {
    #left_bar_box,
    #right_bar_box {
        --nc-dock-tile-w: 36px;
        --nc-dock-tile-h: 42px;
        gap: 3px !important;
        padding: 5px 4px calc(5px + env(safe-area-inset-bottom, 0px)) !important;
    }
    #left_bar_box { left: 5px !important; }
    #right_bar_box { right: 5px !important; }
}

/* 减少动态偏好 */
@media (prefers-reduced-motion: reduce) {
    #left_bar_box .left_bar a,
    #right_bar_box .right_bar a,
    #left_bar_box .left_bar a .nc-bar-ico,
    #right_bar_box .right_bar a .nc-bar-ico {
        transition: none !important;
    }
}


/* ============================================================
   §30 阅读页弹窗内容重构（目录 / 设置 / 书架 / 听书）
   ------------------------------------------------------------
   统一面板骨架：固定头部 + 可滚动内容区 + 统一关闭按钮；
   目录：章节搜索 / 当前章高亮 / 自适应多列 / 内部滚动；
   设置：分组卡片 + 响应式单列/双列；
   书架：新增书架状态卡片（封面 / 收藏操作 / 我的书架入口）；
   听书：播放器卡片化，窄屏底部弹层不裁切。
   ============================================================ */

/* ---------- 30.1 通用面板骨架 ---------- */
#left_bar_box .db_box,
#left_bar_box .setUp_box,
#left_bar_box .shelf_box {
    padding: 0 !important;
    overflow: hidden !important;
    background: var(--nc-surface) !important;
    border: 1px solid var(--nc-line) !important;
    border-radius: 18px !important;
    box-shadow: var(--nc-shadow) !important;
    color: var(--nc-text) !important;
}
#left_bar_box .db_box:not(.hidden),
#left_bar_box .setUp_box:not(.hidden),
#left_bar_box .shelf_box:not(.hidden) {
    display: flex !important;
    flex-direction: column !important;
}
#left_bar_box .db_box {
    width: min(780px, calc(100vw - 120px)) !important;
    height: min(82vh, 820px) !important;
    max-height: 86vh !important;
}
#left_bar_box .setUp_box {
    width: min(620px, calc(100vw - 120px)) !important;
    height: auto !important;
    max-height: 86vh !important;
}
#left_bar_box .shelf_box {
    width: min(400px, calc(100vw - 120px)) !important;
    height: auto !important;
    max-height: 86vh !important;
}

/* 统一头部 */
#left_bar_box .db_box .nc-panel-head,
#left_bar_box .setUp_box .nc-panel-head,
#left_bar_box .shelf_box .nc-panel-head {
    flex: 0 0 auto;
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 16px !important;
    border-bottom: 1px solid var(--nc-line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 70%),
        var(--nc-surface);
}
.nc-panel-heading { min-width: 0; }
.nc-panel-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--nc-gold);
    font: 600 10px/1 var(--nc-sans);
    letter-spacing: .18em;
    text-transform: uppercase;
    opacity: .9;
}
.nc-panel-title {
    margin: 0;
    color: var(--nc-text);
    font: 600 22px/1.2 var(--nc-serif);
    letter-spacing: .02em;
}
.nc-panel-sub {
    margin: 6px 0 0;
    color: var(--nc-muted);
    font: 12px/1.55 var(--nc-sans);
}
.nc-panel-sub b { color: var(--nc-text-2); font-weight: 600; }

/* 统一关闭按钮（覆盖旧 × 伪元素） */
#left_bar_box .db_box .db_type_close,
#left_bar_box .setUp_box .setUp_close,
#left_bar_box .shelf_box .nc-panel-close,
#left_bar_box .db_box .nc-panel-close,
#left_bar_box .setUp_box .nc-panel-close {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 auto;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    border: 1px solid var(--nc-line-2) !important;
    border-radius: 10px !important;
    background: var(--nc-surface-2) !important;
    color: var(--nc-muted) !important;
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}
#left_bar_box .db_box .db_type_close::before,
#left_bar_box .setUp_box .setUp_close::before,
#left_bar_box .shelf_box .nc-panel-close::before,
#left_bar_box .db_box .nc-panel-close::before,
#left_bar_box .setUp_box .nc-panel-close::before,
#left_bar_box .db_box .db_type_close::after,
#left_bar_box .setUp_box .setUp_close::after,
#left_bar_box .shelf_box .nc-panel-close::after,
#left_bar_box .db_box .nc-panel-close::after,
#left_bar_box .setUp_box .nc-panel-close::after {
    content: '' !important;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 13px;
    height: 1.6px;
    border-radius: 2px;
    background: currentColor;
}
#left_bar_box .db_box .db_type_close::before,
#left_bar_box .setUp_box .setUp_close::before,
#left_bar_box .shelf_box .nc-panel-close::before,
#left_bar_box .db_box .nc-panel-close::before,
#left_bar_box .setUp_box .nc-panel-close::before { transform: translate(-50%, -50%) rotate(45deg); }
#left_bar_box .db_box .db_type_close::after,
#left_bar_box .setUp_box .setUp_close::after,
#left_bar_box .shelf_box .nc-panel-close::after,
#left_bar_box .db_box .nc-panel-close::after,
#left_bar_box .setUp_box .nc-panel-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
#left_bar_box .db_box .db_type_close:hover,
#left_bar_box .setUp_box .setUp_close:hover,
#left_bar_box .shelf_box .nc-panel-close:hover,
#left_bar_box .db_box .nc-panel-close:hover,
#left_bar_box .setUp_box .nc-panel-close:hover {
    color: var(--nc-gold) !important;
    border-color: var(--nc-gold) !important;
    background: var(--nc-gold-soft) !important;
}

/* ---------- 30.2 目录：搜索 + 自适应章节网格 ---------- */
#left_bar_box .db_box .nc-panel-toolbar {
    flex: 0 0 auto;
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 14px 24px 12px !important;
    border-bottom: 1px solid var(--nc-line);
}
.nc-panel-search {
    flex: 1 1 auto;
    display: flex !important;
    align-items: center;
    gap: 9px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--nc-line-2);
    border-radius: 999px;
    background: var(--nc-bg-2);
    color: var(--nc-muted);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.nc-panel-search svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.nc-panel-search input {
    flex: 1 1 auto;
    min-width: 0;
    height: 38px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--nc-text);
    font: 13px/1 var(--nc-sans);
}
.nc-panel-search input::placeholder { color: var(--nc-dim); }
.nc-panel-search:focus-within {
    border-color: var(--nc-gold);
    box-shadow: 0 0 0 3px var(--nc-gold-soft);
}
.nc-panel-filter-tip {
    flex: 0 0 auto;
    min-width: 44px;
    color: var(--nc-muted);
    font: 11px/1 var(--nc-sans);
    text-align: right;
    white-space: nowrap;
}
#left_bar_box .db_box .directory_box {
    flex: 1 1 auto;
    min-height: 0;
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
    padding: 14px 18px 22px !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--nc-surface-3) transparent;
}
#left_bar_box .db_box .directory_box::-webkit-scrollbar { width: 8px; }
#left_bar_box .db_box .directory_box::-webkit-scrollbar-thumb {
    background: var(--nc-surface-3);
    border-radius: 8px;
    border: 2px solid var(--nc-surface);
}
#left_bar_box .db_box .directory_list {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
    gap: 4px 10px !important;
    padding: 0 !important;
}
#left_bar_box .db_box .directory_list li {
    float: none !important;
    width: auto !important;
    padding: 0 !important;
}
#left_bar_box .db_box .directory_list li div {
    width: auto !important;
    height: 44px !important;
    padding: 0 12px !important;
    border: 1px solid transparent;
    border-radius: 10px;
    display: flex !important;
    align-items: center;
    gap: 8px;
    background: transparent;
    transition: background .16s ease, border-color .16s ease;
}
#left_bar_box .db_box .directory_list li div::before {
    content: '';
    flex: 0 0 auto;
    width: 3px;
    height: 14px;
    border-radius: 2px;
    background: transparent;
    transition: background .16s ease;
}
#left_bar_box .db_box .directory_list li div:hover {
    background: var(--nc-surface-2);
    border-color: var(--nc-line);
}
#left_bar_box .db_box .directory_list li.on div {
    background: var(--nc-gold-soft);
    border-color: var(--nc-line-gold, var(--nc-gold-soft));
}
#left_bar_box .db_box .directory_list li.on div::before { background: var(--nc-gold); }
#left_bar_box .db_box .directory_list li div a {
    flex: 1 1 auto;
    min-width: 0;
    height: auto !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    color: var(--nc-text-2) !important;
    font: 13px/1.45 var(--nc-sans) !important;
    text-align: left;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}
#left_bar_box .db_box .directory_list li.on div a {
    color: var(--nc-gold) !important;
    font-weight: 600;
}
.nc-panel-loading {
    grid-column: 1 / -1;
    padding: 30px 10px;
    color: var(--nc-muted);
    font-size: 13px;
    text-align: center;
}
.nc-dir-empty {
    padding: 38px 10px;
    color: var(--nc-muted);
    font-size: 13px;
    text-align: center;
}

/* ---------- 30.3 设置：分组卡片 ---------- */
#left_bar_box .setUp_box .nc-set-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    padding: 18px 22px 24px !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--nc-surface-3) transparent;
}
#left_bar_box .setUp_box .nc-set-grid::-webkit-scrollbar { width: 8px; }
#left_bar_box .setUp_box .nc-set-grid::-webkit-scrollbar-thumb {
    background: var(--nc-surface-3);
    border-radius: 8px;
    border: 2px solid var(--nc-surface);
}
.nc-set-group {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 13px 16px;
    border: 1px solid var(--nc-line);
    border-radius: 14px;
    background: var(--nc-bg-2);
}
.nc-set-label span {
    display: block;
    color: var(--nc-text-2);
    font: 500 13px/1.3 var(--nc-sans);
}
.nc-set-label em {
    display: block;
    margin-top: 3px;
    color: var(--nc-dim);
    font: 11px/1.3 var(--nc-sans);
    font-style: normal;
}
#left_bar_box .setUp_box .color_list {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    height: auto !important;
}
#left_bar_box .setUp_box .color_list > p { display: none !important; }
#left_bar_box .setUp_box .color_list a {
    position: relative;
    display: block;
    width: 38px !important;
    height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 2px solid transparent !important;
    border-radius: 50% !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18);
    transition: transform .16s ease, border-color .16s ease;
}
#left_bar_box .setUp_box .color_list a:hover { transform: scale(1.08); }
#left_bar_box .setUp_box .color_list a.color_on { border-color: var(--nc-gold) !important; }
#left_bar_box .setUp_box .color_list a.color_on::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 5px;
    margin: -3px 0 0 -5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg);
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, .55));
}
#left_bar_box .setUp_box .fontSizeBox,
#left_bar_box .setUp_box .pageWidthBox,
#left_bar_box .setUp_box .lineHeightBox {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px !important;
    height: auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}
#left_bar_box .setUp_box .fontSizeBox span,
#left_bar_box .setUp_box .pageWidthBox span,
#left_bar_box .setUp_box .lineHeightBox span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px !important;
    height: 38px !important;
    padding: 0 12px !important;
    border: 1px solid var(--nc-line) !important;
    border-radius: 10px !important;
    background: var(--nc-surface-2);
    color: var(--nc-muted) !important;
    font: 13px/1 var(--nc-sans) !important;
    cursor: pointer;
    box-sizing: border-box;
    transition: color .16s ease, border-color .16s ease, background .16s ease;
}
#left_bar_box .setUp_box .fontSizeBox span:hover,
#left_bar_box .setUp_box .pageWidthBox span:hover,
#left_bar_box .setUp_box .lineHeightBox span:hover {
    color: var(--nc-gold) !important;
    border-color: var(--nc-gold) !important;
}
#left_bar_box .setUp_box .fontSizeBox span.fontSize,
#left_bar_box .setUp_box .pageWidthBox span.pageWidthAc,
#left_bar_box .setUp_box .lineHeightBox span.lhActive {
    color: var(--nc-gold) !important;
    border-color: var(--nc-gold) !important;
    background: var(--nc-gold-soft) !important;
    font-weight: 600;
}
#left_bar_box .setUp_box .eyeBtn {
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    height: 38px !important;
    padding: 0 15px !important;
    border: 1px solid var(--nc-line-2);
    border-radius: 999px !important;
    background: var(--nc-surface-2);
    color: var(--nc-muted);
    font: 13px/1 var(--nc-sans);
    cursor: pointer;
    transition: color .16s ease, border-color .16s ease, background .16s ease;
}
#left_bar_box .setUp_box .eyeBtn .dot {
    width: 9px !important;
    height: 9px !important;
    border-radius: 50%;
    background: var(--nc-dim);
    box-shadow: 0 0 0 4px transparent;
    transition: background .16s ease, box-shadow .16s ease;
}
#left_bar_box .setUp_box .eyeBtn em { font-style: normal; }
#left_bar_box .setUp_box .eyeBtn.on {
    color: var(--nc-gold) !important;
    border-color: var(--nc-gold) !important;
    background: var(--nc-gold-soft) !important;
}
#left_bar_box .setUp_box .eyeBtn.on .dot {
    background: var(--nc-gold);
    box-shadow: 0 0 0 4px var(--nc-gold-soft);
}
#left_bar_box .setUp_box .setUp_txt {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--nc-muted) !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

/* ---------- 30.4 书架：状态卡片 ---------- */
#left_bar_box .shelf_box .nc-shelf-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.nc-shelf-book {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--nc-line);
    border-radius: 14px;
    background: var(--nc-bg-2);
}
.nc-shelf-cover {
    width: 84px;
    aspect-ratio: 3 / 4;
    border-radius: 9px;
    overflow: hidden;
    background: var(--nc-surface-2);
    box-shadow: var(--nc-shadow-sm);
}
.nc-shelf-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nc-shelf-cover svg {
    width: 100%;
    height: 100%;
    padding: 22px;
    fill: none;
    stroke: var(--nc-dim);
    stroke-width: 1.4;
}
.nc-shelf-info { min-width: 0; }
.nc-shelf-info h4 {
    margin: 0;
    color: var(--nc-text);
    font: 600 17px/1.4 var(--nc-serif);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nc-shelf-info p {
    margin: 6px 0 0;
    color: var(--nc-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.nc-shelf-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--nc-surface-2);
    color: var(--nc-muted);
    font-size: 11px;
    line-height: 1.4;
}
.nc-shelf-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--nc-dim);
    transition: background .16s ease;
}
#left_bar_box .shelf_box.is-on .nc-shelf-status {
    color: var(--nc-gold);
    background: var(--nc-gold-soft);
}
#left_bar_box .shelf_box.is-on .nc-shelf-status i { background: var(--nc-gold); }
.nc-shelf-actions { display: flex; flex-direction: column; gap: 10px; }
.nc-shelf-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 44px;
    border-radius: 12px !important;
    font: 600 14px/1 var(--nc-sans) !important;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}
.nc-shelf-btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}
.nc-shelf-btn.primary {
    border: 1px solid var(--nc-gold) !important;
    background: linear-gradient(135deg, var(--nc-gold-2), var(--nc-gold)) !important;
    color: #1a1206 !important;
}
.nc-shelf-btn.primary:hover { transform: translateY(-1px); }
.nc-shelf-btn.primary:disabled { opacity: .6; cursor: wait; transform: none; }
.nc-shelf-btn.ghost {
    border: 1px solid var(--nc-line-2) !important;
    background: transparent !important;
    color: var(--nc-text-2) !important;
}
.nc-shelf-btn.ghost:hover { color: var(--nc-gold) !important; border-color: var(--nc-gold) !important; }
#left_bar_box .shelf_box.is-on .nc-shelf-btn.primary .nc-shelf-ico { transform: rotate(45deg); }
.nc-shelf-ico { transition: transform .2s ease; }
.nc-shelf-note {
    margin: 0;
    padding: 0 2px;
    color: var(--nc-dim);
    font-size: 11.5px;
    line-height: 1.7;
}

/* ---------- 30.5 听书：播放器卡片化 ---------- */
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .listening_tooltip_title {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 10px !important;
    color: var(--nc-muted) !important;
    font: 600 12px/1.2 var(--nc-sans) !important;
    letter-spacing: .12em !important;
    text-transform: uppercase;
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-panel-close {
    position: static !important;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin: 0;
    border: 1px solid var(--nc-line-2);
    border-radius: 8px;
    color: var(--nc-muted);
    font-size: 16px;
    line-height: 1;
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-panel-close:hover {
    color: var(--nc-gold);
    border-color: var(--nc-gold);
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .listening_tooltip_main {
    padding: 0 18px 18px !important;
    max-height: calc(86vh - 52px) !important;
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-player {
    display: grid !important;
    grid-template-columns: 64px minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: center;
    padding: 4px 0 12px;
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-cover {
    width: 64px !important;
    height: 84px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: var(--nc-surface-2) !important;
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-player-info { min-width: 0; }
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-player-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
    white-space: normal !important;
    color: var(--nc-text) !important;
    font: 600 15px/1.45 var(--nc-serif) !important;
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-player-sub {
    margin-top: 5px !important;
    color: var(--nc-muted) !important;
    font-size: 11px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-progress-row { margin-top: 10px !important; }
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-time { font-size: 11px !important; }
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-controls {
    gap: 6px !important;
    margin: 10px 0 14px !important;
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-tbtn {
    height: 44px !important;
    border-radius: 10px !important;
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel #tts-play {
    width: 56px !important;
    height: 56px !important;
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-fields { gap: 12px !important; }
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-field select {
    height: 40px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-switch-row { min-height: 40px; }
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel .tts-end-row button {
    width: 100%;
    height: 40px;
    border-radius: 10px;
}
@media (min-width: 1081px) {
    body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel {
        width: min(390px, calc(100vw - 120px)) !important;
        border: 1px solid var(--nc-line) !important;
        border-radius: 18px !important;
        background: var(--nc-surface) !important;
        box-shadow: var(--nc-shadow) !important;
        padding: 0 !important;
    }
}

/* ---------- 30.6 响应式 ---------- */
@media (max-width: 1080px) and (min-width: 641px) {
    #left_bar_box .db_box,
    #left_bar_box .setUp_box,
    #left_bar_box .shelf_box {
        width: min(92vw, 640px) !important;
        max-height: 78vh !important;
    }
    #left_bar_box .db_box { height: min(78vh, 720px) !important; }
}
@media (max-width: 640px) {
    #left_bar_box .db_box,
    #left_bar_box .setUp_box,
    #left_bar_box .shelf_box {
        left: 12px !important;
        right: 12px !important;
        top: auto !important;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
        width: auto !important;
        max-height: 72vh !important;
        transform: none !important;
        border-radius: 18px !important;
    }
    #left_bar_box .db_box { height: 72vh !important; }
    #left_bar_box .setUp_box,
    #left_bar_box .shelf_box { height: auto !important; }
    #left_bar_box .db_box .nc-panel-head,
    #left_bar_box .setUp_box .nc-panel-head,
    #left_bar_box .shelf_box .nc-panel-head { padding: 18px 18px 13px !important; }
    .nc-panel-title { font-size: 19px; }
    .nc-panel-kicker { font-size: 9px; }
    #left_bar_box .db_box .nc-panel-toolbar { padding: 12px 16px 10px !important; }
    .nc-panel-search { height: 42px; }
    .nc-panel-search input { height: 40px; }
    #left_bar_box .db_box .directory_box { padding: 10px 12px 18px !important; }
    #left_bar_box .db_box .directory_list { grid-template-columns: 1fr !important; gap: 2px !important; }
    #left_bar_box .db_box .directory_list li div { height: 46px !important; }
    #left_bar_box .setUp_box .nc-set-grid { padding: 14px 16px 20px !important; }
    .nc-set-group { grid-template-columns: 1fr !important; gap: 10px !important; padding: 12px 14px; }
    .nc-shelf-book { grid-template-columns: 70px minmax(0, 1fr); gap: 14px; padding: 14px; }
    .nc-shelf-cover { width: 70px; }
    #left_bar_box .shelf_box .nc-shelf-body { padding: 16px 16px 20px; }
}
@media (max-width: 380px) {
    .nc-panel-filter-tip { display: none; }
    .nc-set-label em { display: none; }
}

/* ---------- 30.7 面板定位与听书背景修正 ---------- */
#left_bar_box .shelf_box { z-index: 100300 !important; }
@media (min-width: 641px) {
    #left_bar_box .shelf_box {
        position: fixed !important;
        left: 84px !important;
        right: auto !important;
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        margin: 0 !important;
    }
}
body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel {
    background: var(--nc-surface) !important;
    border: 1px solid var(--nc-line) !important;
}
.nc-shelf-info h4 {
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal !important;
    overflow: hidden;
}


/* 侧栏按钮不使用 backdrop-filter：它会为 fixed 子元素创建包含块，导致听书面板被压成窄条 */
#left_bar_box .left_bar > a,
#right_bar_box .right_bar > a {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    transform: none !important;
    filter: none !important;
    perspective: none !important;
}


/* ---------- 30.8 移动端细节 ---------- */
@media (max-width: 1080px) {
    body #left_bar_box .left_bar .listening.open .listening_tooltip.tts-panel,
    body #left_bar_box .left_bar .listening .listening_tooltip.tts-panel {
        max-height: 72vh !important;
    }
}
@media (max-width: 640px) {
    #left_bar_box .setUp_box .fontSizeBox {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }
    #left_bar_box .setUp_box .fontSizeBox span {
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 6px !important;
    }
}

@media (max-width: 640px) {
    #left_bar_box .setUp_box { max-height: 78vh !important; }
}

@media (max-width: 640px) {
    #left_bar_box .setUp_box .nc-set-grid {
        gap: 10px !important;
        padding: 14px 16px 18px !important;
    }
    #left_bar_box .setUp_box .nc-set-group {
        padding: 10px 14px !important;
        gap: 10px !important;
    }
    #left_bar_box .setUp_box .nc-set-label em { display: none !important; }
    #left_bar_box .setUp_box .fontSizeBox span,
    #left_bar_box .setUp_box .pageWidthBox span,
    #left_bar_box .setUp_box .lineHeightBox span { height: 36px !important; }
    #left_bar_box .setUp_box .eyecare_box .eyeBtn { height: 36px !important; }
}

@media (max-width: 640px) {
    #left_bar_box .setUp_box { max-height: 84vh !important; }
}

/* ============================================================
   §31 阅读主题色：恢复六套可辨识的纸张/夜色主题
   ------------------------------------------------------------
   历史问题：legacy read.css 里 .brown/.green/.pink/.blue/.gray/.black
   全部指向同一组 --nc-surface 变量，点哪个都一个颜色，
   所以设置面板的“阅读主题”看起来无效。
   这里按主题定义独立变量，并作用到阅读卡片、标题、正文、翻页键。
   深色阅读器使用“暗色纸张”方案，避免整页突然变白。
   ============================================================ */

body#content.brown {
    --nc-paper-page: #0c0906;
    --nc-paper-card: #221910;
    --nc-paper-card-2: #2a1f14;
    --nc-paper-text: #eadbc7;
    --nc-paper-muted: #b6a38b;
    --nc-paper-line: rgba(201, 138, 94, .28);
    --nc-paper-accent: #d99a6c;
}
body#content.green {
    --nc-paper-page: #070d09;
    --nc-paper-card: #112017;
    --nc-paper-card-2: #16291d;
    --nc-paper-text: #d9e8dc;
    --nc-paper-muted: #9db5a3;
    --nc-paper-line: rgba(87, 160, 94, .30);
    --nc-paper-accent: #6fbd77;
}
body#content.pink {
    --nc-paper-page: #0e070b;
    --nc-paper-card: #24131b;
    --nc-paper-card-2: #2c1821;
    --nc-paper-text: #eedbe4;
    --nc-paper-muted: #c1a2b0;
    --nc-paper-line: rgba(224, 139, 176, .28);
    --nc-paper-accent: #e79cbb;
}
body#content.blue {
    --nc-paper-page: #060b12;
    --nc-paper-card: #0f1c2b;
    --nc-paper-card-2: #142435;
    --nc-paper-text: #d7e5f4;
    --nc-paper-muted: #9db4ca;
    --nc-paper-line: rgba(90, 159, 212, .32);
    --nc-paper-accent: #6fb3e6;
}
body#content.gray {
    --nc-paper-page: #0a0b0c;
    --nc-paper-card: #181b1f;
    --nc-paper-card-2: #1f2328;
    --nc-paper-text: #e3e5e8;
    --nc-paper-muted: #a8adb5;
    --nc-paper-line: rgba(154, 166, 178, .26);
    --nc-paper-accent: #b6c0ca;
}
body#content.black {
    --nc-paper-page: #050506;
    --nc-paper-card: #0b0c0e;
    --nc-paper-card-2: #111316;
    --nc-paper-text: #e0ded9;
    --nc-paper-muted: #8b877f;
    --nc-paper-line: rgba(255, 255, 255, .09);
    --nc-paper-accent: #e2b26d;
}

/* 整页底色（阅读页外层） */
body#content:is(.brown, .green, .pink, .blue, .gray, .black) {
    background: var(--nc-paper-page) !important;
    background-image: none !important;
}

/* 阅读主卡片 */
body#content:is(.brown, .green, .pink, .blue, .gray, .black) .con_box:not(.nc-eyecare),
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) {
    background: var(--nc-paper-card) !important;
    border-color: var(--nc-paper-line) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .30);
}

/* 卡片内的标题区 / 正文区 / 翻页区 */
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .book_title_box,
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .read_details_box {
    background: var(--nc-paper-card-2) !important;
    border-color: var(--nc-paper-line) !important;
}
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .paging_box {
    background: transparent !important;
    border-color: var(--nc-paper-line) !important;
}
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .chapter {
    border-bottom-color: var(--nc-paper-line) !important;
}

/* 正文与标题文字 */
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) #chapter_content,
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .content,
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .content p,
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .chapter h1,
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .book_title_box h4 {
    color: var(--nc-paper-text) !important;
}
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .chapter_details span,
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .book_details span,
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .book_details i,
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .copyright {
    color: var(--nc-paper-muted) !important;
    border-color: var(--nc-paper-line) !important;
}
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) #chapter_content a {
    color: var(--nc-paper-accent) !important;
}

/* 翻页键 */
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .paging_box a {
    color: var(--nc-paper-text) !important;
    border-color: var(--nc-paper-line) !important;
    background: var(--nc-paper-card-2) !important;
}
body#content:is(.brown, .green, .pink, .blue, .gray, .black) #Jcontent:not(.nc-eyecare) .paging_box a:hover {
    color: var(--nc-paper-accent) !important;
    border-color: var(--nc-paper-accent) !important;
}

/* ============================================================
   §32 手机/平板单条底部导航（≤1080px）
   ------------------------------------------------------------
   目录 / 进度 / 设置 / 听书 / 日间 / 评论 六等分；
   桌面端的新增项隐藏，原侧栏和功能保持不变。
   ============================================================ */
.nc-mobile-only { display: none !important; }
#left_bar_box .left_bar.nc-mobile-only,
#right_bar_box .right_bar.nc-mobile-only { display: none !important; }
.nc-nav-day .nc-sun-ico { display: none !important; }
body.nc-day .nc-nav-day .nc-moon-ico { display: none !important; }
body.nc-day .nc-nav-day .nc-sun-ico { display: block !important; }
#right_bar_box .right_bar > a.nc-nav-day > .nc-sun-ico { display: none !important; }
body.nc-day #right_bar_box .right_bar > a.nc-nav-day > .nc-moon-ico { display: none !important; }
body.nc-day #right_bar_box .right_bar > a.nc-nav-day > .nc-sun-ico { display: block !important; }

/* 进度面板 */
#left_bar_box .progress_box {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important;
    transform: translateX(-50%) !important;
    width: min(360px, calc(100vw - 24px)) !important;
    max-height: 70vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: var(--nc-surface) !important;
    border: 1px solid var(--nc-line) !important;
    border-radius: 18px !important;
    box-shadow: var(--nc-shadow) !important;
    z-index: 100300 !important;
    color: var(--nc-text) !important;
}
#left_bar_box .progress_box.hidden { display: none !important; }
#left_bar_box .progress_box:not(.hidden) {
    display: flex !important;
    flex-direction: column !important;
}
#left_bar_box .progress_box .nc-panel-head {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px 12px !important;
    border-bottom: 1px solid var(--nc-line);
}
#left_bar_box .progress_box .nc-panel-title { font-size: 19px; }
#left_bar_box .progress_box .nc-panel-close {
    flex: 0 0 auto;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border: 1px solid var(--nc-line-2);
    border-radius: 9px;
    background: var(--nc-surface-2);
    color: var(--nc-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
#left_bar_box .progress_box .nc-panel-close:hover {
    color: var(--nc-gold);
    border-color: var(--nc-gold);
}
.nc-progress-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px 20px;
}
.nc-progress-value {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    color: var(--nc-muted);
    font-size: 12px;
}
.nc-progress-value b {
    color: var(--nc-gold);
    font: 600 20px/1 var(--nc-serif);
}
#ncProgressRange {
    width: 100%;
    height: 4px;
    accent-color: var(--nc-gold);
    cursor: pointer;
}
.nc-progress-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.nc-progress-actions button {
    height: 38px;
    border: 1px solid var(--nc-line-2);
    border-radius: 10px;
    background: var(--nc-surface-2);
    color: var(--nc-text-2);
    font-size: 12px;
    cursor: pointer;
}
.nc-progress-actions button:hover {
    color: var(--nc-gold);
    border-color: var(--nc-gold);
}

@media (max-width: 1080px) {
    /* 一条通栏底栏：手机上满宽，平板上居中收窄 */
    #left_bar_box,
    #right_bar_box { --nc-nav-item-w: min(16.6667vw, 140px); }
    #left_bar_box {
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
        margin: 0 !important;
        padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
        display: block !important;
        flex-direction: column !important;
        gap: 0 !important;
        background: var(--nc-surface) !important;
        border: 0 !important;
        border-top: 1px solid var(--nc-line) !important;
        border-radius: 0 !important;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, .28) !important;
        z-index: 100200 !important;
        overflow: visible !important;
    }
    #right_bar_box {
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        background: none !important;
        border: 0 !important;
        box-shadow: none !important;
        z-index: 100201 !important;
        pointer-events: none !important;
        overflow: visible !important;
        border-top: 1px solid transparent !important;
    }
    #left_bar_box .left_bar,
    #right_bar_box .right_bar { display: contents !important; }
    #left_bar_box .left_bar.nc-mobile-only,
    #right_bar_box .right_bar.nc-mobile-only { display: contents !important; }

    #left_bar_box .left_bar > a,
    #left_bar_box .left_bar > a.listening,
    #left_bar_box .left_bar > a.listening.open,
    #right_bar_box .right_bar > a {
        position: absolute !important;
        top: 0 !important;
        left: calc(50% - 3 * var(--nc-nav-item-w) + var(--nc-nav-i, 0) * var(--nc-nav-item-w)) !important;
        width: var(--nc-nav-item-w) !important;
        height: 62px !important;
        margin: 0 !important;
        padding: 6px 2px 5px !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 4px !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        transform: none !important;
        color: var(--nc-muted) !important;
        font-size: 10.5px !important;
        line-height: 1 !important;
        overflow: visible !important;
        pointer-events: auto !important;
        -webkit-tap-highlight-color: transparent;
    }
    #left_bar_box .left_bar > a .nc-bar-ico,
    #right_bar_box .right_bar > a .nc-bar-ico {
        width: 20px !important;
        height: 20px !important;
        margin: 0 !important;
        flex: 0 0 auto;
    }
    #left_bar_box .left_bar > a > span,
    #right_bar_box .right_bar > a > span {
        display: block !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
        font-size: 10.5px !important;
        line-height: 1.05 !important;
        color: inherit !important;
    }

    /* 六项顺序 */
    #left_bar_box .directory_btn { --nc-nav-i: 0; }
    #left_bar_box .nc-nav-progress { --nc-nav-i: 1; }
    #left_bar_box .setUp_btn { --nc-nav-i: 2; }
    #left_bar_box .listening { --nc-nav-i: 3; }
    #right_bar_box .nc-nav-day { --nc-nav-i: 4; }
    #right_bar_box .comments_btn { --nc-nav-i: 5; }

    /* 书签/点赞/海报在手机底栏不出现 */
    #left_bar_box .left_bar > a.bookcase_btn,
    #right_bar_box .right_bar > a.like,
    #right_bar_box .right_bar > a.nc-poster-trigger,
    #right_bar_box .right_bar.right_qrcode { display: none !important; }

    /* 选中态 */
    #left_bar_box .left_bar.btn_on > a,
    #right_bar_box .right_bar.btn_on > a,
    #left_bar_box .left_bar > a.listening.open,
    body.nc-day .nc-nav-day { color: var(--nc-gold) !important; }

}

@media (max-width: 1080px) and (hover: hover) and (pointer: fine) {
    #left_bar_box .left_bar > a:hover,
    #right_bar_box .right_bar > a:hover { color: var(--nc-gold) !important; }
}

/* ============================================================
   §33 日间阅读模式（由手机底栏“日间”切换）
   ============================================================ */
body#content.nc-day #Jcontent:not(.nc-eyecare),
body#content.nc-day .con_box:not(.nc-eyecare) {
    background: #f7f0df !important;
    border-color: #e2d6ba !important;
    box-shadow: 0 24px 60px rgba(40, 32, 20, .18) !important;
}
body#content.nc-day #Jcontent:not(.nc-eyecare) .book_title_box,
body#content.nc-day #Jcontent:not(.nc-eyecare) .read_details_box {
    background: #fbf5e8 !important;
    border-color: #e7dcc2 !important;
}
body#content.nc-day #Jcontent:not(.nc-eyecare) .paging_box {
    background: transparent !important;
    border-color: #e0d4b8 !important;
}
body#content.nc-day #Jcontent:not(.nc-eyecare) .chapter {
    border-bottom-color: #e0d4b8 !important;
}
body#content.nc-day #Jcontent:not(.nc-eyecare) #chapter_content,
body#content.nc-day #Jcontent:not(.nc-eyecare) .content,
body#content.nc-day #Jcontent:not(.nc-eyecare) .content p,
body#content.nc-day #Jcontent:not(.nc-eyecare) .chapter h1,
body#content.nc-day #Jcontent:not(.nc-eyecare) .book_title_box h4 {
    color: #3f382c !important;
}
body#content.nc-day #Jcontent:not(.nc-eyecare) .chapter_details span,
body#content.nc-day #Jcontent:not(.nc-eyecare) .book_details span,
body#content.nc-day #Jcontent:not(.nc-eyecare) .book_details i,
body#content.nc-day #Jcontent:not(.nc-eyecare) .copyright {
    color: #7d6f58 !important;
    border-color: #d8ccae !important;
}
body#content.nc-day #Jcontent:not(.nc-eyecare) #chapter_content a {
    color: #a9714b !important;
}
body#content.nc-day #Jcontent:not(.nc-eyecare) .paging_box a {
    color: #5f5341 !important;
    border-color: #d8ccae !important;
    background: #fbf5e8 !important;
}
body#content.nc-day #Jcontent:not(.nc-eyecare) .paging_box a:hover {
    color: #3f382c !important;
    border-color: #b9a980 !important;
}
