.read-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    transition: transform .25s ease;
}

.read-nav.hidden {
    transform: translateY(-100%);
}

.read-nav-inner {
    height: 48px;
    position: relative;
    justify-content: flex-start;
}

.read-nav-inner .nav-back {
    background: #f5f5f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #555;
    flex-shrink: 0;
    padding: 0;
}

.read-nav-inner .chapter-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    max-width: 55%;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.read-nav-inner .avatar-btn {
    margin-left: auto;
}

/* 阅读主体 */
.read-wrap {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 68px 16px 90px;
}

.read-chapter-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.read-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.read-content p {
    margin-bottom: 1.2em;
    text-indent: 2em;
    text-align: justify;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.read-pager {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

/* 底部工具 */
.read-tools {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 50px;
    padding: 0 max(16px, calc((100vw - var(--content-width)) / 2));
    transition: transform .25s ease;
}

.read-tools.hidden {
    transform: translateY(100%);
}

.read-tools button,
.read-tools a {
    flex: 1;
    text-align: center;
    background: none;
    border: none;
    font-size: 14px;
    color: #555;
    padding: 6px 8px;
    min-width: 0;
}

.read-tools button:active,
.read-tools a:active {
    color: var(--primary);
}

/* 抽屉 */
.drawer-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 150;
}

.drawer[hidden],
.drawer-mask[hidden] {
    display: none;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(360px, 85vw);
    height: 100%;
    background: #fff;
    z-index: 160;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 16px rgba(0, 0, 0, .15);
    animation: slide-in .25s ease;
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.drawer-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-weight: 600;
}

.drawer-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    padding: 0 6px;
}

/* 阅读设置 */
.setting-row {
    padding: 14px 16px;
    border-bottom: 1px solid #f2f2f2;
}

.setting-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.setting-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.setting-options button {
    min-width: 40px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #555;
}

.setting-options button.active {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 0, 0, .03);
}

.setting-options .swatch {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 50%;
}

.setting-options .swatch.dark {
    border-color: #444;
}

/* 章节列表 */
.drawer-chapters {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 20px;
}

.chapter-list {
    list-style: none;
}

.chapter-list li a {
    display: block;
    padding: 9px 10px;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #f5f5f5;
}

.chapter-list li a:hover {
    color: var(--primary);
}

.chapter-list li.current a {
    color: var(--primary);
    font-weight: 600;
    background: rgba(0, 0, 0, .03);
    border-radius: 6px;
}

/* 章节评论 */
.comments {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #ddd;
}

.comments-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 14px;
}

.comments-count {
    margin-left: 8px;
    font-size: 13px;
    font-weight: 400;
    color: #999;
}

.comment-form {
    margin-bottom: 16px;
}

.comment-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background: rgba(255, 255, 255, .6);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.comment-form button {
    display: block;
    margin-left: auto;
    margin-top: 10px;
    padding: 8px 22px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
}

.comment-form button:active {
    opacity: .85;
}

.comments-tip {
    padding: 12px 0;
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
}

.comments-tip a {
    color: var(--primary);
}

.comments-list {
    list-style: none;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #eee;
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-user {
    font-size: 14px;
    font-weight: 600;
}

.comment-time {
    font-size: 12px;
    color: #999;
}

.comment-content {
    font-size: 14px;
    line-height: 1.7;
    word-break: break-all;
    overflow-wrap: anywhere;
    color: inherit;
}

.comments-empty {
    padding: 24px 0;
    text-align: center;
    font-size: 14px;
    color: #999;
}

.comments-pager {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 14px 0 4px;
    flex-wrap: wrap;
}

.comments-pager a {
    min-width: 32px;
    padding: 5px 9px;
    text-align: center;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #555;
    background: rgba(255, 255, 255, .5);
}

.comments-pager a.current {
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}