/* ============================================================
   书籍详情阅读页专属样式
   布局：左侧目录/批注 | 中间内容 | 右侧搜索
   ============================================================ */

/* ---- 三栏布局 ---- */
.book-reader-wrapper {
    display: grid;
    grid-template-columns: 240px 1fr 300px;
    height: calc(100vh - var(--header-h, 64px));
    background: #f7f4ed;
    align-items: stretch;
}
.main-inner { max-width: none !important; padding: 0 !important; }
.site-main { padding: 0 !important; }

/* ---- 左侧边栏（目录 + 批注） ---- */
.book-left-sidebar {
    background: #fff;
    border-right: 1px solid #e5dfd0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #e5dfd0;
    flex-shrink: 0;
}
.sidebar-tab {
    flex: 1;
    padding: 10px 0;
    text-align: center;
    font-size: 13px;
    color: #a89b87;
    background: #faf8f4;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.sidebar-tab:hover { color: #913500; background: #f5f0e8; }
.sidebar-tab.active { color: #913500; border-bottom-color: #913500; background: #fff; font-weight: 600; }

.book-toc-header { padding: 16px; border-bottom: 1px solid #e5dfd0; }
.book-toc-back { font-size: 13px; color: #a89b87; text-decoration: none; display: inline-block; margin-bottom: 8px; }
.book-toc-title { font-size: 15px; font-weight: 700; color: #2c2418; line-height: 1.4; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-toc-author { font-size: 12px; color: #a89b87; }
.book-toc-list { flex: 1; overflow-y: auto; padding: 8px 0; }
.book-toc-item { display: block; padding: 10px 18px; font-size: 14px; color: #6b6254; text-decoration: none; border-left: 3px solid transparent; transition: all 0.2s; line-height: 1.5; }
.book-toc-item:hover { background: rgba(145,53,0,0.06); color: #913500; }
.book-toc-item.active { background: rgba(145,53,0,0.06); color: #913500; border-left-color: #913500; font-weight: 600; }
.book-toc-empty { padding: 40px 20px; text-align: center; color: #a89b87; font-size: 13px; }

/* ---- 中间内容区 ---- */
.book-content-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f7f4ed;
}

/* 顶部工具栏 */
.book-content-toolbar {
    height: 48px;
    background: #fff;
    border-bottom: 1px solid #e5dfd0;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 4px;
    flex-shrink: 0;
    position: relative;
}
.toolbar-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.toolbar-btn {
    padding: 5px 10px;
    border: 1px solid #e5dfd0;
    border-radius: 6px;
    background: transparent;
    color: #6b6254;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}
.toolbar-btn:hover { border-color: #913500; color: #913500; background: rgba(145,53,0,0.04); }
.toolbar-btn.active { background: #913500; color: #fff; border-color: #913500; }
.toolbar-btn svg { width: 16px; height: 16px; stroke-width: 1.8; }
.toolbar-chapter-title { font-size: 14px; font-weight: 600; color: #2c2418; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar-right { display: flex; gap: 4px; align-items: center; }

/* 设置下拉菜单 */
.settings-dropdown {
    position: absolute;
    top: 48px;
    right: 16px;
    width: 220px;
    background: #fff;
    border: 1px solid #e5dfd0;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
    padding: 8px 0;
}
.settings-dropdown.active { display: block; }

/* ---- 内容主体 ---- */
.book-content-body { flex: 1; overflow-y: auto; padding: 32px 40px; }
.book-content-inner { max-width: 720px; margin: 0 auto; width: 100%; }

/* 章节标题 */
.chapter-heading {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 32px;
    color: #2c2418;
    font-family: "Noto Serif SC", "SimSun", serif;
    letter-spacing: 2px;
}

/* 正文样式 */
.chapter-body {
    font-size: 18px;
    line-height: 2.4;
    color: #3a3228;
    font-family: "Noto Serif SC", "SimSun", serif;
}
.chapter-body p {
    margin: 0 0 1.2em 0;
    text-indent: 2em;
}
.chapter-body p.no-indent { text-indent: 0; }

/* 可点击文字 */
.word-char {
    cursor: pointer;
    border-bottom: 1px dotted transparent;
    transition: all 0.15s;
}
.word-char:hover {
    background: rgba(145, 53, 0, 0.08);
    border-bottom-color: #c4956a;
    border-radius: 2px;
}

/* 三种阅读模式 */
.mode-text { display: block; }
.mode-scan {
    display: none;
    gap: 0;
    max-width: none;
    margin: 0;
    height: 100%;
}
.mode-scan .scan-left {
    flex: 0 0 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #e5dfd0;
    overflow: hidden;
}
.mode-scan .scan-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #faf8f4;
    border-bottom: 1px solid #e5dfd0;
    flex-shrink: 0;
}
.mode-scan .scan-body {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    background: #f7f4ed;
}
.mode-scan .scan-body img {
    max-width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 4px;
    transition: transform 0.2s ease;
    transform-origin: top center;
}
.mode-scan .scan-right {
    flex: 0 0 50%;
    min-width: 0;
    overflow-y: auto;
    padding: 32px 40px;
    background: #f7f4ed;
}
.mode-compare {
    display: none;
    gap: 0;
    max-width: none;
    margin: 0;
    height: 100%;
}
.mode-compare .compare-scan {
    flex: 0 0 50%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-right: 1px solid #e5dfd0;
    overflow: hidden;
}
.mode-compare .compare-scan-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #faf8f4;
    border-bottom: 1px solid #e5dfd0;
    flex-shrink: 0;
}
.mode-compare .compare-scan-header button {
    padding: 5px 12px;
    border: 1px solid #e5dfd0;
    border-radius: 6px;
    background: #fff;
    color: #6b6254;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}
.mode-compare .compare-scan-header button:hover {
    border-color: #913500;
    color: #913500;
    background: rgba(145,53,0,0.04);
}
.mode-compare .compare-scan-body {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    background: #f7f4ed;
}
.mode-compare .compare-scan-body img {
    max-width: 100%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border-radius: 4px;
    transition: transform 0.2s ease;
    transform-origin: top center;
}
.mode-compare .compare-text {
    flex: 0 0 50%;
    min-width: 0;
    overflow-y: auto;
    padding: 32px 40px;
    background: #f7f4ed;
}

/* 无内容提示 */
.no-content { text-align: center; color: #a89b87; padding: 60px 0; }
.no-content .icon { font-size: 32px; margin-bottom: 12px; }

/* 书籍简介（无章节时） */
.book-intro { max-width: 600px; margin: 0 auto; text-align: center; padding: 40px 0; }
.book-intro-cover { width: 200px; margin: 0 auto 24px; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.book-intro-cover .cover-placeholder.large { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 80px; color: #a89b87; background: linear-gradient(135deg, #faf6ee, #efe8d8); }
.book-intro-title { font-size: 26px; font-weight: 700; color: #2c2418; margin-bottom: 8px; }
.book-intro-subtitle { font-size: 15px; color: #6b6254; margin-bottom: 24px; }
.book-intro-summary { text-align: left; background: #fff; border: 1px solid #e5dfd0; border-radius: 12px; padding: 24px; }
.book-intro-summary h3 { font-size: 16px; font-weight: 600; color: #2c2418; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid #913500; display: inline-block; }
.book-intro-summary p { font-size: 15px; line-height: 2; color: #6b6254; text-indent: 2em; }

/* 章节导航 */
.chapter-nav { max-width: 720px; margin: 48px auto 0; display: flex; justify-content: space-between; gap: 16px; padding-top: 24px; border-top: 1px solid #e5dfd0; }
.chapter-nav-btn { display: flex; flex-direction: column; padding: 12px 20px; border: 1px solid #e5dfd0; border-radius: 8px; background: #fff; color: #2c2418; text-decoration: none; transition: all 0.2s; min-width: 140px; }
.chapter-nav-btn:hover { border-color: #913500; color: #913500; }
.chapter-nav-btn.next { text-align: right; margin-left: auto; }
.chapter-nav-btn span { font-size: 14px; font-weight: 600; }
.chapter-nav-btn small { font-size: 12px; color: #a89b87; margin-top: 4px; }

/* ---- 右侧搜索面板 ---- */
.book-right-sidebar {
    background: #fff;
    border-left: 1px solid #e5dfd0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 右侧 Tab */
.right-sidebar-tabs {
    display: flex;
    border-bottom: 1px solid #e5dfd0;
    flex-shrink: 0;
}
.right-sidebar-tab {
    flex: 1;
    padding: 10px 0;
    text-align: center;
    font-size: 12px;
    color: #a89b87;
    background: #faf8f4;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}
.right-sidebar-tab:hover { color: #913500; background: #f5f0e8; }
.right-sidebar-tab.active { color: #913500; border-bottom-color: #913500; background: #fff; font-weight: 600; }

.right-sidebar-header {
    padding: 14px 16px;
    border-bottom: 1px solid #e5dfd0;
    font-size: 14px;
    font-weight: 600;
    color: #2c2418;
    flex-shrink: 0;
}

/* 搜索输入区 */
.right-search-box {
    padding: 10px 14px 12px;
    flex-shrink: 0;
}
.right-search-input-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
}
.right-search-input-wrap input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #d4c9b8;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #3a3228;
    transition: border-color 0.2s;
}
.right-search-input-wrap input:focus { outline: none; border-color: #913500; }
.right-search-input-wrap input::placeholder { color: #c4b8a5; }
.search-clear {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #d4c9b8;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    color: #a89b87;
    padding: 0;
    transition: all 0.2s;
}
.search-clear:hover { border-color: #913500; color: #913500; }
.search-submit {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid #d4c9b8;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    color: #6b6254;
    padding: 0;
    transition: all 0.2s;
}
.search-submit:hover { border-color: #913500; color: #913500; background: rgba(145,53,0,0.04); }

/* 模糊搜索复选框 */
.search-fuzzy {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    color: #8a7e6b;
    cursor: pointer;
    user-select: none;
}
.search-fuzzy input { display: none; }
.search-fuzzy .check-icon {
    width: 16px; height: 16px;
    border: 1px solid #c4b8a5;
    border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    color: transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}
.search-fuzzy input:checked + .check-icon {
    background: #913500;
    border-color: #913500;
    color: #fff;
}
.search-fuzzy input:checked + .check-icon svg { stroke: #fff; }

.right-search-count {
    font-size: 12px;
    color: #a89b87;
    margin-top: 8px;
    min-height: 18px;
}
.right-search-nav {
    display: none;
    gap: 6px;
    margin-top: 8px;
}
.right-search-nav.show { display: flex; }
.right-search-nav button {
    padding: 4px 10px;
    border: 1px solid #d4c9b8;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    color: #6b6254;
}
.right-search-nav button:hover { border-color: #913500; color: #913500; }

/* 搜索结果列表 */
.right-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}
.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0ebe3;
    cursor: pointer;
    transition: background 0.15s;
}
.search-result-item:hover { background: #faf8f4; }
.search-result-item.active { background: rgba(145,53,0,0.06); }
.search-result-title {
    font-size: 14px;
    font-weight: 600;
    color: #3a3228;
    line-height: 1.6;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-result-title .hl { color: #913500; font-weight: 600; }
.search-result-text {
    font-size: 13px;
    line-height: 1.8;
    color: #5c5346;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.search-result-text .hl { color: #c45c26; font-weight: 500; }
.search-result-meta {
    font-size: 11px;
    color: #a89b87;
    margin-top: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.search-result-empty {
    text-align: center;
    color: #c4b8a5;
    padding: 40px 14px;
    font-size: 13px;
}

/* 横排操作按钮 */
.right-actions-bar {
    padding: 12px 14px;
    border-top: 1px solid #e5dfd0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-shrink: 0;
    gap: 4px;
}
.action-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 8px;
    border: none;
    background: transparent;
    color: #8a7e6b;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 6px;
    text-decoration: none;
}
.action-icon-btn:hover { color: #913500; background: rgba(145,53,0,0.04); }
.action-icon-btn.active { color: #913500; }
.action-icon-btn svg { stroke-width: 2; }
.action-icon-btn span { font-size: 11px; }

/* 评论区域 */
.right-comment-area {
    border-top: 1px solid #e5dfd0;
    flex-shrink: 0;
    max-height: 300px;
    overflow-y: auto;
}
.comment-header {
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #2c2418;
    display: flex;
    align-items: center;
    gap: 6px;
}
.comment-header svg { stroke: #a89b87; }
.comment-count { color: #a89b87; font-weight: 400; margin-left: 2px; }
.comment-input-box { padding: 0 14px 10px; }
.comment-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.comment-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.comment-input-wrap input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #d4c9b8;
    border-radius: 16px;
    font-size: 13px;
    background: #fff;
    color: #3a3228;
}
.comment-input-wrap input:focus { outline: none; border-color: #913500; }
.comment-input-wrap input::placeholder { color: #c4b8a5; }
.comment-send {
    padding: 6px 14px;
    border: none;
    border-radius: 14px;
    background: #913500;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.comment-send:hover { background: #7a2c00; }
.comment-login-tip {
    padding: 8px 0;
    font-size: 13px;
    color: #a89b87;
    text-align: center;
}
.comment-login-tip a { color: #913500; text-decoration: none; }
.comment-list { padding: 0 14px 10px; }
.comment-empty {
    text-align: center;
    color: #c4b8a5;
    padding: 16px 0;
    font-size: 12px;
}
.comment-item {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #f0ebe3;
}
.comment-item:last-child { border-bottom: none; }
.comment-item-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0ebe3;
}
.comment-item-body { flex: 1; min-width: 0; }
.comment-item-name {
    font-size: 12px;
    font-weight: 600;
    color: #2c2418;
    margin-bottom: 2px;
}
.comment-item-name .author-tag {
    display: inline-block;
    padding: 0 4px;
    border: 1px solid #913500;
    border-radius: 3px;
    font-size: 10px;
    color: #913500;
    margin-left: 4px;
    font-weight: 400;
}
.comment-item-text {
    font-size: 12px;
    color: #4a3f2f;
    line-height: 1.6;
    word-break: break-all;
}
.comment-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    font-size: 11px;
    color: #c4b8a5;
}
.comment-item-meta button {
    border: none;
    background: transparent;
    color: #c4b8a5;
    font-size: 11px;
    cursor: pointer;
    padding: 0;
}
.comment-item-meta button:hover { color: #913500; }
.comment-reply {
    margin-top: 6px;
    padding: 6px 8px;
    background: #faf8f4;
    border-radius: 6px;
    font-size: 12px;
}
.comment-reply-name { color: #913500; font-weight: 600; }
.comment-reply-text { color: #6b6254; }

/* 相关书籍 */
.right-related { padding: 12px 14px; border-top: 1px solid #e5dfd0; flex-shrink: 0; }
.right-related h4 { font-size: 13px; font-weight: 600; color: #2c2418; margin-bottom: 10px; }
.related-list { display: flex; flex-direction: column; gap: 8px; }
.related-item { display: flex; gap: 8px; padding: 6px; border-radius: 6px; text-decoration: none; color: inherit; transition: all 0.2s; }
.related-item:hover { background: #f7f4ed; }
.related-cover { width: 36px; height: 48px; border-radius: 4px; overflow: hidden; background: #f7f4ed; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #a89b87; }
.related-cover img { width: 100%; height: 100%; object-fit: cover; }
.related-info { flex: 1; min-width: 0; }
.related-title { font-size: 12px; font-weight: 600; color: #2c2418; line-height: 1.4; margin-bottom: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-author { font-size: 11px; color: #a89b87; }

/* ---- 搜索高亮 ---- */
.search-highlight { background: #ffe58f; border-radius: 2px; padding: 0 1px; }
.search-highlight.active { background: #ff7a45; color: #fff; }

/* ---- 实体高亮 ---- */
.entity-dynasty { color: #c45c26; cursor: pointer; }
.entity-person { color: #2b6cb0; cursor: pointer; }
.entity-place { color: #276749; cursor: pointer; }

/* ---- 批注高亮 ---- */
.text-highlight { background: #fef3c7; border-bottom: 2px solid #f59e0b; cursor: pointer; }

/* ---- 设置项 ---- */
.setting-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid #f0ebe3; font-size: 13px; color: #5c5346; }
.setting-item:last-child { border-bottom: none; }
.switch { position: relative; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #d4c9b8; border-radius: 20px; transition: 0.2s; }
.switch-slider:before { content: ""; position: absolute; height: 16px; width: 16px; left: 2px; bottom: 2px; background: #fff; border-radius: 50%; transition: 0.2s; }
.switch input:checked + .switch-slider { background: #913500; }
.switch input:checked + .switch-slider:before { transform: translateX(16px); }

/* ---- 批注面板内容 ---- */
.ann-list { max-height: calc(100vh - 300px); overflow-y: auto; }
.ann-item { padding: 10px; border-bottom: 1px solid #f0ebe3; font-size: 13px; }
.ann-item .ann-text { color: #2c2418; margin-bottom: 4px; cursor: pointer; }
.ann-item .ann-text:hover { color: #913500; }
.ann-item .ann-note { color: #8a7e6b; font-size: 12px; }
.ann-item .ann-time { color: #c4b8a5; font-size: 11px; margin-top: 4px; }
.ann-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e8e0d0; }
.ann-form textarea { width: 100%; height: 60px; padding: 8px; border: 1px solid #d4c9b8; border-radius: 6px; font-size: 13px; resize: vertical; box-sizing: border-box; }
.ann-form textarea:focus { outline: none; border-color: #913500; }
.ann-form-actions { display: flex; gap: 6px; margin-top: 8px; justify-content: flex-end; }
.ann-form-actions button { padding: 5px 12px; border-radius: 4px; font-size: 12px; cursor: pointer; border: 1px solid #d4c9b8; background: #fff; }
.ann-form-actions button.primary { background: #913500; color: #fff; border-color: #913500; }

/* ---- 字典浮动面板 ---- */
.dict-panel {
    position: fixed;
    top: calc(var(--header-h, 64px) + 60px);
    right: 316px;
    width: 300px;
    background: #fff;
    border: 1px solid #e8e0d0;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    z-index: 100;
    display: none;
    flex-direction: column;
    max-height: 480px;
}
.dict-panel.active { display: flex; }
.dict-header { padding: 12px 14px; border-bottom: 1px solid #f0ebe3; display: flex; align-items: center; justify-content: space-between; }
.dict-header h4 { margin: 0; font-size: 14px; color: #2c2418; }
.dict-header button { border: none; background: transparent; cursor: pointer; color: #a89b87; font-size: 16px; }
.dict-body { padding: 14px; overflow-y: auto; }
.dict-char-main { font-size: 56px; text-align: center; color: #2c2418; font-family: "Noto Serif SC", "SimSun", serif; line-height: 1.1; }
.dict-char-pinyin { text-align: center; color: #913500; font-size: 16px; margin-top: 4px; }
.dict-char-variants { text-align: center; font-size: 12px; color: #a89b87; margin-top: 6px; }
.dict-def { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0ebe3; }
.dict-def-source { font-size: 12px; font-weight: 600; color: #913500; margin-bottom: 6px; padding-left: 8px; border-left: 3px solid #913500; }
.dict-def-content { font-size: 13px; line-height: 1.8; color: #4a3f2f; padding-left: 11px; }
.dict-links { margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0ebe3; }
.dict-links-title { font-size: 12px; color: #a89b87; margin-bottom: 8px; }
.dict-links a { display: block; padding: 6px 10px; margin-bottom: 4px; background: #faf6ee; border-radius: 4px; font-size: 12px; color: #5c5346; text-decoration: none; }
.dict-links a:hover { background: #f5f0e8; color: #913500; }
.dict-empty { text-align: center; color: #a89b87; padding: 30px 0; font-size: 13px; }

/* ---- 底部导航 ---- */
.reader-nav {
    height: 52px;
    background: #fff;
    border-top: 1px solid #e8e0d0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}
.reader-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid #d4c9b8;
    border-radius: 6px;
    color: #5c5346;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}
.reader-nav a:hover { border-color: #913500; color: #913500; }
.reader-nav a.disabled { opacity: 0.4; pointer-events: none; }
.reader-nav .nav-info { font-size: 13px; color: #a89b87; }

/* ---- 标点隐藏 ---- */
.no-punct .punct-mark { display: none; }

/* ---- 响应式 ---- */
@media (max-width: 1100px) {
    .book-reader-wrapper { grid-template-columns: 0 1fr 0; }
    .book-left-sidebar, .book-right-sidebar { display: none; }
    .book-left-sidebar.show { display: flex; position: fixed; left: 0; top: var(--header-h,64px); bottom: 0; width: 260px; z-index: 50; }
    .book-right-sidebar.show { display: flex; position: fixed; right: 0; top: var(--header-h,64px); bottom: 0; width: 280px; z-index: 50; }
    .book-content-body { padding: 20px; }
    .dict-panel { right: 10px; width: 260px; }
    #btnMobileSearch { display: flex !important; }
}
@media (max-width: 768px) {
    .book-content-body { padding: 16px; }
    .chapter-body { font-size: 16px; }
    .mode-compare,
    .mode-scan { flex-direction: column; }
    .mode-scan .scan-left,
    .mode-scan .scan-right,
    .mode-compare .compare-scan,
    .mode-compare .compare-text {
        flex: none !important;
        width: 100%;
        height: auto;
    }
    .toolbar-btn span { display: none; }
}

/* ---- PDF 阅读器 ---- */
.pdf-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    overflow-y: auto;
    background: #f7f4ed;
}
.pdf-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #faf8f4;
    border-bottom: 1px solid #e5dfd0;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    flex-shrink: 0;
}
.pdf-toolbar button {
    padding: 5px 12px;
    border: 1px solid #e5dfd0;
    border-radius: 6px;
    background: #fff;
    color: #6b6254;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.pdf-toolbar button:hover {
    border-color: #913500;
    color: #913500;
    background: rgba(145,53,0,0.04);
}
.pdf-page-info {
    font-size: 13px;
    color: #a89b87;
    padding: 0 8px;
}
.pdf-canvas-container {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 20px;
}
#pdfCanvas {
    border: 1px solid #e5dfd0;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    max-width: 100%;
}
