/* ============================================================
   小说阅读 · 听书  /tools/novel
   极简阅读器 + 书架；阅读主题（data-theme）独立作用域，不污染站点主题。
   ============================================================ */
/* 在小说工具作用域内统一使用「阅读红」作为主强调色，使整体配色更聚焦、和谐 */
.nv-app { --nv-accent: #e8443a; --accent: #e8443a; max-width: 100%; }
.nv-app * { box-sizing: border-box; }
.nv-app button { font-family: inherit; cursor: pointer; }

/* ---------- 顶部栏 ---------- */
.nv-top {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px;
    background: var(--bg, #fff);
    border-bottom: 1px solid var(--border, #eee);
}
.nv-top-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nv-logo { font-size: 22px; }
.nv-titles { min-width: 0; }
.nv-titles h1 { font-size: 17px; font-weight: 800; margin: 0; line-height: 1.2; color: var(--text-primary); }
.nv-sub { font-size: 12px; margin: 2px 0 0; color: var(--text-secondary); }
.nv-top-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.nv-btn {
    border: 1px solid var(--border, #e3e3e3); background: var(--bg-secondary, #f5f5f5);
    color: var(--text-primary); border-radius: 9px; padding: 7px 12px; font-size: 13px; font-weight: 600;
    transition: .15s; white-space: nowrap;
}
.nv-btn:hover { border-color: var(--accent); color: var(--accent); }
.nv-btn-pri { background: var(--accent); border-color: var(--accent); color: #fff; }
.nv-btn-pri:hover { filter: brightness(1.05); color: #fff; }
.nv-btn-sm { padding: 5px 10px; font-size: 12px; }
.nv-btn-danger { color: #d83a3a; border-color: #f0c4c4; }
.nv-btn-danger:hover { background: #d83a3a; color: #fff; border-color: #d83a3a; }
.nv-iconbtn {
    border: none; background: transparent; color: var(--text-secondary);
    width: 34px; height: 34px; border-radius: 9px; font-size: 18px; line-height: 1; display: inline-flex;
    align-items: center; justify-content: center; transition: .15s;
}
.nv-iconbtn:hover { background: var(--bg-secondary, #f0f0f0); color: var(--text-primary); }
.nv-readonly { display: none; }
.nv-app[data-view="reader"] .nv-readonly { display: inline-flex; }
.nv-app[data-view="reader"] .nv-readonly.nv-btn-sm { display: inline-flex; }
/* 阅读时隐藏书架操作（导入 / 备份），精简顶栏 */
.nv-app[data-view="reader"] #nvImportBtn, .nv-app[data-view="reader"] #nvBackupBtn { display: none; }

/* ---------- 设计与可访问性增强 ---------- */
/* 键盘焦点可见，提升无障碍体验 */
.nv-app :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.nv-app .nv-top :focus-visible, .nv-app .nv-drawer-head :focus-visible { outline-offset: -2px; }
/* 顶部栏轻微分层，与内容拉开层次 */
.nv-top { box-shadow: 0 1px 0 rgba(0,0,0,.03); }
/* 抽屉 / 弹窗更强的纵深感 */
.nv-drawer { box-shadow: -18px 0 48px rgba(0,0,0,.16); border-left: 1px solid rgba(0,0,0,.04); }
.nv-mask { background: rgba(0,0,0,.5); }
.nv-modal { box-shadow: 0 24px 70px rgba(0,0,0,.22); }
.nv-empty-ic { opacity: .82; }
/* 触控元素的最小可点击尺寸，移动端更跟手 */
.nv-btn, .nv-iconbtn, .nv-tab, .nv-cat, .nv-shelf-tab { min-height: 34px; }
.nv-top-r .nv-btn, .nv-top-r .nv-iconbtn { min-height: 34px; }

/* ---------- 主体 ---------- */
.nv-main { padding: 18px 16px 60px; max-width: 1200px; margin: 0 auto; }
/* 电脑端满屏（保留左侧导航栏）：解除站点容器与工具内容容器的限宽，由左侧栏之外铺满 */
.page-novel-full .app { max-width: 100%; }
.page-novel-full .main-content { max-width: 100%; width: 100%; border-right: 0; }
.page-novel-full .nv-main { max-width: none; margin: 0; box-sizing: border-box; }
.page-novel-full .nv-note { max-width: none; margin: 18px 0 0; padding: 0 4px; }

/* ---------- 书架 ---------- */
.nv-shelf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.nv-shelf-head h2 { font-size: 18px; margin: 0; color: var(--text-primary); }
.nv-input {
    border: 1px solid var(--border, #e3e3e3); background: var(--bg); color: var(--text-primary);
    border-radius: 9px; padding: 8px 12px; font-size: 13px; outline: none; min-width: 0;
}
.nv-input:focus { border-color: var(--accent); }
.nv-shelf-head .nv-input { width: 240px; max-width: 50vw; }

.nv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.nv-book {
    border: 1px solid var(--border, #eee); border-radius: 14px; overflow: hidden; background: var(--bg);
    display: flex; flex-direction: column; transition: .18s; cursor: pointer; text-align: left; padding: 0;
}
.nv-book:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0,0,0,.12); border-color: var(--accent); }
.nv-book-cover {
    height: 120px; display: flex; align-items: flex-end; padding: 12px; color: #fff;
    font-size: 15px; font-weight: 800; text-shadow: 0 1px 4px rgba(0,0,0,.35); position: relative;
}
.nv-book-cover .nv-bm-badge {
    position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.45); color: #fff;
    font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 20px; text-shadow: none;
}
/* 自定义封面图：有图时给标题加底部渐变条保证可读 */
.nv-book-cover-img { background-color: #e7e7e7; }
.nv-book-cover-img .nv-book-cover-tx {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px;
    background: linear-gradient(180deg, transparent, rgba(0,0,0,.62));
}
.nv-list .nv-book-cover-img .nv-book-cover-tx { display: none; }
/* 编辑弹窗里的封面设置 */
.nv-cover-edit { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 6px; }
.nv-cover-edit .nv-f-label { font-size: 12px; color: var(--text-secondary); font-weight: 600; }
.nv-cover-row { display: flex; gap: 14px; align-items: center; }
.nv-cover-prev { width: 64px; height: 90px; border-radius: 10px; overflow: hidden; background: var(--bg-secondary, #eee); border: 1px solid var(--border-color, #e3e3e3); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.nv-cover-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nv-cover-ph { font-size: 11px; color: var(--text-secondary); padding: 4px; text-align: center; }
.nv-cover-acts { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.nv-cover-tip { font-size: 11px; color: var(--text-secondary); }
.nv-book-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.nv-book-title { font-size: 14px; font-weight: 800; color: var(--text-primary); line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.nv-book-author { font-size: 12px; color: var(--text-secondary); }
.nv-book-stat { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.nv-book-prog { height: 4px; border-radius: 4px; background: var(--bg-secondary, #eee); overflow: hidden; margin-top: 6px; }
.nv-book-prog > i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.nv-book-meta { font-size: 11px; color: var(--text-secondary); display: flex; justify-content: space-between; margin-top: 4px; }
.nv-book-del {
    border: none; background: transparent; color: var(--text-secondary); font-size: 12px; padding: 2px 4px;
    border-radius: 6px;
}
.nv-book-del:hover { color: #d83a3a; background: #fbeaea; }
.nv-book-edit {
    border: 1px solid var(--accent, #136ce9); background: transparent; color: var(--accent, #136ce9);
    font-size: 12px; padding: 2px 10px; border-radius: 999px; cursor: pointer;
}
.nv-book-edit:hover { background: var(--accent, #136ce9); color: #fff; }
.nv-book-acts { display: flex; align-items: center; justify-content: space-between; gap: 6px; }

/* 视图切换（网格 / 列表） */
.nv-viewtoggle { display: inline-flex; border: 1px solid var(--border, #e3e3e3); border-radius: 999px; overflow: hidden; flex: 0 0 auto; }
.nv-vbtn { appearance: none; border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1; padding: 6px 11px; color: var(--text-secondary); display: flex; align-items: center; }
.nv-vbtn + .nv-vbtn { border-left: 1px solid var(--border, #e3e3e3); }
.nv-vbtn:hover { color: var(--accent); }
.nv-vbtn.nv-vcur { background: var(--accent); color: #fff; }

/* 排序切换（时间 / 热度） */
.nv-sorttoggle { display: inline-flex; border: 1px solid var(--border, #e3e3e3); border-radius: 999px; overflow: hidden; flex: 0 0 auto; margin-left: 8px; }
.nv-sbtn { appearance: none; border: 0; background: transparent; cursor: pointer; font-size: 15px; line-height: 1; padding: 6px 11px; color: var(--text-secondary); display: flex; align-items: center; }
.nv-sbtn + .nv-sbtn { border-left: 1px solid var(--border, #e3e3e3); }
.nv-sbtn:hover { color: var(--accent); }
.nv-sbtn.nv-scur { background: var(--accent); color: #fff; }

/* 列表视图 */
.nv-grid.nv-list { display: flex; flex-direction: column; gap: 8px; }
.nv-list .nv-book { flex-direction: row; align-items: stretch; }
.nv-list .nv-book-cover { width: 54px; height: 72px; flex: 0 0 54px; padding: 0; font-size: 0; border-radius: 12px 0 0 12px; }
.nv-list .nv-book-cover-tx { display: none; }
.nv-list .nv-book-body { flex: 1; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding: 10px 14px; }
.nv-list .nv-book-title { flex: 0 1 30%; }
.nv-list .nv-book-author { flex: 0 0 auto; }
.nv-list .nv-book-prog { width: 90px; flex: 0 0 90px; margin: 0; }
.nv-list .nv-book-meta { flex: 1 1 auto; justify-content: flex-start; gap: 12px; }
.nv-list .nv-book-acts { margin-left: auto; }
.nv-list .nv-hist-ch { flex: 0 1 auto; }
.nv-list .nv-hist-meta { flex: 0 0 auto; }
.nv-list .nv-hist-continue { margin-left: auto; }

/* 网站设置 */
.nv-set-grp-col { flex-direction: column; align-items: flex-start; }
.nv-set-grp-row { flex-direction: row; align-items: center; gap: 8px; }
.nv-set-tip { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin: 0; }
.nv-seg { display: inline-flex; border: 1px solid var(--border, #e3e3e3); border-radius: 10px; overflow: hidden; }
.nv-seg-btn { appearance: none; border: 0; background: transparent; padding: 7px 18px; cursor: pointer; font: inherit; color: var(--text-secondary); }
.nv-seg-btn + .nv-seg-btn { border-left: 1px solid var(--border, #e3e3e3); }
.nv-seg-btn.nv-seg-cur { background: var(--accent); color: #fff; }

.nv-empty { text-align: center; padding: 60px 16px; color: var(--text-secondary); }
.nv-empty-ic { font-size: 48px; margin-bottom: 12px; }
.nv-empty h3 { font-size: 17px; color: var(--text-primary); margin: 0 0 6px; }
.nv-empty p { font-size: 13px; max-width: 460px; margin: 0 auto 18px; line-height: 1.6; }
.nv-empty-acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---------- 阅读器 ---------- */
.nv-reader {
    --nv-bg: #f7f6f3; --nv-fg: #262626; --nv-fg2: #8a8a8a; --nv-line: #e4e3df; --nv-accent: #e8443a;
    background: var(--nv-bg); border-radius: 16px; min-height: 70vh; position: relative; overflow: hidden;
    transition: background .25s, color .25s; box-shadow: 0 12px 44px rgba(0,0,0,.06);
}
/* 阅读进度条（顶部细线） */
.nv-progress { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--nv-accent, #e8443a);
    transform: scaleX(0); transform-origin: 0 50%; z-index: 6; transition: transform .12s linear; }
.nv-reader[data-theme="cream"] { --nv-bg: #efe2c4; --nv-fg: #4a3c25; --nv-fg2: #9a875f; --nv-line: #ddcca6; }
.nv-reader[data-theme="green"] { --nv-bg: #c9e6c9; --nv-fg: #28412c; --nv-fg2: #6f9072; --nv-line: #b3d6b3; }
.nv-reader[data-theme="dark"]  { --nv-bg: #121316; --nv-fg: #b7bcc6; --nv-fg2: #6b7180; --nv-line: #2a2c33; }
/* 亮度遮罩（不拦截点击） */
.nv-reader::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; background: #000;
    opacity: calc((100 - var(--nv-bright, 100)) / 100 * 0.6); z-index: 5; transition: opacity .2s;
}
.nv-chapter {
    --nv-fs: 18px; --nv-lh: 1.9; --nv-para: 0.8em; --nv-w: 40em; --nv-ff: serif;
    max-width: var(--nv-w); margin: 0 auto; padding: 44px 28px 36px; position: relative; z-index: 2;
    color: var(--nv-fg); font-family: var(--nv-ff); font-size: var(--nv-fs); line-height: var(--nv-lh);
    text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    word-break: break-word; overflow-wrap: anywhere;
}
.nv-chapter .nv-ch-title { font-size: 1.25em; font-weight: 800; text-align: center; margin: 0 0 1.6em; line-height: 1.45; letter-spacing: .01em; }
.nv-chapter p { margin: 0 0 var(--nv-para); text-indent: 2em; text-align: justify; position: relative; cursor: text; }
.nv-chapter p.nv-no-indent { text-indent: 0; }
/* 悬停正文段落：提示「从此处朗读」（点击该段即从该行开始听书） */
.nv-chapter p:hover::after {
  content: '从此处朗读';
  position: absolute; right: 0.2em; top: -1.5em;
  font-size: 0.7em; line-height: 1; color: var(--accent);
  background: var(--bg-primary, #fff); border: 1px solid var(--accent);
  border-radius: 6px; padding: 2px 7px; white-space: nowrap;
  opacity: .92; pointer-events: none; z-index: 3;
}
.nv-chapter .nv-seg { border-radius: 4px; transition: background .1s; padding: 0 1px; }
.nv-chapter .nv-seg.nv-speak { background: color-mix(in srgb, var(--nv-fg) 22%, transparent); }
.nv-chapter .nv-seg.nv-searched { background: #ffe08a; color: #3a2c00; }
.nv-chapter .nv-seg.nv-search-cur { background: #ffb02e; color: #3a2c00; }
.nv-readfoot {
    position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    max-width: var(--nv-w); margin: 0 auto; padding: 8px 22px 26px;
}
.nv-readfoot .nv-btn { background: color-mix(in srgb, var(--nv-bg) 80%, var(--nv-fg) 6%); border-color: var(--nv-line); color: var(--nv-fg); }
.nv-readfoot .nv-btn:hover { border-color: var(--nv-fg); color: var(--nv-fg); }
.nv-chinfo { color: var(--nv-fg2); font-size: 12px; }

/* ---------- 听书控制条 ---------- */
.nv-ttsbar {
    position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 40;
    width: min(720px, calc(100vw - 24px));
    display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    background: var(--bg, #fff); border: 1px solid var(--border, #e3e3e3); border-radius: 16px;
    box-shadow: 0 12px 34px rgba(0,0,0,.18);
}
.nv-tts-play, .nv-tts-stop { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; border: none; font-size: 16px; }
.nv-tts-play { background: var(--accent); color: #fff; }
.nv-tts-stop { background: var(--bg-secondary, #f0f0f0); color: var(--text-primary); font-size: 14px; }
.nv-tts-chnav { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; border: none; font-size: 14px; background: var(--bg-secondary, #f0f0f0); color: var(--text-primary); }
.nv-tts-chnav:hover { background: var(--border, #e3e3e3); }
.nv-tts-chnav[disabled] { opacity: .4; cursor: not-allowed; }
.nv-tts-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.nv-tts-ch { font-size: 12px; color: var(--text-secondary); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-tts-ctrls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nv-tts-ctrls label { font-size: 11px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.nv-tts-ctrls select { max-width: 150px; }
.nv-tts-ctrls input[type=range] { width: 90px; }
.nv-tts-cont { font-size: 11px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; cursor: pointer; user-select: none; }
.nv-tts-cont input { width: auto; }

/* ---------- 抽屉 ---------- */
.nv-drawer {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(360px, 86vw); z-index: 50;
    background: var(--bg, #fff); border-left: 1px solid var(--border, #eee);
    display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s;
    box-shadow: -12px 0 34px rgba(0,0,0,.12);
}
.nv-drawer.nv-open { transform: translateX(0); }
.nv-drawer-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border, #eee); }
.nv-drawer-h h3 { margin: 0; font-size: 16px; color: var(--text-primary); }
.nv-drawer-tools { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border, #eee); }
.nv-drawer-tools .nv-input { flex: 1; }
.nv-drawer-meta { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.nv-drawer-list { flex: 1; overflow: auto; padding: 8px; }
.nv-toc-item, .nv-bm-item {
    display: block; width: 100%; text-align: left; border: none; background: transparent; color: var(--text-primary);
    padding: 10px 12px; border-radius: 9px; font-size: 13.5px; transition: .12s;
}
.nv-toc-item { position: relative; }
.nv-toc-item:hover, .nv-bm-item:hover { background: var(--bg-secondary, #f3f3f3); }
.nv-toc-item.nv-cur { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 700; }
/* 已读章节：颜色变淡（与未读区分），并标注「已读」；当前章仍按 nv-cur 高亮 */
.nv-toc-item.nv-read:not(.nv-cur) { color: var(--text-secondary); padding-right: 52px; }
.nv-toc-read {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    font-size: 11px; line-height: 1.4; color: var(--text-secondary);
    border: 1px solid currentColor; border-radius: 6px; padding: 1px 6px;
}
.nv-bm-item { display: flex; flex-direction: column; gap: 2px; }
.nv-bm-item .nv-bm-ch { font-weight: 700; }
.nv-bm-item .nv-bm-note { font-size: 12px; color: var(--text-secondary); }
.nv-bm-item .nv-bm-del { align-self: flex-end; font-size: 11px; color: #d83a3a; background: transparent; border: none; }

/* ---------- 设置 ---------- */
.nv-set-body { padding: 16px; display: flex; flex-direction: column; gap: 18px; overflow: auto; }
.nv-set-grp { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-primary); }
.nv-set-grp input[type=range] { width: 100%; }
.nv-set-label { font-weight: 700; }
.nv-themes { display: flex; gap: 8px; flex-wrap: wrap; }
.nv-theme {
    border: 2px solid var(--border, #ddd); background: #fff; border-radius: 10px; padding: 8px 12px; font-size: 12px; font-weight: 600;
}
.nv-theme[data-theme="default"] { background: #f3f3f1; color: #242424; }
.nv-theme[data-theme="cream"] { background: #efe2c4; color: #4a3c25; }
.nv-theme[data-theme="green"] { background: #c9e6c9; color: #28412c; }
.nv-theme[data-theme="dark"] { background: #121316; color: #b7bcc6; }
.nv-theme.nv-cur { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.nv-set-grp select { border: 1px solid var(--border, #e3e3e3); border-radius: 9px; padding: 8px; background: var(--bg); color: var(--text-primary); }

/* ---------- 弹窗 ---------- */
.nv-mask { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.nv-modal { background: var(--bg, #fff); border-radius: 16px; width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.nv-mhead { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border, #eee); }
.nv-mhead h3 { margin: 0; font-size: 16px; color: var(--text-primary); }
.nv-mbody { padding: 16px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.nv-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nv-f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-primary); }
.nv-f > span { font-weight: 600; }
.nv-f input[type=text], .nv-f textarea, .nv-f select, .nv-f input[type=file] {
    border: 1px solid var(--border, #e3e3e3); border-radius: 9px; padding: 9px 11px; font-size: 13px;
    background: var(--bg); color: var(--text-primary); font-family: inherit; outline: none; width: 100%;
}
.nv-f textarea { resize: vertical; }
.nv-f input:focus, .nv-f textarea:focus { border-color: var(--accent); }
.nv-f-check { flex-direction: row; align-items: center; gap: 8px; }
.nv-hint { font-size: 12px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.nv-mfoot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border, #eee); }

/* 投稿到书城：上传进度条 */
.nv-su-progress { display: flex; align-items: center; gap: 10px; margin: 2px 0 0; }
.nv-su-progress[hidden] { display: none; }
.nv-su-bar { flex: 1; height: 8px; background: var(--border, #eee); border-radius: 999px; overflow: hidden; }
.nv-su-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .2s ease; }
.nv-su-pct { font-size: 12px; color: var(--text-secondary); min-width: 72px; text-align: right; font-variant-numeric: tabular-nums; }
/* 解析阶段（无法获知精确百分比）用不确定进度动画 */
.nv-su-fill.nv-su-indet {
  width: 100% !important;
  background-color: var(--accent);
  background-image: linear-gradient(90deg, transparent 25%, rgba(255, 255, 255, .55) 50%, transparent 75%);
  background-size: 50% 100%;
  animation: nv-su-slide 1s linear infinite;
}
@keyframes nv-su-slide { 0% { background-position: 0 0; } 100% { background-position: 200% 0; } }

/* 投稿到书城：网络链接添加文件 */
.nv-su-url-row { display: flex; gap: 8px; align-items: stretch; }
.nv-su-url-input { flex: 1; border: 1px solid var(--border, #e3e3e3); border-radius: 9px; padding: 9px 11px; font-size: 13px; background: var(--bg); color: var(--text-primary); font-family: inherit; outline: none; }
.nv-su-url-input:focus { border-color: var(--accent); }
.nv-su-url-btn { flex: 0 0 auto; white-space: nowrap; }
.nv-su-url-name { display: block; font-size: 12px; color: var(--accent); margin-top: 6px; word-break: break-all; }
.nv-spacer { flex: 1; }
.nv-backup-acts { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 编辑小说 ---------- */
.nv-modal-wide { width: min(720px, 100%); }
.nv-edit-hint { font-size: 12px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.nv-edit-list { display: flex; flex-direction: column; gap: 14px; }
.nv-edit-row { border: 1px solid var(--border, #e3e3e3); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg-secondary, #fafafa); }
.nv-edit-row-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nv-edit-num { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.nv-edit-row-btns { display: flex; gap: 6px; }
.nv-edit-move, .nv-edit-del {
    border: 1px solid var(--border, #e3e3e3); background: var(--bg); color: var(--text-primary);
    border-radius: 8px; padding: 4px 9px; font-size: 12px; font-weight: 600; transition: .15s;
}
.nv-edit-move:hover { border-color: var(--accent); color: var(--accent); }
.nv-edit-del:hover { border-color: #d83a3a; color: #d83a3a; background: #fbeaea; }
.nv-edit-chtitle { border: 1px solid var(--border, #e3e3e3); border-radius: 9px; padding: 8px 11px; font-size: 13px; background: var(--bg); color: var(--text-primary); outline: none; width: 100%; font-weight: 700; }
.nv-edit-chtitle:focus, .nv-edit-chtext:focus { border-color: var(--accent); }
.nv-edit-chtext { border: 1px solid var(--border, #e3e3e3); border-radius: 9px; padding: 9px 11px; font-size: 13px; background: var(--bg); color: var(--text-primary); font-family: inherit; outline: none; width: 100%; resize: vertical; min-height: 90px; line-height: 1.7; }
.nv-btn-dashed { border: 1px dashed var(--border, #cfcfcf); background: transparent; color: var(--text-secondary); width: 100%; }
.nv-btn-dashed:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 搜索浮层 ---------- */
.nv-search { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 55; width: min(560px, 100vw);
    background: var(--bg, #fff); border-bottom: 1px solid var(--border, #eee); box-shadow: 0 10px 30px rgba(0,0,0,.14); }
.nv-search-bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.nv-search-bar .nv-input { flex: 1; }
.nv-search-count { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.nv-search-res { max-height: 46vh; overflow: auto; padding: 0 12px 12px; }
.nv-search-res .nv-sr-item { border: none; background: transparent; width: 100%; text-align: left; padding: 10px; border-radius: 9px; color: var(--text-primary); }
.nv-search-res .nv-sr-item:hover { background: var(--bg-secondary, #f3f3f3); }
.nv-search-res .nv-sr-ch { font-size: 12px; color: var(--accent); font-weight: 700; }
.nv-search-res .nv-sr-txt { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nv-search-res mark { background: #ffd95e; color: #3a2c00; border-radius: 3px; }

/* ---------- 遮罩 / 提示 ---------- */
.nv-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.001); }
.nv-toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 80;
    background: #222; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: 90vw;
}
.nv-note { max-width: 1200px; margin: 18px auto 0; font-size: 12px; color: var(--text-secondary); line-height: 1.7; padding: 0 4px; }

/* ---------- 平板 / 笔记本 ---------- */
@media (max-width: 1024px) {
    .nv-main { padding: 14px 12px 50px; }
    .nv-chapter { padding: 40px 24px 32px; }
    .nv-reader { box-shadow: none; }
}
@media (max-width: 820px) {
    .nv-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
    .nv-reader { border-radius: 14px; }
}

/* ---------- 手机端沉浸式阅读 ---------- */
@media (max-width: 600px) {
    .nv-main { padding: 0 0 64px; }
    .nv-shelf { padding: 14px 14px 0; }
    .nv-shelf-head { flex-wrap: wrap; gap: 10px; }
    .nv-shelf-head h2 { font-size: 16px; flex: 1 1 auto; }
    .nv-shelf-head .nv-input { flex: 1 1 100%; max-width: none; order: 3; }
    .nv-viewtoggle, .nv-sorttoggle { margin-left: 0; }
    .nv-reader { border-radius: 0; min-height: auto; }
    .nv-chapter { --nv-fs: 17px; --nv-lh: 1.85; padding: 22px 18px 28px; }
    .nv-chapter .nv-ch-title { font-size: 1.22em; }
    .nv-readfoot { padding: 12px 14px 22px; }
    .nv-top { padding: 9px 12px; gap: 8px; }
    .nv-top-r .nv-btn, .nv-top-r .nv-btn-pri { padding: 6px 10px; font-size: 12px; }
    .nv-top-l { gap: 8px; }
    .nv-sub { display: none; }
    .nv-logo { font-size: 21px; }
    .nv-top-r { row-gap: 6px; }
    .nv-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 12px; }
    .nv-book-cover { height: 104px; font-size: 14px; }
    .nv-ttsbar { width: calc(100vw - 12px); bottom: 12px; padding: 9px 10px; }
    .nv-tts-mid { gap: 4px; }
    .nv-tts-ctrls { gap: 8px 14px; flex-wrap: wrap; }
    .nv-tts-ctrls label { flex: 0 0 auto; white-space: nowrap; }
    .nv-tts-ctrls input[type=range] { width: 90px; }
    .nv-edit-chtext { min-height: 80px; }
    .nv-note { padding: 14px 12px; font-size: 11px; }
    .nv-mask { padding: 8px; }
    .nv-modal { max-height: 94vh; }
    .nv-list .nv-book-title { flex-basis: 100%; }
    .nv-list .nv-book-prog { width: 100%; flex-basis: 100%; }
    .nv-list .nv-book-acts { margin-left: 0; width: 100%; justify-content: flex-end; }
    .nv-list .nv-book-body { gap: 4px 12px; }
}

/* ---------- 极窄屏 ---------- */
@media (max-width: 380px) {
    .nv-chapter { padding: 18px 14px 24px; --nv-fs: 16px; }
    .nv-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
    .nv-book-cover { height: 96px; }
}

/* ---------- 桌面端增强（≥1025px） ---------- */
@media (min-width: 1025px) {
    .nv-grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 18px; }
    .nv-chapter { padding: 52px 36px 44px; }
    .nv-shelf-head h2 { font-size: 19px; }
    .nv-shelf-head .nv-input { width: 260px; }
    .nv-top { padding: 11px 18px; }
}

/* ================= 书城（共享书架） ================= */
.nv-shelf-tabs {
    display: flex; gap: 8px; margin: 4px 2px 16px; flex-wrap: wrap;
}
.nv-tab {
    appearance: none; border: 0; background: transparent; cursor: pointer;
    font: inherit; font-size: 15px; font-weight: 600; color: var(--text-secondary);
    padding: 8px 14px; border-radius: 999px; transition: background .15s, color .15s;
}
.nv-tab:hover { background: var(--bg-secondary); }
.nv-tab-cur { color: #fff; background: var(--accent); }

.nv-store-acts { display: flex; gap: 8px; align-items: center; }
.nv-store-acts .nv-input { flex: 1; min-width: 120px; }
.nv-store-note { font-size: 12px; color: var(--text-secondary); margin: 0 2px 10px; }

.nv-store-mine {
    border: 1px solid var(--border-color); border-radius: 12px; padding: 12px 14px;
    margin: 0 2px 16px; background: var(--bg-secondary);
}
.nv-store-mine-h { font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.nv-store-mine-item {
    display: flex; align-items: center; gap: 10px; padding: 7px 0;
    border-top: 1px dashed var(--border-color);
}
.nv-store-mine-item:first-of-type { border-top: 0; }
.nv-store-mine-title { flex: 1; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-store-mine-badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.nv-smb-ok { color: #1a7f37; background: rgba(26,127,55,.12); }
.nv-smb-pd { color: #b5791f; background: rgba(181,121,31,.14); }
.nv-smb-no { color: #c33; background: rgba(204,51,51,.12); }
.nv-store-mine-del {
    appearance: none; border: 0; background: transparent; color: var(--text-secondary);
    cursor: pointer; font: inherit; font-size: 12px; padding: 3px 6px; border-radius: 6px;
}
.nv-store-mine-del:hover { color: #c33; background: rgba(204,51,51,.1); }
.nv-store-mine-reason { flex-basis: 100%; font-size: 11px; color: #c33; padding-left: 2px; }

.nv-book-stat { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }

.nv-store-pager {
    display: flex; align-items: center; justify-content: center; gap: 14px;
    margin: 18px 0 4px; padding-bottom: 8px;
}
.nv-pg { min-width: 92px; }
.nv-pg[disabled] { opacity: .45; cursor: not-allowed; }
.nv-pg-info { font-size: 13px; color: var(--text-secondary); }

.nv-modal-wide { max-width: 680px; }
.nv-store-review-list { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; }
.nv-review-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-secondary);
}
.nv-review-info { flex: 1; min-width: 0; }
.nv-review-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-review-meta { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }
.nv-review-acts { display: flex; gap: 8px; flex-shrink: 0; }

@media (max-width: 600px) {
    .nv-shelf-tabs { margin-bottom: 12px; }
    .nv-store-acts { flex-wrap: wrap; }
    .nv-store-acts .nv-input { flex-basis: 100%; order: 3; }
    .nv-review-item { flex-direction: column; align-items: stretch; }
    .nv-review-acts { justify-content: flex-end; }
}

/* ---------- 审核 / 举报 页签与举报列表 ---------- */
.nv-review-tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.nv-review-pane[hidden] { display: none; }
.nv-report-list { display: flex; flex-direction: column; gap: 12px; max-height: 58vh; overflow: auto; }
.nv-report-item {
    display: flex; flex-direction: column; gap: 8px; padding: 14px 16px;
    border: 1px solid var(--border-color); border-radius: 12px; background: var(--bg-secondary);
}
.nv-report-done { opacity: .62; }
.nv-report-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.nv-report-book { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-report-status { font-size: 12px; padding: 2px 10px; border-radius: 999px; flex-shrink: 0; }
.nv-report-pending { color: #b21f1f; background: rgba(178,31,31,.1); }
.nv-report-handled { color: var(--text-secondary); background: var(--bg-primary); }
.nv-report-meta { font-size: 12px; color: var(--text-secondary); }
.nv-report-reason { font-size: 14px; }
.nv-report-detail {
    font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word;
    background: var(--bg-primary); border-radius: 8px; padding: 10px 12px;
}
.nv-report-empty { color: var(--text-secondary); font-style: italic; }
.nv-report-acts { display: flex; gap: 8px; flex-shrink: 0; justify-content: flex-end; }

/* ---------- 书城卡片：详情按钮 ---------- */
.nv-book-detail {
    border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary);
    font-size: 12px; padding: 2px 10px; border-radius: 999px; cursor: pointer;
}
.nv-book-detail:hover { border-color: var(--accent, #136ce9); color: var(--accent, #136ce9); }

/* ---------- 书籍详情弹窗 ---------- */
.nv-dt-head { display: flex; gap: 16px; align-items: flex-start; }
.nv-dt-cover {
    flex: 0 0 92px; width: 92px; height: 124px; border-radius: 10px; color: #fff;
    display: flex; align-items: center; justify-content: center; text-align: center;
    font-size: 14px; font-weight: 700; padding: 8px; line-height: 1.3; box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.nv-dt-info { flex: 1; min-width: 0; }
.nv-dt-title { font-size: 19px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.nv-dt-author { font-size: 14px; color: var(--accent, #136ce9); margin-bottom: 8px; }
.nv-dt-row { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.nv-dt-rating { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 16px 0 6px; }
.nv-stars { display: inline-flex; gap: 4px; }
.nv-star {
    border: none; background: transparent; cursor: default; font-size: 26px; line-height: 1;
    color: var(--border-color); padding: 0; transition: color .12s, transform .12s;
}
.nv-star.nv-star-on { color: #f5a623; }
.nv-star.nv-star-act { cursor: pointer; }
.nv-star.nv-star-act:hover { transform: scale(1.15); }
.nv-dt-rating-txt { font-size: 13px; color: var(--text-secondary); }
.nv-dt-acts { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 18px; }
.nv-dt-cmt-h { font-size: 15px; font-weight: 600; color: var(--text-primary); border-top: 1px solid var(--border-color); padding-top: 14px; }
.nv-dt-cmt { display: flex; flex-direction: column; gap: 12px; }
.nv-cmt { border-bottom: 1px solid var(--border-color); padding-bottom: 12px; }
.nv-cmt-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.nv-cmt-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.nv-cmt-time { font-size: 12px; color: var(--text-secondary); }
.nv-cmt-del { margin-left: auto; border: none; background: transparent; color: var(--text-secondary); font-size: 12px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.nv-cmt-del:hover { color: #d83a3a; background: #fbeaea; }
.nv-cmt-text { font-size: 14px; color: var(--text-primary); line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.nv-cmt-pager { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-secondary); }
.nv-cmt-pager .nv-btn { min-width: 40px; padding: 6px 10px; }
.nv-cmt-form { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.nv-cmt-form textarea { width: 100%; border: 1px solid var(--border-color); border-radius: 10px; padding: 10px; font: inherit; resize: vertical; background: var(--bg-secondary); color: var(--text-primary); }
.nv-cmt-form .nv-btn { align-self: flex-end; }

/* 评论排序栏 */
.nv-dt-cmt-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--border-color); padding-top: 14px; }
.nv-cmt-sort { display: inline-flex; gap: 6px; }
.nv-cmt-sort-btn { border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-secondary); font-size: 12px; padding: 5px 12px; border-radius: 999px; cursor: pointer; transition: all .15s; }
.nv-cmt-sort-btn:hover { color: var(--text-primary); border-color: var(--accent); }
.nv-cmt-sort-btn.nv-on { color: #fff; background: var(--accent); border-color: var(--accent); }

/* 已加书架状态 */
.nv-btn.nv-shelf-on { color: #1a9d5a; border-color: #1a9d5a; background: rgba(26,157,90,.10); }

/* 评论点赞 / 回复 */
.nv-cmt-like, .nv-cmt-reply { margin-left: 4px; border: none; background: transparent; color: var(--text-secondary); font-size: 12px; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.nv-cmt-like:hover, .nv-cmt-reply:hover { color: var(--accent); background: rgba(127,127,127,.10); }
.nv-cmt-like.nv-liked { color: #e8553a; }
.nv-cmt-like.nv-liked:hover { background: rgba(232,85,58,.10); }
.nv-cmt-replies { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--border-color); display: flex; flex-direction: column; gap: 10px; }
.nv-cmt-reply-form { display: flex; gap: 8px; margin-top: 10px; }
.nv-cmt-reply-form textarea { flex: 1; border: 1px solid var(--border-color); border-radius: 10px; padding: 8px; font: inherit; resize: vertical; background: var(--bg-secondary); color: var(--text-primary); }
.nv-cmt-reply-form .nv-btn { align-self: flex-end; white-space: nowrap; }

@media (max-width: 600px) {
    .nv-dt-head { gap: 12px; }
    .nv-dt-cover { flex-basis: 72px; width: 72px; height: 98px; font-size: 12px; }
    .nv-dt-title { font-size: 17px; }
    .nv-dt-acts .nv-btn { flex: 1 1 40%; }
}

/* ---------- 阅读历史（参考番茄小说） ---------- */
.nv-hist-sub { font-size: 12.5px; margin: 4px 0 0; color: var(--text-secondary); }
.nv-hist-group { margin-bottom: 18px; }
.nv-hist-group-title {
    font-size: 13px; font-weight: 700; color: var(--text-secondary);
    margin: 6px 0 10px; padding-left: 10px; border-left: 3px solid var(--accent);
}
.nv-hist-group-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.nv-hist-book .nv-book-body { padding: 9px 10px 11px; }
.nv-hist-book .nv-book-title { font-size: 14px; line-height: 1.3; }
.nv-hist-ch {
    font-size: 12px; color: var(--text-secondary); margin: 4px 0 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nv-hist-meta { font-size: 11.5px; color: var(--text-secondary); margin-top: 4px; }
.nv-hist-continue { width: 100%; margin-top: 9px; padding: 7px 10px; font-size: 13px; }
.nv-hist-book .nv-book-prog { margin-top: 5px; }
@media (max-width: 600px) {
    .nv-hist-group-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
}

/* ================= 书城分类筛选 ================= */
.nv-cats {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 0 2px 12px;
}
.nv-cats[hidden] { display: none; }
.nv-cat {
    appearance: none; cursor: pointer; font: inherit; font-size: 12.5px;
    border: 1px solid var(--border-color, #e3e3e3); background: transparent;
    color: var(--text-secondary); padding: 5px 12px; border-radius: 999px;
    display: inline-flex; align-items: center; gap: 6px; transition: .15s;
}
.nv-cat:hover { border-color: var(--accent, #136ce9); color: var(--accent, #136ce9); }
.nv-cat > span { font-size: 11px; opacity: .75; }
.nv-cat-on {
    background: var(--accent, #136ce9); border-color: var(--accent, #136ce9); color: #fff;
}
.nv-cat-on > span { opacity: .85; }

/* ---------- 书城卡片：分类标签 / 状态角标 / 管理按钮 ---------- */
.nv-book-cat {
    align-self: flex-start; font-size: 11px; color: var(--accent, #136ce9);
    background: color-mix(in srgb, var(--accent, #136ce9) 10%, transparent);
    padding: 1px 8px; border-radius: 999px; margin-top: 2px;
}
.nv-book-badge {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; text-shadow: none;
    background: rgba(0, 0, 0, .55); color: #fff;
}
.nv-book-badge.nv-bb-approved { background: #1a9c62; }
.nv-book-badge.nv-bb-offline { background: #8a8f98; }
.nv-book-badge.nv-bb-pending { background: #d98a0b; }
.nv-book-badge.nv-bb-rejected { background: #c33; }
.nv-book-admin {
    border: 1px solid var(--border-color); background: transparent; color: var(--text-secondary);
    font-size: 12px; padding: 2px 10px; border-radius: 999px; cursor: pointer;
}
.nv-book-admin:hover { border-color: #c33; color: #c33; background: rgba(204, 51, 51, .08); }
/* 卡片操作行：按钮变多（详情/编辑/管理）时允许换行，避免窄卡片被 .nv-book 的 overflow:hidden 裁掉 */
.nv-book-acts { flex-wrap: wrap; row-gap: 6px; }

/* ---------- 管理员：书籍管理弹窗 ---------- */
.nv-admin-row {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.nv-admin-label { font-size: 12.5px; color: var(--text-secondary); min-width: 56px; }
.nv-admin-tip { font-size: 12px; color: var(--text-secondary); }
@media (max-width: 600px) {
    .nv-admin-row { gap: 6px; }
    .nv-admin-label { flex-basis: 100%; }
}

/* ================= 编辑小说弹窗：按需加载（长篇不卡顿） ================= */
.nv-edit-bar {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    flex-wrap: wrap; margin: 10px 0 8px;
}
.nv-edit-count { font-size: 12.5px; font-weight: 700; color: var(--text-secondary); }
.nv-edit-tip { font-size: 11.5px; color: var(--text-secondary); opacity: .85; }

.nv-edit-pager {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
    gap: 10px; margin: 12px 0 4px;
}
.nv-edit-pager[hidden] { display: none; }
.nv-edit-jump { font-size: 12px; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 5px; }
.nv-edit-jump-input {
    width: 52px; height: 30px; text-align: center; font-size: 13px;
    border: 1px solid var(--border-color, #ddd); border-radius: 8px;
    background: var(--bg); color: var(--text-primary);
    -moz-appearance: textfield; appearance: textfield;
}
.nv-edit-jump-input::-webkit-outer-spin-button,
.nv-edit-jump-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.nv-edit-jump-input:focus { outline: none; border-color: var(--accent, #136ce9); }
.nv-edit-jump-btn { height: 30px; padding: 0 12px; font-size: 12.5px; line-height: 1; margin-left: 2px; }

/* 章节行：打开正文的按钮 */
.nv-edit-open {
    align-self: flex-start; margin-top: 2px; font-size: 12px; padding: 3px 10px;
    border: 1px solid var(--accent, #136ce9); background: transparent; color: var(--accent, #136ce9);
    border-radius: 999px; cursor: pointer;
}
.nv-edit-open:hover { background: var(--accent, #136ce9); color: #fff; }

/* 单章正文编辑器（复用同一个 textarea） */
.nv-edit-body {
    margin-top: 12px; padding: 12px; border: 1px solid var(--border-color);
    border-radius: 12px; background: var(--bg-secondary);
}
.nv-edit-body[hidden] { display: none; }
.nv-edit-body-h {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--text-primary);
}
.nv-edit-body .nv-edit-chtext { min-height: 220px; }
.nv-edit-body-f { display: flex; justify-content: flex-end; margin-top: 8px; }
@media (max-width: 600px) {
    .nv-edit-tip { flex-basis: 100%; }
    .nv-edit-body .nv-edit-chtext { min-height: 160px; }
}

/* ================= 目录：正序 / 倒序切换 ================= */
.nv-toc-order {
    flex: 0 0 auto; padding: 4px 10px; font-size: 12px; line-height: 1.4;
    white-space: nowrap;
}

/* ================= 听书播放器：当前朗读文本 + 极简关闭按钮 ================= */
.nv-tts-textrow { min-width: 0; }
.nv-tts-text {
    display: block; font-size: 12.5px; line-height: 1.5; color: var(--text-primary);
    opacity: .9; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 作者样式会覆盖 UA 的 [hidden]，必须显式声明 */
.nv-tts-text[hidden] { display: none; }
.nv-tts-textrow[hidden] { display: none; }
.nv-tts-close {
    appearance: none; border: 0; background: transparent; cursor: pointer;
    color: var(--text-secondary); font-size: 15px; line-height: 1; padding: 6px 8px;
    border-radius: 8px; flex: 0 0 auto; transition: .15s;
}
.nv-tts-close:hover { color: #c33; background: rgba(204, 51, 51, .1); }

/* ================= 我的投稿：极简折叠 / 展开 ================= */
.nv-store-mine-h {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.nv-store-mine-t { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.nv-store-mine-toggle {
    appearance: none; cursor: pointer; font: inherit; font-size: 12px;
    border: 1px solid var(--border-color, #e3e3e3); background: transparent;
    color: var(--text-secondary); padding: 2px 10px; border-radius: 999px;
    flex: 0 0 auto; transition: .15s; line-height: 1.6;
}
.nv-store-mine-toggle:hover { border-color: var(--accent, #136ce9); color: var(--accent, #136ce9); }
.nv-store-mine-list[hidden] { display: none; }

/* ================= 书城分类管理（新建 / 编辑 / 删除 / 排序） ================= */
.nv-cat-manage { margin-left: 8px; }

.nv-cat-list { max-height: 52vh; overflow-y: auto; margin: 4px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.nv-cat-empty { margin: 8px 0; color: var(--text-secondary); font-size: 13px; }

.nv-cat-row {
    display: flex; align-items: center; gap: 8px; padding: 8px 10px;
    background: var(--bg-secondary, #f5f6f8); border: 1px solid var(--border-color, #ececec);
    border-radius: 10px;
}
.nv-cat-row.nv-cat-dragging { opacity: .4; }
.nv-cat-row.nv-cat-over { border-color: var(--accent, #136ce9); box-shadow: 0 0 0 2px rgba(19,108,233,.18); }
.nv-cat-handle { cursor: grab; color: var(--text-secondary); font-size: 15px; user-select: none; }
.nv-cat-name { flex: 1 1 auto; min-width: 0; font-size: 14px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nv-cat-acts { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.nv-mini {
    appearance: none; cursor: pointer; font: inherit; font-size: 13px; line-height: 1;
    width: 30px; height: 28px; border-radius: 8px;
    border: 1px solid var(--border-color, #e3e3e3); background: var(--bg-primary, #fff);
    color: var(--text-primary); transition: .15s;
}
.nv-mini:hover:not(:disabled) { border-color: var(--accent, #136ce9); color: var(--accent, #136ce9); }
.nv-mini:disabled { opacity: .35; cursor: default; }
.nv-mini-danger:hover:not(:disabled) { border-color: #c33; color: #c33; }

.nv-cat-add { display: flex; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--border-color, #ececec); }
.nv-cat-add .nv-input { flex: 1 1 auto; }

@media (max-width: 600px) {
    .nv-cat-manage { margin-left: 0; }
}
