/* ==========================================
   1. 基础重置与全屏容器 (PC & 手机共用)
   统一字体栈与主页一致，保留深色阅读背景
   ========================================== */
html, body {
    background-color: #000000;
    color: #ffffff;
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

/* 漫画展示大容器 */
.viewer-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: #000000;
}

/* 统一漫画图片的基础渲染。缩放由 JS 按屏幕帧提交，避免 max-width/max-height
   过渡触发连续布局；只在实际缩放时申请合成层。 */
.viewer-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-select: none;
    transition: none;
    backface-visibility: hidden;
    will-change: auto;
}
.viewer-container.reader-zoomed img,
.viewer-container.reader-zooming img {
    will-change: transform;
}

/* 网页单页阅读缩放状态：缩放或拖动时不叠加普通图片过渡，避免手势跟手延迟。 */
.viewer-container.reader-zoomed {
    cursor: grab;
}
.viewer-container.reader-zoomed.reader-zooming {
    cursor: grabbing;
}
.viewer-container.reader-zooming img {
    transition: none !important;
}

/* 参考阅读器的上下黑色渐变：控制栏隐藏时保留边缘层次，内容区域保持干净。 */
.viewer-container::before,
.viewer-container::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    height: 112px;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.28s ease;
}
.viewer-container::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}
.viewer-container::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0));
}
body.menu-open .viewer-container::before,
body.menu-open .viewer-container::after {
    opacity: 0.78;
}

/* 背景变灰遮罩层 */
.dim-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.68);
    z-index: 8;
    display: block;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0s linear 0.24s;
}
.dim-overlay.visible {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

/* ==========================================
   2. 导航栏通用骨架 (PC & 手机共用)
   纯色功能区，避免漫画内容透过控制栏影响阅读
   ========================================== */
.nav-bar-top {
    position: fixed;
    left: 0;
    width: 100%;
    background-color: #2C2C2C;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    box-shadow: none;
    transition: top 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-bar-bottom {
    position: fixed;
    left: 0;
    width: 100%;
    background-color: #2C2C2C;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none;
    z-index: 10;
    display: flex;
    box-sizing: border-box;
    box-shadow: none;
    transition: bottom 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 单页翻页：黑白界面中只保留轻微位移和淡入，避免动画抢阅读注意力。 */
.reader-page-enter-next > img,
.reader-page-enter-prev > img,
.reader-page-enter-fade > img {
    animation-duration: 0.24s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: both;
    /* 只淡入，不再动画 transform，避免覆盖缩放控制器刚提交的矩阵。 */
    animation-name: readerPageEnterFade;
}
.reader-page-enter-fade > img { animation-name: readerPageEnterFade; }
.reader-spread-double {
    gap: 0 !important;
    justify-content: center !important;
    align-items: center !important;
}
.reader-spread-double > img {
    width: auto !important;
    max-width: 50% !important;
    flex: 0 0 auto !important;
}
.reader-spread-single > img {
    width: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    flex: 0 1 auto !important;
}
@keyframes readerPageEnterNext {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes readerPageEnterPrev {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes readerPageEnterFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==========================================
   3. 通用小组件样式
   统一圆角、配色与主页按钮体系呼应
   ========================================== */
.btn-back {
    display: flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.2s;
}
.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.35);
}

/* 与 Android app 的 ic_back.xml 使用同一条矢量 pathData。 */
.reader-exit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    text-decoration: none;
    border-radius: 50%;
    transition: background 0.18s ease, transform 0.18s ease;
}
.reader-exit-button svg {
    display: block;
    width: 24px;
    height: 24px;
    fill: currentColor;
}
.reader-exit-button:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(-1px);
}

.reader-select {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    cursor: pointer;
    outline: none;
}
.reader-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.reader-select-custom {
    position: relative;
    display: inline-flex;
    min-width: 156px;
}
.reader-mode-select-custom { min-width: 170px; }
.reader-layout-select-custom { min-width: 84px; }
.reader-chapter-select-custom {
    min-width: 150px;
    max-width: 190px;
}
.reader-select-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 7px 12px 7px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #ffffff;
    font: inherit;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.reader-select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.reader-select-trigger:hover,
.reader-select-custom.open .reader-select-trigger {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.42);
}
.reader-select-custom.open .reader-select-trigger {
    transform: translateY(-1px);
}
.reader-select-chevron {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    color: #aaaaaa;
    border-right: 1.5px solid #aaaaaa;
    border-bottom: 1.5px solid #aaaaaa;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.18s ease, border-color 0.18s ease;
}
.reader-select-custom.open .reader-select-chevron {
    transform: rotate(225deg) translate(-1px, -1px);
    border-color: #ffffff;
}
.reader-select-menu {
    position: absolute;
    left: 0;
    right: 0;
    min-width: 100%;
    max-width: 340px;
    bottom: calc(100% + 8px);
    padding: 5px;
    background: rgba(12, 12, 12, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.48);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px) scale(0.98);
    transform-origin: bottom center;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
    z-index: 30;
}
.reader-select-custom.open .reader-select-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
}
.reader-select-menu button {
    display: block;
    width: 100%;
    padding: 9px 11px;
    background: transparent;
    border: 0;
    border-radius: 9px;
    color: #d6d6d6;
    font: inherit;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}
.reader-select-menu button:hover,
.reader-select-menu button[aria-selected="true"] {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}
.reader-select option {
    background: #1a1a1a;
    color: #ffffff;
}
.reader-control-group {
    display: flex;
    align-items: center;
    gap: 6px;
}
.bottom-left-group,
.bottom-right-group {
    gap: 14px;
}

.page-badge {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    font-weight: 500;
}

.reader-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #cccccc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
}
.reader-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.reader-btn:disabled {
    cursor: not-allowed;
}

.btn-rotate {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-rotate:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* 顶部栏标题文字 */
.reader-title {
    margin: 0;
    font-weight: 600;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 顶部栏首页链接 */
.btn-home {
    color: #aaaaaa;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 5px 12px;
    border-radius: 999px;
    transition: all 0.2s;
}
.btn-home:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}

/* ==========================================
   4. 上下章导航按钮
   ========================================== */
.chapter-nav-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #cccccc;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}
.chapter-nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}
.chapter-nav-btn.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* 章节下拉选择器 */
.chapter-select {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    cursor: pointer;
    outline: none;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chapter-select option {
    background: #1a1a1a;
    color: #ffffff;
}

/* ==========================================
   6. 页数跳转输入框
   ========================================== */
.page-jump-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 4px 12px;
}
.page-jump-input {
    width: 36px;
    text-align: center;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    outline: none;
    -moz-appearance: textfield;
}
.page-jump-input::-webkit-outer-spin-button,
.page-jump-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.page-jump-separator {
    color: #888;
    font-size: 13px;
}
.page-jump-total {
    color: #aaa;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
}

/* ==========================================
   7. 条漫模式上/下章按钮
   ========================================== */
.webtoon-next-chapter,
.webtoon-prev-chapter {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}
.webtoon-next-chapter:hover,
.webtoon-prev-chapter:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================
   6. 移动端底部栏 3 图标按钮
   ========================================== */
.icon-btn {
    position: relative;
    background: transparent;
    border: none;
    color: #ffffff;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
    flex: 1;
}
.icon-btn:active { opacity: 0.6; }
.icon-btn-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #ffffff;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
}

/* ==========================================
   7. 弹出面板（设置/评论/章节）
   ========================================== */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 80vh;
    background: #1f2024;
    color: #e6e6e6;
    border-radius: 16px 16px 0 0;
    z-index: 100;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}
.sheet.open { transform: translateY(0); }

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 15px;
    font-weight: 500;
    flex-shrink: 0;
    position: relative;
}
.sheet-handle { flex-direction: column; align-items: stretch; padding-top: 8px; }
.drag-handle {
    width: 36px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    margin: 0 auto 10px;
}
.chapters-meta { text-align: left; }
.chapter-meta-count { font-size: 12px; color: #999; font-weight: 400; margin-left: 8px; }

.sheet-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 24px;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1;
}
.sheet-close:active { color: #fff; }

.sheet-body {
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}
.sheet-chapters { padding: 0 0 20px; }

/* ==========================================
   8. 设置面板
   ========================================== */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 12px;
}
.setting-label { font-size: 14px; color: #e6e6e6; }
.setting-hint { font-size: 11px; color: #888; margin-top: 2px; }
.setting-control { display: flex; align-items: center; gap: 6px; flex: 1; justify-content: flex-end; }
.setting-icon { color: #aaa; font-size: 14px; }

.slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    max-width: 160px;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    outline: none;
}
.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f2f2f2;
    cursor: pointer;
}
.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f2f2f2;
    cursor: pointer;
    border: none;
}

.btn-group-3, .btn-group-2 { display: flex; gap: 4px; }
.opt-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ccc;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s;
    min-width: 50px;
    text-align: center;
}
.opt-btn.active {
    border-color: #f2f2f2;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.switch input { display: none; }
.slider-bg {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    transition: background 0.2s;
    cursor: pointer;
}
.slider-bg::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.switch input:checked + .slider-bg { background: #f2f2f2; }
.switch input:checked + .slider-bg::before { transform: translateX(20px); }

/* ==========================================
   9. 评论面板
   ========================================== */
.comment-summary {
    padding: 12px 16px;
    font-size: 13px;
    color: #aaa;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.comment-count-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    color: #ccc;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: 4px;
}
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #333;
    flex-shrink: 0;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; gap: 8px; font-size: 12px; color: #999; margin-bottom: 4px; }
.comment-author { color: #ccc; font-weight: 500; }
.comment-content { font-size: 14px; color: #e6e6e6; line-height: 1.5; word-break: break-word; }
.comment-actions { display: flex; gap: 16px; margin-top: 6px; font-size: 12px; color: #888; }
.comment-action { cursor: pointer; }
.comment-empty { padding: 40px 16px; text-align: center; color: #888; font-size: 13px; }
.comment-reply-btn { background: none; border: none; color: #888; font-size: 12px; cursor: pointer; padding: 2px 0; margin-top: 4px; }
.comment-reply-btn:hover { color: #ccc; }
.comment-replies { margin-left: 38px; margin-top: 6px; padding: 6px 10px; background: rgba(255,255,255,0.04); border-radius: 8px; }
.comment-reply-item { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.03); }
.comment-reply-item:last-child { border-bottom: none; }
.comment-avatar-sm { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; }
.comment-reply-to { font-size: 12px; color: #888; }
.comment-reply-to .reply-to-name { color: #ffffff; text-decoration: none; }

/* ==========================================
   10. 章节列表面板
   ========================================== */
.chapter-row-list { list-style: none; margin: 0; padding: 0; }
.chapter-row-list li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.chapter-row-list li.current { background: rgba(255, 255, 255, 0.10); }
.chapter-row {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    color: #e6e6e6;
    text-decoration: none;
    font-size: 14px;
    gap: 12px;
}
.chapter-row-num {
    color: #888;
    font-size: 13px;
    min-width: 32px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}
.chapter-row-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-row-arrow { color: #ffffff; font-size: 16px; }
.chapter-empty { padding: 40px 16px; text-align: center; color: #888; font-size: 13px; }

/* ==========================================
   11. 隐藏页码徽章
   ========================================== */
body.hide-page-indicator .page-indicator { display: none; }
body.hide-page-indicator .page-indicator-mobile { display: none !important; }

/* ==========================================
   12. 进度条 + 上下话圆形按钮（移动端底部固定）
   ========================================== */
/* PC 端默认隐藏（仅在 .reader-phone body class 下显示） */
.progress-bar,
.page-indicator-mobile {
    display: none;
}

body.reader-phone .nav-bar-bottom {
    flex-direction: column;
}

body.reader-phone .progress-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    box-sizing: border-box;
}

body.reader-phone .icon-row {
    display: flex;
    width: 100%;
}

.circle-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}
.circle-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}
.circle-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.circle-btn:active:not(:disabled) {
    transform: scale(0.95);
}
.progress-track {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    position: relative;
    touch-action: none;
    cursor: pointer;
}
.progress-fill {
    height: 100%;
    background: #f2f2f2;
    width: 0%;
    transition: width 0.2s ease;
    border-radius: 2px;
    position: relative;
}
.progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f2f2f2;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.35);
}

/* ==========================================
   13. 移动端页码指示器
   ========================================== */
body.reader-phone .page-indicator-mobile {
    display: block;
    position: fixed;
    left: 16px;
    right: auto;
    bottom: 120px;
    z-index: 11;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 12px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, monospace;
    pointer-events: none;
    user-select: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* 手机端不使用阅读器上下渐变或整页灰色遮罩，深浅主题均保持原图亮度。 */
body.reader-phone .viewer-container::before,
body.reader-phone .viewer-container::after {
    display: none !important;
}
body.reader-phone .dim-overlay {
    background: transparent !important;
}

/* 日漫模式只交换两侧章节按钮，进度条本身始终保持从左到右。 */
body.reader-phone.mode-rl .progress-bar {
    direction: rtl;
}
body.reader-phone.mode-rl .progress-track {
    direction: ltr;
}
body.reader-phone.mode-rl .progress-fill {
    margin-left: 0;
    margin-right: 0;
}

/* 手机端黑夜 / 白天阅读主题；只切换阅读器界面，不改变漫画图片。 */
body.reader-phone:not(.reader-light-mode),
body.reader-phone:not(.reader-light-mode) .viewer-container {
    background-color: #2C2C2C;
}
body.reader-phone.reader-light-mode .nav-bar-top,
body.reader-phone.reader-light-mode .nav-bar-bottom {
    background-color: #F5F5F5;
}
body.reader-phone.reader-light-mode,
body.reader-phone.reader-light-mode .viewer-container {
    background-color: #ffffff;
    color: #111111;
}
body.reader-phone.reader-light-mode .viewer-container::before {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
}
body.reader-phone.reader-light-mode .viewer-container::after {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
}
body.reader-phone.reader-light-mode .btn-back-arrow,
body.reader-phone.reader-light-mode .reader-title,
body.reader-phone.reader-light-mode .icon-btn {
    color: #111111;
}
body.reader-phone.reader-light-mode .circle-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.16);
    color: #111111;
}
body.reader-phone.reader-light-mode .progress-track {
    background: rgba(0, 0, 0, 0.14);
}
body.reader-phone.reader-light-mode .progress-fill,
body.reader-phone.reader-light-mode .progress-fill::after {
    background: #111111;
}
body.reader-phone.reader-light-mode .page-indicator-mobile {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(0, 0, 0, 0.14);
    color: #111111;
}
body.reader-phone.reader-light-mode .sheet {
    background: #ffffff;
    color: #222222;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.18);
}
body.reader-phone.reader-light-mode .sheet-header,
body.reader-phone.reader-light-mode .comment-summary,
body.reader-phone.reader-light-mode .comment-item,
body.reader-phone.reader-light-mode .chapter-row-list li,
body.reader-phone.reader-light-mode .setting-row {
    border-color: rgba(0, 0, 0, 0.09);
}
body.reader-phone.reader-light-mode .sheet-close {
    color: #555555;
}
body.reader-phone.reader-light-mode .setting-label,
body.reader-phone.reader-light-mode .comment-content,
body.reader-phone.reader-light-mode .chapter-row {
    color: #222222;
}
body.reader-phone.reader-light-mode .comment-author {
    color: #333333;
}
body.reader-phone.reader-light-mode .opt-btn {
    border-color: rgba(0, 0, 0, 0.18);
    color: #555555;
}
body.reader-phone.reader-light-mode .opt-btn.active {
    border-color: #222222;
    background: rgba(0, 0, 0, 0.08);
    color: #111111;
}
body.reader-phone.reader-light-mode .chapter-row-list li.current {
    background: rgba(0, 0, 0, 0.07);
}
body.reader-phone.reader-light-mode .comment-replies {
    background: rgba(0, 0, 0, 0.04);
}

/* ==========================================
   14. Toast 提示（翻页边界 / 操作反馈）
   ========================================== */
.reader-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    font-size: 15px;
    padding: 12px 24px;
    border-radius: 10px;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.reader-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .nav-bar-top,
    .nav-bar-bottom,
    .dim-overlay,
    .viewer-container img,
    .reader-toast {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* ==========================================
   15. 收藏爱心按钮激活态
   ========================================== */
.icon-btn.favorited svg {
    animation: heartPop 0.3s ease;
}
@keyframes heartPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ==========================================
   16. 评论输入栏（面板底部固定）
   ========================================== */
.comment-input-bar {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #0b0b0b;
    flex-shrink: 0;
}
.comment-input-bar input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 8px 14px;
    color: #e6e6e6;
    font-size: 14px;
    outline: none;
    -webkit-appearance: none;
}
.comment-input-bar input:focus {
    border-color: rgba(255, 255, 255, 0.5);
}
.comment-input-bar button {
    background: #f2f2f2;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.comment-input-bar button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

